diff options
-rw-r--r-- | gnu/packages/django.scm | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index a901af6f14..f098ca707c 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -271,14 +271,39 @@ account authentication.") (source (origin (method url-fetch) - (uri (pypi-uri "django-gravatar2" version)) + (uri (string-append + "https://github.com/twaddington/django-gravatar/archive/" + version ".tar.gz")) (sha256 (base32 - "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6")))) + "1qa0awqkfnfcjx7d5ijgr9hj8ifpq5xrj16196im4hw9r9i1wapf")))) (build-system python-build-system) (arguments - '(;; TODO: The django project for the tests is missing from the release. - #:tests? #f)) + '(#:phases + (modify-phases %standard-phases + ;; TODO: Tagging the tests requiring the web could be done upstream. + (add-before 'check 'skip-test-requiring-network-access + (lambda _ + (substitute* "django_gravatar/tests.py" + (("def test_has_gravatar") + "from django.test import tag + @tag('requires-web') + def test_has_gravatar")))) + (replace 'check + (lambda _ + (setenv "PYTHONPATH" + (string-append + (getcwd) + ":" + (getenv "PYTHONPATH"))) + (with-directory-excursion "example_project" + (zero? + (system* + "./manage.py" + "test" + "--verbosity=2" + "--exclude-tag=requires-web" + "django_gravatar")))))))) (inputs `(("python-django" ,python-django))) (home-page "https://github.com/twaddington/django-gravatar") |