[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22/29: gnu: python-flit: Update to 3.2.0.
From: |
guix-commits |
Subject: |
22/29: gnu: python-flit: Update to 3.2.0. |
Date: |
Tue, 13 Apr 2021 07:51:54 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 636f4d505157a2fb262255a45bd47a835e2aacbc
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Apr 13 12:31:46 2021 +0200
gnu: python-flit: Update to 3.2.0.
* gnu/packages/python-xyz.scm (python-flit): Update to 3.2.0.
[source]: Fetch from git repository to include flit_core.
[arguments]: Add phases to bootstrap the build.
[propagated-inputs]: Add python-pytoml and python-toml.
[native-inputs]: Add python-docutils, python-responses,
python-pygments-github-lexers, python-pytest, python-pytest-cov,
python-sphinx, python-sphinxcontrib-github-alt, and python-testpath.
---
gnu/packages/python-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 77 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3bfbe83..003c72f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21733,17 +21733,85 @@ the syntactic logic to configure and launch jobs in
an execution environment.")
(define-public python-flit
(package
(name "python-flit")
- (version "3.0.0")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "flit" version))
- (sha256
- (base32
- "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
+ (version "3.2.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
+ "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ; XXX: Check requires network access.
+ `(#: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
+ `(("python-pytoml" ,python-pytoml)
+ ("python-toml" ,python-toml)))
+ (native-inputs
+ `(("python-docutils" ,python-docutils)
+ ("python-responses" ,python-responses)
+ ("python-pygments-github-lexers" ,python-pygments-github-lexers)
+ ("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/")
(synopsis
"Simple packaging tool for simple packages")
- 19/29: gnu: Add python-pygments-github-lexers., (continued)
- 19/29: gnu: Add python-pygments-github-lexers., guix-commits, 2021/04/13
- 23/29: gnu: python-testpath: Update to 0.4.4., guix-commits, 2021/04/13
- 03/29: gnu: python-jupyter-client: Update to 6.1.12., guix-commits, 2021/04/13
- 21/29: gnu: Add python-sphinxcontrib-github-alt., guix-commits, 2021/04/13
- 24/29: gnu: Add python-deprecation., guix-commits, 2021/04/13
- 07/29: gnu: python-notebook: Update inputs., guix-commits, 2021/04/13
- 20/29: gnu: Add python-requests-unixsocket., guix-commits, 2021/04/13
- 26/29: gnu: Add python-jupyterlab-widgets., guix-commits, 2021/04/13
- 09/29: gnu: Add python-jupyterlab-pygments., guix-commits, 2021/04/13
- 12/29: gnu: python-nbformat: Update to 5.1.3., guix-commits, 2021/04/13
- 22/29: gnu: python-flit: Update to 3.2.0.,
guix-commits <=
- 06/29: gnu: python-notebook: Update to 6.3.0., guix-commits, 2021/04/13
- 25/29: gnu: Add python-jupyter-packaging., guix-commits, 2021/04/13
- 28/29: gnu: python-ipywidgets: Update to 7.6.3., guix-commits, 2021/04/13
- 15/29: gnu: Remove python2-jupyter-core., guix-commits, 2021/04/13
- 16/29: gnu: Remove python2-jupyter-console., guix-commits, 2021/04/13
- 18/29: gnu: Add python-pytoml., guix-commits, 2021/04/13
- 27/29: gnu: python-widgetsnbextension: Remove unnecessary inputs., guix-commits, 2021/04/13
- 29/29: gnu: python-tinycss2: Enable tests., guix-commits, 2021/04/13
- 04/29: gnu: python-ipykernel: Update to 5.5.3., guix-commits, 2021/04/13