[Distutils] [PATCH] catch egg_base=./ foolishness ? was (distutils data_files and setuptools.pkg_resources are driving me crazy)

Phillip J. Eby pje at telecommunity.com
Mon Jul 17 23:30:31 CEST 2006


At 10:06 PM 7/15/2006 +0100, Robin Bryce wrote:
>On 15/07/06, Robin Bryce <robinbryce at gmail.com> wrote:
>>egg_base=./ seemed to prevent the installation of console_scripts.
>
>Oh fiddle sticks. this is because './' is not equal to os.curdir on
>*any* system.
>
>line 103: egg_info.py does the right thing: if self.egg_base !=
>os.curdir. This mirrors exactly how distutils.filelist.findall does
>the same gaurd on files in the current directory.
>
>Observing that:
>os.path.join('.' + os.sep, '') == os.path.join(os.curdir, '') and
>os.path.join('.', '') == os.path.join(os.curdir, '')
>
>how about this patch::

I don't see the point of the patch.  egg_base is supposed to be a directory 
name.  './' is not a directory name, and I don't see a use case for setting 
egg_base to that.  In fact, 99% or more of the time, there's no use case 
for setting --egg-base in the first place.  The option was created mainly 
to support certain kinds of workaround scenarios in the early days of 
setuptools development.  I would deprecate the option, except that it 
doesn't really do any harm, unless somebody messes around with it on the 
theory that it does more than what it actually does.  :)



More information about the Distutils-SIG mailing list