Commit Graph

25 Commits

Author SHA1 Message Date
Marius Bakke e46a043ecd
build-system/python: Make sure 'check' returns failures.
* guix/build/python-build-system.scm (check): Wrap 'call-setuppy' in 'if' so
that it actually fails when the tests fail. Print informational message when
skipped.
2016-12-13 21:04:31 +01:00
Hartmut Goebel c1019287a4
guix: python-build-system: Add background about Python installation methods. 2016-11-15 17:37:47 +01:00
Hartmut Goebel b002f964bb
guix: python-build-system: Delete .egg-info file created in phase check.
* guix/build/python-build-system.scm (check): Delete .egg-info dirs
  which did not exist prior to calling setup.py but afterwards.
2016-11-15 17:37:46 +01:00
Hartmut Goebel a2ff4f0240
guix: python-build-system: Add helpers for getting and setting PYTHONPATH.
* guix/build/python-build-system.scm (add-installed-pythonpath,
  site-packages): New exported procedures.
2016-11-15 17:37:45 +01:00
Hartmut Goebel 5f7565d190
guix: python-build-system: Add option "#:use-setuptools?" (default true).
* guix/build-system/python.scm (python-build): New keyword argument
  "#:use-setuptools?", defaulting to #t.
* guix/build/python-build-system.scm (call-setup-py): New positional
  parameter "use-setuptools?". If false, do not use the shim-wrapper
  for addin setuptools. (build, check): accept keyword-
  parameter, and pass to call-setuppy. (install): same; if
  "use-setuptools?" is false, do not use options "--root" and
  "--single-version-externally-managed" for setup.py.
* doc/guix.texi (Build Systems): Document it.
2016-11-15 17:37:44 +01:00
Marius Bakke 46bcdcc287
guix: python-build-system: Import setuptools before calling `setup.py'.
This is needed for packages using "distutils" instead of "setuptools" since
the former does not understand the "--single-version-externally-managed"
flag. Also export __file__ since it will be unset when setup.py is called from
python "exec".

* guix/build/python-build-system.scm (call-setuppy): extend "python setup.py"
  call to import setuptools, export __file__, and call setup.py from
  setuptools python environment.

Co-Authored-By: Hartmut Goebel <h.goebel@crazy-compilers.com>
2016-11-15 17:37:43 +01:00
Hartmut Goebel 7db40bce58
guix: build all Python packages with --single-version-externally-managed.
This requires setuptools to be installed together with python, which is
the case for Python 3 anyway and which we do for our build of Python 2
(see last commit).

* guix/build/python-build-system.scm (install): Add
  "--single-version-externally-managed" and "--root=/" to params to be
  passed to call-setuppy. Remove thus needless manipulation of
  PYTHONPATH. Remove now unused argument "inputs".
2016-11-15 17:37:41 +01:00
Hartmut Goebel 043a51c0c2
guix: python-build-system: Fix an outdated comment. 2016-11-15 17:37:39 +01:00
Mark H Weaver 4193567325
Revert "guix: python-build-system: Fix an outdated comment."
This reverts commit 635a7af45d.
2016-10-13 15:27:16 -04:00
Hartmut Goebel 635a7af45d
guix: python-build-system: Fix an outdated comment.
The python-build-system uses phases the build and install, but not
configure. So the old comment was plain wrong since Sept. 2013, when the build
phase has been added.
2016-10-13 17:22:42 +02:00
Ludovic Courtès 0beb65b450 build-system/gnu: Add 'set-SOURCE-DATE-EPOCH' phase.
This phase is inherited by other build systems, which ensures
'SOURCE_DATE_EPOCH' is always set in practice.

* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Remove.
(%standard-phases): Don't add it.
* guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH): New
procedure.
(%standard-phases): Add it.
(gnu-build): Remove 'setenv' call for "SOURCE_DATE_EPOCH".
2016-01-05 15:52:42 +01:00
Ludovic Courtès a665996f58 gnu: python: Set SOURCE_DATE_EPOCH to 1 instead of 0.
* gnu/packages/python.scm (python-2)[arguments]: Set SOURCE_DATE_EPOCH
  to 1 to match what the daemon does.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Likewise.
2015-11-29 22:59:28 +01:00
Ludovic Courtès dedc832070 gnu: python-2: Honor 'SOURCE_DATE_EPOCH'.
* gnu/packages/patches/python-2.7-source-date-epoch.patch: New file.
* gnu/packages/python.scm (python-2)[source]: Use it.
  [arguments]: Set SOURCE_DATE_EPOCH in 'patch-lib-shells' phase.
* guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): New
  procedure.
  (%standard-phases): Add it.
* gnu-system.am (dist_patch_DATA): Add patch.
2015-11-29 22:59:28 +01:00
Mark H Weaver 9f6509c655 python-build-system: Fix 'get-python-version'.
* guix/build/python-build-system.scm (get-python-version): Rewrite to handle
  multiple-digit version number components.
2015-08-06 16:33:54 -04:00
Mark H Weaver 3bacb7a698 python-build-system: Add 'ensure-no-mtimes-pre-1980' phase.
* guix/build/python-build-system.scm (ensure-no-mtimes-pre-1980):
  New phase.
  (%standard-phases): Add it after 'unpack'.
2015-07-16 01:49:39 -04:00
Ludovic Courtès f8503e2b25 utils: 'modify-phases' no longer introduces quotes.
Suggested by Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>.

* guix/build/utils.scm (%modify-phases): Remove quotes.
* guix/build/cmake-build-system.scm (%standard-phases): Adjust
  accordingly.
* guix/build/glib-or-gtk-build-system.scm (%standard-phases): Likewise.
* guix/build/gnu-dist.scm (%dist-phases): Likewise.
* guix/build/perl-build-system.scm (%standard-phases): Likewise.
* guix/build/python-build-system.scm (%standard-phases): Likewise.
* guix/build/ruby-build-system.scm (%standard-phases): Likewise.
* guix/build/waf-build-system.scm (%standard-phases): Likewise.
* gnu/packages/bash.scm, gnu/packages/code.scm, gnu/packages/gl.scm,
  gnu/packages/gnome.scm, gnu/packages/graphics.scm,
  gnu/packages/image.scm, gnu/packages/key-mon.scm,
  gnu/packages/ocr.scm, gnu/packages/plotutils.scm,
  gnu/packages/search.scm, gnu/packages/video.scm: Likewise.
2015-03-31 22:43:01 +02:00
Ludovic Courtès f84218acae build-system: Use 'modify-phases'.
* guix/build/cmake-build-system.scm (%standard-phases): Use
  'modify-phases' instead of alist-*.
* guix/build/glib-or-gtk-build-system.scm (%standard-phases): Likewise.
* guix/build/gnu-dist.scm (%dist-phases): Likewise.
* guix/build/perl-build-system.scm (%standard-phases): Likewise.
* guix/build/python-build-system.scm (%standard-phases): Likewise.
* guix/build/ruby-build-system.scm (%standard-phases): Likewise.
* guix/build/waf-build-system.scm (%standard-phases): Likewise.
2015-02-26 23:00:21 +01:00
Federico Beffa 6f8fe4b29e build/python-build-system: Fix easy-install.pth collisions.
* guix/build/python-build-system.scm (rename-pth-file): New rename-pth-file
  phase and corresponding function.
2014-12-18 17:58:10 +01:00
Mark H Weaver b5b73a8269 Use #:prefix instead of #:renamer with 'symbol-prefix-proc'.
* gnu/packages/abiword.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm,
  gnu/packages/backup.scm, gnu/packages/bittorrent.scm,
  gnu/packages/boost.scm, gnu/packages/compression.scm,
  gnu/packages/cryptsetup.scm, gnu/packages/curl.scm,
  gnu/packages/cyrus-sasl.scm, gnu/packages/dc.scm, gnu/packages/emacs.scm,
  gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/geeqie.scm,
  gnu/packages/ghostscript.scm, gnu/packages/gimp.scm,
  gnu/packages/gkrellm.scm, gnu/packages/gl.scm, gnu/packages/glib.scm,
  gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm,
  gnu/packages/gnutls.scm, gnu/packages/gnuzilla.scm, gnu/packages/gsasl.scm,
  gnu/packages/gtk.scm, gnu/packages/gv.scm, gnu/packages/image.scm,
  gnu/packages/indent.scm, gnu/packages/inkscape.scm,
  gnu/packages/lesstif.scm, gnu/packages/links.scm, gnu/packages/lisp.scm,
  gnu/packages/lsh.scm, gnu/packages/lsof.scm, gnu/packages/maths.scm,
  gnu/packages/mp3.scm, gnu/packages/openssl.scm, gnu/packages/ots.scm,
  gnu/packages/pciutils.scm, gnu/packages/pcre.scm, gnu/packages/pdf.scm,
  gnu/packages/pulseaudio.scm, gnu/packages/python.scm, gnu/packages/slim.scm,
  gnu/packages/ssh.scm, gnu/packages/texlive.scm, gnu/packages/vim.scm,
  gnu/packages/vpn.scm, gnu/packages/web.scm, gnu/packages/wv.scm,
  gnu/packages/xiph.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm,
  gnu/packages/yasm.scm, gnu/packages/zip.scm,
  guix/build/cmake-build-system.scm, guix/build/perl-build-system.scm,
  guix/build/python-build-system.scm, guix/download.scm: Replaces uses of
  #:renamer and 'symbol-prefix-proc' with #:prefix.
2014-09-23 18:52:29 -04:00
Andreas Enge 824af8cadc guix: python: Create module installation path and add it to PYTHONPATH during
the installation phase.

* guix/build/python-build-system.scm (get-python-version): New procedure.
* guix/build/python-build-system.scm (install): Create and add path.
* gnu/packages/python.scm (python-setuptools): Drop path creation code.
2013-09-11 15:47:34 +02:00
Andreas Enge b191f88ee3 guix: python: Add build phase and factor out calls to setup.py.
* guix/build/python-build-system.scm (call-setuppy): New procedure.
* guix/build/python-build-system.scm (build): New procedure.
* guix/build/python-build-system.scm (check, install): Use call-setuppy.
* guix/build/python-build-system.scm (%standard-phases): Add call to build.
2013-09-05 20:25:08 +02:00
Andreas Enge 7b96bf82da gnu: python: Honour #:tests? and #:test-target in build system.
* guix/build/python-build-system.scm (check): Use named parameters tests?
    and test-target (default now: "test" instead of "check").
2013-09-05 18:43:18 +02:00
Andreas Enge 3df47231e6 guix: python: Switch to python-wrapper as the default version for the python
build system (switches to Python 3) and compute python-version instead of
  passing it as a parameter.

* guix/build-system/python.scm (default-python): Switch to python-wrapper.
* guix/build-system/python.scm (python-build): Drop parameter #:python-version.
* guix/build/python-build-system.scm (wrap): Compute python version from input.
2013-09-04 18:07:55 +02:00
Cyril Roelandt 842ded334f python-build-system: add a check phase.
* guix/build/python-build-system.scm (check): New procedure.
  (%standard-phases): Use it.
2013-05-28 22:53:35 +02:00
Nikita Karetnikov 40506d5d92 Add 'python-build-system'.
* guix/build-system/python.scm, guix/build/python-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
2013-05-08 22:46:12 +00:00