unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#67642] [PATCH 0/5] Add some Python build-related packages.
@ 2023-12-05 15:18 Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 1/5] gnu: Add python-userpath Vinicius Monego
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Vinicius Monego @ 2023-12-05 15:18 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego

This patchset adds Hatch, scikit-build-core and spin.

Hatch is a project manager, commonly found as a dependency in other packages.

scikit-build-core is a rewrite of scikit-build. It bridges Python with CMake-built libraries.

spin is a CLI tool mainly used to compile projects that use meson-python.

Vinicius Monego (5):
  gnu: Add python-userpath.
  gnu: Add hatch.
  gnu: Add python-pytest-subprocess.
  gnu: Add python-scikit-build-core.
  gnu: Add python-spin.

 gnu/packages/python-check.scm   |  29 ++++++
 gnu/packages/python-science.scm |  26 ++++++
 gnu/packages/python-xyz.scm     | 157 ++++++++++++++++++++++++++++++++
 3 files changed, 212 insertions(+)


base-commit: c15a1cd88f80a90437f4b0159f22dfc84b9e6851
-- 
2.39.2





^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 1/5] gnu: Add python-userpath.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
@ 2023-12-05 15:21 ` Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 2/5] gnu: Add hatch Vinicius Monego
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Vinicius Monego @ 2023-12-05 15:21 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego

* gnu/packages/python-xyz.scm (python-userpath): New variable.

Change-Id: Ic263ee8e1208273b225aa7e2c14dd85f085254e7
---
 gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f54a9b0f88..c233479e0c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30005,6 +30005,29 @@ (define-public python-inform
 cleanly print different types of messages.")
     (license license:gpl3+)))
 
+(define-public python-userpath
+  (package
+    (name "python-userpath")
+    (version "1.9.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "userpath" version))
+       (sha256
+        (base32 "15i7w1sh60f7i23rqls72s6rdkgw4cxvz08p82v19jcqimr7d0ff"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; See https://github.com/ofek/userpath/issues/43.
+     ;; In Guix, tests try to find the temporary build directory in PATH, but
+     ;; only the store output is present.
+     (list #:tests? #f))
+    (native-inputs (list python-hatchling python-pytest))
+    (propagated-inputs (list python-click))
+    (home-page "https://github.com/ofek/userpath")
+    (synopsis "Add locations to the user's PATH")
+    (description "This package provides a tool for modifying a user's PATH.")
+    (license license:expat)))
+
 (define-public python-nestedtext
   (package
     (name "python-nestedtext")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 2/5] gnu: Add hatch.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 1/5] gnu: Add python-userpath Vinicius Monego
@ 2023-12-05 15:21 ` Vinicius Monego
  2024-02-27 13:14   ` Simon Tournier
  2023-12-05 15:21 ` [bug#67642] [PATCH 3/5] gnu: Add python-pytest-subprocess Vinicius Monego
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 17+ messages in thread
From: Vinicius Monego @ 2023-12-05 15:21 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego

* gnu/packages/python-xyz.scm (hatch): New variable.

Change-Id: Iff0f0e8e8451277e468b7c3054540eca8d25e321
---
 gnu/packages/python-xyz.scm | 77 +++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c233479e0c..28dbea691f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30028,6 +30028,83 @@ (define-public python-userpath
     (description "This package provides a tool for modifying a user's PATH.")
     (license license:expat)))
 
+(define-public hatch
+  (package
+    (name "hatch")
+    (version "1.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hatch" version))
+       (sha256
+        (base32 "0ipvj1pxdb6wb1sblh22h9gnh6byjnwcl7hfcnk88dmkslgp1z3s"))
+       (modules '((guix build utils)))
+       (snippet '(substitute* "pyproject.toml"
+                   ;; We have virtualenv 20.3.1.
+                   (("virtualenv>=20.16.2")
+                    "virtualenv>=20.3.1")))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; XXX: tests below fail due to zipfile reporting incorrect zip dates.
+      #~(list "-k"
+              (string-append
+               "not "
+               (string-join
+                (list "test_default"
+                      "test_explicit_path"
+                      "test_editable_default"
+                      "test_editable_default_dependencies"
+                      "test_editable_default_force_include"
+                      "test_editable_default_force_include_option"
+                      "test_editable_exact"
+                      "test_editable_exact_extra_dependencies"
+                      "test_editable_exact_force_include"
+                      "test_editable_exact_force_include_option"
+                      "test_editable_exact_force_include_build_data_precedence"
+                      "test_editable_pth")
+                " and not ")))
+           #:phases #~(modify-phases %standard-phases
+                        (add-before 'check 'pre-check
+                          (lambda _
+                            (setenv "HOME" "/tmp"))))))
+    (native-inputs (list git-minimal
+                         python-pytest
+                         python-pytest-mock
+                         python-pytest-xdist))
+    (propagated-inputs (list python-click
+                             python-hatchling
+                             python-httpx
+                             python-hyperlink
+                             python-keyring
+                             python-packaging
+                             python-pexpect
+                             python-platformdirs
+                             python-pyperclip
+                             python-rich
+                             python-shellingham
+                             python-tomli-w
+                             python-tomlkit
+                             python-userpath
+                             python-virtualenv))
+    (home-page "https://hatch.pypa.io/latest/")
+    (synopsis "Python project management")
+    (description "Hatch is a modern, extensible Python project manager.
+
+Features
+
+@itemize
+@item Standardized build system with reproducible builds by default
+@item Robust environment management with support for custom scripts
+@item Configurable Python distribution management
+@item Easy publishing to PyPI or other indexes
+@item Version management
+@item Configurable project generation with sane defaults
+@item Responsive CLI, ~2-3x faster than equivalent tools
+@end itemize")
+    (license license:expat)))
+
 (define-public python-nestedtext
   (package
     (name "python-nestedtext")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 3/5] gnu: Add python-pytest-subprocess.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 1/5] gnu: Add python-userpath Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 2/5] gnu: Add hatch Vinicius Monego
@ 2023-12-05 15:21 ` Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 4/5] gnu: Add python-scikit-build-core Vinicius Monego
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Vinicius Monego @ 2023-12-05 15:21 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego

* gnu/packages/python-check.scm (python-pytest-subprocess): New variable.

Change-Id: Id651d945836879e71eb30f51bc392f3027bcad6e
---
 gnu/packages/python-check.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index ea74472270..9befa4610a 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2099,6 +2099,35 @@ (define-public python-stestr
 help in debugging failures and optimizing the scheduler to improve speed.")
     (license license:asl2.0)))
 
+(define-public python-pytest-subprocess
+  (package
+    (name "python-pytest-subprocess")
+    (version "1.5.0")
+    (source
+     (origin
+       (method git-fetch)               ;no tests in PyPI archive
+       (uri (git-reference
+             (url "https://github.com/aklajnert/pytest-subprocess")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "103nxv37sjvxlwmw87hxsrphkxkryv4dgb65kjjfr4722r37vmxv"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-anyio
+                         python-coverage
+                         python-docutils
+                         python-nox
+                         python-pygments
+                         python-pytest
+                         python-pytest-asyncio
+                         python-pytest-rerunfailures))
+    (home-page "https://github.com/aklajnert/pytest-subprocess")
+    (synopsis "Fake subprocess for Pytest")
+    (description
+     "This package provides a plugin to fake subprocess for Pytest.")
+    (license license:expat)))
+
 ;; This is only used by python-sanic
 (define-public python-pytest-sanic
   (package
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 4/5] gnu: Add python-scikit-build-core.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (2 preceding siblings ...)
  2023-12-05 15:21 ` [bug#67642] [PATCH 3/5] gnu: Add python-pytest-subprocess Vinicius Monego
@ 2023-12-05 15:21 ` Vinicius Monego
  2023-12-05 15:21 ` [bug#67642] [PATCH 5/5] gnu: Add python-spin Vinicius Monego
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Vinicius Monego @ 2023-12-05 15:21 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego

* gnu/packages/python-xyz.scm (python-scikit-build-core): New variable.

Change-Id: I6dac2c5062d51eaa15cff67cd94a938014229182
---
 gnu/packages/python-xyz.scm | 57 +++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 28dbea691f..36bd4c04be 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30855,6 +30855,63 @@ (define-public python-sane
                ;; Yet another variant of the X/MIT license.
                "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
 
+(define-public python-scikit-build-core
+  (package
+    (name "python-scikit-build-core")
+    (version "0.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "scikit_build_core" version))
+       (sha256
+        (base32 "1lvzcmsq6wmv396a5lq7wl6lx8165pz55ymjbbinr32nki3g5xw5"))))
+    (build-system pyproject-build-system)
+    ;; Skip network tests.
+    (arguments
+     (list #:test-flags #~(list "-m" "not network"
+                                ;; TODO: figure out why these tests fail.
+                                ;; (they also need write permission)
+                                "-k" (string-append
+                                      "not "
+                                      (string-join
+                                       (list "test_pep517_wheel"
+                                             "test_abi3_wheel"
+                                             "test_navigate_editable_pkg"
+                                             "test_pep517_mixed_wheel")
+                                       " and not ")))))
+    (propagated-inputs (list cmake
+                             python-exceptiongroup
+                             python-importlib-metadata
+                             python-importlib-resources
+                             python-packaging
+                             python-pathspec
+                             python-pyproject-metadata
+                             python-tomli
+                             python-typing-extensions))
+    (native-inputs (list pybind11
+                         python-cattrs
+                         python-fastjsonschema
+                         python-hatch-fancy-pypi-readme
+                         python-hatch-vcs
+                         python-hatchling
+                         python-numpy
+                         python-pytest
+                         python-pytest-subprocess
+                         ;; Latest setuptools fails with "setup.py install is
+                         ;; deprecated.  Use build and pip or other standards-
+                         ;; based tools".
+                         python-setuptools-57
+                         python-setuptools-scm
+                         python-virtualenv
+                         python-wheel))
+    (home-page "https://scikit-build-core.readthedocs.io/en/latest/")
+    (synopsis "Build backend for CMake based projects")
+    (description
+     "Scikit-build-core is a complete ground-up rewrite of scikit-build on top
+of modern packaging APIs.  It provides a bridge between CMake and the Python
+build system, allowing you to make Python modules with CMake.")
+    (license license:asl2.0)))
+
 (define-public python-scikit-build
   (package
     (name "python-scikit-build")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 5/5] gnu: Add python-spin.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (3 preceding siblings ...)
  2023-12-05 15:21 ` [bug#67642] [PATCH 4/5] gnu: Add python-scikit-build-core Vinicius Monego
@ 2023-12-05 15:21 ` Vinicius Monego
  2024-02-08  7:35 ` [bug#67642] [PATCH 0/5] Add some Python build-related packages obonnefon
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: Vinicius Monego @ 2023-12-05 15:21 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego

* gnu/packages/python-science.scm (python-spin): New variable.

Change-Id: I794845d559f3f4f3ab9cf98b0e4a4321b470f7f8
---
 gnu/packages/python-science.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 1b7ae663eb..d48eebb4a9 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -713,6 +713,32 @@ (define-public python-numpoly
     (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux"))
     (license license:bsd-2)))
 
+(define-public python-spin
+  (package
+  (name "python-spin")
+  (version "0.8")
+  (source
+   (origin
+     (method url-fetch)
+     (uri (pypi-uri "spin" version))
+     (sha256
+      (base32 "0ff48nagfaai3j26g1db4zq2bwdv6kj5l7xhcs2l9kzg7qzrmhr7"))))
+  (build-system pyproject-build-system)
+  (propagated-inputs (list python-click python-colorama python-tomli))
+  (native-inputs (list python-pytest))
+  (home-page "https://github.com/scientific-python/spin")
+  (synopsis "Developer tool for scientific Python libraries")
+  (description "@code{spin} is a simple interface for common development
+tasks.  It comes with a few common build commands out the box, but can
+easily be customized per project.
+
+The impetus behind developing the tool was the mass migration of scientific
+Python libraries (SciPy, scikit-image, and NumPy, etc.) to Meson, after
+distutils was deprecated.  When many of the build and installation commands
+changed, it made sense to abstract away the nuisance of having to re-learn
+them.")
+  (license license:bsd-3)))
+
 (define-public python-baycomp
   (package
     (name "python-baycomp")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 0/5] Add some Python build-related packages.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (4 preceding siblings ...)
  2023-12-05 15:21 ` [bug#67642] [PATCH 5/5] gnu: Add python-spin Vinicius Monego
@ 2024-02-08  7:35 ` obonnefon
  2024-02-28  8:14 ` obonnefon
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: obonnefon @ 2024-02-08  7:35 UTC (permalink / raw)
  To: 67642

I have tested this cook to build dolfinx v07 cook. It works. Thanks





^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 2/5] gnu: Add hatch.
  2023-12-05 15:21 ` [bug#67642] [PATCH 2/5] gnu: Add hatch Vinicius Monego
@ 2024-02-27 13:14   ` Simon Tournier
  2024-03-12 21:15     ` Vinicius Monego
  0 siblings, 1 reply; 17+ messages in thread
From: Simon Tournier @ 2024-02-27 13:14 UTC (permalink / raw)
  To: Vinicius Monego, 67642; +Cc: Vinicius Monego

Hi,

On mar., 05 déc. 2023 at 15:21, Vinicius Monego <monego@posteo.net> wrote:

> +(define-public hatch
> +  (package
> +    (name "hatch")
> +    (version "1.7.0")

Following a question in Café Guix, I am giving a look at this.  And I
see that bug#58310 [1] has:

        +    (name "python-hatch")
        +    (version "1.10.0")

It leads to two questions:

 1. Why the just name “hatch” and not “python-hatch”?

 2. Why 1.7.0 and not 1.10.0 or higher?


1: [bug#58310] [PATCH 05/14] gnu: Add python-hatch.
Garek Dyszel via Guix-patches via <guix-patches@gnu.org>
Wed, 05 Oct 2022 13:46:04 -0400
id:878rluqi3n.fsf@disroot.org
https://issues.guix.gnu.org/58310
https://issues.guix.gnu.org/msgid/878rluqi3n.fsf@disroot.org
https://yhetil.org/guix/878rluqi3n.fsf@disroot.org


Cheers,
simon




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 0/5] Add some Python build-related packages.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (5 preceding siblings ...)
  2024-02-08  7:35 ` [bug#67642] [PATCH 0/5] Add some Python build-related packages obonnefon
@ 2024-02-28  8:14 ` obonnefon
  2024-05-22 18:16 ` [bug#67642] QA review for 67642 Nicolas Graves via Guix-patches via
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 17+ messages in thread
From: obonnefon @ 2024-02-28  8:14 UTC (permalink / raw)
  To: 67642

The cook I write for dolfinx07, based on this patch, is available in the 
guix directory of https://forgemia.inra.fr/olivier.bonnefon/mse .





^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH 2/5] gnu: Add hatch.
  2024-02-27 13:14   ` Simon Tournier
@ 2024-03-12 21:15     ` Vinicius Monego
  0 siblings, 0 replies; 17+ messages in thread
From: Vinicius Monego @ 2024-03-12 21:15 UTC (permalink / raw)
  To: Simon Tournier, 67642

Hi Simon,

Em 27/02/2024 10:14, Simon Tournier escreveu:
> Hi,
>
> On mar., 05 déc. 2023 at 15:21, Vinicius Monego <monego@posteo.net> wrote:
>
>> +(define-public hatch
>> +  (package
>> +    (name "hatch")
>> +    (version "1.7.0")
> Following a question in Café Guix, I am giving a look at this.  And I
> see that bug#58310 [1] has:
>
>          +    (name "python-hatch")
>          +    (version "1.10.0")
>
> It leads to two questions:
>
>   1. Why the just name “hatch” and not “python-hatch”?

I remember a convention to name applications without the python- prefix, 
it was only used for libraries. See the pre-commit, gunicorn, hypercorn 
packages for instance.

>
>   2. Why 1.7.0 and not 1.10.0 or higher?
>
>
> 1: [bug#58310] [PATCH 05/14] gnu: Add python-hatch.
> Garek Dyszel via Guix-patches via <guix-patches@gnu.org>
> Wed, 05 Oct 2022 13:46:04 -0400
> id:878rluqi3n.fsf@disroot.org
> https://issues.guix.gnu.org/58310
> https://issues.guix.gnu.org/msgid/878rluqi3n.fsf@disroot.org
> https://yhetil.org/guix/878rluqi3n.fsf@disroot.org
>
>
> Cheers,
> simon

Looking at the date (2022-10-05), that patch seems to introduce 
python-hatchling and not python-hatch. Hatchling 1.10.0 was released on 
2022-09-19. The latest version of Hatch is 1.9.4, which was released 17 
hours ago. Both packages are tagged in the same repository [1], but are 
distinct packages. Hatchling is the build backend while hatch is a 
Python project management tool.

Vinicius

[1] https://github.com/pypa/hatch/releases





^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#67642] QA review for 67642
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (6 preceding siblings ...)
  2024-02-28  8:14 ` obonnefon
@ 2024-05-22 18:16 ` Nicolas Graves via Guix-patches via
  2024-06-15 17:11   ` Nicolas Graves via Guix-patches via
  2024-06-15 17:09 ` [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath Nicolas Graves via Guix-patches via
  2024-06-26  6:52 ` bug#67642: [PATCH 0/5] Add some Python build-related packages jgart via Guix-patches via
  9 siblings, 1 reply; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-05-22 18:16 UTC (permalink / raw)
  To: control, 67642

user guix
usertag 67642 + reviewed-looks-good
thanks

Guix QA review form submission:
We need to remove the 4th patch that adds python-scikit-build-core which
is already present. Otherwise LGTM too.

Items marked as checked: Lint warnings, Package builds, Commit messages, New package licenses, New package tests, New package synopsis and descriptions

-- 
Best regards,
Nicolas Graves




^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (7 preceding siblings ...)
  2024-05-22 18:16 ` [bug#67642] QA review for 67642 Nicolas Graves via Guix-patches via
@ 2024-06-15 17:09 ` Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 2/4] gnu: Add hatch Nicolas Graves via Guix-patches via
                     ` (2 more replies)
  2024-06-26  6:52 ` bug#67642: [PATCH 0/5] Add some Python build-related packages jgart via Guix-patches via
  9 siblings, 3 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-06-15 17:09 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego, ngraves

From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (python-userpath): New variable.

Change-Id: Ic263ee8e1208273b225aa7e2c14dd85f085254e7
---
 gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d4b5976218b..a6dd19dddd4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -32240,6 +32240,29 @@ (define-public python-inform
 cleanly print different types of messages.")
     (license license:gpl3+)))
 
+(define-public python-userpath
+  (package
+    (name "python-userpath")
+    (version "1.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "userpath" version))
+       (sha256
+        (base32 "05fqxzdi27vqm5lywxs6bm2j4d8k91fx2ihqhg65g4h6mf6jhlkc"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; See https://github.com/ofek/userpath/issues/43.
+     ;; In Guix, tests try to find the temporary build directory in PATH, but
+     ;; only the store output is present.
+     (list #:tests? #f))
+    (native-inputs (list python-hatchling python-pytest))
+    (propagated-inputs (list python-click))
+    (home-page "https://github.com/ofek/userpath")
+    (synopsis "Add locations to the user's PATH")
+    (description "This package provides a tool for modifying a user's PATH.")
+    (license license:expat)))
+
 (define-public python-nestedtext
   (package
     (name "python-nestedtext")
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH v2 2/4] gnu: Add hatch.
  2024-06-15 17:09 ` [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath Nicolas Graves via Guix-patches via
@ 2024-06-15 17:09   ` Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 3/4] gnu: Add python-pytest-subprocess Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 4/4] gnu: Add python-spin Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-06-15 17:09 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego, ngraves

From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-xyz.scm (hatch): New variable.

Change-Id: Iff0f0e8e8451277e468b7c3054540eca8d25e321
---
 gnu/packages/python-xyz.scm | 77 +++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a6dd19dddd4..aa2d976255d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -32263,6 +32263,83 @@ (define-public python-userpath
     (description "This package provides a tool for modifying a user's PATH.")
     (license license:expat)))
 
+(define-public hatch
+  (package
+    (name "hatch")
+    (version "1.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "hatch" version))
+       (sha256
+        (base32 "0ipvj1pxdb6wb1sblh22h9gnh6byjnwcl7hfcnk88dmkslgp1z3s"))
+       (modules '((guix build utils)))
+       (snippet '(substitute* "pyproject.toml"
+                   ;; We have virtualenv 20.3.1.
+                   (("virtualenv>=20.16.2")
+                    "virtualenv>=20.3.1")))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; XXX: tests below fail due to zipfile reporting incorrect zip dates.
+      #~(list "-k"
+              (string-append
+               "not "
+               (string-join
+                (list "test_default"
+                      "test_explicit_path"
+                      "test_editable_default"
+                      "test_editable_default_dependencies"
+                      "test_editable_default_force_include"
+                      "test_editable_default_force_include_option"
+                      "test_editable_exact"
+                      "test_editable_exact_extra_dependencies"
+                      "test_editable_exact_force_include"
+                      "test_editable_exact_force_include_option"
+                      "test_editable_exact_force_include_build_data_precedence"
+                      "test_editable_pth")
+                " and not ")))
+           #:phases #~(modify-phases %standard-phases
+                        (add-before 'check 'pre-check
+                          (lambda _
+                            (setenv "HOME" "/tmp"))))))
+    (native-inputs (list git-minimal
+                         python-pytest
+                         python-pytest-mock
+                         python-pytest-xdist))
+    (propagated-inputs (list python-click
+                             python-hatchling
+                             python-httpx
+                             python-hyperlink
+                             python-keyring
+                             python-packaging
+                             python-pexpect
+                             python-platformdirs
+                             python-pyperclip
+                             python-rich
+                             python-shellingham
+                             python-tomli-w
+                             python-tomlkit
+                             python-userpath
+                             python-virtualenv))
+    (home-page "https://hatch.pypa.io/latest/")
+    (synopsis "Python project management")
+    (description "Hatch is a modern, extensible Python project manager.
+
+Features
+
+@itemize
+@item Standardized build system with reproducible builds by default
+@item Robust environment management with support for custom scripts
+@item Configurable Python distribution management
+@item Easy publishing to PyPI or other indexes
+@item Version management
+@item Configurable project generation with sane defaults
+@item Responsive CLI, ~2-3x faster than equivalent tools
+@end itemize")
+    (license license:expat)))
+
 (define-public python-nestedtext
   (package
     (name "python-nestedtext")
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH v2 3/4] gnu: Add python-pytest-subprocess.
  2024-06-15 17:09 ` [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 2/4] gnu: Add hatch Nicolas Graves via Guix-patches via
@ 2024-06-15 17:09   ` Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 4/4] gnu: Add python-spin Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-06-15 17:09 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego, ngraves

From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-check.scm (python-pytest-subprocess): New variable.

Change-Id: Id651d945836879e71eb30f51bc392f3027bcad6e
---
 gnu/packages/python-check.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index c5607df1ec3..64f64e9fa12 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -2232,6 +2232,35 @@ (define-public python-stestr
 help in debugging failures and optimizing the scheduler to improve speed.")
     (license license:asl2.0)))
 
+(define-public python-pytest-subprocess
+  (package
+    (name "python-pytest-subprocess")
+    (version "1.5.0")
+    (source
+     (origin
+       (method git-fetch)               ;no tests in PyPI archive
+       (uri (git-reference
+             (url "https://github.com/aklajnert/pytest-subprocess")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "103nxv37sjvxlwmw87hxsrphkxkryv4dgb65kjjfr4722r37vmxv"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-anyio
+                         python-coverage
+                         python-docutils
+                         python-nox
+                         python-pygments
+                         python-pytest
+                         python-pytest-asyncio
+                         python-pytest-rerunfailures))
+    (home-page "https://github.com/aklajnert/pytest-subprocess")
+    (synopsis "Fake subprocess for Pytest")
+    (description
+     "This package provides a plugin to fake subprocess for Pytest.")
+    (license license:expat)))
+
 ;; This is only used by python-sanic
 (define-public python-pytest-sanic
   (package
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] [PATCH v2 4/4] gnu: Add python-spin.
  2024-06-15 17:09 ` [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 2/4] gnu: Add hatch Nicolas Graves via Guix-patches via
  2024-06-15 17:09   ` [bug#67642] [PATCH v2 3/4] gnu: Add python-pytest-subprocess Nicolas Graves via Guix-patches via
@ 2024-06-15 17:09   ` Nicolas Graves via Guix-patches via
  2 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-06-15 17:09 UTC (permalink / raw)
  To: 67642; +Cc: Vinicius Monego, ngraves

From: Vinicius Monego <monego@posteo.net>

* gnu/packages/python-science.scm (python-spin): New variable.

Change-Id: I794845d559f3f4f3ab9cf98b0e4a4321b470f7f8
---
 gnu/packages/python-science.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 39ba0dad96f..5148f567b41 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1412,6 +1412,32 @@ (define-public python-numpoly
     (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux"))
     (license license:bsd-2)))
 
+(define-public python-spin
+  (package
+  (name "python-spin")
+  (version "0.8")
+  (source
+   (origin
+     (method url-fetch)
+     (uri (pypi-uri "spin" version))
+     (sha256
+      (base32 "0ff48nagfaai3j26g1db4zq2bwdv6kj5l7xhcs2l9kzg7qzrmhr7"))))
+  (build-system pyproject-build-system)
+  (propagated-inputs (list python-click python-colorama python-tomli))
+  (native-inputs (list python-pytest))
+  (home-page "https://github.com/scientific-python/spin")
+  (synopsis "Developer tool for scientific Python libraries")
+  (description "@code{spin} is a simple interface for common development
+tasks.  It comes with a few common build commands out the box, but can
+easily be customized per project.
+
+The impetus behind developing the tool was the mass migration of scientific
+Python libraries (SciPy, scikit-image, and NumPy, etc.) to Meson, after
+distutils was deprecated.  When many of the build and installation commands
+changed, it made sense to abstract away the nuisance of having to re-learn
+them.")
+  (license license:bsd-3)))
+
 (define-public python-baycomp
   (package
     (name "python-baycomp")
-- 
2.45.1





^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#67642] QA review for 67642
  2024-05-22 18:16 ` [bug#67642] QA review for 67642 Nicolas Graves via Guix-patches via
@ 2024-06-15 17:11   ` Nicolas Graves via Guix-patches via
  0 siblings, 0 replies; 17+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-06-15 17:11 UTC (permalink / raw)
  To: 67642, Vinicius Monego

I've sent a new series for the QA to be able to see it once again. This
new series only removes python-scikit-build-core.

On 2024-05-22 20:16, Nicolas Graves via Guix-patches via wrote:

> user guix
> usertag 67642 + reviewed-looks-good
> thanks
>
> Guix QA review form submission:
> We need to remove the 4th patch that adds python-scikit-build-core which
> is already present. Otherwise LGTM too.
>
> Items marked as checked: Lint warnings, Package builds, Commit messages, New package licenses, New package tests, New package synopsis and descriptions

-- 
Best regards,
Nicolas Graves




^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#67642: [PATCH 0/5] Add some Python build-related packages.
  2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
                   ` (8 preceding siblings ...)
  2024-06-15 17:09 ` [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath Nicolas Graves via Guix-patches via
@ 2024-06-26  6:52 ` jgart via Guix-patches via
  9 siblings, 0 replies; 17+ messages in thread
From: jgart via Guix-patches via @ 2024-06-26  6:52 UTC (permalink / raw)
  To: 67642-done; +Cc: Vinicius Monego, Nicolas Graves, zimon.toutoune

Thanks! Applied.

all best,

jgart




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-06-26  6:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 15:18 [bug#67642] [PATCH 0/5] Add some Python build-related packages Vinicius Monego
2023-12-05 15:21 ` [bug#67642] [PATCH 1/5] gnu: Add python-userpath Vinicius Monego
2023-12-05 15:21 ` [bug#67642] [PATCH 2/5] gnu: Add hatch Vinicius Monego
2024-02-27 13:14   ` Simon Tournier
2024-03-12 21:15     ` Vinicius Monego
2023-12-05 15:21 ` [bug#67642] [PATCH 3/5] gnu: Add python-pytest-subprocess Vinicius Monego
2023-12-05 15:21 ` [bug#67642] [PATCH 4/5] gnu: Add python-scikit-build-core Vinicius Monego
2023-12-05 15:21 ` [bug#67642] [PATCH 5/5] gnu: Add python-spin Vinicius Monego
2024-02-08  7:35 ` [bug#67642] [PATCH 0/5] Add some Python build-related packages obonnefon
2024-02-28  8:14 ` obonnefon
2024-05-22 18:16 ` [bug#67642] QA review for 67642 Nicolas Graves via Guix-patches via
2024-06-15 17:11   ` Nicolas Graves via Guix-patches via
2024-06-15 17:09 ` [bug#67642] [PATCH v2 1/4] gnu: Add python-userpath Nicolas Graves via Guix-patches via
2024-06-15 17:09   ` [bug#67642] [PATCH v2 2/4] gnu: Add hatch Nicolas Graves via Guix-patches via
2024-06-15 17:09   ` [bug#67642] [PATCH v2 3/4] gnu: Add python-pytest-subprocess Nicolas Graves via Guix-patches via
2024-06-15 17:09   ` [bug#67642] [PATCH v2 4/4] gnu: Add python-spin Nicolas Graves via Guix-patches via
2024-06-26  6:52 ` bug#67642: [PATCH 0/5] Add some Python build-related packages jgart via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).