* 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.
* 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.
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>
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".
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.
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".
* 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.
* 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.
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.