[Distutils] setuptools: 'console_scripts' does not respect 'extras' requested by easy_install?
Sridhar Ratnakumar
sridharr at activestate.com
Thu Aug 5 20:25:33 CEST 2010
From setup.py:
[...]
name='hello'
[...]
entry_points = {
'console_scripts': [
'hello=hello:main',
'internal=hello.internal:main [secret]',
[...]
If I run "easy_install hello" both bin/hello and bin/internal are
installed. I expected bin/internal to be installed *only* when
"easy_install hello[secret]" is run.
Is this anomaly a bug, or by design?
I have a real-world use case for this, which is to install 'backend'
scripts only when the 'backend' extras is requested. This is to prevent
users from installing backend/server related commands when they only
need the client commands. When creating sdist, I explicitly exclude
src/hello/internal (internal packages), but there is no way to prevent
the script creation other than hacking setup.py.
-srid
More information about the Distutils-SIG
mailing list