Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / django.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
5 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages django)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system python)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages databases)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages python)
32 #:use-module (gnu packages python-web)
33 #:use-module (gnu packages time))
34
35 (define-public python-django
36 (package
37 (name "python-django")
38 (version "1.10.8")
39 (source (origin
40 (method url-fetch)
41 (uri (pypi-uri "Django" version))
42 (sha256
43 (base32
44 "1fwqqh2zbcy9dy0lnvk338s11llnnfz2k56bf84w0wv56ayq7vyl"))))
45 (build-system python-build-system)
46 (arguments
47 '(#:phases
48 (modify-phases %standard-phases
49 (add-before 'check 'set-tzdir
50 (lambda* (#:key inputs #:allow-other-keys)
51 ;; The test-suite tests timezone-dependent functions, thus tzdata
52 ;; needs to be available.
53 (setenv "TZDIR"
54 (string-append (assoc-ref inputs "tzdata")
55 "/share/zoneinfo"))
56 #t))
57 (replace 'check
58 (lambda _
59 (setenv "PYTHONPATH"
60 (string-append ".:" (getenv "PYTHONPATH")))
61 (zero? (system* "python" "tests/runtests.py")))))))
62 ;; TODO: Install extras/django_bash_completion.
63 (native-inputs
64 `(("tzdata", tzdata)
65 ;; bcrypt and argon2-cffi are extra requirements not yet in guix
66 ;;("python-argon2-cffi" ,python-argon2-cffi) ; >= 16.1.0
67 ;;("python-bcrypt" ,python-bcrypt) ; not py-bcrypt!
68 ;; Remaining packages are test requirements taken from
69 ;; tests/requirements/py3.txt
70 ("python-docutils" ,python-docutils)
71 ;; optional for tests: ("python-geoip2" ,python-geoip2)
72 ("python-jinja2" ,python-jinja2) ; >= 2.7
73 ;; optional for tests: ("python-memcached" ,python-memcached)
74 ("python-numpy" ,python-numpy)
75 ("python-pillow" ,python-pillow)
76 ("python-pyyaml" ,python-pyyaml)
77 ("python-pytz" ,python-pytz)
78 ;; optional for tests: ("python-selenium" ,python-selenium)
79 ("python-sqlparse" ,python-sqlparse)
80 ("python-tblib" ,python-tblib)))
81 (home-page "http://www.djangoproject.com/")
82 (synopsis "High-level Python Web framework")
83 (description
84 "Django is a high-level Python Web framework that encourages rapid
85 development and clean, pragmatic design. It provides many tools for building
86 any Web site. Django focuses on automating as much as possible and adhering
87 to the @dfn{don't repeat yourself} (DRY) principle.")
88 (license license:bsd-3)
89 (properties `((python2-variant . ,(delay python2-django))
90 (cpe-name . "django")))))
91
92 (define-public python2-django
93 (let ((base (package-with-python2 (strip-python2-variant python-django))))
94 (package
95 (inherit base)
96 (native-inputs
97 `(;; Test requirements for Python 2 taken from
98 ;; tests/requirements/py3.txt: enum34 and mock.
99 ("python2-enum34" ,python2-enum34)
100 ("python2-mock" ,python2-mock)
101 ;; When adding memcached mind: for Python 2 memcached <= 1.53 is
102 ;; required.
103 ,@(package-native-inputs base))))))
104
105 (define-public python-django-simple-math-captcha
106 (package
107 (name "python-django-simple-math-captcha")
108 (version "1.0.7")
109 (source (origin
110 (method url-fetch)
111 (uri (pypi-uri "django-simple-math-captcha" version))
112 (sha256
113 (base32
114 "0906hms6y6znjhpd0g4wmzv9vcla4brkdpsm4zha9zdj8g5vq2hd"))))
115 (build-system python-build-system)
116 (arguments
117 ;; FIXME: Upstream uses a 'runtests.py' script that is not
118 ;; present in the pypi tarball.
119 '(#:tests? #f))
120 (propagated-inputs
121 `(("python-django" ,python-django)))
122 (home-page "https://github.com/alsoicode/django-simple-math-captcha")
123 (synopsis "Easy-to-use math field/widget captcha for Django forms")
124 (description
125 "A multi-value-field that presents a human answerable question,
126 with no settings.py configuration necessary, but instead can be configured
127 with arguments to the field constructor.")
128 (license license:asl2.0)))
129
130 (define-public python2-django-simple-math-captcha
131 (package-with-python2 python-django-simple-math-captcha))
132
133 (define-public python-pytest-django
134 (package
135 (name "python-pytest-django")
136 (version "3.1.2")
137 (source (origin
138 (method url-fetch)
139 (uri (pypi-uri "pytest-django" version))
140 (sha256
141 (base32
142 "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303"))))
143 (build-system python-build-system)
144 (arguments
145 `(#:tests? #f ; FIXME: How to run tests?
146 #:phases
147 (modify-phases %standard-phases
148 (add-after 'unpack 'patch-setuppy
149 (lambda _
150 (substitute* "setup.py"
151 (("setuptools_scm==1.11.1") "setuptools_scm"))
152 #t)))))
153 (native-inputs
154 `(("python-django" ,python-django)
155 ("python-setuptools-scm" ,python-setuptools-scm)))
156 (propagated-inputs
157 `(("python-pytest" ,python-pytest)))
158 (home-page "http://pytest-django.readthedocs.org/")
159 (synopsis "Django plugin for py.test")
160 (description "Pytest-django is a plugin for py.test that provides a set of
161 useful tools for testing Django applications and projects.")
162 (license license:bsd-3)))
163
164 (define-public python2-pytest-django
165 (package-with-python2 python-pytest-django))
166
167 (define-public python-django-filter
168 (package
169 (name "python-django-filter")
170 (version "0.14.0")
171 (source (origin
172 (method url-fetch)
173 (uri (pypi-uri "django-filter" version))
174 (sha256
175 (base32
176 "0f78hmk8c903zwfzlsiw7ivgag81ymmb5hi73rzxbhnlg2v0l3fx"))))
177 (build-system python-build-system)
178 (arguments
179 '(#:phases
180 (modify-phases %standard-phases
181 (replace 'check
182 (lambda _
183 (zero? (system* "python" "runtests.py")))))))
184 (native-inputs
185 `(("python-django" ,python-django)
186 ("python-mock" ,python-mock)))
187 (home-page "https://django-filter.readthedocs.io/en/latest/")
188 (synopsis "Reusable Django application to filter querysets dynamically")
189 (description
190 "Django-filter is a generic, reusable application to alleviate writing
191 some of the more mundane bits of view code. Specifically, it allows users to
192 filter down a queryset based on a model’s fields, displaying the form to let
193 them do this.")
194 (license license:bsd-3)))
195
196 (define-public python2-django-filter
197 (package-with-python2 python-django-filter))
198
199 (define-public python-django-allauth
200 (package
201 (name "python-django-allauth")
202 (version "0.30.0")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (pypi-uri "django-allauth" version))
207 (sha256
208 (base32
209 "1fslqc5qqb0b66yscvkyjwfv8cnbfx5nlkpnwimyb3pf1nc1w7r3"))))
210 (build-system python-build-system)
211 (arguments
212 '(#:phases
213 (modify-phases %standard-phases
214 ;; TODO: Tagging the tests requiring the web could be done upstream.
215 (add-before 'check 'skip-test-requiring-network-access
216 (lambda _
217 (substitute* "allauth/socialaccount/providers/openid/tests.py"
218 (("def test_login")
219 "from django.test import tag
220 @tag('requires-web')
221 def test_login"))))
222 (replace 'check
223 (lambda _
224 (setenv "DJANGO_SETTINGS_MODULE" "test_settings")
225 (zero? (system*
226 "django-admin"
227 "test"
228 "allauth"
229 "--verbosity=2"
230 "--exclude-tag=requires-web")))))))
231 (propagated-inputs
232 `(("python-openid" ,python-openid)
233 ("python-requests" ,python-requests)
234 ("python-requests-oauthlib" ,python-requests-oauthlib)))
235 (native-inputs
236 `(("python-mock" ,python-mock)))
237 (inputs
238 `(("python-django" ,python-django)))
239 (home-page "https://github.com/pennersr/django-allauth")
240 (synopsis "Set of Django applications addressing authentication")
241 (description
242 "Integrated set of Django applications addressing authentication,
243 registration, account management as well as 3rd party (social)
244 account authentication.")
245 (license license:expat)))
246
247 (define-public python2-django-allauth
248 (package-with-python2 python-django-allauth))
249
250 (define-public python-django-gravatar2
251 (package
252 (name "python-django-gravatar2")
253 (version "1.4.0")
254 (source
255 (origin
256 (method url-fetch)
257 (uri (pypi-uri "django-gravatar2" version))
258 (sha256
259 (base32
260 "1v4qyj6kms321yw0z2g1kch6b2dskmv6fjd6sfxzwr4xshq9mccl"))))
261 (build-system python-build-system)
262 (inputs
263 `(("python-django" ,python-django)))
264 (home-page "https://github.com/twaddington/django-gravatar")
265 (synopsis "Gravatar support for Django, improved version")
266 (description
267 "Essential Gravatar support for Django. Features helper methods,
268 templatetags and a full test suite.")
269 (license license:expat)))
270
271 (define-public python2-django-gravatar2
272 (package-with-python2 python-django-gravatar2))
273
274 (define-public python-django-assets
275 (package
276 (name "python-django-assets")
277 (version "0.12")
278 (source (origin
279 (method url-fetch)
280 (uri (pypi-uri "django-assets" version))
281 (sha256
282 (base32
283 "0y0007fvkn1rdlj2g0y6k1cnkx53kxab3g8i85i0rd58k335p365"))))
284 (build-system python-build-system)
285 (arguments
286 `(#:phases
287 (modify-phases %standard-phases
288 (add-before 'check 'fix-tests
289 (lambda _
290 (begin
291 ;; https://github.com/miracle2k/django-assets/issues/87
292 (substitute* "tests/__init__.py"
293 (("settings.configure.*")
294 (string-append
295 "settings.configure(\n"
296 "INSTALLED_APPS=['django_assets', "
297 "'django.contrib.staticfiles'],\n"
298 "TEMPLATES=[{'BACKEND': "
299 "'django.template.backends.django.DjangoTemplates'}],\n"
300 ")\n")))
301 ;; These tests fail
302 (substitute* "tests/test_django.py"
303 (("TestLoader") "NoTestLoader"))))))))
304 (native-inputs
305 `(("python-nose" ,python-nose)))
306 (propagated-inputs
307 `(("python-django" ,python-django)
308 ("python-webassets" ,python-webassets)))
309 (home-page "https://github.com/miracle2k/django-assets")
310 (synopsis "Asset management for Django")
311 (description
312 "Asset management for Django, to compress and merge CSS and Javascript
313 files. Integrates the webassets library with Django, adding support for
314 merging, minifying and compiling CSS and Javascript files.")
315 (license license:bsd-2)))
316
317 (define-public python2-django-assets
318 (package-with-python2 python-django-assets))
319
320 (define-public python-django-jsonfield
321 (package
322 (name "python-django-jsonfield")
323 (version "1.0.3")
324 (source (origin
325 (method url-fetch)
326 (uri (pypi-uri "jsonfield" version))
327 (sha256
328 (base32
329 "19x4lak0hg9c20r7mvf27w7i8r6i4sg2g0ypmlmp2665fnk76zvy"))))
330 (build-system python-build-system)
331 (arguments
332 `(#:phases
333 (modify-phases %standard-phases
334 (add-before 'check 'fix-tests
335 (lambda _
336 (substitute* "jsonfield/tests.py"
337 (("django.forms.util") "django.forms.utils")))))))
338 (propagated-inputs
339 `(("python-django" ,python-django)))
340 (home-page "https://github.com/bradjasper/django-jsonfield")
341 (synopsis "Store validated JSON in your model")
342 (description
343 "Django-jsonfield is a reusable Django field that allows you to store
344 validated JSON in your model. It silently takes care of serialization. To
345 use, simply add the field to one of your models.")
346 (license license:expat)))
347
348 (define-public python2-django-jsonfield
349 (package-with-python2 python-django-jsonfield))
350
351 (define-public python-dj-database-url
352 (package
353 (name "python-dj-database-url")
354 (version "0.4.2")
355 (source (origin
356 (method url-fetch)
357 (uri (pypi-uri "dj-database-url" version))
358 (sha256
359 (base32
360 "024zbkc5rli4hia9lz9g8kf1zxhb2gwawj5abf67i7gf8n22v0x6"))))
361 (build-system python-build-system)
362 (home-page "https://github.com/kennethreitz/dj-database-url")
363 (synopsis "Use Database URLs in your Django Application")
364 (description
365 "This simple Django utility allows you to utilize the 12factor inspired
366 DATABASE_URL environment variable to configure your Django application.
367
368 The dj_database_url.config method returns a Django database connection
369 dictionary, populated with all the data specified in your URL. There is also a
370 conn_max_age argument to easily enable Django’s connection pool.")
371 (license license:bsd-2)))
372
373 (define-public python2-dj-database-url
374 (package-with-python2 python-dj-database-url))
375
376 (define-public python-django-bulk-update
377 (package
378 (name "python-django-bulk-update")
379 (version "1.1.10")
380 (source (origin
381 (method url-fetch)
382 (uri (pypi-uri "django-bulk-update" version))
383 (sha256
384 (base32
385 "0mbng9m7swfc0dnidipbzlxfhlfjrv755dlnha5s4m9mgdxb1fhc"))))
386 (build-system python-build-system)
387 (arguments
388 ;; tests don't support django 1.10, but the module seems to work.
389 `(#:tests? #f))
390 (native-inputs
391 `(("six" ,python-six)
392 ("jsonfield" ,python-django-jsonfield)
393 ("python-dj-database-url" ,python-dj-database-url)))
394 (propagated-inputs
395 `(("python-django" ,python-django)))
396 (home-page "https://github.com/aykut/django-bulk-update")
397 (synopsis "Simple bulk update over Django ORM or with helper function")
398 (description
399 "Simple bulk update over Django ORM or with helper function. This
400 project aims to bulk update given objects using one query over Django ORM.")
401 (license license:expat)))
402
403 (define-public python2-django-bulk-update
404 (package-with-python2 python-django-bulk-update))
405
406 (define-public python-django-contact-form
407 (package
408 (name "python-django-contact-form")
409 (version "1.3")
410 (source (origin
411 (method url-fetch)
412 (uri (pypi-uri "django-contact-form" version))
413 (sha256
414 (base32
415 "0az590y56k5ahv4sixrkn54d3a8ig2q2z9pl6s3m4f533mx2gj17"))))
416 (build-system python-build-system)
417 (arguments
418 `(#:phases
419 (modify-phases %standard-phases
420 (replace 'check
421 (lambda _
422 ;; the next version will need "make test"
423 (and (zero? (system* "flake8" "contact_form"))
424 (zero? (system* "coverage" "run" "contact_form/runtests.py"))
425 (zero? (system* "coverage" "report" "-m" "--fail-under" "0"))))))))
426 (native-inputs
427 `(("python-coverage" ,python-coverage)
428 ("python-flake8" ,python-flake8)))
429 (propagated-inputs
430 `(("python-django" ,python-django)))
431 (home-page "https://github.com/ubernostrum/django-contact-form")
432 (synopsis "Contact form for Django")
433 (description
434 "This application provides simple, extensible contact-form functionality
435 for Django sites.")
436 (license license:bsd-3)))
437
438 (define-public python2-django-contact-form
439 (package-with-python2 python-django-contact-form))
440
441 (define-public python-django-contrib-comments
442 (package
443 (name "python-django-contrib-comments")
444 (version "1.8.0")
445 (source (origin
446 (method url-fetch)
447 (uri (pypi-uri "django-contrib-comments" version))
448 (sha256
449 (base32
450 "0bxsgw8jrkhg6r5s0z6ksfi4w8yknaqb1s9acmxd9pm3pnsnp5kx"))))
451 (build-system python-build-system)
452 (propagated-inputs
453 `(("python-django" ,python-django)))
454 (home-page "https://github.com/django/django-contrib-comments")
455 (synopsis "Comments framework")
456 (description
457 "Django used to include a comments framework; since Django 1.6 it's been
458 separated to a separate project. This is that project. This framework can be
459 used to attach comments to any model, so you can use it for comments on blog
460 entries, photos, book chapters, or anything else.")
461 (license license:bsd-3)))
462
463 (define-public python2-django-contrib-comments
464 (package-with-python2 python-django-contrib-comments))
465
466 (define-public python-django-overextends
467 (package
468 (name "python-django-overextends")
469 (version "0.4.3")
470 (source (origin
471 (method url-fetch)
472 (uri (pypi-uri "django-overextends" version))
473 (sha256
474 (base32
475 "0qc2pcf3i56pmfxh2jw7k3pgljd8xzficmkl2541n7bkcbngqfzm"))))
476 (build-system python-build-system)
477 (arguments
478 `(#:phases
479 (modify-phases %standard-phases
480 (replace 'check
481 (lambda _
482 (zero? (system* "./test_project/manage.py" "test")))))))
483 (propagated-inputs
484 `(("python-django" ,python-django)))
485 (native-inputs
486 `(("sphinx-me" ,python-sphinx-me)))
487 (home-page "https://github.com/stephenmcd/django-overextends")
488 (synopsis "Circular template inheritance")
489 (description
490 "A Django reusable app providing the overextends template tag, a drop-in
491 replacement for Django's extends tag, which allows you to use circular template
492 inheritance. The primary use-case for overextends is to simultaneously
493 override and extend templates from other reusable apps, in your own Django
494 project.")
495 (license license:bsd-2)))
496
497 (define-public python2-django-overextends
498 (package-with-python2 python-django-overextends))
499
500 (define-public python-django-redis
501 (package
502 (name "python-django-redis")
503 (version "4.7.0")
504 (source (origin
505 (method url-fetch)
506 (uri (pypi-uri "django-redis" version))
507 (sha256
508 (base32
509 "0yyyxv8n9l9dhs893jsqwg2cxqkkc79g719n9dzzzqgkzialv1c1"))))
510 (build-system python-build-system)
511 (arguments
512 `(#:phases
513 (modify-phases %standard-phases
514 (replace 'check
515 (lambda _
516 (and (zero? (system* "redis-server" "--daemonize" "yes"))
517 (with-directory-excursion "tests"
518 (zero? (system* "python" "runtests.py")))))))))
519 (native-inputs
520 `(("python-fakeredis" ,python-fakeredis)
521 ("python-hiredis" ,python-hiredis)
522 ("python-mock" ,python-mock)
523 ("python-msgpack" ,python-msgpack)
524 ("redis" ,redis)))
525 (propagated-inputs
526 `(("python-django" ,python-django)
527 ("python-redis" ,python-redis)))
528 (home-page "https://github.com/niwibe/django-redis")
529 (synopsis "Full featured redis cache backend for Django")
530 (description
531 "Full featured redis cache backend for Django.")
532 (license license:bsd-3)))
533
534 (define-public python2-django-redis
535 (package-with-python2 python-django-redis))
536
537 (define-public python-django-rq
538 (package
539 (name "python-django-rq")
540 (version "0.9.4")
541 (source (origin
542 (method url-fetch)
543 (uri (pypi-uri "django-rq" version))
544 (sha256
545 (base32
546 "04v8ilfdp10bk31fxgh4cn083gsn5m06342cnpm5d10nd8hc0vky"))))
547 (build-system python-build-system)
548 (arguments
549 `(#:phases
550 (modify-phases %standard-phases
551 (replace 'check
552 (lambda _
553 (and (zero? (system* "redis-server" "--daemonize" "yes"))
554 (zero? (system* "django-admin.py" "test" "django_rq"
555 "--settings=django_rq.test_settings"
556 "--pythonpath="))))))))
557 (native-inputs
558 `(("redis" ,redis)))
559 (propagated-inputs
560 `(("python-django" ,python-django)
561 ("python-rq" ,python-rq)))
562 (home-page "https://github.com/ui/django-rq")
563 (synopsis "Django integration with RQ")
564 (description
565 "Django integration with RQ, a Redis based Python queuing library.
566 Django-RQ is a simple app that allows you to configure your queues in django's
567 settings.py and easily use them in your project.")
568 (license license:expat)))
569
570 (define-public python2-django-rq
571 (package-with-python2 python-django-rq))
572
573 (define-public python-django-sortedm2m
574 (package
575 (name "python-django-sortedm2m")
576 (version "1.3.3")
577 (source (origin
578 (method url-fetch)
579 (uri (pypi-uri "django-sortedm2m" version))
580 (sha256
581 (base32
582 "0axf765i7b3c2s83nlph47asi8s071dhq8l7y382v1pw785s22vi"))))
583 (build-system python-build-system)
584 (arguments
585 ;; no tests.
586 `(#:tests? #f))
587 (propagated-inputs
588 `(("python-django" ,python-django)))
589 (home-page "https://github.com/gregmuellegger/django-sortedm2m")
590 (synopsis "Drop-in replacement for django's own ManyToManyField")
591 (description
592 "Sortedm2m is a drop-in replacement for django's own ManyToManyField.
593 The provided SortedManyToManyField behaves like the original one but remembers
594 the order of added relations.")
595 (license license:bsd-3)))
596
597 (define-public python2-django-sortedm2m
598 (package-with-python2 python-django-sortedm2m))
599
600 (define-public python-django-appconf
601 (package
602 (name "python-django-appconf")
603 (version "1.0.2")
604 (source (origin
605 (method url-fetch)
606 (uri (pypi-uri "django-appconf" version))
607 (sha256
608 (base32
609 "0qdjdx35g66xjsc50v0c5h3kg6njs8df33mbjx6j4k1vd3m9lkba"))))
610 (build-system python-build-system)
611 (propagated-inputs
612 `(("python-django" ,python-django)))
613 (home-page "https://github.com/django-compressor/django-appconf")
614 (synopsis "Handle configuration defaults of packaged Django apps")
615 (description
616 "This app precedes Django's own AppConfig classes that act as \"objects
617 [to] store metadata for an application\" inside Django's app loading mechanism.
618 In other words, they solve a related but different use case than
619 django-appconf and can't easily be used as a replacement. The similarity in
620 name is purely coincidental.")
621 (license license:bsd-3)))
622
623 (define-public python2-django-appconf
624 (package-with-python2 python-django-appconf))
625
626 (define-public python-django-statici18n
627 (package
628 (name "python-django-statici18n")
629 (version "1.3.0")
630 (source (origin
631 (method url-fetch)
632 (uri (pypi-uri "django-statici18n" version))
633 (sha256
634 (base32
635 "0alcf4g1nv69njhq5k3qw4mfl2k6dc18bik5nk0g1mnp3m8zyz7k"))))
636 (build-system python-build-system)
637 (propagated-inputs
638 `(("python-django" ,python-django)
639 ("django-appconf" ,python-django-appconf)))
640 (home-page "https://github.com/zyegfryed/django-statici18n")
641 (synopsis "Generate JavaScript catalog to static files")
642 (description
643 "A Django app that provides helper for generating JavaScript catalog to
644 static files.")
645 (license license:bsd-3)))
646
647 (define-public python2-django-statici18n
648 (package-with-python2 python-django-statici18n))
649
650 (define-public pootle
651 (package
652 (name "pootle")
653 (version "2.8.0rc5")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "Pootle" version ".tar.bz2"))
658 (sha256
659 (base32
660 "0m6qcpkcy22dk3ad5y2k8851kqg2w6vrkywgy4vabwbacd7r1mvn"))))
661 (build-system python-build-system)
662 (arguments
663 `(; pootle supports only python2.
664 #:python ,python-2
665 ;; tests are not run and fail with "pytest_pootle/data/po/.tmp: No such
666 ;; file or directory". If we create this directory,
667 ;; pytest_pootle/data/po/terminology.po is missing.
668 #:tests? #f
669 #:phases
670 (modify-phases %standard-phases
671 (add-before 'build 'fix-requirements
672 (lambda _
673 (substitute* "Pootle.egg-info/requires.txt"
674 (("1.7.3") "1.8.0")
675 (("2.0.0") "2.1.0"))
676 (substitute* "requirements/tests.txt"
677 (("==3.0.6") ">=3.0.6"))
678 (substitute* "requirements/base.txt"
679 (("1.7.3") "1.8.0")
680 (("2.0.0") "2.1.0")))))))
681 (propagated-inputs
682 `(("django-allauth" ,python2-django-allauth)
683 ("django-assets" ,python2-django-assets)
684 ("django-bulk-update" ,python2-django-bulk-update)
685 ("django-contact-form" ,python2-django-contact-form)
686 ("django-contrib-comments" ,python2-django-contrib-comments)
687 ("django-overextends" ,python2-django-overextends)
688 ("django-redis" ,python2-django-redis)
689 ("django-rq" ,python2-django-rq)
690 ("django-sortedm2m" ,python2-django-sortedm2m)
691 ("django-statici18n" ,python2-django-statici18n)
692 ("babel" ,python2-babel)
693 ("cssmin" ,python2-cssmin)
694 ("diff-match-patch" ,python2-diff-match-patch)
695 ("dirsync" ,python2-dirsync)
696 ("elasticsearch" ,python2-elasticsearch)
697 ("jsonfield" ,python2-django-jsonfield)
698 ("lxml" ,python2-lxml)
699 ("dateutil" ,python2-dateutil)
700 ("levenshtein" ,python2-levenshtein)
701 ("mysqlclient" ,python2-mysqlclient)
702 ("psycopg2" ,python2-psycopg2)
703 ("pytz" ,python2-pytz)
704 ("rq" ,python2-rq)
705 ("scandir" ,python2-scandir)
706 ("stemming" ,python2-stemming)
707 ("translate-toolkit" ,python2-translate-toolkit)))
708 (native-inputs
709 `(("python2-pytest-warnings" ,python2-pytest-warnings)
710 ("python2-pytest-django" ,python2-pytest-django)
711 ("python2-pytest-catchlog" ,python2-pytest-catchlog)
712 ("python2-pytest-cov" ,python2-pytest-cov)
713 ("python2-factory-boy" ,python2-factory-boy)))
714 (home-page "http://pootle.translatehouse.org/")
715 (synopsis "Community localization server")
716 (description
717 "Pootle is an online translation and localization tool. It works to
718 lower the barrier of entry, providing tools to enable teams to work towards
719 higher quality while welcoming newcomers.")
720 (license license:gpl3+)))