me
/
guix
Archived
1
0
Fork 0
This repository has been archived on 2024-08-07. You can view files and clone it, but cannot push or open issues/pull-requests.
guix/gnu/packages/django.scm

180 lines
7.1 KiB
Scheme
Raw Normal View History

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages django)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages python))
(define-public python-django
(package
(name "python-django")
(version "1.10.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "Django" version))
(sha256
(base32
"0c4c8zs7kzb0bdlpy4vlzv6va26dbazr32h91rldf6waxs6z14kg"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-before 'check 'set-tzdir
(lambda* (#:key inputs #:allow-other-keys)
;; The test-suite tests timezone-dependent functions, thus tzdata
;; needs to be available.
(setenv "TZDIR"
(string-append (assoc-ref inputs "tzdata")
"/share/zoneinfo"))
#t))
(replace 'check
(lambda _
(setenv "PYTHONPATH"
(string-append ".:" (getenv "PYTHONPATH")))
(zero? (system* "python" "tests/runtests.py")))))))
;; TODO: Install extras/django_bash_completion.
(native-inputs
`(("tzdata", tzdata)
;; bcrypt and argon2-cffi are extra requirements not yet in guix
;;("python-argon2-cffi" ,python-argon2-cffi) ; >= 16.1.0
;;("python-bcrypt" ,python-bcrypt) ; not py-bcrypt!
;; Remaining packages are test requirements taken from
;; tests/requirements/py3.txt
("python-docutils" ,python-docutils)
;; optional for tests: ("python-geoip2" ,python-geoip2)
("python-jinja2" ,python-jinja2) ; >= 2.7
;; optional for tests: ("python-memcached" ,python-memcached)
("python-numpy" ,python-numpy)
("python-pillow" ,python-pillow)
("python-pyyaml" ,python-pyyaml)
("python-pytz" ,python-pytz)
;; optional for tests: ("python-selenium" ,python-selenium)
("python-sqlparse" ,python-sqlparse)
("python-tblib" ,python-tblib)))
(home-page "http://www.djangoproject.com/")
(synopsis "High-level Python Web framework")
(description
"Django is a high-level Python Web framework that encourages rapid
development and clean, pragmatic design. It provides many tools for building
any Web site. Django focuses on automating as much as possible and adhering
to the @dfn{don't repeat yourself} (DRY) principle.")
(license license:bsd-3)
(properties `((python2-variant . ,(delay python2-django))))))
(define-public python2-django
(let ((base (package-with-python2 (strip-python2-variant python-django))))
(package
(inherit base)
(native-inputs
`(;; Test requirements for Python 2 taken from
;; tests/requirements/py3.txt: enum34 and mock.
("python2-enum34" ,python2-enum34)
("python2-mock" ,python2-mock)
;; When adding memcached mind: for Python 2 memcached <= 1.53 is
;; required.
,@(package-native-inputs base))))))
(define-public python-django-simple-math-captcha
(package
(name "python-django-simple-math-captcha")
(version "1.0.7")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-simple-math-captcha" version))
(sha256
(base32
"0906hms6y6znjhpd0g4wmzv9vcla4brkdpsm4zha9zdj8g5vq2hd"))))
(build-system python-build-system)
(propagated-inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/alsoicode/django-simple-math-captcha")
(synopsis "Easy-to-use math field/widget captcha for Django forms")
(description
"A multi-value-field that presents a human answerable question,
with no settings.py configuration necessary, but instead can be configured
with arguments to the field constructor.")
(license license:asl2.0)))
(define-public python2-django-simple-math-captcha
(package-with-python2 python-django-simple-math-captcha))
(define-public python-pytest-django
(package
(name "python-pytest-django")
(version "2.9.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-django" version))
(sha256
(base32
"1mmc7zsz3dlhs6sx4sppkj1vgshabi362r1a8b8wpj1qfximpqcb"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-setuppy
(lambda _
(substitute* "setup.py"
(("setuptools_scm==1.8.0") "setuptools_scm"))
#t)))))
(native-inputs
`(("python-django" ,python-django)
("python-setuptools-scm" ,python-setuptools-scm)))
gnu: Fix python inputs, part 1: all inputs become propagated-inputs. This patch contains the changes where all [inputs] are changed to [propagated-inputs] * gnu/packages/python.scm (python-passlib, python-paramiko, python-ccm, python-babel, python-keyring python-pandas, python-tzlocal, python-parse-type, python-nose2, python-pytest, python-pytest-mock, python-pytest-xdist, python-scripttest, python-testtools, python-pytest-cov, python-testscenarios, python-pbr-0.11, python-oauthlib, python-jinja2, python-sphinx, python-tzlocal, python-bugz, python2-pytest-mock, behave, pelican, sqlalchemy-utils, python-pygridtools, python-urwidtrees, python-tornado, python2-tornado, python-debian, python-execnet, python-pytest-cache, pytest-localserver, python-clint, python-rply, python-hy, python-rauth, python-rsa, python-celery, python-vobject, s3cmd, python-prompt-toolkit, ptpython, python-requests-oauthlib, python-stem, python-binaryornot, python2-binaryornot, python-nltk, python-pymongo, python-schematics, python-url, python2-url, python-freezegun, python-glances, python-graphql-core, python-graphql-relay, python-graphene, python-nautilus, python-s3transfer): All [inputs] become [propagated-inputs]. * gnu/packages/bioinformatics.scm (python-biopython): Likewise. * gnu/packages/django.scm (pytest-django): Likewise. * gnu/packages/mail.scm (python-mailmanclient): Likewise. * gnu/packages/password-utils.scm (python-bcrypt): Likewise. * gnu/packages/propbuf.scm (python-protobuf): Likewise. * gnu/packages/rdf.scm (python-rdflib): Likewise. SQACH all become propagated
2016-10-13 11:33:43 +00:00
(propagated-inputs
`(("python-pytest" ,python-pytest)))
(home-page "http://pytest-django.readthedocs.org/")
(synopsis "Django plugin for py.test")
(description "Pytest-django is a plugin for py.test that provides a set of
useful tools for testing Django applications and projects.")
(license license:bsd-3)))
(define-public python2-pytest-django
gnu: Remove python-setuptools and python2-setuptools from inputs (part 4a) This patch contains the changes for all modules beside python.scm where setuptools are used in an inherited package and removing this input also removes the need for inheriting the package. This is the case if adding setuptools in the inherited package was the only change. Change this to not inherit and remove the new needless call to "strip-python2-variant (if applicable). * gnu/packages/bioinformatics.scm (python-biopython, python2-biopython, python-twobitreader, python2-twobitreader, python-plastid, python2-plastid, python2-pybigwig, python2-screed, sra-tools): No longer "inherit" Python 2 packages inheriting from a Python 3 package if the sole reason for inheriting was adding python-setuptools respective python2-setuptools to [inputs], [native-inputs] or [propagated-inputs]. Remove now needless [properties] "python2-variant" where applicable. * gnu/packages/django.scm (python-pytest-django, python2-pytest-django, python-django-filter, python2-django-filter): Likewise. * gnu/packages/gnupg.scm (python2-pygpgme): Likewise. * gnu/packages/mail.scm (python-mailmanclient, python2-mailmanclient): Likewise. * gnu/packages/mpd.scm (python-msp, python2-mpd2): Likewise. * gnu/packages/music.scm (python-pylast, python2-pylast): Likewise. * gnu/packages/openstack.scm (python-requests-mock, python2-requests-mock, python2-git-review): Likewise. * gnu/packages/password-utils.scm (python2-bcrypt): Likewise. * gnu/packages/protobuf.scm (python-protobuf, python2-protobuf): Likewise. * gnu/packages/statistics.scm (python-patsy, python2-patsy): Likewise. * gnu/packages/web.scm (python2-feedparser): Likewise.
2016-09-28 11:57:21 +00:00
(package-with-python2 python-pytest-django))
(define-public python-django-filter
(package
(name "python-django-filter")
(version "0.14.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-filter" version))
(sha256
(base32
"0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
(build-system python-build-system)
(native-inputs
`(("python-django" ,python-django)
("python-mock" ,python-mock)))
(home-page "https://django-filter.readthedocs.io/en/latest/")
(synopsis "Reusable Django application to filter querysets dynamically")
(description
"Django-filter is a generic, reusable application to alleviate writing
some of the more mundane bits of view code. Specifically, it allows users to
filter down a queryset based on a models fields, displaying the form to let
them do this.")
(license license:bsd-3)))
(define-public python2-django-filter
gnu: Remove python-setuptools and python2-setuptools from inputs (part 4a) This patch contains the changes for all modules beside python.scm where setuptools are used in an inherited package and removing this input also removes the need for inheriting the package. This is the case if adding setuptools in the inherited package was the only change. Change this to not inherit and remove the new needless call to "strip-python2-variant (if applicable). * gnu/packages/bioinformatics.scm (python-biopython, python2-biopython, python-twobitreader, python2-twobitreader, python-plastid, python2-plastid, python2-pybigwig, python2-screed, sra-tools): No longer "inherit" Python 2 packages inheriting from a Python 3 package if the sole reason for inheriting was adding python-setuptools respective python2-setuptools to [inputs], [native-inputs] or [propagated-inputs]. Remove now needless [properties] "python2-variant" where applicable. * gnu/packages/django.scm (python-pytest-django, python2-pytest-django, python-django-filter, python2-django-filter): Likewise. * gnu/packages/gnupg.scm (python2-pygpgme): Likewise. * gnu/packages/mail.scm (python-mailmanclient, python2-mailmanclient): Likewise. * gnu/packages/mpd.scm (python-msp, python2-mpd2): Likewise. * gnu/packages/music.scm (python-pylast, python2-pylast): Likewise. * gnu/packages/openstack.scm (python-requests-mock, python2-requests-mock, python2-git-review): Likewise. * gnu/packages/password-utils.scm (python2-bcrypt): Likewise. * gnu/packages/protobuf.scm (python-protobuf, python2-protobuf): Likewise. * gnu/packages/statistics.scm (python-patsy, python2-patsy): Likewise. * gnu/packages/web.scm (python2-feedparser): Likewise.
2016-09-28 11:57:21 +00:00
(package-with-python2 python-django-filter))