[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improving the Python build system.
From: |
Ludovic Courtès |
Subject: |
Re: Improving the Python build system. |
Date: |
Mon, 02 Sep 2013 21:46:29 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
(Somehow this one had remained unanswered.)
Andreas Enge <address@hidden> skribis:
> Probably (once the python changes dust settles), it will be enough to simply
> add setuptools as an input to the packages.
>
> I would like to suggest a few modifications to the python build system
> resulting from discussions with Brandon Invergo at the GHM. If I understood
> correctly, then "setup.py check" only makes some basic checks on the package
> and can be safely dropped. This is corroborated by
> python setup.py --help-commands | grep check
> on pytz, for instance, which displays
> check perform some checks on the package
>
> However, "python setup.py --help-commands | grep test":
> test run unit tests after in-place build
> I think this it what we would like to do in the check phase.
>
> Then it is possible to also separate the build and install phases:
> build build everything needed to install
>
> I think we would like to add such a phase.
You mean a ‘build’ phase, right? And also change the ‘check’ phase to
run ‘python setup.py test’ (what does ‘python setup.py check’ do
concretely?)
Sounds like both are good ideas.
> Stylistically, they should probably be obtained by a call to one function
> returning a procedure calling setup.py with "build", "test" and "install",
> respectively, instead of copy-pasting three times the same code.
Agreed.
For reference, here’s Nixpkgs’ Python builder, which I had originally
contributed (as crazy as it may seem):
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix
It actually uses ‘easy_install’, which appears to be, well, easy. And
presumably it does more things (like building a zipped .egg file).
Perhaps it’d be even better?
What do the pythoneers think?
Ludo’.