Commit Graph

33 Commits

Author SHA1 Message Date
Maxim Cournoyer 6bbb37a545
build-system/python: Move the check phase after the install phase.
A reproducibility problem was discovered while packaging python-pygithub where
the bytecode produced by running the tests would interfere with the result of
the install phase byte compilation.  Moving the check phase after the install
phase solves the problem.

* guix/build/python-build-system.scm (%standard-phases): Add comment, move
the check phase after the install phase.
2019-04-18 00:04:26 -04:00
Arun Isaac 89e7f90d0b
build-system: python: Do not double wrap executables.
* guix/build/python-build-system.scm (wrap): Only wrap executables that have
not already been wrapped.
* guix/build/utils.scm (wrapper?): New function.
2018-11-25 01:31:23 +05:30
Marius Bakke a1454169e0
gnu: python: Update to 3.7.0.
* gnu/packages/python.scm (python-3.6): Rename to ...
(python-3.7): ... this.  Update to 3.7.0.
[arguments]: Remove phase 'patch-timestamp-for-pyc-files' and related code.
Add phases to unset SOURCE_DATE_EPOCH during the check phase.
(python-3): Is now PYTHON-3.7.
* guix/build/python-build-system.scm (enable-bytecode-determinism): Don't set
DETERMINISTIC_BUILD.
2018-07-28 15:52:26 +02:00
Mark H Weaver 171a117c61
build-system/python: Fix deletion of .egg-info dirs created by tests.
* guix/build/python-build-system.scm (check): Use 'string=?' to compare
strings, not 'eqv?'.
2018-03-18 00:49:05 -04:00
Mark H Weaver 1e62645402
build-system/python: Return #t from all phases.
* guix/build/python-build-system.scm (build, install, wrap): Return #t.
(check): Return #t and remove vestigial plumbing.
2018-03-18 00:49:03 -04:00
Mark H Weaver e35b09ca71
build-system/python: Use invoke instead of system*.
* guix/build/python-build-system.scm (call-setuppy): Use invoke.
2018-03-16 05:01:54 -04:00
Ricardo Wurmus d57888a819
guix: python-build-system: Make bytecode compilation deterministic.
* guix/build/python-build-system.scm (enable-bytecode-determinism): New
procedure.
(%standard-phases): Add "enable-bytecode-determinism" phase.
2018-03-15 09:26:30 +01:00
Ludovic Courtès 189be331ac
build-system/gnu: Add 'bootstrap' phase.
This factorizes what has become a widespread idiom.

* guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable.
(bootstrap): New procedure.
(%standard-phases): Add it after 'unpack'.
* guix/build/ant-build-system.scm (%standard-phases): Delete 'bootstrap.
* guix/build/asdf-build-system.scm (%standard-phases/source)
(%standard-phases): Likewise.
* guix/build/cargo-build-system.scm (%standard-phases): Likewise.
* guix/build/cmake-build-system.scm (%standard-phases): Likewise.
* guix/build/dub-build-system.scm (%standard-phases): Likewise.
* guix/build/emacs-build-system.scm (%standard-phases): Likewise.
* guix/build/font-build-system.scm (%standard-phases): Likewise.
* guix/build/go-build-system.scm (%standard-phases): Likewise.
* guix/build/haskell-build-system.scm (%standard-phases): Likewise.
* guix/build/minify-build-system.scm (%standard-phases): Likewise.
* guix/build/ocaml-build-system.scm (%standard-phases): Likewise.
* guix/build/perl-build-system.scm (%standard-phases): Likewise.
* guix/build/python-build-system.scm (%standard-phases): Likewise.
* guix/build/r-build-system.scm (%standard-phases): Likewise.
* guix/build/ruby-build-system.scm (%standard-phases): Likewise.
* guix/build/scons-build-system.scm (%standard-phases): Likewise.
* guix/build/texlive-build-system.scm (%standard-phases): Likewise.
* guix/build/waf-build-system.scm (%standard-phases): Likewise.
* gnu/packages/audio.scm (faad2)[arguments]: Replace 'bootstrap.
(soundtouch, cuetools, bluez-alsa): Remove 'arguments'.
(cava)[arguments]: Replace 'bootstrap.
* gnu/packages/backup.scm (rdup): Remove 'bootstrap.
* gnu/packages/bioinformatics.scm (seek)[arguments]: Replace
'bootstrap.
* gnu/packages/bioinformatics.scm (htslib-for-sambamba): Remove
'arguments'.
* gnu/packages/ci.scm (hydra, cuirass): Remove 'bootstrap'.
* gnu/packages/crypto.scm (libb2): Remove #:phases.
* gnu/packages/databases.scm (guile-wiredtiger): Likewise.
* gnu/packages/debug.scm (stress-make): Remove 'bootstrap'.
* gnu/packages/documentation.scm (asciidoc): Likewise.
* gnu/packages/fontutils.scm (libuninameslist): Remove 'arguments'.
* gnu/packages/ftp.scm (weex): Remove 'arguments'.
* gnu/packages/game-development.scm (ois): Remove 'arguments'.
* gnu/packages/games.scm (pioneer): Remove 'bootstrap.
* gnu/packages/gnome.scm (vte-ng, byzanz): Replace 'bootstrap.
(arc-theme): Remove 'arguments'.
(faba-icon-theme): Remove 'bootstrap.
(arc-icon-theme): Remove 'arguments'.
* gnu/packages/gnunet.scm (guile-gnunet): Likewise.
* gnu/packages/gtk.scm (guile-rsvg): Likewise.
* gnu/packages/guile.scm (mcron2): Remove 'bootstrap.
(guile-bash): Remove #:phases.
(guile-git): Remove 'bootstrap.
(guile-syntax-highlight): Remove 'arguments'.
(guile-sjson): Likewise.
* gnu/packages/java.scm (classpath-devel): Remove 'bootstrap.
* gnu/packages/kodi.scm (libdvdnav/kodi)
(libdvdread/kodi, libdvdcss/kodi): Likewise.
* gnu/packages/libreoffice.scm (hunspell): Remove 'arguments'.
* gnu/packages/libusb.scm (hidapi): Likewise.
* gnu/packages/linux.scm (bridge-utils): Rename 'bootstrap' to
'patch-stuff'; move it before 'bootstrap', without autoreconf
invocation.
(eudev): Rename 'bootstrap' to 'patch-file-names', without 'autogen.sh'
invocation; move it before 'bootstrap.
(gpm): Replace 'bootstrap'.
(f2fs-tools): Remove 'arguments'.
(rng-tools): Remove #:phases.
* gnu/packages/messaging.scm (hexchat): Rename 'bootstrap' to
'copy-intltool-makefile'; remove "autoreconf" invocation and move before
'bootstrap'.
(libmesode): Remove 'arguments'.
(libstrophe): Likewise.
* gnu/packages/microcom.scm (microcom): Likewise.
* gnu/packages/networking.scm (libnet): Remove 'bootstrap.
* gnu/packages/onc-rpc.scm (libnsl): Remove 'arguments'.
* gnu/packages/package-management.scm (guix): Replace 'bootstrap.
* gnu/packages/sawfish.scm (librep): Remove 'arguments'.
* gnu/packages/version-control.scm (findnewest): Likewise.
* gnu/packages/video.scm (liba52, handbrake, motion): Replace
'bootstrap.
* gnu/packages/web.scm (fcgiwrap): Remove #:phases.
(tidy): Replace 'bootstrap.
(gumbo-parser): Remove #:phases.
* gnu/packages/wget.scm (wget2): Replace 'bootstrap.
* gnu/packages/wm.scm (i3lock-color): Remove #:phases.
* gnu/packages/xdisorg.scm (xclip): Likewise.
* gnu/packages/xml.scm (libxls): Replace 'bootstrap'.
* gnu/packages/xorg.scm (xf86-video-freedreno)
(xf86-video-intel): Remove #:phases.
* gnu/packages/zile.scm (zile-on-guile): Replace 'bootstrap.
2018-03-11 22:04:40 +01:00
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