diff options
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 177 |
1 files changed, 155 insertions, 22 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index bf8c66d571..3143d8fd99 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5938,7 +5938,6 @@ flexibility and power of the Python language.") (string-append "-Wl," "-rpath=" python "/lib") "-fno-semantic-interposition" "build/temp/tree/tree.o" - "-Wl,--whole-archive" "-L" (string-append python "/lib") (string-append abseil-cpp "/lib/libabsl_int128.a") (string-append abseil-cpp "/lib/libabsl_raw_hash_set.a") @@ -5946,7 +5945,6 @@ flexibility and power of the Python language.") (string-append abseil-cpp "/lib/libabsl_strings.a") (string-append abseil-cpp "/lib/libabsl_strings_internal.a") (string-append abseil-cpp "/lib/libabsl_throw_delegate.a") - "-Wl,--no-whole-archive" "-o" "build/lib/tree/_tree.so"))))))) (home-page "https://github.com/deepmind/tree") (synopsis "Work with nested data structures in Python") @@ -11024,6 +11022,34 @@ MEDLINE XML repository.") abstract syntax tree (AST) nodes without side effects.") (license license:expat))) +(define-public python-ast-decompiler + (package + (name "python-ast-decompiler") + (version "0.7.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ast_decompiler" version)) + (sha256 + (base32 "0dw3fck4ajilphqw4hdpa8pmqxg3jfk2xkmjnk3kx5pqwl3sbhzg")) + ;; We need to manually create an __init__.py file under the tests/ + ;; directory, since it is not included in the distributed + ;; version. (See: + ;; https://github.com/JelleZijlstra/ast_decompiler/issues/52). + (modules '((guix build utils))) + (snippet '(call-with-output-file "tests/__init__.py" + (const #t))))) + (build-system pyproject-build-system) + (native-inputs (list python-flit-core python-pytest)) + (home-page "https://github.com/JelleZijlstra/ast_decompiler") + (synopsis + "Decompile an @acronym{AST, Abstract Syntax Tree} to Python code") + (description + "This library provides functionality to decompile @acronym{AST, Abstract +Syntax Tree} objects, as generated by the standard library @code{ast} module, +to Python code.") + (license license:asl2.0))) + (define-public python-asttokens (package (name "python-asttokens") @@ -13102,13 +13128,13 @@ TODO notes checker plugin for flake8.") (define-public python-flake8-isort (package (name "python-flake8-isort") - (version "4.1.1") + (version "6.1.0") (source (origin (method url-fetch) (uri (pypi-uri "flake8-isort" version)) (sha256 - (base32 "05r7z0j9rqgy0a9261bhisairrz6w8hy5hy5kf2mhvhfnx53056q")))) + (base32 "0gk4q504v42hdzpkndczc0kkwnr85jn1h5pvb561jh65p91r6qyl")))) (build-system python-build-system) (arguments (list @@ -13117,8 +13143,8 @@ TODO notes checker plugin for flake8.") (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "pytest" "-vv"))))))) - (propagated-inputs (list python-flake8 python-isort python-testfixtures)) + (invoke "pytest" "-vv" "run_tests.py"))))))) + (propagated-inputs (list python-flake8 python-isort)) (native-inputs (list python-pytest)) (home-page "https://github.com/gforcada/flake8-isort") (synopsis "Flake8 plugin integrating isort") @@ -17504,28 +17530,47 @@ designed to work across multiple versions of Python.") (define-public python-cookiecutter (package (name "python-cookiecutter") - (version "1.7.3") + (version "2.5.0") (source (origin (method url-fetch) (uri (pypi-uri "cookiecutter" version)) (sha256 - (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb")))) + (base32 "1v1iafk8j2f5cciw9mf4263v91070c6z049cpnw42gwffhs907p6")))) (build-system python-build-system) - (native-inputs - (list python-freezegun python-pytest python-pytest-catchlog - python-pytest-cov python-pytest-mock)) - (propagated-inputs - (list python-binaryornot - python-click - python-future - python-jinja2 - python-jinja2-time - python-poyo - python-requests - python-slugify - python-text-unidecode - python-whichcraft)) + (arguments + (list + #:phases #~(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda _ + ;; test_get_user_config.py requires a writable home + ;; directory. + (setenv "HOME" + (getcwd)) + ;; test_hooks.py dynamically creates shell scripts + ;; with a /bin/bash shebang. We have to patch these. + (substitute* "tests/test_hooks.py" + (("/bin/bash") + (string-append #$(this-package-native-input + "bash-minimal") "/bin/bash"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) + (native-inputs (list bash-minimal + git + python-freezegun + python-pytest + python-pytest-cov + python-pytest-mock)) + (propagated-inputs (list python-arrow + python-binaryornot + python-click + python-jinja2 + python-pyyaml + python-requests + python-rich + python-slugify)) (home-page "https://github.com/cookiecutter/cookiecutter") (synopsis "Command-line utility that creates projects from project templates") @@ -20262,6 +20307,31 @@ etc.") support.") (license license:bsd-3))) +(define-public python-pymemcache + (package + (name "python-pymemcache") + (version "4.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pymemcache" version)) + (sha256 + (base32 "157z9blr8pjg9x84jph5hm0z2l6yaq6n421jcf1hzqn1pg8rpgr7")))) + (build-system pyproject-build-system) + (arguments + ;; We don't have the zstd module. + (list + #:test-flags + '(list "--ignore=pymemcache/test/test_compression.py"))) + (native-inputs + (list python-faker python-pytest python-pytest-cov)) + (home-page "https://github.com/pinterest/pymemcache") + (synopsis "Comprehensive, fast, pure Python memcached client") + (description + "This package provides a comprehensive, fast, pure Python memcached +client.") + (license license:asl2.0))) + (define-public python-pymodbus (package (name "python-pymodbus") @@ -34102,6 +34172,46 @@ package. It can be used by type-checking tools like mypy, PyCharm, pytype etc. to check code that uses @code{orjson}.") (license license:asl2.0))) +(define-public python-rpds-py + (package + (name "python-rpds-py") + (version "0.10.6") + (source (origin + (method url-fetch) + (uri (pypi-uri "rpds_py" version)) + (sha256 + (base32 + "0l5slkvhq2vf64mapimmj6ginsv01mc4niyj90vvz3assq4agrac")))) + (build-system cargo-build-system) + (arguments + (list + #:imported-modules `(,@%cargo-build-system-modules + ,@%pyproject-build-system-modules) + #:modules '((guix build cargo-build-system) + ((guix build pyproject-build-system) #:prefix py:) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-after 'prepare-python-module 'build-python-module + (assoc-ref py:%standard-phases 'build)) + (add-after 'build-python-module 'install-python-module + (assoc-ref py:%standard-phases 'install))) + #:cargo-inputs + `(("rust-archery" ,rust-archery-1) + ("rust-pyo3" ,rust-pyo3-0.19) + ("rust-rpds" ,rust-rpds-1)) + #:install-source? #false)) + (inputs + (list maturin)) + (native-inputs + (list python-wrapper)) + (home-page "https://github.com/crate-py/rpds") + (synopsis "Bindings to Rust rpds for persistent data structures") + (description "This package provides Python bindings to the Rust rpds crate +for persistent data structures. It was written initially to support replacing +@code{python-pyrsistent}.") + (license license:expat))) + (define-public python-nanoid ;; There are no tests on PyPi. (let ((commit "061f9a598f310b0e2e91b9ed6ce725a22770da64") @@ -34422,6 +34532,29 @@ The database contains over 6.5 million entries, over 3.1 million unique word forms, and about 300,000 distinct lemmas.") (license license:expat))) +(define-public python-icegrams + (package + (name "python-icegrams") + (version "1.1.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "icegrams" version)) + (sha256 + (base32 "1ajcjngvr4rlgb0q6p6vjz2sncwhvq3msjy6qaiz5g37vgvw2ij8")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-cffi)) + (home-page "https://github.com/mideind/Icegrams") + (synopsis "Trigram statistics for Icelandic") + (description + "Icegrams is a Python package that encapsulates a large trigram +library for Icelandic. You can use Icegrams to obtain probabilities (relative +frequencies) of over a million different unigrams (single words or tokens), or of +bigrams (pairs of two words or tokens), or of trigrams. Icegrams is useful for +instance in spelling correction, predictive typing, to help disabled people +write text fast, and for various text generation, statistics, and modeling tasks.") + (license license:expat))) + (define-public python-zeroc-ice-3.6 (package (inherit python-zeroc-ice) |