gnu: python-setools: Improve package, fix build.

* gnu/packages/selinux.scm (python-setools): Use G-Expressions, fix
indentation, remove trailing #t from lambdas.
[native-inputs]: Remove python-cython; add python-cython-0.

Change-Id: Ib30043915a6895022b32cb818a74aea54d91b6d2
This commit is contained in:
Sharlatan Hellseher 2025-09-23 14:26:57 +01:00
parent e098877692
commit c6a4b84e15
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -305,20 +305,21 @@ based on required access.")
(package (package
(name "python-setools") (name "python-setools")
(version "4.4.0") (version "4.4.0")
(source (origin (source
(origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/SELinuxProject/setools") (url "https://github.com/SELinuxProject/setools")
(commit version))) (commit version)))
(file-name (string-append name "-" version "-checkout")) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "1qvd5j6zwq4fmlahg45swjplhif2z89x7s6pnp07gvcp2fbqdsh5"))))
"1qvd5j6zwq4fmlahg45swjplhif2z89x7s6pnp07gvcp2fbqdsh5"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:tests? #f ; the test target causes a rebuild (list
#:tests? #f ; the test target causes a rebuild
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'portability) (delete 'portability)
(add-after 'unpack 'set-SEPOL-variable (add-after 'unpack 'set-SEPOL-variable
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
@ -327,20 +328,23 @@ based on required access.")
(add-after 'unpack 'remove-Werror (add-after 'unpack 'remove-Werror
(lambda _ (lambda _
(substitute* "setup.py" (substitute* "setup.py"
(("'-Werror',") "")) (("'-Werror',") ""))))
#t))
(add-after 'unpack 'fix-target-paths (add-after 'unpack 'fix-target-paths
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(substitute* "setup.py" (substitute* "setup.py"
(("join\\(sys.prefix") (("join\\(sys.prefix")
(string-append "join(\"" (assoc-ref outputs "out") "/\""))) (string-append "join(\"" #$output "/\""))))))))
#t))))) (native-inputs
(list bison
flex
python-cython-0
swig))
(inputs
(list libsepol
libselinux
python-pyqt))
(propagated-inputs (propagated-inputs
(list python-networkx)) (list python-networkx))
(inputs
(list libsepol libselinux python-pyqt))
(native-inputs
(list bison flex python-cython swig))
(home-page "https://github.com/SELinuxProject/setools") (home-page "https://github.com/SELinuxProject/setools")
(synopsis "Tools for SELinux policy analysis") (synopsis "Tools for SELinux policy analysis")
(description "SETools is a collection of graphical tools, command-line (description "SETools is a collection of graphical tools, command-line