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 | |
| 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>
| -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.") | |||
| 2966 | (name "python-pamela") | 2966 | (name "python-pamela") |
| 2967 | (version "1.0.0") | 2967 | (version "1.0.0") |
| 2968 | (source | 2968 | (source |
| 2969 | (origin | 2969 | (origin |
| 2970 | ;; Tests not distributed in pypi release. | 2970 | (method git-fetch) |
| 2971 | (method git-fetch) | 2971 | (uri (git-reference |
| 2972 | (uri (git-reference | 2972 | (url "https://github.com/minrk/pamela") |
| 2973 | (url "https://github.com/minrk/pamela") | 2973 | (commit version))) |
| 2974 | (commit version))) | 2974 | (file-name (git-file-name name version)) |
| 2975 | (file-name (git-file-name name version)) | 2975 | (sha256 |
| 2976 | (sha256 | 2976 | (base32 "0cg3w6np1fbjpvzhv54xg567hpf38szwp2d4gvzb9r736nxbv0vr")))) |
| 2977 | (base32 | 2977 | (build-system pyproject-build-system) |
| 2978 | "0cg3w6np1fbjpvzhv54xg567hpf38szwp2d4gvzb9r736nxbv0vr")))) | ||
| 2979 | (build-system python-build-system) | ||
| 2980 | (arguments | 2978 | (arguments |
| 2981 | '(#:tests? #f ; Test suite isn't designed to be run inside a container. | 2979 | (list |
| 2982 | #:phases | 2980 | #:tests? #f ;Test suite isn't designed to be run inside a container. |
| 2983 | (modify-phases %standard-phases | 2981 | #:phases |
| 2984 | (add-after 'unpack 'hardcode-pam.so | 2982 | #~(modify-phases %standard-phases |
| 2985 | (lambda* (#:key inputs #:allow-other-keys) | 2983 | (add-after 'unpack 'hardcode-pam.so |
| 2986 | (let ((pam (assoc-ref inputs "linux-pam"))) | 2984 | (lambda* (#:key inputs #:allow-other-keys) |
| 2987 | (substitute* "pamela.py" | 2985 | (substitute* "pamela.py" |
| 2988 | (("find_library\\(\"pam\")") | 2986 | (("find_library\\(\"pam\")") |
| 2989 | (string-append "'" pam "/lib/libpam.so'"))) | 2987 | (format #f "~s" |
| 2990 | #t))) | 2988 | (search-input-file inputs "lib/libpam.so")))))) |
| 2991 | (replace 'check | 2989 | (replace 'check |
| 2992 | (lambda* (#:key tests? #:allow-other-keys) | 2990 | (lambda* (#:key tests? #:allow-other-keys) |
| 2993 | (if tests? | 2991 | (when (and tests? (file-exists? "test_pamela.py")) |
| 2994 | (if (file-exists? "test_pamela.py") | 2992 | (invoke "pytest" "--assert=plain" "test_pamela.py") |
| 2995 | (invoke "py.test" "--assert=plain" "test_pamela.py") | 2993 | (invoke "python" "-m" "pamela" "-a" "`whoami`"))))))) |
| 2996 | (invoke "python" "-m" "pamela" "-a" "`whoami`")) | 2994 | (inputs (list linux-pam)) |
| 2997 | #t)))))) | 2995 | (native-inputs (list python-pytest python-setuptools)) |
| 2998 | (inputs | ||
| 2999 | (list linux-pam)) | ||
| 3000 | (native-inputs | ||
| 3001 | (list python-pytest)) | ||
| 3002 | (home-page "https://github.com/minrk/pamela") | 2996 | (home-page "https://github.com/minrk/pamela") |
| 3003 | (synopsis "PAM interface using ctypes") | 2997 | (synopsis "PAM interface using ctypes") |
| 3004 | (description "This package provides a PAM interface using @code{ctypes}.") | 2998 | (description "This package provides a PAM interface using @code{ctypes}.") |
