about summary refs log tree commit diff
path: root/gn/packages/python-build.scm
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-03-20 17:22:07 -0500
committerFrederick Muriuki Muriithi2026-03-20 17:23:07 -0500
commitb9b75ce38483f5d18c4dc77cbe39bdec68e1060f (patch)
tree7d1fe52b2d44bfc687736698d41252b5d929e108 /gn/packages/python-build.scm
parent7469e0ed26fedd91cf80f3e69a6b28228d2c35d7 (diff)
downloadguix-bioinformatics-b9b75ce38483f5d18c4dc77cbe39bdec68e1060f.tar.gz
python-build: Add new package definition.
Diffstat (limited to 'gn/packages/python-build.scm')
-rw-r--r--gn/packages/python-build.scm68
1 files changed, 68 insertions, 0 deletions
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)))