diff mbox series

[bug#48046,v2,1/3] gnu: python-pytest-astropy: Adjust inputs.

Message ID 20211030025133.23186-2-monego@posteo.net
State Accepted
Headers show
Series Add Astropy. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Oct. 30, 2021, 2:51 a.m. UTC
* gnu/packages/python-check.scm (python-pytest-astropy)[arguments]: Add new
phase to skip a version check bug.
[native-inputs]: Remove python-pytest. Move python-attrs, python-hypothesis,
python-pytest-arraydiff, python-pytest-astropy-header, python-pytest-cov,
python-pytest-filter-subpackage, python-pytest-mock, python-pytest-openfiles,
python-pytest-remotedata to ...
[propagated-inputs]: ... here.
---
 gnu/packages/python-check.scm | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index a13bd0baa4..0cc0468d00 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -341,12 +341,20 @@  Astropy project, but is optimized for use with astropy-related projects.")
         (base32 "18j6z6y2fvykmcs5z0mldhhaxxn6wzpnhlm2ps7m8r5z5kmh1631"))))
     (build-system python-build-system)
     (arguments
-     ;; No tests provided
-     '(#:tests? #f))
+     `(#:tests? #f ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         ;; There is a bug somewhere that makes pytest-filter-subpackage appear
+         ;; as version 0.0.0 to setup.py.  Remove it from the requirements.
+         (add-after 'unpack 'remove-requirement
+           (lambda _
+             (substitute* "setup.cfg"
+               ((".*pytest-filter-subpackage.*") "")))))))
     (native-inputs
+     `(("python-setuptools-scm" ,python-setuptools-scm)))
+    (propagated-inputs
      `(("attrs" ,python-attrs)
        ("hypothesis" ,python-hypothesis)
-       ("pytest" ,python-pytest)
        ("pytest-arraydiff" ,python-pytest-arraydiff)
        ("pytest-astropy-header" ,python-pytest-astropy-header)
        ("pytest-cov" ,python-pytest-cov)
@@ -354,8 +362,7 @@  Astropy project, but is optimized for use with astropy-related projects.")
        ("pytest-filter-subpackage" ,python-pytest-filter-subpackage)
        ("pytest-mock" ,python-pytest-mock)
        ("pytest-openfiles" ,python-pytest-openfiles)
-       ("pytest-remotedata" ,python-pytest-remotedata)
-       ("setuptools-scm" ,python-setuptools-scm)))
+       ("pytest-remotedata" ,python-pytest-remotedata)))
     (home-page "https://github.com/astropy/pytest-astropy")
     (synopsis
      "Metapackage for all the testing machinery used by the Astropy Project")