[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/103: gnu: python-flit: Inherit from python-flit-core.
From: |
guix-commits |
Subject: |
07/103: gnu: python-flit: Inherit from python-flit-core. |
Date: |
Wed, 5 Jan 2022 09:44:27 -0500 (EST) |
lbraun pushed a commit to branch wip-python-pep517
in repository guix.
commit fafb62f33ab2ae3fe0891df32c4a0f193e5705e2
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Sat Dec 4 09:01:10 2021 +0100
gnu: python-flit: Inherit from python-flit-core.
* gnu/packages/python-xyz.scm (python-flit): Inherit from python-flit-core.
---
gnu/packages/python-xyz.scm | 101 ++++++++++----------------------------------
1 file changed, 23 insertions(+), 78 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 03675abdfc..c900e5c9ec 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23761,94 +23761,39 @@ the syntactic logic to configure and launch jobs in
an execution environment.")
(define-public python-flit
(package
+ (inherit python-flit-core)
(name "python-flit")
- (version "3.3.0")
- ;; We fetch the sources via git because on pypi the package is split into
- ;; two parts: flit and flit_core; flit_core cannot be built without flit.
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/takluyver/flit")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0mvyymw3zqsnip4x4ca6anr5rbx30hcmpqwrnhjwcm7s8mycd01x"))))
- (build-system python-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'build 'bootstrap
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((home (string-append (getcwd) "/home")))
- (mkdir-p home)
- (setenv "HOME" home))
- (for-each make-file-writable (find-files "."))
- (copy-recursively (assoc-ref inputs "python-testpath")
- (string-append (getcwd) "/testpath"))
- (substitute* "pyproject.toml"
- (("\"testpath\",") ""))
- (invoke "python" "bootstrap_dev.py")))
- (replace 'build
- (lambda _
- ;; A ZIP archive should be generated, but it fails with "ZIP does
- ;; not support timestamps before 1980". Luckily,
- ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
- ;; 1980.
- (setenv "SOURCE_DATE_EPOCH" "315532800")
- (for-each (lambda (toml)
- (invoke "python3" "-m" "flit"
- "--debug" "--ini-file" toml
- "build"))
- '("testpath/pyproject.toml"
- "pyproject.toml"))
- (with-directory-excursion "flit_core"
- (invoke "python" "build_dists.py"))))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (let ((out (assoc-ref outputs "out")))
- (delete-file-recursively "./home")
- (for-each (lambda (wheel)
- (format #true wheel)
- (invoke "python" "-m" "pip" "install"
- wheel (string-append "--prefix=" out)))
- (append
- (find-files "flit_core/dist" "\\.whl$")
- (find-files "dist" "\\.whl$")))))))
- #:tests? #f)) ; XXX: Check requires network access.
- (propagated-inputs
- (list python-pytoml python-toml))
+ ;; These tests require network access.
+ `(#:test-flags '("-vv" "-k" "not test_invalid_classifier and \
+not test_install_requires and not test_install_requires_extra and \
+not test_validate_classifiers_private")
+ ,@(substitute-keyword-arguments (package-arguments python-flit-core)
+ ((#:tests? tests) #t)
+ ((#:build-backend build-backend) #f)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'disable-networking
+ (lambda _
+ (setenv "FLIT_NO_NETWORK" "1")))
+ (delete 'chdir))))))
(native-inputs
- `(("python-docutils" ,python-docutils)
- ("python-responses" ,python-responses)
- ("python-pygments-github-lexers" ,python-pygments-github-lexers)
+ `(("python-flit-core" ,python-flit-core)
("python-pytest" ,python-pytest)
- ("python-pytest-cov" ,python-pytest-cov)
- ("python-sphinx" ,python-sphinx)
- ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
- ;; This package needs testpath, but testpath also needs flit...
- ("python-testpath"
- ,(let ((name "python-testpath")
- (version "0.4.4"))
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/jupyter/testpath")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
- (home-page "https://flit.readthedocs.io/")
+ ("python-testpath" ,python-testpath)
+ ("python-responses" ,python-responses)))
+ (propagated-inputs
+ `(("python-tomli" ,python-tomli)
+ ("python-tomli-w" ,python-tomli-w)
+ ("python-requests" ,python-requests)
+ ("python-docutils" ,python-docutils)))
(synopsis
"Simple packaging tool for simple packages")
(description
"Flit is a simple way to put Python packages and modules on PyPI. Flit
packages a single importable module or package at a time, using the import
name as the name on PyPI. All subpackages and data files within a package
-are included automatically.")
- (license license:bsd-3)))
+are included automatically.")))
(define-public python-pathtools
(package
- 17/103: gnu: gusb-minimal: Add explicit dependency on setuptools., (continued)
- 17/103: gnu: gusb-minimal: Add explicit dependency on setuptools., guix-commits, 2022/01/05
- 20/103: gnu: python-branca: Disable tests., guix-commits, 2022/01/05
- 22/103: gnu: dblatex: Use custom 'build and 'install phases., guix-commits, 2022/01/05
- 24/103: gnu: python-crashtest: Build using poetry-core., guix-commits, 2022/01/05
- 26/103: gnu: python-pastel: Add missing build system input., guix-commits, 2022/01/05
- 28/103: gnu: python-numba: Add missing build input., guix-commits, 2022/01/05
- 19/103: gnu: python-funcparserlib: Disable tests., guix-commits, 2022/01/05
- 36/103: gnu: python-rencode: Disable tests., guix-commits, 2022/01/05
- 40/103: gnu: python-pyfakefs: Disable tests., guix-commits, 2022/01/05
- 55/103: gnu: python-html5lib: Enable tests., guix-commits, 2022/01/05
- 07/103: gnu: python-flit: Inherit from python-flit-core.,
guix-commits <=
- 06/103: gnu: Add python-tomli-w., guix-commits, 2022/01/05
- 02/103: python-build-system: Use PEP 517-compatible builds., guix-commits, 2022/01/05
- 29/103: gnu: python-eradicate: Disable missing tests., guix-commits, 2022/01/05
- 38/103: gnu: python-pytest-cache: Disable tests., guix-commits, 2022/01/05
- 47/103: gnu: python-pytest-benchmark: Disable tests., guix-commits, 2022/01/05
- 33/103: gnu: python-apsw: Remove custom 'build phase., guix-commits, 2022/01/05
- 48/103: gnu: python-entrypoint2: Remove obsolete test target., guix-commits, 2022/01/05
- 15/103: gnu: python-multivolumefile: Remove unused inputs., guix-commits, 2022/01/05
- 23/103: gnu: python-django-pipeline: Disable tests., guix-commits, 2022/01/05
- 10/103: gnu: python-confuse: Add missing test inputs., guix-commits, 2022/01/05