[Distutils] Some clarifications and/or corrections to PEP 376

Vinay Sajip vinay_sajip at yahoo.co.uk
Fri Jan 4 15:57:51 CET 2013

> I've never really understood the idea that mere installation of a

> distribution should need to write to completely arbitrary locations on
> the filesystem.  Personally, if the software in my distribution needs
> things to be put in places that aren't circumscribed by the install
> machinery (console scripts are an example of things that *are*
> circumscribed by the install machinery) I'll ship the distribution with
> a script (often a console script) that people can run that does the
> needful, but this never runs during installation.

But that just seems to be deferring the work to a later phase - what happens when you uninstall that distribution? Do you expect the console script you provided to undo what it did when invoked?

One example on Windows: PowerShell scripts are looked for by PowerShell in locations other than site-packages. Of course you can ask users to manually tweak environment variables etc. after installation, but I don't see why that's best practice.

In general, if a Python library or application is self-contained, I don't disagree with your position. But interoperability with other systems and applications sometimes requires you to be more flexible.


Vinay Sajip

More information about the Distutils-SIG mailing list