[PATCH 0/5] Improve python-django-4.2 phases.

  • Open
  • quality assurance status badge
Details
One participant
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 24 Sep 2023 12:18
[PATCH 0/5] Improve python-django-4.2 phases.
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
cover.1695550514.git.ngraves@ngraves.fr
This patch series introduces simple improvements to the
python-django-4.2 package.

Nicolas Graves (5):
gnu: python-django-4.2: Use test-flags argument.
gnu: python-django-4.2: Comment formatting.
gnu: python-django-4.2: Add --failfast to test-flags.
gnu: python-django-4.2: Use pyproject-build-system.
gnu: python-django-4.2: Simpler unittest skip.

gnu/packages/django.scm | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)


base-commit: f45c0c82289d409b4fac00464ea8b323839ba53f
prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2
prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1
prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7
prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d
prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c
prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c
prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf
prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707
prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4
prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e
prerequisite-patch-id: 9f80c5bbbfb8cd3347951c4d57634e93ffa79924
prerequisite-patch-id: 1aaa9f0d466e2d6837f75844df48a98beb70ff24
prerequisite-patch-id: 34502820d8c0355b3ed2638c457084edeaba029d
prerequisite-patch-id: a96258da9e78cfb9ac9893cdcdeb38b69b75f134
prerequisite-patch-id: 4a2da4ee89dbbdb2244845149ce6da967ddd5268
prerequisite-patch-id: 9f9c4205781d1f0e2bb7af2d21875de08ee3ecd5
prerequisite-patch-id: ed1a2ebf448a6ec85b29108046fe806b1162718b
prerequisite-patch-id: ae749fc3fa0ab1768841ffb4633847b5b2233881
prerequisite-patch-id: 46b8490d2b338229a2f3c5e39427275cf46982ba
prerequisite-patch-id: e1b3ae3eed0076928db6805fed2e3e43b08384c9
prerequisite-patch-id: ae85b0453312d6487eb8120cb3b2510a219dcb97
prerequisite-patch-id: f8181365677e68d8628013c7636e9ff56214ac9e
prerequisite-patch-id: 05d447ebc6c813214474eb285b568c8f8f1c1cd7
prerequisite-patch-id: 48018762378fe79b23305290561ace7ef2eac784
prerequisite-patch-id: 098ac47159be07775eefb48ea7b357bdb7e438d3
prerequisite-patch-id: 89306b41386cb29db7c147e8c4468a3b4d8d292d
prerequisite-patch-id: 29e414b1ede9108047ff224e1e24a3adb2c44c52
prerequisite-patch-id: 2d5ea13bfd691e6829a039464684ab82e0f0a5ef
prerequisite-patch-id: b8c18091929e58b49847ab510d3d75a8a934cad0
prerequisite-patch-id: fc10e0f10347726cc356681964011238c8eb98e9
prerequisite-patch-id: 7a607a1659b22afb0c21dec3d8eb1e2ed51e47a9
prerequisite-patch-id: cb0b4de1ad6baad8dccea6d89d0cdf81d4b30ea3
prerequisite-patch-id: d94c7d3766852d0e3bb0d26c66afa8a243e436fb
prerequisite-patch-id: 345914ff5f5f2987b005bf7293ba553ee32c73af
prerequisite-patch-id: 92778baaa15b55c29c1d7c617363ea459946a199
prerequisite-patch-id: 2c6b966468422e015d70942a0abfafcf89eccca4
prerequisite-patch-id: d4352d5b7cfb625a46aac34be99d8a43fbdd2e5a
prerequisite-patch-id: add2c16fb11d7f3f207b5439dbdfca70f3d9f462
prerequisite-patch-id: c8ff684f8baba8683674909102dd0a2e5f67ec9c
prerequisite-patch-id: 949a9784034fcc7cdcced6d351f0d2889d35371a
prerequisite-patch-id: 3d7d6ff290f74b65c404494f3aab66f1555174d7
prerequisite-patch-id: 9fd8e4653e3029998449fae74d3e3fdc986ca9ea
--
2.41.0
N
N
Nicolas Graves wrote on 24 Sep 2023 12:25
[PATCH 1/5] gnu: python-django-4.2: Use test-flags argument.
(address . 66177@debbugs.gnu.org)(address . ngraves@ngraves.fr)
03a469274a39340a691e606612ee1f034098e412.1695551150.git.ngraves@ngraves.fr
* gnu/packages/django.scm (python-django-4.2): Use test-flags argument.
---
gnu/packages/django.scm | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)

Toggle diff (41 lines)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 4060819a35..f07433b10b 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -66,7 +66,12 @@ (define-public python-django-4.2
"1ha6c5j3pizbsfzw37r52lvdz8z5lblq4iwa99mpkdzz92aiqp2y"))))
(build-system python-build-system)
(arguments
- '(#:phases
+ '(#:test-flags
+ (list
+ ;; By default tests run in parallel, which may cause various race
+ ;; conditions. Run sequentially for consistent results.
+ "--parallel=1")
+ #:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
@@ -85,16 +90,12 @@ (define-public python-django-4.2
(string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
all)))))
(replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
(if tests?
(with-directory-excursion "tests"
;; Tests expect PYTHONPATH to contain the root directory.
(setenv "PYTHONPATH" "..")
- (invoke "python" "runtests.py"
- ;; By default tests run in parallel, which may cause
- ;; various race conditions. Run sequentially for
- ;; consistent results.
- "--parallel=1"))
+ (apply invoke "python" "runtests.py" test-flags))
(format #t "test suite not run~%"))))
;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
;; see <https://bugs.gnu.org/25235>. The django-admin script typically

base-commit: cc6fac3311f079c92c76a60192d93623eb094881
--
2.41.0
N
N
Nicolas Graves wrote on 24 Sep 2023 12:25
[PATCH 2/5] gnu: python-django-4.2: Comment formatting.
(address . 66177@debbugs.gnu.org)(address . ngraves@ngraves.fr)
64fad791121caedebcf453c9e018c7fa1ef66d1e.1695551150.git.ngraves@ngraves.fr
* gnu/packages/django.scm (python-django-4.2): Comment formatting.
---
gnu/packages/django.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index f07433b10b..0e85860176 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -109,12 +109,12 @@ (define-public python-django-4.2
;; Remaining packages are test requirements taken from
;; tests/requirements/py3.txt
python-docutils
- ;; optional for tests: ("python-geoip2" ,python-geoip2)
- ;; optional for tests: ("python-memcached" ,python-memcached)
+ ;; optional for tests: python-geoip2
+ ;; optional for tests: python-memcached
python-numpy
python-pillow
python-pyyaml
- ;; optional for tests: ("python-selenium" ,python-selenium)
+ ;; optional for tests: python-selenium
python-tblib))
(propagated-inputs
(list python-asgiref
--
2.41.0
N
N
Nicolas Graves wrote on 24 Sep 2023 12:25
[PATCH 3/5] gnu: python-django-4.2: Add --failfast to test-flags.
(address . 66177@debbugs.gnu.org)(address . ngraves@ngraves.fr)
9d912f8d395557daedbb0857fb8d30ed26d96aa8.1695551150.git.ngraves@ngraves.fr
* gnu/packages/django.scm (python-django-4.2): Add --failfast to test-flags.
---
gnu/packages/django.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 0e85860176..a6ef52870e 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -70,7 +70,9 @@ (define-public python-django-4.2
(list
;; By default tests run in parallel, which may cause various race
;; conditions. Run sequentially for consistent results.
- "--parallel=1")
+ "--parallel=1"
+ ;; The test suite fails as soon as a single test fails.
+ "--failfast")
#:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
--
2.41.0
N
N
Nicolas Graves wrote on 24 Sep 2023 12:25
[PATCH 4/5] gnu: python-django-4.2: Use pyproject-build-system.
(address . 66177@debbugs.gnu.org)(address . ngraves@ngraves.fr)
163d19634bce5a2ad4ff3fb742120490198d0ad4.1695551150.git.ngraves@ngraves.fr
* gnu/packages/django.scm (python-django-4.2):
[build-system] Use pyproject-build-system.
---
gnu/packages/django.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index a6ef52870e..b70ad12a9b 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -64,7 +64,7 @@ (define-public python-django-4.2
(sha256
(base32
"1ha6c5j3pizbsfzw37r52lvdz8z5lblq4iwa99mpkdzz92aiqp2y"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
'(#:test-flags
(list
--
2.41.0
N
N
Nicolas Graves wrote on 24 Sep 2023 12:25
[PATCH 5/5] gnu: python-django-4.2: Simpler unittest skip.
(address . 66177@debbugs.gnu.org)(address . ngraves@ngraves.fr)
792a20ab93cf88feae119296b0d2db58dccf3732.1695551150.git.ngraves@ngraves.fr
* gnu/packages/django.scm (python-django-4.2): Simpler unittest skip.
---
gnu/packages/django.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index b70ad12a9b..4404c8368d 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -89,7 +89,7 @@ (define-public python-django-4.2
;; harmless, so just ignore this test.
(substitute* "tests/settings_tests/tests.py"
((".*def test_incorrect_timezone.*" all)
- (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
+ (string-append " @unittest.skip('Disabled by Guix')\n"
all)))))
(replace 'check
(lambda* (#:key tests? test-flags #:allow-other-keys)
--
2.41.0
N
N
Nicolas Graves wrote on 14 Dec 2023 16:50
Re: [bug#66177] [PATCH 0/5] Improve python-django-4.2 phases.
87cyv86avw.fsf@ngraves.fr
Just a quick reminder ;)


On 2023-09-24 12:18, Nicolas Graves via Guix-patches via wrote:

Toggle quote (58 lines)
> This patch series introduces simple improvements to the
> python-django-4.2 package.
>
> Nicolas Graves (5):
> gnu: python-django-4.2: Use test-flags argument.
> gnu: python-django-4.2: Comment formatting.
> gnu: python-django-4.2: Add --failfast to test-flags.
> gnu: python-django-4.2: Use pyproject-build-system.
> gnu: python-django-4.2: Simpler unittest skip.
>
> gnu/packages/django.scm | 27 +++++++++++++++------------
> 1 file changed, 15 insertions(+), 12 deletions(-)
>
>
> base-commit: f45c0c82289d409b4fac00464ea8b323839ba53f
> prerequisite-patch-id: eb618ab7b10483d917c308a38792af98baa517e2
> prerequisite-patch-id: c12968d02d99c253f858586a86b16fa32d41f1c1
> prerequisite-patch-id: 09d995d48139f8e61183d5634cda13a01cdb50f7
> prerequisite-patch-id: 86baa45ec2aad977c8c8135f7613aa391155de6d
> prerequisite-patch-id: 3425fbbff6a603d60b4e143ea2141aabf4ddc92c
> prerequisite-patch-id: c373c01aab5dcba3503a97d51c62a595147a041c
> prerequisite-patch-id: cda857c790b88c681c4e713c5f71e40291970daf
> prerequisite-patch-id: 8e234d0f4d93d2aad499eec8842be3d28da98707
> prerequisite-patch-id: 5f664cb2fd995a53765c5ffc19a708ac795cc0c4
> prerequisite-patch-id: ed447cba9cf9b7e1a1b47aa27acb14f8f2da0a8e
> prerequisite-patch-id: 9f80c5bbbfb8cd3347951c4d57634e93ffa79924
> prerequisite-patch-id: 1aaa9f0d466e2d6837f75844df48a98beb70ff24
> prerequisite-patch-id: 34502820d8c0355b3ed2638c457084edeaba029d
> prerequisite-patch-id: a96258da9e78cfb9ac9893cdcdeb38b69b75f134
> prerequisite-patch-id: 4a2da4ee89dbbdb2244845149ce6da967ddd5268
> prerequisite-patch-id: 9f9c4205781d1f0e2bb7af2d21875de08ee3ecd5
> prerequisite-patch-id: ed1a2ebf448a6ec85b29108046fe806b1162718b
> prerequisite-patch-id: ae749fc3fa0ab1768841ffb4633847b5b2233881
> prerequisite-patch-id: 46b8490d2b338229a2f3c5e39427275cf46982ba
> prerequisite-patch-id: e1b3ae3eed0076928db6805fed2e3e43b08384c9
> prerequisite-patch-id: ae85b0453312d6487eb8120cb3b2510a219dcb97
> prerequisite-patch-id: f8181365677e68d8628013c7636e9ff56214ac9e
> prerequisite-patch-id: 05d447ebc6c813214474eb285b568c8f8f1c1cd7
> prerequisite-patch-id: 48018762378fe79b23305290561ace7ef2eac784
> prerequisite-patch-id: 098ac47159be07775eefb48ea7b357bdb7e438d3
> prerequisite-patch-id: 89306b41386cb29db7c147e8c4468a3b4d8d292d
> prerequisite-patch-id: 29e414b1ede9108047ff224e1e24a3adb2c44c52
> prerequisite-patch-id: 2d5ea13bfd691e6829a039464684ab82e0f0a5ef
> prerequisite-patch-id: b8c18091929e58b49847ab510d3d75a8a934cad0
> prerequisite-patch-id: fc10e0f10347726cc356681964011238c8eb98e9
> prerequisite-patch-id: 7a607a1659b22afb0c21dec3d8eb1e2ed51e47a9
> prerequisite-patch-id: cb0b4de1ad6baad8dccea6d89d0cdf81d4b30ea3
> prerequisite-patch-id: d94c7d3766852d0e3bb0d26c66afa8a243e436fb
> prerequisite-patch-id: 345914ff5f5f2987b005bf7293ba553ee32c73af
> prerequisite-patch-id: 92778baaa15b55c29c1d7c617363ea459946a199
> prerequisite-patch-id: 2c6b966468422e015d70942a0abfafcf89eccca4
> prerequisite-patch-id: d4352d5b7cfb625a46aac34be99d8a43fbdd2e5a
> prerequisite-patch-id: add2c16fb11d7f3f207b5439dbdfca70f3d9f462
> prerequisite-patch-id: c8ff684f8baba8683674909102dd0a2e5f67ec9c
> prerequisite-patch-id: 949a9784034fcc7cdcced6d351f0d2889d35371a
> prerequisite-patch-id: 3d7d6ff290f74b65c404494f3aab66f1555174d7
> prerequisite-patch-id: 9fd8e4653e3029998449fae74d3e3fdc986ca9ea

--
Best regards,
Nicolas Graves
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 66177@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 66177
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch