Requires setuptools >= 17.1 due to some features used, while our
python currently only includes 12.0.
* gnu/packages/admin.scm (thefuck): Add setuptools to native-inputs.
* gnu/packages/python.scm (python-numpy-bootstrap): Correct inputs, use
modify-phases, add dummy newlines character to string to make emacs happy,
set PYTHONPATH prior to running tests. (python-numpy): propagate inputs, set
PYTHONPATH prior to building docs.
dateutil, pytz, and six do not occur in the code.
Remove python-dateutil, python-pytz, python-six from inputs;
Move python-cython to native-inputs; move python-pandas to
propagated-inputs.
python-six is only required for conversion, not at run-time
* gnu/packages/python.scm (python-singledispatch, python2-singledispatch):
[inputs] Move python-six to [native-inputs].
For breaking the cyclic build, formerly a separate (older) version was used
for bootstrapping. Now we use the same version just without tests and without
test dependencies.
* gnu/packages/python.scm (python-pbr-0.11, python2-pbr-0.11):
replace by … (python-pbr-minimal, python2-pbr-minimal).
(python-pbr) inherit from python-pbr-minimal, adding the requirements for
testing and building the documentation.
(python-fixtures) [native-inputs] Use python-pbr-minimal here.
(python-testrepository): [native-inputs] Add it here, it was a missing
dependency.
python-fixtures is required only for building.
* gnu/packages/python.scm (python-testrepository) [propagated-inputs] move
python-fixtures to [native-inputs].
According to setup.py python-six is requried at run-time, thus has to be a
propagated input.
* gnu/packages/python.scm (python-hdf5) [inputs]: Move `python-six` to
[propagated-inputs].
This package is a plugin for python-sphinx, it does not require python-sphinx
nor docutils, but is an add-on for python-sphinx and should not be installed
by it's own.
* gnu/packages/python/.scm (python-sphinx-rtd-theme)[inputs]: Remove.
* gnu/packages/python.scm (python-pytest-cov): Replace phase "check"
by one passing the options found in upstream's tox.ini-file
to "python setup.py check".
This patch handles the inputs which are native-inputs almost always like nose,
sphinx, and pytest.
* gnu/packages/python.scm
(python-jsonschema, python-numpydoc, python-mccabe, python-mistune,
python-ptyprocess, python-webob, python-apipkg, python-flake8-2.2.4)[inputs]
change to [native-inputs].
(python-flake8, tox) Likewise, add a comment.
(python-scikit-learn, python-numpy)[native-inputs] New element, move
python-nose here.
(python2-kombu)[inputs] change to [native-inputs], use python-kombu's
package-native-inputs.
This patch contains the changes in python.scm where all [native-inputs]
are changed to [propagated-inputs].
* gnu/packages/python.scm.scm (python-feedgenerator): All [native-inputs] are
changed to [propagated-inputs].
This patch contains the changes where all [inputs] are changed to
[native-inputs].
* gnu/packages/python.scm (python-pytest, python-fixtures,
python-testrepository, python-virtualenv): All [inputs] are changed to
[native-inputs].
* gnu/packages/openstack.scm (python-bandit, python-debtcollector,
python-hacking, python-tempest-lib, python-oslo.config, python-oslo.context,
python-oslo.i18n, python-oslo.log, python-oslo.serialization,
python-oslosphinx, python-oslotest, python-oslo.utils): Likewise.
This is installed together with Python 3 anyway and for our build
of Python 2.
* gnu/packages/python.scm (python2-fixtures): [inputs] remove "python-pip".
* gnu/packages/pdf.scm (python2-reportlab): [native-inputs] remove
"python2-pip". (python-reportlab)[properties]: remove "python2-variant".
This patch contains the changes for all modules beside python.scm where
setuptools are used in an inherited package and removing this input also
removes the need for inheriting the package. This is the case if adding
setuptools in the inherited package was the only change.
Change this to not inherit and remove the new needless call to
"strip-python2-variant (if applicable).
* gnu/packages/bioinformatics.scm (python-biopython, python2-biopython,
python-twobitreader, python2-twobitreader,
python-plastid, python2-plastid,
python2-pybigwig,
python2-screed,
sra-tools): No longer "inherit" Python 2 packages
inheriting from a Python 3 package if the sole reason for inheriting was
adding python-setuptools respective python2-setuptools to [inputs],
[native-inputs] or [propagated-inputs]. Remove now needless [properties]
"python2-variant" where applicable.
* gnu/packages/django.scm (python-pytest-django, python2-pytest-django,
python-django-filter, python2-django-filter): Likewise.
* gnu/packages/gnupg.scm (python2-pygpgme): Likewise.
* gnu/packages/mail.scm (python-mailmanclient, python2-mailmanclient):
Likewise.
* gnu/packages/mpd.scm (python-msp, python2-mpd2): Likewise.
* gnu/packages/music.scm (python-pylast, python2-pylast): Likewise.
* gnu/packages/openstack.scm (python-requests-mock, python2-requests-mock,
python2-git-review): Likewise.
* gnu/packages/password-utils.scm (python2-bcrypt): Likewise.
* gnu/packages/protobuf.scm (python-protobuf, python2-protobuf): Likewise.
* gnu/packages/statistics.scm (python-patsy, python2-patsy): Likewise.
* gnu/packages/web.scm (python2-feedparser): Likewise.
This patch contains the changes where setuptools are used in an inherited
package and removing this input keeps the need for inheriting the package.
* gnu/packages/bioinformatics.scm (python2-biom-format): Remove
python-setuptools respective python2-setuptools from [inputs],
[native-inputs] and [propagated-inputs] in Python 2 packages inheriting from
a Python 3 package.
* gnu/packages/python.scm (python2-pytest-mock,
python2-oauthlib,
python2-seaborn,
python2-tornado,
python2-terminado,
python2-rauth,
python2-anyjson,
python2-amqp,
python2-kombu,
python2-billiard,
python2-celery,
python2-jellyfish,
python2-binaryornot,
python2-natsort,
python2-graphene): Likewise.
* gnu/packages/statistics.scm (python2-statsmodels): Likewise.
* guix/scripts/lint.scm (check-inputs-should-be-native package): Add python
packages which are typically used for testing or for building the
documentation.
Also refactor some common code into a new function.
Examples for these pacakges are python(2)-setuptools and python(2)-pip, which
are installed together with python itself.
* guix/scripts/lint.scm (warn-if-package-has-input): New procedure.
(check-inputs-should-be-native package): Use it; rename and clean-up
variables. (check-inputs-should-not-be-an-input-at-all): New procedure.
(%checkers) Add it.
* doc/guix.texi (Python Modules): Document it.
* tests/lint.scm: ("inputs: python-setuptools should not be an input at all
(input)", "inputs: python-setuptools should not be an input at all
(native-input)" "inputs: python-setuptools should not be an input at all
(propagated-input)"): Add tests.
* gnu/packages/patches/python-2.7-site-prefixes.patch: New file.
* gnu/packages/python.scm (python-2)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add patch.
* 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".