guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: Add python-parted.


From: Danny Milosavljevic
Subject: 01/01: gnu: Add python-parted.
Date: Sun, 25 Mar 2018 13:29:56 -0400 (EDT)

dannym pushed a commit to branch master
in repository guix.

commit 9b36e3bf25cf5df94858ac5860e2e7ad8239aa31
Author: Danny Milosavljevic <address@hidden>
Date:   Sun Mar 25 19:25:31 2018 +0200

    gnu: Add python-parted.
    
    * gnu/packages/disk.scm (python-parted, python2-parted): New variables.
---
 gnu/packages/disk.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 756a9f5..96c3a56 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -416,3 +416,43 @@ capacity of a flash card (flash drive, flash disk, 
pendrive).  F3 writes to
 the card and then checks if can read it.  It will assure you haven't been sold
 a card with a smaller capacity than stated.")
     (license license:gpl3+)))
+
+(define-public python-parted
+  (package
+    (name "python-parted")
+    (version "3.11.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/dcantrell/pyparted/archive/v";
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0r1nyjj40nacnfnv17x2mnsj6ga1qplyxyza82v2809dfhim2fwq"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key outputs inputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             ;; See <https://github.com/dcantrell/pyparted/issues/47>.
+             (substitute* "tests/test__ped_ped.py"
+               (("\"/tmp/temp-device-\"") "self.path"))
+             (invoke "python" "-m" "unittest" "discover" "-v")
+             #t)))))
+    (native-inputs
+     `(("e2fsprogs" ,e2fsprogs)
+       ("pkg-config" ,pkg-config)))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (inputs
+     `(("parted" ,parted)))
+    (home-page "https://github.com/dcantrell/pyparted";)
+    (synopsis "Parted bindings for Python")
+    (description "This package provides @code{parted} bindings for Python.")
+    (license license:gpl2+)))
+
+(define-public python2-parted
+  (package-with-python2 python-parted))



reply via email to

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