diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-04-16 20:28:26 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-04-16 20:34:13 +0100 |
| commit | 6f6e795316546894beaa5898298177df5988ec09 (patch) | |
| tree | 043ef4ac0088204a1f4d8430fb45ba6a39a86524 /gnu/packages/python-web.scm | |
| parent | 6dd0d0fd9074b0afe83df5b9708a35cf4e222e18 (diff) | |
gnu: grip: Fix build.
* gnu/packages/python-web.scm (grip): Fix build and refresh package style.
[build-system]: Switch to pyproject.
[arguments] <test-flags>: Ignore all tests requiring networking.
<phases>: Add 'fix-response-encoding; use default 'check.
[native-inputs]: Add python-setuptools, and python-wheel.
[description]: Fix fill column indentation.
Change-Id: I131ab5efa965760f05411c7dbdb2349d9e8cbcc3
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 77 |
1 files changed, 45 insertions, 32 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index e05ac255632..8fe9f589788 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -7771,46 +7771,59 @@ with GitLab instances through their API.") | |||
| 7771 | interfaces, inferring which argument is the path, and which is the address.") | 7771 | interfaces, inferring which argument is the path, and which is the address.") |
| 7772 | (license license:expat))) | 7772 | (license license:expat))) |
| 7773 | 7773 | ||
| 7774 | ;; XXX: This project missed maintainer upstream, see | ||
| 7775 | ;; <https://github.com/joeyespo/grip/issues/387>. | ||
| 7776 | ;; Consider to remove if it keeps failing to build. | ||
| 7774 | (define-public grip | 7777 | (define-public grip |
| 7775 | (package | 7778 | (package |
| 7776 | (name "grip") | 7779 | (name "grip") |
| 7777 | (version "4.6.1") | 7780 | (version "4.6.1") |
| 7778 | (source (origin | 7781 | (source |
| 7779 | (method git-fetch) | 7782 | (origin |
| 7780 | (uri (git-reference | 7783 | (method git-fetch) |
| 7781 | (url "https://github.com/joeyespo/grip") | 7784 | (uri (git-reference |
| 7782 | (commit (string-append "v" version)))) | 7785 | (url "https://github.com/joeyespo/grip") |
| 7783 | (file-name (git-file-name name version)) | 7786 | (commit (string-append "v" version)))) |
| 7784 | (sha256 | 7787 | (file-name (git-file-name name version)) |
| 7785 | (base32 | 7788 | (sha256 |
| 7786 | "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8")))) | 7789 | (base32 "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8")))) |
| 7787 | (build-system python-build-system) | 7790 | (build-system pyproject-build-system) |
| 7788 | (propagated-inputs (list python-docopt | ||
| 7789 | python-flask | ||
| 7790 | python-markdown | ||
| 7791 | python-path-and-address | ||
| 7792 | python-pygments | ||
| 7793 | python-requests)) | ||
| 7794 | (native-inputs (list python-pytest python-responses)) | ||
| 7795 | (arguments | 7791 | (arguments |
| 7796 | (list #:phases | 7792 | (list |
| 7797 | #~(modify-phases %standard-phases | 7793 | #:test-flags |
| 7798 | (replace 'check | 7794 | ;; All tests fail requiring network access, ignore the whole file. |
| 7799 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) | 7795 | #~(list "--ignore=tests/test_github.py") |
| 7800 | (when tests? | 7796 | #:phases |
| 7801 | (add-installed-pythonpath inputs outputs) | 7797 | #~(modify-phases %standard-phases |
| 7802 | (setenv "PATH" | 7798 | ;; This fixes the removal of `charset` attribute of requests from |
| 7803 | (string-append (getenv "PATH") ":" | 7799 | ;; Werkzeug 2.3.0. |
| 7804 | #$output "/bin")) | 7800 | ;; Fixed in grip's commit <2784eb2c1515f1cdb1554d049d48b3bff0f42085>. |
| 7805 | (invoke "py.test" "-m" "not assumption"))))))) | 7801 | (add-after 'unpack 'fix-response-encoding |
| 7802 | (lambda _ | ||
| 7803 | (substitute* "grip/app.py" | ||
| 7804 | (("response.charset") | ||
| 7805 | "getattr(response, 'charset', 'utf-8')"))))))) | ||
| 7806 | (native-inputs | ||
| 7807 | (list nss-certs-for-test | ||
| 7808 | python-pytest | ||
| 7809 | python-responses | ||
| 7810 | python-setuptools | ||
| 7811 | python-wheel)) | ||
| 7812 | (propagated-inputs | ||
| 7813 | (list python-docopt | ||
| 7814 | python-flask | ||
| 7815 | python-markdown | ||
| 7816 | python-path-and-address | ||
| 7817 | python-pygments | ||
| 7818 | python-requests)) | ||
| 7806 | (home-page "https://github.com/joeyespo/grip") | 7819 | (home-page "https://github.com/joeyespo/grip") |
| 7807 | (synopsis "Preview Markdown files using the GitHub API") | 7820 | (synopsis "Preview Markdown files using the GitHub API") |
| 7808 | (description | 7821 | (description |
| 7809 | "Grip is a command-line server application written in Python | 7822 | "Grip is a command-line server application written in Python that uses |
| 7810 | that uses the GitHub Markdown API to render a local Markdown file. The styles | 7823 | the GitHub Markdown API to render a local Markdown file. The styles and |
| 7811 | and rendering come directly from GitHub, so you'll know exactly how it will | 7824 | rendering come directly from GitHub, so you'll know exactly how it will |
| 7812 | appear. Changes you make to the file will be instantly reflected in the browser | 7825 | appear. Changes you make to the file will be instantly reflected in the |
| 7813 | without requiring a page refresh.") | 7826 | browser without requiring a page refresh.") |
| 7814 | (license license:expat))) | 7827 | (license license:expat))) |
| 7815 | 7828 | ||
| 7816 | (define-public python-port-for | 7829 | (define-public python-port-for |
