summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-12-20 15:13:47 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-01-10 11:44:41 -0500
commitb9839ee1c57455c199964bfbb212659080982c66 (patch)
tree4a58a0ceda986df3acf2ae1eb48aa41c9496cca5 /gnu/packages
parent5b218cc14ad85c83ef0279f435f296125a033bdd (diff)
downloadguix-b9839ee1c57455c199964bfbb212659080982c66.tar.gz
gnu: python-platformdirs: Update to 2.4.0, run tests and fix metadata.
* gnu/packages/python-xyz.scm (python-platformdirs): Update to 2.4.0.
[phases]{pretend-version}: New phase.
{check}: Override to run tests.
[native-inputs]{python-setuptools-scm}: New input.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm19
1 files changed, 16 insertions, 3 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4bb9046394..484f64a7d0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -27499,17 +27499,30 @@ compatible with a wide range of versions of the Stripe API.")
 (define-public python-platformdirs
   (package
     (name "python-platformdirs")
-    (version "2.2.0")
+    (version "2.4.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "platformdirs" version))
        (sha256
-        (base32 "07hq5qrp7pqj63iczg01wbf5ii6f0ncd0dq5mzkdhsslmg9slbb3"))))
+        (base32 "1whycrymqpsl7nsaknmcybzyh4fg4kqk6vd7zwl28kfhnf05wyin"))))
     (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pretend-version
+           ;; The version string is usually derived via setuptools-scm, but
+           ;; without the git metadata available, the version string is set to
+           ;; '0.0.0'.
+           (lambda _
+             (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest")))))))
     (native-inputs
      (list python-appdirs python-pytest python-pytest-cov
-           python-pytest-mock))
+           python-pytest-mock python-setuptools-scm))
     (home-page "https://github.com/platformdirs/platformdirs")
     (synopsis "Determine the appropriate platform-specific directories")
     (description "When writing applications, finding the right location to