[Distutils] Disabling --single-version-externally-managed

Phillip J. Eby pje at telecommunity.com
Sun Sep 2 06:36:12 CEST 2007


At 07:45 PM 9/1/2007 -0700, Toshio Kuratomi wrote:
>Does this work from the interpreter shell?
> >>> __requires__ = 'SQLAlchemy>=0.3,<0.4beta1'
> >>> import pkg_resources
> >>> import sqlalchemy

Yes.


>pkg_resource.requires() is documented on the web page, in
>pkg_resource.txt, and when you python setup.py install
>- --single-version-externally-managed.  __requires__ is documented...
>nowhere.  If you're willing to change documentation that says to use
>pkg_resources.require() to use __requires__ instead then this will work
>out perfectly.  If not, we'll need to find a way to make
>pkg_resources.require() work so that we aren't constantly explaining to
>people that it doesn't work because upstream tells us it doesn't work
>and we're sorry that all the official upstream documentation says otherwise.

As I've explained repeatedly before, your choices are to either have 
a default version, or not to have one.  If you do not have one, then 
everything works as you wish, except for the fact that you must 
always explicitly require() something to use it (because there's no default).

If do you have a default version, then the only way to get something 
*other* than the default version is to use __requires__ or a 
setuptools-generated script (which automatically includes __requires__).



More information about the Distutils-SIG mailing list