1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-10 16:50:43 +02:00

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>
This commit is contained in:
Evgeny Pisemsky 2025-04-19 15:37:22 +03:00 committed by Sharlatan Hellseher
parent 085f12b34e
commit 40cd5e511c
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -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