mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-django-url-filter: Switch to pyproject.
* gnu/packages/django.scm (python-django-url-filter): [source]: Move snippet to <#:phases>. [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Import from <snippet> in phase 'loosen-requirements. Replace 'check phase by a smaller 'configure-tests phase. [native-inputs]: Add python-mock, python-setuptools, python-sqlalchemy. [home-page]: Standardize use. Change-Id: I0fd84647d6cc25a04ca75ffea266b23fce61ff70 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
b2efdbfdd9
commit
4743a5c42f
1 changed files with 35 additions and 37 deletions
|
@ -1939,48 +1939,46 @@ to ElasticSearch.")
|
||||||
(package
|
(package
|
||||||
(name "python-django-url-filter")
|
(name "python-django-url-filter")
|
||||||
(version "0.3.15")
|
(version "0.3.15")
|
||||||
(home-page "https://github.com/miki725/django-url-filter")
|
(source
|
||||||
(source (origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference (url home-page) (commit version)))
|
(uri (git-reference
|
||||||
|
(url "https://github.com/miki725/django-url-filter")
|
||||||
|
(commit version)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32 "0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026"))))
|
||||||
"0r4zhqhs8y6cnplwyvcb0zpijizw1ifnszs38n4w8138657f9026"))
|
(build-system pyproject-build-system)
|
||||||
(modules '((guix build utils)))
|
|
||||||
(snippet
|
|
||||||
;; Patch for Django 4.0 compatibility, taken from upstream pull
|
|
||||||
;; request: https://github.com/miki725/django-url-filter/pull/103
|
|
||||||
'(substitute* "url_filter/validators.py"
|
|
||||||
((" ungettext_lazy")
|
|
||||||
" ngettext_lazy")))))
|
|
||||||
(build-system python-build-system)
|
|
||||||
(arguments
|
(arguments
|
||||||
'(#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
|
(list
|
||||||
#:phases (modify-phases %standard-phases
|
#:tests? #f ;FIXME: Django raises "Apps aren't loaded yet"!?
|
||||||
|
#:test-flags #~(list "--doctest-modules" "tests/" "url_filter/")
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'loosen-requirements
|
(add-after 'unpack 'loosen-requirements
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Do not depend on compatibility package for old
|
;; Do not depend on compatibility package for old
|
||||||
;; Python versions.
|
;; Python versions.
|
||||||
(substitute* "requirements.txt"
|
(substitute* "requirements.txt"
|
||||||
(("enum-compat") ""))))
|
(("enum-compat")
|
||||||
(replace 'check
|
""))
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
;; Patch for Django 4.0 compatibility, taken from upstream pull
|
||||||
(if tests?
|
;; request: https://github.com/miki725/django-url-filter/pull/103
|
||||||
(begin
|
(substitute* "url_filter/validators.py"
|
||||||
(setenv "DJANGO_SETTINGS_MODULE"
|
((" ungettext_lazy")
|
||||||
"test_project.settings")
|
" ngettext_lazy"))))
|
||||||
(invoke "pytest" "-vv" "--doctest-modules"
|
(add-before 'check 'configure-tests
|
||||||
"tests/" "url_filter/"))
|
(lambda _
|
||||||
(format #t "test suite not run~%")))))))
|
(setenv "DJANGO_SETTINGS_MODULE" "test_project.settings"))))))
|
||||||
(propagated-inputs
|
(native-inputs (list python-mock python-pytest python-setuptools python-sqlalchemy))
|
||||||
(list python-cached-property python-django python-six))
|
(propagated-inputs (list python-cached-property python-django python-six))
|
||||||
|
(home-page "https://github.com/miki725/django-url-filter")
|
||||||
(synopsis "Filter data via human-friendly URLs")
|
(synopsis "Filter data via human-friendly URLs")
|
||||||
(description
|
(description
|
||||||
"The main goal of Django URL Filter is to provide an easy URL interface
|
"The main goal of Django URL Filter is to provide an easy URL interface
|
||||||
for filtering data. It allows the user to safely filter by model attributes
|
for filtering data. It allows the user to safely filter by model attributes
|
||||||
and also specify the lookup type for each filter (very much like
|
and also specify the lookup type for each filter (very much like Django's
|
||||||
Django's filtering system in ORM).")
|
filtering system in ORM).")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public python-django-svg-image-form-field
|
(define-public python-django-svg-image-form-field
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue