From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Improving the Python build system. Date: Mon, 02 Sep 2013 21:46:29 +0200 Message-ID: <87mwnv57my.fsf@gnu.org> References: <521A936C.3040900@gmail.com> <20130901132726.GB1699@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGaA1-0001vG-Cw for guix-devel@gnu.org; Mon, 02 Sep 2013 15:51:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGa9w-0004m6-9F for guix-devel@gnu.org; Mon, 02 Sep 2013 15:51:41 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:32960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGa9w-0004ly-2r for guix-devel@gnu.org; Mon, 02 Sep 2013 15:51:36 -0400 In-Reply-To: <20130901132726.GB1699@debian> (Andreas Enge's message of "Sun, 1 Sep 2013 15:27:26 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andreas Enge Cc: guix-devel@gnu.org (Somehow this one had remained unanswered.) Andreas Enge skribis: > Probably (once the python changes dust settles), it will be enough to sim= ply > 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 understo= od > correctly, then "setup.py check" only makes some basic checks on the pack= age > 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 =E2=80=98build=E2=80=99 phase, right? And also change the =E2= =80=98check=E2=80=99 phase to run =E2=80=98python setup.py test=E2=80=99 (what does =E2=80=98python setup= .py check=E2=80=99 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=E2=80=99s Nixpkgs=E2=80=99 Python builder, which I had = originally contributed (as crazy as it may seem): https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modu= les/generic/default.nix It actually uses =E2=80=98easy_install=E2=80=99, which appears to be, well,= easy. And presumably it does more things (like building a zipped .egg file). Perhaps it=E2=80=99d be even better? What do the pythoneers think? Ludo=E2=80=99.