From: Christopher Baines <mail@cbaines.net>
To: 28726@debbugs.gnu.org
Subject: [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2.
Date: Fri, 6 Oct 2017 21:26:58 +0100 [thread overview]
Message-ID: <20171006202702.1511-1-mail@cbaines.net> (raw)
In-Reply-To: <20171006212026.5797a685@cbaines.net>
The build was failing as the Django settings were not configured for the
tests. The relevant files are missing from the release on PyPI, so switch to
using a more complete source release. Also update the package at the same
time.
* gnu/packages/django.scm (python-django-gravatar2)[version]: 1.4.0 -> 1.4.2.
[source]: Change to use a tarball from GitHub, update the sha256 hash.
[arguments]: Add a phase to skip a test requiring network access, and
replace the check phase to call ./manage.py within the example_project
directory.
---
gnu/packages/django.scm | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index c70c07493..fb8663d3f 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -226,15 +226,43 @@ account authentication.")
(define-public python-django-gravatar2
(package
(name "python-django-gravatar2")
- (version "1.4.0")
+ (version "1.4.2")
(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
- "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
+ "1qa0awqkfnfcjx7d5ijgr9hj8ifpq5xrj16196im4hw9r9i1wapf"))))
(build-system python-build-system)
+ (arguments
+ '(#: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")
--
2.14.2
next prev parent reply other threads:[~2017-10-06 20:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 20:20 [bug#28726] [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
2017-10-06 20:26 ` Christopher Baines [this message]
2017-10-06 20:26 ` [bug#28726] [PATCH 2/5] gnu: django: Fix building python-django-allauth Christopher Baines
2017-10-06 20:27 ` [bug#28726] [PATCH 3/5] gnu: django: Fix building python2-django-mailman3 Christopher Baines
2017-10-08 3:42 ` Cyril Roelandt
2017-10-08 7:53 ` ng0
2017-10-08 16:04 ` Christopher Baines
2017-10-06 20:27 ` [bug#28726] [PATCH 4/5] gnu: python: Disable tests for python-graphene Christopher Baines
2017-10-08 3:32 ` Cyril Roelandt
2017-10-08 7:55 ` ng0
2017-10-06 20:27 ` [bug#28726] [PATCH 5/5] gnu: python: Update python-sqlparse Christopher Baines
2017-10-08 3:39 ` Cyril Roelandt
2017-10-08 3:30 ` [bug#28726] [PATCH 1/5] gnu: django: Fix the build for python-django-gravatar2 Cyril Roelandt
2017-10-08 14:52 ` Christopher Baines
2017-10-08 16:02 ` Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 1/6] " Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 2/6] gnu: django: Fix building python-django-allauth Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 3/6] gnu: mail: Fix building python2-django-mailman3 Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 4/6] gnu: python: Disable tests for python-graphene Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 5/6] gnu: python: Update python-sqlparse Christopher Baines
2017-10-08 16:03 ` [bug#28726] [PATCH 6/6] gnu: mail: Remove python-django-mailman3 Christopher Baines
2017-11-24 22:23 ` bug#28726: [PATCH] Update python-sqlparse and fix some dependent packages Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171006202702.1511-1-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=28726@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).