mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-capstone: Improve package style.
* gnu/packages/engineering.scm (python-capstone): Use G-expressions, adjust fields order. [arguments]: Use G-expressions. [phases] {chdir-and-fix-setup-py}: Convert to use FORMAT and THIS-PACKAGE-INPUT to simplify the flow. Change-Id: I80a4e85cd47f6b06b22615d592b9cadd74e17485
This commit is contained in:
parent
b5fda7e4da
commit
794df97a0e
1 changed files with 8 additions and 9 deletions
|
@ -1909,14 +1909,13 @@ bindings for Python, Java, OCaml and more.")
|
||||||
(package
|
(package
|
||||||
(inherit capstone)
|
(inherit capstone)
|
||||||
(name "python-capstone")
|
(name "python-capstone")
|
||||||
(propagated-inputs
|
|
||||||
(list capstone))
|
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'chdir-and-fix-setup-py
|
(add-after 'unpack 'chdir-and-fix-setup-py
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _
|
||||||
(chdir "bindings/python")
|
(chdir "bindings/python")
|
||||||
;; Do not build the library again, because we already have it.
|
;; Do not build the library again, because we already have it.
|
||||||
(substitute* "setup.py" ((".* build_libraries.*") ""))
|
(substitute* "setup.py" ((".* build_libraries.*") ""))
|
||||||
|
@ -1924,13 +1923,13 @@ bindings for Python, Java, OCaml and more.")
|
||||||
;; library.
|
;; library.
|
||||||
(substitute* "capstone/__init__.py"
|
(substitute* "capstone/__init__.py"
|
||||||
(("pkg_resources.resource_filename.*")
|
(("pkg_resources.resource_filename.*")
|
||||||
(string-append "'" (dirname (search-input-file
|
(format #f "'~a/lib',~%" #$(this-package-input "capstone"))))))
|
||||||
inputs "lib/libcapstone.so"))
|
|
||||||
"',\n")))))
|
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(invoke "make" "check")))))))))
|
(invoke "make" "check")))))))
|
||||||
|
(propagated-inputs
|
||||||
|
(list capstone))))
|
||||||
|
|
||||||
|
|
||||||
(define-public python-esptool-3.0
|
(define-public python-esptool-3.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue