~ruther/guix-local

a6ae7d9d2d2f927739a0c5979caedab022b1e535 — Sharlatan Hellseher 5 months ago ca4d271
gnu: python-strenum: Enable tests.

* gnu/packages/python-xyz.scm (python-strenum)[source]: Switch to
git-fetch providing tests.
[arguments] <test-flags>: Extract some test options from "pytest.ini"
<phases>: Add 'fix-version, and 'fix-pytest-config.
[native-inputs]: Remove python-wheel; add python-pytest.

Change-Id: I2c0207f87121f8e23d007ff201a05af98fe41381
1 files changed, 25 insertions(+), 5 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +25 -5
@@ 17206,13 17206,33 @@ functionality and customization to your projects with their own plugins.")
    (version "0.4.15")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "StrEnum" version))
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/irgeek/StrEnum")
              (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1zrfr1shin5wyfnfxc7jpk013594wasrp4ni9l70fhjlf2mvb3w7"))))
        (base32 "1bvk7v5f3sr7awcacdmw5lfzsnn6j52q45va9xpc71n5qxydqbfn"))))
    (build-system pyproject-build-system)
    (arguments (list #:tests? #false)) ;there are none.
    (native-inputs (list python-setuptools python-wheel))
    (arguments
     (list
      #:test-flags
      #~(list "--ignore=doc/")
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'fix-version
            ;; Versioneer is useless when there is no git metadata.
            (lambda _
              (substitute* "setup.py"
                (("version=versioneer.get_version\\(),")
                 (format #f "version=~s," #$version)))))
          (add-after 'unpack 'fix-pytest-config
            (lambda _
              (substitute* "pytest.ini"
                (("addopts =.*") "")))))))
    (native-inputs
     (list python-pytest
           python-setuptools))
    (home-page "https://github.com/irgeek/StrEnum")
    (synopsis "Enum that inherits from str")
    (description "StrEnum is a Python @code{enum.Enum} that inherits from