[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58587] [PATCH 04/14] build-system: Add pyproject-build-system.
From: |
Marius Bakke |
Subject: |
[bug#58587] [PATCH 04/14] build-system: Add pyproject-build-system. |
Date: |
Thu, 27 Oct 2022 19:23:18 +0200 |
Maxim Cournoyer <maxim.cournoyer@gmail.com> skriver:
> Hello,
>
> Marius Bakke <marius@gnu.org> writes:
>
>> From: Lars-Dominik Braun <lars@6xq.net>
>>
>> This is an experimental build system based on python-build-system
>> that implements PEP 517-compliant builds.
>>
>> * guix/build-system/pyproject.scm,
>> guix/build/pyproject-build-system.scm,
>> gnu/packages/aux-files/python/sanity-check-next.py,
>
> I know this file is temporary, but I'd keep the copyright/license
> notices header anyway, less it may be forgotten in the future.
Makes sense; done.
>> gnu/packages/python-commencement.scm: New files.
>> * Makefile.am (MODULES): Register the new build systems.
>> * gnu/local.mk (GNU_SYSTEM_MODULES): Add python-commencement.scm.
>
> Seems this could be merged into gnu/packages/python-build.scm instead of
> creating a new module.
I think you reviewed an old revision; the latest revision adds
python-toolchain straight into python.scm.
We may have to bring back python-commencement.scm for bootstrapping
setuptools and friends at a later core-updates cycle though.
>> + ;; Prefer pytest
>> + (if pytest 'pytest #f)
>> + (if nosetests 'nose #f)
>> + (if nose2 'nose2 #f)
>> + ;; But fall back to setup.py, which should work for most
>> + ;; packages. XXX: would be nice not to depend on setup.py
>> here? fails
>> + ;; more often than not to find any tests at all. Maybe we can
>> run
>> + ;; `python -m unittest`?
>> + (if have-setup-py 'setup.py #f))))
>> + (format #t "Using ~a~%" use-test-backend)
>> + (match use-test-backend
>> + ('pytest
>> + (apply invoke (cons pytest (or test-flags '("-vv")))))
>> + ('nose
>> + (apply invoke (cons nosetests (or test-flags '("-v")))))
>> + ('nose2
>> + (apply invoke (cons nose2 (or test-flags '("-v"
>> "--pretty-assert")))))
>
> I think I'd leave the defaults in and document it that way.
By leave, you mean:
(apply invoke "pytest" "-vv" test-flags)
?
>> +(define* (set-SOURCE-DATE-EPOCH #:rest _)
>
> Perhaps name this set-SOURCE-DATE-EPOCH* to hint that it's not the same
> thing duplicated.
Done; although in the latest revision nothing is duplicated as it
inherits a bunch from python-build-system.
Plans for the immediate core-updates cycle:
* merge sanity-check-next.py into sanity-check.py
* set SOURCE_DATE_EPOCH to ~1980 also in python-build-system
(and inherit in pyproject-build-system)
* move the compile-bytecode phase into python-build-system
(currently python-build-system does this during install, hence
duplication)
signature.asc
Description: PGP signature
- [bug#58587] [PATCH 01/14] gnu: python-setuptools: Move to python-build., (continued)
- [bug#58587] [PATCH 01/14] gnu: python-setuptools: Move to python-build., Marius Bakke, 2022/10/17
- [bug#58587] [PATCH 03/14] gnu: python-pip: Move to (gnu packages python-build)., Marius Bakke, 2022/10/17
- [bug#58587] [PATCH 02/14] gnu: pypy: Move to separate module., Marius Bakke, 2022/10/17
- [bug#58587] [PATCH 07/14] gnu: python-pydyf: Use pyproject-build-system., Marius Bakke, 2022/10/17
- [bug#58587] [PATCH 04/14] build-system: Add pyproject-build-system., Marius Bakke, 2022/10/17
- [bug#58587] [PATCH 04/14] build-system: Add pyproject-build-system.,
Marius Bakke <=
- bug#58587: [PATCH 04/14] build-system: Add pyproject-build-system., Marius Bakke, 2022/10/27
- [bug#58587] [PATCH 04/14] build-system: Add pyproject-build-system., Maxim Cournoyer, 2022/10/27
[bug#58587] [PATCH 14/14] gnu: python-pygmsh: Use pyproject-build-system., Marius Bakke, 2022/10/17
[bug#58587] [PATCH 05/14] gnu: python-autopage: Use pyproject-build-system., Marius Bakke, 2022/10/17
[bug#58587] [PATCH 06/14] gnu: flair: Switch to pyproject-build-system., Marius Bakke, 2022/10/17
[bug#58587] [PATCH 12/14] gnu: python-mypy-protobuf: Switch to pyproject-build-system., Marius Bakke, 2022/10/17
[bug#58587] [PATCH 08/14] gnu: weasyprint: Use pyproject-build-system., Marius Bakke, 2022/10/17
[bug#58587] [PATCH 10/14] gnu: python-statmake: Use pyproject-build-system., Marius Bakke, 2022/10/17