diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-11-10 01:24:35 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-11-11 21:34:59 +0000 |
| commit | 71a09730dc5a37f84cb05e4a4f3555e86bbb9f5d (patch) | |
| tree | 8dbb9adface89be82f6134787bf521aca87f9c62 /gnu | |
| parent | c96c926305a2c25d8165a659666f2c96c5c42de0 (diff) | |
gnu: python-pytidylib: Switch to pyproject.
* gnu/packages/python-xyz.scm (python-pytidylib):
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[native-inputs]: Add python-pytest, python-setuptools.
Change-Id: I1eeb1199d0be2746a927128bf165d8008e4694ed
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 86787163a31..4dc3d96f5a3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -30543,29 +30543,33 @@ be necessary when using @code{cmd}.") (package (name "python-pytidylib") (version "0.3.2") - (source (origin - (method url-fetch) - (uri (pypi-uri "pytidylib" version)) - (sha256 - (base32 - "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/countergram/pytidylib") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0h5kx99ka47yan9xsh2pyi19mhhbixqpbqn6rgciskfr5m1csji0")))) + (build-system pyproject-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-queue-import - (lambda _ - ;; Adjust Queue import for Python 3. Remove for versions >=0.4.0. - (substitute* "tests/threadsafety.py" - (("from Queue import Queue") - "from queue import Queue")))) - (add-before 'build 'qualify-libtidy - (lambda* (#:key inputs #:allow-other-keys) - (let ((libtidy (search-input-file inputs "/lib/libtidy.so"))) - (substitute* "tidylib/tidy.py" - (("ctypes\\.util\\.find_library\\('tidy'\\)") - (format #f "'~a'" libtidy))) - #t)))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-queue-import + (lambda _ + ;; Adjust Queue import for Python 3. Remove for versions >=0.4.0. + (substitute* "tests/threadsafety.py" + (("from Queue import Queue") + "from queue import Queue")))) + (add-before 'build 'qualify-libtidy + (lambda* (#:key inputs #:allow-other-keys) + (let ((libtidy (search-input-file inputs "/lib/libtidy.so"))) + (substitute* "tidylib/tidy.py" + (("ctypes\\.util\\.find_library\\('tidy'\\)") + (format #f "'~a'" libtidy))))))))) + (native-inputs (list python-pytest python-setuptools)) (inputs (list tidy-html)) (home-page "https://github.com/countergram/pytidylib") (synopsis "Python wrapper for HTML Tidy library") |
