From da3764b75c741132c969d2f9b7812bbcf734a3e2 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Sat, 13 Jan 2024 18:59:57 +0100 Subject: gnu: python-requests-kerberos: Fix build. * gnu/packages/python-web.scm (python-requests-kerberos)[propagated-inputs]: Add python-gssapi. Co-authored-by: Sharlatan Hellseher Signed-off-by: Sharlatan Hellseher Change-Id: I65d1fac0339a119e7a4912d5db150b4adb7586ad --- gnu/packages/python-web.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 567b01f3965..d54a90f8483 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3307,8 +3307,9 @@ than Python’s urllib2 library.") (base32 "1lbgjs779cjxhz07lfl9dbyp3qfh8a3ir2393042wfg518jd3afd")))) (build-system python-build-system) - (propagated-inputs (list python-cryptography python-pyspnego - python-requests)) + (propagated-inputs (list python-cryptography + python-pyspnego + python-requests)) (home-page "https://github.com/requests/requests-kerberos") (synopsis "Kerberos authentication handler for python-requests") (description "This package provides a Kerberos authentication handler for -- cgit v1.3 From 19db1551dc6f6180d2cda9084c2dec37bf4923c9 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Sat, 13 Jan 2024 19:04:38 +0100 Subject: gnu: python-requests-kerberos: Enable tests. * gnu/packages/python-web.scm (python-requests-kerberos): Enable tests. [source]: Replace the PyPI release by the Github release. [build-system]: Swap to pyproject-build-system. [native-inputs]: Add python-pytest and python-pytest-mock. Co-authored-by: Sharlatan Hellseher Signed-off-by: Sharlatan Hellseher Change-Id: Iea750cf722293c4054a6c6e43787806f8f2fd5e2 --- gnu/packages/python-web.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index d54a90f8483..418100c084b 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3300,16 +3300,21 @@ than Python’s urllib2 library.") (package (name "python-requests-kerberos") (version "0.14.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "requests-kerberos" version)) - (sha256 - (base32 - "1lbgjs779cjxhz07lfl9dbyp3qfh8a3ir2393042wfg518jd3afd")))) - (build-system python-build-system) + ;; No tests in the PyPI tarball. + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/requests/requests-kerberos") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0s30pcnlir3j2jmf7yh065f294cf3x0x5i3ldskn8mm0a3657mv3")))) + (build-system pyproject-build-system) (propagated-inputs (list python-cryptography python-pyspnego python-requests)) + (native-inputs (list python-pytest python-pytest-mock)) (home-page "https://github.com/requests/requests-kerberos") (synopsis "Kerberos authentication handler for python-requests") (description "This package provides a Kerberos authentication handler for -- cgit v1.3 From 68763a00a30decdf04c05fcfe62e6d538b1a0bcf Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Sat, 13 Jan 2024 12:26:42 +0100 Subject: gnu: hypercorn: Adjust inputs. * gnu/packages/python-web.scm (hypercorn)[propagated-inputs]: Add python-exceptiongroup and python-tomli. Remove python-toml and python-typing-extensions. [native-inputs]: Remove python-mock. --- gnu/packages/python-web.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 418100c084b..27fa183465b 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2392,15 +2392,14 @@ RFC6455, regardless of your programming paradigm.") (build-system pyproject-build-system) ;; Propagate because Hypercorn also exposes functionality over a module. (propagated-inputs - (list python-h11 + (list python-exceptiongroup + python-h11 python-h2 python-priority - python-toml - python-typing-extensions + python-tomli python-wsproto)) (native-inputs (list python-hypothesis - python-mock python-poetry-core python-pytest python-pytest-asyncio -- cgit v1.3 From eb0f35e16db46642550cddca9f13c7c39f6c2da5 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Sat, 13 Jan 2024 12:40:12 +0100 Subject: gnu: hypercorn: Reformat with guix style. * gnu/packages/python-web.scm (hypercorn): Reformat with guix style. --- gnu/packages/python-web.scm | 46 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 27fa183465b..0c7303fa99c 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -2380,32 +2380,30 @@ RFC6455, regardless of your programming paradigm.") (package (name "hypercorn") (version "0.14.4") - (source (origin - (method git-fetch) ;PyPI does not have tests - (uri (git-reference - (url "https://github.com/pgjones/hypercorn") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0zyf5b8959sd12ycmqzvsb8746i3gn76rz55gxvix5cwj672m7yx")))) + (source + (origin + (method git-fetch) ;PyPI does not have tests + (uri (git-reference + (url "https://github.com/pgjones/hypercorn") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0zyf5b8959sd12ycmqzvsb8746i3gn76rz55gxvix5cwj672m7yx")))) (build-system pyproject-build-system) ;; Propagate because Hypercorn also exposes functionality over a module. - (propagated-inputs - (list python-exceptiongroup - python-h11 - python-h2 - python-priority - python-tomli - python-wsproto)) - (native-inputs - (list python-hypothesis - python-poetry-core - python-pytest - python-pytest-asyncio - python-pytest-cov - python-pytest-trio - python-trio)) + (propagated-inputs (list python-exceptiongroup + python-h11 + python-h2 + python-priority + python-tomli + python-wsproto)) + (native-inputs (list python-hypothesis + python-poetry-core + python-pytest + python-pytest-asyncio + python-pytest-cov + python-pytest-trio + python-trio)) (home-page "https://gitlab.com/pgjones/hypercorn/") (synopsis "ASGI Server based on Hyper libraries") (description -- cgit v1.3 From 05fbafb6a44bc7a1af634c1906f9281caff42093 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 25 Jan 2024 20:48:32 +0100 Subject: gnu: Add python-huggingface-hub. * gnu/packages/python-web.scm (python-huggingface-hub): New variable. Change-Id: I87f668a1ad170fa229902aae5be94e8d4751f38d --- gnu/packages/python-web.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 0c7303fa99c..096c2b2b0f7 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -128,6 +128,92 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (srfi srfi-1)) +(define-public python-huggingface-hub + (package + (name "python-huggingface-hub") + (version "0.20.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/huggingface/huggingface_hub") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00indl9labvqvm4m0y5jbzl68cgj8i60a6qy498gpnjj2pqk4l6v")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; We don't have sentence_transformers... + '(list "--ignore=contrib/sentence_transformers/test_sentence_transformers.py" + ;; ...nor do we have InquirerPy... + "--ignore=tests/test_command_delete_cache.py" + ;; ...or timm... + "--ignore=contrib/timm/test_timm.py" + ;; ...or spacy_huggingface_hub + "--ignore=contrib/spacy/test_spacy.py" + ;; These all require internet access + "--ignore=tests/test_cache_no_symlinks.py" + "--ignore=tests/test_cache_layout.py" + "--ignore=tests/test_commit_scheduler.py" + "--ignore=tests/test_file_download.py" + "--ignore=tests/test_hf_api.py" + "--ignore=tests/test_hf_file_system.py" + "--ignore=tests/test_inference_api.py" + "--ignore=tests/test_inference_async_client.py" + "--ignore=tests/test_inference_client.py" + "--ignore=tests/test_login_utils.py" + "--ignore=tests/test_offline_utils.py" + "--ignore=tests/test_repocard.py" + "--ignore=tests/test_repository.py" + "--ignore=tests/test_snapshot_download.py" + "--ignore=tests/test_utils_cache.py" + "--ignore=tests/test_utils_git_credentials.py" + "--ignore=tests/test_utils_http.py" + "--ignore=tests/test_utils_pagination.py" + "--ignore=tests/test_webhooks_server.py") + #:phases + '(modify-phases %standard-phases + (add-before 'check 'pre-check + ;; Some tests need to write to HOME. + (lambda _ (setenv "HOME" "/tmp")))))) + (propagated-inputs + (list python-filelock + python-fsspec + python-packaging + python-pyyaml + python-requests + python-tqdm + python-typing-extensions)) + (native-inputs + (list python-aiohttp + python-fastapi + python-jedi + python-jinja2 + python-mypy + python-numpy + python-pillow + python-pydantic + python-pytest + python-pytest-asyncio + python-pytest-cov + python-pytest-env + python-pytest-rerunfailures + python-pytest-vcr + python-pytest-xdist + python-types-requests + python-types-toml + python-types-urllib3 + python-typing-extensions + python-urllib3)) + (home-page "https://github.com/huggingface/huggingface_hub") + (synopsis "Client library for accessing the huggingface.co hub") + (description + "This package provides a client library to download and publish models, +datasets and other repos on the @url{huggingface.co} hub.") + (license license:asl2.0))) + (define-public python-lazr-restfulclient (package (name "python-lazr-restfulclient") -- cgit v1.3 From d6c394d6a177fdaf6b28f82a9dd2163633e5eeee Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 25 Jan 2024 20:48:37 +0100 Subject: gnu: python-pyscss: Update to 1.4.0. * gnu/packages/python-web.scm (python-pyscss): Update to 1.4.0. [source]: Remove snippet. [arguments]: Remove; enable tests. Change-Id: I954baf228e6e343b616b6a0eb15742920873f31d --- gnu/packages/python-web.scm | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 096c2b2b0f7..0c0cc46e5fe 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -1440,32 +1440,17 @@ Encryption} (JOSE) Web Standards.") (define-public python-pyscss (package (name "python-pyscss") - (version "1.3.7") + (version "1.4.0") (source (origin (method git-fetch) ; no tests in PyPI release (uri (git-reference (url "https://github.com/Kronuz/pyScss") - (commit version))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0701hziiiw67blafgpmjhzspmrss8mfvif7fw0rs8fikddwwc9g6")) - (snippet - #~(begin (use-modules (guix build utils)) - (substitute* "scss/types.py" - (("from collections import Iterable") - "from collections.abc import Iterable")))))) - (build-system python-build-system) - (arguments - ;; XXX: error in test collection, possible incompatibility with Pytest 6. - `(#: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 "python" "-m" "pytest" "--pyargs" "scss"))))))) + (base32 "1vinddg8sbh3v9n1r1wmvjx6ydk8xp7scbvhb3csl4y9xz7vhk6g")))) + (build-system pyproject-build-system) (native-inputs (list python-pytest python-pytest-cov)) (inputs -- cgit v1.3