summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Pieper <jpieper@mailbox.org>2024-04-15 19:45:05 +0200
committerGuix Patches Tester <>2024-04-17 14:14:50 +0200
commit63117ccb17a31d23a5ee41b4212d0f8e6fda649e (patch)
tree4ebf1bc4c725b27376e7214ec9ac512ac4125f6a
parenta0686eec3451348d8b408ea8e52e78221c829fdd (diff)
downloadguix-patches-63117ccb17a31d23a5ee41b4212d0f8e6fda649e.tar
guix-patches-63117ccb17a31d23a5ee41b4212d0f8e6fda649e.tar.gz
gnu: Add python-pytoolconfig.
* gnu/packages/python-xyz.scm (python-pytoolconfig): New variable.
-rw-r--r--gnu/packages/python-xyz.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 337b009672..10103d2d23 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -36302,6 +36302,58 @@ write text fast, and for various text generation, statistics, and modeling tasks
(base32
"0mikjfvq26kh8asnn9v55z41pap4c5ypymqnwwi4xkavc3mzyda2"))))))
+(define-public python-pytoolconfig
+ (package
+ (name "python-pytoolconfig")
+ (version "1.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytoolconfig" version))
+ (sha256
+ (base32 "18isxi4ijarl949d0zmf0b4606r6hihpi3p5yb7763m4c7ra24i5"))))
+ (build-system pyproject-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'update-license
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("license-expression = (\"[^\"]*\")" all license)
+ (string-append "license = {text = " license "}")))))
+ (add-after 'unpack 'remove-mypy
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("^.*mypy.*")
+ "")
+ (("strict = true")
+ ""))))
+ (add-after 'unpack 'use-pdm-backend-instead-of-pep517
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("pdm-pep517")
+ "pdm-backend")
+ (("pdm\\.pep517\\.api")
+ "pdm.backend"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Disable failing test.
+ (invoke "python" "-m" "pytest" "-k"
+ "not test_documentation")))))))
+ (native-inputs (list python-pdm-backend
+ python-tomli
+ python-pytest
+ python-docutils
+ python-sphinx
+ python-tabulate))
+ (propagated-inputs (list python-appdirs))
+ (home-page "https://github.com/bagel897/pytoolconfig")
+ (synopsis "Python Tool Configuration")
+ (description
+ "This module manages configuration for python tools,
+such as rope and add support for a pyproject.toml configuration file.")
+ (license license:lgpl3+)))
+
;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above by existing packages with similar