[Distutils] Adding entry points into Distutils ?
noah.gift at gmail.com
Fri May 8 00:21:14 CEST 2009
On Fri, May 8, 2009 at 10:04 AM, Eric Smith <eric at trueblade.com> wrote:
> Paul Moore wrote:
>> 2009/5/7 Tres Seaver <tseaver at palladion.com>:
>>> Eric Smith wrote:
>>>> Yes. It creates a .exe wrapper . By using entry points, I don't need
>>>> to care what the target system is. Also, /usr/bin/env might invoke the
>>>> wrong python.
>>> Exactly: using entry points for console scripts guarantees that the
>>> python into which the corresponding distribution is installed is the one
>>> used to run the script, which is *highly* desirable. Otherwise, you end
>>> up with the "just install everything in the system Python's
>>> site-packages" mess.
>> ... and somewhere around here we end up with what I described as an
>> over-engineered solution.
> Or, what I call a minimal set of required functionality.
>> By trying to satisfy everyone's requirements, you ultimately satisfy
> Not sure I agree, but in any event that's certainly not a reason to try and
> make a generally useful solution.
> I think entry points and scripts are two issues that shouldn't be conflated.
> Entry points are generally useful (to me and others), and having a way of
> the installer knowing about scripts and generating correct wrappers for them
> (in a cross-platform way) is also generally useful (to me and others).
Two current problems I have with console scripts with setuptools are:
1. Different versions of Python conflict with previous versions of
console scripts. Take paste for example.
2. The entry point mechanism IIRC recursively scans the site-packages
directory and loads up the system path with eggs. This is too
expensive of an operation for the current environment I work in.
3. There doesn't seem to be a clean way to inject user specific
environment details to the console script.
I often need the ability to alter the sys.path in a user specific way
for the entry point without needing to mess up the global sys.path
> scripts currently use entry points is a design detail that perhaps doesn't
> need to be exposed.
> Distutils-SIG maillist - Distutils-SIG at python.org
More information about the Distutils-SIG