From 2853d37e45101107870f9c8325fdd9b85a9df8e9 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sun, 19 Oct 2025 19:14:06 +0200 Subject: [PATCH] gnu: python-rply: Switch to pyproject. * gnu/packages/python-xyz.scm (python-rply): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:test-flags>: Ignore file that fails test collection and requires an additional argument. <#:phases>: Add phase 'fix-pytest-use. [native-inputs]: Add python-pytest, python-setuptools. Change-Id: I31428106bfbd044fa2e696e263c7459a1cad84ea Signed-off-by: Sharlatan Hellseher --- 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 df35af95e7f46aa48e0c790eb2056844ee6be913..fe839e6e73c21a04ea51c8855c27114ac7dfe06f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -20186,15 +20186,31 @@ output, progress bar display, and pipes.") (package (name "python-rply") (version "0.7.8") - (source (origin - (method url-fetch) - (uri (pypi-uri "rply" version)) - (sha256 - (base32 - "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a")))) - (build-system python-build-system) - (propagated-inputs - (list python-appdirs)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alex/rply") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0kn8vikyf95mr8l9g3324b7gk4cgxlvvy1abqpl1h803idqg1vwq")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "--ignore=tests/test_ztranslation.py") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'fix-pytest-use + (lambda _ + (substitute* (find-files "tests" "\\.py$") + (("import py") + "import pytest") + (("py\\.test") + "pytest")) + (setenv "HOME" (getcwd))))))) + (native-inputs (list python-pytest python-setuptools)) + (propagated-inputs (list python-appdirs)) (home-page "https://github.com/alex/rply") (synopsis "Parser generator for Python") (description