guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

192/223: gnu: python-pytest-enabler: Break dependency cycle.


From: guix-commits
Subject: 192/223: gnu: python-pytest-enabler: Break dependency cycle.
Date: Thu, 17 Oct 2024 06:21:08 -0400 (EDT)

sharlatan pushed a commit to branch python-team
in repository guix.

commit eb3ee395ce9eb941f63e12ff777481189adb7086
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Fri May 10 00:53:56 2024 +0200

    gnu: python-pytest-enabler: Break dependency cycle.
    
    * gnu/packages/check.scm
    (python-pytest-enabler-bootstrap): Delete variable.
    (python-pytest-enabler): Redefine variable.
    
    * gnu/packages/python-xyz.scm
    (python-jaraco-classes)[native-inputs]: Remove
    python-pytest-enabler-bootstrap.
    (python-jaraco-context-bootstrap): Delete variable.
    (python-jaraco-context): Redefine variable.
    (python-jaraco-functools-bootstrap): Delete variable.
    (python-jaraco-functools): Redefine variable.
    
    Change-Id: I96649093009beb7a3d0e9716eced778d4fc800e2
    Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
---
 gnu/packages/check.scm      |  80 +++++++++---------------
 gnu/packages/python-xyz.scm | 144 ++++++++++++++++++--------------------------
 2 files changed, 86 insertions(+), 138 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 623136ddf6..a289cfe852 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -2829,60 +2829,36 @@ style test suites, summarizing their results, and 
providing indication of
 failures.")
     (license license:ncsa)))
 
-;;; This is marked as a bootstrap package because it propagates bootstrapped
-;;; versions of jaraco-context and jaraco-functools.
-(define-public python-pytest-enabler-bootstrap
-  (hidden-package
-   (package
-     (name "python-pytest-enabler-bootstrap")
-     (version "1.2.1")
-     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "pytest-enabler" version))
-        (sha256
-         (base32 "023ymm0r2gpn5q7aikvx567s507j0zk46w41w6gxb69c688zgs73"))))
-     (build-system python-build-system)
-     (arguments (list #:tests? #f))
-     (propagated-inputs
-      (list python-jaraco-context-bootstrap
-            python-jaraco-functools-bootstrap
-            python-toml))
-     (native-inputs (list python-setuptools-scm))
-     (home-page "https://github.com/jaraco/pytest-enabler";)
-     (synopsis "Enable installed pytest plugins")
-     (description "Enable installed pytest plugins")
-     (license license:expat))))
-
 (define-public python-pytest-enabler
-  (package/inherit python-pytest-enabler-bootstrap
-    (arguments
-     (substitute-keyword-arguments
-       (strip-keyword-arguments
-         '(#:tests?)
-         (package-arguments python-pytest-enabler-bootstrap))
-       ((#:phases phases #~%standard-phases)
-        #~(modify-phases #$phases
-            (replace 'check
-              (lambda* (#:key tests? #:allow-other-keys)
-                (when tests?
-                  (invoke "python" "-m" "pytest" "-vv" "tests"))))))))
+  (package
+    (name "python-pytest-enabler")
+    (version "1.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pytest-enabler" version))
+       (sha256
+        (base32 "023ymm0r2gpn5q7aikvx567s507j0zk46w41w6gxb69c688zgs73"))))
+    (build-system pyproject-build-system)
+    (arguments (list #:tests? #f
+                     #:test-flags '(list "tests")))
     (propagated-inputs
-     (modify-inputs (package-propagated-inputs python-pytest-enabler-bootstrap)
-       (replace "python-jaraco-context-bootstrap" python-jaraco-context)
-       (replace "python-jaraco-functools-bootstrap" python-jaraco-functools)))
-    (native-inputs
-     (modify-inputs (package-native-inputs python-pytest-enabler-bootstrap)
-       (append python-pytest
-               python-pytest-black
-               python-pytest-checkdocs
-               python-pytest-cov
-               python-pytest-flake8
-               python-pytest-mypy
-               python-types-toml)))
-    (properties (alist-delete 'hidden?
-                              (package-properties
-                               python-pytest-enabler-bootstrap)))))
+     (list python-jaraco-context
+           python-jaraco-functools
+           python-toml))
+    (native-inputs (list python-pytest
+                         python-pytest-black
+                         python-pytest-checkdocs
+                         python-pytest-cov
+                         python-pytest-flake8
+                         python-pytest-mypy
+                         python-setuptools
+                         python-setuptools-scm
+                         python-types-toml))
+    (home-page "https://github.com/jaraco/pytest-enabler";)
+    (synopsis "Enable installed pytest plugins")
+    (description "Enable installed pytest plugins")
+    (license license:expat)))
 
 (define-public python-pytest-freezegun
   (package
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e66fe6b5fc..a7c7e72d48 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11981,7 +11981,6 @@ enforced method signatures and consistent 
documentation.")
            python-pytest-black
            python-pytest-checkdocs
            python-pytest-cov
-           python-pytest-enabler-bootstrap ;OK since not propagated
            python-pytest-flake8
            python-pytest-mypy
            python-setuptools-scm
@@ -12056,99 +12055,72 @@ WeightedLookup: A specialized RangeMap for selecting 
an item by weights.
 @end itemize")
     (license license:expat)))
 
-;;; Variant used to break a cycle with python-pytest-enabler.
-(define-public python-jaraco-context-bootstrap
-  (hidden-package
-   (package
-     (name "python-jaraco-context-bootstrap")
-     (version "4.1.1")
-     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "jaraco.context" version))
-        (sha256
-         (base32 "0hbjm1rpxf4pzmbdp9rh3ali4zqnlcr8m97bhh1nizxvzcpxim7h"))))
-     (build-system pyproject-build-system)
-     (arguments (list #:tests? #f))
-     (native-inputs (list python-setuptools-scm))
-     (home-page "https://github.com/jaraco/jaraco.context";)
-     (synopsis "Context managers Python library")
-     (description "This Python library provides context managers-related
-procedures.")
-     (license license:expat))))
-
 (define-public python-jaraco-context
-  (package/inherit python-jaraco-context-bootstrap
+  (package
     (name "python-jaraco-context")
+    (version "4.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jaraco.context" version))
+       (sha256
+        (base32 "0hbjm1rpxf4pzmbdp9rh3ali4zqnlcr8m97bhh1nizxvzcpxim7h"))))
+    (build-system pyproject-build-system)
     (arguments
-     (substitute-keyword-arguments
-         (package-arguments python-jaraco-context-bootstrap)
-       ((#:tests? _ #f)
-        (not (%current-target-system)))
-       ;; Do not test the myproject.toml build as it pulls dependencies.
-       ((#:test-flags test-flags '())
-        '(list "-k" "not project"))))
+     (list #:tests? (not (%current-target-system))
+           ;; Do not test the myproject.toml build as it pulls dependencies.
+           #:test-flags '(list "-k" "not project")))
     (native-inputs
-     (modify-inputs
-         (package-native-inputs python-jaraco-context-bootstrap)
-       (append python-pytest
-               python-pytest-black
-               python-pytest-checkdocs
-               python-pytest-cov
-               python-pytest-enabler-bootstrap ;OK since not propagated
-               python-pytest-flake8
-               python-pytest-mypy)))
-    (properties (alist-delete 'hidden? (package-properties
-                                        python-jaraco-context-bootstrap)))))
-
-;;; Variant used to break a cycle with python-pytest-enabler.
-(define-public python-jaraco-functools-bootstrap
-  (hidden-package
-   (package
-     (name "python-jaraco-functools-bootstrap")
-     (version "3.5.0")
-     (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "jaraco.functools" version))
-        (sha256
-         (base32 "186xqzs3bqhjwajnprxy3sc3h0w5vdld8spc1dxjnn9720yykq1i"))))
-     (build-system pyproject-build-system)
-     (arguments (list #:tests? #f))
-     (native-inputs (list python-setuptools-scm))
-     (propagated-inputs (list python-more-itertools))
-     (home-page "https://github.com/jaraco/jaraco.functools";)
-     (synopsis "Python library extending Python's @code{functools}")
-     (description "This library extends the standard @code{functools} Python
-module with a few extra procedures.")
-     (license license:expat))))
+     (list python-pytest
+           python-pytest-black
+           python-pytest-checkdocs
+           python-pytest-cov
+           python-pytest-flake8
+           python-pytest-mypy
+           python-setuptools
+           python-setuptools-scm
+           python-wheel))
+    (home-page "https://github.com/jaraco/jaraco.context";)
+    (synopsis "Context managers Python library")
+    (description "This Python library provides context managers-related
+procedures.")
+    (license license:expat)))
 
 (define-public python-jaraco-functools
-  (package/inherit python-jaraco-functools-bootstrap
+  (package
     (name "python-jaraco-functools")
+    (version "3.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jaraco.functools" version))
+       (sha256
+        (base32 "186xqzs3bqhjwajnprxy3sc3h0w5vdld8spc1dxjnn9720yykq1i"))))
+    (build-system pyproject-build-system)
     (arguments
-     (substitute-keyword-arguments
-         (package-arguments python-jaraco-functools-bootstrap)
-       ((#:tests? _ #f)
-        (not (%current-target-system)))
-       ;; Do not test the myproject.toml build as it pulls dependencies.
-       ;; Do not run a test that tries to emulate a broken proprietary CI
-       ;; set-up, fails to do so correctly, and then throws an error.
-       ((#:test-flags test-flags '())
-        '(list "-k" "not project and not test_function_throttled"))))
-    (native-inputs
-     (modify-inputs
-         (package-native-inputs python-jaraco-functools-bootstrap)
-       (append python-jaraco-classes
-               python-pytest
-               python-pytest-black
-               python-pytest-checkdocs
-               python-pytest-cov
-               python-pytest-enabler-bootstrap ;OK since not propagated
-               python-pytest-flake8
-               python-pytest-mypy)))
-    (properties (alist-delete 'hidden? (package-properties
-                                        python-jaraco-functools-bootstrap)))))
+     (list #:tests? (not (%current-target-system))
+           ;; Do not test the myproject.toml build as it pulls dependencies.
+           ;; Do not run a test that tries to emulate a broken proprietary
+           ;; CI set-up, fails to do so correctly, and then throws an error.
+           #:test-flags
+           '(list "-k" "not project and not test_function_throttled")))
+    (native-inputs
+     (list python-jaraco-classes
+           python-pytest
+           python-pytest-black
+           python-pytest-checkdocs
+           python-pytest-cov
+           python-pytest-flake8
+           python-pytest-mypy
+           python-setuptools
+           python-setuptools-scm
+           python-wheel))
+    (propagated-inputs (list python-more-itertools))
+    (home-page "https://github.com/jaraco/jaraco.functools";)
+    (synopsis "Python library extending Python's @code{functools}")
+    (description "This library extends the standard @code{functools} Python
+module with a few extra procedures.")
+    (license license:expat)))
 
 (define-public python-jaraco-packaging
   (package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]