From a23cd8d9c3bb9b1e7e5fa4558b9d2ef116b193e7 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Sat, 16 May 2020 17:24:16 +0800 Subject: gnu: Add python-pytidylib. * gnu/packages/python-xyz.scm (python-pytidylib, python2-pytidylib): New variables. --- 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 657ebabe93..c26a766d64 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -19862,3 +19862,36 @@ module. @code{cmd2} provides a wealth of features on top of @code{cmd} to make your life easier and eliminates much of the boilerplate code which would be necessary when using @code{cmd}.") (license license:expat))) + +(define-public python-pytidylib + (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) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-before 'build 'qualify-libtidy + (lambda* (#:key inputs #:allow-other-keys) + (let ((libtidy (string-append (assoc-ref inputs "tidy") + "/lib/libtidy.so"))) + (substitute* "tidylib/tidy.py" + (("ctypes\\.util\\.find_library\\('tidy'\\)") + (format #f "'~a'" libtidy))) + #t)))))) + (inputs `(("tidy" ,tidy))) + (home-page "https://github.com/countergram/pytidylib") + (synopsis "Python wrapper for HTML Tidy library") + (description + "PyTidyLib is a Python package that wraps the HTML Tidy library. This +allows you, from Python code, to “fix” invalid (X)HTML markup.") + (license license:expat))) + +(define-public python2-pytidylib + (package-with-python2 python-pytidylib)) -- cgit v1.2.3 From 64d1d2b271babed83afaabf034dac67bbae3a364 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 19 May 2020 13:50:04 +0300 Subject: gnu: Add python-mujson. * gnu/packages/python-xyz.scm (python-mujson): New variable. --- gnu/packages/python-xyz.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c26a766d64..8532de9873 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -19895,3 +19895,21 @@ allows you, from Python code, to “fix” invalid (X)HTML markup.") (define-public python2-pytidylib (package-with-python2 python-pytidylib)) + +(define-public python-mujson + (package + (name "python-mujson") + (version "1.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mujson" version)) + (sha256 + (base32 + "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97")))) + (build-system python-build-system) + (home-page "https://github.com/mattgiles/mujson") + (synopsis "Use the fastest JSON functions available at import time") + (description "This packages selects the fastest JSON functions available +at import time.") + (license license:expat))) -- cgit v1.2.3 From 3d41d5dfef6e5b5383c02057db64443b895ae43d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 19 May 2020 14:44:26 +0300 Subject: gnu: python-jsonrpc-server: Update to 0.3.4. * gnu/packages/python-xyz.scm (python-jsonrpc-server): Update to 0.3.4. [propagated-inputs]: Remove python-future. --- 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 8532de9873..e8f8d45cb4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3720,18 +3720,17 @@ Language (TOML) configuration files.") (define-public python-jsonrpc-server (package (name "python-jsonrpc-server") - (version "0.3.2") + (version "0.3.4") (source (origin (method url-fetch) (uri (pypi-uri "python-jsonrpc-server" version)) (sha256 (base32 - "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05")))) + "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7")))) (build-system python-build-system) (propagated-inputs - `(("python-future" ,python-future) - ("python-mock" ,python-mock) + `(("python-mock" ,python-mock) ("python-pytest" ,python-pytest) ("python-ujson" ,python-ujson))) (home-page -- cgit v1.2.3 From cc831310068de54ebad0da9f1b92030aacde3648 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 19 May 2020 14:21:44 +0300 Subject: gnu: python-ujson: Update to 2.0.3. * gnu/packages/python-xyz.scm (python-ujson): Update to 2.0.3. [source]: Remove bundled source. [arguments]: Add phase to link to system double-conversion. Add custom 'check phase. [native-inputs]: Add double-conversion, python-setuptools-scm, python-pytest. [home-page]: Update to new home-page. [description]: Drop reference to python-2 support. (python-ujson-1): New variable. (python2-ujson): Rename to python2-ujson-1. (python-jsonrpc-server)[propagated-inputs]: Replace python-ujson with python-ujson-1. --- gnu/packages/python-xyz.scm | 59 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 8 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e8f8d45cb4..7c5b265f96 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3732,7 +3732,7 @@ Language (TOML) configuration files.") (propagated-inputs `(("python-mock" ,python-mock) ("python-pytest" ,python-pytest) - ("python-ujson" ,python-ujson))) + ("python-ujson" ,python-ujson-1))) (home-page "https://github.com/palantir/python-jsonrpc-server") (synopsis "JSON RPC 2.0 server library") @@ -18323,6 +18323,50 @@ services to what you expect in your tests.") (define-public python-ujson (package (name "python-ujson") + (version "2.0.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ujson" version)) + (sha256 + (base32 + "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx")) + (modules '((guix build utils))) + (snippet + '(begin (delete-file-recursively "deps") #t)))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'link-to-system-double-conversion + (lambda* (#:key inputs #:allow-other-keys) + (let ((d-c (assoc-ref inputs "double-conversion"))) + (substitute* "setup.py" + (("./deps/double-conversion/double-conversion\"") + (string-append d-c "/include/double-conversion\"")) + (("-lstdc++" stdc) + (string-append "-L" d-c "/lib\"," + " \"-ldouble-conversion\"," + " \"" stdc))) + #t))) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest")))))) + (native-inputs + `(("double-conversion" ,double-conversion) + ("python-setuptools-scm" ,python-setuptools-scm) + ("python-pytest" ,python-pytest))) + (home-page "https://github.com/ultrajson/ultrajson") + (synopsis "Ultra fast JSON encoder and decoder for Python") + (description + "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with +bindings for Python 3.") + (license license:bsd-3))) + +(define-public python-ujson-1 + (package + (inherit python-ujson) (version "1.35") (source (origin @@ -18331,17 +18375,16 @@ services to what you expect in your tests.") (sha256 (base32 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n")))) - (build-system python-build-system) + (arguments + '(#:phases %standard-phases)) + (native-inputs '()) (home-page "http://www.esn.me") - (synopsis - "Ultra fast JSON encoder and decoder for Python") (description "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with - bindings for Python 2.5+ and 3.") - (license license:bsd-3))) +bindings for Python 2.5+ and 3."))) -(define-public python2-ujson - (package-with-python2 python-ujson)) +(define-public python2-ujson-1 + (package-with-python2 python-ujson-1)) (define-public python-iocapture ;; The latest release is more than a year older than this commit. -- cgit v1.2.3 From 0645a24b5621e34c39ef27a24789d95934cf40b7 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 20 May 2020 00:45:23 +0200 Subject: gnu: python-ply: Update to 3.11. * gnu/packages/python-xyz.scm (python-ply): Update to 3.11. --- 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 7c5b265f96..67e6a6f93b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11395,14 +11395,14 @@ network support library.") (define-public python-ply (package (name "python-ply") - (version "3.10") + (version "3.11") (source (origin (method url-fetch) (uri (pypi-uri "ply" version)) (sha256 (base32 - "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn")))) + "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0")))) (build-system python-build-system) (home-page "http://www.dabeaz.com/ply/") (synopsis "Python Lex & Yacc") -- cgit v1.2.3 From 5a4d48af52e28e97eac07c40548764ffe03dd6b4 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 20 May 2020 00:45:54 +0200 Subject: gnu: python-ply: Remove Python 2 variant. * gnu/packages/python-xyz.scm (python2-ply): Remove variable. --- gnu/packages/python-xyz.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 67e6a6f93b..1f96ed4391 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11410,9 +11410,6 @@ network support library.") It uses LR parsing and does extensive error checking.") (license license:bsd-3))) -(define-public python2-ply - (package-with-python2 python-ply)) - (define-public python-tabulate (package (name "python-tabulate") -- cgit v1.2.3 From 9b65cdd902ec39115dbf3e0ad34e49f544ab4267 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 19 May 2020 09:46:49 +0200 Subject: gnu: python-shouldbe: Python 3.8 compatibility. * gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch: Add compatibility patch. * gnu/local.mk (dist_patch_DATA): Add new file. * gnu/packages/python-xyz.scm (python-shouldbe)[source]: Add patch. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + .../patches/python-shouldbe-0.1.2-cpy3.8.patch | 82 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 3 +- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 8d737f211e..91f094ce0f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1434,6 +1434,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-honor-source-date-epoch.patch \ + %D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \ %D%/packages/patches/python-slugify-depend-on-unidecode.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ diff --git a/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch new file mode 100644 index 0000000000..f3b56e42d6 --- /dev/null +++ b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch @@ -0,0 +1,82 @@ +Fix compatibility with Python 3.8. + +Upstream issue: https://github.com/DirectXMan12/should_be/pull/5 + +diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/core.py shouldbe-0.1.2.patched/should_be/core.py +--- shouldbe-0.1.2/should_be/core.py 2019-03-06 07:38:22.000000000 +0100 ++++ shouldbe-0.1.2.patched/should_be/core.py 2020-05-18 08:44:24.214664704 +0200 +@@ -103,7 +103,7 @@ + return resf + + +-def buildCode(baseCode, argcount=None, kwonlyargcount=None, ++def buildCode(baseCode, argcount=None, posonlyargcount=None, kwonlyargcount=None, + nlocals=None, stacksize=None, flags=None, + code=None, consts=None, names=None, + varnames=None, filename=None, name=None, +@@ -121,6 +121,24 @@ + nlocals or baseCode.co_nlocals, + stacksize or baseCode.co_stacksize, + flags or baseCode.co_flags, ++ code or baseCode.co_code, ++ consts or baseCode.co_consts, ++ names or baseCode.co_names, ++ varnames or baseCode.co_varnames, ++ filename or baseCode.co_filename, ++ name or baseCode.co_name, ++ firstlineno or baseCode.co_firstlineno, ++ lnotab or baseCode.co_lnotab, ++ freevars or baseCode.co_freevars, ++ cellvars or baseCode.co_cellvars) ++ elif hasattr(baseCode, 'co_posonlyargcount'): ++ # Python 3.8 ++ resc = CodeType(argcount or baseCode.co_argcount, ++ posonlyargcount or baseCode.co_posonlyargcount, ++ kwonlyargcount or baseCode.co_kwonlyargcount, ++ nlocals or baseCode.co_nlocals, ++ stacksize or baseCode.co_stacksize, ++ flags or baseCode.co_flags, + code or baseCode.co_code, + consts or baseCode.co_consts, + names or baseCode.co_names, +diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/tests/test_container_mixin.py shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py +--- shouldbe-0.1.2/should_be/tests/test_container_mixin.py 2019-03-01 06:38:16.000000000 +0100 ++++ shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py 2020-05-18 09:00:51.372531064 +0200 +@@ -7,31 +7,31 @@ + self.lst = [1, 2, 3] + + def test_should_include_iter(self): +- err_msg = (r'[a-zA-Z0-9.]+ should have included \[.+?\]' ++ err_msg = (r'[a-zA-Z0-9.()]+ should have included \[.+?\]' + r', but did not have items .+') +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.should_include, [4]) + + self.lst.should_include([1, 2, 3]) + + def test_should_include_item(self): +- err_msg = (r'[a-zA-Z0-9.]+ should have included .+?' ++ err_msg = (r'[a-zA-Z0-9.()]+ should have included .+?' + r', but did not') +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.should_include, 4) + + self.lst.should_include(3) + + def test_shouldnt_include_iter(self): + err_msg = 'should not have included' +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.shouldnt_include, [2, 3]) + + self.lst.shouldnt_include([4, 5]) + + def test_shouldnt_include_item(self): + err_msg = 'should not have included' +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.shouldnt_include, 3) + + self.lst.shouldnt_include(4) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1f96ed4391..a0f44dde8b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -18788,7 +18788,8 @@ and cuts down boilerplate code when testing libraries for asyncio.") (uri (pypi-uri "shouldbe" version)) (sha256 (base32 - "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")))) + "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")) + (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch")))) (build-system python-build-system) (propagated-inputs `(("python-forbiddenfruit" ,python-forbiddenfruit))) -- cgit v1.2.3 From 0523ab2cb28c4700620952a451e1aaa61cd7924b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 21 May 2020 04:54:40 +0200 Subject: gnu: python-apipkg: Remove Python 2 variant. * gnu/packages/python-xyz.scm (python2-apipkg): Remove variable. --- gnu/packages/python-xyz.scm | 3 --- 1 file changed, 3 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a0f44dde8b..02e406e5f5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -9495,9 +9495,6 @@ pure Python module that works on virtually all Python versions.") (home-page "https://github.com/pytest-dev/apipkg") (license license:expat))) -(define-public python2-apipkg - (package-with-python2 python-apipkg)) - (define-public python-execnet (package (name "python-execnet") -- cgit v1.2.3 From b3200505efd1e77c5b3213d6afd61e30eb5ca691 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 21 May 2020 04:53:44 +0200 Subject: gnu: python-apipkg: Update to 1.5. * gnu/packages/python-xyz.scm (python-apipkg): Update to 1.5. [native-inputs]: Add python-setuptools-scm. --- gnu/packages/python-xyz.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 02e406e5f5..5c0f0bda82 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -9478,16 +9478,17 @@ applications.") (define-public python-apipkg (package (name "python-apipkg") - (version "1.4") + (version "1.5") (source (origin (method url-fetch) (uri (pypi-uri "apipkg" version)) (sha256 (base32 - "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f")))) + "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip")))) (build-system python-build-system) (native-inputs - `(("python-pytest" ,python-pytest))) + `(("python-pytest" ,python-pytest) + ("python-setuptools-scm" ,python-setuptools-scm))) (synopsis "Namespace control and lazy-import mechanism") (description "With apipkg you can control the exported namespace of a Python package and greatly reduce the number of imports for your users. It is a small -- cgit v1.2.3