;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
+;;; Copyright © 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages databases)
- #:use-module (gnu packages python))
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-web)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages time))
(define-public python-django
(package
(name "python-django")
- (version "1.10.7")
+ (version "1.11.20")
(source (origin
(method url-fetch)
(uri (pypi-uri "Django" version))
(sha256
(base32
- "1f5hnn2dzfr5szk4yc47bs4kk2nmrayjcvgpqi2s4l13pjfpfgar"))))
+ "0h90kdq8r4y8wa73hdxmyy5psnwlg61dcq3qsa098cpfiyh9vaa3"))))
(build-system python-build-system)
(arguments
- '(#:phases
+ '(#:modules ((srfi srfi-1)
+ (guix build python-build-system)
+ (guix build utils))
+ #:phases
(modify-phases %standard-phases
(add-before 'check 'set-tzdir
(lambda* (#:key inputs #:allow-other-keys)
"/share/zoneinfo"))
#t))
(replace 'check
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
(setenv "PYTHONPATH"
(string-append ".:" (getenv "PYTHONPATH")))
- (zero? (system* "python" "tests/runtests.py")))))))
+ (substitute* "tests/admin_scripts/tests.py"
+ (("python_path = \\[")
+ (string-append "python_path = ['"
+ (find (lambda (entry)
+ (string-prefix?
+ (assoc-ref inputs "python-pytz")
+ entry))
+ (string-split (getenv "PYTHONPATH")
+ #\:))
+ "', ")))
+ (invoke "python" "tests/runtests.py"))))))
;; TODO: Install extras/django_bash_completion.
(native-inputs
- `(("tzdata", tzdata)
+ `(("tzdata" ,tzdata-for-tests)
;; 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!
("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)))
+ (propagated-inputs
+ `(("python-pytz" ,python-pytz)))
(home-page "http://www.djangoproject.com/")
(synopsis "High-level Python Web framework")
(description
(define-public python-pytest-django
(package
(name "python-pytest-django")
- (version "2.9.1")
+ (version "3.1.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-django" version))
(sha256
(base32
- "1mmc7zsz3dlhs6sx4sppkj1vgshabi362r1a8b8wpj1qfximpqcb"))))
+ "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"))))
(build-system python-build-system)
(arguments
`(#:tests? #f ; FIXME: How to run tests?
(add-after 'unpack 'patch-setuppy
(lambda _
(substitute* "setup.py"
- (("setuptools_scm==1.8.0") "setuptools_scm"))
+ (("setuptools_scm==1.11.1") "setuptools_scm"))
#t)))))
(native-inputs
`(("python-django" ,python-django)
(define-public python-django-filter
(package
(name "python-django-filter")
- (version "0.14.0")
+ (version "1.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-filter" version))
(sha256
(base32
- "0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
+ "0slpfqfhnjrzlrb6vmswyhrzn01p84s16j2x1xib35gg4fxg23pc"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (zero? (system* "python" "runtests.py")))))))
+ (invoke "python" "runtests.py"))))))
(native-inputs
`(("python-django" ,python-django)
+ ("python-djangorestframework" ,python-djangorestframework)
+ ("python-django-crispy-forms" ,python-django-crispy-forms)
("python-mock" ,python-mock)))
(home-page "https://django-filter.readthedocs.io/en/latest/")
(synopsis "Reusable Django application to filter querysets dynamically")
(define-public python-django-allauth
(package
(name "python-django-allauth")
- (version "0.30.0")
+ (version "0.39.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "django-allauth" version))
(sha256
(base32
- "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
+ "17l0acpr3cihdndzccjhgv58f9z170v2qwx7w0b8w6235x646i24"))))
(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* "allauth/socialaccount/providers/openid/tests.py"
+ (("import override_settings") "import tag, override_settings")
+ (("def test_login")
+ "@tag('requires-web')
+ def test_login"))))
+ (replace 'check
+ (lambda _
+ ;; TODO: investigate why this test fails
+ (delete-file "allauth/socialaccount/providers/cern/tests.py")
+ (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
+ (invoke "django-admin"
+ "test"
+ "allauth"
+ "--verbosity=2"
+ "--exclude-tag=requires-web"))))))
(propagated-inputs
`(("python-openid" ,python-openid)
("python-requests" ,python-requests)
(define-public python2-django-allauth
(package-with-python2 python-django-allauth))
+(define-public python-django-debug-toolbar
+ (package
+ (name "python-django-debug-toolbar")
+ (version "1.10.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/jazzband/django-debug-toolbar/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1rww056hyzks8spbgf4h7kf6ybxlc5p08a2b6gn1nqrrzs4yx9sy"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-sqlparse" ,python-sqlparse)
+ ("python-django" ,python-django)))
+ (native-inputs
+ `(("python-django-jinja" ,python-django-jinja)
+ ("python-html5lib" ,python-html5lib)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "make" "test"))))))
+ (home-page
+ "https://github.com/jazzband/django-debug-toolbar")
+ (synopsis "Toolbar to help with developing Django applications")
+ (description
+ "A configurable set of panels that display information about the current
+request and response as a toolbar on the rendered page.")
+ (license license:bsd-3)))
+
(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))
(sha256
(base32
- "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
+ "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6"))))
(build-system python-build-system)
+ (arguments
+ '(;; TODO: The django project for the tests is missing from the release.
+ #:tests? #f))
(inputs
`(("python-django" ,python-django)))
(home-page "https://github.com/twaddington/django-gravatar")
(define-public python2-django-assets
(package-with-python2 python-django-assets))
+(define-public python-django-jinja
+ (package
+ (name "python-django-jinja")
+ (version "2.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/niwinz/django-jinja/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0bzrb4m6wx9ph5cpvz7wpvg5k6ksvj0dnxlg0nhhqskhvp46brs1"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-django" ,python-django)
+ ("python-jinja2" ,python-jinja2)
+ ("python-pytz" ,python-pytz)
+ ("python-django-pipeline" ,python-django-pipeline)))
+ (arguments
+ '(;; TODO Tests currently fail due to issues with the configuration for
+ ;; django-pipeline
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (or
+ (not tests?)
+ (with-directory-excursion "testing"
+ (invoke "python" "runtests.py"))))))))
+ (home-page
+ "https://niwinz.github.io/django-jinja/latest/")
+ (synopsis "Simple jinja2 templating backend for Django")
+ (description
+ "This package provides a templating backend for Django, using Jinja2. It
+provides certain advantages over the builtin Jinja2 backend in Django, for
+example, explicit calls to callables from templates and better performance.")
+ (license license:bsd-3)))
+
(define-public python-django-jsonfield
(package
(name "python-django-jsonfield")
(replace 'check
(lambda _
;; the next version will need "make test"
- (and (zero? (system* "flake8" "contact_form"))
- (zero? (system* "coverage" "run" "contact_form/runtests.py"))
- (zero? (system* "coverage" "report" "-m" "--fail-under" "0"))))))))
+ (invoke "flake8" "contact_form")
+ (invoke "coverage" "run" "contact_form/runtests.py")
+ (invoke "coverage" "report" "-m" "--fail-under" "0"))))))
(native-inputs
`(("python-coverage" ,python-coverage)
("python-flake8" ,python-flake8)))
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (zero? (system* "./test_project/manage.py" "test")))))))
+ (lambda _ (invoke "./test_project/manage.py" "test"))))))
(propagated-inputs
`(("python-django" ,python-django)))
(native-inputs
(define-public python2-django-overextends
(package-with-python2 python-django-overextends))
+(define-public python-django-pipeline
+ (package
+ (name "python-django-pipeline")
+ (version "1.6.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django-pipeline" version))
+ (sha256
+ (base32
+ "1a207y71r7za033ira0qmh2yrgp5rq0l04gw2fg9b8jri7sslrzg"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ (substitute* "tests/tests/test_compiler.py"
+ (("\\/usr\\/bin\\/env")
+ (which "env")))))
+ (replace 'check
+ (lambda*(#:key tests? #:allow-other-keys)
+ (or
+ (not tests?)
+ (begin
+ (setenv "DJANGO_SETTINGS_MODULE" "tests.settings")
+ (invoke "django-admin" "test" "tests"))))))))
+ (propagated-inputs
+ `(("python-django" ,python-django)
+ ("python-slimit" ,python-slimit)
+ ("python-jsmin" ,python-jsmin)))
+ (home-page
+ "https://github.com/jazzband/django-pipeline")
+ (synopsis "Asset packaging library for Django")
+ (description
+ "Pipeline is an asset packaging library for Django, providing both CSS
+and JavaScript concatenation and compression, built-in JavaScript template
+support, and optional data-URI image and font embedding.")
+ (license license:expat)))
+
(define-public python-django-redis
(package
(name "python-django-redis")
- (version "4.7.0")
+ (version "4.10.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-redis" version))
(sha256
(base32
- "0yyyxv8n9l9dhs893jsqwg2cxqkkc79g719n9dzzzqgkzialv1c1"))))
+ "1rxcwnv9ik0swkwvfqdi9i9baw6n8if5pj6q63fjh4p9chw3j2xg"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (and (zero? (system* "redis-server" "--daemonize" "yes"))
- (with-directory-excursion "tests"
- (zero? (system* "python" "runtests.py")))))))))
+ (invoke "redis-server" "--daemonize" "yes")
+ (with-directory-excursion "tests"
+ (invoke "python" "runtests.py")))))))
(native-inputs
`(("python-fakeredis" ,python-fakeredis)
("python-hiredis" ,python-hiredis)
(define-public python-django-rq
(package
(name "python-django-rq")
- (version "0.9.4")
+ (version "1.3.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-rq" version))
(sha256
(base32
- "04v8ilfdp10bk31fxgh4cn083gsn5m06342cnpm5d10nd8hc0vky"))))
+ "0xh6qa7i779vh58lwwv6yk0wx8bi38mvmpz79grnl2cl8531r928"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (and (zero? (system* "redis-server" "--daemonize" "yes"))
- (zero? (system* "django-admin.py" "test" "django_rq"
- "--settings=django_rq.test_settings"
- "--pythonpath="))))))))
+ (invoke "redis-server" "--daemonize" "yes")
+ (invoke "django-admin.py" "test" "django_rq"
+ "--settings=django_rq.tests.settings"
+ "--pythonpath="))))))
(native-inputs
- `(("redis" ,redis)))
+ `(("python-mock" ,python-mock)
+ ("redis" ,redis)))
(propagated-inputs
`(("python-django" ,python-django)
("python-rq" ,python-rq)))
(define-public python-django-appconf
(package
(name "python-django-appconf")
- (version "1.0.2")
+ (version "1.0.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "django-appconf" version))
(sha256
(base32
- "0qdjdx35g66xjsc50v0c5h3kg6njs8df33mbjx6j4k1vd3m9lkba"))))
+ "1qw0p9qh78bvkgi38ba58djwn0rd5j1lrkg2c2wk5wb7snj3rw9m"))))
(build-system python-build-system)
(propagated-inputs
- `(("python-django" ,python-django)))
+ `(("python-django" ,python-django)
+ ("python-six" ,python-six)))
(home-page "https://github.com/django-compressor/django-appconf")
(synopsis "Handle configuration defaults of packaged Django apps")
(description
(define-public python2-django-statici18n
(package-with-python2 python-django-statici18n))
+
+(define-public pootle
+ (package
+ (name "pootle")
+ (version "2.8.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Pootle" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1ng8igq0alsqzasgxdh3fb23581anyzp121h9041pwdzzv98kn4m"))))
+ (build-system python-build-system)
+ (arguments
+ `(; pootle supports only python2.
+ #:python ,python-2
+ ;; tests are not run and fail with "pytest_pootle/data/po/.tmp: No such
+ ;; file or directory". If we create this directory,
+ ;; pytest_pootle/data/po/terminology.po is missing.
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-requirements
+ (lambda _
+ (substitute* "Pootle.egg-info/requires.txt"
+ (("1.7.3") "1.8.0")
+ (("2.0.0") "2.1.0"))
+ (substitute* "requirements/tests.txt"
+ (("==3.0.6") ">=3.0.6"))
+ (substitute* "requirements/base.txt"
+ (("1.7.3") "1.8.0")
+ (("2.0.0") "2.1.0")))))))
+ (propagated-inputs
+ `(("django-allauth" ,python2-django-allauth)
+ ("django-assets" ,python2-django-assets)
+ ("django-bulk-update" ,python2-django-bulk-update)
+ ("django-contact-form" ,python2-django-contact-form)
+ ("django-contrib-comments" ,python2-django-contrib-comments)
+ ("django-overextends" ,python2-django-overextends)
+ ("django-redis" ,python2-django-redis)
+ ("django-rq" ,python2-django-rq)
+ ("django-sortedm2m" ,python2-django-sortedm2m)
+ ("django-statici18n" ,python2-django-statici18n)
+ ("babel" ,python2-babel)
+ ("cssmin" ,python2-cssmin)
+ ("diff-match-patch" ,python2-diff-match-patch)
+ ("dirsync" ,python2-dirsync)
+ ("elasticsearch" ,python2-elasticsearch)
+ ("jsonfield" ,python2-django-jsonfield)
+ ("lxml" ,python2-lxml)
+ ("dateutil" ,python2-dateutil)
+ ("levenshtein" ,python2-levenshtein)
+ ("mysqlclient" ,python2-mysqlclient)
+ ("psycopg2" ,python2-psycopg2)
+ ("pytz" ,python2-pytz)
+ ("rq" ,python2-rq)
+ ("scandir" ,python2-scandir)
+ ("stemming" ,python2-stemming)
+ ("translate-toolkit" ,python2-translate-toolkit)))
+ (native-inputs
+ `(("python2-pytest" ,python2-pytest)
+ ("python2-pytest-django" ,python2-pytest-django)
+ ("python2-pytest-catchlog" ,python2-pytest-catchlog)
+ ("python2-pytest-cov" ,python2-pytest-cov)
+ ("python2-factory-boy" ,python2-factory-boy)))
+ (home-page "http://pootle.translatehouse.org/")
+ (synopsis "Community localization server")
+ (description
+ "Pootle is an online translation and localization tool. It works to
+lower the barrier of entry, providing tools to enable teams to work towards
+higher quality while welcoming newcomers.")
+ (license license:gpl3+)))
+
+(define-public python-django-tagging
+ (package
+ (name "python-django-tagging")
+ (version "0.4.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django-tagging" version))
+ (sha256
+ (base32
+ "0s7b4v45j783yaxs7rni10k24san0ya77nqz4s7zdf3jhfpk42r1"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/Fantomas42/django-tagging")
+ (synopsis "Generic tagging application for Django")
+ (description "This package provides a generic tagging application for
+Django projects, which allows association of a number of tags with any
+@code{Model} instance and makes retrieval of tags simple.")
+ (license license:bsd-3)))
+
+(define-public python2-django-tagging
+ (package-with-python2 python-django-tagging))
+
+(define-public python-djangorestframework
+ (package
+ (name "python-djangorestframework")
+ (version "3.7.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "djangorestframework" version))
+ (sha256
+ (base32
+ "11qv117gqwswxjljs7wafxg1hyzzlx3qrviwlk9hw41bsbl997lz"))))
+ (build-system python-build-system)
+ (arguments
+ '(;; No included tests
+ #:tests? #f))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
+ (home-page "https://www.django-rest-framework.org")
+ (synopsis "Toolkit for building Web APIs with Django")
+ (description
+ "The Django REST framework is for building Web APIs with Django. It
+provides features like a web browseable API and authentication policies.")
+ (license license:bsd-2)))
+
+(define-public python-django-crispy-forms
+ (package
+ (name "python-django-crispy-forms")
+ (version "1.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django-crispy-forms" version))
+ (sha256
+ (base32
+ "0pv7y648i8iz7mf64gkjizpbx5d01ap2s4vqqa30n38if6wvlljr"))))
+ (build-system python-build-system)
+ (arguments
+ '(;; No included tests
+ #:tests? #f))
+ (propagated-inputs
+ `(("python-django" ,python-django)))
+ (home-page
+ "http://github.com/maraujop/django-crispy-forms")
+ (synopsis "Tool to control Django forms without custom templates")
+ (description
+ "@code{django-crispy-forms} lets you easily build, customize and reuse
+forms using your favorite CSS framework, without writing template code.")
+ (license license:expat)))
+
+(define-public python-django-override-storage
+ (package
+ (name "python-django-override-storage")
+ (version "0.1.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "django-override-storage" version))
+ (sha256
+ (base32
+ "0sqz1mh0yn8b1bzz2gr2azfiynljigm5gkzavp5n17zd3j2jg57x"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-django" ,python-django)))
+ (home-page
+ "https://github.com/danifus/django-override-storage")
+ (synopsis "Django test helpers to manage file storage side effects")
+ (description
+ "This project provides tools to help reduce the side effects of using
+FileFields during tests.")
+ (license license:expat)))