From b9b75ce38483f5d18c4dc77cbe39bdec68e1060f Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 20 Mar 2026 17:22:07 -0500 Subject: python-build: Add new package definition. --- gn/packages/python-build.scm | 68 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 gn/packages/python-build.scm (limited to 'gn/packages/python-build.scm') diff --git a/gn/packages/python-build.scm b/gn/packages/python-build.scm new file mode 100644 index 0000000..445a674 --- /dev/null +++ b/gn/packages/python-build.scm @@ -0,0 +1,68 @@ +(define-module (gn packages python-build) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system python) + #:use-module (guix build-system pyproject) + #:use-module ((guix licenses) #:prefix license:) + + #:use-module (gnu packages check) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-check) + #:use-module (gnu packages python-build)) + +(define-public python-build + (package + (name "python-build") + (version "1.4.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pypa/build") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "107hhzjrlj56gshcyalf4laf741swmmaznlz0xcfv8rvpwa81mm2")))) + (build-system pyproject-build-system) + (native-inputs + (list uv + python-tox + python-pip + python-wheel + python-tomli + python-pytest + python-filelock + python-colorama + python-flit-core + python-packaging + python-pytest-cov + python-setuptools + python-virtualenv + python-pytest-mock + python-pytest-xdist + python-pyproject-hooks + python-importlib-metadata + python-pytest-rerunfailures)) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-before 'build 'set-env + (lambda _ + ;; When running tests, things fail because HOME=/homeless-shelter. + (setenv "HOME" "/tmp"))) + (add-before 'check 'patch-tests + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "tests/test_env.py" + ((", path=sysconfig.get_path\\(\"scripts\"\\)") ""))))) + + ;; Cheat by deactivating tests for now. + #:tests? #f)) + (home-page "https://build.pypa.io/") + (synopsis "A simple, correct Python packaging build frontend") + (description "A simple, correct Python packaging build frontend. + build manages pyproject.toml-based builds, invoking build-backend hooks as + appropriate to build a distribution package. It is a simple build tool and does + not perform any dependency management.") + (license license:expat))) -- cgit 1.4.1