diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-12-26 04:00:44 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2026-01-25 21:22:42 +0100 |
| commit | 920e8a7344e75fbea7d4d3022fa7187c9d5ce619 (patch) | |
| tree | 04aabb67be43f4a1a7bc46e180058b00fe850ef0 /gnu/packages | |
| parent | 0dfbb0894d7419b7afe65feb8ef3e00fb8739e28 (diff) | |
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 <sharlatanus@gmail.com>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c25752b0706..e5f460186d3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -41807,8 +41807,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) @@ -41816,15 +41816,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 |
