~ruther/guix-local

d18614811bcef5d16923d2fd4b7c1f6e8498833b — Lilah Tascheter 2 months ago 0800da2
gnu: python-xyz: Add python-prctl.

* gnu/packages/python-xyz.scm (python-prctl): New variable.

Change-Id: I14b788cd83650a38a448d6474ce305f0ccfcb559
1 files changed, 34 insertions(+), 0 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +34 -0
@@ 5142,6 5142,40 @@ extra metadata.  Because HDF5 and MAT files might need to be read from
untrusted sources, pickling is avoided in this package.")
      (license license:bsd-2))))

(define-public python-prctl
  (package
    (name "python-prctl")
    (version "1.8.1")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "python-prctl" version))
              (sha256
                (base32
                  "1kk7gv582w72spnz6agr0pz0hlpgchp3l7zxzzjarwfllwjrmjml"))))
    (build-system pyproject-build-system)
    (arguments
      (list #:test-backend ''custom
            #:test-flags ''("test_prctl.py")
            #:phases
            #~(modify-phases %standard-phases
                (add-after 'unpack 'patch-tests
                  (lambda _
                    (substitute* "test_prctl.py"
                      ;; actual suffix used in cpython build output dir name
                      (("sys.version\\[0:3\\]") "sys.implementation.cache_tag")
                      ;; test_no_new_privs assumes existance of /bin/ping, but
                      ;; can never run anyway due to it requiring setuid ping.
                      ;; just short circuit it instead.
                      (("os.stat\\('/bin/ping'\\)\\.st_mode") "0")))))))
    (inputs (list libcap))
    (native-inputs (list python-setuptools))
    (supported-systems (filter target-linux? %supported-systems))
    (home-page "https://pythonhosted.org/python-prctl")
    (synopsis "Linux capabilities library")
    (description "This package provides a Python library for controlling Linux
capabilities and attributes, similar to the prctl syscall.")
    (license license:gpl3+)))

(define-public python-hjson
  ;; Using commit from master branch as the PyPI version does not contain
  ;; the hjson/tests/ directory.