Re: [Distutils] [PATCH] catch egg_base=./ foolishness ? was (distutils data_files and setuptools.pkg_resources are driving me crazy)
At 10:06 PM 7/15/2006 +0100, Robin Bryce wrote:
On 15/07/06, Robin Bryce <robinbryce@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. :)
On Jul 17, 2006, at 2:30 PM, Phillip J. Eby wrote:
At 10:06 PM 7/15/2006 +0100, Robin Bryce wrote:
On 15/07/06, Robin Bryce <robinbryce@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. :)
FYI egg_base what we're using on the PyObjC trunk [1] in order to facilitate "python setup.py develop" support without re-organizing everything. All of the top-level Python packages are in a Lib directory, so we set egg_base="Lib". [1] http://svn.red-bean.com/pyobjc/trunk/pyobjc/ -bob
At 02:42 PM 7/17/2006 -0700, Bob Ippolito wrote:
On Jul 17, 2006, at 2:30 PM, Phillip J. Eby wrote:
At 10:06 PM 7/15/2006 +0100, Robin Bryce wrote:
On 15/07/06, Robin Bryce <robinbryce@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. :)
FYI egg_base what we're using on the PyObjC trunk [1] in order to facilitate "python setup.py develop" support without re-organizing everything. All of the top-level Python packages are in a Lib directory, so we set egg_base="Lib".
If your package_dir={'':'Lib'}, the egg_base should be set automatically. This should also eliminate the need for the more-complex package_dir you're currently using.
participants (2)
-
Bob Ippolito
-
Phillip J. Eby