diff options
| author | Vinicius Monego <monego@posteo.net> | 2025-06-28 12:47:33 -0300 |
|---|---|---|
| committer | Vinicius Monego <monego@posteo.net> | 2025-06-29 00:04:45 -0300 |
| commit | c76b30aaae3316f429ded81db8cc9324e70ea1ed (patch) | |
| tree | be2be6141acc49a510702ee3039df150f5f231f3 /gnu/packages/docker.scm | |
| parent | 4069add1a062aad1f6b69b9b98fb5d02e524cd32 (diff) | |
gnu: python-docker: Enable tests.
* gnu/packages/docker.scm (python-docker)[source]: Fetch from GitHub.
[arguments]: Remove '#:tests? #f'. Skip integration tests in
'#:test-flags'. Add phase 'pretend-version' before 'build'.
[native-inputs]: Add python-pytest.
Change-Id: Ia54e53d94ea3d402c9af7970095c69a18c0d44b3
Diffstat (limited to 'gnu/packages/docker.scm')
| -rw-r--r-- | gnu/packages/docker.scm | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 4f1e6b1cfa4..4f6c5410adb 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm | |||
| @@ -70,15 +70,28 @@ | |||
| 70 | (version "7.1.0") | 70 | (version "7.1.0") |
| 71 | (source | 71 | (source |
| 72 | (origin | 72 | (origin |
| 73 | (method url-fetch) | 73 | (method git-fetch) |
| 74 | (uri (pypi-uri "docker" version)) | 74 | (uri (git-reference |
| 75 | (url "https://github.com/docker/docker-py") | ||
| 76 | (commit version))) | ||
| 77 | (file-name (git-file-name name version)) | ||
| 75 | (sha256 | 78 | (sha256 |
| 76 | (base32 | 79 | (base32 "1dd4p0xfv6vja4mgzwn2yfyna7vi7bc1pr5f59jg9yd4nxj96kmj")))) |
| 77 | "0v7s8q2j0khqcd32h50whgi9jlpanhrbh696m6w6r4pqwgk7135d")))) | ||
| 78 | (build-system pyproject-build-system) | 80 | (build-system pyproject-build-system) |
| 79 | ;; TODO: Tests require a running Docker daemon. | 81 | (arguments |
| 80 | (arguments '(#:tests? #f)) | 82 | (list |
| 81 | (native-inputs (list python-hatch-vcs python-hatchling)) | 83 | ;; Integration tests need a running Docker daemon. |
| 84 | #:test-flags #~(list "--ignore" "tests/integration") | ||
| 85 | #:phases | ||
| 86 | #~(modify-phases %standard-phases | ||
| 87 | (add-before 'build 'pretend-version | ||
| 88 | ;; The version string is usually derived via setuptools-scm, | ||
| 89 | ;; but without the git metadata available, the version string | ||
| 90 | ;; is set to '0.0.0'. | ||
| 91 | (lambda _ | ||
| 92 | (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" | ||
| 93 | #$(package-version this-package))))))) | ||
| 94 | (native-inputs (list python-hatch-vcs python-hatchling python-pytest)) | ||
| 82 | (inputs | 95 | (inputs |
| 83 | (list python-requests python-urllib3)) | 96 | (list python-requests python-urllib3)) |
| 84 | (propagated-inputs | 97 | (propagated-inputs |
