guix_mirror_bot pushed a commit to branch next-master
in repository guix.
commit 0a3655183fc6cf6661b909f6f686cf02d71f93c1
Author: Nicolas Graves <[email protected]>
AuthorDate: Fri Dec 26 04:00:44 2025 +0100
gnu: python2-pycparser: Migrate to pyproject and decouple.
Rationale: Decoupling helps us moving the package, and not worry about
inheriting package updates.
* gnu/packages/python-xyz.scm (python2-pycparser)
[inherit]: Drop it.
[build-system, arguments]: Migrate to pyproject-build-system.
[name, home-page, synopsis, description, license]: Set them
explicitely.
[native-inputs]: Add python-setuptools.
Change-Id: Ie55f1fdc60d80ec921acabced218ec758a650cf1
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/python-xyz.scm | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2919941378..dec8c37842 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -41761,8 +41761,8 @@ you do not want to store entirely on disk or on
memory.")
(define-public python2-pycparser
(let ((base (package
- (inherit python-pycparser)
(version "2.18")
+ (name "python-pycparser")
(source
(origin
(method url-fetch)
@@ -41770,15 +41770,31 @@ you do not want to store entirely on disk or on
memory.")
(sha256
(base32
"09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
- ;; FIXME: package-with-python2 needs to be updated to accept
- ;; pyproject-build-system packages.
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- (cons* #:tests? #f
- (strip-keyword-arguments
- '(#:test-backend)
- (package-arguments python-pycparser)))))))
- (package-with-python2 base)))
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (invoke "python" "setup.py" "build")))
+ (replace 'install
+ (lambda _
+ (invoke "python" "./setup.py" "install"
+ (string-append "--prefix=" #$output)
+ "--no-compile")
+ (invoke "python" "-m" "compileall" #$output))))))
+ (home-page "https://github.com/eliben/pycparser")
+ (synopsis "C parser in Python")
+ (description
+ "Pycparser is a complete parser of the C language, written in
+pure Python using the PLY parsing library. It parses C code into an AST and
+can serve as a front-end for C compilers or analysis tools.")
+ (license license:bsd-3))))
+ (package
+ (inherit (package-with-python2 base))
+ (native-inputs (list python-setuptools)))))
(define-public shrinkwrap
(package