From 8a508b40d9ee6fdc054eacbcd66da1fba05a60c4 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Fri, 31 Oct 2025 09:11:11 +0100 Subject: [PATCH] gnu: python-distlib: Move to (gnu packages python-build). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-distlib): Move from here… * gnu/packages/python-build.scm (python-distlib): …to here. Change-Id: Ib6611610e6b32a6e3cf0faab35572938c2cb6005 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-build.scm | 39 +++++++++++++++++++++++++++++++++++ gnu/packages/python-xyz.scm | 37 --------------------------------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index 9177a9b65e3..b43ae4f0781 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -40,6 +40,7 @@ (define-module (gnu packages python-build) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -123,6 +124,44 @@ run simple @code{argparse} parsers from function signatures.") "Colorama is a Python library for rendering colored terminal text.") (license license:bsd-3))) +(define-public python-distlib + (package + (name "python-distlib") + (version "0.3.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "distlib" version)) + (sha256 + (base32 + "1a27f5p93j9i1l3324qgahs3g8ai91fmx783jpyyla506i5ybbwx")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'no-/bin/sh + (lambda* (#:key inputs #:allow-other-keys) + (let ((/bin/sh (search-input-file inputs "bin/sh"))) + (substitute* '("distlib/scripts.py" "tests/test_scripts.py") + (("/bin/sh") /bin/sh))))) + (add-before 'check 'prepare-test-environment + (lambda _ + (setenv "HOME" "/tmp") + ;; NOTE: Any value works, the variable just has to be present. + (setenv "SKIP_ONLINE" "1")))))) + (native-inputs + (list python-pytest-bootstrap + python-setuptools-bootstrap)) + (inputs + (list bash-minimal)) + (home-page "https://github.com/pypa/distlib") + (synopsis "Distribution utilities") + (description "Distlib is a library which implements low-level functions that +relate to packaging and distribution of Python software. It is intended to be +used as the basis for third-party packaging tools.") + (license license:psfl))) + (define-public python-more-itertools (package (name "python-more-itertools") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f1300d6c8b5..ed642b78db9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12625,43 +12625,6 @@ from a program in a @dfn{pager} such as @command{less}.") and therefore easier to read and write.") (license license:expat))) -(define-public python-distlib - (package - (name "python-distlib") - (version "0.3.7") - (source - (origin - (method url-fetch) - (uri (pypi-uri "distlib" version)) - (sha256 - (base32 - "1a27f5p93j9i1l3324qgahs3g8ai91fmx783jpyyla506i5ybbwx")))) - (build-system pyproject-build-system) - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-before 'build 'no-/bin/sh - (lambda* (#:key inputs #:allow-other-keys) - (let ((/bin/sh (search-input-file inputs "bin/sh"))) - (substitute* '("distlib/scripts.py" "tests/test_scripts.py") - (("/bin/sh") /bin/sh))))) - (add-before 'check 'prepare-test-environment - (lambda _ - (setenv "HOME" "/tmp") - ;; NOTE: Any value works, the variable just has to be present. - (setenv "SKIP_ONLINE" "1")))))) - (native-inputs - (list python-pytest python-setuptools python-wheel)) - (inputs - (list bash-minimal)) - (home-page "https://github.com/pypa/distlib") - (synopsis "Distribution utilities") - (description "Distlib is a library which implements low-level functions that -relate to packaging and distribution of Python software. It is intended to be -used as the basis for third-party packaging tools.") - (license license:psfl))) - (define-public python-distutils-extra (package (name "python-distutils-extra")