My point is that if someone types in at the command line the literal string "--egg-base=something" rather than "--egg-base something" that this if-condition will fail. That pip happens to use a space (and thus a new argument) is  a happy accident.  I think it would be a difficult bug to track down if someone did include the '='.  My suggestion is to use `getopt` or `distutils.fancy_getopt` or `argparser` to parse command line arguments rather than doing a manual partial job.  Note that argparser has a handy `parse_known_args` option for just these sorts of occasions that let's you ignore everything you don't want.