Commit graph

3 commits

Author SHA1 Message Date
Marius Bakke
f8458a2282
build-system/python: Handle missing metadata on Python 2.
* gnu/packages/aux-files/python/sanity-check.py: Catch the less specific
EnvironmentError rather than FileNotFoundError as the latter is Python 3
only.
2021-07-30 15:54:31 +02:00
Maxim Cournoyer
bb557c9ac1
build/python: Handle FileNotFoundError exception in sanity-check.py.
This exception was thrown while running the sanity-check on the python-isort
package, which doesn't make use of a setuptools-based build system but rather
of a PEP 517 compliant one.

* gnu/packages/aux-files/python/sanity-check.py: Handle the FileNotFoundError
whe attempting to read the 'top_level.txt' metadata file of the package.
Remove extraneous 'continue' statement.
2021-02-03 21:56:53 -05:00
Lars-Dominik Braun
09448c0994
build/python: Add a sanity check phase.
Add a new phase validating the usability of installed Python packages.

* gnu/packages/aux-files/python/sanity-check.py: New file.
* Makefile.am (AUX_FILES): Register it.
* guix/build-system/python.scm (sanity-check.py): New variable.
(lower): Add the script as an implicit input.
* guix/build/python-build-system.scm: Remove trailing #t.
(sanity-check): New phase.
(%standard-phases): Use it.
* tests/builders.scm: (make-python-dummy)
(dummy-ok, dummy-dummy-nosetuptools, dummy-fail-requirements)
(dummy-fail-import, dummy-fail-console-script): New variables.
("python-build-system: dummy-ok")
("python-build-system: dummy-dummy-nosetuptools")
("python-build-system: dummy-fail-requirements")
("python-build-system: dummy-fail-import")
("python-build-system: dummy-fail-console-script"): Add tests.
2021-02-01 11:53:43 -05:00