django.scm 26 KB

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