[Distutils] Beyond wheels 1.0: helping downstream, FHS and more

David Cournapeau cournape at gmail.com
Tue Apr 14 07:37:10 CEST 2015


On Mon, Apr 13, 2015 at 10:17 PM, Robert Collins <robertc at robertcollins.net>
wrote:

> On 14 April 2015 at 09:35, David Cournapeau <cournape at gmail.com> wrote:
> ...
>
> One of the earlier things mentioned here - {pre,post}{install,remove}
> scripts - raises a red flag for me.
>

That's indeed a good a priori. I myself removed a lot of those scripts
because of the fragility. Anything that needs to run on a end-user machine
can fail, and writing idempotent scripts is hard.

Unfortunately, pure declarative does not really cut it if you want cross
platform support. Sure, you may be able to deal with menu entries,
environment variables, etc... in a cross-platform manner with a significant
effort, but what about COM registration ? pywin32 is one of the most used
package in the python ecosystem, and its post install script is not
trivial. Another difficult case if when a package needs some specific
configuration to run at all, and that configuration requires values known
at install time only (e.g. sys.prefix, as in the iris package).


> I'd really prefer it if we keep wheels 100% declarative, and instead
> focus on defining appropriate metadata for the things you need to
> accomplish {pre,post}{install,remove} of a package.
>

What about a way for wheels to specify whether their
post,pre/install,remove scripts are declarative or not, with support for
the most common tasks, with an escape, but opt-in mechanism ? This way it
could be a matter of policy to refuse packages that require non-declarative
scripts.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20150414/af279523/attachment.html>


More information about the Distutils-SIG mailing list