gnu: python-django-netfields: Switch to pyproject.

* gnu/packages/django.scm (python-django-netfields):
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:test-flags, #:phases>: Configure tests.
[native-inputs]: Add python-pytest, python-pytest-django,
python-setuptools.

Change-Id: I4f984a8511ff6d2447b630eeabc060cc81528f6e
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves 2025-09-29 08:54:45 +02:00 committed by Sharlatan Hellseher
parent dcb6d77a07
commit b2efdbfdd9
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -1902,14 +1902,30 @@ to ElasticSearch.")
(package (package
(name "python-django-netfields") (name "python-django-netfields")
(version "1.3.2") (version "1.3.2")
(source (origin (source
(method url-fetch) (origin
(uri (pypi-uri "django-netfields" version)) (method git-fetch)
(uri (git-reference
(url "https://github.com/jimfunk/django-postgresql-netfields")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "176dmdlhd6bka4k6b4mlha3ags6mqf2qy3rxvpgnk9v5nncqm7l9"))))
"0q2s6b689hwql4qcw02m3zj2fwsx1w4ffhw81yvp71dq3dh46jg5")))) (build-system pyproject-build-system)
(build-system python-build-system) (arguments
(arguments '(#:tests? #f)) ;XXX: Requires a running PostgreSQL server (list
#:tests? #f ;XXX: Requires a running PostgreSQL server
;; XXX: Requires rest_framework.
#:test-flags
#~(list "--ignore=test/tests/test_rest_framework_fields.py")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda _
(setenv "DJANGO_SETTINGS_MODULE" "testsettings")
(setenv "PYTHONPATH" "."))))))
(native-inputs
(list python-pytest python-pytest-django python-setuptools))
(propagated-inputs (propagated-inputs
(list python-django python-netaddr python-psycopg2 python-six)) (list python-django python-netaddr python-psycopg2 python-six))
(home-page "https://github.com/jimfunk/django-postgresql-netfields") (home-page "https://github.com/jimfunk/django-postgresql-netfields")