summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-09-24 23:43:01 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-09-25 00:56:39 +0100
commit120437f6b194571ffb84c7b946b3a080009f2510 (patch)
tree34d6653f4247748890ff76521c3f0cae314f4c9a /gnu/packages/python-xyz.scm
parent64337dfab7d159877462e6a46326caff8d984ef9 (diff)
gnu: python-pygtrie: Fix and run tests.
* gnu/packages/python-xyz.scm (python-pygtrie) [source]: Switch to git-fetch. [arguments]<#:test-backend>: Set it. <#:phases>: Add phase 'set-version. [native-inputs]: Remove python-wheel. Change-Id: Ib3da3430340077624410e334d7846b75b6928471 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm30
1 files changed, 23 insertions, 7 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bbc9d9738e..a972ab6131 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9119,14 +9119,30 @@ working with Valve's VDF text format.")
(package
(name "python-pygtrie")
(version "2.5.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "pygtrie" version))
- (sha256
- (base32
- "1qm4xdmzd4q5pc9h5gjdpr5m7lg06k8dvqnjn7d07d3fhani8d90"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mina86/pygtrie")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "00m4h2faslm242hsp98d21n6jmc8h616m69p2n6ga2rz37jqmh45"))))
(build-system pyproject-build-system)
- (native-inputs (list python-setuptools python-wheel))
+ (arguments
+ (list
+ #:test-backend #~'unittest
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'set-version
+ (lambda _
+ (delete-file "version.py")
+ (substitute* "setup.py"
+ (("import version")
+ "")
+ (("version\\.get_version\\(\\)")
+ (format #f "~s" #$version))))))))
+ (native-inputs (list python-setuptools))
(home-page "https://github.com/mina86/pygtrie")
(synopsis "Pure Python trie data structure implementation")
(description