guix-commits
[Top][All Lists]
Advanced

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

03/07: gnu: python-natsort: Update to 5.4.1.


From: Marius Bakke
Subject: 03/07: gnu: python-natsort: Update to 5.4.1.
Date: Mon, 19 Nov 2018 18:59:52 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 89d88b8530d1cdaa6be785a289aed65ba087d546
Author: Marius Bakke <address@hidden>
Date:   Sun Nov 18 03:14:01 2018 +0100

    gnu: python-natsort: Update to 5.4.1.
    
    * gnu/packages/python.scm (python-natsort): Update to 5.4.1.
    [arguments]: Add #:modules.  Replace 'check' phase with custom pytest
    invokation.
    [native-inputs]: Remove PYTHON-PYTEST-CACHE, PYTHON-PYTEST-FLAKES and
    PYTHON-PYTEST-PEP8.  Add PYTHON-PYTEST and PYTHON-PYTEST-MOCK.
    (python2-natsort)[native-inputs]: Remove PYTHON2-ENUM34 and PYTHON2-MOCK.
---
 gnu/packages/python.scm | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 2b7482a..463a325 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -10193,26 +10193,41 @@ Python to manipulate OpenDocument 1.2 files.")
 (define-public python-natsort
   (package
     (name "python-natsort")
-    (version "5.0.2")
+    (version "5.4.1")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "natsort" version))
               (sha256
                (base32
-                "0bh6j0l8iapjnsgg3bs6q075cnzjl6zw1vlgqyv3qrygm2cxypkn"))))
+                "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
     (build-system python-build-system)
     (arguments
-     `(#:phases
+     `(#:modules ((guix build utils)
+                  (guix build python-build-system)
+                  (srfi srfi-1)
+                  (srfi srfi-26)
+                  (ice-9 ftw))
+       #:phases
        (modify-phases %standard-phases
          (add-before 'check 'set-cachedir
            ;; Tests require write access to $HOME by default
-           (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t)))))
+           (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
+         (replace 'check
+           (lambda _
+             (let ((cwd (getcwd)))
+               (setenv "PYTHONPATH"
+                       (string-append
+                        cwd "/build/"
+                        (find (cut string-prefix? "lib" <>)
+                              (scandir (string-append cwd "/build")))
+                        ":"
+                        (getenv "PYTHONPATH")))
+               (invoke "pytest" "-v")))))))
     (native-inputs
      `(("python-hypothesis" ,python-hypothesis)
-       ("python-pytest-cache" ,python-pytest-cache)
        ("python-pytest-cov" ,python-pytest-cov)
-       ("python-pytest-flakes" ,python-pytest-flakes)
-       ("python-pytest-pep8" ,python-pytest-pep8)))
+       ("python-pytest-mock" ,python-pytest-mock)
+       ("python-pytest" ,python-pytest)))
     (propagated-inputs ; TODO: Add python-fastnumbers.
      `(("python-pyicu" ,python-pyicu)))
     (home-page "https://github.com/SethMMorton/natsort";)
@@ -10234,8 +10249,6 @@ functionality in the command line.")
     (package (inherit base)
              (native-inputs
               `(("python2-pathlib" ,python2-pathlib)
-                ("python2-mock" ,python2-mock)
-                ("python2-enum34" ,python2-enum34)
                 ,@(package-native-inputs base))))))
 
 (define-public python-glances



reply via email to

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