[Distutils] dependencies, pip and non-PyPI-hosted packages

Chris Withers chris at simplistix.co.uk
Wed Apr 20 00:26:54 CEST 2011

On 19/04/2011 22:18, Carl Meyer wrote:
>> does not uninstall project1. This is quite disappointing, as a user
>> may be unaware of dependencies automatically installed, and thus, the
>> uninstall leaves behind something that was installed with the bundle.
>> I imagine that the idea is that the user may install some other
>> package that depends on 'project1' and pip takes the conservative
>> approach (is that the case?) but I would have expected for pip or
>> distribute or setuptools or distutils to keep some dependency
>> reference counter. Does any of these tools have something like that?
>> or is it going to be addressed in distutils2?
> No, there's no current Python packaging tool I know of that keeps a
> dependency reference counter and automatically uninstalls orphaned
> dependencies.

I'm pretty sure zc.buildout does this by way of recreating the script 
when necessary.

>> 2) if install_requires is missing a dependency (project1), the package
>> gets installed without that dependency, but if I add a dependency and
>> the user attempts an install (project2) with the updated setup.py
>> (listing the new dependency) pip will say that the package (project2)
>> is already installed and won't attempt to install the dependencies. Is
>> this correct? If so, is there a way to tell pip to install project2's
>> dependencies?
> With a real package release, the setup.py metadata should never change
> without a version number change.

I should point out that zc.buildout deals gracefully with this case too, 
by way of regenerating scripts when needed.



Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk

More information about the Distutils-SIG mailing list