~ruther/guix-local

23a0d03ed11518696ac49d74039fa2c4a30bbd56 — Nicolas Graves 1 year, 5 months ago 922137e
gnu: python-jupytext: Move to pyproject-build-system.

* gnu/packages/python-xyz.scm (python-jupytext):
[build-system]: Move to pyproject-build-system.
[arguments]<#:test-flags>: Add flags. Add a flag to ignore pre_commit
tests.
<#:phases>: Remove 'check phase replacement.

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

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +11 -13
@@ 543,26 543,24 @@ design}.")
       (file-name (git-file-name name version))
       (sha256
        (base32 "0bgf0c4py22ip7qfla8mrmypfh3bg151c8awsr1gvcbw7m4ni01k"))))
    (build-system python-build-system)
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags
      #~(list "--ignore-glob=tests/test_pre_commit_*.py"
              "-k" (string-join
                    (list "not test_create_header_with_set_formats"
                          "test_pre_commit_hook"
                          "test_sync_with_pre_commit_hook")
                    " and not "))
      #:phases
      #~(modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
          (add-before 'check 'pre-check
            (lambda _
              ;; some tests fail when HOME=/homeless-shelter.
              (setenv "HOME" "/tmp")
              ;; OSError: [Errno 18] Invalid cross-device link
              (setenv "TMPDIR" "/tmp")
              (when tests?
                (let ((disabled-tests
                       (list "test_create_header_with_set_formats"
                             "test_pre_commit_hook"
                             "test_sync_with_pre_commit_hook")))
                  (invoke "pytest" "-vv" "-k"
                          (string-append "not "
                                         (string-join disabled-tests
                                                      " and not "))))))))))
              (setenv "TMPDIR" "/tmp"))))))
    (native-inputs
     (list git-minimal/pinned
           python-gitpython