diff options
author | Evgeny Pisemsky <mail@pisemsky.site> | 2025-04-19 15:37:22 +0300 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-05-16 21:21:54 +0100 |
commit | 40cd5e511cf96dc4036d256e5093dccf74a48dc4 (patch) | |
tree | dd10fd7dc3e30a7390519f77523246efd911c06e | |
parent | 085f12b34e35fc187e84586fcf92902e8125b8cc (diff) | |
download | guix-40cd5e511cf96dc4036d256e5093dccf74a48dc4.tar.gz guix-40cd5e511cf96dc4036d256e5093dccf74a48dc4.zip |
gnu: python-django-compressor: Run tests against installed package.
* gnu/packages/django.scm (python-django-compressor): Run tests against
installed package.
[arguments] <phases>: Remove 'add-missing-init-files; add 'fix-setup.py.
Change-Id: Idd810376921d1802adb9355c52edcd1a8584eef7
Co-authored-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
-rw-r--r-- | gnu/packages/django.scm | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index f2e7552b9c..b13e94da29 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -1453,21 +1453,19 @@ forms using your favorite CSS framework, without writing template code.") (lambda _ (substitute* "compressor/tests/test_filters.py" (("test_calmjs_filter") "_test_calmjs_filter")))) - ;; TODO: Report upstream. - (add-after 'unpack 'add-missing-init-files + ;; XXX: Reported upstream + ;; <https://github.com/django-compressor/django-compressor/pull/1294>. + (add-after 'unpack 'fix-setup.py (lambda _ (substitute* "setup.py" - (("package_data=.*,") "include_package_data=True,")) - (call-with-output-file "compressor/templates/__init__.py" - (const #t)) - (call-with-output-file "compressor/templates/compressor/__init__.py" - (const #t)))) + (("package_data=.*,") "include_package_data=True,")))) (replace 'check - (lambda* (#:key tests? #:allow-other-keys) + (lambda* (#:key tests? inputs outputs #:allow-other-keys) (when tests? - (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings") - (invoke "django-admin" "test" - "--pythonpath=."))))))) + (with-directory-excursion (site-packages inputs outputs) + (setenv "DJANGO_SETTINGS_MODULE" "compressor.test_settings") + (invoke "django-admin" "test" + "--pythonpath=.")))))))) (propagated-inputs (list python-django python-django-appconf |