From 94551439074f804f35970b08435aa02007edfb0b Mon Sep 17 00:00:00 2001 From: Christopher Lemmer Webber Date: Sun, 15 Aug 2021 14:15:37 -0400 Subject: Update copyright/name notices for Christine Lemmer-Webber. * doc/guix-cookbook.texi: Update copyright/name for Christine Lemmer-Webber. * gnu/build/image.scm: Likewise. * gnu/build/vm.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/assembly.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/check.scm: Likewise. * gnu/packages/databases.scm: Likewise. * gnu/packages/emacs-xyz.scm: Likewise. * gnu/packages/finance.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/guile-xyz.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/haskell-xyz.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/python-web.scm: Likewise. * gnu/packages/python-xyz.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/sphinx.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/services/networking.scm: Likewise. * gnu/system/vm.scm: Likewise. --- gnu/packages/python-xyz.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 295d158bd34..56920f68c3a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2015 Omar Radwan ;;; Copyright © 2015 Pierre-Antoine Rault ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus -;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber +;;; Copyright © 2015, 2016, 2020 Christine Lemmer-Webber ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2015, 2016 David Thompson ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari -- cgit v1.3 From d31301dfe08076e5d229175b2cd093c6fe60a6d5 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 2 Aug 2021 14:15:39 +0530 Subject: gnu: Add python-pyan3. * gnu/packages/python-xyz.scm (python-pyan3): New variable. * gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch, gnu/packages/patches/python-pyan3-fix-positional-arguments.patch: New files. * gnu/local.mk: Register them. --- gnu/local.mk | 2 + .../python-pyan3-fix-absolute-path-bug.patch | 160 +++++++++++++++++++++ .../python-pyan3-fix-positional-arguments.patch | 22 +++ gnu/packages/python-xyz.scm | 42 ++++++ 4 files changed, 226 insertions(+) create mode 100644 gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch create mode 100644 gnu/packages/patches/python-pyan3-fix-positional-arguments.patch (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 6dda3117437..8c69ddc907e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1649,6 +1649,8 @@ dist_patch_DATA = \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-time-clock.patch \ + %D%/packages/patches/python-pyan3-fix-absolute-path-bug.patch \ + %D%/packages/patches/python-pyan3-fix-positional-arguments.patch \ %D%/packages/patches/python-pydot-regression-test.patch \ %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ diff --git a/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch b/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch new file mode 100644 index 00000000000..0b6a083fa34 --- /dev/null +++ b/gnu/packages/patches/python-pyan3-fix-absolute-path-bug.patch @@ -0,0 +1,160 @@ +From ac1bd55d07fd1bad2f4a92dc0809607c407d9140 Mon Sep 17 00:00:00 2001 +From: "Maciej A. Czyzewski" +Date: Wed, 9 Jun 2021 15:29:18 +0200 +Subject: [PATCH] feature: new params for graphviz + solves #70 + +- solve abs path bug #70 +- new params for graphviz (ranksep; layout) +- tested layout `dot`; `fdp` (square graph) +- updated `.gitignore` (files gen. after `visualize_pyan_architecture.sh`) +--- + .gitignore | 5 ++++ + README.md | 6 ++-- + pyan/main.py | 55 +++++++++++++++++++++++++++++++--- + visualize_pyan_architecture.sh | 5 ++++ + 4 files changed, 64 insertions(+), 7 deletions(-) + +diff --git a/.gitignore b/.gitignore +index 990fdc0c..93313aaf 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -162,3 +162,8 @@ htmlcov + .idea/ + .history/ + .vscode/ ++ ++# our vis. of architecture ++architecture.dot ++architecture.html ++architecture.svg +diff --git a/README.md b/README.md +index d1f19dcf..9e6919a3 100644 +--- a/README.md ++++ b/README.md +@@ -48,7 +48,7 @@ See `pyan3 --help`. + + Example: + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot` + + Then render using your favorite GraphViz filter, mainly `dot` or `fdp`: + +@@ -56,11 +56,11 @@ Then render using your favorite GraphViz filter, mainly `dot` or `fdp`: + + Or use directly + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --svg >myuses.svg` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --svg >myuses.svg` + + You can also export as an interactive HTML + +-`pyan *.py --uses --no-defines --colored --grouped --annotated --html > myuses.html` ++`pyan3 *.py --uses --no-defines --colored --grouped --annotated --html > myuses.html` + + Alternatively, you can call `pyan` from a script + +diff --git a/pyan/main.py b/pyan/main.py +index 5d079714..b1a16f63 100644 +--- a/pyan/main.py ++++ b/pyan/main.py +@@ -141,6 +141,31 @@ def main(cli_args=None): + ), + ) + ++ parser.add_argument( ++ "--dot-ranksep", ++ default="0.5", ++ dest="ranksep", ++ help=( ++ "specifies the dot graph 'ranksep' property for " ++ "controlling desired rank separation, in inches. " ++ "Allowed values: [0.02 .. 1000.0]. " ++ "[dot only]" ++ ), ++ ) ++ ++ parser.add_argument( ++ "--graphviz-layout", ++ default="dot", ++ dest="layout", ++ help=( ++ "specifies the graphviz 'layout' property for " ++ "the name of the layout algorithm to use. " ++ "Allowed values: ['dot', 'neato', 'fdp', 'sfdp', 'twopi', 'circo']. " ++ "Recommended values: ['dot', 'fdp']. " ++ "[graphviz only]" ++ ), ++ ) ++ + parser.add_argument( + "-a", + "--annotated", +@@ -159,7 +184,12 @@ def main(cli_args=None): + + known_args, unknown_args = parser.parse_known_args(cli_args) + +- filenames = [fn2 for fn in unknown_args for fn2 in glob(fn, recursive=True)] ++ ++ filenames = [] ++ for fn in unknown_args: ++ for fn2 in glob(fn, recursive=True): ++ abs_fn2 = os.path.abspath(fn2) ++ filenames.append(abs_fn2) + + # determine root + if known_args.root is not None: +@@ -203,6 +233,11 @@ def main(cli_args=None): + handler = logging.FileHandler(known_args.logname) + logger.addHandler(handler) + ++ logger.debug(f"[files] {unknown_args}") ++ ++ if root: ++ root = os.path.abspath(root) ++ + v = CallGraphVisitor(filenames, logger=logger, root=root) + + if known_args.function or known_args.namespace: +@@ -222,13 +257,25 @@ def main(cli_args=None): + writer = None + + if known_args.dot: +- writer = DotWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = DotWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.html: +- writer = HTMLWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = HTMLWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.svg: +- writer = SVGWriter(graph, options=["rankdir=" + known_args.rankdir], output=known_args.filename, logger=logger) ++ writer = SVGWriter(graph, options=[ ++ "rankdir=" + known_args.rankdir, ++ "ranksep=" + known_args.ranksep, ++ "layout=" + known_args.layout, ++ ], output=known_args.filename, logger=logger) + + if known_args.tgf: + writer = TgfWriter(graph, output=known_args.filename, logger=logger) +diff --git a/visualize_pyan_architecture.sh b/visualize_pyan_architecture.sh +index 22c63342..81b6ca24 100755 +--- a/visualize_pyan_architecture.sh ++++ b/visualize_pyan_architecture.sh +@@ -2,3 +2,8 @@ + echo -ne "Pyan architecture: generating architecture.{dot,svg}\n" + python3 -m pyan pyan/*.py --no-defines --uses --colored --annotate --dot -V >architecture.dot 2>architecture.log + dot -Tsvg architecture.dot >architecture.svg ++echo -ne "Pyan architecture: generating architecture.{html,graphviz=fdp}\n" ++python3 -m pyan pyan/*.py --no-defines --uses \ ++ --grouped --nested-groups \ ++ --graphviz-layout fdp \ ++ --colored --html > architecture.html diff --git a/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch b/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch new file mode 100644 index 00000000000..81923d7a415 --- /dev/null +++ b/gnu/packages/patches/python-pyan3-fix-positional-arguments.patch @@ -0,0 +1,22 @@ +From 37404bb039bd9c5509b4aec8f61e360dfba50715 Mon Sep 17 00:00:00 2001 +From: Wenxin Ling +Date: Mon, 1 Mar 2021 15:21:16 +0100 +Subject: [PATCH] Fix positional arguments issue for CallGraphVisitor + +--- + pyan/main.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyan/main.py b/pyan/main.py +index 18821a14..5d079714 100644 +--- a/pyan/main.py ++++ b/pyan/main.py +@@ -203,7 +203,7 @@ def main(cli_args=None): + handler = logging.FileHandler(known_args.logname) + logger.addHandler(handler) + +- v = CallGraphVisitor(filenames, logger, root=root) ++ v = CallGraphVisitor(filenames, logger=logger, root=root) + + if known_args.function or known_args.namespace: + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 56920f68c3a..87a90ab6802 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -26232,3 +26232,45 @@ for the Go language tool chain; it adapts to different calling conventions and application binary interfaces (ABIs); it takes care of register allocation; it supports x86_64 instructions up to AVX-512 and SHA.") (license license:bsd-2)))) + +(define-public python-pyan3 + (package + (name "python-pyan3") + (version "1.2.0") + (source + (origin + ;; Source tarball on PyPI lacks tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/Technologicat/pyan") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z")) + (patches (search-patches "python-pyan3-fix-positional-arguments.patch" + "python-pyan3-fix-absolute-path-bug.patch")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Extend PYTHONPATH so the built package will be found. + (setenv "PYTHONPATH" + (string-append (getcwd) ":" (getenv "PYTHONPATH"))) + (invoke "pytest"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-wheel" ,python-wheel))) + (propagated-inputs + `(("python-jinja2" ,python-jinja2))) + (home-page "https://github.com/Technologicat/pyan") + (synopsis "Offline call graph generator for Python 3") + (description "Pyan takes one or more Python source files, performs +a (rather superficial) static analysis, and constructs a directed graph of the +objects in the combined source, and how they define or use each other. The +graph can be output for rendering by GraphViz or yEd.") + (license license:gpl2))) -- cgit v1.3 From 4716d544443f25a4cd1397d9f8deb856e28bb515 Mon Sep 17 00:00:00 2001 From: jgart Date: Thu, 26 Aug 2021 11:15:41 -0400 Subject: gnu: python-greenlet: Update to 1.1.1. * gnu/packages/python-xyz.scm (python-greenlet): Update to 1.1.1. Signed-off-by: Efraim Flashner --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 87a90ab6802..59eb473857f 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14226,13 +14226,13 @@ multiple processes (imagine multiprocessing, billiard, futures, celery etc). (define-public python-greenlet (package (name "python-greenlet") - (version "1.0.0") + (version "1.1.1") (source (origin (method url-fetch) (uri (pypi-uri "greenlet" version)) (sha256 (base32 - "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki")))) + "10gllbrcbazxck84nr7dw3js3gq0rxrsr4kkvy5hg542rms2gwn0")))) (build-system python-build-system) (home-page "https://greenlet.readthedocs.io/") (synopsis "Lightweight in-process concurrent programming") -- cgit v1.3 From bf99f80a1688e2139e1893219faa995b136db530 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 24 Aug 2021 10:00:53 -0400 Subject: gnu: Add python-commentjson. * gnu/packages/python-xyz.scm (python-commentjson): New variable. --- gnu/packages/python-xyz.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 59eb473857f..3215d91bdd5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -53,7 +53,7 @@ ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2018, 2019 Clément Lassieur -;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer +;;; Copyright © 2018, 2019, 2020, 2021 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian ;;; Copyright © 2015, 2018 Pjotr Prins @@ -10134,6 +10134,60 @@ Supported netlink families and protocols include: (define-public python2-wrapt (package-with-python2 python-wrapt)) +(define-public python-commentjson + (package + (name "python-commentjson") + (version "0.9.0") + (source (origin + ;; The PyPI release is missing some test files. + (method git-fetch) + (uri (git-reference + (url "https://github.com/vaidik/commentjson") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl")))) + (build-system python-build-system) + (arguments + `(#:modules ((guix build python-build-system) + (guix build utils) + (ice-9 ftw) + (ice-9 textual-ports)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "setup.py" + (("lark-parser>=0.7.1,<0.8.0") + "lark-parser>=0.7.1")))) + (add-after 'unpack 'delete-unspported-tests + ;; Some tests rely on the 'test' module of Python itself, + ;; which is not available with the Python package in Guix; + ;; remove them. + (lambda _ + ;; XXX: Copied from (guix build dub-build-system). + (define (grep string file-name) + (string-contains (call-with-input-file file-name get-string-all) + string)) + + (with-directory-excursion "commentjson/tests/test_json" + (let* ((dot? (lambda (x) (member x '("." "..")))) + (test-files (scandir "." (negate dot?)))) + (for-each delete-file + (filter (lambda (f) (grep "from test." f)) + test-files))))))))) + (propagated-inputs + `(("python-lark-parser" ,python-lark-parser))) + (native-inputs + `(("python-six" ,python-six))) + (home-page "https://github.com/vaidik/commentjson") + (synopsis "Python library for adding comments to JSON files") + (description "Comment JSON is a Python package that helps you create JSON +files with Python and JavaScript style inline comments. Its API is very +similar to the Python standard library's @code{json} module.") + (license license:expat))) + (define-public python-commonmark (package (name "python-commonmark") -- cgit v1.3 From afcbaadac5d6add0bb493471220d81d4acb630e5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 24 Aug 2021 10:12:16 -0400 Subject: gnu: Add python-resolvelib. * gnu/packages/python-xyz.scm (python-resolvelib): New variable. --- gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3215d91bdd5..83db31a7373 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10188,6 +10188,40 @@ files with Python and JavaScript style inline comments. Its API is very similar to the Python standard library's @code{json} module.") (license license:expat))) +(define-public python-resolvelib + (package + (name "python-resolvelib") + (version "0.7.1") + (source + (origin + ;; Tests are missing from the PyPI release. + (method git-fetch) + (uri (git-reference + (url "https://github.com/sarugaku/resolvelib") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest"))))))) + (native-inputs + `(("python-commentjson" ,python-commentjson) + ("python-packaging" ,python-packaging) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/sarugaku/resolvelib") + (synopsis "Abstract dependencies resolver") + (description "The ResolveLib library provides a @code{Resolver} class that +includes dependency resolution logic.") + (license license:isc))) + (define-public python-commonmark (package (name "python-commonmark") -- cgit v1.3 From 165cbdfdc11a4826b64b42bd15af64b9e5930de4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 24 Aug 2021 20:30:49 -0400 Subject: gnu: Add python-resolvelib-0.5. * gnu/packages/python-xyz.scm (python-resolvelib-0.5): New variable. --- gnu/packages/python-xyz.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 83db31a7373..da27b1755dc 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10222,6 +10222,22 @@ similar to the Python standard library's @code{json} module.") includes dependency resolution logic.") (license license:isc))) +;;; This older version is required by ansible-core. +(define-public python-resolvelib-0.5 + (package/inherit python-resolvelib + (name "python-resolvelib") + (version "0.5.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sarugaku/resolvelib") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la")))))) + (define-public python-commonmark (package (name "python-commonmark") -- cgit v1.3 From 5abe149b4ef5c4c96b692827bd27227bf1af3ddf Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 24 Aug 2021 23:06:49 -0400 Subject: gnu: Add python-ncclient. * gnu/packages/python-xyz.scm (python-ncclient): New variable. --- gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index da27b1755dc..05def693faf 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1414,6 +1414,39 @@ to users of that module.") ;; by the Expat license. (license (list license:isc license:expat)))) +(define-public python-ncclient + (package + (name "python-ncclient") + (version "0.6.12") + (source + (origin + (method git-fetch) ;no tests in PyPI release + (uri (git-reference + (url "https://github.com/ncclient/ncclient") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-lxml" ,python-lxml) + ("python-paramiko" ,python-paramiko))) + (home-page "https://github.com/ncclient/ncclient") + (synopsis "Python library for NETCONF clients") + (description "@code{ncclient} is a Python library that facilitates +client-side scripting and application development around the NETCONF +protocol.") + (license license:asl2.0))) + (define-public python-license-expression (package (name "python-license-expression") -- cgit v1.3 From 97a675df1b6e8b2c83c6e8137123433f981609e8 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 24 Aug 2021 23:15:40 -0400 Subject: gnu: Add python-pyspnego. * gnu/packages/python-xyz.scm (python-pyspnego): New variable. --- gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 05def693faf..beb70c9d844 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5332,6 +5332,42 @@ color scales, and color space conversion easy. It has support for: (define-public python2-spectra (package-with-python2 python-spectra)) +(define-public python-pyspnego + (package + (name "python-pyspnego") + (version "0.1.6") + (source + (origin + (method git-fetch) ;no tests in PyPI release + (uri (git-reference + (url "https://github.com/jborean93/pyspnego") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-mock" ,python-pytest-mock))) + (propagated-inputs + `(("python-cryptography" ,python-cryptography) + ("python-gssapi" ,python-gssapi) + ("python-ruamel.yaml" ,python-ruamel.yaml))) + (home-page "https://github.com/jborean93/pyspnego") + (synopsis "Python SPNEGO library") + (description "The @code{pyspnego} Python library handles Negotiate, NTLM, +Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet +parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human +readable format.") + (license license:expat))) + (define-public python-numpy-documentation (package (name "python-numpy-documentation") -- cgit v1.3 From 1d94000d875fa5372b6562284f15c0c2c90ebaf2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 25 Aug 2021 13:40:53 -0400 Subject: gnu: python-execnet: Update to 1.9.0 and enable tests. * gnu/packages/patches/python-execnet-read-only-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/python-xyz.scm (python-execnet): Update to 1.9.0. [source]: Fix indentation. [arguments]: Enable tests, replacing the default check phase. --- gnu/local.mk | 1 + .../patches/python-execnet-read-only-fix.patch | 77 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 26 ++++---- 3 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 gnu/packages/patches/python-execnet-read-only-fix.patch (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 14cd1cc6ada..ebcb4c82f59 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1635,6 +1635,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ + %D%/packages/patches/python-execnet-read-only-fix.patch \ %D%/packages/patches/python-flask-restful-werkzeug-compat.patch \ %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \ diff --git a/gnu/packages/patches/python-execnet-read-only-fix.patch b/gnu/packages/patches/python-execnet-read-only-fix.patch new file mode 100644 index 00000000000..58a4b129a7c --- /dev/null +++ b/gnu/packages/patches/python-execnet-read-only-fix.patch @@ -0,0 +1,77 @@ +From 0d6562a20b0610c5a83d1c66ac879223b84a2746 Mon Sep 17 00:00:00 2001 +From: Maxim Cournoyer +Date: Thu, 26 Aug 2021 00:43:26 -0400 +Subject: [PATCH] rsync_remote: Fix a problem when receiving read-only + directories. + +Before this change, when the source directories hierarchy was +read-only, the read-only mode would be preserved at the destination, +preventing child directories to be recreated by a normal user (a +permission denied error, EACCES would be raised). + +* execnet/rsync_remote.py (serve_rsync.receive_directory_structure): +Bitwise OR to ensure the write bit is set on received directories. +* testing/test_rsync.py (TestRSync) +: New test. +--- + execnet/rsync_remote.py | 8 ++++++-- + testing/test_rsync.py | 17 +++++++++++++++++ + 2 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/execnet/rsync_remote.py b/execnet/rsync_remote.py +index cd5e765..55d154c 100644 +--- a/execnet/rsync_remote.py ++++ b/execnet/rsync_remote.py +@@ -35,7 +35,11 @@ def serve_rsync(channel): + os.makedirs(path) + mode = msg.pop(0) + if mode: +- os.chmod(path, mode) ++ # Ensure directories are writable, otherwise a ++ # permission denied error (EACCES) would be raised ++ # when attempting to receive read-only directory ++ # structures. ++ os.chmod(path, mode | 0o700) + entrynames = {} + for entryname in msg: + destpath = os.path.join(path, entryname) +@@ -59,7 +63,7 @@ def serve_rsync(channel): + checksum = md5(f.read()).digest() + f.close() + elif msg_mode and msg_mode != st.st_mode: +- os.chmod(path, msg_mode) ++ os.chmod(path, msg_mode | 0o700) + return + else: + return # already fine +diff --git a/testing/test_rsync.py b/testing/test_rsync.py +index 995f229..1d6c30c 100644 +--- a/testing/test_rsync.py ++++ b/testing/test_rsync.py +@@ -157,6 +157,23 @@ class TestRSync: + mode = destdir.stat().mode + assert mode & 511 == 504 + ++ @py.test.mark.skipif("sys.platform == 'win32' or getattr(os, '_name', '') == 'nt'") ++ def test_read_only_directories(self, dirs, gw1): ++ source = dirs.source ++ dest = dirs.dest1 ++ source.ensure("sub", "subsub", dir=True) ++ source.join("sub").chmod(0o500) ++ source.join("sub", "subsub").chmod(0o500) ++ ++ # The destination directories should be created with the write ++ # permission forced, to avoid raising an EACCES error. ++ rsync = RSync(source) ++ rsync.add_target(gw1, dest) ++ rsync.send() ++ ++ assert dest.join("sub").stat().mode & 0o700 ++ assert dest.join("sub").join("subsub").stat().mode & 0o700 ++ + @needssymlink + def test_symlink_rsync(self, dirs, gw1): + source = dirs.source +-- +2.32.0 + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index beb70c9d844..dd1b741310b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -12193,24 +12193,26 @@ pure Python module that works on virtually all Python versions.") (define-public python-execnet (package (name "python-execnet") - (version "1.4.1") + (version "1.9.0") (source (origin - (method url-fetch) - (uri (pypi-uri "execnet" version)) - (sha256 - (base32 - "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn")))) + (method url-fetch) + (uri (pypi-uri "execnet" version)) + (sha256 + (base32 + "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg")) + (patches (search-patches "python-execnet-read-only-fix.patch")))) (build-system python-build-system) (arguments - `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed - ;; The two test failures are caused by the lack of an `ssh` executable. - ;; The test suite can be run with pytest after the 'install' phase. - #:tests? #f)) + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv"))))))) (native-inputs `(("python-pytest" ,python-pytest) ("python-setuptools-scm" ,python-setuptools-scm))) - (propagated-inputs - `(("python-apipkg" ,python-apipkg))) (synopsis "Rapid multi-Python deployment") (description "Execnet provides a share-nothing model with channel-send/receive communication for distributing execution across many -- cgit v1.3 From 3d0fd83f243b7a2fddb02939f7f937ce8fb8965c Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 25 Aug 2021 13:50:52 -0400 Subject: gnu: python-rope: Update to 0.19.0 and remove python2-rope. * gnu/packages/python-xyz.scm (python-rope): Update to 0.19.0. [source]: Fix indentation. [arguments]: Remove. [native-inputs]: Remove. [license]: Correct license. (python2-rope): Delete variable. --- gnu/packages/python-xyz.scm | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index dd1b741310b..917fcf3de69 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14265,39 +14265,25 @@ respectively.") Python. It generates C++ code and a Makefile.")) (license (list license:gpl3 license:bsd-3 license:expat)))) -(define-public python2-rope +(define-public python-rope (package - (name "python2-rope") - (version "0.11.0") + (name "python-rope") + (version "0.19.0") (source (origin - (method url-fetch) - (uri (pypi-uri "rope" version)) - (sha256 + (method url-fetch) + (uri (pypi-uri "rope" version)) + (sha256 (base32 - "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251")))) - (arguments - ;; Rope has only partial python3 support, see `python-rope' - `(#:python ,python-2)) + "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4")))) (build-system python-build-system) - (native-inputs - `(("python2-unittest2" ,python2-unittest2))) (home-page "https://github.com/python-rope/rope") (synopsis "Refactoring library for Python") (description "Rope is a refactoring library for Python. It facilitates the renaming, moving and extracting of attributes, functions, modules, fields and parameters in Python 2 source code. These refactorings can also be applied to occurrences in strings and comments.") - (license license:gpl2))) - -(define-public python-rope - (package/inherit python2-rope - (name "python-rope") - (arguments `(#:python ,python-wrapper - ;; XXX: Only partial python3 support, results in some failing - ;; tests: . - #:tests? #f)) - (properties `((python2-variant . ,(delay python2-rope)))))) + (license license:lgpl3+))) (define-public python-py3status (package -- cgit v1.3 From bece6dd70d5dc7043283f78de158d19c56d89408 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 25 Aug 2021 15:06:08 -0400 Subject: gnu: python-py-next: Update to 1.10.0. * gnu/packages/python-xyz.scm (python-py-next): Update to 1.10.0. --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 917fcf3de69..1d1a6791336 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3070,14 +3070,14 @@ code introspection, and logging.") (define-public python-py-next (package (inherit python-py) - (version "1.9.0") + (version "1.10.0") (source (origin (method url-fetch) (uri (pypi-uri "py" version)) (sha256 (base32 - "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw")))))) + "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11")))))) (define-public python2-py (package-with-python2 python-py)) -- cgit v1.3 From abe1890a5726e5cf1021b408bb5847b2f76f08d8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 27 Aug 2021 14:28:37 +0200 Subject: gnu: Add python-svgutils. * gnu/packages/python-xyz.scm (python-svgutils): New variable. --- gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1d1a6791336..5da58d3f2dc 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -24793,6 +24793,28 @@ For the most part it's transliterated from C, the major differences are: "Jinxed is an implementation of a subset of the Python curses library.") (license license:mpl2.0))) +(define-public python-svgutils + (package + (name "python-svgutils") + (version "0.3.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "svgutils" version)) + (sha256 + (base32 + "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y")))) + (build-system python-build-system) + (propagated-inputs + `(("python-lxml" ,python-lxml))) + (home-page "https://svgutils.readthedocs.io") + (synopsis "Python SVG editor") + (description "This is an utility package that helps with editing and +concatenating SVG files. It is especially directed at scientists preparing +final figures for submission to journals. So far it supports arbitrary +placement and scaling of SVG figures and adding markers, such as labels.") + (license license:expat))) + (define-public python-blessed (package (name "python-blessed") -- cgit v1.3 From 5766296a166152c1e3e97f8a68dff9c9627ea4be Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 29 Aug 2021 20:46:50 +0200 Subject: gnu: Add python-anyio. * gnu/packages/python-xyz.scm (python-anyio): New variable. --- gnu/packages/python-xyz.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5da58d3f2dc..5acd237ac28 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -23036,6 +23036,87 @@ bindings for Python 3.") standard error channel (stderr) in your program.") (license license:expat)))) +(define-public python-anyio + (package + (name "python-anyio") + (version "3.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "anyio" version)) + (sha256 + (base32 + "0x03hsprdrs86wjjkj96zm2jswy3a5bgyrknyi58pzz5hdsscmxf")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-compatibility + (lambda _ + (substitute* "tests/test_taskgroups.py" + (("import pytest") + "import pytest\nimport _pytest\nfrom _pytest import logging") + (("pytest.LogCaptureFixture") + "_pytest.logging.LogCaptureFixture")))) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" + (string-append + "not test_is_block_device" + + ;; These fail because of network (or specifically + ;; IPv6 network) access. + " and not test_accept" + " and not test_accept_after_close" + " and not test_close_during_receive" + " and not test_close_from_other_task" + " and not test_concurrent_receive" + " and not test_concurrent_send" + " and not test_connect_tcp_with_tls" + " and not test_connect_tcp_with_tls_cert_check_fail" + " and not test_connection_refused" + " and not test_extra_attributes" + " and not test_getaddrinfo" + " and not test_getnameinfo" + " and not test_happy_eyeballs" + " and not test_iterate" + " and not test_receive_after_close" + " and not test_receive_timeout" + " and not test_reuse_port" + " and not test_run_process" + " and not test_send_after_close" + " and not test_send_after_eof" + " and not test_send_after_peer_closed" + " and not test_send_eof" + " and not test_send_large_buffer" + " and not test_send_receive" + " and not test_socket_options")))))))) + (propagated-inputs + `(("python-idna" ,python-idna) + ("python-sniffio" ,python-sniffio) + ("python-typing-extensions" ,python-typing-extensions))) + (native-inputs + `(("python-coverage" ,python-coverage) + ("python-hypothesis" ,python-hypothesis) + ("python-iniconfig" ,python-iniconfig) + ("python-mock" ,python-mock) + ("python-pytest" ,python-pytest-6) + ("python-pytest-mock" ,python-pytest-mock-3) + ("python-pytest-trio" ,python-pytest-trio) + ("python-setuptools-scm" ,python-setuptools-scm) + ("python-trustme" ,python-trustme) + ("python-uvloop" ,python-uvloop))) + (home-page "https://github.com/agronholm/anyio") + (synopsis "Compatibility layer for multiple asynchronous event loops") + (description + "AnyIO is an asynchronous networking and concurrency library that works +on top of either asyncio or trio. It implements trio-like structured +concurrency on top of asyncio, and works in harmony with the native SC of trio +itself.") + (license license:expat))) + (define-public python-argh ;; There are 21 commits since the latest release containing important ;; improvements. -- cgit v1.3 From d3364b9c37f0c2ca005e90619ace9b5ed8326cd4 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 30 Aug 2021 18:26:14 +0200 Subject: gnu: python-anndata: Fetch sources from git. * gnu/packages/python-xyz.scm (python-anndata)[source]: Fetch from git to include test data. [arguments]: Enable tests. Do not let setuptools_scm guess the version. --- gnu/packages/python-xyz.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5acd237ac28..577353e65d0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -21386,15 +21386,18 @@ N-dimensional arrays for Python.") (version "0.7.6") (source (origin - (method url-fetch) - (uri (pypi-uri "anndata" version)) + ;; The tarball from PyPi doesn't include tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/theislab/anndata") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "1ch8yp0xmag6z0kl01pljm35lbbwax7lrimfhiclpkd4m6xngk53")))) + "1q30bsfsq9xfqm8nmabg3bjh9gix3yng0170xiiyw1lin4xncf0q")))) (build-system python-build-system) (arguments - `(#:tests? #f ; The tarball from PyPi doesn't include tests. - #:phases + `(#:phases (modify-phases %standard-phases (delete 'check) (add-before 'build 'relax-dependency-requirements @@ -21405,6 +21408,7 @@ N-dimensional arrays for Python.") (("pandas>=1.1.1") "pandas>=1.0.5")))) (replace 'build (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version) ;; ZIP does not support timestamps before 1980. (setenv "SOURCE_DATE_EPOCH" "315532800") (invoke "flit" "build"))) -- cgit v1.3 From 73995969b133e50c04ad8f1e8a1428aef0eadb43 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 31 Aug 2021 21:36:47 +0200 Subject: gnu: Remove python-pytest-mock-3. * gnu/packages/check.scm (python-pytest-mock-3): Remove variable. * gnu/packages/python-xyz.scm (python-anyio)[native-inputs]: Replace python-pytest-mock-3 with python-pytest-mock. --- gnu/packages/check.scm | 27 --------------------------- gnu/packages/python-xyz.scm | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 4e1b8e802cf..b49f9de1576 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1307,33 +1307,6 @@ same arguments.") `(("python2-mock" ,python2-mock) ,@(package-propagated-inputs base)))))) -(define-public python-pytest-mock-3 - (package - (inherit python-pytest-mock) - (version "3.6.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pytest-mock" version)) - (sha256 - (base32 - "0qhfmd05z3g88bnwq6644jl6p5wy01i4yy7h8883z9jjih2pl8a0")))) - (properties '()) - (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - ;; Make the installed plugin discoverable by Pytest. - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" - ;; TODO: these fail for unclear reasons - "-k" - (string-append - "not test_standalone_mock" - " and not test_detailed_introspection_async")))))))))) - (define-public python-pytest-xdist (package (name "python-pytest-xdist") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 577353e65d0..07c9127c190 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -23107,7 +23107,7 @@ standard error channel (stderr) in your program.") ("python-iniconfig" ,python-iniconfig) ("python-mock" ,python-mock) ("python-pytest" ,python-pytest-6) - ("python-pytest-mock" ,python-pytest-mock-3) + ("python-pytest-mock" ,python-pytest-mock) ("python-pytest-trio" ,python-pytest-trio) ("python-setuptools-scm" ,python-setuptools-scm) ("python-trustme" ,python-trustme) -- cgit v1.3 From c4f500d03211d7b4763a5443275e18b54e55f44c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 31 Aug 2021 22:54:14 +0200 Subject: gnu: python-anyio: Avoid failing tests. * gnu/packages/python-xyz.scm (python-anyio)[arguments]: Disable asyncio plugin, and explicitly disable network tests. --- gnu/packages/python-xyz.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 07c9127c190..7be4b6a1ff9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -23066,7 +23066,9 @@ standard error channel (stderr) in your program.") (lambda* (#:key inputs outputs tests? #:allow-other-keys) (when tests? (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv" "-k" + (invoke "pytest" "-vv" "-p" "no:asyncio" + "-m" "not network" + "-k" (string-append "not test_is_block_device" -- cgit v1.3 From 406f726cfb857e8b845a45d38d8f7d04867bd126 Mon Sep 17 00:00:00 2001 From: phodina Date: Tue, 31 Aug 2021 11:15:16 +0000 Subject: gnu: Add date2name. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (date2name): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7be4b6a1ff9..3e839474b6b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -106,6 +106,7 @@ ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Hugo Lecomte ;;; Copyright © 2021 Franck Pérignon +;;; Copyright © 2021 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -26544,3 +26545,39 @@ a (rather superficial) static analysis, and constructs a directed graph of the objects in the combined source, and how they define or use each other. The graph can be output for rendering by GraphViz or yEd.") (license license:gpl2))) + +(define-public date2name + (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798") + (revision "1")) + (package + (name "date2name") + (version (git-version "0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/novoid/date2name") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bindir (string-append (assoc-ref outputs "out") "/bin")) + (binary (string-append bindir "/date2name"))) + (mkdir-p bindir) + (copy-file "date2name/__init__.py" binary) + (chmod binary #o555))))))) + (synopsis "Handling time-stamps and date-stamps in file names") + (description "By default, date2name gets the modification time of matching +files and directories and adds a datestamp in standard ISO 8601+ format +YYYY-MM-DD at the beginning of the file or directory name.") + (home-page "https://github.com/novoid/date2name") + (license license:gpl3+)))) -- cgit v1.3 From 99735609fc1c75c57eba71eaa988ddef4d14029b Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 21 Aug 2021 11:41:44 +0100 Subject: gnu: Remove python2-rfc6555. * gnu/packages/python-xyz.scm (python2-rfc6555): Remove variable. (python-rfc6555)[properties]: Remove field. --- gnu/packages/python-xyz.scm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3e839474b6b..4702453e4dd 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -62,7 +62,7 @@ ;;; Copyright © 2019 Jack Hill ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant ;;; Copyright © 2019, 2020 Alex Griffin -;;; Copyright © 2019, 2020 Pierre Langlois +;;; Copyright © 2019, 2020, 2021 Pierre Langlois ;;; Copyright © 2019 Jacob MacDonald ;;; Copyright © 2019, 2020 Giacomo Leidi ;;; Copyright © 2019 Wiktor Żelazny @@ -18335,16 +18335,8 @@ validation of URIs (see RFC 3986) and IRIs (see RFC 3987).") "Python implementation of the Happy Eyeballs Algorithm described in RFC 6555. Provided with a single file and dead-simple API to allow easy vendoring and integration into other projects.") - (properties `((python2-variant . ,(delay python2-rfc6555)))) (license license:asl2.0)))) -(define-public python2-rfc6555 - (let ((base (package-with-python2 - (strip-python2-variant python-rfc6555)))) - (package/inherit base - (propagated-inputs - `(("python2-selectors2" ,python2-selectors2)))))) - (define-public python-bagit (package (name "python-bagit") -- cgit v1.3 From f6e80d4e1601346878aecc394c0855eda3ed75d9 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 21 Aug 2021 11:42:31 +0100 Subject: gnu: Remove python2-selectors2. * gnu/packages/python-xyz.scm (python2-selectors2): Remove variable. --- gnu/packages/python-xyz.scm | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4702453e4dd..55858fbf8ed 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14319,29 +14319,6 @@ functionality in a modular way, allowing you to extend your panel with your own code, responding to click events and updating clock every second.") (license license:bsd-3))) -(define-public python2-selectors2 - (package - (name "python2-selectors2") - (version "2.0.1") - (source (origin - (method url-fetch) - (uri (pypi-uri "selectors2" version)) - (sha256 - (base32 - "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1")))) - (build-system python-build-system) - (arguments - `(#:python ,python-2)) - (native-inputs - `(("python2-mock" ,python2-mock) - ("python2-psutil" ,python2-psutil))) - (home-page "https://www.github.com/SethMichaelLarson/selectors2") - (synopsis "Backport of the selectors module from Python 3.5+") - (description - "This package provides a drop-in replacement for the @code{selectors} -module in Python 3.5 and later.") - (license license:expat))) - (define-public python-tblib (package (name "python-tblib") -- cgit v1.3 From 8ceb7651c2aff73644a49c1d72fe8b63948f0240 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 2 Sep 2021 09:03:14 +0200 Subject: gnu: python-confuse: Update to 1.5.0. * gnu/packages/python-xyz.scm (python-confuse)[version]: Update to 1.5.0. [propagated-inputs]: Remove python-pathlib. [synopsis]: Remove trailing dot. --- gnu/packages/python-xyz.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 55858fbf8ed..12adafa8927 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -107,6 +107,7 @@ ;;; Copyright © 2021 Hugo Lecomte ;;; Copyright © 2021 Franck Pérignon ;;; Copyright © 2021 Petr Hodina +;;; Copyright © 2021 Simon Streit ;;; ;;; This file is part of GNU Guix. ;;; @@ -25909,20 +25910,19 @@ Qt applications.") (define-public python-confuse (package (name "python-confuse") - (version "1.4.0") + (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "confuse" version)) (sha256 (base32 - "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j")))) + "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj")))) (build-system python-build-system) (propagated-inputs - `(("python-pathlib" ,python-pathlib) - ("python-pyyaml" ,python-pyyaml))) + `(("python-pyyaml" ,python-pyyaml))) (home-page "https://github.com/beetbox/confuse") - (synopsis "Painless YAML configuration.") + (synopsis "Painless YAML configuration") (description "Confuse is a configuration library for Python that uses YAML. It takes care of defaults, overrides, type checking, command-line integration, human-readable errors, and standard OS-specific locations.") -- cgit v1.3 From ddb8852a9beab231e2bbf4e51f8f62a644ff6ad0 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 3 Sep 2021 10:54:18 +0200 Subject: gnu: python-munkres: Update to 1.1.4. * gnu/packages/python-xyz.scm (python-munkres) [version]: Update to 1.1.4. [arguments]: Re-enable test suite. [native-inputs]: Add pytest. --- gnu/packages/python-xyz.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 12adafa8927..3bb75bdadc7 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13670,16 +13670,15 @@ way.") (define-public python-munkres (package (name "python-munkres") - (version "1.0.8") + (version "1.1.4") (source (origin (method url-fetch) (uri (pypi-uri "munkres" version)) (sha256 (base32 - "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq")))) + "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w")))) (build-system python-build-system) - (arguments - '(#:tests? #f)) ; no test suite + (native-inputs `(("python-pytest" ,python-pytest-6))) (home-page "https://software.clapper.org/munkres/") (synopsis "Implementation of the Munkres algorithm") (description "The Munkres module provides an implementation of the Munkres -- cgit v1.3 From 26fe4d77bf4cdbe03bf379f53362ad11394a0cb0 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 3 Sep 2021 10:56:20 +0200 Subject: gnu: python-jellyfish: Update to 0.8.8. * gnu/packages/python-xyz.scm (python-jellyfish)[version]: Update to 0.8.8. [arguments]: Use pytest. [properties]: Remove python2-variant. (python2-jellyfish): Remove, unsupported by upstream. --- gnu/packages/python-xyz.scm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3bb75bdadc7..830c18dd49d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13807,29 +13807,30 @@ ambiguities (forward vs. backward slashes, etc.). (define-public python-jellyfish (package (name "python-jellyfish") - (version "0.5.6") + (version "0.8.8") (source (origin (method url-fetch) (uri (pypi-uri "jellyfish" version)) (sha256 (base32 - "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8")))) + "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5")))) (build-system python-build-system) + (arguments + `(#:tests? #f ; XXX: Tests cannot find C coded version. + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "jellyfish/test.py"))))))) (native-inputs `(("python-pytest" ,python-pytest))) (home-page "https://github.com/jamesturk/jellyfish") (synopsis "Approximate and phonetic matching of strings") (description "Jellyfish uses a variety of string comparison and phonetic encoding algorithms to do fuzzy string matching.") - (license license:bsd-2) - (properties `((python2-variant . ,(delay python2-jellyfish)))))) - -(define-public python2-jellyfish - (let ((jellyfish (package-with-python2 - (strip-python2-variant python-jellyfish)))) - (package/inherit jellyfish - (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv) - ,@(package-native-inputs jellyfish)))))) + (license license:bsd-2))) (define-public python2-unicodecsv (package -- cgit v1.3 From e82b103a776e4816682178432fd278aacc3d4004 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 3 Sep 2021 11:00:24 +0200 Subject: gnu: python-rarfile: Update to 4.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This package is close to useless, because we lack the non-free unrar utility and the libarchive backend does not support most operations. * gnu/packages/python-xyz.scm (python-rarfile)[version]: Update to 4.0. [arguments]: Disable tests. [propagated-inputs]: Move… [inputs]: …here. [native-inputs]: Add pytest. [#:phases]: Use pytest for 'check and Add 'patch phase. (python2-rarfile): Remove, unsupported by upstream. --- gnu/packages/python-xyz.scm | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 830c18dd49d..7c70829de92 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -13910,33 +13910,39 @@ can also be used to get the exact location, font or color of the text.") (define-public python-rarfile (package (name "python-rarfile") - (version "2.8") + (version "4.0") (source (origin (method url-fetch) (uri (pypi-uri "rarfile" version)) (sha256 (base32 - "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra")))) + "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37")))) (build-system python-build-system) (arguments - '(#:phases + `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail. + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "rarfile.py" + ;; Disable unrar and unar, which are unavailable on Guix. + (("(unrar|unar)=True" all tool) (string-append tool "=False")) + ;; Hardcode path to bsdtar + (("\"bsdtar\"") + (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\""))) + #t)) (replace 'check - ;; Many tests fail, but the installation proceeds. - (lambda _ (invoke "make" "-C" "test" "test")))))) - (native-inputs - `(("which" ,which))) ; required for tests - (propagated-inputs - `(("libarchive" ,libarchive))) + (lambda* (#:key inputs tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) + (native-inputs `(("python-pytest" ,python-pytest))) + (inputs `(("libarchive" ,libarchive))) (home-page "https://github.com/markokr/rarfile") (synopsis "RAR archive reader for Python") (description "This is Python module for RAR archive reading. The interface is made as zipfile like as possible.") (license license:isc))) -(define-public python2-rarfile - (package-with-python2 python-rarfile)) - (define-public python-rich (package (name "python-rich") -- cgit v1.3