unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Improving the Python build system.
@ 2013-08-25 23:29 Cyril Roelandt
  2013-09-01 13:27 ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Roelandt @ 2013-08-25 23:29 UTC (permalink / raw)
  To: guix-devel

Hey!

Andreas, could you please send us your Python modules that fail because 
of setuptools ? I think these packages require setuptools instead of 
distutils (which comes with Python), so we'll probably have to package 
setuptools. Both are quite similar, so the "python-build-system" can 
probably be used anyway. Otherwise, we'll have to write a build system 
per tool (distutils/distutils2/setuptools/bento).

Cyril.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Improving the Python build system.
  2013-08-25 23:29 Improving the Python build system Cyril Roelandt
@ 2013-09-01 13:27 ` Andreas Enge
  2013-09-02 19:46   ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2013-09-01 13:27 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: guix-devel

On Mon, Aug 26, 2013 at 01:29:48AM +0200, Cyril Roelandt wrote:
> Andreas, could you please send us your Python modules that fail
> because of setuptools ? I think these packages require setuptools
> instead of distutils (which comes with Python), so we'll probably
> have to package setuptools. Both are quite similar, so the
> "python-build-system" can probably be used anyway. Otherwise, we'll
> have to write a build system per tool
> (distutils/distutils2/setuptools/bento).

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.

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.

There is another mild complication: The binary should be called "python3"
instead of "python" under Python 3.

What do you think?

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Improving the Python build system.
  2013-09-01 13:27 ` Andreas Enge
@ 2013-09-02 19:46   ` Ludovic Courtès
  2013-09-02 20:51     ` Andreas Enge
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2013-09-02 19:46 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

(Somehow this one had remained unanswered.)

Andreas Enge <andreas@enge.fr> 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’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Improving the Python build system.
  2013-09-02 19:46   ` Ludovic Courtès
@ 2013-09-02 20:51     ` Andreas Enge
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Enge @ 2013-09-02 20:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Mon, Sep 02, 2013 at 09:46:29PM +0200, Ludovic Courtès wrote:
> You mean a ‘build’ phase, right?  And also change the ‘check’ phase to
> run ‘python setup.py test’

Yes.

> (what does ‘python setup.py check’ do concretely?)

According to
   http://docs.python.org/3.4/distutils/examples.html Section 7.4:
"The check command allows you to verify if your package meta-data meet the
minimum requirements to build a distribution"
So apparently this is only useful for the packager of a python module
and not for us.

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-02 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-25 23:29 Improving the Python build system Cyril Roelandt
2013-09-01 13:27 ` Andreas Enge
2013-09-02 19:46   ` Ludovic Courtès
2013-09-02 20:51     ` Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).