diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-12-28 21:22:37 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-12-31 17:11:48 +0000 |
| commit | 9b1fe6120f75ade554963c387bf736c5ebeed4ae (patch) | |
| tree | 858883d83a37138767b47a2ab39315d432cff3aa /gnu/packages/linux.scm | |
| parent | 6681b4894d035c6ca499ea738f62536d6cdc7bc8 (diff) | |
gnu: python-pamela: Switch to pyproject.
* gnu/packages/linux.scm (python-pamela):
[build-system]: Switch to pyproject-build-system.
[source, arguments]: Improve style.
[native-inputs]: Add python-setuptools.
Change-Id: I842d2eca695e45a196d44ee8896e0651040b95df
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/linux.scm')
| -rw-r--r-- | gnu/packages/linux.scm | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9f0e52c79b0..94a94a98d53 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2966,39 +2966,33 @@ at login. Local and dynamic reconfiguration are its key features.") (name "python-pamela") (version "1.0.0") (source - (origin - ;; Tests not distributed in pypi release. - (method git-fetch) - (uri (git-reference - (url "https://github.com/minrk/pamela") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0cg3w6np1fbjpvzhv54xg567hpf38szwp2d4gvzb9r736nxbv0vr")))) - (build-system python-build-system) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/minrk/pamela") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0cg3w6np1fbjpvzhv54xg567hpf38szwp2d4gvzb9r736nxbv0vr")))) + (build-system pyproject-build-system) (arguments - '(#:tests? #f ; Test suite isn't designed to be run inside a container. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'hardcode-pam.so - (lambda* (#:key inputs #:allow-other-keys) - (let ((pam (assoc-ref inputs "linux-pam"))) - (substitute* "pamela.py" - (("find_library\\(\"pam\")") - (string-append "'" pam "/lib/libpam.so'"))) - #t))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (if tests? - (if (file-exists? "test_pamela.py") - (invoke "py.test" "--assert=plain" "test_pamela.py") - (invoke "python" "-m" "pamela" "-a" "`whoami`")) - #t)))))) - (inputs - (list linux-pam)) - (native-inputs - (list python-pytest)) + (list + #:tests? #f ;Test suite isn't designed to be run inside a container. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'hardcode-pam.so + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "pamela.py" + (("find_library\\(\"pam\")") + (format #f "~s" + (search-input-file inputs "lib/libpam.so")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when (and tests? (file-exists? "test_pamela.py")) + (invoke "pytest" "--assert=plain" "test_pamela.py") + (invoke "python" "-m" "pamela" "-a" "`whoami`"))))))) + (inputs (list linux-pam)) + (native-inputs (list python-pytest python-setuptools)) (home-page "https://github.com/minrk/pamela") (synopsis "PAM interface using ctypes") (description "This package provides a PAM interface using @code{ctypes}.") |
