~ruther/guix-local

51436611e7fd01964d39ab8b56c17831432541be — Nicolas Graves 6 months ago b857beb
gnu: python-dictdiffer: Switch to pyproject.

* gnu/packages/python-xyz.scm (python-dictdiffer):
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Add phases 'set-version and 'relax-requirements.
[native-inputs]: Add python-setuptools.  Replace python-pytest-runner
by python-pytest.

Change-Id: I8c10fce39d106df090df3ced8fed6680949ebefe
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1 files changed, 23 insertions(+), 11 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +23 -11
@@ 30387,19 30387,31 @@ cryptographically signed ones).")
  (package
    (name "python-dictdiffer")
    (version "0.9.0")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "dictdiffer" version))
              (sha256
               (base32
                "0y3mk74qm2q9hsm37892i1wzn8bbdrvbs4nmnvqwq4z6pxgwzfhp"))))
    (build-system python-build-system)
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/inveniosoftware/dictdiffer")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1rc5jhjxzphip43frrlplcayng2cah1bzbzv6hpxnnjhg6rqy34m"))))
    (build-system pyproject-build-system)
    (arguments
     ;; XXX: The PyPI tarball lacks tests and the git repository
     ;; fails to determine version.
     '(#:tests? #f))
     (list
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'set-version
            (lambda _
              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
          (add-after 'unpack 'relax-requirements
            (lambda _
              (delete-file "pytest.ini")
              (substitute* "setup.py"
                (("'pytest-runner.*',")
                 "'pytest',")))))))
    (native-inputs
     (list python-pytest-runner python-setuptools-scm))
     (list python-pytest python-setuptools python-setuptools-scm))
    (home-page "https://github.com/inveniosoftware/dictdiffer")
    (synopsis "Diff and patch Python dictionary objects")
    (description