From e3f5d3e5485d04835af5a65250f1c4424af3061b Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Sat, 21 Jun 2025 12:47:21 -0300 Subject: [PATCH] gnu: python-logwrap: Enable tests. * gnu/packages/python-xyz.scm (python-logwrap)[source]: Fetch from GitHub. [arguments]: Remove '#:tests? #f'. Add phase 'pretend-version' before 'build'. Change-Id: I3a711dfdfa6f894cd0f1159dac7c2b4b7494f6d2 --- gnu/packages/python-xyz.scm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 39fb78dae2585e5d1a1042256288de0d51da3df2..e0998abdeff74aa406ede5eecba72c56d94b9bc1 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3709,14 +3709,23 @@ module and then similar looking characters are removed.") (version "11.1.1") (source (origin - (method url-fetch) - (uri (pypi-uri "logwrap" version)) + (method git-fetch) ; no tests in PyPI release + (uri (git-reference + (url "https://github.com/python-useful-helpers/logwrap") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "1idralspy7yn6nyc97zbga64cwj8w4cqg6j9c0nd4ixkw2njancc")))) + (base32 "07m4c87pavpdak1lx4bvdz43y2wwzm6fc54x947cssgwqz8mw3zp")))) (build-system pyproject-build-system) (arguments - `(#:tests? #f)) ; Tests not included in pypi release. + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'pretend-version + ;; Indicate version to setuptools-scm + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" + #$(package-version this-package))))))) (native-inputs (list python-pytest python-setuptools python-setuptools-scm