[Distutils] inability to pass setup.py command line arguments to dependency setups

Glyph Lefkowitz glyph at twistedmatrix.com
Fri May 7 19:33:42 CEST 2010


On May 7, 2010, at 9:09 AM, Kent wrote:

> Consider the case where you want your setup to install third-party
> software, but you want/need to pass an argument to the command line
> that runs "python setup.py --argument install" or "python setup.py --
> argument bdist_egg"
> 
> As far as I could research, this feature is unavailable.

And for good reason, I should think.  I really hope that nobody ever adds this feature.

If you require SQLAlchemy to be installed "--with-cextensions", then what happens when your package is installed in an environment that already has SQLAlchemy installed *without* that flag?  Does it stomp on the existing installation?  What if the user installed one already with that flag and some other flags as well?  What if it's system-installed and you're doing a user-install?

Basically, compile-time and install-time options are a configuration nightmare.  They should represent only how and where a package is installed, not what features it has. The correct solution to your problem would be to get SQLAlchemy to fix its broken deployment setup and split itself into 2 packages, "SQLAlchemyCExtensions" and "SQLAlchemy", and then have your project depend on both, not to try to cram installer options into the dependency language.

For confirmation of this theory, you need look no further than the excruciating user-experience of source-based installation systems with 'variant' support, like gentoo's Portage and *BSD's Ports, versus the relatively non-excruciating experience of packaging systems which express compile-time options as different packages like Yum and Apt.



More information about the Distutils-SIG mailing list