gnu: Add python-pyshp.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016, 2020 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018, 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
30 ;;; Copyright © 2016, 2017, 2021 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018, 2021 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
35 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
36 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
37 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
38 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
39 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
40 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
42 ;;; Copyright © 2017, 2020, 2021 Roel Janssen <roel@gnu.org>
43 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
44 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
45 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
46 ;;; Copyright © 2017, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
47 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
48 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
49 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
50 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
51 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
52 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
53 ;;; Copyright © 2018, 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
54 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
55 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
56 ;;; Copyright © 2018, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
57 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
58 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
59 ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
72 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
73 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
74 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
75 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
76 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
77 ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
78 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
79 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
80 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
81 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
82 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
83 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
84 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
85 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
86 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
87 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
88 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
89 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
90 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
91 ;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
92 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
93 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
94 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
95 ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
96 ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
97 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
98 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
99 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
100 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
101 ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
102 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
103 ;;;
104 ;;; This file is part of GNU Guix.
105 ;;;
106 ;;; GNU Guix is free software; you can redistribute it and/or modify it
107 ;;; under the terms of the GNU General Public License as published by
108 ;;; the Free Software Foundation; either version 3 of the License, or (at
109 ;;; your option) any later version.
110 ;;;
111 ;;; GNU Guix is distributed in the hope that it will be useful, but
112 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
113 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
114 ;;; GNU General Public License for more details.
115 ;;;
116 ;;; You should have received a copy of the GNU General Public License
117 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
118
119 (define-module (gnu packages python-xyz)
120 #:use-module ((guix licenses) #:prefix license:)
121 #:use-module (gnu packages)
122 #:use-module (gnu packages algebra)
123 #:use-module (gnu packages adns)
124 #:use-module (gnu packages aidc)
125 #:use-module (gnu packages attr)
126 #:use-module (gnu packages backup)
127 #:use-module (gnu packages bash)
128 #:use-module (gnu packages check)
129 #:use-module (gnu packages cmake)
130 #:use-module (gnu packages compression)
131 #:use-module (gnu packages crypto)
132 #:use-module (gnu packages databases)
133 #:use-module (gnu packages dbm)
134 #:use-module (gnu packages djvu)
135 #:use-module (gnu packages docker)
136 #:use-module (gnu packages enchant)
137 #:use-module (gnu packages file)
138 #:use-module (gnu packages fontutils)
139 #:use-module (gnu packages gcc)
140 #:use-module (gnu packages geo)
141 #:use-module (gnu packages ghostscript)
142 #:use-module (gnu packages gl)
143 #:use-module (gnu packages glib)
144 #:use-module (gnu packages gnome)
145 #:use-module (gnu packages gnupg)
146 #:use-module (gnu packages graphviz)
147 #:use-module (gnu packages graphics)
148 #:use-module (gnu packages gsasl)
149 #:use-module (gnu packages gstreamer)
150 #:use-module (gnu packages gtk)
151 #:use-module (gnu packages haskell-xyz)
152 #:use-module (gnu packages icu4c)
153 #:use-module (gnu packages image)
154 #:use-module (gnu packages imagemagick)
155 #:use-module (gnu packages jupyter)
156 #:use-module (gnu packages kerberos)
157 #:use-module (gnu packages libevent)
158 #:use-module (gnu packages libffi)
159 #:use-module (gnu packages libidn)
160 #:use-module (gnu packages linux)
161 #:use-module (gnu packages llvm)
162 #:use-module (gnu packages man)
163 #:use-module (gnu packages markup)
164 #:use-module (gnu packages maths)
165 #:use-module (gnu packages monitoring)
166 #:use-module (gnu packages multiprecision)
167 #:use-module (gnu packages networking)
168 #:use-module (gnu packages ncurses)
169 #:use-module (gnu packages openstack)
170 #:use-module (gnu packages pcre)
171 #:use-module (gnu packages pdf)
172 #:use-module (gnu packages perl)
173 #:use-module (gnu packages photo)
174 #:use-module (gnu packages pkg-config)
175 #:use-module (gnu packages python)
176 #:use-module (gnu packages python-build)
177 #:use-module (gnu packages python-check)
178 #:use-module (gnu packages python-compression)
179 #:use-module (gnu packages python-crypto)
180 #:use-module (gnu packages python-science)
181 #:use-module (gnu packages python-web)
182 #:use-module (gnu packages qt)
183 #:use-module (gnu packages rdf)
184 #:use-module (gnu packages readline)
185 #:use-module (gnu packages regex)
186 #:use-module (gnu packages sdl)
187 #:use-module (gnu packages search)
188 #:use-module (gnu packages scanner)
189 #:use-module (gnu packages shells)
190 #:use-module (gnu packages sphinx)
191 #:use-module (gnu packages ssh)
192 #:use-module (gnu packages swig)
193 #:use-module (gnu packages terminals)
194 #:use-module (gnu packages tex)
195 #:use-module (gnu packages texinfo)
196 #:use-module (gnu packages textutils)
197 #:use-module (gnu packages time)
198 #:use-module (gnu packages tls)
199 #:use-module (gnu packages version-control)
200 #:use-module (gnu packages video)
201 #:use-module (gnu packages web)
202 #:use-module (gnu packages wxwidgets)
203 #:use-module (gnu packages base)
204 #:use-module (gnu packages xml)
205 #:use-module (gnu packages xorg)
206 #:use-module (gnu packages xdisorg)
207 #:use-module (gnu packages tcl)
208 #:use-module (gnu packages bdw-gc)
209 #:use-module (gnu packages serialization)
210 #:use-module (guix packages)
211 #:use-module (guix download)
212 #:use-module (guix git-download)
213 #:use-module (guix hg-download)
214 #:use-module (guix utils)
215 #:use-module (guix build-system gnu)
216 #:use-module (guix build-system cmake)
217 #:use-module (guix build-system python)
218 #:use-module (guix build-system trivial)
219 #:use-module (srfi srfi-1)
220 #:use-module (srfi srfi-26))
221
222 (define-public python-argopt
223 (package
224 (name "python-argopt")
225 (version "0.7.0")
226 (source (origin
227 (method url-fetch)
228 (uri (pypi-uri "argopt" version))
229 (sha256
230 (base32
231 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
232 (build-system python-build-system)
233 (native-inputs
234 `(("python-coverage" ,python-coverage)
235 ("python-nose" ,python-nose)
236 ("python-setuptools" ,python-setuptools) ; Won't build without this.
237 ("python-setuptools-scm" ,python-setuptools-scm)))
238 (propagated-inputs
239 `(("python-toml" ,python-toml)
240 ("python-flake8" ,python-flake8)))
241 (home-page "https://github.com/casperdcl/argopt")
242 (synopsis "Generate a command-line interface from a docstring")
243 (description "This package provides tools to define a command line interface
244 from a docstring rather than the other way around.")
245 (license license:mpl2.0)))
246
247 (define-public python-cachetools
248 (package
249 (name "python-cachetools")
250 (version "4.2.2")
251 (source (origin
252 (method url-fetch)
253 (uri (pypi-uri "cachetools" version))
254 (sha256
255 (base32
256 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
257 (build-system python-build-system)
258 (home-page "https://github.com/tkem/cachetools/")
259 (synopsis "Extensible memoizing collections and decorators")
260 (description "This module provides various memoizing collections and
261 decorators, including variants of the Python standard library's
262 @code{lru_cache} function decorator.")
263 (license license:expat)))
264
265 (define-public python-colorful
266 (package
267 (name "python-colorful")
268 (version "0.5.4")
269 (source
270 (origin
271 (method url-fetch)
272 (uri
273 (pypi-uri "colorful" version))
274 (sha256
275 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
276 (build-system python-build-system)
277 ;; FIXME: tests cannot be computed:
278 ;; "Can't perform this operation for unregistered loader type"
279 (arguments
280 `(#:tests? #f))
281 (native-inputs
282 `(("python-coverage" ,python-coverage)
283 ("python-flake8" ,python-flake8)
284 ("python-pytest" ,python-pytest)))
285 (propagated-inputs
286 `(("python-colorama" ,python-colorama)))
287 (home-page "http://github.com/timofurrer/colorful")
288 (synopsis "Terminal string styling")
289 (description "Colorful provides an array of text styles, that can be used
290 as functions or string constants to form colored terminal output.")
291 (license license:expat)))
292
293 (define-public python-yaspin
294 (package
295 (name "python-yaspin")
296 (version "1.5.0")
297 (source
298 (origin
299 (method url-fetch)
300 (uri
301 (pypi-uri "yaspin" version))
302 (sha256
303 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
304 (build-system python-build-system)
305 (native-inputs
306 `(("python-pytest" ,python-pytest)))
307 (home-page "https://github.com/pavdmyt/yaspin")
308 (synopsis "Yet Another Terminal Spinner")
309 (description "Yaspin provides a terminal spinner to indicate the progress
310 during long operations.")
311 (license license:expat)))
312
313 (define-public python-lunr
314 (package
315 (name "python-lunr")
316 (version "0.6.0")
317 (source
318 (origin
319 (method url-fetch)
320 (uri
321 (pypi-uri "lunr" version))
322 (sha256
323 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
324 (build-system python-build-system)
325 (native-inputs
326 `(("python-mock" ,python-mock)
327 ("python-pytest" ,python-pytest)))
328 (propagated-inputs
329 `(("python-nltk" ,python-nltk-3.4)))
330 (home-page
331 "https://github.com/yeraydiazdiaz/lunr.py")
332 (synopsis "Full-text search library")
333 (description "This package provides python library for full-text search.
334 It indexes documents and provides a search interface for retrieving documents
335 that best match text queries.")
336 (license license:expat)))
337
338 (define-public python-mkdocs
339 (package
340 (name "python-mkdocs")
341 (version "1.1.2")
342 (source
343 (origin
344 (method url-fetch)
345 (uri
346 (pypi-uri "mkdocs" version))
347 (sha256
348 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
349 (build-system python-build-system)
350 (arguments
351 `(#:phases
352 (modify-phases %standard-phases
353 ;; Requirements refer to a specific version of dependencies,
354 ;; which are too old. So we patch to refer to any later version.
355 (add-after 'unpack 'patch-requirements
356 (lambda _
357 (substitute* "setup.py"
358 (("==") ">=")))))))
359 (propagated-inputs
360 `(("python-click" ,python-click)
361 ("python-jinja2" ,python-jinja2)
362 ("python-livereload" ,python-livereload)
363 ("python-lunr" ,python-lunr)
364 ("python-markdown" ,python-markdown)
365 ("python-pyyaml" ,python-pyyaml)
366 ("python-tornado" ,python-tornado)))
367 (home-page "https://www.mkdocs.org")
368 (synopsis "Project documentation with Markdown")
369 (description "MkDocs is a static site generator geared towards building
370 project documentation. Documentation source files are written in Markdown, and
371 configured with a single YAML configuration file.")
372 (license license:bsd-3)))
373
374 (define-public python-pymdown-extensions
375 (package
376 (name "python-pymdown-extensions")
377 (version "8.1.1")
378 (source
379 (origin
380 (method url-fetch)
381 (uri
382 (pypi-uri "pymdown-extensions" version))
383 (sha256
384 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
385 (build-system python-build-system)
386 ;; FIXME: "AssertionError: False is not true"
387 (arguments
388 `(#:tests? #f))
389 (propagated-inputs
390 `(("python-markdown" ,python-markdown)))
391 (home-page "https://github.com/facelessuser/pymdown-extensions")
392 (synopsis "Extension pack for Python Markdown")
393 (description "PyMdown Extensions is a collection of extensions for Python
394 Markdown. All extensions are found under the module namespace of pymdownx.")
395 (license license:expat)))
396
397 (define-public python-mkdocs-material
398 (package
399 (name "python-mkdocs-material")
400 (version "7.1.3")
401 (source
402 (origin
403 (method url-fetch)
404 (uri
405 (pypi-uri "mkdocs-material" version))
406 (sha256
407 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
408 (build-system python-build-system)
409 (arguments
410 `(#:phases
411 (modify-phases %standard-phases
412 ;; Requirement mkdocs-material-extensions
413 ;; in-turn requires mkdocs-material. This causes
414 ;; circular dependency, so we remove this requirement.
415 (add-after 'unpack 'patch-requirements
416 (lambda _
417 (substitute* "requirements.txt"
418 (("mkdocs-material-extensions.*$") "")))))))
419 (propagated-inputs
420 `(("python-markdown" ,python-markdown)
421 ("python-mkdocs" ,python-mkdocs)
422 ("python-pygments" ,python-pygments)
423 ("python-pymdown-extensions"
424 ,python-pymdown-extensions)))
425 (home-page "https://squidfunk.github.io/mkdocs-material/")
426 (synopsis "Material Design theme for MkDocs")
427 (description "This package provides a theme plugin for the static site
428 generator MkDocs.")
429 (license license:expat)))
430
431 (define-public python-slixmpp
432 (package
433 (name "python-slixmpp")
434 (version "1.5.2")
435 (source
436 (origin
437 (method git-fetch)
438 (uri
439 (git-reference
440 (url "https://lab.louiz.org/poezio/slixmpp.git")
441 (commit
442 (string-append "slix-" version))))
443 (file-name
444 (git-file-name name version))
445 (sha256
446 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
447 (build-system python-build-system)
448 (arguments
449 `(#:phases
450 (modify-phases %standard-phases
451 (add-after 'unpack 'patch
452 (lambda _
453 (substitute* "setup.py"
454 (("'CC', 'cc'")
455 "'CC', 'gcc'"))
456 #t)))))
457 (native-inputs
458 `(("cython" ,python-cython)
459 ("gnupg" ,gnupg)
460 ("pkg-config" ,pkg-config)))
461 (propagated-inputs
462 `(("python-aiodns" ,python-aiodns)
463 ("python-aiohttp" ,python-aiohttp)
464 ("python-pyasn1" ,python-pyasn1)
465 ("python-pyasn1-modules" ,python-pyasn1-modules)))
466 (inputs
467 `(("libidn" ,libidn)
468 ("python" ,python))) ; We are building a Python extension.
469 (synopsis "XMPP library without threads")
470 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
471 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
472 socket handling, the timers, the events dispatching) in order to remove all
473 threads.")
474 (home-page "https://lab.louiz.org/poezio/slixmpp")
475 (license license:expat)))
476
477 (define-public python-tenacity
478 (package
479 (name "python-tenacity")
480 (version "6.1.0")
481 (source (origin
482 (method url-fetch)
483 (uri (pypi-uri "tenacity" version))
484 (sha256
485 (base32
486 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
487 (build-system python-build-system)
488 (native-inputs
489 `(("python-setuptools-scm" ,python-setuptools-scm)
490 ("python-sphinx" ,python-sphinx)
491 ("python-tornado" ,python-tornado)
492 ("python-pytest" ,python-pytest)))
493 (propagated-inputs
494 `(("python-six" ,python-six)))
495 (arguments
496 `(#:phases (modify-phases %standard-phases
497 (replace 'check
498 (lambda _
499 (invoke "pytest")
500 #t)))))
501 (home-page "https://github.com/jd/tenacity")
502 (synopsis "Retrying library for python")
503 (description "Tenacity is a general-purpose python library to simplify the
504 task of adding retry behavior to just about anything.")
505 (license license:asl2.0)))
506
507 (define-public python-pytelegrambotapi
508 (package
509 (name "python-pytelegrambotapi")
510 (version "3.7.4")
511 (source
512 (origin
513 (method git-fetch)
514 (uri (git-reference
515 (url "https://github.com/eternnoir/pyTelegramBotAPI")
516 (commit version)))
517 (file-name (git-file-name name version))
518 (sha256
519 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
520 (build-system python-build-system)
521 (arguments
522 `(#:phases
523 (modify-phases %standard-phases
524 (replace 'check
525 (lambda* (#:key tests? #:allow-other-keys)
526 (when tests?
527 (with-directory-excursion "tests"
528 (invoke "py.test")))
529 #t)))))
530 (propagated-inputs
531 `(("python-requests" ,python-requests)))
532 (native-inputs
533 `(("python-pytest" ,python-pytest)))
534 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
535 (synopsis "Python Telegram bot api")
536 (description "This package provides a simple, but extensible Python
537 implementation for the Telegram Bot API.")
538 (license license:gpl2)))
539
540 (define-public python-colorlog
541 (package
542 (name "python-colorlog")
543 (version "4.1.0")
544 (source (origin
545 (method url-fetch)
546 (uri (pypi-uri "colorlog" version))
547 (sha256
548 (base32
549 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
550 (build-system python-build-system)
551 (native-inputs
552 `(("python-pytest" ,python-pytest)))
553 (arguments
554 `(#:phases (modify-phases %standard-phases
555 (replace 'check
556 (lambda _
557 ;; Extend PYTHONPATH so the built package will be found.
558 (setenv "PYTHONPATH"
559 (string-append (getcwd) "/build/lib:"
560 (getenv "PYTHONPATH")))
561 (invoke "pytest" "-p" "no:logging")
562 #t)))))
563 (home-page "https://github.com/borntyping/python-colorlog")
564 (synopsis "Log formatting with colors for python")
565 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
566 with Python's logging module that outputs records using terminal colors.")
567 (license license:expat)))
568
569 (define-public python-pyprind
570 (package
571 (name "python-pyprind")
572 (version "2.11.3")
573 (source (origin
574 (method url-fetch)
575 (uri (pypi-uri "PyPrind" version))
576 (sha256
577 (base32
578 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
579 (build-system python-build-system)
580 (propagated-inputs
581 `(("python-psutil" ,python-psutil)))
582 (home-page "https://github.com/rasbt/pyprind")
583 (synopsis "Python Progress Bar and Percent Indicator Utility")
584 (description "The PyPrind (Python Progress Indicator) module provides a
585 progress bar and a percentage indicator object that let you track the progress
586 of a loop structure or other iterative computation.")
587 (license license:bsd-3)))
588
589 (define-public python-gphoto2
590 (package
591 (name "python-gphoto2")
592 (version "2.2.1")
593 (source (origin
594 (method url-fetch)
595 (uri (pypi-uri "gphoto2" version))
596 (sha256
597 (base32
598 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
599 (build-system python-build-system)
600 (native-inputs
601 `(("pkg-config" ,pkg-config)))
602 (inputs
603 `(("libgphoto2" ,libgphoto2)))
604 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
605 (synopsis "Python interface to libgphoto2")
606 (description "@code{python-gphoto2} is a comprehensive Python interface
607 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
608 automatically generate the interface code.")
609 (license license:gpl3+)))
610
611 (define-public python-colour
612 (package
613 (name "python-colour")
614 (version "0.1.5")
615 (source (origin
616 (method url-fetch)
617 (uri (pypi-uri "colour" version))
618 (sha256
619 (base32
620 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
621 (build-system python-build-system)
622 (native-inputs
623 `(("python-d2to1" ,python-d2to1)))
624 (home-page "https://github.com/vaab/colour")
625 (synopsis "Convert and manipulate various color representations")
626 (description "Pythonic way to manipulate color representations (HSL, RVB,
627 web, X11, ...).")
628 (license license:expat)))
629
630 (define-public python-d2to1
631 (package
632 (name "python-d2to1")
633 (version "0.2.12.post1")
634 (source (origin
635 (method url-fetch)
636 (uri (pypi-uri "d2to1" version))
637 (sha256
638 (base32
639 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
640 (build-system python-build-system)
641 (native-inputs
642 `(("python-nose" ,python-nose)))
643 (home-page "https://github.com/embray/d2to1")
644 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
645 in python")
646 (description "The python package d2to1 (the d is for distutils) allows
647 using distutils2-like setup.cfg files for a package's metadata with a
648 distribute/setuptools setup.py script.")
649 (license license:bsd-2)))
650
651 (define-public python-rawkit
652 (package
653 (name "python-rawkit")
654 (version "0.6.0")
655 (source (origin
656 (method url-fetch)
657 (uri (pypi-uri "rawkit" version))
658 (sha256
659 (base32
660 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
661 (build-system python-build-system)
662 (native-inputs
663 `(("python-pytest" ,python-pytest)
664 ("python-mock" ,python-mock)))
665 (inputs
666 `(("libraw" ,libraw)))
667 (home-page "https://rawkit.readthedocs.io")
668 (synopsis "Ctypes-based LibRaw binding for Python")
669 (description "The rawkit package provides two modules: rawkit and libraw.
670 The rawkit module provides a high-level Pythonic interface for developing raw
671 photos, while the libraw module provides a CTypes based interface for
672 interacting with the low-level LibRaw C APIs.")
673 (license license:expat)))
674
675 (define-public python-easygui
676 (package
677 (name "python-easygui")
678 (version "0.98.1")
679 (source (origin
680 (method url-fetch)
681 (uri (pypi-uri "easygui" version))
682 (sha256
683 (base32
684 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
685 (build-system python-build-system)
686 (propagated-inputs
687 `(("python-tkinter" ,python "tk")))
688 (home-page "https://github.com/robertlugg/easygui")
689 (synopsis "GUI programming module for Python")
690 (description "EasyGUI is a module for very simple, very easy GUI
691 programming in Python. EasyGUI is different from other GUI generators in that
692 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
693 simple function calls.")
694 (license license:bsd-3)))
695
696 (define-public python-pymd4c
697 (package
698 (name "python-pymd4c")
699 (version "0.4.6.0b1")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "pymd4c" version))
704 (sha256
705 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
706 (build-system python-build-system)
707 (inputs
708 `(("md4c" ,md4c)))
709 (native-inputs
710 `(("python-flake8" ,python-flake8)
711 ("python-pkgconfig" ,python-pkgconfig)
712 ("pkg-config" ,pkg-config)))
713 (home-page "https://github.com/dominickpastore/pymd4c")
714 (synopsis "Python bindings for MD4C")
715 (description
716 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
717 to CommonMark.")
718 (license license:expat)))
719
720 (define-public python-pymediainfo
721 (package
722 (name "python-pymediainfo")
723 (version "4.1")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (pypi-uri "pymediainfo" version))
728 (sha256
729 (base32
730 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
731 (build-system python-build-system)
732 (native-inputs
733 `(("python-setuptools-scm" ,python-setuptools-scm)
734 ("python-pytest" ,python-pytest)))
735 (inputs
736 `(("libmediainfo" ,libmediainfo)))
737 (arguments
738 `(#:phases
739 (modify-phases %standard-phases
740 (add-after 'unpack 'patch-libmediainfo
741 (lambda _
742 (substitute* "pymediainfo/__init__.py"
743 (("libmediainfo.so.0")
744 (string-append (assoc-ref %build-inputs "libmediainfo")
745 "/lib/libmediainfo.so.0")))
746 #t))
747 (replace 'check
748 (lambda _
749 ;; Extend PYTHONPATH so the built package will be found.
750 (setenv "PYTHONPATH"
751 (string-append (getcwd) "/build/lib:"
752 (getenv "PYTHONPATH")))
753 ;; Skip the only failing test "test_parse_url"
754 (invoke "pytest" "-vv" "-k" "not test_parse_url")
755 #t)))))
756 (home-page
757 "https://github.com/sbraz/pymediainfo")
758 (synopsis
759 "Python wrapper for the mediainfo library")
760 (description
761 "Python wrapper for the mediainfo library to access the technical and tag
762 data for video and audio files.")
763 (license license:expat)))
764
765 (define-public python-psutil
766 (package
767 (name "python-psutil")
768 (version "5.8.0")
769 (source
770 (origin
771 (method url-fetch)
772 (uri (pypi-uri "psutil" version))
773 (sha256
774 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
775 (build-system python-build-system)
776 (arguments
777 ;; FIXME: some tests do not return and time out. Some tests fail because
778 ;; some processes survive kill().
779 '(#:tests? #f))
780 (home-page "https://github.com/giampaolo/psutil")
781 (synopsis "Library for retrieving information on running processes")
782 (description
783 "@code{psutil} (Python system and process utilities) is a library for
784 retrieving information on running processes and system utilization (CPU,
785 memory, disks, network) in Python. It is useful mainly for system monitoring,
786 profiling and limiting process resources and management of running processes.
787 It implements many functionalities offered by command line tools such as: ps,
788 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
789 iotop, uptime, pidof, tty, taskset, pmap.")
790 (properties `((python2-variant . ,(delay python2-psutil))))
791 (license license:bsd-3)))
792
793 (define-public python2-psutil
794 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
795 (package/inherit base
796 (propagated-inputs
797 `(("python2-enum34" ,python2-enum34) ;optional
798 ,@(package-propagated-inputs base))))))
799
800 (define-public python-shapely
801 (package
802 (name "python-shapely")
803 (version "1.7.1")
804 (source
805 (origin
806 (method url-fetch)
807 (uri (pypi-uri "Shapely" version))
808 (sha256
809 (base32
810 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
811 (modules '((guix build utils)))
812 (snippet
813 '(begin
814 (delete-file "shapely/speedups/_speedups.c")
815 (delete-file "shapely/vectorized/_vectorized.c")
816 #t))))
817 (build-system python-build-system)
818 (native-inputs
819 `(("python-cython" ,python-cython)
820 ("python-matplotlib" ,python-matplotlib)
821 ("python-pytest" ,python-pytest)
822 ("python-pytest-cov" ,python-pytest-cov)))
823 (inputs
824 `(("geos" ,geos)))
825 (propagated-inputs
826 `(("python-numpy" ,python-numpy)))
827 (arguments
828 `(#:phases
829 (modify-phases %standard-phases
830 (add-after 'unpack 'patch-geos-path
831 (lambda* (#:key inputs #:allow-other-keys)
832 (let ((geos (assoc-ref inputs "geos"))
833 (glibc (assoc-ref inputs ,(if (%current-target-system)
834 "cross-libc" "libc"))))
835 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
836 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
837 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
838 geos "/lib/libgeos_c.so'])"))
839 (("free = load_dll\\('c'\\)\\.free")
840 (string-append "free = load_dll('c', fallbacks=['"
841 glibc "/lib/libc.so.6']).free"))
842 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
843 (string-append "free = load_dll('c', fallbacks=['"
844 glibc "/lib/libc.so.6']).free"))))
845 #t)))))
846 (home-page "https://github.com/Toblerity/Shapely")
847 (synopsis "Library for the manipulation and analysis of geometric objects")
848 (description "Shapely is a Python package for manipulation and analysis of
849 planar geometric objects. It is based on the @code{GEOS} library.")
850 (license license:bsd-3)))
851
852 (define-public python-shortuuid
853 (package
854 (name "python-shortuuid")
855 (version "0.5.0")
856 (source
857 (origin
858 (method url-fetch)
859 (uri (pypi-uri "shortuuid" version))
860 (sha256
861 (base32
862 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
863 (build-system python-build-system)
864 (native-inputs
865 `(("python-pep8" ,python-pep8)))
866 (home-page "https://github.com/skorokithakis/shortuuid")
867 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
868 (description
869 "@code{shortuuid} is a Python library for generating concise, unambiguous
870 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
871 module and then similar looking characters are removed.")
872 (license license:bsd-3)))
873
874 (define-public python-logwrap
875 (package
876 (name "python-logwrap")
877 (version "8.2.0.post0")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "logwrap" version))
882 (sha256
883 (base32
884 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
885 (build-system python-build-system)
886 (arguments
887 `(#:tests? #f ; Tests not included in pypi release.
888 #:phases
889 (modify-phases %standard-phases
890 (replace 'check
891 (lambda* (#:key tests? #:allow-other-keys)
892 (when tests?
893 (invoke "pytest"))
894 #t)))))
895 (native-inputs
896 `(("python-cython" ,python-cython)
897 ("python-pytest" ,python-pytest)
898 ("python-setuptools-scm" ,python-setuptools-scm)
899 ("python-toml" ,python-toml)
900 ("python-wheel" ,python-wheel)))
901 (home-page "https://github.com/python-useful-helpers/logwrap")
902 (synopsis "Decorator for logging function arguments")
903 (description "This package provides a decorator to log function arguments
904 and function call return values in a human-readable way.")
905 (license license:asl2.0)))
906
907 (define-public python-clyent
908 (package
909 (name "python-clyent")
910 (version "1.2.1")
911 (source
912 (origin
913 (method url-fetch)
914 (uri (pypi-uri "clyent" version))
915 (sha256
916 (base32
917 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
918 (build-system python-build-system)
919 (native-inputs
920 `(("python-mock" ,python-mock)))
921 (home-page "https://github.com/Anaconda-Platform/clyent")
922 (synopsis "Command line client library")
923 (description "Clyent is a Python command line utility library. It is used
924 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
925 (license license:bsd-3)))
926
927 (define-public python2-clyent
928 (package-with-python2 python-clyent))
929
930 (define-public python-babel
931 (package
932 (name "python-babel")
933 (version "2.9.0")
934 (source
935 (origin
936 (method url-fetch)
937 (uri (pypi-uri "Babel" version))
938 (sha256
939 (base32
940 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
941 (build-system python-build-system)
942 (native-inputs
943 `(("python-freezegun" ,python-freezegun)
944 ("python-pytest" ,python-pytest)))
945 (propagated-inputs
946 `(("python-pytz" ,python-pytz)))
947 (arguments
948 `(#:phases (modify-phases %standard-phases
949 (replace 'check
950 (lambda _
951 (invoke "pytest" "-vv"))))))
952 (home-page "http://babel.pocoo.org/")
953 (synopsis
954 "Tools for internationalizing Python applications")
955 (description
956 "Babel is composed of two major parts:
957 - tools to build and work with gettext message catalogs
958 - a Python interface to the CLDR (Common Locale Data Repository), providing
959 access to various locale display names, localized number and date formatting,
960 etc. ")
961 (license license:bsd-3)))
962
963 (define-public python2-babel
964 (package-with-python2 python-babel))
965
966 (define-public python2-backport-ssl-match-hostname
967 (package
968 (name "python2-backport-ssl-match-hostname")
969 (version "3.5.0.1")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (pypi-uri "backports.ssl_match_hostname" version))
974 (sha256
975 (base32
976 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
977 (build-system python-build-system)
978 (arguments
979 `(#:python ,python-2
980 #:tests? #f)) ; no test target
981 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
982 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
983 (description
984 "This backport brings the ssl.match_hostname() function to users of
985 earlier versions of Python. The function checks the hostname in the
986 certificate returned by the server to which a connection has been established,
987 and verifies that it matches the intended target hostname.")
988 (license license:psfl)))
989
990 (define-public python-bidict
991 (package
992 (name "python-bidict")
993 (version "0.21.2")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "bidict" version))
998 (sha256
999 (base32
1000 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1001 (build-system python-build-system)
1002 (native-inputs
1003 `(("python-coverage" ,python-coverage)
1004 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
1005 ("python-pre-commit" ,python-pre-commit)
1006 ("python-py" ,python-py)
1007 ("python-pytest" ,python-pytest)
1008 ("python-pytest-benchmark" ,python-pytest-benchmark)
1009 ("python-pytest-cov" ,python-pytest-cov)
1010 ("python-setuptools-scm" ,python-setuptools-scm)
1011 ("python-sortedcollections" ,python-sortedcollections)
1012 ("python-sortedcontainers" ,python-sortedcontainers)
1013 ("python-sphinx" ,python-sphinx)
1014 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
1015 ("python-tox" ,python-tox)))
1016 (arguments
1017 `(#:phases (modify-phases %standard-phases
1018 (add-after 'unpack 'relax-reqs
1019 (lambda _
1020 (substitute* "setup.py"
1021 (("sortedcollections < 2") "sortedcollections"))
1022 #t))
1023 (replace 'check
1024 (lambda _ (invoke "./run_tests.py"))))))
1025 (home-page "https://bidict.readthedocs.io")
1026 (synopsis "Bidirectional mapping library")
1027 (description "The @code{bidict} library provides several data structures
1028 for working with bidirectional mappings in Python.")
1029 (license license:mpl2.0)))
1030
1031 (define-public python-bitarray
1032 (package
1033 (name "python-bitarray")
1034 (version "1.4.0")
1035 (source (origin
1036 (method url-fetch)
1037 (uri (pypi-uri "bitarray" version))
1038 (sha256
1039 (base32
1040 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1041 (build-system python-build-system)
1042 (home-page "https://github.com/ilanschnell/bitarray")
1043 (synopsis "Efficient arrays of booleans")
1044 (description "This package provides an object type which efficiently
1045 represents an array of booleans. Bitarrays are sequence types and behave very
1046 much like usual lists. Eight bits are represented by one byte in a contiguous
1047 block of memory. The user can select between two representations:
1048 little-endian and big-endian. All of the functionality is implemented in C.
1049 Methods for accessing the machine representation are provided. This can be
1050 useful when bit level access to binary files is required, such as portable
1051 bitmap image files. Also, when dealing with compressed data which uses
1052 variable bit length encoding, you may find this module useful.")
1053 (license license:psfl)))
1054
1055 (define-public python-boolean.py
1056 (package
1057 (name "python-boolean.py")
1058 (version "3.6")
1059 (source
1060 (origin
1061 ;; There's no source tarball on PyPI.
1062 (method git-fetch)
1063 (uri (git-reference
1064 (url "https://github.com/bastikr/boolean.py")
1065 (commit (string-append "v" version))))
1066 (file-name (git-file-name name version))
1067 (sha256
1068 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1069 (build-system python-build-system)
1070 (home-page "https://github.com/bastikr/boolean.py")
1071 (synopsis "Boolean algebra in one Python module")
1072 (description
1073 "This is a small Python library that implements boolean algebra.
1074 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1075 @code{Symbol} class that can take on one of these two values. Calculations
1076 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1077 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1078 Expressions are constructed from parsed strings or directly in Python.")
1079 (license license:bsd-2)))
1080
1081 (define-public python-hdf4
1082 (package
1083 (name "python-hdf4")
1084 (version "0.9")
1085 (source
1086 (origin
1087 (method url-fetch)
1088 (uri (pypi-uri name version))
1089 (sha256
1090 (base32
1091 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1092 (build-system python-build-system)
1093 (native-inputs `(("nose" ,python-nose)))
1094 (propagated-inputs `(("numpy" ,python-numpy)))
1095 (inputs
1096 `(("hdf4" ,hdf4)
1097 ("libjpeg" ,libjpeg-turbo)
1098 ("zlib" ,zlib)))
1099 (arguments
1100 `(#:phases
1101 (modify-phases %standard-phases
1102 (replace 'check
1103 (lambda _
1104 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
1105 ;; on to import numpy. Somehow this works on their CI system.
1106 ;; Let's just manage PYTHONPATH here instead.
1107 (substitute* "runexamples.sh"
1108 (("export PYTHONPATH=.*") ""))
1109 (setenv "PYTHONPATH"
1110 (string-append (getcwd) ":"
1111 (getenv "PYTHONPATH")))
1112 (invoke "./runexamples.sh")
1113 (invoke "nosetests" "-v"))))))
1114 (home-page "https://github.com/fhs/python-hdf4")
1115 (synopsis "Python interface to the NCSA HDF4 library")
1116 (description
1117 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1118 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1119 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1120 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1121 (license license:expat)))
1122
1123 (define-public python-h5py
1124 (package
1125 (name "python-h5py")
1126 (version "2.10.0")
1127 (source
1128 (origin
1129 (method url-fetch)
1130 (uri (pypi-uri "h5py" version))
1131 (sha256
1132 (base32
1133 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1134 (build-system python-build-system)
1135 (arguments
1136 `(#:tests? #f ; no test target
1137 #:phases
1138 (modify-phases %standard-phases
1139 (add-after 'unpack 'fix-hdf5-paths
1140 (lambda* (#:key inputs #:allow-other-keys)
1141 (let ((prefix (assoc-ref inputs "hdf5")))
1142 (substitute* "setup_build.py"
1143 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1144 (string-append "['" prefix "/lib" "']"))
1145 (("'/opt/local/include', '/usr/local/include'")
1146 (string-append "'" prefix "/include" "'")))
1147 (substitute* "setup_configure.py"
1148 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1149 (string-append "['" prefix "/lib" "']")))
1150 #t))))))
1151 (propagated-inputs
1152 `(("python-six" ,python-six)
1153 ("python-numpy" ,python-numpy)))
1154 (inputs
1155 `(("hdf5" ,hdf5-1.10)))
1156 (native-inputs
1157 `(("python-cython" ,python-cython)
1158 ("python-pkgconfig" ,python-pkgconfig)
1159 ("pkg-config" ,pkg-config)))
1160 (home-page "https://www.h5py.org/")
1161 (synopsis "Read and write HDF5 files from Python")
1162 (description
1163 "The h5py package provides both a high- and low-level interface to the
1164 HDF5 library from Python. The low-level interface is intended to be a
1165 complete wrapping of the HDF5 API, while the high-level component supports
1166 access to HDF5 files, datasets and groups using established Python and NumPy
1167 concepts.")
1168 (license license:bsd-3)))
1169
1170 (define-public python2-h5py
1171 (package-with-python2 python-h5py))
1172
1173 (define-public python-pyls-black
1174 (package
1175 (name "python-pyls-black")
1176 (version "0.4.6")
1177 (source
1178 (origin
1179 ;; There are no tests in the PyPI tarball.
1180 (method git-fetch)
1181 (uri (git-reference
1182 (url "https://github.com/rupert/pyls-black/")
1183 (commit (string-append "v" version))))
1184 (file-name (git-file-name name version))
1185 (sha256
1186 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1187 (build-system python-build-system)
1188 (arguments
1189 `(#:test-target "pytest"))
1190 (propagated-inputs
1191 `(("python-black" ,python-black)
1192 ("python-language-server"
1193 ,python-language-server)
1194 ("python-toml" ,python-toml)))
1195 (native-inputs
1196 `(("python-flake8" ,python-flake8)
1197 ("python-isort" ,python-isort)
1198 ("python-mypy" ,python-mypy)
1199 ("python-pytest" ,python-pytest)
1200 ("python-pytest-runner" ,python-pytest-runner)))
1201 (home-page "https://github.com/rupert/pyls-black")
1202 (synopsis "Black plugin for the Python Language Server")
1203 (description "Black plugin for the Python Language Server.")
1204 (license license:expat)))
1205
1206 (define-public python-sh
1207 (package
1208 (name "python-sh")
1209 (version "1.12.14")
1210 (source
1211 (origin
1212 (method url-fetch)
1213 (uri (pypi-uri "sh" version))
1214 (sha256
1215 (base32
1216 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1217 (build-system python-build-system)
1218 (arguments
1219 '(#:phases
1220 (modify-phases %standard-phases
1221 (replace 'check
1222 (lambda _
1223 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1224 (setenv "HOME" "/tmp")
1225 (invoke "python" "sh.py" "test"))))))
1226 (native-inputs
1227 `(("python-coverage" ,python-coverage)))
1228 (home-page "https://github.com/amoffat/sh")
1229 (synopsis "Python subprocess replacement")
1230 (description "This package provides a replacement for Python's
1231 @code{subprocess} feature.")
1232 (license license:expat)))
1233
1234 (define-public python-cftime
1235 (package
1236 (name "python-cftime")
1237 (version "1.0.4.2")
1238 (source
1239 (origin
1240 (method url-fetch)
1241 (uri (pypi-uri "cftime" version))
1242 (sha256
1243 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1244 (build-system python-build-system)
1245 (propagated-inputs
1246 `(("python-numpy" ,python-numpy)))
1247 (native-inputs
1248 `(("python-coveralls" ,python-coveralls)
1249 ("python-cython" ,python-cython)
1250 ("python-pytest-cov" ,python-pytest-cov)))
1251 (home-page "https://github.com/Unidata/cftime")
1252 (synopsis "Library for time handling")
1253 (description
1254 "This package provides time-handling functionality that used to be part
1255 of the netcdf4 package before.")
1256 ;; This package claims to include code under the GPLv3 but is released
1257 ;; under ISC.
1258 (license (list license:isc license:gpl3+))))
1259
1260 (define-public python-netcdf4
1261 (package
1262 (name "python-netcdf4")
1263 (version "1.5.3")
1264 (source
1265 (origin
1266 (method url-fetch)
1267 (uri (pypi-uri "netCDF4" version))
1268 (sha256
1269 (base32
1270 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1271 (build-system python-build-system)
1272 (arguments
1273 '(#:phases
1274 (modify-phases %standard-phases
1275 (add-after 'unpack 'configure-locations
1276 (lambda* (#:key inputs #:allow-other-keys)
1277 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1278 #t)))))
1279 (native-inputs
1280 `(("python-cython" ,python-cython)))
1281 (propagated-inputs
1282 `(("python-numpy" ,python-numpy)
1283 ("python-cftime" ,python-cftime)))
1284 (inputs
1285 `(("netcdf" ,netcdf)
1286 ("hdf4" ,hdf4)
1287 ("hdf5" ,hdf5)))
1288 (home-page "https://github.com/Unidata/netcdf4-python")
1289 (synopsis "Python/numpy interface to the netCDF library")
1290 (description "Netcdf4-python is a Python interface to the netCDF C
1291 library. netCDF version 4 has many features not found in earlier
1292 versions of the library and is implemented on top of HDF5. This module
1293 can read and write files in both the new netCDF 4 and the old netCDF 3
1294 format, and can create files that are readable by HDF5 clients. The
1295 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1296 to users of that module.")
1297 ;; The software is mainly ISC, but includes some files covered
1298 ;; by the Expat license.
1299 (license (list license:isc license:expat))))
1300
1301 (define-public python-license-expression
1302 (package
1303 (name "python-license-expression")
1304 (version "1.2")
1305 (source
1306 (origin
1307 (method url-fetch)
1308 (uri (pypi-uri "license-expression" version))
1309 (sha256
1310 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1311 (build-system python-build-system)
1312 (propagated-inputs
1313 `(("python-boolean.py" ,python-boolean.py)))
1314 (home-page "https://github.com/nexB/license-expression")
1315 (synopsis "Apply boolean logic to license expressions")
1316 (description
1317 "This Python module defines a tiny language to evaluate and compare
1318 license expressions using boolean logic. Logical combinations of licenses can
1319 be tested for equality, containment, and equivalence. They can be normalised
1320 and simplified. It supports SPDX license expressions as well as other naming
1321 conventions and aliases in the same expression.")
1322 (license license:gpl2+)))
1323
1324 (define-public python-lockfile
1325 (package
1326 (name "python-lockfile")
1327 (version "0.12.2")
1328 (source
1329 (origin
1330 (method url-fetch)
1331 (uri (pypi-uri "lockfile" version))
1332 (sha256
1333 (base32
1334 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1335 (build-system python-build-system)
1336 (arguments '(#:test-target "check"))
1337 (native-inputs
1338 `(("python-pbr" ,python-pbr)))
1339 (home-page "https://launchpad.net/pylockfile")
1340 (synopsis "Platform-independent file locking module")
1341 (description
1342 "The lockfile package exports a LockFile class which provides a simple
1343 API for locking files.")
1344 (license license:expat)))
1345
1346 (define-public python-fb-re2
1347 (package
1348 (name "python-fb-re2")
1349 (version "1.0.7")
1350 (source
1351 (origin
1352 (method git-fetch)
1353 (uri (git-reference
1354 (url "https://github.com/facebook/pyre2")
1355 (commit (string-append "v" version))))
1356 (file-name (git-file-name name version))
1357 (sha256
1358 (base32
1359 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1360 (build-system python-build-system)
1361 (inputs
1362 `(("re2" ,re2)))
1363 (home-page "https://github.com/facebook/pyre2")
1364 (synopsis "Python wrapper for RE2")
1365 (description "This package provides a Python extension that wraps Google's
1366 RE2 regular expression library. It implements many of the features of
1367 Python's built-in @code{re} module with compatible interfaces.")
1368 (license license:bsd-3)))
1369
1370 (define-public python-filelock
1371 (package
1372 (name "python-filelock")
1373 (version "3.0.12")
1374 (source
1375 (origin
1376 (method url-fetch)
1377 (uri (pypi-uri "filelock" version))
1378 (sha256
1379 (base32
1380 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1381 (build-system python-build-system)
1382 (home-page
1383 "https://github.com/benediktschmitt/py-filelock")
1384 (synopsis "Platform independent file lock")
1385 (description "@code{filelock} contains a single module implementing
1386 a platform independent file lock in Python, which provides a simple way of
1387 inter-process communication.")
1388 (license license:unlicense)))
1389
1390 (define-public python-semantic-version
1391 (package
1392 (name "python-semantic-version")
1393 (version "2.8.5")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (pypi-uri "semantic_version" version))
1398 (sha256
1399 (base32
1400 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1401 (build-system python-build-system)
1402 (home-page "https://github.com/rbarrois/python-semanticversion")
1403 (synopsis "Semantic versioning module for Python")
1404 (description
1405 "The @code{semantic_version} class is a small library for handling
1406 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1407
1408 It can compare versions, generate a new version that represents a bump in one of
1409 the version levels, and check whether any given string is a proper semantic
1410 version identifier.")
1411 (license license:bsd-3)))
1412
1413 (define-public python2-semantic-version
1414 (package-with-python2 python-semantic-version))
1415
1416 (define-public python-serpent
1417 (package
1418 (name "python-serpent")
1419 (version "1.28")
1420 (source
1421 (origin
1422 (method url-fetch)
1423 (uri (pypi-uri "serpent" version))
1424 (sha256
1425 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1426 (build-system python-build-system)
1427 (native-inputs
1428 `(("python-attrs" ,python-attrs)
1429 ("python-pytz" ,python-pytz)))
1430 (home-page "https://github.com/irmen/Serpent")
1431 (synopsis "Serializer for literal Python expressions")
1432 (description
1433 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1434 serialization. It serializes an object tree into bytes (an utf-8 encoded
1435 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1436 to rebuild the original object tree.
1437
1438 Because only safe literals are encoded, it is safe to send serpent data to
1439 other machines, such as over the network.")
1440 (properties `((python2-variant . ,(delay python2-serpent))))
1441 (license license:expat)))
1442
1443 (define-public python2-serpent
1444 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1445 (package/inherit base
1446 (propagated-inputs
1447 `(("python-enum34" ,python2-enum34)
1448 ,@(package-propagated-inputs base))))))
1449
1450 (define-public python-setuptools
1451 (package
1452 (name "python-setuptools")
1453 (version "52.0.0")
1454 (source
1455 (origin
1456 (method url-fetch)
1457 (uri (pypi-uri "setuptools" version))
1458 (sha256
1459 (base32
1460 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1461 (modules '((guix build utils)))
1462 (snippet
1463 '(begin
1464 ;; Remove included binaries which are used to build self-extracting
1465 ;; installers for Windows.
1466 ;; TODO: Find some way to build them ourself so we can include them.
1467 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1468 #t))))
1469 (build-system python-build-system)
1470 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1471 ;; One could bootstrap with an internal untested setuptools.
1472 (arguments
1473 `(#:tests? #f))
1474 (home-page "https://pypi.org/project/setuptools/")
1475 (synopsis
1476 "Library designed to facilitate packaging Python projects")
1477 (description
1478 "Setuptools is a fully-featured, stable library designed to facilitate
1479 packaging Python projects, where packaging includes:
1480 Python package and module definitions,
1481 distribution package metadata,
1482 test hooks,
1483 project installation,
1484 platform-specific details,
1485 Python 3 support.")
1486 ;; TODO: setuptools now bundles the following libraries:
1487 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1488 (license (list license:psfl ; setuptools itself
1489 license:expat ; six, appdirs, pyparsing
1490 license:asl2.0 ; packaging is dual ASL2/BSD-2
1491 license:bsd-2))
1492 (properties `((python2-variant . ,(delay python2-setuptools))))))
1493
1494 ;; Newer versions of setuptools no longer support Python 2.
1495 (define-public python2-setuptools
1496 (package
1497 (name "python2-setuptools")
1498 (version "41.0.1")
1499 (source
1500 (origin
1501 (method url-fetch)
1502 (uri (pypi-uri "setuptools" version ".zip"))
1503 (sha256
1504 (base32
1505 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1506 (modules '((guix build utils)))
1507 (snippet
1508 '(begin
1509 ;; Remove included binaries which are used to build self-extracting
1510 ;; installers for Windows.
1511 ;; TODO: Find some way to build them ourself so we can include them.
1512 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1513 #t))))
1514 (build-system python-build-system)
1515 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1516 ;; One could bootstrap with an internal untested setuptools.
1517 (arguments
1518 `(#:tests? #f))
1519 (native-inputs
1520 `(("unzip" ,unzip)))
1521 (home-page "https://pypi.org/project/setuptools/")
1522 (synopsis
1523 "Library designed to facilitate packaging Python projects")
1524 (description
1525 "Setuptools is a fully-featured, stable library designed to facilitate
1526 packaging Python projects, where packaging includes:
1527 Python package and module definitions,
1528 distribution package metadata,
1529 test hooks,
1530 project installation,
1531 platform-specific details,
1532 Python 3 support.")
1533 ;; TODO: setuptools now bundles the following libraries:
1534 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1535 (license (list license:psfl ; setuptools itself
1536 license:expat ; six, appdirs, pyparsing
1537 license:asl2.0 ; packaging is dual ASL2/BSD-2
1538 license:bsd-2))))
1539
1540 (define-public python-setuptools-declarative-requirements
1541 (package
1542 (name "python-setuptools-declarative-requirements")
1543 (version "1.2.0")
1544 (source
1545 (origin
1546 (method url-fetch)
1547 (uri (pypi-uri
1548 "setuptools-declarative-requirements"
1549 version))
1550 (sha256
1551 (base32
1552 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1553 (build-system python-build-system)
1554 (native-inputs
1555 `(("python-pytest" ,python-pytest)
1556 ("python-setuptools-scm" ,python-setuptools-scm)))
1557 (propagated-inputs
1558 `(("python-toml" ,python-toml)
1559 ("python-wheel" ,python-wheel)))
1560 (home-page
1561 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1562 (synopsis "File support for setuptools declarative setup.cfg")
1563 (description
1564 "This package provides file support for setuptools declarative
1565 @code{setup.cfg}.")
1566 (license license:asl2.0)))
1567
1568 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1569 (define-public python-setuptools-for-tensorflow
1570 (hidden-package
1571 (package
1572 (inherit python-setuptools)
1573 (version "39.1.0")
1574 (source (origin
1575 (inherit (package-source python-setuptools))
1576 (uri (pypi-uri "setuptools" version ".zip"))
1577 (sha256
1578 (base32
1579 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1580
1581 (define-public python-uniseg
1582 (package
1583 (name "python-uniseg")
1584 (version "0.7.1")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "uniseg" version ".zip"))
1589 (sha256
1590 (base32
1591 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1592 (build-system python-build-system)
1593 (arguments
1594 '(#:tests? #f)) ; The test suite requires network access.
1595 (native-inputs
1596 `(("unzip" ,unzip)))
1597 (home-page
1598 "https://bitbucket.org/emptypage/uniseg-python")
1599 (synopsis
1600 "Python library to determine Unicode text segmentations")
1601 (description
1602 "Uniseg is a Python package used to determine Unicode text segmentations.
1603 Supported segmentations include:
1604 @enumerate
1605 @item @dfn{Code point} (any value in the Unicode codespace)
1606 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1607 multiple Unicode code points, e.g. \"G\" + acute-accent)
1608 @item Word break
1609 @item Sentence break
1610 @item Line break
1611 @end enumerate")
1612 (license license:expat)))
1613
1614 (define-public python2-uniseg
1615 (package-with-python2 python-uniseg))
1616
1617 (define-public python-humanfriendly
1618 (package
1619 (name "python-humanfriendly")
1620 (version "8.2")
1621 (source
1622 (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "humanfriendly" version))
1625 (sha256
1626 (base32
1627 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1628 (build-system python-build-system)
1629 (arguments
1630 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1631 #:tests? #f))
1632 (home-page "https://humanfriendly.readthedocs.io")
1633 (synopsis "Human-friendly input and output in Python")
1634 (description
1635 "The functions and classes in @code{humanfriendly} can be used to make
1636 text interfaces more user-friendly. It includes tools to parse and format
1637 numbers, file sizes, and timespans, timers for long-running operations, menus
1638 to allow the user to choose from a list of options, and terminal interaction
1639 helpers.")
1640 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1641 (license license:expat)))
1642
1643 (define-public python2-humanfriendly
1644 (let ((base (package-with-python2
1645 (strip-python2-variant python-humanfriendly))))
1646 (package/inherit base
1647 (propagated-inputs
1648 `(("python2-monotonic" ,python2-monotonic)
1649 ,@(package-propagated-inputs base))))))
1650
1651 (define-public python-textparser
1652 (package
1653 (name "python-textparser")
1654 (version "0.23.0")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "textparser" version))
1659 (sha256
1660 (base32
1661 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1662 (build-system python-build-system)
1663 (home-page "https://github.com/eerimoq/textparser")
1664 (synopsis "Fast text parser for Python")
1665 (description "This library provides a text parser written in the Python
1666 language. It aims to be fast.")
1667 (license license:expat)))
1668
1669 (define-public python-aenum
1670 (package
1671 (name "python-aenum")
1672 (version "2.2.4")
1673 (source
1674 (origin
1675 (method url-fetch)
1676 (uri (pypi-uri "aenum" version))
1677 (sha256
1678 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1679 (build-system python-build-system)
1680 (arguments
1681 `(#:phases (modify-phases %standard-phases
1682 (replace 'check
1683 (lambda _
1684 (format #t "current working dir ~s~%" (getcwd))
1685 (setenv "PYTHONPATH"
1686 (string-append ".:" (getenv "PYTHONPATH")))
1687 ;; We must run the test suite module directly, as it
1688 ;; fails to define the 'tempdir' variable in scope for
1689 ;; the tests otherwise
1690 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1691 ;; issues/32/running-tests-with-python-setuppy-test).
1692 (invoke "python3" "aenum/test.py")
1693 ;; This one fails with "NameError: name
1694 ;; 'test_pickle_dump_load' is not defined" (see:
1695 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1696 ;; /error-running-the-test_v3py-test-suite).
1697 ;; (invoke "python3" "aenum/test_v3.py")
1698 #t)))))
1699 (home-page "https://bitbucket.org/stoneleaf/aenum")
1700 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1701 (description "The aenum library includes an @code{Enum} base class, a
1702 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1703 class.")
1704 (license license:bsd-3)))
1705
1706 (define-public python-can
1707 (package
1708 (name "python-can")
1709 (version "3.3.3")
1710 (source
1711 (origin
1712 (method url-fetch)
1713 (uri (pypi-uri "python-can" version))
1714 (sha256
1715 (base32
1716 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1717 (build-system python-build-system)
1718 (arguments
1719 `(#:phases (modify-phases %standard-phases
1720 (add-after 'unpack 'relax-version-requirements
1721 (lambda _
1722 (substitute* "setup.py"
1723 (("mock~=2\\.0") "mock")
1724 (("coverage<5") "coverage")
1725 (("pytest~=4\\.3") "pytest")
1726 (("hypothesis~=4\\.56") "hypothesis"))
1727 #t))
1728 (add-after 'unpack 'fix-broken-tests
1729 ;; The tests try to run two scripts it expects should be
1730 ;; in PATH, but they aren't at this time (see:
1731 ;; https://github.com/hardbyte/python-can/issues/805).
1732 (lambda _
1733 (substitute* "test/test_scripts.py"
1734 (("\"can_logger\\.py --help\"") "")
1735 (("\"can_player\\.py --help\"") ""))
1736 #t)))))
1737 (propagated-inputs
1738 `(("python-aenum" ,python-aenum)
1739 ("python-wrapt" ,python-wrapt)))
1740 (native-inputs
1741 `(("python-codecov" ,python-codecov)
1742 ("python-coverage" ,python-coverage)
1743 ("python-future" ,python-future)
1744 ("python-hypothesis" ,python-hypothesis)
1745 ("python-mock" ,python-mock)
1746 ("python-pyserial" ,python-pyserial)
1747 ("python-pytest" ,python-pytest)
1748 ("python-pytest-cov" ,python-pytest-cov)
1749 ("python-pytest-runner" ,python-pytest-runner)
1750 ("python-pytest-timeout" ,python-pytest-timeout)))
1751 (home-page "https://github.com/hardbyte/python-can")
1752 (synopsis "Controller Area Network (CAN) interface module for Python")
1753 (description "This package defines the @code{can} module, which provides
1754 controller area network (CAN) support for Python developers; providing common
1755 abstractions to different hardware devices, and a suite of utilities for
1756 sending and receiving messages on a CAN bus.")
1757 (license license:lgpl3+)))
1758
1759 (define-public python-caniusepython3
1760 (package
1761 (name "python-caniusepython3")
1762 (version "7.2.0")
1763 (source
1764 (origin
1765 (method url-fetch)
1766 (uri (pypi-uri "caniusepython3" version))
1767 (sha256
1768 (base32
1769 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1770 (build-system python-build-system)
1771 (arguments
1772 `(#:phases (modify-phases %standard-phases
1773 (add-after 'unpack 'relax-requirements
1774 (lambda _
1775 (substitute* "setup.py"
1776 ;; These are for compatibility with Python 2.
1777 ((".*'argparse', 'backports.functools_lru_cache',.*")
1778 ""))
1779 (substitute* "dev_requirements.txt"
1780 ((".*pylint.*") "")) ;not actually required
1781 #t))
1782 (replace 'check
1783 (lambda _
1784 (invoke "py.test" "-k" "not NetworkTests"))))))
1785 (propagated-inputs
1786 `(("python-distlib" ,python-distlib)
1787 ("python-packaging" ,python-packaging)
1788 ("python-requests" ,python-requests)))
1789 (native-inputs
1790 `(("python-mock" ,python-mock)
1791 ("python-pytest" ,python-pytest)))
1792 (home-page "https://github.com/brettcannon/caniusepython3")
1793 (synopsis "Check for Python 3-incompatible Python libraries")
1794 (description "The @command{caniusepython3} command scans your project and
1795 reports the Python 3-incompatible libraries it found. It can also be used as
1796 a library.")
1797 (license license:asl2.0)))
1798
1799 (define-public python-diskcache
1800 (package
1801 (name "python-diskcache")
1802 (version "4.1.0")
1803 (source
1804 (origin
1805 (method url-fetch)
1806 (uri (pypi-uri "diskcache" version))
1807 (sha256
1808 (base32
1809 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1810 (build-system python-build-system)
1811 (arguments
1812 `(#:tests? #f)) ;test suite not included in the release
1813 (home-page "http://www.grantjenks.com/docs/diskcache/")
1814 (synopsis "Disk and file backed cache library")
1815 (description "DiskCache is a disk and file backed persistent cache.")
1816 (license license:asl2.0)))
1817
1818 (define-public python-bitstruct
1819 (package
1820 (name "python-bitstruct")
1821 (version "8.9.0")
1822 (source
1823 (origin
1824 (method url-fetch)
1825 (uri (pypi-uri "bitstruct" version))
1826 (sha256
1827 (base32
1828 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1829 (build-system python-build-system)
1830 (home-page "https://github.com/eerimoq/bitstruct")
1831 (synopsis "Python values to and C bit field structs converter")
1832 (description "This module performs conversions between Python values and C
1833 bit field structs represented as Python byte strings. It is intended to have
1834 a similar interface as the @code{struct} module from Python, but working on
1835 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1836 (license license:expat)))
1837
1838 (define-public python-cantools
1839 (package
1840 (name "python-cantools")
1841 (version "33.1.1")
1842 (source
1843 (origin
1844 ;; We take the sources from the Git repository as the documentation is
1845 ;; not included with the PyPI archive.
1846 (method git-fetch)
1847 (uri (git-reference
1848 (url "https://github.com/eerimoq/cantools")
1849 (commit version)))
1850 (file-name (git-file-name name version))
1851 (sha256
1852 (base32
1853 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1854 (build-system python-build-system)
1855 (arguments
1856 `(#:phases
1857 (modify-phases %standard-phases
1858 (add-after 'build 'build-doc
1859 (lambda _
1860 ;; See: https://github.com/eerimoq/cantools/issues/190.
1861 (substitute* "README.rst"
1862 (("https://github.com/eerimoq/cantools/raw/master\
1863 /docs/monitor.png")
1864 "monitor.png"))
1865 (with-directory-excursion "docs"
1866 (invoke "make" "man" "info"))))
1867 (add-after 'install 'install-doc
1868 (lambda* (#:key outputs #:allow-other-keys)
1869 (let* ((out (assoc-ref outputs "out"))
1870 (info (string-append out "/share/info"))
1871 (man1 (string-append out "/share/man/man1")))
1872 (format #t "CWD: ~s~%" (getcwd))
1873 (install-file "docs/_build/texinfo/cantools.info" info)
1874 (install-file "docs/_build/man/cantools.1" man1)
1875 #t))))))
1876 (native-inputs
1877 `(("sphinx" ,python-sphinx)
1878 ("texinfo" ,texinfo)))
1879 (propagated-inputs
1880 `(("python-bitstruct" ,python-bitstruct)
1881 ("python-can" ,python-can)
1882 ("python-diskcache" ,python-diskcache)
1883 ("python-textparser" ,python-textparser)))
1884 (home-page "https://github.com/eerimoq/cantools")
1885 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1886 (description "This package includes Controller Area Network (CAN) related
1887 tools that can be used to:
1888 @itemize
1889 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1890 @item encode and decode CAN messages
1891 @item multiplex simple and extended signals
1892 @item diagnose DID encoding and decoding
1893 @item dump the CAN decoder output
1894 @item test CAN nodes
1895 @item generate C source code
1896 @item monitor the CAN bus
1897 @end itemize")
1898 (license license:expat)))
1899
1900 (define-public python-capturer
1901 (package
1902 (name "python-capturer")
1903 (version "2.4")
1904 (source
1905 (origin
1906 (method url-fetch)
1907 (uri (pypi-uri "capturer" version))
1908 (sha256
1909 (base32
1910 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1911 (build-system python-build-system)
1912 (arguments
1913 `(#:tests? #f))
1914 (propagated-inputs
1915 `(("python-humanfriendly" ,python-humanfriendly)))
1916 (home-page "https://capturer.readthedocs.io")
1917 (synopsis "Capture stdout and stderr streams of the current process")
1918 (description
1919 "The capturer package makes it easy to capture the stdout and stderr
1920 streams of the current process and subprocesses. Output can be relayed
1921 to the terminal in real time but is also available to the Python program
1922 for additional processing.")
1923 (license license:expat)))
1924
1925 (define-public python2-capturer
1926 (package-with-python2 python-capturer))
1927
1928 (define-public python-case
1929 (package
1930 (name "python-case")
1931 (version "1.5.3")
1932 (source
1933 (origin
1934 (method url-fetch)
1935 (uri (pypi-uri "case" version))
1936 (sha256
1937 (base32
1938 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1939 (build-system python-build-system)
1940 (propagated-inputs
1941 `(("python-mock" ,python-mock)
1942 ("python-nose" ,python-nose)
1943 ("python-six" ,python-six)
1944 ("python-unittest2" ,python-unittest2)))
1945 (native-inputs
1946 `(("python-coverage" ,python-coverage)))
1947 (home-page "https://github.com/celery/case")
1948 (synopsis "Unittest utilities and convenience methods")
1949 (description
1950 "The @code{case} package provides utilities on top of unittest, including
1951 some helpful Python 2 compatibility convenience methods.")
1952 (license license:bsd-3)))
1953
1954 (define-public python-verboselogs
1955 (package
1956 (name "python-verboselogs")
1957 (version "1.7")
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (pypi-uri "verboselogs" version))
1962 (sha256
1963 (base32
1964 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1965 (build-system python-build-system)
1966 (arguments
1967 `(#:phases
1968 (modify-phases %standard-phases
1969 (replace 'check
1970 (lambda _
1971 ;; Do not run pylint plugin test, as astroid is an old
1972 ;; unsupported version.
1973 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1974 "verboselogs/tests.py"))))))
1975 (native-inputs
1976 `(("python-mock" ,python-mock)
1977 ("python-pytest" ,python-pytest)))
1978 (home-page "https://verboselogs.readthedocs.io")
1979 (synopsis "Verbose logging level for Python's logging module")
1980 (description
1981 "The @code{verboselogs} package extends Python's @code{logging} module to
1982 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1983 (license license:expat)))
1984
1985 (define-public python2-verboselogs
1986 (package-with-python2 python-verboselogs))
1987
1988 (define-public python-coloredlogs
1989 (package
1990 (name "python-coloredlogs")
1991 (version "10.0")
1992 (source
1993 (origin
1994 (method url-fetch)
1995 (uri (pypi-uri "coloredlogs" version))
1996 (sha256
1997 (base32
1998 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1999 (build-system python-build-system)
2000 (arguments
2001 `(;Tests require some updated modules
2002 #:tests? #f))
2003 (propagated-inputs
2004 `(("python-capturer" ,python-capturer)))
2005 (home-page "https://coloredlogs.readthedocs.io")
2006 (synopsis "Colored stream handler for Python's logging module")
2007 (description
2008 "The @code{coloredlogs} package enables colored terminal output for
2009 Python's logging module. The @code{ColoredFormatter} class inherits from
2010 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2011 messages in color.")
2012 (license license:expat)))
2013
2014 (define-public python2-coloredlogs
2015 (package-with-python2 python-coloredlogs))
2016
2017 (define-public python-editorconfig
2018 (package
2019 (name "python-editorconfig")
2020 (version "0.12.2")
2021 (source
2022 (origin
2023 (method url-fetch)
2024 (uri (pypi-uri "EditorConfig" version))
2025 (sha256
2026 (base32
2027 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2028 (build-system python-build-system)
2029 (home-page "https://editorconfig.org/")
2030 (synopsis "EditorConfig bindings for python")
2031 (description "The EditorConfig project consists of a file format for
2032 defining coding styles and a collection of text editor plugins that enable
2033 editors to read the file format and adhere to defined styles. EditorConfig
2034 files are easily readable and they work nicely with version control systems.")
2035 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2036 (license (list license:bsd-2 license:psfl))))
2037
2038 (define-public dosage
2039 (package
2040 (name "dosage")
2041 (version "2.17")
2042 (source
2043 (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "dosage" version))
2046 (sha256
2047 (base32
2048 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2049 (build-system python-build-system)
2050 (propagated-inputs
2051 `(("python2-backports-functools-lru-cache"
2052 ,python2-backports-functools-lru-cache)
2053 ("python2-backports-shutil-get-terminal-size"
2054 ,python2-backports-shutil-get-terminal-size)
2055 ("python-cached-property" ,python-cached-property)
2056 ("python-colorama" ,python-colorama)
2057 ("python-imagesize" ,python-imagesize)
2058 ("python-importlib-metadata" ,python-importlib-metadata)
2059 ("python-lxml" ,python-lxml)
2060 ("python-requests" ,python-requests)
2061 ("python-six" ,python-six)))
2062 (native-inputs
2063 `(("python-pytest-cov" ,python-pytest-cov)
2064 ("python-pytest-xdist" ,python-pytest-xdist)
2065 ("python-responses" ,python-responses)
2066 ("python-setuptools-scm" ,python-setuptools-scm)))
2067 (home-page "https://github.com/webcomics/dosage")
2068 (synopsis "Comic strip downloader and archiver")
2069 (description "Dosage is designed to keep a local copy of specific webcomics and other
2070 picture-based content such as Picture of the Day sites. With the @command{dosage}
2071 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2072 downloaded, or download a strip for a particular date or index, if possible.")
2073 (license license:expat)))
2074
2075 (define-public python-et-xmlfile
2076 (package
2077 (name "python-et-xmlfile")
2078 (version "1.0.1")
2079 (source
2080 (origin
2081 (method url-fetch)
2082 (uri (pypi-uri "et_xmlfile" version))
2083 (sha256
2084 (base32
2085 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2086 (build-system python-build-system)
2087 (arguments
2088 `(#:phases (modify-phases %standard-phases
2089 (replace 'check
2090 (lambda _
2091 (invoke "pytest"))))))
2092 (native-inputs
2093 `(("python-pytest" ,python-pytest)
2094 ("python-lxml" ,python-lxml))) ;used for the tests
2095 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2096 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2097 (description "This Python library is based upon the @code{xmlfile} module
2098 from @code{lxml}. It aims to provide a low memory, compatible implementation
2099 of @code{xmlfile}.")
2100 (license license:expat)))
2101
2102 (define-public python2-et-xmlfile
2103 (package-with-python2 python-et-xmlfile))
2104
2105 (define-public python-openpyxl
2106 (package
2107 (name "python-openpyxl")
2108 (version "3.0.5")
2109 (source
2110 (origin
2111 ;; We use the upstream repository, as the tests are not included in the
2112 ;; PyPI releases.
2113 (method hg-fetch)
2114 (uri (hg-reference
2115 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2116 (changeset version)))
2117 (file-name (string-append name "-" version "-checkout"))
2118 (sha256
2119 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2120 (build-system python-build-system)
2121 (arguments
2122 `(#:phases (modify-phases %standard-phases
2123 (replace 'check
2124 (lambda _
2125 (invoke "pytest"))))))
2126 (native-inputs
2127 ;; For the test suite.
2128 `(("python-lxml" ,python-lxml)
2129 ("python-pillow" ,python-pillow)
2130 ("python-pytest" ,python-pytest)))
2131 (propagated-inputs
2132 `(("python-et-xmlfile" ,python-et-xmlfile)
2133 ("python-jdcal" ,python-jdcal)))
2134 (home-page "https://openpyxl.readthedocs.io")
2135 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2136 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2137 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2138 standard.")
2139 (properties `((python2-variant . ,(delay python2-openpyxl))))
2140 (license license:expat)))
2141
2142 (define-public python2-openpyxl
2143 (let ((base (package-with-python2
2144 (strip-python2-variant python-openpyxl))))
2145 (package
2146 (inherit base)
2147 ;; This is the latest version that has python2 support
2148 (version "2.6.4")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "openpyxl" version))
2153 (sha256
2154 (base32
2155 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2156 (arguments '(#:tests? #f))))) ; No test suite.
2157
2158 (define-public python-eventlet
2159 (package
2160 (name "python-eventlet")
2161 (version "0.25.1")
2162 (source
2163 (origin
2164 (method url-fetch)
2165 (uri (pypi-uri "eventlet" version))
2166 (sha256
2167 (base32
2168 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2169 (build-system python-build-system)
2170 (propagated-inputs
2171 `(("python-dnspython" ,python-dnspython)
2172 ("python-greenlet" ,python-greenlet)
2173 ("python-monotonic" ,python-monotonic)))
2174 (arguments
2175 ;; TODO: Requires unpackaged 'enum-compat'.
2176 '(#:tests? #f))
2177 (home-page "https://eventlet.net")
2178 (synopsis "Concurrent networking library for Python")
2179 (description
2180 "Eventlet is a concurrent networking library for Python that
2181 allows you to change how you run your code, not how you write it.
2182 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2183 Coroutines ensure that the developer uses a blocking style of programming
2184 that is similar to threading, but provide the benefits of non-blocking I/O.
2185 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2186 from the Python interpreter, or as a small part of a larger application.")
2187 (license license:expat)))
2188
2189 (define-public python-sinfo
2190 (package
2191 (name "python-sinfo")
2192 (version "0.3.4")
2193 (source (origin
2194 (method url-fetch)
2195 (uri (pypi-uri "sinfo" version))
2196 (sha256
2197 (base32
2198 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2199 (build-system python-build-system)
2200 (propagated-inputs
2201 `(("python-stdlib-list" ,python-stdlib-list)))
2202 (home-page "https://gitlab.com/joelostblom/session_info")
2203 (synopsis "Output module version information loaded in a Python session")
2204 (description "This package outputs version information for modules loaded
2205 in the current session, Python, and the OS.")
2206 (license license:bsd-3)))
2207
2208 (define-public python-six
2209 (package
2210 (name "python-six")
2211 (version "1.14.0")
2212 (source
2213 (origin
2214 (method url-fetch)
2215 (uri (pypi-uri "six" version))
2216 (sha256
2217 (base32
2218 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
2219 (build-system python-build-system)
2220 (arguments
2221 `(#:phases
2222 (modify-phases %standard-phases
2223 (replace 'check
2224 (lambda _
2225 (invoke "py.test" "-v"))))))
2226 (native-inputs
2227 `(("python-pytest" ,python-pytest-bootstrap)))
2228 (home-page "https://pypi.org/project/six/")
2229 (synopsis "Python 2 and 3 compatibility utilities")
2230 (description
2231 "Six is a Python 2 and 3 compatibility library. It provides utility
2232 functions for smoothing over the differences between the Python versions with
2233 the goal of writing Python code that is compatible on both Python versions.
2234 Six supports every Python version since 2.5. It is contained in only one
2235 Python file, so it can be easily copied into your project.")
2236 (license license:x11)))
2237
2238 (define-public python2-six
2239 (package-with-python2 python-six))
2240
2241 (define-public python-six-bootstrap
2242 (package
2243 (inherit python-six)
2244 (name "python-six-bootstrap")
2245 (native-inputs `())
2246 (arguments `(#:tests? #f))))
2247
2248 (define-public python2-six-bootstrap
2249 (package-with-python2 python-six-bootstrap))
2250
2251 (define-public python-schedule
2252 (package
2253 (name "python-schedule")
2254 (version "0.4.3")
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri (pypi-uri "schedule" version))
2259 (sha256
2260 (base32
2261 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2262 (build-system python-build-system)
2263 (native-inputs
2264 `(("python-pytest" ,python-pytest)
2265 ("python-mock" ,python-mock)))
2266 (home-page "https://github.com/dbader/schedule")
2267 (synopsis "Schedule periodic function calls in Python")
2268 (description
2269 "Schedule is an in-process scheduler for periodic jobs that uses the
2270 builder pattern for configuration. Schedule lets you run Python functions (or
2271 any other callable) periodically at pre-determined intervals using a simple,
2272 human-friendly syntax.")
2273 (license license:expat)))
2274
2275 (define-public python2-schedule
2276 (package-with-python2 python-schedule))
2277
2278 (define-public python-scour
2279 (package
2280 (name "python-scour")
2281 (version "0.38.2")
2282 (source
2283 (origin
2284 (method git-fetch)
2285 (uri
2286 (git-reference
2287 (url "https://github.com/scour-project/scour")
2288 (commit
2289 (string-append "v" version))))
2290 (file-name (git-file-name name version))
2291 (sha256
2292 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2293 (propagated-inputs
2294 `(("python-six" ,python-six)))
2295 (build-system python-build-system)
2296 (home-page "https://github.com/scour-project/scour")
2297 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2298 (description "The goal of Scour is to output a file that renders
2299 identically at a fraction of the size by removing a lot of redundant
2300 information created by most SVG editors. Optimization options are typically
2301 lossless but can be tweaked for more aggressive cleaning.")
2302 (license license:asl2.0)))
2303
2304 (define-public python-mechanize
2305 (package
2306 (name "python-mechanize")
2307 (version "0.4.5")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "mechanize" version))
2312 (sha256
2313 (base32
2314 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2315 (build-system python-build-system)
2316 (propagated-inputs
2317 `(("python-html5lib" ,python-html5lib)))
2318 (home-page "https://github.com/python-mechanize/mechanize")
2319 (synopsis
2320 "Stateful programmatic web browsing in Python")
2321 (description
2322 "Mechanize implements stateful programmatic web browsing in Python,
2323 after Andy Lester’s Perl module WWW::Mechanize.")
2324 (license license:bsd-3)))
2325
2326 (define-public python2-mechanize
2327 (package-with-python2 python-mechanize))
2328
2329 (define-public python-simpleaudio
2330 (package
2331 (name "python-simpleaudio")
2332 (version "1.0.4")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "simpleaudio" version))
2337 (sha256
2338 (base32
2339 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2340 (build-system python-build-system)
2341 (arguments
2342 `(#:tests? #f))
2343 (inputs
2344 `(("alsa-lib" ,alsa-lib)))
2345 (home-page
2346 "https://github.com/hamiltron/py-simple-audio")
2347 (synopsis "Simple, asynchronous audio playback for Python 3")
2348 (description
2349 "The @code{simplaudio} package provides cross-platform, dependency-free
2350 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2351 (license license:expat))) ; MIT license
2352
2353 (define-public python-simplejson
2354 (package
2355 (name "python-simplejson")
2356 (version "3.17.0")
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "simplejson" version))
2361 (sha256
2362 (base32
2363 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2364 (build-system python-build-system)
2365 (home-page "http://simplejson.readthedocs.org/en/latest/")
2366 (synopsis
2367 "Json library for Python")
2368 (description
2369 "JSON (JavaScript Object Notation) is a subset of JavaScript
2370 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2371 format.
2372
2373 Simplejson exposes an API familiar to users of the standard library marshal
2374 and pickle modules. It is the externally maintained version of the json
2375 library contained in Python 2.6, but maintains compatibility with Python 2.5
2376 and (currently) has significant performance advantages, even without using
2377 the optional C extension for speedups. Simplejson is also supported on
2378 Python 3.3+.")
2379 (license license:x11)))
2380
2381 (define-public python2-simplejson
2382 (package-with-python2 python-simplejson))
2383
2384
2385 (define-public python-pyicu
2386 (package
2387 (name "python-pyicu")
2388 (version "2.4.3")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "PyICU" version))
2393 (sha256
2394 (base32
2395 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2396 (build-system python-build-system)
2397 (inputs
2398 `(("icu4c" ,icu4c)))
2399 (native-inputs
2400 `(("python-pytest" ,python-pytest)
2401 ("python-six" ,python-six)))
2402 (home-page "https://github.com/ovalhub/pyicu")
2403 (synopsis "Python extension wrapping the ICU C++ API")
2404 (description
2405 "PyICU is a python extension wrapping the ICU C++ API.")
2406 (license license:x11)))
2407
2408 (define-public python2-pyicu
2409 (package-with-python2 python-pyicu))
2410
2411 (define-public python-dogtail
2412 (package
2413 (name "python-dogtail")
2414 (version "0.9.11")
2415 (source (origin
2416 (method url-fetch)
2417 (uri
2418 (string-append
2419 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2420 "dogtail-" version ".tar.gz"))
2421 (sha256
2422 (base32
2423 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2424 (build-system python-build-system)
2425 (arguments
2426 `(#:tests? #f ; TODO Launching dbus for the tests
2427 ; fails
2428 #:phases
2429 (modify-phases %standard-phases
2430 (replace 'check
2431 (lambda* (#:key tests? #:allow-other-keys)
2432 (when tests?
2433 (system "Xvfb :1 &")
2434 (setenv "DISPLAY" ":1")
2435 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2436 #t)))))
2437 (propagated-inputs
2438 `(("python-pygobject" ,python-pygobject)
2439 ("python-pycairo" ,python-pycairo)
2440 ("python-pyatspi" ,python-pyatspi)))
2441 (native-inputs
2442 `(("python-nose" ,python-nose)
2443 ("gtk+" ,gtk+)
2444 ("xvfb" ,xorg-server)
2445 ("dbus" ,dbus)
2446 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2447 ("gobject-introspection" ,gobject-introspection)))
2448 (home-page "https://gitlab.com/dogtail/dogtail/")
2449 (synopsis "GUI test tool and automation framework written in Python")
2450 (description
2451 "Dogtail is a GUI test tool and automation framework written in Python.
2452 It uses Accessibility (a11y) technologies to communicate with desktop
2453 applications. dogtail scripts are written in Python and executed like any
2454 other Python program.")
2455 (license license:gpl2+)))
2456
2457 (define-public python2-dogtail
2458 (package-with-python2 python-dogtail))
2459
2460 (define-public python-empy
2461 (package
2462 (name "python-empy")
2463 (version "3.3.3")
2464 (source (origin
2465 (method url-fetch)
2466 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2467 version ".tar.gz"))
2468 (sha256
2469 (base32
2470 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2471 (build-system python-build-system)
2472 (arguments
2473 `(#:tests? #f)) ; python2 only
2474 (home-page "http://www.alcyone.com/software/empy/")
2475 (synopsis "Templating system for Python")
2476 (description
2477 "EmPy is a system for embedding Python expressions and statements in
2478 template text; it takes an EmPy source file, processes it, and produces
2479 output. This is accomplished via expansions, which are special signals to the
2480 EmPy system and are set off by a special prefix (by default the at sign, @@).
2481 EmPy can expand arbitrary Python expressions and statements in this way, as
2482 well as a variety of special forms. Textual data not explicitly delimited in
2483 this way is sent unaffected to the output, allowing Python to be used in
2484 effect as a markup language. Also supported are callbacks via hooks,
2485 recording and playback via diversions, and dynamic, chainable filters. The
2486 system is highly configurable via command line options and embedded
2487 commands.")
2488 (license license:lgpl2.1+)))
2489
2490 (define-public python2-empy
2491 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2492 (package/inherit base
2493 (arguments `(,@(package-arguments base)
2494 #:tests? #t)))))
2495
2496 (define-public python2-element-tree
2497 (package
2498 (name "python2-element-tree")
2499 (version "1.2.6")
2500 (source (origin
2501 (method url-fetch)
2502 (uri (string-append
2503 "http://effbot.org/media/downloads/elementtree-"
2504 version "-20050316.tar.gz"))
2505 (sha256
2506 (base32
2507 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2508 (build-system python-build-system)
2509 (arguments
2510 `(#:python ,python-2 ; seems to be part of Python 3
2511 #:tests? #f)) ; no 'test' sub-command
2512 (synopsis "Toolkit for XML processing in Python")
2513 (description
2514 "ElementTree is a Python library supporting lightweight XML processing.")
2515 (home-page "https://effbot.org/zone/element-index.htm")
2516 (license (license:x11-style
2517 "http://docs.python.org/2/license.html"
2518 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2519
2520 (define-public python2-pybugz
2521 (package
2522 (name "python2-pybugz")
2523 (version "0.6.11")
2524 (source (origin
2525 (method url-fetch)
2526 (uri (string-append
2527 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2528 version ".tar.gz"))
2529 (sha256
2530 (base32
2531 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2532 (patches (search-patches "pybugz-stty.patch"
2533 "pybugz-encode-error.patch"))))
2534 (build-system python-build-system)
2535 (arguments
2536 `(#:python ,python-2 ; SyntaxError with Python 3
2537 #:tests? #f)) ; no 'test' sub-command
2538 (propagated-inputs
2539 `(("element-tree" ,python2-element-tree)))
2540 (synopsis "Python and command-line interface to Bugzilla")
2541 (description
2542 "PyBugz is a Python library and command-line tool to query the Bugzilla
2543 bug tracking system. It is meant as an aid to speed up interaction with the
2544 bug tracker.")
2545 (home-page "http://www.liquidx.net/pybugz/")
2546 (license license:gpl2)))
2547
2548 (define-public python2-enum
2549 (package
2550 (name "python2-enum")
2551 (version "0.4.6")
2552 (source (origin
2553 (method url-fetch)
2554 (uri (pypi-uri "enum" version))
2555 (sha256
2556 (base32
2557 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2558 (build-system python-build-system)
2559 (arguments
2560 `(#:python ,python-2))
2561 (home-page "https://pypi.org/project/enum/")
2562 (synopsis "Robust enumerated type support in Python")
2563 (description
2564 "This provides a module for robust enumerations in Python. It has
2565 been superseded by the Python standard library and is provided only for
2566 compatibility.")
2567 ;; Choice of either license.
2568 (license (list license:gpl3+ license:psfl))))
2569
2570 (define-public python-enum34
2571 (package
2572 (name "python-enum34")
2573 (version "1.1.6")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (pypi-uri "enum34" version))
2578 (sha256
2579 (base32
2580 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2581 (build-system python-build-system)
2582 (home-page "https://pypi.org/project/enum34/")
2583 (synopsis "Backported Python 3.4 Enum")
2584 (description
2585 "Enum34 is the new Python stdlib enum module available in Python 3.4
2586 backported for previous versions of Python from 2.4 to 3.3.")
2587 (license license:bsd-3)))
2588
2589 (define-public python2-enum34
2590 (package-with-python2 python-enum34))
2591
2592 (define-public python-parse-type
2593 (package
2594 (name "python-parse-type")
2595 (version "0.4.2")
2596 (source
2597 (origin
2598 (method url-fetch)
2599 (uri (pypi-uri "parse_type" version))
2600 (sha256
2601 (base32
2602 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2603 (build-system python-build-system)
2604 (propagated-inputs
2605 `(("python-six" ,python-six)
2606 ("python-parse" ,python-parse)))
2607 (native-inputs
2608 `(("python-pytest" ,python-pytest)
2609 ("python-pytest-runner" ,python-pytest-runner)))
2610 (home-page "https://github.com/jenisys/parse_type")
2611 (synopsis "Extended parse module")
2612 (description
2613 "Parse_type extends the python parse module.")
2614 (properties
2615 `((python2-variant . ,(delay python2-parse-type))))
2616 (license license:bsd-3)))
2617
2618 (define-public python2-parse-type
2619 (let ((base (package-with-python2
2620 (strip-python2-variant python-parse-type))))
2621 (package/inherit base
2622 (propagated-inputs
2623 `(("python2-enum34" ,python2-enum34)
2624 ,@(package-propagated-inputs base))))))
2625
2626 (define-public python-parse
2627 (package
2628 (name "python-parse")
2629 (version "1.18.0")
2630 (source
2631 (origin
2632 (method url-fetch)
2633 (uri (pypi-uri "parse" version))
2634 (sha256
2635 (base32
2636 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2637 (build-system python-build-system)
2638 (arguments
2639 `(#:phases
2640 (modify-phases %standard-phases
2641 (replace 'check
2642 (lambda _ (invoke "python" "test_parse.py"))))))
2643 (home-page "https://github.com/r1chardj0n3s/parse")
2644 (synopsis "Parse strings")
2645 (description
2646 "Parse strings using a specification based on the Python @code{format()}
2647 syntax.")
2648 (license license:x11)))
2649
2650 (define-public python-polib
2651 (package
2652 (name "python-polib")
2653 (version "1.1.0")
2654 (source (origin
2655 (method url-fetch)
2656 (uri (pypi-uri "polib" version))
2657 (sha256
2658 (base32
2659 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2660 (build-system python-build-system)
2661 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2662 (synopsis "Manipulate, create and modify gettext files")
2663 (description "Polib can manipulate any gettext format (po, pot and mo)
2664 files. It can be used to create po files from scratch or to modify
2665 existing ones.")
2666 (license license:expat)))
2667
2668 (define-public python2-polib
2669 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2670 (package/inherit base
2671 (arguments `(,@(package-arguments base)
2672 ;; Tests don't work with python2.
2673 #:tests? #f)))))
2674
2675 (define-public python-poyo
2676 (package
2677 (name "python-poyo")
2678 (version "0.5.0")
2679 (source
2680 (origin
2681 (method url-fetch)
2682 (uri (pypi-uri "poyo" version))
2683 (sha256
2684 (base32
2685 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2686 (build-system python-build-system)
2687 (home-page "https://github.com/hackebrot/poyo")
2688 (synopsis "Lightweight YAML Parser for Python")
2689 (description
2690 "This package provides a lightweight YAML Parser for Python. It supports
2691 only a chosen subset of the YAML format that is required to parse cookiecutter
2692 user configuration files. It does not have support for serializing into YAML
2693 and is not compatible with JSON.")
2694 (license license:expat)))
2695
2696 (define-public scons
2697 (package
2698 (name "scons")
2699 (version "3.0.4")
2700 (source (origin
2701 (method git-fetch)
2702 (uri (git-reference
2703 (url "https://github.com/SCons/scons")
2704 (commit version)))
2705 (file-name (git-file-name name version))
2706 (sha256
2707 (base32
2708 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2709 (build-system python-build-system)
2710 (arguments
2711 `(#:use-setuptools? #f ; still relies on distutils
2712 #:tests? #f ; no 'python setup.py test' command
2713 #:phases
2714 (modify-phases %standard-phases
2715 (add-before 'build 'bootstrap
2716 (lambda _
2717 (substitute* "src/engine/SCons/compat/__init__.py"
2718 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2719 "sys.modules[new] = __import__(old)"))
2720 (substitute* "src/engine/SCons/Platform/__init__.py"
2721 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2722 "mod = __import__(full_name)"))
2723 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2724 (chdir "build/scons")
2725 #t)))))
2726 (home-page "https://scons.org/")
2727 (synopsis "Software construction tool written in Python")
2728 (description
2729 "SCons is a software construction tool. Think of SCons as an improved,
2730 cross-platform substitute for the classic Make utility with integrated
2731 functionality similar to autoconf/automake and compiler caches such as ccache.
2732 In short, SCons is an easier, more reliable and faster way to build
2733 software.")
2734 (license license:x11)))
2735
2736 (define-public scons-python2
2737 (package
2738 (inherit (package-with-python2 scons))
2739 (name "scons-python2")))
2740
2741 (define-public python-extension-helpers
2742 (package
2743 (name "python-extension-helpers")
2744 (version "0.1")
2745 (source
2746 (origin
2747 (method url-fetch)
2748 (uri (pypi-uri "extension-helpers" version))
2749 (sha256
2750 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2751 (build-system python-build-system)
2752 (native-inputs
2753 `(("coverage" ,python-coverage)
2754 ("pytest" ,python-pytest-astropy)
2755 ("pytest-cov" ,python-pytest-cov)
2756 ("setuptools-scm" ,python-setuptools-scm)))
2757 (home-page "https://github.com/astropy/astropy-helpers")
2758 (synopsis
2759 "Utilities for building and installing packages in the Astropy ecosystem")
2760 (description
2761 "The extension-helpers package includes many build, installation, and
2762 documentation-related tools used by the Astropy project.")
2763 (license license:bsd-3)))
2764
2765 (define-public python-extras
2766 (package
2767 (name "python-extras")
2768 (version "1.0.0")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (pypi-uri "extras" version))
2773 (sha256
2774 (base32
2775 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2776 (build-system python-build-system)
2777 (arguments
2778 ;; FIXME: Circular dependency on testtools.
2779 '(#:tests? #f))
2780 (home-page "https://github.com/testing-cabal/extras")
2781 (synopsis "Useful extensions to the Python standard library")
2782 (description
2783 "Extras is a set of extensions to the Python standard library.")
2784 (license license:expat)))
2785
2786 (define-public python2-extras
2787 (package-with-python2 python-extras))
2788
2789 (define-public python-mimeparse
2790 (package
2791 (name "python-mimeparse")
2792 (version "1.6.0")
2793 (source
2794 (origin
2795 (method url-fetch)
2796 (uri (pypi-uri "python-mimeparse" version))
2797 (sha256
2798 (base32
2799 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2800 (build-system python-build-system)
2801 (arguments
2802 '(#:phases
2803 (modify-phases %standard-phases
2804 (replace 'check
2805 (lambda _
2806 (invoke "./mimeparse_test.py"))))))
2807 (home-page
2808 "https://github.com/dbtsai/python-mimeparse")
2809 (synopsis "Python library for parsing MIME types")
2810 (description
2811 "Mimeparse provides basic functions for parsing MIME type names and
2812 matching them against a list of media-ranges.")
2813 (license license:expat)))
2814
2815 (define-public python2-mimeparse
2816 (package-with-python2 python-mimeparse))
2817
2818 (define-public python-miniboa
2819 (package
2820 (name "python-miniboa")
2821 (version "1.0.8")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (pypi-uri "miniboa" version))
2826 (sha256
2827 (base32
2828 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
2829 (build-system python-build-system)
2830 (home-page "https://github.com/shmup/miniboa")
2831 (synopsis "Simple, single-threaded Telnet server")
2832 (description
2833 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2834 server.")
2835 (license license:asl2.0)))
2836
2837 (define-public python2-miniboa
2838 (package-with-python2 python-miniboa))
2839
2840 (define-public python-pafy
2841 (package
2842 (name "python-pafy")
2843 (version "0.5.3.1")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "pafy" version))
2848 (sha256
2849 (base32
2850 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2851 (build-system python-build-system)
2852 (arguments
2853 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2854 (propagated-inputs
2855 ;; Youtube-dl is a python package which is imported in the file
2856 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2857 `(("youtube-dl" ,youtube-dl)))
2858 (home-page "https://np1.github.io/pafy/")
2859 (synopsis "Retrieve YouTube content and metadata")
2860 (description
2861 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2862 (license license:lgpl3+)))
2863
2864 (define-public python2-funcsigs
2865 (package
2866 (name "python2-funcsigs")
2867 (version "1.0.2")
2868 (source (origin
2869 (method url-fetch)
2870 (uri (pypi-uri "funcsigs" version))
2871 (sha256
2872 (base32
2873 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2874 (build-system python-build-system)
2875 (arguments
2876 `(#:python ,python-2))
2877 (native-inputs
2878 `(("python2-unittest2" ,python2-unittest2)))
2879 (home-page "http://funcsigs.readthedocs.org")
2880 (synopsis "Python function signatures from PEP362")
2881 (description
2882 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2883 (license license:asl2.0)))
2884
2885 (define-public python2-funcsigs-bootstrap
2886 (package
2887 (inherit python2-funcsigs)
2888 (name "python2-funcsigs-bootstrap")
2889 (native-inputs `())
2890 (arguments
2891 `(#:tests? #f
2892 ,@(package-arguments python2-funcsigs)))))
2893
2894 (define-public python-py
2895 (package
2896 (name "python-py")
2897 (version "1.8.1")
2898 (source
2899 (origin
2900 (method url-fetch)
2901 (uri (pypi-uri "py" version))
2902 (sha256
2903 (base32
2904 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2905 (build-system python-build-system)
2906 (arguments
2907 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2908 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2909 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2910 ;; Is this module globally installed?"
2911 '(#:tests? #f))
2912 (native-inputs
2913 `(("python-setuptools-scm" ,python-setuptools-scm)))
2914 (home-page "https://github.com/pytest-dev/py")
2915 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2916 (description
2917 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2918 code introspection, and logging.")
2919 (license license:expat)))
2920
2921 (define-public python-py-next
2922 (package
2923 (inherit python-py)
2924 (version "1.9.0")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "py" version))
2929 (sha256
2930 (base32
2931 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2932
2933 (define-public python2-py
2934 (package-with-python2 python-py))
2935
2936 ;; Recent versions of python-fixtures and python-testrepository need
2937 ;; python-pbr for packaging, which itself needs these two packages for
2938 ;; testing.
2939 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2940 ;; same source, just without any test dependencies and with tests disabled.
2941 ;; python-pbr-minmal is then used to package python-fixtures and
2942 ;; python-testrepository.
2943 ;; Strictly speaking we currently could remove the test-requirements from the
2944 ;; normal python-pbr package (and save this package) since test are disabled
2945 ;; there anyway. But this may change in future.
2946 (define-public python-pbr-minimal
2947 (package
2948 (name "python-pbr-minimal")
2949 (version "3.0.1")
2950 (source
2951 (origin
2952 (method url-fetch)
2953 (uri (pypi-uri "pbr" version))
2954 (sha256
2955 (base32
2956 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2957 (build-system python-build-system)
2958 (arguments
2959 `(#:tests? #f))
2960 (home-page "https://docs.openstack.org/pbr/latest/")
2961 (synopsis "Minimal build of python-pbr used for bootstrapping")
2962 (description
2963 "Used only for bootstrapping python2-pbr, you should not need this.")
2964 (license license:asl2.0)))
2965
2966 (define-public python-pbr
2967 (package
2968 (inherit python-pbr-minimal)
2969 (name "python-pbr")
2970 (arguments
2971 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2972 (propagated-inputs
2973 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2974 (native-inputs
2975 `(("python-fixtures" ,python-fixtures-bootstrap)
2976 ;; discover, coverage, hacking, subunit
2977 ("python-mock" ,python-mock)
2978 ("python-six" ,python-six)
2979 ("python-sphinx" ,python-sphinx)
2980 ("python-testrepository" ,python-testrepository-bootstrap)
2981 ("python-testresources" ,python-testresources-bootstrap)
2982 ("python-testscenarios" ,python-testscenarios-bootstrap)
2983 ("python-testtools" ,python-testtools-bootstrap)
2984 ("python-virtualenv" ,python-virtualenv)))
2985 (synopsis "Enhance the default behavior of Python’s setuptools")
2986 (description
2987 "Python Build Reasonableness (PBR) is a library that injects some useful
2988 and sensible default behaviors into your setuptools run. It will set
2989 versions, process requirements files and generate AUTHORS and ChangeLog file
2990 from git information.
2991 ")))
2992
2993 (define-public python-pyrsistent
2994 (package
2995 (name "python-pyrsistent")
2996 (version "0.16.0")
2997 (home-page "https://github.com/tobgu/pyrsistent")
2998 (source (origin
2999 (method url-fetch)
3000 (uri (pypi-uri "pyrsistent" version))
3001 (sha256
3002 (base32
3003 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3004 (build-system python-build-system)
3005 (arguments
3006 '(#:phases (modify-phases %standard-phases
3007 ;; The package works fine with newer Pytest and Hypothesis, but
3008 ;; has pinned older versions to stay compatible with Python 2.
3009 (add-before 'check 'loosen-pytest-requirement
3010 (lambda _
3011 (substitute* "setup.py"
3012 (("pytest<5") "pytest")
3013 (("hypothesis<5") "hypothesis"))
3014 #t)))))
3015 (native-inputs
3016 `(("python-hypothesis" ,python-hypothesis)
3017 ("python-pytest" ,python-pytest)
3018 ("python-pytest-runner" ,python-pytest-runner)))
3019 (propagated-inputs
3020 `(("python-six" ,python-six)))
3021 (synopsis "Persistent data structures for Python")
3022 (description
3023 "Pyrsistent is a number of persistent collections (by some referred to as
3024 functional data structures). Persistent in the sense that they are immutable.
3025
3026 All methods on a data structure that would normally mutate it instead return a
3027 new copy of the structure containing the requested updates. The original
3028 structure is left untouched.")
3029 (license license:expat)))
3030
3031 (define-public python2-pyrsistent
3032 (package-with-python2 python-pyrsistent))
3033
3034 (define-public python-exif-read
3035 (package
3036 (name "python-exif-read")
3037 (version "2.1.2")
3038 (source (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "ExifRead" version))
3041 (sha256
3042 (base32
3043 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3044 (build-system python-build-system)
3045 (arguments `(#:tests? #f)) ; no tests
3046 (home-page "https://github.com/ianare/exif-py")
3047 (synopsis "Python library to extract EXIF data from image files")
3048 (description
3049 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3050 files.")
3051 (license license:bsd-3)))
3052
3053 (define-public python2-exif-read
3054 (package-with-python2 python-exif-read))
3055
3056 (define-public python-pyld
3057 (package
3058 (name "python-pyld")
3059 (version "1.0.5")
3060 (source (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "PyLD" version))
3063 (sha256
3064 (base32
3065 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3066 (build-system python-build-system)
3067 (home-page "https://github.com/digitalbazaar/pyld")
3068 (synopsis "Python implementation of the JSON-LD specification")
3069 (description
3070 "PyLD is an implementation of the JSON-LD specification.")
3071 (license license:bsd-3)))
3072
3073 (define-public python2-pyld
3074 (package-with-python2 python-pyld))
3075
3076 (define-public python-cli-helpers
3077 (package
3078 (name "python-cli-helpers")
3079 (version "2.0.1")
3080 (source
3081 (origin
3082 ;; There's no source tarball on PyPI.
3083 (method git-fetch)
3084 (uri (git-reference
3085 (url "https://github.com/dbcli/cli_helpers")
3086 (commit (string-append "v" version))))
3087 (file-name (git-file-name name version))
3088 (sha256
3089 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3090 (build-system python-build-system)
3091 (native-inputs
3092 `(("python-pytest" ,python-pytest)))
3093 (propagated-inputs
3094 `(("python-wcwidth" ,python-wcwidth)
3095 ("python-configobj" ,python-configobj)
3096 ("python-tabulate" ,python-tabulate)
3097 ("python-terminaltables" ,python-terminaltables)))
3098 (home-page "https://github.com/dbcli/cli_helpers")
3099 (synopsis "Helpers for building command-line apps")
3100 (description
3101 "CLI Helpers is a Python package that makes it easy to perform common
3102 tasks when building command-line apps. It's a helper library for command-line
3103 interfaces.")
3104 (license license:bsd-3)))
3105
3106 (define-public python-click
3107 (package
3108 (name "python-click")
3109 (version "7.1.2")
3110 (source
3111 (origin
3112 (method url-fetch)
3113 (uri (pypi-uri "click" version))
3114 (sha256
3115 (base32
3116 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3117 (build-system python-build-system)
3118 (arguments
3119 `(#:phases
3120 (modify-phases %standard-phases
3121 (add-after 'unpack 'fix-paths
3122 (lambda* (#:key inputs #:allow-other-keys)
3123 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3124 "cross-libc" "libc"))))
3125 (substitute* "src/click/_unicodefun.py"
3126 (("'locale'")
3127 (string-append "'" glibc "/bin/locale'"))))
3128 #t))
3129 (replace 'check
3130 (lambda _
3131 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
3132 (invoke "python" "-m" "pytest"))))))
3133 (native-inputs
3134 `(("python-pytest" ,python-pytest)))
3135 (home-page "https://palletsprojects.com/p/click/")
3136 (synopsis "Command line library for Python")
3137 (description
3138 "Click is a Python package for creating command line interfaces in a
3139 composable way with as little code as necessary. Its name stands for
3140 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3141 with sensible defaults out of the box.")
3142 (license license:bsd-3)))
3143
3144 (define-public python2-click
3145 (package-with-python2 python-click))
3146
3147 (define-public python-click-5
3148 (package (inherit python-click)
3149 (name "python-click")
3150 (version "5.1")
3151 (source
3152 (origin
3153 (method url-fetch)
3154 (uri (pypi-uri "click" version))
3155 (sha256
3156 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3157 (arguments `())))
3158
3159 (define-public python-vcversioner
3160 (package
3161 (name "python-vcversioner")
3162 (version "2.16.0.0")
3163 (source
3164 (origin
3165 (method url-fetch)
3166 (uri (pypi-uri "vcversioner" version))
3167 (sha256
3168 (base32
3169 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3170 (build-system python-build-system)
3171 (synopsis "Python library for version number discovery")
3172 (description "Vcversioner is a Python library that inspects tagging
3173 information in a variety of version control systems in order to discover
3174 version numbers.")
3175 (home-page "https://github.com/habnabit/vcversioner")
3176 (license license:isc)))
3177
3178 (define-public python2-vcversioner
3179 (package-with-python2 python-vcversioner))
3180
3181 (define-public python-jdcal
3182 (package
3183 (name "python-jdcal")
3184 (version "1.4")
3185 (source
3186 (origin
3187 (method url-fetch)
3188 (uri (pypi-uri "jdcal" version))
3189 (sha256
3190 (base32
3191 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3192 (build-system python-build-system)
3193 (arguments
3194 `(#:phases (modify-phases %standard-phases
3195 (replace 'check
3196 (lambda _
3197 (invoke "pytest"))))))
3198 (native-inputs
3199 `(("python-pytest" ,python-pytest)))
3200 (home-page "https://github.com/phn/jdcal")
3201 (synopsis "Functions to convert between Julian dates Gregorian dates")
3202 (description "This Python library provides functions for converting
3203 between Julian dates and Gregorian dates.")
3204 (license license:bsd-2)))
3205
3206 (define-public python2-jdcal
3207 (package-with-python2 python-jdcal))
3208
3209 (define-public python-jsondiff
3210 (package
3211 (name "python-jsondiff")
3212 (version "1.2.0")
3213 (source
3214 (origin
3215 (method url-fetch)
3216 (uri (pypi-uri "jsondiff" version))
3217 (sha256
3218 (base32
3219 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3220 (build-system python-build-system)
3221 (native-inputs
3222 `(("python-nose" ,python-nose)
3223 ("python-nose-random" ,python-nose-random)))
3224 (home-page
3225 "https://github.com/fzumstein/jsondiff")
3226 (synopsis "Compare JSON and JSON-like structures in Python")
3227 (description "@code{jsondiff} is a Python library which lets you
3228 compare, diff, and patch JSON and JSON-like structures in Python.")
3229 (license license:expat)))
3230
3231 (define-public python-jsonschema
3232 (package
3233 (name "python-jsonschema")
3234 (version "3.2.0")
3235 (source (origin
3236 (method url-fetch)
3237 (uri (pypi-uri "jsonschema" version))
3238 (sha256
3239 (base32
3240 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3241 (build-system python-build-system)
3242 (arguments
3243 '(#:phases
3244 (modify-phases %standard-phases
3245 (replace 'check
3246 (lambda* (#:key inputs outputs #:allow-other-keys)
3247 (add-installed-pythonpath inputs outputs)
3248 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3249 (invoke "trial" "jsonschema"))))))
3250 (native-inputs
3251 `(("python-setuptools_scm" ,python-setuptools-scm)
3252 ("python-twisted" ,python-twisted)))
3253 (propagated-inputs
3254 `(("python-attrs" ,python-attrs)
3255 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
3256 ("python-pyrsistent" ,python-pyrsistent)
3257 ("python-six" ,python-six)))
3258 (home-page "https://github.com/Julian/jsonschema")
3259 (synopsis "Implementation of JSON Schema for Python")
3260 (description
3261 "Jsonschema is an implementation of JSON Schema for Python.")
3262 (license license:expat)
3263 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3264
3265 (define-public python2-jsonschema
3266 (let ((jsonschema (package-with-python2
3267 (strip-python2-variant python-jsonschema))))
3268 (package/inherit jsonschema
3269 (propagated-inputs
3270 `(("python2-functools32" ,python2-functools32)
3271 ,@(package-propagated-inputs jsonschema))))))
3272
3273 (define-public python-schema
3274 (package
3275 (name "python-schema")
3276 (version "0.6.6")
3277 (source
3278 (origin
3279 (method url-fetch)
3280 (uri (pypi-uri "schema" version))
3281 (sha256
3282 (base32
3283 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3284 (build-system python-build-system)
3285 (native-inputs
3286 `(("python-pytest" ,python-pytest)))
3287 (home-page "https://github.com/keleshev/schema")
3288 (synopsis "Simple data validation library")
3289 (description
3290 "@code{python-schema} is a library for validating Python data
3291 structures, such as those obtained from config-files, forms, external
3292 services or command-line parsing, converted from JSON/YAML (or
3293 something else) to Python data-types.")
3294 (license license:psfl)))
3295
3296 (define-public python2-schema
3297 (package-with-python2 python-schema))
3298
3299 (define-public python-schema-0.5
3300 (package (inherit python-schema)
3301 (version "0.5.0")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "schema" version))
3306 (sha256
3307 (base32
3308 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3309
3310 (define-public python2-schema-0.5
3311 (package-with-python2 python-schema-0.5))
3312
3313 (define-public python-kitchen
3314 (package
3315 (name "python-kitchen")
3316 (version "1.2.5")
3317 (source
3318 (origin
3319 (method url-fetch)
3320 (uri (pypi-uri "kitchen" version))
3321 (sha256
3322 (base32
3323 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3324 (build-system python-build-system)
3325 (propagated-inputs
3326 `(("python-chardet" ,python-chardet)))
3327 (home-page "https://github.com/fedora-infra/kitchen")
3328 (synopsis "Python API for snippets")
3329 (description "@code{kitchen} module provides a python API for all sorts of
3330 little useful snippets of code that everybody ends up writing for their projects
3331 but never seem big enough to build an independent release. Use kitchen and stop
3332 cutting and pasting that code over and over.")
3333 (license (list license:lgpl2.1+
3334 ;; subprocess.py, test_subprocess.py,
3335 ;; kitchen/pycompat25/defaultdict.py:
3336 license:psfl))))
3337
3338 (define-public python2-kitchen
3339 (package-with-python2 python-kitchen))
3340
3341 (define-public python-roman
3342 (package
3343 (name "python-roman")
3344 (version "3.3")
3345 (source
3346 (origin
3347 (method url-fetch)
3348 (uri (pypi-uri "roman" version))
3349 (sha256
3350 (base32
3351 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3352 (build-system python-build-system)
3353 (home-page "https://github.com/zopefoundation/roman")
3354 (synopsis "Integer to Roman numerals converter")
3355 (description
3356 "This package provides a small helper library to convert Arabic Numbers
3357 to Roman Numerals.")
3358 (license license:psfl)))
3359
3360 (define-public python-unidecode
3361 (package
3362 (name "python-unidecode")
3363 (version "1.1.1")
3364 (source (origin
3365 (method url-fetch)
3366 (uri (pypi-uri "Unidecode" version))
3367 (sha256
3368 (base32
3369 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3370 (build-system python-build-system)
3371 (home-page "https://pypi.org/project/Unidecode/")
3372 (synopsis "ASCII transliterations of Unicode text")
3373 (description
3374 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3375 useful when integrating with legacy code that doesn't support Unicode, or for
3376 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3377 machine identifiers from human-readable Unicode strings that should still be
3378 somewhat intelligible.")
3379 (license license:gpl2+)))
3380
3381 (define-public python2-unidecode
3382 (package-with-python2 python-unidecode))
3383
3384 (define-public python-text-unidecode
3385 (package
3386 (name "python-text-unidecode")
3387 (version "1.3")
3388 (source (origin
3389 (method url-fetch)
3390 (uri (pypi-uri "text-unidecode" version))
3391 (sha256
3392 (base32
3393 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3394 (build-system python-build-system)
3395 (arguments
3396 '(#:phases (modify-phases %standard-phases
3397 (replace 'check
3398 (lambda _
3399 (setenv "PYTHONPATH"
3400 (string-append "./build/lib:"
3401 (getenv "PYTHONPATH")))
3402 (invoke "pytest" "-vv"))))))
3403 (native-inputs
3404 `(("python-pytest" ,python-pytest)))
3405 (home-page "https://github.com/kmike/text-unidecode/")
3406 (synopsis "Decode Unicode data")
3407 (description
3408 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3409 Perl library. It can create ASCII representations of Unicode data. In general
3410 users should prefer the @code{python-unidecode} package which offers better
3411 memory usage and transliteration quality.")
3412 ;; The user can choose either license.
3413 (license (list license:clarified-artistic license:gpl2+))))
3414
3415 (define-public python2-text-unidecode
3416 (package-with-python2 python-text-unidecode))
3417
3418 (define-public python-pyjwt
3419 (package
3420 (name "python-pyjwt")
3421 (version "1.7.1")
3422 (source
3423 (origin
3424 (method url-fetch)
3425 (uri (pypi-uri "PyJWT" version))
3426 (sha256
3427 (base32
3428 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3429 (modules '((guix build utils)))
3430 (snippet
3431 '(begin
3432 (for-each delete-file-recursively
3433 (find-files "." "\\.pyc$"))
3434 #t))))
3435 (build-system python-build-system)
3436 (arguments
3437 '(#:phases (modify-phases %standard-phases
3438 (replace 'check
3439 (lambda _
3440 ;; Mimic upstream commit 3a20892442b34c7 to get
3441 ;; rid of dependency on pytest-runner < 5.0.
3442 ;; Remove substitution for PyJWT > 1.7.1.
3443 (substitute* "setup.py"
3444 ((".*pytest-runner.*")
3445 ""))
3446 (invoke "pytest" "-vv"))))))
3447 (native-inputs
3448 `(("python-pytest" ,python-pytest)
3449 ("python-pytest-cov" ,python-pytest-cov)))
3450 (home-page "https://github.com/progrium/pyjwt")
3451 (synopsis "JSON Web Token implementation in Python")
3452 (description
3453 "PyJWT is a JSON Web Token implementation written in Python.")
3454 (license license:expat)))
3455
3456 (define-public python2-pyjwt
3457 (package-with-python2 python-pyjwt))
3458
3459 (define-public python-pymsgbox
3460 (package
3461 (name "python-pymsgbox")
3462 (version "1.0.6")
3463 (source
3464 (origin
3465 (method git-fetch)
3466 (uri (git-reference
3467 ;; LICENSE.txt is not present on pypi
3468 (url "https://github.com/asweigart/PyMsgBox")
3469 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3470 (file-name (git-file-name name version))
3471 (sha256
3472 (base32
3473 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3474 (arguments
3475 ;; Circular dependency to run tests:
3476 ;; Tests need pyautogui, which depends on pymsgbox.
3477 '(#:tests? #f))
3478 (build-system python-build-system)
3479 (home-page "https://github.com/asweigart/PyMsgBox")
3480 (synopsis "Python module for JavaScript-like message boxes")
3481 (description
3482 "PyMsgBox is a simple, cross-platform, pure Python module for
3483 JavaScript-like message boxes. Types of dialog boxes include:
3484 @enumerate
3485 @item alert
3486 @item confirm
3487 @item prompt
3488 @item password
3489 @end enumerate
3490 ")
3491 (license license:bsd-3)))
3492
3493 (define-public python-pympler
3494 (package
3495 (name "python-pympler")
3496 (home-page "https://pythonhosted.org/Pympler/")
3497 (version "0.8")
3498 (source (origin
3499 (method url-fetch)
3500 (uri (pypi-uri "Pympler" version))
3501 (sha256
3502 (base32
3503 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3504 (build-system python-build-system)
3505 (arguments
3506 `(#:phases (modify-phases %standard-phases
3507 (delete 'check)
3508 (add-after 'install 'check
3509 (lambda* (#:key inputs outputs #:allow-other-keys)
3510 (add-installed-pythonpath inputs outputs)
3511 (invoke "python" "setup.py" "test"))))))
3512 (synopsis "Measure, monitor and analyze memory behavior")
3513 (description
3514 "Pympler is a development tool to measure, monitor and analyze
3515 the memory behavior of Python objects in a running Python application.
3516
3517 By pympling a Python application, detailed insight in the size and the
3518 lifetime of Python objects can be obtained. Undesirable or unexpected
3519 runtime behavior like memory bloat and other @samp{pymples} can easily
3520 be identified.
3521
3522 A web profiling frontend exposes process statistics, garbage
3523 visualisation and class tracker statistics.")
3524 (license license:asl2.0)))
3525
3526 (define-public python2-pympler
3527 (package-with-python2 python-pympler))
3528
3529 (define-public python-itsdangerous
3530 (package
3531 (name "python-itsdangerous")
3532 (version "1.1.0")
3533 (source
3534 (origin
3535 (method url-fetch)
3536 (uri (pypi-uri "itsdangerous" version))
3537 (sha256
3538 (base32
3539 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3540 (build-system python-build-system)
3541 (home-page "https://palletsprojects.com/p/itsdangerous/")
3542 (synopsis "Python library for passing data to/from untrusted environments")
3543 (description
3544 "Itsdangerous provides various helpers to pass trusted data to untrusted
3545 environments and back.")
3546 (license license:bsd-3)))
3547
3548 (define-public python2-itsdangerous
3549 (package-with-python2 python-itsdangerous))
3550
3551 (define-public python-pyyaml
3552 (package
3553 (name "python-pyyaml")
3554 (version "5.4.1")
3555 (source
3556 (origin
3557 (method url-fetch)
3558 (uri (pypi-uri "PyYAML" version))
3559 (sha256
3560 (base32
3561 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3562 (build-system python-build-system)
3563 (inputs
3564 `(("libyaml" ,libyaml)))
3565 (home-page "https://pyyaml.org")
3566 (synopsis "YAML parser and emitter for Python")
3567 (description
3568 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3569 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3570 API, and sensible error messages. PyYAML supports standard YAML tags and
3571 provides Python-specific tags that represent an arbitrary Python object.")
3572 (license license:expat)))
3573
3574 (define-public python2-pyyaml
3575 (package-with-python2 python-pyyaml))
3576
3577 (define-public python-vine
3578 (package
3579 (name "python-vine")
3580 (version "1.1.4")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 (uri (pypi-uri "vine" version))
3585 (sha256
3586 (base32
3587 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3588 (build-system python-build-system)
3589 (native-inputs
3590 `(("python-pytest" ,python-pytest)
3591 ("python-case" ,python-case)))
3592 (home-page "https://github.com/celery/vine")
3593 (synopsis "Promises for Python")
3594 (description
3595 "@code{vine} provides a special implementation of promises in that it can
3596 be used both for \"promise of a value\" and lazy evaluation. The biggest
3597 upside for this is that everything in a promise can also be a promise,
3598 e.g. filters, callbacks and errbacks can all be promises.")
3599 (license license:bsd-3)))
3600
3601 (define-public python-virtualenv
3602 (package
3603 (name "python-virtualenv")
3604 (version "20.2.1")
3605 (source
3606 (origin
3607 (method url-fetch)
3608 (uri (pypi-uri "virtualenv" version))
3609 (sha256
3610 (base32
3611 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3612 (build-system python-build-system)
3613 (native-inputs
3614 `(("python-mock" ,python-mock)
3615 ("python-pytest" ,python-pytest)
3616 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3617 ;; be an input at all". However, removing the input makes the build error:
3618 ;; File "setup.py", line 4, in <module>
3619 ;; raise RuntimeError("setuptools >= 41 required to build")
3620 ("python-setuptools" ,python-setuptools)
3621 ("python-setuptools-scm" ,python-setuptools-scm)))
3622 (propagated-inputs
3623 `(("python-appdirs" ,python-appdirs)
3624 ("python-distlib" ,python-distlib/next)
3625 ("python-filelock" ,python-filelock)
3626 ("python-six" ,python-six)
3627 ("python-importlib-metadata" ,python-importlib-metadata)))
3628 (home-page "https://virtualenv.pypa.io/")
3629 (synopsis "Virtual Python environment builder")
3630 (description
3631 "Virtualenv is a tool to create isolated Python environments.")
3632 (license license:expat)))
3633
3634 (define-public python-markupsafe
3635 (package
3636 (name "python-markupsafe")
3637 (version "1.1.1")
3638 (source
3639 (origin
3640 (method url-fetch)
3641 (uri (pypi-uri "MarkupSafe" version))
3642 (sha256
3643 (base32
3644 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3645 (build-system python-build-system)
3646 (arguments
3647 `(#:modules ((ice-9 ftw)
3648 (srfi srfi-1)
3649 (srfi srfi-26)
3650 (guix build utils)
3651 (guix build python-build-system))
3652 #:phases (modify-phases %standard-phases
3653 (replace 'check
3654 (lambda _
3655 (let ((cwd (getcwd))
3656 (libdir (find (cut string-prefix? "lib." <>)
3657 (scandir "build"))))
3658 (setenv "PYTHONPATH"
3659 (string-append cwd "/build/" libdir ":"
3660 (getenv "PYTHONPATH")))
3661 (invoke "pytest" "-vv")))))))
3662 (native-inputs
3663 `(("python-pytest" ,python-pytest)))
3664 (home-page "https://github.com/mitsuhiko/markupsafe")
3665 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3666 (description
3667 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3668 for Python.")
3669 (license license:bsd-3)))
3670
3671 (define-public python2-markupsafe
3672 (package-with-python2 python-markupsafe))
3673
3674 (define-public python-jinja2
3675 (package
3676 (name "python-jinja2")
3677 (version "2.11.2")
3678 (source
3679 (origin
3680 (method url-fetch)
3681 (uri (pypi-uri "Jinja2" version))
3682 (sha256
3683 (base32
3684 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3685 (build-system python-build-system)
3686 (arguments
3687 '(#:phases (modify-phases %standard-phases
3688 (replace 'check
3689 (lambda* (#:key tests? #:allow-other-keys)
3690 (if tests?
3691 (begin
3692 (setenv "PYTHONPATH"
3693 (string-append "./build/lib:"
3694 (getenv "PYTHONPATH")))
3695 (invoke "pytest" "-vv"))
3696 (format #t "test suite not run~%"))
3697 #t)))))
3698 (native-inputs
3699 `(("python-pytest" ,python-pytest)))
3700 (propagated-inputs
3701 `(("python-markupsafe" ,python-markupsafe)))
3702 (home-page "http://jinja.pocoo.org/")
3703 (synopsis "Python template engine")
3704 (description
3705 "Jinja2 is a small but fast and easy to use stand-alone template engine
3706 written in pure Python.")
3707 (license license:bsd-3)))
3708
3709 (define-public python2-jinja2
3710 (package-with-python2 python-jinja2))
3711
3712 (define-public python-jinja2-time
3713 (package
3714 (name "python-jinja2-time")
3715 (version "0.2.0")
3716 (source
3717 (origin
3718 (method url-fetch)
3719 (uri (pypi-uri "jinja2-time" version))
3720 (sha256
3721 (base32
3722 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3723 (build-system python-build-system)
3724 (propagated-inputs
3725 `(("python-arrow" ,python-arrow)
3726 ("python-jinja2" ,python-jinja2)))
3727 (home-page
3728 "https://github.com/hackebrot/jinja2-time")
3729 (synopsis "Jinja2 Extension for Dates and Times")
3730 (description
3731 "This package provides an extension for the template engine Jinja2. It
3732 adds a 'now' tag providing a convenient access to the arrow.now() API from
3733 templates. A format string can be provided to control the output.")
3734 (license license:expat)))
3735
3736 (define-public python-pystache
3737 (package
3738 (name "python-pystache")
3739 (version "0.5.4")
3740 (source (origin
3741 (method url-fetch)
3742 (uri (pypi-uri "pystache" version))
3743 (sha256
3744 (base32
3745 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3746 (build-system python-build-system)
3747 (arguments
3748 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3749 (home-page "http://defunkt.io/pystache/")
3750 (synopsis "Python logic-less template engine")
3751 (description
3752 "Pystache is a Python implementation of the framework agnostic,
3753 logic-free templating system Mustache.")
3754 (license license:expat)
3755 (properties `((python2-variant . ,(delay python2-pystache))))))
3756
3757 (define-public python2-pystache
3758 (let ((base (package-with-python2
3759 (strip-python2-variant python-pystache))))
3760 (package/inherit base
3761 (arguments
3762 `(#:python ,python-2
3763 #:phases
3764 (modify-phases %standard-phases
3765 (replace 'check
3766 (lambda _
3767 (invoke "python" "test_pystache.py")))))))))
3768
3769 (define-public python-joblib
3770 (package
3771 (name "python-joblib")
3772 (version "0.14.1")
3773 (source (origin
3774 (method url-fetch)
3775 (uri (pypi-uri "joblib" version))
3776 (sha256
3777 (base32
3778 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3779 (build-system python-build-system)
3780 (arguments
3781 `(#:phases
3782 (modify-phases %standard-phases
3783 (replace 'check
3784 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3785 (native-inputs
3786 `(("python-pytest" ,python-pytest)))
3787 (home-page "https://joblib.readthedocs.io/")
3788 (synopsis "Using Python functions as pipeline jobs")
3789 (description
3790 "Joblib is a set of tools to provide lightweight pipelining in Python.
3791 In particular, joblib offers: transparent disk-caching of the output values
3792 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3793 logging and tracing of the execution.")
3794 (license license:bsd-3)))
3795
3796 (define-public python2-joblib
3797 (package-with-python2 python-joblib))
3798
3799 (define-public python-daemon
3800 (package
3801 (name "python-daemon")
3802 (version "2.2.3")
3803 (source
3804 (origin
3805 (method url-fetch)
3806 (uri (pypi-uri "python-daemon" version))
3807 (sha256
3808 (base32
3809 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3810 (build-system python-build-system)
3811 (arguments
3812 `(#:phases
3813 (modify-phases %standard-phases
3814 (add-before 'check 'disable-tests
3815 (lambda _
3816 ;; FIXME: Determine why test fails
3817 (substitute* "test/test_daemon.py"
3818 (("test_detaches_process_context")
3819 "skip_test_detaches_process_context"))
3820 #t)))))
3821 (propagated-inputs
3822 `(("python-lockfile" ,python-lockfile)))
3823 (native-inputs
3824 `(("python-unittest2" ,python-unittest2)
3825 ("python-testtools" ,python-testtools)
3826 ("python-testscenarios" ,python-testscenarios)
3827 ("python-mock" ,python-mock)
3828 ("python-docutils" ,python-docutils)))
3829 (home-page "https://pagure.io/python-daemon/")
3830 (synopsis "Python library for making a Unix daemon process")
3831 (description "Python-daemon is a library that assists a Python program to
3832 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3833
3834 This library provides a @code{DaemonContext} class that manages the following
3835 important tasks for becoming a daemon process:
3836 @enumerate
3837 @item Detach the process into its own process group.
3838 @item Set process environment appropriate for running inside a chroot.
3839 @item Renounce suid and sgid privileges.
3840 @item Close all open file descriptors.
3841 @item Change the working directory, uid, gid, and umask.
3842 @item Set appropriate signal handlers.
3843 @item Open new file descriptors for stdin, stdout, and stderr.
3844 @item Manage a specified PID lock file.
3845 @item Register cleanup functions for at-exit processing.
3846 @end enumerate")
3847 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3848 (license (list license:asl2.0 license:gpl3+))))
3849
3850 (define-public python-anytree
3851 (package
3852 (name "python-anytree")
3853 (version "2.8.0")
3854 (source (origin
3855 (method url-fetch)
3856 (uri (pypi-uri "anytree" version))
3857 (sha256
3858 (base32
3859 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3860 (build-system python-build-system)
3861 (propagated-inputs
3862 `(("python-six" ,python-six)))
3863 (native-inputs
3864 `(;; For tests.
3865 ("graphviz" ,graphviz) ;for 'dot'
3866 ("python-nose" ,python-nose)))
3867 (home-page "https://github.com/c0fec0de/anytree")
3868 (synopsis "Lightweight tree data library")
3869 (description
3870 "@code{anytree} is a simple, lightweight, and extensible tree data
3871 structure for Python.")
3872 (license license:asl2.0)))
3873
3874 (define-public python-docutils
3875 (package
3876 (name "python-docutils")
3877 (version "0.16")
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (pypi-uri "docutils" version))
3882 (sha256
3883 (base32
3884 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3885 (build-system python-build-system)
3886 (arguments
3887 '(#:phases (modify-phases %standard-phases
3888 (replace 'check
3889 (lambda* (#:key tests? #:allow-other-keys)
3890 (if tests?
3891 (invoke "python" "test/alltests.py")
3892 (format #t "test suite not run~%"))
3893 #t)))))
3894 (home-page "http://docutils.sourceforge.net/")
3895 (synopsis "Python Documentation Utilities")
3896 (description
3897 "Docutils is a modular system for processing documentation into useful
3898 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3899 easy to use markup language, for input.
3900
3901 This package provides tools for converting @file{.rst} files to other formats
3902 via commands such as @command{rst2man}, as well as supporting Python code.")
3903 ;; Most of the source code is public domain, but some source files are
3904 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3905 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3906
3907 (define-public python2-docutils
3908 (package-with-python2 python-docutils))
3909
3910 ;; python2-sphinx fails its test suite with newer versions.
3911 (define-public python2-docutils-0.14
3912 (package
3913 (inherit python2-docutils)
3914 (version "0.14")
3915 (source (origin
3916 (method url-fetch)
3917 (uri (pypi-uri "docutils" version))
3918 (sha256
3919 (base32
3920 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3921
3922 (define-public python-restructuredtext-lint
3923 (package
3924 (name "python-restructuredtext-lint")
3925 (version "1.3.0")
3926 (source
3927 (origin
3928 (method url-fetch)
3929 (uri (pypi-uri "restructuredtext-lint" version))
3930 (sha256
3931 (base32
3932 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3933 (build-system python-build-system)
3934 (arguments
3935 `(#:phases
3936 (modify-phases %standard-phases
3937 (delete 'check)
3938 (add-after 'install 'check
3939 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3940 (when tests?
3941 (add-installed-pythonpath inputs outputs)
3942 (invoke "nosetests" "-v"))
3943 #t)))))
3944 (propagated-inputs
3945 `(("python-docutils" ,python-docutils)))
3946 (native-inputs
3947 `(("python-nose" ,python-nose)))
3948 (home-page "https://github.com/twolfson/restructuredtext-lint")
3949 (synopsis "reStructuredText linter")
3950 (description "This package provides a linter for the reStructuredText
3951 format.")
3952 (license license:unlicense)))
3953
3954 (define-public python-doc8
3955 (package
3956 (name "python-doc8")
3957 (version "0.8.0")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 (uri (pypi-uri "doc8" version))
3962 (sha256
3963 (base32
3964 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3965 (build-system python-build-system)
3966 (arguments
3967 `(#:phases
3968 (modify-phases %standard-phases
3969 (delete 'check)
3970 (add-after 'install 'check
3971 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3972 (when tests?
3973 (add-installed-pythonpath inputs outputs)
3974 (invoke "pytest" "-v"))
3975 #t)))))
3976 (propagated-inputs
3977 `(("python-chardet" ,python-chardet)
3978 ("python-docutils" ,python-docutils)
3979 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3980 ("python-six" ,python-six)
3981 ("python-stevedore" ,python-stevedore)))
3982 (native-inputs
3983 `(("python-testtools" ,python-testtools)
3984 ("python-pytest" ,python-pytest)))
3985 (home-page "https://launchpad.net/doc8")
3986 (synopsis
3987 "Style checker for Sphinx (or other) RST documentation")
3988 (description
3989 "Doc8 is an opinionated style checker for reStructured Text and plain
3990 text styles of documentation.")
3991 (license license:asl2.0)))
3992
3993 (define-public python-pygments
3994 (package
3995 (name "python-pygments")
3996 (version "2.7.3")
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (pypi-uri "Pygments" version))
4001 (sha256
4002 (base32
4003 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
4004 (replacement python-pygments/fixed)
4005 (build-system python-build-system)
4006 (arguments
4007 ;; FIXME: Tests require sphinx, which depends on this.
4008 '(#:tests? #f))
4009 (home-page "https://pygments.org/")
4010 (synopsis "Syntax highlighting")
4011 (description
4012 "Pygments is a syntax highlighting package written in Python.")
4013 (license license:bsd-2)
4014 (properties `((python2-variant . ,(delay python2-pygments))))))
4015
4016 (define python-pygments/fixed
4017 (package
4018 (inherit python-pygments)
4019 (version "2.7.4")
4020 (source
4021 (origin
4022 (method url-fetch)
4023 (uri (pypi-uri "Pygments" version))
4024 (sha256
4025 (base32
4026 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
4027
4028 ;; Pygments 2.6 and later does not support Python 2.
4029 (define-public python2-pygments
4030 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4031 (package
4032 (inherit base)
4033 (version "2.5.2")
4034 (source (origin
4035 (method url-fetch)
4036 (uri (pypi-uri "Pygments" version))
4037 (sha256
4038 (base32
4039 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4040
4041 (define-public python-pygments-github-lexers
4042 (package
4043 (name "python-pygments-github-lexers")
4044 (version "0.0.5")
4045 (source
4046 (origin
4047 (method url-fetch)
4048 (uri (pypi-uri "pygments-github-lexers" version))
4049 (sha256
4050 (base32
4051 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4052 (build-system python-build-system)
4053 (propagated-inputs
4054 `(("python-pygments" ,python-pygments)))
4055 (home-page "https://github.com/liluo/pygments-github-lexers")
4056 (synopsis "Pygments Github custom lexers")
4057 (description "This package installs Github custom lexers to Pygments.")
4058 (license license:bsd-3)))
4059
4060 (define-public python-bump2version
4061 (package
4062 (name "python-bump2version")
4063 (version "1.0.1")
4064 (source
4065 (origin
4066 (method url-fetch)
4067 (uri (pypi-uri "bump2version" version))
4068 (sha256
4069 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4070 (build-system python-build-system)
4071 (arguments
4072 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4073 ;; required: --new-version".
4074 `(#:tests? #false))
4075 (home-page "https://github.com/c4urself/bump2version")
4076 (synopsis "Version-bump your software with a single command!")
4077 (description
4078 "This package provides a small command line tool to simplify releasing
4079 software by updating all version strings in your source code by the correct
4080 increment. It also creates commits and tags.")
4081 (license license:expat)))
4082
4083 (define-public python-bumpversion
4084 (package
4085 (name "python-bumpversion")
4086 (version "0.5.3")
4087 (source
4088 (origin
4089 (method url-fetch)
4090 (uri (pypi-uri "bumpversion" version))
4091 (sha256
4092 (base32
4093 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4094 (build-system python-build-system)
4095 (home-page "https://github.com/peritus/bumpversion")
4096 (synopsis "Tool to bump software version")
4097 (description "This tool provides a command-line interface (CLI) to bump a
4098 software version simply.")
4099 (license license:expat)))
4100
4101 (define-public python-deprecated
4102 (package
4103 (name "python-deprecated")
4104 (version "1.2.5")
4105 (source
4106 (origin
4107 (method git-fetch)
4108 (uri (git-reference
4109 (url "https://github.com/tantale/deprecated")
4110 (commit (string-append "v" version))))
4111 (file-name (git-file-name name version))
4112 (sha256
4113 (base32
4114 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4115 (build-system python-build-system)
4116 (arguments
4117 `(#:phases (modify-phases %standard-phases
4118 (replace 'check
4119 (lambda _
4120 (invoke "pytest"))))))
4121 (propagated-inputs
4122 `(("python-wrapt" ,python-wrapt)))
4123 (native-inputs
4124 `(("python-bumpversion" ,python-bumpversion)
4125 ("python-pytest" ,python-pytest)
4126 ("python-pytest-cov" ,python-pytest-cov)
4127 ("python-sphinx" ,python-sphinx)
4128 ("python-tox" ,python-tox)))
4129 (home-page "https://github.com/tantale/deprecated")
4130 (synopsis "Python decorator to deprecate classes, functions or methods")
4131 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4132 to deprecate classes, functions or methods.")
4133 (license license:expat)))
4134
4135 (define-public python-pygithub
4136 (package
4137 (name "python-pygithub")
4138 (version "1.54.1")
4139 (source
4140 ;; We fetch from the Git repo because there are no tests in the PyPI
4141 ;; archive.
4142 (origin
4143 (method git-fetch)
4144 (uri (git-reference
4145 (url "https://github.com/PyGithub/PyGithub")
4146 (commit (string-append "v" version))))
4147 (file-name (git-file-name name version))
4148 (sha256
4149 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4150 (build-system python-build-system)
4151 (arguments
4152 `(#:phases
4153 (modify-phases %standard-phases
4154 (replace 'check
4155 (lambda* (#:key tests? #:allow-other-keys)
4156 (when tests?
4157 (invoke "pytest"))
4158 #t)))))
4159 (propagated-inputs
4160 `(("python-cryptography" ,python-cryptography)
4161 ("python-deprecated" ,python-deprecated)
4162 ("python-pyjwt" ,python-pyjwt)
4163 ("python-requests" ,python-requests)))
4164 (native-inputs
4165 `(("python-httpretty" ,python-httpretty)
4166 ("python-pytest" ,python-pytest)))
4167 (home-page "https://pygithub.readthedocs.io/en/latest/")
4168 (synopsis "Python library for the GitHub API")
4169 (description "This library allows managing GitHub resources such as
4170 repositories, user profiles, and organizations in your Python applications,
4171 using version 3 of the GitHub application programming interface (API).")
4172 (license license:lgpl3+)))
4173
4174 (define-public python-rellu
4175 (package
4176 (name "python-rellu")
4177 (version "0.7")
4178 (source
4179 (origin
4180 (method url-fetch)
4181 (uri (pypi-uri "rellu" version))
4182 (sha256
4183 (base32
4184 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4185 (build-system python-build-system)
4186 (propagated-inputs
4187 `(("python-invoke" ,python-invoke)
4188 ("python-pygithub" ,python-pygithub)))
4189 (home-page "https://github.com/robotframework/rellu")
4190 (synopsis "Utilities to create PyPI releases")
4191 (description "This collection of utilities contains tooling and templates
4192 to assist in creating releases on GitHub and publishing them on PyPI. It is
4193 designed to be used by Robot Framework and tools and libraries in its
4194 ecosystem, but can naturally be used also by other projects.")
4195 (license license:asl2.0)))
4196
4197 (define-public python-robotframework
4198 (package
4199 (name "python-robotframework")
4200 (version "3.2.2")
4201 ;; There are no tests in the PyPI archive.
4202 (source
4203 (origin
4204 (method git-fetch)
4205 (uri (git-reference
4206 (url "https://github.com/robotframework/robotframework")
4207 (commit (string-append "v" version))))
4208 (file-name (git-file-name name version))
4209 (sha256
4210 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
4211 (patches (search-patches
4212 "python-robotframework-source-date-epoch.patch"))))
4213 (build-system python-build-system)
4214 (arguments
4215 `(#:phases (modify-phases %standard-phases
4216 (add-before 'build 'build-and-install-doc
4217 (lambda* (#:key outputs #:allow-other-keys)
4218 (let* ((doc-output (assoc-ref outputs "doc"))
4219 (doc (string-append doc-output "/share/"
4220 ,name "-" ,version "/")))
4221 (invoke "invoke" "library-docs" "all")
4222 (mkdir-p doc)
4223 (copy-recursively "doc/libraries"
4224 (string-append doc "/libraries"))
4225 #t)))
4226 (replace 'check
4227 (lambda* (#:key inputs #:allow-other-keys)
4228 ;; Some tests require timezone data. Otherwise, they
4229 ;; look up /etc/localtime, which doesn't exist, and fail
4230 ;; with:
4231 ;;
4232 ;; OverflowError: mktime argument out of range
4233 (setenv "TZDIR"
4234 (string-append (assoc-ref inputs "tzdata")
4235 "/share/zoneinfo"))
4236 (setenv "TZ" "Europe/Paris")
4237
4238 (invoke "python" "utest/run.py"))))))
4239 (native-inputs
4240 `(("python-invoke" ,python-invoke)
4241 ("python-rellu" ,python-rellu)
4242 ("python:tk" ,python "tk") ;used when building the HTML doc
4243 ("tzdata" ,tzdata-for-tests)))
4244 (outputs '("out" "doc"))
4245 (home-page "https://robotframework.org")
4246 (synopsis "Generic automation framework")
4247 (description "Robot Framework is a generic automation framework for
4248 acceptance testing, acceptance test driven development (ATDD), and robotic
4249 process automation (RPA).")
4250 (license license:asl2.0)))
4251
4252 (define-public python-robotframework-lint
4253 ;; There is no properly tagged release; the commit below seems to correspond
4254 ;; to the 0.9 stable release available from PyPI. The tests are not
4255 ;; included in the PyPI archive, so we fetch the sources from the upstream
4256 ;; Git repo.
4257 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4258 (revision "0"))
4259 (package
4260 (name "python-robotframework-lint")
4261 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4262 revision commit))
4263 (source
4264 (origin
4265 (method git-fetch)
4266 (uri (git-reference
4267 (url "https://github.com/boakley/robotframework-lint")
4268 (commit commit)))
4269 (file-name (git-file-name name version))
4270 (sha256
4271 (base32
4272 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4273 (build-system python-build-system)
4274 (arguments
4275 `(#:phases
4276 (modify-phases %standard-phases
4277 (replace 'check
4278 (lambda _
4279 (invoke "python" "-m" "robot" "-A"
4280 "tests/conf/default.args" "tests"))))))
4281 (propagated-inputs
4282 `(("python-robotframework" ,python-robotframework)))
4283 (home-page "https://github.com/boakley/robotframework-lint/")
4284 (synopsis "Static analysis tool (linter) for Robot Framework")
4285 (description "This package provides the @code{rflint} command-line
4286 utility, a static analysis tool (linter) for Robot Framework source files.")
4287 (license license:asl2.0))))
4288
4289 (define-public python-robotframework-sshlibrary
4290 (package
4291 (name "python-robotframework-sshlibrary")
4292 (version "3.3.0")
4293 ;; There are no tests in the PyPI archive.
4294 (source
4295 (origin
4296 (method git-fetch)
4297 (uri (git-reference
4298 (url "https://github.com/robotframework/SSHLibrary")
4299 (commit (string-append "v" version))))
4300 (file-name (git-file-name name version))
4301 (sha256
4302 (base32
4303 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4304 (build-system python-build-system)
4305 (arguments
4306 `(#:phases
4307 (modify-phases %standard-phases
4308 (add-before 'build 'build-and-install-doc
4309 (lambda* (#:key outputs #:allow-other-keys)
4310 (let* ((doc-output (assoc-ref outputs "doc"))
4311 (doc (string-append doc-output "/share/"
4312 ,name "-" ,version "/")))
4313 (invoke "chmod" "-R" "+w" "docs")
4314 (invoke "invoke" "kw-docs" "project-docs")
4315 (mkdir-p doc)
4316 (for-each delete-file (find-files "docs" "\\.rst"))
4317 (copy-recursively "docs" doc)
4318 #t)))
4319 (replace 'check
4320 (lambda _
4321 ;; Some tests require an SSH server; we remove them.
4322 (delete-file "utest/test_client_api.py")
4323 (delete-file "utest/test_scp.py")
4324 (invoke "python" "utest/run.py"))))))
4325 (propagated-inputs
4326 `(("python-robotframework" ,python-robotframework)
4327 ("python-paramiko" ,python-paramiko)
4328 ("python-scp" ,python-scp)))
4329 (native-inputs
4330 `(("openssh" ,openssh)
4331 ("which" ,which)
4332 ;; To generate the documentation
4333 ("python-docutils" ,python-docutils)
4334 ("python-invoke" ,python-invoke)
4335 ("python-pygments" ,python-pygments)
4336 ("python-rellu" ,python-rellu)))
4337 (outputs '("out" "doc"))
4338 (home-page "https://github.com/robotframework/SSHLibrary")
4339 (synopsis "Robot Framework library for SSH and SFTP")
4340 (description "SSHLibrary is a Robot Framework library providing support
4341 for SSH and SFTP. It has the following main usages:
4342 @itemize @bullet
4343 @item Executing commands on the remote machine, either blocking or non-blocking.
4344 @item Writing and reading in an interactive shell.
4345 @item Transferring files and directories over SFTP.
4346 @item Ensuring that files and directories exist on the remote machine.
4347 @end itemize")
4348 (license license:asl2.0)))
4349
4350 (define-public python-rstr
4351 (package
4352 (name "python-rstr")
4353 (version "2.2.6")
4354 (source
4355 (origin
4356 (method url-fetch)
4357 (uri (pypi-uri "rstr" version))
4358 (sha256
4359 (base32
4360 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4361 (build-system python-build-system)
4362 (home-page "https://github.com/leapfrogonline/rstr")
4363 (synopsis "Generate random strings in Python")
4364 (description "This package provides a python module for generating
4365 random strings of various types. It could be useful for fuzz testing,
4366 generating dummy data, or other applications. It has no dependencies
4367 outside the standard library.")
4368 (license license:bsd-3)))
4369
4370 (define-public python-scp
4371 (package
4372 (name "python-scp")
4373 (version "0.13.3")
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (pypi-uri "scp" version))
4378 (sha256
4379 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4380 (build-system python-build-system)
4381 (arguments
4382 '(#:tests? #f)) ;tests require an SSH server
4383 (propagated-inputs
4384 `(("python-paramiko" ,python-paramiko)))
4385 (home-page "https://github.com/jbardin/scp.py")
4386 (synopsis "SCP protocol module for Python and Paramiko")
4387 (description "The scp module extends the Paramiko library to send and
4388 receive files via the SCP1 protocol, as implemented by the OpenSSH
4389 @command{scp} program.")
4390 (license license:gpl2+)))
4391
4392 (define-public python-rst.linker
4393 (package
4394 (name "python-rst.linker")
4395 (version "1.11")
4396 (source
4397 (origin
4398 (method url-fetch)
4399 (uri (pypi-uri "rst.linker" version))
4400 (sha256
4401 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4402 (build-system python-build-system)
4403 (propagated-inputs
4404 `(("python-dateutil" ,python-dateutil)
4405 ("python-six" ,python-six)))
4406 (native-inputs
4407 `(("python-setuptools-scm" ,python-setuptools-scm)))
4408 ;; Test would require path.py, which would introduce a cyclic dependence.
4409 (arguments `(#:tests? #f))
4410 ;; Note: As of version 1.7 the documentation is not worth building.
4411 (home-page "https://github.com/jaraco/rst.linker")
4412 (synopsis "Sphinx plugin to add links and timestamps")
4413 (description "rst.linker automatically replaces text by a
4414 reStructuredText external reference or timestamps. It's primary purpose is to
4415 augment the changelog, but it can be used for other documents, too.")
4416 (license license:expat)))
4417
4418 (define-public python2-rst.linker
4419 (package-with-python2 python-rst.linker))
4420
4421 (define-public python-sshpubkeys
4422 (package
4423 (name "python-sshpubkeys")
4424 (version "3.1.0")
4425 (home-page "https://github.com/ojarva/python-sshpubkeys")
4426 (source (origin
4427 (method git-fetch)
4428 (uri (git-reference
4429 (url home-page)
4430 (commit (string-append "v" version))))
4431 (file-name (git-file-name name version))
4432 (sha256
4433 (base32
4434 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4435 (build-system python-build-system)
4436 (propagated-inputs
4437 `(("python-cryptography" ,python-cryptography)
4438 ("python-ecdsa" ,python-ecdsa)))
4439 (synopsis "OpenSSH public key parser")
4440 (description
4441 "This package provides a library for parsing and validating OpenSSH
4442 public key files.")
4443 (license license:bsd-3)))
4444
4445 (define-public python-feedgenerator
4446 (package
4447 (name "python-feedgenerator")
4448 (version "1.9")
4449 (source
4450 (origin
4451 (method url-fetch)
4452 (uri (pypi-uri "feedgenerator" version))
4453 (sha256
4454 (base32
4455 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4456 (modules '((guix build utils)))
4457 (snippet
4458 '(begin
4459 ;; Remove pre-compiled .pyc files from source.
4460 (for-each delete-file-recursively
4461 (find-files "." "__pycache__" #:directories? #t))
4462 (for-each delete-file (find-files "." "\\.pyc$"))
4463 #t))))
4464 (build-system python-build-system)
4465 (propagated-inputs
4466 `(("python-pytz" ,python-pytz)
4467 ("python-six" ,python-six)))
4468 (home-page "https://github.com/getpelican/feedgenerator")
4469 (synopsis
4470 "Standalone version of Django's Atom/RSS feed generator")
4471 (description
4472 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4473 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4474 (license license:bsd-3)))
4475
4476 (define-public python2-feedgenerator
4477 (package-with-python2 python-feedgenerator))
4478
4479 (define-public python-jsonrpc-server
4480 (package
4481 (name "python-jsonrpc-server")
4482 (version "0.4.0")
4483 (source
4484 (origin
4485 (method url-fetch)
4486 (uri (pypi-uri "python-jsonrpc-server" version))
4487 (sha256
4488 (base32
4489 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4490 (build-system python-build-system)
4491 (propagated-inputs
4492 `(("python-mock" ,python-mock)
4493 ("python-pytest" ,python-pytest)
4494 ("python-ujson" ,python-ujson)))
4495 (home-page
4496 "https://github.com/palantir/python-jsonrpc-server")
4497 (synopsis "JSON RPC 2.0 server library")
4498 (description
4499 "This package provides a JSON RPC 2.0 server library for Python.")
4500 (license license:expat)))
4501
4502 (define-public python-pydantic
4503 (package
4504 (name "python-pydantic")
4505 (version "1.8.2")
4506 (source
4507 (origin
4508 (method git-fetch)
4509 (uri (git-reference
4510 (url "https://github.com/samuelcolvin/pydantic")
4511 (commit (string-append "v" version))))
4512 (file-name (git-file-name name version))
4513 (sha256
4514 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4515 (build-system python-build-system)
4516 (arguments
4517 '(#:phases
4518 (modify-phases %standard-phases
4519 (add-before 'check 'disable-test
4520 (lambda _
4521 ;; Reported upstream:
4522 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4523 ;; Disable the faulty test as the fix is unclear.
4524 (substitute* "tests/test_validators.py"
4525 (("test_assert_raises_validation_error")
4526 "_test_assert_raises_validation_error"))
4527
4528 ;; These fail because of <https://bugs.python.org/issue40398>.
4529 ;; Remove after Python has been upgraded to >= 3.9.
4530 (substitute* "tests/test_generics.py"
4531 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4532 ""))
4533 (substitute* "tests/test_schema.py"
4534 (("test_unenforced_constraints_schema")
4535 "_test_unenforced_constraints_schema"))
4536
4537 ;; Disable tests for the Hypothesis plugin because it is tricky
4538 ;; to configure in the build container.
4539 (delete-file "tests/test_hypothesis_plugin.py")))
4540 (replace 'check
4541 (lambda _ (invoke "pytest" "-vv"))))))
4542 (native-inputs
4543 `(("python-pytest" ,python-pytest)
4544 ("python-pytest-mock" ,python-pytest-mock)))
4545 (propagated-inputs
4546 `(("python-typing-extensions" ,python-typing-extensions)))
4547 (home-page "https://github.com/samuelcolvin/pydantic")
4548 (synopsis "Python data validation and settings management")
4549 (description
4550 "Pydantic enforces type hints at runtime, and provides user friendly
4551 errors when data is invalid.")
4552 (license license:expat)))
4553
4554 (define-public python-pydocstyle
4555 (package
4556 (name "python-pydocstyle")
4557 (version "3.0.0")
4558 (source
4559 (origin
4560 (method url-fetch)
4561 (uri (pypi-uri "pydocstyle" version))
4562 (sha256
4563 (base32
4564 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4565 (build-system python-build-system)
4566 (propagated-inputs
4567 `(("python-six" ,python-six)
4568 ("python-snowballstemmer" ,python-snowballstemmer)))
4569 (home-page
4570 "https://github.com/PyCQA/pydocstyle/")
4571 (synopsis "Python docstring style checker")
4572 (description
4573 "This package provides a style checker for the Python Language
4574 Server (PLS).")
4575 (license license:expat)))
4576
4577 (define-public python-language-server
4578 (package
4579 (name "python-language-server")
4580 (version "0.36.2")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "python-language-server" version))
4585 (sha256
4586 (base32
4587 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4588 (build-system python-build-system)
4589 (arguments
4590 `(#:phases
4591 (modify-phases %standard-phases
4592 (add-after 'unpack 'relax-deps
4593 (lambda _
4594 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4595 "pycodestyle"))
4596 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4597 #t))
4598 (add-before 'check 'set-HOME
4599 (lambda _ (setenv "HOME" "/tmp") #t))
4600 (replace 'check
4601 (lambda _
4602 ;; Disable failing test.
4603 (invoke "python" "-m" "pytest" "-k"
4604 "not test_pyqt_completion"))))))
4605 (propagated-inputs
4606 `(("python-autopep8" ,python-autopep8)
4607 ("python-configparser" ,python-configparser)
4608 ("python-pydocstyle" ,python-pydocstyle)
4609 ("python-flake8" ,python-flake8)
4610 ("python-future" ,python-future)
4611 ("python-jedi" ,python-jedi)
4612 ("python-jsonrpc-server" ,python-jsonrpc-server)
4613 ("python-pluggy" ,python-pluggy)
4614 ("python-pycodestyle" ,python-pycodestyle)
4615 ("python-pyflakes" ,python-pyflakes)
4616 ("python-rope" ,python-rope)
4617 ("python-ujson" ,python-ujson)
4618 ("python-yapf" ,python-yapf)))
4619 (native-inputs
4620 `(("python-coverage" ,python-coverage)
4621 ("python-flaky" ,python-flaky)
4622 ("python-matplotlib" ,python-matplotlib)
4623 ("python-mock" ,python-mock)
4624 ("python-numpy" ,python-numpy)
4625 ("python-pandas" ,python-pandas)
4626 ("python-pylint" ,python-pylint)
4627 ("python-pytest" ,python-pytest)
4628 ("python-pytest-cov" ,python-pytest-cov)
4629 ("python-versioneer" ,python-versioneer)))
4630 (home-page "https://github.com/palantir/python-language-server")
4631 (synopsis "Python implementation of the Language Server Protocol")
4632 (description
4633 "The Python Language Server (pyls) is an implementation of the Python 3
4634 language specification for the Language Server Protocol (LSP). This tool is
4635 used in text editing environments to provide a complete and integrated
4636 feature-set for programming Python effectively.")
4637 (license license:expat)))
4638
4639 (define-public python-pathspec
4640 (package
4641 (name "python-pathspec")
4642 (version "0.7.0")
4643 (source
4644 (origin
4645 (method url-fetch)
4646 (uri (pypi-uri "pathspec" version))
4647 (sha256
4648 (base32
4649 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4650 (build-system python-build-system)
4651 (home-page "https://github.com/cpburnz/python-path-specification")
4652 (synopsis "Utility library for gitignore style pattern matching of file paths")
4653 (description
4654 "This package provides a utility library for gitignore style pattern
4655 matching of file paths.")
4656 (license license:mpl2.0)))
4657
4658 (define-public python-black
4659 (package
4660 (name "python-black")
4661 (version "20.8b1")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "black" version))
4666 (sha256
4667 (base32
4668 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4669 (build-system python-build-system)
4670 (arguments
4671 `(#:phases
4672 (modify-phases %standard-phases
4673 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4674 (lambda _
4675 (let ((python3 (which "python3")))
4676 (substitute* '("tests/data/fmtonoff.py"
4677 "tests/data/string_prefixes.py"
4678 "tests/data/function.py"
4679 "tests/data/python37.py")
4680 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4681 (string-append "#!" python3 (if (string? minor-version)
4682 minor-version
4683 "")))))
4684 #t))
4685 (add-after 'unpack 'disable-broken-tests
4686 (lambda* (#:key outputs inputs #:allow-other-keys)
4687 ;; Make installed package available for running the tests
4688 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4689 ":" (getenv "PATH")))
4690
4691 ;; These tests are supposed to be skipped when the blackd
4692 ;; dependencies are missing, but this doesn't quite work.
4693 (substitute* "tests/test_black.py"
4694 (("( *)class BlackDTestCase.*" match indent)
4695 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4696 indent "class BlackDTestCase(unittest.TestCase):\n"))
4697 (("web.Application") "False")
4698 (("@unittest_run_loop") ""))
4699
4700 ;; Patching the above file breaks the self test
4701 (substitute* "tests/test_black.py"
4702 (("( *)def test_self" match indent)
4703 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4704
4705 (substitute* "tests/test_black.py"
4706 (("( *)def test_python38" match indent)
4707 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4708 #t)))))
4709 (propagated-inputs
4710 `(("python-click" ,python-click)
4711 ("python-attrs" ,python-attrs)
4712 ("python-appdirs" ,python-appdirs)
4713 ("python-pathspec" ,python-pathspec)
4714 ("python-mypy-extensions" ,python-mypy-extensions)
4715 ("python-regex" ,python-regex)
4716 ("python-toml" ,python-toml)
4717 ("python-typed-ast" ,python-typed-ast)
4718 ("python-typing-extensions" ,python-typing-extensions)))
4719 (native-inputs
4720 `(("python-setuptools-scm" ,python-setuptools-scm)))
4721 (home-page "https://github.com/ambv/black")
4722 (synopsis "The uncompromising code formatter")
4723 (description "Black is the uncompromising Python code formatter.")
4724 (license license:expat)))
4725
4726 (define-public python-black-macchiato
4727 (package
4728 (name "python-black-macchiato")
4729 (version "1.3.0")
4730 (source
4731 (origin
4732 (method url-fetch)
4733 (uri (pypi-uri "black-macchiato" version))
4734 (sha256
4735 (base32
4736 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4737 (build-system python-build-system)
4738 (propagated-inputs
4739 `(("python-black" ,python-black)))
4740 (home-page "https://github.com/wbolster/black-macchiato")
4741 (synopsis "Partial @code{python-black} formatting")
4742 (description
4743 "This package is built on top the @{python-black} code formatter to
4744 enable formatting of partial files.")
4745 (license license:bsd-3)))
4746
4747 (define-public python-blinker
4748 (package
4749 (name "python-blinker")
4750 (version "1.4")
4751 (source
4752 (origin
4753 (method url-fetch)
4754 (uri (pypi-uri "blinker" version))
4755 (sha256
4756 (base32
4757 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4758 (build-system python-build-system)
4759 (home-page "https://pythonhosted.org/blinker/")
4760 (synopsis "Fast, simple object-to-object and broadcast signaling")
4761 (description
4762 "Blinker provides a fast dispatching system that allows any number of
4763 interested parties to subscribe to events, or \"signals\".")
4764 (license license:expat)))
4765
4766 (define-public python2-blinker
4767 (package-with-python2 python-blinker))
4768
4769 (define-public pelican
4770 (package
4771 (name "pelican")
4772 (version "4.2.0")
4773 (source
4774 (origin
4775 (method url-fetch)
4776 (uri (pypi-uri "pelican" version))
4777 (sha256
4778 (base32
4779 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4780 (build-system python-build-system)
4781 (propagated-inputs
4782 `(("python-blinker" ,python-blinker)
4783 ("python-dateutil" ,python-dateutil)
4784 ("python-docutils" ,python-docutils)
4785 ("python-feedgenerator" ,python-feedgenerator)
4786 ("python-jinja2" ,python-jinja2)
4787 ("python-markdown" ,python-markdown)
4788 ("python-pygments" ,python-pygments)
4789 ("python-pytz" ,python-pytz)
4790 ("python-six" ,python-six)
4791 ("python-unidecode" ,python-unidecode)))
4792 (home-page "https://getpelican.com/")
4793 (arguments
4794 `(;; XXX Requires a lot more packages to do unit tests :P
4795 #:tests? #f))
4796 (synopsis "Python-based static site publishing system")
4797 (description
4798 "Pelican is a tool to generate a static blog from reStructuredText,
4799 Markdown input files, and more. Pelican uses Jinja2 for templating
4800 and is very extensible.")
4801 (license license:agpl3+)))
4802
4803 (define-public mallard-ducktype
4804 (package
4805 (name "mallard-ducktype")
4806 (version "1.0.2")
4807 (source
4808 (origin
4809 (method git-fetch)
4810 ;; git-reference because tests are not included in pypi source tarball
4811 ;; https://issues.guix.gnu.org/issue/36755#2
4812 (uri (git-reference
4813 (url "https://github.com/projectmallard/mallard-ducktype")
4814 (commit version)))
4815 (file-name (git-file-name name version))
4816 (sha256
4817 (base32
4818 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4819 (build-system python-build-system)
4820 (arguments
4821 '(#:phases
4822 (modify-phases %standard-phases
4823 (replace 'check
4824 (lambda _
4825 (with-directory-excursion "tests"
4826 (invoke "sh" "runtests")))))))
4827 (home-page "http://projectmallard.org")
4828 (synopsis "Convert Ducktype to Mallard documentation markup")
4829 (description
4830 "Ducktype is a lightweight syntax that can represent all the semantics
4831 of the Mallard XML documentation system. Ducktype files can be converted to
4832 Mallard using the @command{ducktype} tool. The yelp-tools package
4833 provides additional functionality on the produced Mallard documents.")
4834 (license license:expat)))
4835
4836 (define-public python-cython
4837 (package
4838 (name "python-cython")
4839 (version "0.29.22")
4840 (source
4841 (origin
4842 (method url-fetch)
4843 (uri (pypi-uri "Cython" version))
4844 (sha256
4845 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4846 (build-system python-build-system)
4847 ;; we need the full python package and not just the python-wrapper
4848 ;; because we need libpython3.3m.so
4849 (inputs
4850 `(("python" ,python)))
4851 (arguments
4852 `(#:phases
4853 (modify-phases %standard-phases
4854 (add-before 'check 'set-HOME
4855 ;; some tests require access to "$HOME/.cython"
4856 (lambda _ (setenv "HOME" "/tmp") #t))
4857 (replace 'check
4858 (lambda _
4859 ;; Disable compiler optimizations to greatly reduce the running
4860 ;; time of the test suite.
4861 (setenv "CFLAGS" "-O0")
4862
4863 (invoke "python" "runtests.py" "-vv"
4864 "-j" (number->string (parallel-job-count))
4865 ;; XXX: On 32-bit architectures, running the parallel tests
4866 ;; fails on many-core systems, see
4867 ;; <https://github.com/cython/cython/issues/2807>.
4868 ,@(if (not (target-64bit?))
4869 '("-x" "run.parallel")
4870 '())))))))
4871 (home-page "https://cython.org/")
4872 (synopsis "C extensions for Python")
4873 (description "Cython is an optimising static compiler for both the Python
4874 programming language and the extended Cython programming language. It makes
4875 writing C extensions for Python as easy as Python itself.")
4876 (license license:asl2.0)
4877 (properties `((python2-variant . ,(delay python2-cython))))))
4878
4879 (define-public python2-cython
4880 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4881 (package/inherit base
4882 (name "python2-cython")
4883 (inputs
4884 `(("python-2" ,python-2))) ;this is not automatically changed
4885 (arguments
4886 (substitute-keyword-arguments (package-arguments base)
4887 ((#:phases phases)
4888 `(modify-phases ,phases
4889 (add-before 'check 'adjust-test_embed
4890 (lambda _
4891 (substitute* "runtests.py"
4892 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4893 ;; so it can give the right -L flag to GCC when embedding static
4894 ;; builds of Python. It is unaware that the Python "config"
4895 ;; directory (where the static library lives) was renamed in
4896 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4897 ;; which works fine, because that is where the shared library is.
4898 ;;
4899 ;; It also appears to be unaware that the Makefile in Demos/embed
4900 ;; already unconditionally pass the static library location to GCC,
4901 ;; after checking sysconfig.get_config_var('LIBPL).
4902 ;;
4903 ;; The effect is that the linker is unable to resolve libexpat
4904 ;; symbols when building for Python 2, because neither the Python 2
4905 ;; shared library nor Expat is available. To fix it, we can either
4906 ;; add Expat as an input and make it visible to the linker, or just
4907 ;; prevent it from overriding the Python shared library location.
4908 ;; The end result is identical, so we take the easy route.
4909 ((" or libname not in os\\.listdir\\(libdir\\)")
4910 ""))
4911 #t)))))))))
4912
4913 ;; The RPython toolchain currently does not support Python 3.
4914 (define-public python2-rpython
4915 (package
4916 (name "python2-rpython")
4917 (version "0.2.1")
4918 (source
4919 (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "rpython" version))
4922 (sha256
4923 (base32
4924 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4925 (build-system python-build-system)
4926 (arguments `(#:python ,python-2))
4927 (native-inputs
4928 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4929 (home-page "https://rpython.readthedocs.org")
4930 (synopsis "Framework for implementing interpreters and virtual machines")
4931 (description "RPython is a translation and support framework for
4932 producing implementations of dynamic languages, emphasizing a clean separation
4933 between language specification and implementation aspects.")
4934 (license license:expat)))
4935
4936 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4937 ;; python-scipy still build, as these three packages are often used together.
4938 (define-public python-numpy
4939 (package
4940 (name "python-numpy")
4941 (version "1.17.3")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (string-append
4946 "https://github.com/numpy/numpy/releases/download/v"
4947 version "/numpy-" version ".tar.gz"))
4948 (sha256
4949 (base32
4950 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4951 (build-system python-build-system)
4952 (inputs
4953 `(("openblas" ,openblas)))
4954 (native-inputs
4955 `(("python-cython" ,python-cython)
4956 ("python-pytest" ,python-pytest)
4957 ("gfortran" ,gfortran)))
4958 (arguments
4959 `(#:phases
4960 (modify-phases %standard-phases
4961 (add-before 'build 'configure-blas-lapack
4962 (lambda* (#:key inputs #:allow-other-keys)
4963 (call-with-output-file "site.cfg"
4964 (lambda (port)
4965 (format port
4966 "[openblas]
4967 libraries = openblas
4968 library_dirs = ~a/lib
4969 include_dirs = ~a/include
4970
4971 # backslash-n to make emacs happy
4972 \n[lapack]
4973 lapack_libs = lapack
4974 library_dirs = ~a/lib
4975 include_dirs = ~a/include
4976 "
4977 (assoc-ref inputs "openblas")
4978 (assoc-ref inputs "openblas")
4979 (assoc-ref inputs "lapack")
4980 (assoc-ref inputs "lapack"))))
4981 #t))
4982 (add-before 'build 'fix-executable-paths
4983 (lambda* (#:key inputs #:allow-other-keys)
4984 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4985 ;; instead of /bin/sh.
4986 (substitute* "numpy/distutils/exec_command.py"
4987 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4988 (string-append match-start (assoc-ref inputs "bash") match-end)))
4989 ;; Use "gcc" executable, not "cc".
4990 (substitute* "numpy/distutils/system_info.py"
4991 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4992 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4993 #t))
4994 ;; Tests can only be run after the library has been installed and not
4995 ;; within the source directory.
4996 (delete 'check)
4997 (add-after 'install 'check
4998 (lambda* (#:key outputs inputs #:allow-other-keys)
4999 ;; Make installed package available for running the tests
5000 (add-installed-pythonpath inputs outputs)
5001 ;; Make sure "f2py" etc is found.
5002 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5003 ":" (getenv "PATH")))
5004 (with-directory-excursion "/tmp"
5005 (invoke "python" "-c"
5006 "import numpy; numpy.test(verbose=2)")))))))
5007 (home-page "https://numpy.org")
5008 (synopsis "Fundamental package for scientific computing with Python")
5009 (description "NumPy is the fundamental package for scientific computing
5010 with Python. It contains among other things: a powerful N-dimensional array
5011 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5012 and Fortran code, useful linear algebra, Fourier transform, and random number
5013 capabilities.")
5014 (properties `((python2-variant . ,(delay python2-numpy))))
5015 (license license:bsd-3)))
5016
5017 ;; Numpy 1.16.x are the last versions that support Python 2.
5018 (define-public python2-numpy
5019 (let ((numpy (package-with-python2
5020 (strip-python2-variant python-numpy))))
5021 (package
5022 (inherit numpy)
5023 (version "1.16.5")
5024 (source (origin
5025 (method url-fetch)
5026 (uri (string-append
5027 "https://github.com/numpy/numpy/releases/download/v"
5028 version "/numpy-" version ".tar.gz"))
5029 (sha256
5030 (base32
5031 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5032
5033 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5034 ;; interest only for legacy code going back to NumPy's predecessor
5035 ;; Numeric.
5036 (define-public python2-numpy-1.8
5037 (package (inherit python2-numpy)
5038 (version "1.8.2")
5039 (source
5040 (origin
5041 (method git-fetch)
5042 (uri (git-reference
5043 (url "https://github.com/numpy/numpy")
5044 (commit (string-append "v" version))))
5045 (file-name (git-file-name "numpy" version))
5046 (sha256
5047 (base32
5048 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5049 (arguments
5050 (substitute-keyword-arguments (package-arguments python2-numpy)
5051 ((#:phases phases)
5052 `(modify-phases ,phases
5053 (replace 'configure-blas-lapack
5054 (lambda* (#:key inputs #:allow-other-keys)
5055 (call-with-output-file "site.cfg"
5056 (lambda (port)
5057 (format port
5058 "[openblas]
5059 libraries = openblas,lapack
5060 library_dirs = ~a/lib:~a/lib
5061 include_dirs = ~a/include:~a/include
5062 "
5063 (assoc-ref inputs "openblas")
5064 (assoc-ref inputs "lapack")
5065 (assoc-ref inputs "openblas")
5066 (assoc-ref inputs "lapack"))))
5067 #t))))))
5068 (native-inputs
5069 `(("python2-nose" ,python2-nose)))
5070 (description "NumPy is the fundamental package for scientific computing
5071 with Python. It contains among other things: a powerful N-dimensional array
5072 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5073 and Fortran code, useful linear algebra, Fourier transform, and random number
5074 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5075 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5076 Numeric.")
5077 (license license:bsd-3)))
5078
5079 (define-public python-munch
5080 (package
5081 (name "python-munch")
5082 (version "2.0.4")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (pypi-uri "munch" version))
5087 (sha256
5088 (base32
5089 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5090 (build-system python-build-system)
5091 (home-page "https://github.com/Infinidat/munch")
5092 (synopsis "Dot-accessible dictionary")
5093 (description "Munch is a dot-accessible dictionary similar to JavaScript
5094 objects.")
5095 (license license:expat)))
5096
5097 (define-public python2-munch
5098 (package-with-python2 python-munch))
5099
5100 (define-public python-colormath
5101 (package
5102 (name "python-colormath")
5103 (version "3.0.0")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (pypi-uri "colormath" version))
5108 (sha256
5109 (base32
5110 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5111 (build-system python-build-system)
5112 (propagated-inputs
5113 `(("python-networkx" ,python-networkx)
5114 ("python-numpy" ,python-numpy)))
5115 (home-page "https://github.com/gtaylor/python-colormath")
5116 (synopsis "Color math and conversion library")
5117 (description
5118 "This is a Python library for color math and conversions.")
5119 (license license:bsd-3)))
5120
5121 (define-public python2-colormath
5122 (package-with-python2 python-colormath))
5123
5124 (define-public python-sparse
5125 (package
5126 (name "python-sparse")
5127 (version "0.12.0")
5128 (source
5129 (origin
5130 (method url-fetch)
5131 (uri (pypi-uri "sparse" version))
5132 (sha256
5133 (base32
5134 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5135 (build-system python-build-system)
5136 (arguments
5137 `(#:phases
5138 (modify-phases %standard-phases
5139 (replace 'check
5140 (lambda* (#:key tests? #:allow-other-keys)
5141 (when tests?
5142 (invoke "python" "-m" "pytest" "-v")))))))
5143 (propagated-inputs
5144 `(("python-numba" ,python-numba)
5145 ("python-numpy" ,python-numpy)
5146 ("python-scipy" ,python-scipy)))
5147 (native-inputs
5148 `(("python-dask" ,python-dask)
5149 ("python-pytest" ,python-pytest)
5150 ("python-pytest-black" ,python-pytest-black)
5151 ("python-pytest-cov" ,python-pytest-cov)))
5152 (home-page "https://github.com/pydata/sparse/")
5153 (synopsis "Library for multi-dimensional sparse arrays")
5154 (description
5155 "This package implements sparse arrays of arbitrary dimension on top of
5156 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5157 of the elements are zero. @code{python-sparse} generalizes the
5158 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5159 extends beyond just rows and columns to an arbitrary number of dimensions.
5160 Additionally, this project maintains compatibility with the
5161 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5162 used in @code{scipy.sparse}. These differences make this project useful in
5163 certain situations where @code{scipy.sparse} matrices are not well suited, but
5164 it should not be considered a full replacement. It lacks layouts that are not
5165 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5166 depends on @code{scipy.sparse} for some computations.")
5167 (license license:bsd-3)))
5168
5169 (define-public python-spectra
5170 (package
5171 (name "python-spectra")
5172 (version "0.0.11")
5173 (source
5174 (origin
5175 (method url-fetch)
5176 (uri (pypi-uri "spectra" version))
5177 (sha256
5178 (base32
5179 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5180 (build-system python-build-system)
5181 (arguments
5182 `(#:phases
5183 (modify-phases %standard-phases
5184 (replace 'check
5185 (lambda _ (invoke "nosetests" "-v"))))))
5186 (propagated-inputs
5187 `(("python-colormath" ,python-colormath)))
5188 (native-inputs
5189 `(("python-nose" ,python-nose)))
5190 (home-page "https://github.com/jsvine/spectra")
5191 (synopsis "Color scales and color conversion")
5192 (description
5193 "This package provides a Python library intended to make color math,
5194 color scales, and color space conversion easy. It has support for:
5195
5196 @enumerate
5197 @item Color scales
5198 @item Color ranges
5199 @item Color blending
5200 @item Brightening/darkening colors
5201 @item Saturating/desaturating colors
5202 @item Conversion to/from multiple color spaces.
5203 @end enumerate\n")
5204 (license license:expat)))
5205
5206 (define-public python2-spectra
5207 (package-with-python2 python-spectra))
5208
5209 (define-public python-numpy-documentation
5210 (package
5211 (name "python-numpy-documentation")
5212 (version (package-version python-numpy))
5213 (source (package-source python-numpy))
5214 (build-system python-build-system)
5215 (native-inputs
5216 `(("python-matplotlib" ,python-matplotlib)
5217 ("python-numpy" ,python-numpy)
5218 ("pkg-config" ,pkg-config)
5219 ("python-sphinx" ,python-sphinx)
5220 ("python-numpydoc" ,python-numpydoc)
5221 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
5222 texlive-fonts-ec
5223 texlive-generic-ifxetex
5224 texlive-generic-pdftex
5225 texlive-amsfonts/patched
5226 texlive-latex-capt-of
5227 texlive-latex-cmap
5228 texlive-latex-environ
5229 texlive-latex-eqparbox
5230 texlive-latex-etoolbox
5231 texlive-latex-expdlist
5232 texlive-latex-fancyhdr
5233 texlive-latex-fancyvrb
5234 texlive-latex-fncychap
5235 texlive-latex-float
5236 texlive-latex-framed
5237 texlive-latex-geometry
5238 texlive-latex-graphics
5239 texlive-latex-hyperref
5240 texlive-latex-mdwtools
5241 texlive-latex-multirow
5242 texlive-latex-needspace
5243 texlive-latex-oberdiek
5244 texlive-latex-parskip
5245 texlive-latex-preview
5246 texlive-latex-tabulary
5247 texlive-latex-threeparttable
5248 texlive-latex-titlesec
5249 texlive-latex-trimspaces
5250 texlive-latex-ucs
5251 texlive-latex-upquote
5252 texlive-latex-url
5253 texlive-latex-varwidth
5254 texlive-latex-wrapfig)))
5255 ("texinfo" ,texinfo)
5256 ("perl" ,perl)
5257 ("scipy-sphinx-theme"
5258 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5259 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5260 (method git-fetch)
5261 (uri (git-reference
5262 (url "https://github.com/scipy/scipy-sphinx-theme")
5263 (commit commit)))
5264 (file-name (git-file-name "python-scipy-sphinx-theme"
5265 (string-take commit 7)))
5266 (sha256
5267 (base32
5268 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5269 ,@(package-native-inputs python-numpy)))
5270 (arguments
5271 `(#:tests? #f ; we're only generating the documentation
5272 #:phases
5273 (modify-phases %standard-phases
5274 (delete 'build)
5275 (replace 'install
5276 (lambda* (#:key inputs outputs #:allow-other-keys)
5277 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5278 (doc (string-append
5279 data "/doc/" ,name "-"
5280 ,(package-version python-numpy)))
5281 (info-reader (string-append data "/info"))
5282 (html (string-append doc "/html"))
5283 (scipy-sphinx-theme "scipy-sphinx-theme")
5284 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5285 (pyver ,(string-append "PYVER=")))
5286
5287 ;; FIXME: this is needed to for texlive-union to generate
5288 ;; fonts, which are not found.
5289 (setenv "HOME" "/tmp")
5290
5291 (with-directory-excursion "doc"
5292 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5293 (mkdir-p html)
5294 (invoke "make" "html" pyver)
5295 (invoke "make" "latex" "PAPER=a4" pyver)
5296 (invoke "make" "-C" "build/latex"
5297 "all-pdf" "PAPER=a4" pyver)
5298 ;; FIXME: Generation of the info file fails.
5299 ;; (invoke "make" "info" pyver)
5300 ;; (mkdir-p info)
5301 ;; (copy-file "build/texinfo/numpy.info"
5302 ;; (string-append info "/numpy.info"))
5303 (for-each (lambda (file)
5304 (copy-file (string-append "build/latex" file)
5305 (string-append doc file)))
5306 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5307 (with-directory-excursion "build/html"
5308 (for-each (lambda (file)
5309 (let* ((dir (dirname file))
5310 (tgt-dir (string-append html "/" dir)))
5311 (unless (equal? "." dir)
5312 (mkdir-p tgt-dir))
5313 (install-file file html)))
5314 (find-files "." ".*")))))
5315 #t)))))
5316 (home-page (package-home-page python-numpy))
5317 (synopsis "Documentation for the python-numpy package")
5318 (description (package-description python-numpy))
5319 (license (package-license python-numpy))))
5320
5321 (define-public python-pygit2
5322 (package
5323 (name "python-pygit2")
5324 (version "1.6.0")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (pypi-uri "pygit2" version))
5329 (sha256
5330 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5331 (build-system python-build-system)
5332 (arguments
5333 '(#:tests? #f)) ; tests don't run correctly in our environment
5334 (propagated-inputs
5335 `(("python-cached-property" ,python-cached-property)
5336 ("python-cffi" ,python-cffi)
5337 ("libgit2" ,libgit2)))
5338 (native-inputs
5339 `(("python-pytest" ,python-pytest)))
5340 (home-page "https://github.com/libgit2/pygit2")
5341 (synopsis "Python bindings for libgit2")
5342 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5343 library, libgit2 implements Git plumbing.")
5344 ;; GPL2.0 only, with linking exception.
5345 (license license:gpl2)))
5346
5347 (define-public python-patiencediff
5348 (package
5349 (name "python-patiencediff")
5350 (version "0.2.0")
5351 (source
5352 (origin
5353 (method url-fetch)
5354 (uri (pypi-uri "patiencediff" version))
5355 (sha256
5356 (base32
5357 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5358 (build-system python-build-system)
5359 (home-page "https://www.breezy-vcs.org/")
5360 (synopsis "Python implementation of the patiencediff algorithm")
5361 (description
5362 "This package contains a Python implementation of the @code{patiencediff}
5363 algorithm. Patiencediff provides a good balance of performance, nice output for
5364 humans, and implementation simplicity.")
5365 (license license:gpl2)))
5366
5367 (define-public python-pdftotext
5368 (package
5369 (name "python-pdftotext")
5370 (version "2.1.6")
5371 (source
5372 (origin
5373 (method url-fetch)
5374 (uri (pypi-uri "pdftotext" version))
5375 (sha256
5376 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5377 (build-system python-build-system)
5378 (inputs
5379 `(("poppler" ,poppler)))
5380 (home-page "https://github.com/jalan/pdftotext")
5381 (synopsis "Simple PDF text extraction")
5382 (description "Pdftotext is a Python library of PDF text extraction.")
5383 (license license:expat)))
5384
5385 (define-public python-pyparsing
5386 (package
5387 (name "python-pyparsing")
5388 (version "2.4.6")
5389 (source
5390 (origin
5391 (method url-fetch)
5392 (uri (pypi-uri "pyparsing" version))
5393 (sha256
5394 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5395 (build-system python-build-system)
5396 (outputs '("out" "doc"))
5397 (arguments
5398 `(#:tests? #f ; no test target
5399 #:phases
5400 (modify-phases %standard-phases
5401 (add-after 'install 'install-doc
5402 (lambda* (#:key outputs #:allow-other-keys)
5403 (let* ((doc (string-append (assoc-ref outputs "doc")
5404 "/share/doc/" ,name "-" ,version))
5405 (html-doc (string-append doc "/html"))
5406 (examples (string-append doc "/examples")))
5407 (mkdir-p html-doc)
5408 (mkdir-p examples)
5409 (for-each
5410 (lambda (dir tgt)
5411 (map (lambda (file)
5412 (install-file file tgt))
5413 (find-files dir ".*")))
5414 (list "docs" "htmldoc" "examples")
5415 (list doc html-doc examples))
5416 #t))))))
5417 (home-page "https://github.com/pyparsing/pyparsing")
5418 (synopsis "Python parsing class library")
5419 (description
5420 "The pyparsing module is an alternative approach to creating and
5421 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5422 of regular expressions. The pyparsing module provides a library of classes
5423 that client code uses to construct the grammar directly in Python code.")
5424 (license license:expat)))
5425
5426 (define-public python2-pyparsing
5427 (package-with-python2 python-pyparsing))
5428
5429 (define-public python-pyparsing-2.4.7
5430 (package
5431 (inherit python-pyparsing)
5432 (version "2.4.7")
5433 (source
5434 (origin
5435 (method url-fetch)
5436 (uri (pypi-uri "pyparsing" version))
5437 (sha256
5438 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5439
5440 (define-public python-numpydoc
5441 (package
5442 (name "python-numpydoc")
5443 (version "0.8.0")
5444 (source
5445 (origin
5446 (method url-fetch)
5447 (uri (pypi-uri "numpydoc" version))
5448 (sha256
5449 (base32
5450 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5451 (build-system python-build-system)
5452 (propagated-inputs
5453 `(("python-sphinx" ,python-sphinx)))
5454 (native-inputs
5455 `(("python-nose" ,python-nose)))
5456 (home-page "https://pypi.org/project/numpydoc/")
5457 (synopsis
5458 "Numpy's Sphinx extensions")
5459 (description
5460 "Sphinx extension to support docstrings in Numpy format.")
5461 (license license:bsd-2)
5462 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5463
5464 (define-public python2-numpydoc
5465 (let ((base (package-with-python2
5466 (strip-python2-variant python-numpydoc))))
5467 (package/inherit base
5468 (propagated-inputs
5469 `(("python2-jinja2" ,python2-jinja2)
5470 ,@(package-propagated-inputs base))))))
5471
5472 (define-public python-numexpr
5473 (package
5474 (name "python-numexpr")
5475 (version "2.6.5")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "numexpr" version))
5480 (sha256
5481 (base32
5482 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5483 (build-system python-build-system)
5484 (arguments `(#:tests? #f)) ; no tests included
5485 (propagated-inputs
5486 `(("python-numpy" ,python-numpy)))
5487 (home-page "https://github.com/pydata/numexpr")
5488 (synopsis "Fast numerical expression evaluator for NumPy")
5489 (description
5490 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5491 expressions that operate on arrays are accelerated and use less memory than
5492 doing the same calculation in Python. In addition, its multi-threaded
5493 capabilities can make use of all your cores, which may accelerate
5494 computations, most specially if they are not memory-bounded (e.g. those using
5495 transcendental functions).")
5496 (license license:expat)))
5497
5498 (define-public python2-numexpr
5499 (package-with-python2 python-numexpr))
5500
5501 (define-public python-cycler
5502 (package
5503 (name "python-cycler")
5504 (version "0.10.0")
5505 (source (origin
5506 (method url-fetch)
5507 (uri (pypi-uri "cycler" version))
5508 (sha256
5509 (base32
5510 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5511 (build-system python-build-system)
5512 (arguments
5513 ;; XXX: The current version requires 'coveralls' which we don't have.
5514 ;; Enable this for the next release which uses 'python-pytest'.
5515 '(#:tests? #f))
5516 (propagated-inputs
5517 `(("python-six" ,python-six)))
5518 (home-page "https://matplotlib.org/cycler/")
5519 (synopsis "Composable keyword argument iterator")
5520 (description
5521 "When using @code{matplotlib} and plotting more than one line, it is
5522 common to want to be able to want to be able to cycle over one or more artist
5523 styles; but the plotting logic can quickly become involved.
5524 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5525 @code{Cycler} class was developed.")
5526 (license license:bsd-3)))
5527
5528 (define-public python2-cycler
5529 (package-with-python2 python-cycler))
5530
5531 (define-public python-colorspacious
5532 (package
5533 (name "python-colorspacious")
5534 (version "1.1.2")
5535 (source
5536 (origin
5537 (method git-fetch)
5538 (uri (git-reference
5539 (url "https://github.com/njsmith/colorspacious")
5540 (commit (string-append "v" version))))
5541 (file-name (git-file-name name version))
5542 (sha256
5543 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5544 (build-system python-build-system)
5545 (propagated-inputs
5546 `(("python-numpy" ,python-numpy)))
5547 (native-inputs
5548 `(("python-nose" ,python-nose)))
5549 (arguments
5550 `(#:phases
5551 (modify-phases %standard-phases
5552 (replace 'check
5553 (lambda _
5554 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5555 (home-page "https://github.com/njsmith/colorspacious")
5556 (synopsis "Python library for colorspace conversions")
5557 (description "@code{colorspacious} is a Python library that lets you
5558 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5559 (license license:expat)))
5560
5561 (define-public python2-colorspacious
5562 (package-with-python2 python-colorspacious))
5563
5564 (define-public python-matplotlib
5565 (package
5566 (name "python-matplotlib")
5567 (version "3.1.2")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (pypi-uri "matplotlib" version))
5572 (sha256
5573 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5574 (patches
5575 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5576 (build-system python-build-system)
5577 (propagated-inputs ; the following packages are all needed at run time
5578 `(("python-cycler" ,python-cycler)
5579 ("python-kiwisolver" ,python-kiwisolver)
5580 ("python-pyparsing" ,python-pyparsing)
5581 ("python-pygobject" ,python-pygobject)
5582 ("gobject-introspection" ,gobject-introspection)
5583 ("python-tkinter" ,python "tk")
5584 ("python-dateutil" ,python-dateutil)
5585 ("python-numpy" ,python-numpy)
5586 ("python-pillow" ,python-pillow)
5587 ("python-pytz" ,python-pytz)
5588 ("python-six" ,python-six)
5589 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5590 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5591 ;; object. For this reason we need to import both libraries.
5592 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5593 ("python-pycairo" ,python-pycairo)
5594 ("python-cairocffi" ,python-cairocffi)))
5595 (inputs
5596 `(("libpng" ,libpng)
5597 ("freetype" ,freetype)
5598 ("cairo" ,cairo)
5599 ("glib" ,glib)
5600 ;; FIXME: Add backends when available.
5601 ;("python-wxpython" ,python-wxpython)
5602 ("tcl" ,tcl)
5603 ("tk" ,tk)))
5604 (native-inputs
5605 `(("pkg-config" ,pkg-config)
5606 ("python-pytest" ,python-pytest)
5607 ("python-mock" ,python-mock)
5608 ("unzip" ,unzip)
5609 ("jquery-ui"
5610 ,(origin
5611 (method url-fetch)
5612 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5613 (sha256
5614 (base32
5615 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5616 (arguments
5617 `(#:phases
5618 (modify-phases %standard-phases
5619 ;; XXX We disable all image comparison tests because we're using a
5620 ;; newer version of FreeType than matplotlib expects. This leads to
5621 ;; minor differences throughout the tests.
5622 (add-after 'unpack 'fix-and-disable-failing-tests
5623 (lambda _
5624 (substitute* (append (find-files "lib/matplotlib/tests/"
5625 "test_.*\\.py$")
5626 (find-files "lib/mpl_toolkits/tests"
5627 "test_.*\\.py$"))
5628 (("^from matplotlib" match)
5629 (string-append "import pytest\n" match))
5630 (("( *)@image_comparison" match indent)
5631 (string-append indent
5632 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5633 match)))
5634 (substitute* "lib/matplotlib/tests/test_animation.py"
5635 (("/bin/sh") (which "sh")))
5636 (for-each delete-file
5637 ;; test_normal_axes, test_get_tightbbox_polar
5638 '("lib/matplotlib/tests/test_axes.py"
5639 ;; We don't use the webagg backend and this test forces it.
5640 "lib/matplotlib/tests/test_backend_webagg.py"
5641 ;; test_outward_ticks
5642 "lib/matplotlib/tests/test_tightlayout.py"
5643 ;; test_hidden_axes fails with minor extent
5644 ;; differences, possibly due to the use of a
5645 ;; different version of FreeType.
5646 "lib/matplotlib/tests/test_constrainedlayout.py"
5647 ;; Fontconfig returns no fonts.
5648 "lib/matplotlib/tests/test_font_manager.py"))
5649 #t))
5650 (add-before 'install 'install-jquery-ui
5651 (lambda* (#:key outputs inputs #:allow-other-keys)
5652 (let* ((python-version (python-version
5653 (assoc-ref inputs "python")))
5654 (dir (string-append (assoc-ref outputs "out")
5655 "/lib/python" python-version "/site-packages"
5656 "/matplotlib/backends/web_backend/")))
5657 (mkdir-p dir)
5658 (invoke "unzip"
5659 (assoc-ref inputs "jquery-ui")
5660 "-d" dir))
5661 #t))
5662 (replace 'check
5663 (lambda* (#:key outputs inputs #:allow-other-keys)
5664 (add-installed-pythonpath inputs outputs)
5665 (invoke "python" "tests.py" "-v"
5666 "-m" "not network and not webagg")))
5667 (add-before 'build 'configure-environment
5668 (lambda* (#:key outputs inputs #:allow-other-keys)
5669 (let ((cairo (assoc-ref inputs "cairo")))
5670 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5671 ;; has not effect.
5672 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5673 (setenv "HOME" (getcwd))
5674 ;; Fix rounding errors when using the x87 FPU.
5675 (when (string-prefix? "i686" ,(%current-system))
5676 (setenv "CFLAGS" "-ffloat-store"))
5677 (call-with-output-file "setup.cfg"
5678 (lambda (port)
5679 (format port "[directories]~%
5680 basedirlist = ~a,~a~%
5681 [packages]~%
5682 tests = True~%"
5683 (assoc-ref inputs "tcl")
5684 (assoc-ref inputs "tk")))))
5685 #t)))))
5686 (home-page "https://matplotlib.org/")
5687 (synopsis "2D plotting library for Python")
5688 (description
5689 "Matplotlib is a Python 2D plotting library which produces publication
5690 quality figures in a variety of hardcopy formats and interactive environments
5691 across platforms. Matplotlib can be used in Python scripts, the python and
5692 ipython shell, web application servers, and six graphical user interface
5693 toolkits.")
5694 (license license:psfl)
5695 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5696
5697 (define-public python2-matplotlib
5698 (let ((matplotlib (package-with-python2
5699 (strip-python2-variant python-matplotlib))))
5700 (package (inherit matplotlib)
5701 (version "2.2.4")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "matplotlib" version))
5706 (sha256
5707 (base32
5708 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5709 (arguments
5710 (substitute-keyword-arguments (package-arguments matplotlib)
5711 ((#:phases phases)
5712 `(modify-phases ,phases
5713 (replace 'install-jquery-ui
5714 (lambda* (#:key outputs inputs #:allow-other-keys)
5715 (let ((dir (string-append (assoc-ref outputs "out")
5716 "/lib/python2.7/site-packages/"
5717 "matplotlib/backends/web_backend/")))
5718 (mkdir-p dir)
5719 (invoke "unzip"
5720 (assoc-ref inputs "jquery-ui")
5721 "-d" dir))
5722 #t))
5723 (delete 'fix-and-disable-failing-tests)
5724 (delete 'check))))) ; These tests weren't run the the past.
5725 ;; Make sure to use special packages for Python 2 instead
5726 ;; of those automatically rewritten by package-with-python2.
5727 (propagated-inputs
5728 `(("python2-pycairo" ,python2-pycairo)
5729 ("python2-backports-functools-lru-cache"
5730 ,python2-backports-functools-lru-cache)
5731 ("python2-functools32" ,python2-functools32)
5732 ("python2-pygobject-2" ,python2-pygobject-2)
5733 ("python2-subprocess32" ,python2-subprocess32)
5734 ("python2-tkinter" ,python-2 "tk")
5735 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5736 '("python-cairocffi"
5737 "python-pycairo"
5738 "python-pygobject"
5739 "python-tkinter")))))))
5740
5741 (define-public python-matplotlib-documentation
5742 (package
5743 (name "python-matplotlib-documentation")
5744 (version (package-version python-matplotlib))
5745 (source (package-source python-matplotlib))
5746 (build-system python-build-system)
5747 (native-inputs
5748 `(("python-matplotlib" ,python-matplotlib)
5749 ("python-colorspacious" ,python-colorspacious)
5750 ("python-sphinx" ,python-sphinx)
5751 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5752 ("python-sphinx-gallery" ,python-sphinx-gallery)
5753 ("python-numpydoc" ,python-numpydoc)
5754 ("python-ipython" ,python-ipython)
5755 ("python-ipykernel" ,python-ipykernel)
5756 ("python-mock" ,python-mock)
5757 ("graphviz" ,graphviz)
5758 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
5759 texlive-latex-amsmath
5760 texlive-latex-enumitem
5761 texlive-latex-expdlist
5762 texlive-latex-geometry
5763 texlive-latex-preview
5764 texlive-latex-type1cm
5765 texlive-latex-ucs
5766
5767 texlive-generic-pdftex
5768
5769 texlive-fonts-ec
5770 texlive-fonts-adobe-times
5771 texlive-fonts-txfonts)))
5772 ("texinfo" ,texinfo)
5773 ,@(package-native-inputs python-matplotlib)))
5774 (arguments
5775 `(#:tests? #f ; we're only generating documentation
5776 #:phases
5777 (modify-phases %standard-phases
5778 ;; The tests in python-matplotlib are run after the install phase, so
5779 ;; we need to delete the extra phase here.
5780 (delete 'check)
5781 (replace 'build
5782 (lambda _
5783 (chdir "doc")
5784 (setenv "PYTHONPATH"
5785 (string-append (getenv "PYTHONPATH")
5786 ":" (getcwd) "/../examples/units"))
5787 (substitute* "conf.py"
5788 ;; Don't use git.
5789 (("^SHA = check_output.*")
5790 (string-append "SHA = \"" ,version "\"\n"))
5791 ;; Don't fetch intersphinx files from the Internet
5792 (("^explicit_order_folders" m)
5793 (string-append "intersphinx_mapping = {}\n" m))
5794 (("'sphinx.ext.intersphinx',") "")
5795 ;; Disable URL embedding which requires internet access.
5796 (("'https://docs.scipy.org/doc/numpy'") "None")
5797 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5798 (invoke "make"
5799 "SPHINXBUILD=sphinx-build"
5800 "SPHINXOPTS=" ; don't abort on warnings
5801 "html" "texinfo")))
5802 (replace 'install
5803 (lambda* (#:key inputs outputs #:allow-other-keys)
5804 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5805 (doc (string-append data "/doc/python-matplotlib-" ,version))
5806 (info (string-append data "/info"))
5807 (html (string-append doc "/html")))
5808 (mkdir-p html)
5809 (mkdir-p info)
5810 (copy-recursively "build/html" html)
5811 (symlink (string-append html "/_images")
5812 (string-append info "/matplotlib-figures"))
5813 (with-directory-excursion "build/texinfo"
5814 (substitute* "matplotlib.texi"
5815 (("@image\\{([^,]*)" all file)
5816 (string-append "@image{matplotlib-figures/" file)))
5817 (symlink (string-append html "/_images")
5818 "./matplotlib-figures")
5819 (invoke "makeinfo" "--no-split"
5820 "-o" "matplotlib.info" "matplotlib.texi"))
5821 (install-file "build/texinfo/matplotlib.info" info))
5822 #t)))))
5823 (home-page (package-home-page python-matplotlib))
5824 (synopsis "Documentation for the python-matplotlib package")
5825 (description (package-description python-matplotlib))
5826 (license (package-license python-matplotlib))))
5827
5828 (define-public python-matplotlib-venn
5829 (package
5830 (name "python-matplotlib-venn")
5831 (version "0.11.5")
5832 (source
5833 (origin
5834 (method url-fetch)
5835 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5836 (sha256
5837 (base32
5838 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5839 (build-system python-build-system)
5840 (arguments '(#:tests? #f)) ; tests are not included
5841 (propagated-inputs
5842 `(("python-matplotlib" ,python-matplotlib)
5843 ("python-numpy" ,python-numpy)
5844 ("python-scipy" ,python-scipy)))
5845 (native-inputs
5846 `(("unzip" ,unzip)))
5847 (home-page "https://github.com/konstantint/matplotlib-venn")
5848 (synopsis "Plot area-proportional Venn diagrams")
5849 (description
5850 "This package provides tools for plotting area-proportional two- and
5851 three-way Venn diagrams in @code{matplotlib}.")
5852 (license license:expat)))
5853
5854 (define-public python-pysnptools
5855 (package
5856 (name "python-pysnptools")
5857 (version "0.4.11")
5858 (source
5859 (origin
5860 (method url-fetch)
5861 (uri (pypi-uri "pysnptools" version))
5862 (sha256
5863 (base32
5864 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5865 (build-system python-build-system)
5866 (arguments
5867 `(#:tests? #f ; no test data are included
5868 #:phases
5869 (modify-phases %standard-phases
5870 (replace 'check
5871 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5872 (if tests?
5873 (begin
5874 (add-installed-pythonpath inputs outputs)
5875 (invoke "python3" "pysnptools/test.py"))
5876 #t))))))
5877 (propagated-inputs
5878 `(("python-dill" ,python-dill)
5879 ("python-h5py" ,python-h5py)
5880 ("python-numpy" ,python-numpy)
5881 ("python-pandas" ,python-pandas)
5882 ("python-psutil" ,python-psutil)
5883 ("python-scipy" ,python-scipy)))
5884 (native-inputs
5885 `(("python-cython" ,python-cython)))
5886 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5887 (synopsis "Library for reading and manipulating genetic data")
5888 (description
5889 "PySnpTools is a library for reading and manipulating genetic data. It
5890 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5891 those files. It can also efficiently manipulate ranges of integers using set
5892 operators such as union, intersection, and difference.")
5893 (license license:asl2.0)))
5894
5895 (define-public python2-pysnptools
5896 (package-with-python2 python-pysnptools))
5897
5898 (define-public python-wurlitzer
5899 (package
5900 (name "python-wurlitzer")
5901 (version "2.0.1")
5902 (source
5903 (origin
5904 (method url-fetch)
5905 (uri (pypi-uri "wurlitzer" version))
5906 (sha256
5907 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5908 (build-system python-build-system)
5909 (arguments
5910 '(#:phases
5911 (modify-phases %standard-phases
5912 (replace 'check
5913 (lambda _
5914 (invoke "pytest" "-vv" "test.py"))))))
5915 (native-inputs
5916 `(("python-mock" ,python-mock)
5917 ("python-pytest" ,python-pytest)))
5918 (home-page "https://github.com/minrk/wurlitzer")
5919 (synopsis "Capture C-level output in context managers")
5920 (description
5921 "This library helps to redirect @code{sys.stdout} to a stream or a file
5922 while executing some piece of code, including C code running within a Python
5923 process.")
5924 (license license:expat)))
5925
5926 (define-public python-socksipy-branch
5927 (package
5928 (name "python-socksipy-branch")
5929 (version "1.01")
5930 (source
5931 (origin
5932 (method url-fetch)
5933 (uri (pypi-uri "SocksiPy-branch" version))
5934 (sha256
5935 (base32
5936 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5937 (build-system python-build-system)
5938 (arguments
5939 `(#:tests? #f)) ; There are no tests
5940 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5941 (synopsis "Python SOCKS module")
5942 (description
5943 "SocksiPy - A Python SOCKS client module. It provides a
5944 socket-like interface that supports connections to any TCP
5945 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5946 The original version was developed by Dan Haim, this is a
5947 branch created by Mario Vilas to address some open issues,
5948 as the original project seems to have been abandoned circa 2007.")
5949 (license license:bsd-3)))
5950
5951 (define-public python2-socksipy-branch
5952 (package-with-python2 python-socksipy-branch))
5953
5954 (define-public python-socksipychain
5955 (package
5956 (name "python-socksipychain")
5957 (version "2.1.2")
5958 (source
5959 (origin
5960 (method git-fetch)
5961 (uri (git-reference
5962 (url "https://github.com/pagekite/PySocksipyChain")
5963 (commit (string-append "v" version))))
5964 (file-name (git-file-name name version))
5965 (sha256
5966 (base32
5967 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5968 (build-system python-build-system)
5969 (arguments
5970 `(#:tests? #f)) ; Tests try to access the network.
5971 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5972 (synopsis "Python SOCKS module with chained proxies support")
5973 (description
5974 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5975 adds support for arbitrary chaining of proxy servers and various modes of
5976 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5977 a simple netcat replacement with chaining support.")
5978 (license license:bsd-3)))
5979
5980 (define-public python-pycodestyle
5981 (package
5982 (name "python-pycodestyle")
5983 (version "2.7.0")
5984 (source
5985 (origin
5986 (method url-fetch)
5987 (uri (pypi-uri "pycodestyle" version))
5988 (sha256
5989 (base32
5990 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
5991 (build-system python-build-system)
5992 (arguments
5993 `(#:phases
5994 (modify-phases %standard-phases
5995 (replace 'check
5996 (lambda _
5997 (invoke "pytest" "-vv"))))))
5998 (native-inputs
5999 `(("python-pytest" ,python-pytest)))
6000 (home-page "https://pycodestyle.readthedocs.io/")
6001 (synopsis "Python style guide checker")
6002 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6003 Python code against some of the style conventions in
6004 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6005 (license license:expat)))
6006
6007 (define-public python2-pycodestyle
6008 (package-with-python2 python-pycodestyle))
6009
6010 (define-public python-pycodestyle-2.6
6011 (package
6012 (inherit python-pycodestyle)
6013 (version "2.6.0")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (pypi-uri "pycodestyle" version))
6017 (sha256
6018 (base32
6019 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6020
6021 (define-public python-multidict
6022 (package
6023 (name "python-multidict")
6024 (version "4.7.5")
6025 (source
6026 (origin
6027 (method url-fetch)
6028 (uri (pypi-uri "multidict" version))
6029 (sha256
6030 (base32
6031 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6032 (build-system python-build-system)
6033 (arguments
6034 '(#:modules ((ice-9 ftw)
6035 (srfi srfi-1)
6036 (srfi srfi-26)
6037 (guix build utils)
6038 (guix build python-build-system))
6039 #:phases (modify-phases %standard-phases
6040 (replace 'check
6041 (lambda* (#:key tests? #:allow-other-keys)
6042 (if tests?
6043 (begin
6044 (let ((libdir (find (cut string-prefix? "lib." <>)
6045 (scandir "build"))))
6046 (setenv "PYTHONPATH"
6047 (string-append "./build/" libdir ":"
6048 (getenv "PYTHONPATH")))
6049 (invoke "pytest" "-vv")))
6050 (format #t "test suite not run~%"))
6051 #t)))))
6052 (native-inputs
6053 `(("python-pytest" ,python-pytest)
6054 ("python-pytest-cov" ,python-pytest-cov)))
6055 (home-page "https://github.com/aio-libs/multidict/")
6056 (synopsis "Multidict implementation")
6057 (description "Multidict is dict-like collection of key-value pairs
6058 where key might be occurred more than once in the container.")
6059 (license license:asl2.0)))
6060
6061 (define-public python-orderedmultidict
6062 (package
6063 (name "python-orderedmultidict")
6064 (version "1.0")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "orderedmultidict" version))
6069 (sha256
6070 (base32
6071 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6072 (build-system python-build-system)
6073 (arguments
6074 `(#:phases
6075 (modify-phases %standard-phases
6076 (add-after 'unpack 'fix-tests
6077 (lambda _
6078 ;; The package uses nosetest for running the tests.
6079 ;; Adding this initfile allows to run the test suite
6080 ;; without requiring nosetest.
6081 (with-output-to-file "tests/__init__.py" newline)
6082 #t)))))
6083 (propagated-inputs
6084 `(("python-six" ,python-six)))
6085 (native-inputs
6086 `(("python-pycodestyle" ,python-pycodestyle)))
6087 (home-page "https://github.com/gruns/orderedmultidict")
6088 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6089 (description "This package contains a library for ordered multivalue
6090 dictionaries. A multivalue dictionary is a dictionary that can store
6091 multiple values for the same key. An ordered multivalue dictionary is a
6092 multivalue dictionary that retains the order of insertions and deletions.")
6093 (license license:unlicense)))
6094
6095 (define-public python2-orderedmultidict
6096 (package-with-python2 python-orderedmultidict))
6097
6098 (define-public python-autopep8
6099 (package
6100 (name "python-autopep8")
6101 (version "1.5.3")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "autopep8" version))
6106 (sha256
6107 (base32
6108 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6109 (build-system python-build-system)
6110 (propagated-inputs
6111 `(("python-pycodestyle" ,python-pycodestyle)
6112 ("python-toml" ,python-toml)))
6113 (home-page "https://github.com/hhatto/autopep8")
6114 (synopsis "Format Python code according to the PEP 8 style guide")
6115 (description
6116 "@code{autopep8} automatically formats Python code to conform to
6117 the PEP 8 style guide. It uses the pycodestyle utility to determine
6118 what parts of the code needs to be formatted. @code{autopep8} is
6119 capable of fixing most of the formatting issues that can be reported
6120 by pycodestyle.")
6121 (license (license:non-copyleft
6122 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6123
6124 (define-public python2-autopep8
6125 (package-with-python2 python-autopep8))
6126
6127 (define-public python-distlib
6128 (package
6129 (name "python-distlib")
6130 (version "0.3.0")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (pypi-uri "distlib" version ".zip"))
6135 (sha256
6136 (base32
6137 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
6138 (build-system python-build-system)
6139 (arguments
6140 `(#:phases
6141 (modify-phases %standard-phases
6142 (add-before 'build 'no-/bin/sh
6143 (lambda _
6144 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6145 (("/bin/sh") (which "sh")))
6146 #t))
6147 (add-before 'check 'prepare-test-env
6148 (lambda _
6149 (setenv "HOME" "/tmp")
6150 ;; NOTE: Any value works, the variable just has to be present.
6151 (setenv "SKIP_ONLINE" "1")
6152 #t)))))
6153 (native-inputs `(("unzip" ,unzip)))
6154 (home-page "https://bitbucket.org/pypa/distlib")
6155 (synopsis "Distribution utilities")
6156 (description "Distlib is a library which implements low-level functions that
6157 relate to packaging and distribution of Python software. It is intended to be
6158 used as the basis for third-party packaging tools.")
6159 (license license:psfl)))
6160
6161 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
6162 (define-public python-distlib/next
6163 (package
6164 (inherit python-distlib)
6165 (version "0.3.1")
6166 (source
6167 (origin
6168 (method url-fetch)
6169 (uri (pypi-uri "distlib" version ".zip"))
6170 (sha256
6171 (base32
6172 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
6173
6174 (define-public python-distutils-extra
6175 (package
6176 (name "python-distutils-extra")
6177 (version "2.38")
6178 (source
6179 (origin
6180 (method url-fetch)
6181 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6182 version "/+download/python-distutils-extra-"
6183 version ".tar.gz"))
6184 (sha256
6185 (base32
6186 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6187 (build-system python-build-system)
6188 (home-page "https://launchpad.net/python-distutils-extra/")
6189 (synopsis "Enhancements to Python's distutils")
6190 (description
6191 "The python-distutils-extra module enables you to easily integrate
6192 gettext support, themed icons, and scrollkeeper-based documentation into
6193 Python's distutils.")
6194 (license license:gpl2)))
6195
6196 (define-public python2-distutils-extra
6197 (package-with-python2 python-distutils-extra))
6198
6199 (define-public python2-elib.intl
6200 (package
6201 (name "python2-elib.intl")
6202 (version "0.0.3")
6203 (source
6204 (origin
6205 ;; This project doesn't tag releases or publish tarballs, so we take
6206 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6207 (method git-fetch)
6208 (uri (git-reference
6209 (url "https://github.com/dieterv/elib.intl")
6210 (commit "d09997cfef")))
6211 (file-name (string-append name "-" version "-checkout"))
6212 (sha256
6213 (base32
6214 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6215 (build-system python-build-system)
6216 (arguments
6217 ;; incompatible with Python 3 (exception syntax)
6218 `(#:python ,python-2
6219 #:tests? #f))
6220 (home-page "https://github.com/dieterv/elib.intl")
6221 (synopsis "Enhanced internationalization for Python")
6222 (description
6223 "The elib.intl module provides enhanced internationalization (I18N)
6224 services for your Python modules and applications.")
6225 (license license:lgpl3+)))
6226
6227 (define-public python-olefile
6228 (package
6229 (name "python-olefile")
6230 (version "0.46")
6231 (source
6232 (origin
6233 (method url-fetch)
6234 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6235 "download/v" version "/olefile-" version ".tar.gz"))
6236 (file-name (string-append name "-" version ".tar.gz"))
6237 (sha256
6238 (base32
6239 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6240 (build-system python-build-system)
6241 (home-page "https://www.decalage.info/python/olefileio")
6242 (synopsis "Read and write Microsoft OLE2 files.")
6243 (description
6244 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6245 Storage or Compound Document, Microsoft Office). It is an improved version of
6246 the OleFileIO module from PIL, the Python Image Library.")
6247 (license license:bsd-3)))
6248
6249 (define-public python2-olefile
6250 (package-with-python2 python-olefile))
6251
6252 (define-public python-pikepdf
6253 (package
6254 (name "python-pikepdf")
6255 (version "2.13.0")
6256 (source
6257 (origin
6258 (method url-fetch)
6259 (uri (pypi-uri "pikepdf" version))
6260 (sha256
6261 (base32 "1di5bbh2mr8m1aydky8ix12pkybrd0cvs8xqf5s2y1xa349r514l"))))
6262 (build-system python-build-system)
6263 (arguments
6264 `(#:tests? #false)) ;require python-xmp-toolkit
6265 (native-inputs
6266 `(("pybind11" ,pybind11)
6267 ("python-setuptools" ,python-setuptools)
6268 ("python-setuptools-scm" ,python-setuptools-scm/next)
6269 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6270 ("python-toml" ,python-toml)
6271 ("python-wheel" ,python-wheel)))
6272 (inputs
6273 `(("qpdf" ,qpdf)))
6274 (propagated-inputs
6275 `(("python-lxml" ,python-lxml)
6276 ("python-pillow" ,python-pillow)))
6277 (home-page "https://github.com/pikepdf/pikepdf")
6278 (synopsis "Read and write PDFs with Python")
6279 (description
6280 "pikepdf is a Python library for reading and writing PDF files.")
6281 (license license:mpl2.0)))
6282
6283 (define-public python-pillow
6284 (package
6285 (name "python-pillow")
6286 (version "8.1.1")
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "Pillow" version))
6291 (sha256
6292 (base32
6293 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6294 (build-system python-build-system)
6295 (native-inputs
6296 `(("python-pytest" ,python-pytest)))
6297 (inputs
6298 `(("freetype" ,freetype)
6299 ("lcms" ,lcms)
6300 ("libjpeg" ,libjpeg-turbo)
6301 ("libtiff" ,libtiff)
6302 ("libwebp" ,libwebp)
6303 ("openjpeg" ,openjpeg)
6304 ("zlib" ,zlib)))
6305 (propagated-inputs
6306 `(("python-olefile" ,python-olefile)))
6307 (arguments
6308 `(#:phases
6309 (modify-phases %standard-phases
6310 (add-after 'unpack 'patch-ldconfig
6311 (lambda _
6312 (substitute* "setup.py"
6313 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6314 (replace 'check
6315 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6316 (if tests?
6317 (begin
6318 (setenv "HOME" (getcwd))
6319 ;; Make installed package available for running the tests.
6320 (add-installed-pythonpath inputs outputs)
6321 (invoke "python" "selftest.py" "--installed")
6322 (invoke "python" "-m" "pytest" "-vv"))
6323 #t))))))
6324 (home-page "https://python-pillow.org")
6325 (synopsis "Fork of the Python Imaging Library")
6326 (description
6327 "The Python Imaging Library adds image processing capabilities to your
6328 Python interpreter. This library provides extensive file format support, an
6329 efficient internal representation, and fairly powerful image processing
6330 capabilities. The core image library is designed for fast access to data
6331 stored in a few basic pixel formats. It should provide a solid foundation for
6332 a general image processing tool.")
6333 (properties `((python2-variant . ,(delay python2-pillow))))
6334 (license (license:x11-style
6335 "http://www.pythonware.com/products/pil/license.htm"
6336 "The PIL Software License"))))
6337
6338 (define-public python2-pillow
6339 (package-with-python2
6340 (package
6341 (inherit (strip-python2-variant python-pillow))
6342 ;; Version 6 is the last series with Python 2 support.
6343 (version "6.2.2")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (pypi-uri "Pillow" version))
6348 (sha256
6349 (base32
6350 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6351
6352 (define-public python-pillow-2.9
6353 (package
6354 (inherit python-pillow)
6355 (version "2.9.0")
6356 (source
6357 (origin
6358 (method url-fetch)
6359 (uri (pypi-uri "Pillow" version))
6360 (sha256
6361 (base32
6362 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6363 (arguments
6364 (substitute-keyword-arguments (package-arguments python-pillow)
6365 ((#:tests? _ #f) #f)))
6366 (properties '((hidden? #t)))))
6367
6368 (define-public python-pillow-simd
6369 (package
6370 (inherit python-pillow)
6371 (name "python-pillow-simd")
6372 (version "7.1.2")
6373 ;; The PyPI tarball does not include test files.
6374 (source
6375 (origin
6376 (method git-fetch)
6377 (uri (git-reference
6378 (url "https://github.com/uploadcare/pillow-simd")
6379 (commit version)))
6380 (file-name (git-file-name name version))
6381 (sha256
6382 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6383 (arguments
6384 (substitute-keyword-arguments
6385 (package-arguments python-pillow)
6386 ((#:phases phases)
6387 `(modify-phases ,phases
6388 (add-after 'unpack 'make-tests-writable
6389 (lambda _
6390 (for-each make-file-writable (find-files "Tests"))
6391 #t))))))
6392 (inputs
6393 `(("libraqm" ,libraqm)
6394 ("libimagequant" ,libimagequant)
6395 ,@(package-inputs python-pillow)))
6396 (home-page "https://github.com/uploadcare/pillow-simd")
6397 (synopsis "Fork of the Python Imaging Library (Pillow)")
6398 (description "This package is a fork of Pillow which adds support for SIMD
6399 parallelism.")))
6400
6401 (define-public python-imagecodecs
6402 (package
6403 (name "python-imagecodecs")
6404 (version "2021.3.31")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "imagecodecs" version))
6409 (sha256
6410 (base32
6411 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6412 (modules '((guix build utils)))
6413 (snippet
6414 '(begin
6415 ;; Unbundle 3rd party modules.
6416 (delete-file-recursively "3rdparty")
6417 ;; Delete pre-generated Cython files.
6418 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6419 #t))))
6420 (build-system python-build-system)
6421 (arguments
6422 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6423 #:phases
6424 (modify-phases %standard-phases
6425 (add-after 'unpack 'create-configuration
6426 (lambda* (#:key inputs #:allow-other-keys)
6427 ;; By default everything is enabled. We can selectively disable
6428 ;; extensions (and thus dependencies) by deleting them from the
6429 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6430 (call-with-output-file "imagecodecs_distributor_setup.py"
6431 (lambda (port)
6432 (format port "\
6433 def customize_build(EXTENSIONS, OPTIONS):
6434 del EXTENSIONS['aec']
6435 del EXTENSIONS['avif']
6436 del EXTENSIONS['bitshuffle']
6437 del EXTENSIONS['deflate']
6438 del EXTENSIONS['jpeg2k']
6439 del EXTENSIONS['jpeg12']
6440 del EXTENSIONS['jpegls']
6441 del EXTENSIONS['jpegxl']
6442 del EXTENSIONS['jpegxr']
6443 del EXTENSIONS['lerc']
6444 del EXTENSIONS['ljpeg']
6445 del EXTENSIONS['lzf']
6446 del EXTENSIONS['zfp']
6447 del EXTENSIONS['zopfli']
6448 OPTIONS['cythonize']
6449 ")))
6450 #t)))))
6451 (inputs
6452 `(("c-blosc" ,c-blosc)
6453 ("giflib" ,giflib)
6454 ("google-brotli" ,google-brotli)
6455 ("libjpeg-turbo" ,libjpeg-turbo)
6456 ("libpng" ,libpng)
6457 ("libtiff" ,libtiff)
6458 ("libwebp" ,libwebp)
6459 ("lz4" ,lz4)
6460 ("snappy" ,snappy)
6461 ("xz" ,xz)
6462 ("zlib" ,zlib)
6463 ("zstd" ,zstd "lib")))
6464 (propagated-inputs
6465 `(("python-numpy" ,python-numpy)))
6466 (native-inputs
6467 ;; For building.
6468 `(("python-cython" ,python-cython)
6469 ;; For testing. Incomplete.
6470 ;("python-numcodecs" ,python-numcodecs)
6471 ;("python-zarr" ,python-zarr)
6472 ;("python-pytest" ,python-pytest)
6473 ))
6474 (home-page "https://www.lfd.uci.edu/~gohlke/")
6475 (synopsis
6476 "Image transformation, compression, and decompression codecs")
6477 (description
6478 "Imagecodecs is a Python library that provides block-oriented, in-memory
6479 buffer transformation, compression, and decompression functions for use in the
6480 tifffile, czifile, and other scientific image input/output modules.")
6481 (license license:bsd-3)))
6482
6483 (define-public python-roifile
6484 (package
6485 (name "python-roifile")
6486 (version "2020.11.28")
6487 (source
6488 (origin
6489 (method url-fetch)
6490 (uri (pypi-uri "roifile" version))
6491 (sha256
6492 (base32
6493 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6494 (build-system python-build-system)
6495 (arguments `(#:tests? #f)) ; there are none
6496 (propagated-inputs
6497 `(("python-numpy" ,python-numpy)))
6498 (home-page "https://www.lfd.uci.edu/~gohlke/")
6499 (synopsis "Read and write ImageJ ROI format")
6500 (description "Roifile is a Python library to read, write, create, and plot
6501 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6502 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6503 (license license:bsd-3)))
6504
6505 (define-public python-tifffile
6506 (package
6507 (name "python-tifffile")
6508 (version "2021.4.8")
6509 (source
6510 (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "tifffile" version))
6513 (sha256
6514 (base32
6515 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6516 (build-system python-build-system)
6517 ;; Tests require lfdfiles, which depends on tifffile
6518 (arguments `(#:tests? #f))
6519 (propagated-inputs
6520 `(("python-numpy" ,python-numpy)
6521 ("python-imagecodecs" ,python-imagecodecs)))
6522 (home-page "https://www.lfd.uci.edu/~gohlke/")
6523 (synopsis "Read and write TIFF(r) files")
6524 (description "This package lets you read image and metadata from many
6525 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6526 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6527 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6528 (license license:bsd-3)))
6529
6530 (define-public python-lfdfiles
6531 (package
6532 (name "python-lfdfiles")
6533 (version "2021.2.22")
6534 (source
6535 (origin
6536 (method url-fetch)
6537 (uri (pypi-uri "lfdfiles" version))
6538 (sha256
6539 (base32
6540 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6541 (modules '((guix build utils)))
6542 (snippet
6543 '(begin
6544 ;; Delete pre-generated Cython files.
6545 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6546 #t))))
6547 (build-system python-build-system)
6548 (arguments
6549 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6550 (propagated-inputs
6551 `(("python-click" ,python-click)
6552 ("python-numpy" ,python-numpy)
6553 ("python-tifffile" ,python-tifffile)))
6554 (native-inputs `(("python-cython" ,python-cython)))
6555 (home-page "https://www.lfd.uci.edu/~gohlke/")
6556 (synopsis "Work with LFD data files")
6557 (description
6558 "Lfdfiles is a Python library and console script for reading, writing,
6559 converting, and viewing many of the proprietary file formats used to store
6560 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6561 (license license:bsd-3)))
6562
6563 (define-public python-imageio
6564 (package
6565 (name "python-imageio")
6566 (version "2.8.0")
6567 (source
6568 (origin
6569 (method url-fetch)
6570 (uri (pypi-uri "imageio" version))
6571 (sha256
6572 (base32
6573 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6574 (build-system python-build-system)
6575 (arguments
6576 `(#:tests? #f ; many tests require online data
6577 #:phases
6578 (modify-phases %standard-phases
6579 (replace 'check
6580 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6581 (if tests?
6582 (begin
6583 ;; Make installed package available for running the tests.
6584 (add-installed-pythonpath inputs outputs)
6585 (invoke "pytest" "-vv"))
6586 #t))))))
6587 (propagated-inputs
6588 `(("python-numpy" ,python-numpy)
6589 ("python-pillow" ,python-pillow)
6590 ("python-psutil" ,python-psutil)))
6591 (native-inputs
6592 `(("python-pytest" ,python-pytest)))
6593 (home-page "https://imageio.github.io/")
6594 (synopsis "Library for reading and writing a wide range of image data")
6595 (description
6596 "Imageio is a Python library that provides an easy interface to read and
6597 write a wide range of image data, including animated images, video, volumetric
6598 data, and scientific formats.")
6599 (license license:bsd-2)))
6600
6601 (define-public python-pycparser
6602 (package
6603 (name "python-pycparser")
6604 (version "2.20")
6605 (source
6606 (origin
6607 (method url-fetch)
6608 (uri (pypi-uri "pycparser" version))
6609 (sha256
6610 (base32
6611 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6612 (outputs '("out" "doc"))
6613 (build-system python-build-system)
6614 (native-inputs
6615 `(("pkg-config" ,pkg-config)))
6616 (arguments
6617 `(#:phases
6618 (modify-phases %standard-phases
6619 (replace 'check
6620 (lambda _
6621 (with-directory-excursion "tests"
6622 (invoke "python" "all_tests.py"))
6623 #t))
6624 (add-after 'install 'install-doc
6625 (lambda* (#:key outputs #:allow-other-keys)
6626 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6627 (doc (string-append data "/doc/" ,name "-" ,version))
6628 (examples (string-append doc "/examples")))
6629 (mkdir-p examples)
6630 (for-each (lambda (file)
6631 (copy-file (string-append "." file)
6632 (string-append doc file)))
6633 '("/README.rst" "/CHANGES" "/LICENSE"))
6634 (copy-recursively "examples" examples)
6635 #t))))))
6636 (home-page "https://github.com/eliben/pycparser")
6637 (synopsis "C parser in Python")
6638 (description
6639 "Pycparser is a complete parser of the C language, written in pure Python
6640 using the PLY parsing library. It parses C code into an AST and can serve as
6641 a front-end for C compilers or analysis tools.")
6642 (license license:bsd-3)))
6643
6644 (define-public python2-pycparser
6645 (package-with-python2 python-pycparser))
6646
6647 (define-public python-xlsxwriter
6648 (package
6649 (name "python-xlsxwriter")
6650 (version "1.3.9")
6651 (source
6652 (origin
6653 ;; There are no tests in the PyPI tarball.
6654 (method git-fetch)
6655 (uri (git-reference
6656 (url "https://github.com/jmcnamara/XlsxWriter")
6657 (commit (string-append "RELEASE_" version))))
6658 (file-name (git-file-name name version))
6659 (sha256
6660 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6661 (build-system python-build-system)
6662 (home-page "https://github.com/jmcnamara/XlsxWriter")
6663 (synopsis "Python module for creating Excel XLSX files")
6664 (description
6665 "XlsxWriter is a Python module that can be used to write text, numbers,
6666 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6667 (license license:bsd-2)))
6668
6669 (define-public python-pywavelets
6670 (package
6671 (name "python-pywavelets")
6672 (version "1.1.1")
6673 (home-page "https://github.com/PyWavelets/pywt")
6674 (source (origin
6675 (method url-fetch)
6676 (uri (pypi-uri "PyWavelets" version))
6677 (sha256
6678 (base32
6679 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6680 (build-system python-build-system)
6681 (arguments
6682 '(#:modules ((ice-9 ftw)
6683 (srfi srfi-1)
6684 (srfi srfi-26)
6685 (guix build utils)
6686 (guix build python-build-system))
6687 #:phases
6688 (modify-phases %standard-phases
6689 (replace 'check
6690 (lambda _
6691 (let ((cwd (getcwd))
6692 (libdir (find (cut string-prefix? "lib." <>)
6693 (scandir "build"))))
6694 (with-directory-excursion (string-append cwd "/build/" libdir)
6695 (invoke "pytest" "-vv"))))))))
6696 (native-inputs
6697 `(("python-matplotlib" ,python-matplotlib) ;for tests
6698 ("python-pytest" ,python-pytest)))
6699 (propagated-inputs
6700 `(("python-numpy" ,python-numpy)))
6701 (synopsis "Wavelet transforms in Python")
6702 (description
6703 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6704 mathematical basis functions that are localized in both time and frequency.
6705 Wavelet transforms are time-frequency transforms employing wavelets. They are
6706 similar to Fourier transforms, the difference being that Fourier transforms are
6707 localized only in frequency instead of in time and frequency.")
6708 (license license:expat)))
6709
6710 (define-public python-pywal
6711 (package
6712 (name "python-pywal")
6713 (version "3.3.0")
6714 (source
6715 (origin
6716 (method git-fetch)
6717 (uri (git-reference
6718 (url "https://github.com/dylanaraps/pywal")
6719 (commit version)))
6720 (file-name (git-file-name name version))
6721 (sha256
6722 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6723 (build-system python-build-system)
6724 (arguments
6725 `(#:phases
6726 (modify-phases %standard-phases
6727 (add-before 'check 'fix-home-directory
6728 (lambda _
6729 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6730 (setenv "HOME" "/tmp")
6731 #t)))))
6732 (inputs
6733 `(("imagemagick" ,imagemagick)))
6734 (home-page "https://github.com/dylanaraps/pywal")
6735 (synopsis "Color palette generator and applicator")
6736 (description
6737 "Pywal is a tool that generates a color palette from the dominant colors
6738 in an image. It then applies the colors system-wide and on-the-fly in all of
6739 your favourite programs.")
6740 (license license:expat)))
6741
6742 (define-public python-pywinrm
6743 (package
6744 (name "python-pywinrm")
6745 (version "0.4.1")
6746 (source
6747 (origin
6748 (method url-fetch)
6749 (uri (pypi-uri "pywinrm" version))
6750 (sha256
6751 (base32
6752 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6753 (build-system python-build-system)
6754 (propagated-inputs
6755 `(("python-six" ,python-six)
6756 ("python-requests_ntlm" ,python-requests_ntlm)
6757 ("python-xmltodict" ,python-xmltodict)
6758 ("python-kerberos" ,python-kerberos)))
6759 (native-inputs
6760 `(("python-mock" ,python-mock)
6761 ("python-pytest" ,python-pytest)))
6762 (home-page "https://github.com/diyan/pywinrm/")
6763 (synopsis
6764 "Python library for Windows Remote Management (WinRM)")
6765 (description
6766 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6767 service. It allows you to invoke commands on target Windows machines from
6768 any machine that can run Python.")
6769 (license license:expat)))
6770
6771 (define-public python-xcffib
6772 (package
6773 (name "python-xcffib")
6774 (version "0.6.0")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (pypi-uri "xcffib" version))
6779 (sha256
6780 (base32
6781 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6782 (build-system python-build-system)
6783 (inputs
6784 `(("libxcb" ,libxcb)))
6785 (propagated-inputs
6786 `(("python-cffi" ,python-cffi) ; used at run time
6787 ("python-six" ,python-six)))
6788 (arguments
6789 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6790 #:tests? #f
6791 #:phases
6792 (modify-phases %standard-phases
6793 (add-after 'unpack 'fix-libxcb-path
6794 (lambda* (#:key inputs #:allow-other-keys)
6795 (let ((libxcb (assoc-ref inputs "libxcb")))
6796 (substitute* '("xcffib/__init__.py")
6797 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6798 #t)))
6799 (add-after 'install 'install-doc
6800 (lambda* (#:key outputs #:allow-other-keys)
6801 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6802 "/doc/" ,name "-" ,version)))
6803 (mkdir-p doc)
6804 (copy-file "README.md"
6805 (string-append doc "/README.md"))
6806 #t))))))
6807 (home-page "https://github.com/tych0/xcffib")
6808 (synopsis "XCB Python bindings")
6809 (description
6810 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6811 support for Python 3 and PyPy. It is based on cffi.")
6812 (license license:expat)))
6813
6814 (define-public python2-xcffib
6815 (package-with-python2 python-xcffib))
6816
6817 (define-public python-cairocffi
6818 (package
6819 (name "python-cairocffi")
6820 (version "1.2.0")
6821 (source
6822 (origin
6823 ;; The PyPI archive does not include the documentation, so use Git.
6824 (method git-fetch)
6825 (uri (git-reference
6826 (url "https://github.com/Kozea/cairocffi")
6827 (commit (string-append "v" version))))
6828 (file-name (git-file-name name version))
6829 (sha256
6830 (base32
6831 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6832 (build-system python-build-system)
6833 (outputs '("out" "doc"))
6834 (inputs
6835 `(("glib" ,glib)
6836 ("gtk+" ,gtk+)
6837 ("gdk-pixbuf" ,gdk-pixbuf)
6838 ("cairo" ,cairo)))
6839 (native-inputs
6840 `(("python-numpy" ,python-numpy)
6841 ("python-pytest" ,python-pytest)
6842 ("python-pytest-cov" ,python-pytest-cov)
6843 ("python-pytest-runner" ,python-pytest-runner)
6844 ("python-sphinx" ,python-sphinx)
6845 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6846 (propagated-inputs
6847 `(("python-xcffib" ,python-xcffib))) ; used at run time
6848 (arguments
6849 `(#:phases
6850 (modify-phases %standard-phases
6851 (add-after 'unpack 'patch-paths
6852 (lambda* (#:key inputs #:allow-other-keys)
6853 (substitute* "cairocffi/__init__.py"
6854 ;; Hack the dynamic library loading mechanism.
6855 (("find_library\\(library_name\\)")
6856 "\"found\"")
6857 (("filenames = \\(library_filename,\\) \\+ filenames")
6858 "pass")
6859 (("libcairo.so.2")
6860 (string-append (assoc-ref inputs "cairo")
6861 "/lib/libcairo.so.2")))
6862 (substitute* "cairocffi/pixbuf.py"
6863 (("libgdk_pixbuf-2.0.so.0")
6864 (string-append (assoc-ref inputs "gdk-pixbuf")
6865 "/lib/libgdk_pixbuf-2.0.so.0"))
6866 (("libgobject-2.0.so.0")
6867 (string-append (assoc-ref inputs "glib")
6868 "/lib/libgobject-2.0.so.0"))
6869 (("libglib-2.0.so.0")
6870 (string-append (assoc-ref inputs "glib")
6871 "/lib/libglib-2.0.so.0"))
6872 (("libgdk-3.so.0")
6873 (string-append (assoc-ref inputs "gtk+")
6874 "/lib/libgdk-3.so.0")))
6875 #t))
6876 (add-after 'unpack 'disable-linters
6877 ;; Their check fails; none of our business.
6878 (lambda _
6879 (substitute* "setup.cfg"
6880 ((".*pytest-flake8.*") "")
6881 ((".*pytest-isort.*") "")
6882 (("--flake8") "")
6883 (("--isort") ""))
6884 #t))
6885 (add-after 'install 'install-doc
6886 (lambda* (#:key inputs outputs #:allow-other-keys)
6887 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6888 (doc (string-append data "/doc/" ,name "-" ,version))
6889 (html (string-append doc "/html")))
6890 (setenv "LD_LIBRARY_PATH"
6891 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6892 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6893 (setenv "LANG" "en_US.UTF-8")
6894 (mkdir-p html)
6895 (for-each (lambda (file)
6896 (copy-file (string-append "." file)
6897 (string-append doc file)))
6898 '("/README.rst" "/NEWS.rst"))
6899 (system* "python" "setup.py" "build_sphinx")
6900 (copy-recursively "docs/_build/html" html)
6901 #t))))))
6902 (home-page "https://github.com/Kozea/cairocffi")
6903 (synopsis "Python bindings and object-oriented API for Cairo")
6904 (description
6905 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6906 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6907 graphics library with support for multiple backends including image buffers,
6908 PNG, PostScript, PDF, and SVG file output.")
6909 (license license:bsd-3)))
6910
6911 (define-public python-decorator
6912 (package
6913 (name "python-decorator")
6914 (version "4.3.0")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (pypi-uri "decorator" version))
6919 (sha256
6920 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6921 (build-system python-build-system)
6922 (home-page "https://pypi.org/project/decorator/")
6923 (synopsis "Python module to simplify usage of decorators")
6924 (description
6925 "The aim of the decorator module is to simplify the usage of decorators
6926 for the average programmer, and to popularize decorators usage giving examples
6927 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6928 etc. The core of this module is a decorator factory.")
6929 (license license:expat)))
6930
6931 (define-public python2-decorator
6932 (package-with-python2 python-decorator))
6933
6934 (define-public python-drmaa
6935 (package
6936 (name "python-drmaa")
6937 (version "0.7.7")
6938 (source
6939 (origin
6940 (method url-fetch)
6941 (uri (pypi-uri "drmaa" version))
6942 (sha256
6943 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6944 (build-system python-build-system)
6945 ;; The test suite requires libdrmaa which is provided by the cluster
6946 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6947 ;; should be set to the path of the libdrmaa library.
6948 (arguments '(#:tests? #f))
6949 (native-inputs
6950 `(("python-nose" ,python-nose)))
6951 (home-page "https://pypi.org/project/drmaa/")
6952 (synopsis "Python bindings for the DRMAA library")
6953 (description
6954 "A Python package for Distributed Resource Management (DRM) job
6955 submission and control. This package is an implementation of the DRMAA 1.0
6956 Python language binding specification.")
6957 (license license:bsd-3)))
6958
6959 (define-public python2-drmaa
6960 (package-with-python2 python-drmaa))
6961
6962 (define-public python-grako
6963 (package
6964 (name "python-grako")
6965 (version "3.99.9")
6966 (source
6967 (origin
6968 (method url-fetch)
6969 (uri
6970 (pypi-uri "grako" version ".zip"))
6971 (sha256
6972 (base32
6973 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6974 (build-system python-build-system)
6975 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6976 (native-inputs
6977 `(("unzip" ,unzip)
6978 ("python-pytest" ,python-pytest)
6979 ("python-pytest-runner" ,python-pytest-runner)))
6980 (home-page "https://bitbucket.org/neogeny/grako")
6981 (synopsis "EBNF parser generator")
6982 (description
6983 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6984 memoizing PEG/Packrat parser in Python.")
6985 (license license:bsd-3)))
6986
6987 (define-public python2-grako
6988 (package-with-python2 python-grako))
6989
6990 (define-public python-grandalf
6991 (package
6992 (name "python-grandalf")
6993 (version "0.7")
6994 (source
6995 (origin
6996 ;; There's no source tarball on PyPI.
6997 (method git-fetch)
6998 (uri (git-reference
6999 (url "https://github.com/bdcht/grandalf")
7000 (commit (string-append "v" version))))
7001 (file-name (git-file-name name version))
7002 (sha256
7003 (base32
7004 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7005 (build-system python-build-system)
7006 (arguments
7007 '(#:phases
7008 (modify-phases %standard-phases
7009 (replace 'check
7010 (lambda _
7011 (invoke "python" "setup.py" "pytest"))))))
7012 (native-inputs
7013 `(("python-pytest" ,python-pytest)
7014 ("python-pytest-runner" ,python-pytest-runner)))
7015 (propagated-inputs
7016 `(("python-numpy" ,python-numpy)
7017 ("python-ply" ,python-ply)))
7018 (home-page "https://github.com/bdcht/grandalf")
7019 (synopsis "Graph and drawing algorithms framework")
7020 (description
7021 "Grandalf is a Python package made for experimentations with graphs
7022 drawing algorithms. It is written in pure Python, and currently implements
7023 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7024 minimization approach. While not as fast or featured as graphviz or other
7025 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7026 than thousands of nodes, while keeping the source code simple enough to tweak
7027 and hack any part of it for experimental purpose. With a total of about 1500
7028 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7029 in less than 600 lines. The energy minimization approach is comprised of only
7030 250 lines!
7031
7032 Grandalf does only 2 not-so-simple things:
7033 @itemize
7034 @item computing the nodes (x,y) coordinates (based on provided nodes
7035 dimensions, and a chosen layout)
7036 @item routing the edges with lines or nurbs
7037 @end itemize
7038
7039 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7040 will help you find where to draw things like nodes and edges, but it’s up to
7041 you to actually draw things with your favorite toolkit.")
7042 ;; The user can choose either license.
7043 (license (list license:gpl2 license:epl1.0))))
7044
7045 (define-public python-gridmap
7046 (package
7047 (name "python-gridmap")
7048 (version "0.14.0")
7049 (source
7050 (origin
7051 (method git-fetch)
7052 (uri (git-reference
7053 (url "https://github.com/pygridtools/gridmap")
7054 (commit (string-append "v" version))))
7055 (file-name (git-file-name name version))
7056 (sha256
7057 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7058 (build-system python-build-system)
7059 (arguments
7060 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7061 (propagated-inputs
7062 `(("python-psutil" ,python-psutil)
7063 ("python-drmaa" ,python-drmaa)
7064 ("python-pyzmq" ,python-pyzmq)))
7065 (home-page "https://github.com/pygridtools/gridmap")
7066 (synopsis "Create jobs on a cluster directly from Python")
7067 (description
7068 "Gridmap is a Python package to allow you to easily create jobs on the
7069 cluster directly from Python. You can directly map Python functions onto the
7070 cluster without needing to write any wrapper code yourself.")
7071 (license license:gpl3+)))
7072
7073 (define-public python-honcho
7074 (package
7075 (name "python-honcho")
7076 (version "1.0.1")
7077 (source
7078 (origin
7079 (method git-fetch)
7080 (uri (git-reference
7081 (url "https://github.com/nickstenning/honcho")
7082 (commit (string-append "v" version))))
7083 (file-name (git-file-name name version))
7084 (sha256
7085 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7086 (build-system python-build-system)
7087 (native-inputs
7088 `(("python-pytest" ,python-pytest)
7089 ("python-mock" ,python-mock)
7090 ("python-tox" ,python-tox)
7091 ("which" ,which))) ;for tests
7092 (propagated-inputs
7093 `(("python-jinja2" ,python-jinja2)))
7094 (arguments
7095 `(#:phases
7096 (modify-phases %standard-phases
7097 (delete 'check)
7098 (add-after 'install 'check
7099 (lambda* (#:key outputs inputs #:allow-other-keys)
7100 ;; fix honcho path in testsuite
7101 (substitute* "tests/conftest.py"
7102 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7103 "/bin/honcho" "'")))
7104 ;; It's easier to run tests after install.
7105 ;; Make installed package available for running the tests
7106 (add-installed-pythonpath inputs outputs)
7107 (invoke "py.test" "-v"))))))
7108 (home-page "https://github.com/nickstenning/honcho")
7109 (synopsis "Manage Procfile-based applications")
7110 (description
7111 "A Procfile is a file which describes how to run an application
7112 consisting of several processes. honcho starts all listed processes.
7113 The output of all running processes is collected by honcho and
7114 displayed.")
7115 (license license:expat)))
7116
7117 (define-public python-pexpect
7118 (package
7119 (name "python-pexpect")
7120 (version "4.8.0")
7121 (source
7122 (origin
7123 (method url-fetch)
7124 (uri (pypi-uri "pexpect" version))
7125 (sha256
7126 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7127 (build-system python-build-system)
7128 (arguments
7129 `(#:phases
7130 (modify-phases %standard-phases
7131 (add-before 'check 'prepare-tests
7132 (lambda _
7133 (substitute* (find-files "tests")
7134 (("/bin/ls") (which "ls"))
7135 (("/bin/echo") (which "echo"))
7136 (("/bin/which") (which "which"))
7137 ;; Many tests try to use the /bin directory which
7138 ;; is not present in the build environment.
7139 ;; Use one that's non-empty and unlikely to change.
7140 (("/bin'") "/dev'")
7141 ;; Disable failing test. See upstream bug report
7142 ;; https://github.com/pexpect/pexpect/issues/568
7143 (("def test_bash") "def _test_bash"))
7144 ;; XXX: Socket connection test gets "Connection reset by peer".
7145 ;; Why does it not work? Delete for now.
7146 (delete-file "tests/test_socket.py")
7147 #t))
7148 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7149 (native-inputs
7150 `(("python-nose" ,python-nose)
7151 ("python-pytest" ,python-pytest)
7152 ("man-db" ,man-db)
7153 ("which" ,which)
7154 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7155 (propagated-inputs
7156 `(("python-ptyprocess" ,python-ptyprocess)))
7157 (home-page "http://pexpect.readthedocs.org/")
7158 (synopsis "Controlling interactive console applications")
7159 (description
7160 "Pexpect is a pure Python module for spawning child applications;
7161 controlling them; and responding to expected patterns in their output.
7162 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7163 child application and control it as if a human were typing commands.")
7164 (license license:isc)))
7165
7166 (define-public python2-pexpect
7167 (package-with-python2 python-pexpect))
7168
7169 (define-public python-setuptools-scm
7170 (package
7171 (name "python-setuptools-scm")
7172 (version "3.4.3")
7173 (source (origin
7174 (method url-fetch)
7175 (uri (pypi-uri "setuptools_scm" version))
7176 (sha256
7177 (base32
7178 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
7179 (build-system python-build-system)
7180 (home-page "https://github.com/pypa/setuptools_scm/")
7181 (synopsis "Manage Python package versions in SCM metadata")
7182 (description
7183 "Setuptools_scm handles managing your Python package versions in
7184 @dfn{software configuration management} (SCM) metadata instead of declaring
7185 them as the version argument or in a SCM managed file.")
7186 (license license:expat)))
7187
7188 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
7189 (define-public python-setuptools-scm/next
7190 (package
7191 (inherit python-setuptools-scm)
7192 (version "5.0.1")
7193 (source
7194 (origin
7195 (method url-fetch)
7196 (uri (pypi-uri "setuptools_scm" version))
7197 (sha256
7198 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
7199
7200 (define-public python2-setuptools-scm
7201 (package-with-python2 python-setuptools-scm))
7202
7203 (define-public python-sexpdata
7204 (package
7205 (name "python-sexpdata")
7206 (version "0.0.3")
7207 (source
7208 (origin
7209 (method url-fetch)
7210 (uri (pypi-uri "sexpdata" version))
7211 (sha256
7212 (base32
7213 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7214 (build-system python-build-system)
7215 (home-page "https://github.com/jd-boyd/sexpdata")
7216 (synopsis "S-expression parser for Python")
7217 (description
7218 "Sexpdata is an S-expression parser/serializer. It has load and dump
7219 functions like pickle, json or PyYAML module.")
7220 (license license:bsd-3)))
7221
7222 (define-public python-pathlib2
7223 (package
7224 (name "python-pathlib2")
7225 (version "2.3.3")
7226 (source
7227 (origin
7228 (method url-fetch)
7229 (uri (pypi-uri "pathlib2" version))
7230 (sha256
7231 (base32
7232 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7233 (build-system python-build-system)
7234 (propagated-inputs
7235 `(("python-scandir" ,python-scandir)
7236 ("python-six" ,python-six)))
7237 (home-page "https://pypi.org/project/pathlib2/")
7238 (synopsis "Object-oriented file system paths")
7239 (description "The goal of pathlib2 is to provide a backport of the
7240 standard @code{pathlib} module which tracks the standard library module, so
7241 all the newest features of the standard @code{pathlib} can be used also on
7242 older Python versions.")
7243 (license license:expat)))
7244
7245 (define-public python-importlib-resources
7246 (package
7247 (name "python-importlib-resources")
7248 (version "3.0.0")
7249 (source
7250 (origin
7251 (method url-fetch)
7252 (uri (pypi-uri "importlib_resources" version))
7253 (sha256
7254 (base32
7255 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7256 (build-system python-build-system)
7257 (native-inputs
7258 `(("python-setuptools-scm" ,python-setuptools-scm)
7259 ("python-toml" ,python-toml)))
7260 (home-page "http://importlib-resources.readthedocs.io/")
7261 (synopsis "Read resources from Python packages")
7262 (description
7263 "@code{importlib_resources} is a backport of Python 3's standard library
7264 @code{importlib.resources} module for Python 2.7, and Python 3.")
7265 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7266 (license license:asl2.0)))
7267
7268 (define-public python2-importlib-resources
7269 (package
7270 (name "python2-importlib-resources")
7271 (version "1.0.2")
7272 (source (origin
7273 (method url-fetch)
7274 (uri (pypi-uri "importlib_resources" version))
7275 (sha256
7276 (base32
7277 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7278 (build-system python-build-system)
7279 (arguments
7280 `(#:python ,python-2
7281 #:phases (modify-phases %standard-phases
7282 ;; The build system tests for python-wheel, but it is
7283 ;; not required for Guix nor the test suite. Just drop
7284 ;; it to make bootstrapping pytest easier.
7285 (add-after 'unpack 'drop-wheel-dependency
7286 (lambda _
7287 (substitute* "setup.cfg"
7288 (("^[[:blank:]]+wheel")
7289 ""))
7290 #t)))))
7291 (propagated-inputs
7292 `(("python-pathlib2" ,python2-pathlib2)
7293 ("python-typing" ,python2-typing)))
7294 (home-page "https://gitlab.com/python-devs/importlib_resources")
7295 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7296 (description
7297 "This package provides an implementation of @code{importlib.resources}
7298 for older versions of Python.")
7299 (license license:asl2.0)))
7300
7301 ;; For importlib-metadata-bootstrap below.
7302 (define-public python2-importlib-resources-bootstrap
7303 (hidden-package
7304 (package/inherit
7305 python2-importlib-resources
7306 (name "python2-importlib-resources-bootstrap")
7307 (propagated-inputs
7308 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7309 ("python-typing" ,python2-typing))))))
7310
7311 (define-public python-importlib-metadata
7312 (package
7313 (name "python-importlib-metadata")
7314 (version "1.5.0")
7315 (source
7316 (origin
7317 (method url-fetch)
7318 (uri (pypi-uri "importlib_metadata" version))
7319 (sha256
7320 (base32
7321 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7322 (build-system python-build-system)
7323 (propagated-inputs
7324 `(("python-zipp" ,python-zipp)))
7325 (native-inputs
7326 `(("python-setuptools-scm" ,python-setuptools-scm)
7327 ("python-pyfakefs" ,python-pyfakefs)
7328 ("python-packaging" ,python-packaging)))
7329 (home-page "https://importlib-metadata.readthedocs.io/")
7330 (synopsis "Read metadata from Python packages")
7331 (description
7332 "@code{importlib_metadata} is a library which provides an API for
7333 accessing an installed Python package's metadata, such as its entry points or
7334 its top-level name. This functionality intends to replace most uses of
7335 @code{pkg_resources} entry point API and metadata API. Along with
7336 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7337 need to use the older and less efficient @code{pkg_resources} package.")
7338 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7339 (license license:asl2.0)))
7340
7341 (define-public python2-importlib-metadata
7342 (let ((base (package-with-python2 (strip-python2-variant
7343 python-importlib-metadata))))
7344 (package/inherit
7345 base
7346 (name "python2-importlib-metadata")
7347 (native-inputs
7348 `(("python-setuptools-scm" ,python2-setuptools-scm)
7349 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7350 ("python-packaging" ,python2-packaging-bootstrap)))
7351 (propagated-inputs
7352 `(("python-configparser" ,python2-configparser)
7353 ("python-contextlib2" ,python2-contextlib2)
7354 ("python-importlib-resources" ,python2-importlib-resources)
7355 ("python-pathlib2" ,python2-pathlib2)
7356 ,@(package-propagated-inputs base))))))
7357
7358 ;; This package is used by python2-pytest, and thus must not depend on it.
7359 (define-public python2-importlib-metadata-bootstrap
7360 (hidden-package
7361 (package/inherit
7362 python2-importlib-metadata
7363 (name "python2-importlib-metadata-bootstrap")
7364 (arguments
7365 `(#:tests? #f
7366 ,@(package-arguments python2-importlib-metadata)))
7367 (propagated-inputs
7368 `(("python-zipp" ,python2-zipp-bootstrap)
7369 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7370 ("python-configparser" ,python2-configparser)
7371 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7372 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7373
7374 (define-public python-importmagic
7375 (package
7376 (name "python-importmagic")
7377 (version "0.1.7")
7378 (source
7379 (origin
7380 (method url-fetch)
7381 (uri (pypi-uri "importmagic" version))
7382 (sha256
7383 (base32
7384 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7385 (build-system python-build-system)
7386 (home-page "https://github.com/alecthomas/importmagic")
7387 (synopsis "Library for adding, removing and managing Python imports")
7388 (description
7389 "Importmagic is a Python library for automatically managing imports by
7390 finding unresolved symbols in Python code and their corresponding imports.")
7391 (license license:bsd-3)))
7392
7393 (define-public python-inotify-simple
7394 (package
7395 (name "python-inotify-simple")
7396 (version "1.3.5")
7397 (source
7398 (origin
7399 (method git-fetch)
7400 (uri (git-reference
7401 (url "https://github.com/chrisjbillington/inotify_simple")
7402 (commit version)))
7403 (file-name (git-file-name name version))
7404 (sha256
7405 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7406 (build-system python-build-system)
7407 (home-page
7408 "https://github.com/chrisjbillington/inotify_simple")
7409 (synopsis "Simple wrapper around inotify library")
7410 (description
7411 "@code{inotify-simple} is a simple wrapper around inotify library.")
7412 (license license:bsd-3)))
7413
7414 (define-public python-jaraco-packaging
7415 (package
7416 (name "python-jaraco-packaging")
7417 (version "6.1")
7418 (source
7419 (origin
7420 (method url-fetch)
7421 (uri (pypi-uri "jaraco.packaging" version))
7422 (sha256
7423 (base32
7424 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7425 (build-system python-build-system)
7426 (propagated-inputs
7427 `(("python-pytest" ,python-pytest)
7428 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7429 ("python-pytest-flake8" ,python-pytest-flake8)
7430 ("python-rst.linker" ,python-rst.linker)
7431 ("python-setuptools" ,python-setuptools)
7432 ("python-setuptools-scm" ,python-setuptools-scm)
7433 ("python-six" ,python-six)
7434 ("python-sphinx" ,python-sphinx)))
7435 (home-page "https://github.com/jaraco/jaraco.packaging")
7436 (synopsis "Tools to supplement packaging Python releases")
7437 (description
7438 "This package provides various tools to supplement packaging Python
7439 releases.")
7440 (license license:expat)))
7441
7442 (define-public python-pathpy
7443 (package
7444 (name "python-pathpy")
7445 (version "11.5.1")
7446 (source
7447 (origin
7448 (method url-fetch)
7449 (uri (pypi-uri "path.py" version))
7450 (sha256
7451 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7452 (outputs '("out" "doc"))
7453 (build-system python-build-system)
7454 (propagated-inputs
7455 `(("python-appdirs" ,python-appdirs)
7456 ("python-importlib-metadata" ,python-importlib-metadata)))
7457 (native-inputs
7458 `(("python-setuptools-scm" ,python-setuptools-scm)
7459 ("python-sphinx" ,python-sphinx)
7460 ("python-rst.linker" ,python-rst.linker)
7461 ("python-pytest" ,python-pytest)
7462 ("python-pytest-runner" ,python-pytest-runner)
7463 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7464 (arguments
7465 `(#:phases
7466 (modify-phases %standard-phases
7467 (add-after 'build 'build-doc
7468 (lambda _
7469 (setenv "LANG" "en_US.UTF-8")
7470 (invoke "python" "setup.py" "build_sphinx")))
7471 (add-after 'install 'install-doc
7472 (lambda* (#:key outputs #:allow-other-keys)
7473 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7474 (doc (string-append data "/doc/" ,name "-" ,version))
7475 (html (string-append doc "/html")))
7476 (mkdir-p html)
7477 (for-each (lambda (file)
7478 (copy-file file (string-append doc "/" file)))
7479 '("README.rst" "CHANGES.rst"))
7480 (copy-recursively "build/sphinx/html" html)
7481 #t)))
7482 (replace 'check
7483 (lambda _
7484 ;; The import time test aborts if an import takes longer than
7485 ;; 100ms. It may very well take a little longer than that.
7486 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7487 (home-page "https://github.com/jaraco/path.py")
7488 (synopsis "Python module wrapper for built-in os.path")
7489 (description
7490 "@code{path.py} implements path objects as first-class entities, allowing
7491 common operations on files to be invoked on those path objects directly.")
7492 (license license:expat)))
7493
7494 (define-public python-simplegeneric
7495 (package
7496 (name "python-simplegeneric")
7497 (version "0.8.1")
7498 (source
7499 (origin
7500 (method url-fetch)
7501 (uri (pypi-uri "simplegeneric" version ".zip"))
7502 (sha256
7503 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7504 (build-system python-build-system)
7505 (native-inputs
7506 `(("unzip" ,unzip)))
7507 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7508 (synopsis "Python module for simple generic functions")
7509 (description
7510 "The simplegeneric module lets you define simple single-dispatch generic
7511 functions, akin to Python’s built-in generic functions like @code{len()},
7512 @code{iter()} and so on. However, instead of using specially-named methods,
7513 these generic functions use simple lookup tables, akin to those used by
7514 e.g. @code{pickle.dump()} and other generic functions found in the Python
7515 standard library.")
7516 (license license:zpl2.1)))
7517
7518 (define-public python2-simplegeneric
7519 (package-with-python2 python-simplegeneric))
7520
7521 (define-public python-ipython-genutils
7522 ;; TODO: This package is retired, check if can be removed, see description.
7523 (package
7524 (name "python-ipython-genutils")
7525 (version "0.1.0")
7526 (source
7527 (origin
7528 (method url-fetch)
7529 (uri (pypi-uri "ipython_genutils" version))
7530 (sha256
7531 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7532 (build-system python-build-system)
7533 (arguments `(#:tests? #f)) ; no tests
7534 (home-page "https://ipython.org")
7535 (synopsis "Vestigial utilities from IPython")
7536 (description
7537 "This package provides retired utilities from IPython. No packages
7538 outside IPython/Jupyter should depend on it.
7539
7540 This package shouldn't exist. It contains some common utilities shared by
7541 Jupyter and IPython projects during The Big Split. As soon as possible, those
7542 packages will remove their dependency on this, and this package will go
7543 away.")
7544 (license license:bsd-3)))
7545
7546 (define-public python2-ipython-genutils
7547 (package-with-python2 python-ipython-genutils))
7548
7549 (define-public python-ipyparallel
7550 (package
7551 (name "python-ipyparallel")
7552 (version "6.2.4")
7553 (source
7554 (origin
7555 (method url-fetch)
7556 (uri (pypi-uri "ipyparallel" version))
7557 (sha256
7558 (base32
7559 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7560 (build-system python-build-system)
7561 (arguments
7562 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7563 #:phases
7564 (modify-phases %standard-phases
7565 (add-before 'check 'prepare-for-tests
7566 (lambda _
7567 (setenv "HOME" (getcwd))
7568 #t)))))
7569 (propagated-inputs
7570 `(("python-dateutil" ,python-dateutil)
7571 ("python-decorator" ,python-decorator)
7572 ("python-ipykernel" ,python-ipykernel)
7573 ("python-ipython" ,python-ipython)
7574 ("python-ipython-genutils" ,python-ipython-genutils)
7575 ("python-jupyter-client" ,python-jupyter-client)
7576 ("python-pyzmq" ,python-pyzmq)
7577 ("python-tornado" ,python-tornado)
7578 ("python-traitlets" ,python-traitlets)))
7579 (native-inputs
7580 `(("python-ipython" ,python-ipython)
7581 ("python-mock" ,python-mock)
7582 ("python-nose" ,python-nose)
7583 ("python-pytest" ,python-pytest)
7584 ("python-pytest-cov" ,python-pytest-cov)
7585 ("python-testpath" ,python-testpath)))
7586 (home-page "https://ipython.org/")
7587 (synopsis "Interactive Parallel Computing with IPython")
7588 (description
7589 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7590 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7591 CLI scripts:
7592 @enumerate
7593 @item ipcluster - start/stop a cluster
7594 @item ipcontroller - start a scheduler
7595 @item ipengine - start an engine
7596 @end enumerate")
7597 (license license:bsd-3)))
7598
7599 (define-public python-ipython-cluster-helper
7600 (package
7601 (name "python-ipython-cluster-helper")
7602 (version "0.6.4")
7603 (source
7604 (origin
7605 (method url-fetch)
7606 (uri (pypi-uri "ipython-cluster-helper" version))
7607 (sha256
7608 (base32
7609 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7610 (modules '((guix build utils)))
7611 (snippet
7612 '(begin (substitute* "requirements.txt"
7613 (("ipython.*") "ipython\n"))
7614 #t))))
7615 (build-system python-build-system)
7616 (arguments
7617 `(#:tests? #f ; Test suite can't find IPython.
7618 #:phases
7619 (modify-phases %standard-phases
7620 (replace 'check
7621 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7622 (if tests?
7623 (begin
7624 (setenv "HOME" (getcwd))
7625 (add-installed-pythonpath inputs outputs)
7626 (invoke "python" "example/example.py" "--local"))
7627 #t))))))
7628 (propagated-inputs
7629 `(("python-ipyparallel" ,python-ipyparallel)
7630 ("python-ipython" ,python-ipython)
7631 ("python-netifaces" ,python-netifaces)
7632 ("python-pyzmq" ,python-pyzmq)
7633 ("python-setuptools" ,python-setuptools)
7634 ("python-six" ,python-six)))
7635 (home-page "https://github.com/roryk/ipython-cluster-helper")
7636 (synopsis
7637 "Simplify IPython cluster start up and use for multiple schedulers")
7638 (description
7639 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7640 profile, launches a cluster and returns a view. On program exit it shuts the
7641 cluster down and deletes the throwaway profile.")
7642 (license license:expat)))
7643
7644 (define-public python-traitlets
7645 (package
7646 (name "python-traitlets")
7647 (version "4.3.3")
7648 (source
7649 (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "traitlets" version))
7652 (sha256
7653 (base32
7654 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7655 (build-system python-build-system)
7656 (arguments
7657 `(#:phases
7658 (modify-phases %standard-phases
7659 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7660 (propagated-inputs
7661 `(("python-ipython-genutils" ,python-ipython-genutils)
7662 ("python-decorator" ,python-decorator)
7663 ("python-six" ,python-six)))
7664 (native-inputs
7665 `(("python-pytest" ,python-pytest)))
7666 (properties `((python2-variant . ,(delay python2-traitlets))))
7667 (home-page "https://ipython.org")
7668 (synopsis "Configuration system for Python applications")
7669 (description
7670 "Traitlets is a framework that lets Python classes have attributes with
7671 type checking, dynamically calculated default values, and ‘on change’
7672 callbacks. The package also includes a mechanism to use traitlets for
7673 configuration, loading values from files or from command line arguments. This
7674 is a distinct layer on top of traitlets, so you can use traitlets in your code
7675 without using the configuration machinery.")
7676 (license license:bsd-3)))
7677
7678 (define-public python2-traitlets
7679 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7680 (package/inherit traitlets
7681 (propagated-inputs
7682 `(("python2-enum34" ,python2-enum34)
7683 ,@(package-propagated-inputs traitlets))))))
7684
7685 (define-public python-jupyter-core
7686 (package
7687 (name "python-jupyter-core")
7688 (version "4.7.1")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (string-append (pypi-uri "jupyter_core" version)))
7693 (sha256
7694 (base32
7695 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7696 (build-system python-build-system)
7697 (arguments
7698 `(#:phases
7699 (modify-phases %standard-phases
7700 (replace 'check
7701 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7702 (when tests?
7703 ; Some tests write to $HOME.
7704 (setenv "HOME" "/tmp")
7705 ; Some tests load the installed package.
7706 (add-installed-pythonpath inputs outputs)
7707 (invoke "pytest" "-vv"))))
7708 (add-after 'unpack 'patch-testsuite
7709 (lambda _
7710 ;; test_not_on_path() and test_path_priority() try to run a test
7711 ;; that loads jupyter_core, so we need PYTHONPATH
7712 (substitute* "jupyter_core/tests/test_command.py"
7713 (("env = \\{'PATH': ''\\}")
7714 "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
7715 (("env = \\{'PATH': str\\(b\\)\\}")
7716 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
7717 #t))
7718 ;; Migration is running whenever etc/jupyter exists, but the
7719 ;; Guix-managed directory will never contain any migratable IPython
7720 ;; config files and cannot be written to anyway, so just pretend we
7721 ;; already did that.
7722 (add-after 'install 'disable-migration
7723 (lambda* (#:key outputs #:allow-other-keys)
7724 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
7725 (invoke "touch"
7726 (string-append
7727 (assoc-ref outputs "out")
7728 "/etc/jupyter/migrated")))))))
7729 (propagated-inputs
7730 `(("python-traitlets" ,python-traitlets)))
7731 (native-inputs
7732 `(("python-six" ,python-six)
7733 ("python-pytest" ,python-pytest)))
7734 ;; This package provides the `jupyter` binary and thus also exports the
7735 ;; search paths.
7736 (native-search-paths
7737 (list (search-path-specification
7738 (variable "JUPYTER_CONFIG_DIR")
7739 (files '("etc/jupyter")))
7740 (search-path-specification
7741 (variable "JUPYTER_PATH")
7742 (files '("share/jupyter")))))
7743 (home-page "https://jupyter.org/")
7744 (synopsis "Jupyter base package")
7745 (description
7746 "Jupyter core is the base package on which Jupyter projects rely.")
7747 (license license:bsd-3)))
7748
7749 (define-public python-jupyter-client
7750 (package
7751 (name "python-jupyter-client")
7752 (version "6.1.12")
7753 (source
7754 (origin
7755 (method url-fetch)
7756 (uri (pypi-uri "jupyter_client" version))
7757 (sha256
7758 (base32
7759 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7760 (build-system python-build-system)
7761 (arguments
7762 `(#:phases
7763 (modify-phases %standard-phases
7764 (add-after 'unpack 'set-tool-file-names
7765 (lambda* (#:key inputs #:allow-other-keys)
7766 (let ((iproute (assoc-ref inputs "iproute")))
7767 (substitute* "jupyter_client/localinterfaces.py"
7768 (("'ip'")
7769 (string-append "'" iproute "/sbin/ip'")))
7770 #t)))
7771 (replace 'check
7772 (lambda* (#:key tests? #:allow-other-keys)
7773 (when tests?
7774 ;; Some tests try to write to $HOME.
7775 (setenv "HOME" "/tmp")
7776 (invoke "pytest" "-vv")))))))
7777 (inputs
7778 `(("iproute" ,iproute)))
7779 (propagated-inputs
7780 `(("python-dateutil" ,python-dateutil)
7781 ("python-jupyter-core" ,python-jupyter-core)
7782 ("python-pyzmq" ,python-pyzmq)
7783 ("python-tornado" ,python-tornado-6)
7784 ("python-traitlets" ,python-traitlets)))
7785 (native-inputs
7786 `(("python-pytest" ,python-pytest)
7787 ("python-pytest-asyncio" ,python-pytest-asyncio)
7788 ("python-pytest-timeout" ,python-pytest-timeout)
7789 ("python-async-generator" ,python-async-generator)
7790 ("python-mock" ,python-mock)
7791 ("python-msgpack" ,python-msgpack)
7792 ("python-ipython" ,python-ipython)
7793 ("python-ipykernel" ,python-ipykernel-bootstrap)))
7794 (home-page "https://jupyter.org/")
7795 (synopsis "Jupyter protocol implementation and client libraries")
7796 (description
7797 "The @code{jupyter_client} package contains the reference implementation
7798 of the Jupyter protocol. It also provides client and kernel management APIs
7799 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7800 installing @code{kernelspec}s for use with Jupyter frontends.")
7801 (license license:bsd-3)))
7802
7803 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
7804 ;; and jupyter-client by removing the former from its native-inputs and
7805 ;; disabling tests.
7806 (define-public python-jupyter-client-bootstrap
7807 (let ((base python-jupyter-client))
7808 (hidden-package
7809 (package
7810 (inherit base)
7811 (name "python-jupyter-client-bootstrap")
7812 (arguments
7813 `(#:tests? #f
7814 ,@(package-arguments base)))
7815 (native-inputs `())))))
7816
7817 (define-public python2-jupyter-client
7818 (package-with-python2 python-jupyter-client))
7819
7820 (define-public python-ipykernel
7821 (package
7822 (name "python-ipykernel")
7823 (version "5.5.3")
7824 (source
7825 (origin
7826 (method url-fetch)
7827 (uri (pypi-uri "ipykernel" version))
7828 (sha256
7829 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7830 (build-system python-build-system)
7831 (arguments
7832 `(#:phases
7833 (modify-phases %standard-phases
7834 (replace 'check
7835 (lambda _
7836 (setenv "HOME" "/tmp")
7837 (invoke "pytest" "-v")
7838 #t))
7839 (add-after 'install 'set-python-file-name
7840 (lambda* (#:key outputs #:allow-other-keys)
7841 ;; Record the absolute file name of the 'python' executable in
7842 ;; 'kernel.json'.
7843 (let ((out (assoc-ref outputs "out")))
7844 (substitute* (string-append out "/share/jupyter"
7845 "/kernels/python3/kernel.json")
7846 (("\"python\"")
7847 (string-append "\"" (which "python") "\"")))
7848 #t))))))
7849 (propagated-inputs
7850 `(("python-ipython" ,python-ipython)
7851 ("python-tornado" ,python-tornado-6)
7852 ("python-traitlets" ,python-traitlets)
7853 ;; imported at runtime during connect
7854 ("python-jupyter-client" ,python-jupyter-client)))
7855 (native-inputs
7856 `(("python-flaky" ,python-flaky)
7857 ("python-nose" ,python-nose)
7858 ("python-pytest" ,python-pytest)))
7859 (home-page "https://ipython.org")
7860 (synopsis "IPython Kernel for Jupyter")
7861 (description
7862 "This package provides the IPython kernel for Jupyter.")
7863 (license license:bsd-3)))
7864
7865 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
7866 ;; break the cycle between ipykernel and jupyter-client.
7867 (define-public python-ipykernel-bootstrap
7868 (let ((parent python-ipykernel))
7869 (hidden-package
7870 (package
7871 (inherit parent)
7872 (name "python-ipykernel-bootstrap")
7873 (propagated-inputs
7874 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
7875 ,@(fold alist-delete (package-propagated-inputs parent)
7876 '("python-jupyter-client"))))))))
7877
7878 (define-public python-pari-jupyter
7879 (package
7880 (name "python-pari-jupyter")
7881 (version "1.3.2")
7882 (source
7883 (origin
7884 (method url-fetch)
7885 (uri (pypi-uri "pari_jupyter" version))
7886 (sha256
7887 (base32
7888 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7889 (build-system python-build-system)
7890 (propagated-inputs
7891 `(("python-ipykernel" ,python-ipykernel)))
7892 (inputs
7893 `(("pari-gp" ,pari-gp)
7894 ("readline" ,readline)))
7895 (arguments
7896 `(#:tests? #f)) ; no test suite
7897 (home-page
7898 "https://github.com/jdemeyer/pari_jupyter")
7899 (synopsis "A Jupyter kernel for PARI/GP")
7900 (description "The package provides a PARI/GP kernel for Jupyter.")
7901 (license license:gpl3+)))
7902
7903 (define-public python-backcall
7904 (package
7905 (name "python-backcall")
7906 (version "0.2.0")
7907 (source
7908 (origin
7909 (method url-fetch)
7910 (uri (pypi-uri "backcall" version))
7911 (sha256
7912 (base32
7913 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7914 (build-system python-build-system)
7915 (home-page "https://github.com/takluyver/backcall/")
7916 (synopsis "Specifications for callback functions passed in to an API")
7917 (description
7918 "If your code lets other people supply callback functions, it's important
7919 to specify the function signature you expect, and check that functions support
7920 that. Adding extra parameters later would break other peoples code unless
7921 you're careful. The @code{backcall} package provides a way of specifying the
7922 callback signature using a prototype function.")
7923 (license license:bsd-3)))
7924
7925 (define-public python-ipython
7926 (package
7927 (name "python-ipython")
7928 (version "7.9.0")
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "ipython" version ".tar.gz"))
7933 (sha256
7934 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7935 (build-system python-build-system)
7936 (propagated-inputs
7937 `(("python-backcall" ,python-backcall)
7938 ("python-pyzmq" ,python-pyzmq)
7939 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7940 ("python-terminado" ,python-terminado)
7941 ("python-matplotlib" ,python-matplotlib)
7942 ("python-numpy" ,python-numpy)
7943 ("python-numpydoc" ,python-numpydoc)
7944 ("python-jedi" ,python-jedi)
7945 ("python-jinja2" ,python-jinja2)
7946 ("python-mistune" ,python-mistune)
7947 ("python-pexpect" ,python-pexpect)
7948 ("python-pickleshare" ,python-pickleshare)
7949 ("python-simplegeneric" ,python-simplegeneric)
7950 ("python-jsonschema" ,python-jsonschema)
7951 ("python-traitlets" ,python-traitlets)
7952 ("python-nbformat" ,python-nbformat)
7953 ("python-pygments" ,python-pygments)))
7954 (inputs
7955 `(("readline" ,readline)
7956 ("which" ,which)))
7957 (native-inputs
7958 `(("graphviz" ,graphviz)
7959 ("pkg-config" ,pkg-config)
7960 ("python-requests" ,python-requests) ;; for tests
7961 ("python-testpath" ,python-testpath)
7962 ("python-nose" ,python-nose)))
7963 (arguments
7964 `(#:phases
7965 (modify-phases %standard-phases
7966 (add-after 'unpack 'make-docs-reproducible
7967 (lambda _
7968 (substitute* "IPython/sphinxext/ipython_directive.py"
7969 ((".*import datetime") "")
7970 ((".*datetime.datetime.now\\(\\)") "")
7971 (("%timeit") "# %timeit"))
7972 #t))
7973 ;; Tests can only be run after the library has been installed and not
7974 ;; within the source directory.
7975 (delete 'check)
7976 (add-after 'install 'check
7977 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7978 (if tests?
7979 (begin
7980 ;; Make installed package available for running the tests
7981 (add-installed-pythonpath inputs outputs)
7982 (setenv "HOME" "/tmp/") ;; required by a test
7983 ;; We only test the core because one of the other tests
7984 ;; tries to import ipykernel.
7985 (invoke "python" "IPython/testing/iptest.py"
7986 "-v" "IPython/core/tests"))
7987 #t)))
7988 (add-before 'check 'fix-tests
7989 (lambda* (#:key inputs #:allow-other-keys)
7990 (substitute* "./IPython/utils/_process_posix.py"
7991 (("/usr/bin/env', 'which") (which "which")))
7992 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7993 (("#!/usr/bin/env python")
7994 (string-append "#!" (which "python"))))
7995 ;; This test introduces a circular dependency on ipykernel
7996 ;; (which depends on ipython).
7997 (delete-file "IPython/core/tests/test_display.py")
7998 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7999 (delete-file "IPython/core/tests/test_interactiveshell.py")
8000 #t)))))
8001 (home-page "https://ipython.org")
8002 (synopsis "IPython is a tool for interactive computing in Python")
8003 (description
8004 "IPython provides a rich architecture for interactive computing with:
8005 Powerful interactive shells, a browser-based notebook, support for interactive
8006 data visualization, embeddable interpreters and tools for parallel
8007 computing.")
8008 (properties `((python2-variant . ,(delay python2-ipython))))
8009 (license license:bsd-3)))
8010
8011 ;; This is the latest release of the LTS version of ipython with support for
8012 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
8013 ;; dropped support for Python 2.7.
8014 (define-public python2-ipython
8015 (package
8016 (name "python2-ipython")
8017 (version "5.8.0")
8018 (source
8019 (origin
8020 (method url-fetch)
8021 (uri (pypi-uri "ipython" version ".tar.gz"))
8022 (sha256
8023 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
8024 (build-system python-build-system)
8025 (propagated-inputs
8026 `(("python2-backports-shutil-get-terminal-size"
8027 ,python2-backports-shutil-get-terminal-size)
8028 ("python2-pathlib2" ,python2-pathlib2)
8029 ("python2-pyzmq" ,python2-pyzmq)
8030 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8031 ("python2-terminado" ,python2-terminado)
8032 ("python2-matplotlib" ,python2-matplotlib)
8033 ("python2-numpy" ,python2-numpy)
8034 ("python2-numpydoc" ,python2-numpydoc)
8035 ("python2-jinja2" ,python2-jinja2)
8036 ("python2-mistune" ,python2-mistune)
8037 ("python2-pexpect" ,python2-pexpect)
8038 ("python2-pickleshare" ,python2-pickleshare)
8039 ("python2-simplegeneric" ,python2-simplegeneric)
8040 ("python2-jsonschema" ,python2-jsonschema)
8041 ("python2-traitlets" ,python2-traitlets)
8042 ("python2-nbformat" ,python2-nbformat)
8043 ("python2-pygments" ,python2-pygments)))
8044 (inputs
8045 `(("readline" ,readline)
8046 ("which" ,which)))
8047 (native-inputs
8048 `(("graphviz" ,graphviz)
8049 ("pkg-config" ,pkg-config)
8050 ("python2-requests" ,python2-requests) ;; for tests
8051 ("python2-testpath" ,python2-testpath)
8052 ("python2-mock" ,python2-mock)
8053 ("python2-nose" ,python2-nose)))
8054 (arguments
8055 `(#:python ,python-2
8056 #:phases
8057 (modify-phases %standard-phases
8058 (add-before 'check 'delete-broken-tests
8059 (lambda* (#:key inputs #:allow-other-keys)
8060 ;; These tests throw errors for unknown reasons.
8061 (delete-file "IPython/core/tests/test_displayhook.py")
8062 (delete-file "IPython/core/tests/test_magic_terminal.py")
8063 (delete-file "IPython/core/tests/test_profile.py")
8064 #t)))))
8065 (home-page "https://ipython.org")
8066 (synopsis "IPython is a tool for interactive computing in Python")
8067 (description
8068 "IPython provides a rich architecture for interactive computing with:
8069 Powerful interactive shells, a browser-based notebook, support for interactive
8070 data visualization, embeddable interpreters and tools for parallel
8071 computing.")
8072 (license license:bsd-3)))
8073
8074 (define-public python-ipython-documentation
8075 (package
8076 (inherit python-ipython)
8077 (name "python-ipython-documentation")
8078 (version (package-version python-ipython))
8079 (arguments
8080 `(#:phases
8081 (modify-phases %standard-phases
8082 (delete 'build)
8083 (delete 'check)
8084 (replace 'install
8085 (lambda* (#:key outputs #:allow-other-keys)
8086 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8087 (doc (string-append data "/doc/" ,name "-" ,version))
8088 (html (string-append doc "/html"))
8089 (man1 (string-append data "/man/man1"))
8090 (info (string-append data "/info"))
8091 (examples (string-append doc "/examples"))
8092 (python-arg (string-append "PYTHON=" (which "python"))))
8093 (setenv "LANG" "en_US.utf8")
8094 (with-directory-excursion "docs"
8095 ;; FIXME: pdf fails to build
8096 ;;(system* "make" "pdf" "PAPER=a4")
8097 (system* "make" python-arg "html")
8098 ;; FIXME: the generated texi file contains ^@^@, which trips
8099 ;; up the parser.
8100 ;; (system* "make" python-arg "info")
8101 )
8102 (copy-recursively "docs/man" man1)
8103 (copy-recursively "examples" examples)
8104 (copy-recursively "docs/build/html" html)
8105 ;; (copy-file "docs/build/latex/ipython.pdf"
8106 ;; (string-append doc "/ipython.pdf"))
8107 (mkdir-p info)
8108 ;; (copy-file "docs/build/texinfo/ipython.info"
8109 ;; (string-append info "/ipython.info"))
8110 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8111 #t)))))
8112 (inputs
8113 `(("python-ipython" ,python-ipython)
8114 ("python-ipykernel" ,python-ipykernel)))
8115 (native-inputs
8116 `(("python-sphinx" ,python-sphinx)
8117 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8118 ;; FIXME: It's possible that a smaller union would work just as well.
8119 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
8120 texlive-fonts-ec
8121 texlive-generic-ifxetex
8122 texlive-generic-pdftex
8123 texlive-latex-capt-of
8124 texlive-latex-cmap
8125 texlive-latex-environ
8126 texlive-latex-eqparbox
8127 texlive-latex-etoolbox
8128 texlive-latex-expdlist
8129 texlive-latex-fancyhdr
8130 texlive-latex-fancyvrb
8131 texlive-latex-fncychap
8132 texlive-latex-float
8133 texlive-latex-framed
8134 texlive-latex-geometry
8135 texlive-latex-graphics
8136 texlive-latex-hyperref
8137 texlive-latex-mdwtools
8138 texlive-latex-multirow
8139 texlive-latex-needspace
8140 texlive-latex-oberdiek
8141 texlive-latex-parskip
8142 texlive-latex-preview
8143 texlive-latex-tabulary
8144 texlive-latex-threeparttable
8145 texlive-latex-titlesec
8146 texlive-latex-trimspaces
8147 texlive-latex-ucs
8148 texlive-latex-upquote
8149 texlive-latex-url
8150 texlive-latex-varwidth
8151 texlive-latex-wrapfig)))
8152 ("texinfo" ,texinfo)))))
8153
8154 (define-public python-urwid
8155 (package
8156 (name "python-urwid")
8157 (version "2.1.2")
8158 (source
8159 (origin
8160 (method url-fetch)
8161 (uri (pypi-uri "urwid" version))
8162 (sha256
8163 (base32
8164 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8165 (build-system python-build-system)
8166 (home-page "http://urwid.org")
8167 (synopsis "Console user interface library for Python")
8168 (description
8169 "Urwid is a curses-based UI/widget library for Python. It includes many
8170 features useful for text console applications.")
8171 (properties `((python2-variant . ,(delay python2-urwid))))
8172 (license license:lgpl2.1+)))
8173
8174 (define-public python2-urwid
8175 (let ((base (package-with-python2
8176 (strip-python2-variant python-urwid))))
8177 (package
8178 (inherit base)
8179 (version "2.1.0")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (pypi-uri "urwid" version))
8184 (sha256
8185 (base32
8186 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8187
8188 (define-public python-urwid-readline
8189 (package
8190 (name "python-urwid-readline")
8191 (version "0.12")
8192 (source
8193 (origin
8194 (method git-fetch)
8195 (uri (git-reference
8196 (url "https://github.com/rr-/urwid_readline")
8197 (commit version)))
8198 (file-name (git-file-name name version))
8199 (sha256
8200 (base32
8201 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8202 (build-system python-build-system)
8203 (arguments
8204 `(#:phases
8205 (modify-phases %standard-phases
8206 (replace 'check
8207 (lambda* (#:key tests? #:allow-other-keys)
8208 (when tests?
8209 (invoke "python" "-m" "pytest"))
8210 #t)))))
8211 (propagated-inputs
8212 `(("python-urwid" ,python-urwid)))
8213 (native-inputs
8214 `(("python-pytest" ,python-pytest)))
8215 (home-page "https://github.com/rr-/urwid_readline")
8216 (synopsis "Text input widget for urwid that supports readline shortcuts")
8217 (description
8218 "This package provides a textbox edit widget for @code{python-urwid} that
8219 supports @code{readline} shortcuts.")
8220 (license license:expat)))
8221
8222 (define-public python-textdistance
8223 (package
8224 (name "python-textdistance")
8225 (version "4.2.1")
8226 (source
8227 (origin
8228 ;; There are no tests in the PyPI tarball.
8229 (method git-fetch)
8230 (uri (git-reference
8231 (url "https://github.com/life4/textdistance")
8232 (commit (string-append "v." version))))
8233 (file-name (git-file-name name version))
8234 (sha256
8235 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8236 (build-system python-build-system)
8237 (arguments
8238 `(#:test-target "pytest"
8239 #:phases
8240 (modify-phases %standard-phases
8241 (add-after 'unpack 'delete-external-test
8242 (lambda _
8243 ;; All tests in this file require external libraries.
8244 (delete-file "tests/test_external.py")
8245 #t)))))
8246 (native-inputs
8247 `(("python-hypothesis" ,python-hypothesis)
8248 ("python-isort" ,python-isort)
8249 ("python-numpy" ,python-numpy)
8250 ("python-pytest" ,python-pytest)
8251 ("python-pytest-runner" ,python-pytest-runner)
8252 ("python-tabulate" ,python-tabulate)))
8253 (home-page "https://github.com/life4/textdistance")
8254 (synopsis "Compute distance between the two texts")
8255 (description "@code{textdistance} is a pure Python library for comparing
8256 distance between two or more sequences by many algorithms.")
8257 (license license:expat)))
8258
8259 (define-public python-urwidtrees
8260 (package
8261 (name "python-urwidtrees")
8262 (version "1.0.2")
8263 (source
8264 (origin
8265 (method git-fetch)
8266 ;; package author intends on distributing via github rather than pypi:
8267 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8268 (uri (git-reference
8269 (url "https://github.com/pazz/urwidtrees")
8270 (commit version)))
8271 (file-name (git-file-name name version))
8272 (sha256
8273 (base32
8274 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8275 (build-system python-build-system)
8276 (arguments
8277 '(#:use-setuptools? #f
8278 #:tests? #f)) ; no tests
8279 (propagated-inputs `(("python-urwid" ,python-urwid)))
8280 (home-page "https://github.com/pazz/urwidtrees")
8281 (synopsis "Tree widgets for urwid")
8282 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8283 toolkit. Use it to build trees of widgets.")
8284 (license license:gpl3+)))
8285
8286 (define-public python2-urwidtrees
8287 (package-with-python2 python-urwidtrees))
8288
8289 (define-public python-ua-parser
8290 (package
8291 (name "python-ua-parser")
8292 (version "0.8.0")
8293 (source
8294 (origin
8295 (method url-fetch)
8296 (uri (pypi-uri "ua-parser" version))
8297 (sha256
8298 (base32
8299 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8300 (build-system python-build-system)
8301 (arguments
8302 `(#:tests? #f)) ;no test suite in release
8303 (native-inputs
8304 `(("python-pyyaml" ,python-pyyaml)))
8305 (home-page "https://github.com/ua-parser/uap-python")
8306 (synopsis "User agent parser")
8307 (description
8308 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8309 (license license:asl2.0)))
8310
8311 (define-public python2-ua-parser
8312 (package-with-python2 python-ua-parser))
8313
8314 (define-public python-user-agents
8315 (package
8316 (name "python-user-agents")
8317 (version "1.1.0")
8318 (source
8319 (origin
8320 (method url-fetch)
8321 (uri (pypi-uri "user-agents" version))
8322 (sha256
8323 (base32
8324 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8325 (build-system python-build-system)
8326 (arguments
8327 `(#:tests? #f)) ;missing devices.json test file in release
8328 (propagated-inputs
8329 `(("python-ua-parser" ,python-ua-parser)))
8330 (home-page "https://github.com/selwin/python-user-agents")
8331 (synopsis "User Agent strings parsing library")
8332 (description
8333 "A library to identify devices (phones, tablets) and their capabilities by
8334 parsing (browser/HTTP) user agent strings.")
8335 (license license:expat)))
8336
8337 (define-public python2-user-agents
8338 (package-with-python2 python-user-agents))
8339
8340 (define-public python-dbus
8341 (package
8342 (name "python-dbus")
8343 (version "1.2.16")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8348 "dbus-python-" version ".tar.gz"))
8349 (sha256
8350 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8351 (build-system gnu-build-system)
8352 (native-inputs
8353 `(("pkg-config" ,pkg-config)))
8354 (inputs
8355 `(("python" ,python-wrapper)
8356 ("dbus-glib" ,dbus-glib)))
8357 (synopsis "Python bindings for D-bus")
8358 (description "python-dbus provides bindings for libdbus, the reference
8359 implementation of D-Bus.")
8360 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8361 (license license:expat)))
8362
8363 (define-public python2-dbus
8364 (package/inherit python-dbus
8365 (name "python2-dbus")
8366 (inputs `(("python" ,python-2)
8367 ,@(alist-delete "python"
8368 (package-inputs python-dbus)
8369 equal?)))))
8370
8371 (define-public python-notify2
8372 (package
8373 (name "python-notify2")
8374 (version "0.3.1")
8375 (source
8376 (origin
8377 (method url-fetch)
8378 (uri (pypi-uri "notify2" version))
8379 (sha256
8380 (base32
8381 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8382 (build-system python-build-system)
8383 (arguments `(#:tests? #f)) ; tests depend on system state
8384 (native-inputs
8385 `(("python-dbus" ,python-dbus)))
8386 (home-page "https://bitbucket.org/takluyver/pynotify2")
8387 (synopsis "Python interface to D-Bus notifications")
8388 (description
8389 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8390 It is a reimplementation of pynotify in pure Python, and an alternative to
8391 the GObject Introspection bindings to libnotify for non-GTK applications.")
8392 (license (list license:bsd-2
8393 license:lgpl2.1+))))
8394
8395 (define-public python2-notify2
8396 (package-with-python2 python-notify2))
8397
8398 ;; beautifulsoup4 has a totally different namespace than 3.x,
8399 ;; and pypi seems to put it under its own name, so I guess we should too
8400 (define-public python-beautifulsoup4
8401 (package
8402 (name "python-beautifulsoup4")
8403 (version "4.9.3")
8404 (source
8405 (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "beautifulsoup4" version))
8408 (sha256
8409 (base32
8410 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8411 (build-system python-build-system)
8412 (arguments
8413 `(#:phases
8414 (modify-phases %standard-phases
8415 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8416 ;; must use this conversion script when building with Python 3. The
8417 ;; conversion script also runs the tests.
8418 ;; For more information, see the file 'convert-py3k' in the source
8419 ;; distribution.
8420 (replace 'check
8421 (lambda _ (invoke "./convert-py3k"))))))
8422 (propagated-inputs
8423 `(("python-soupsieve" ,python-soupsieve)))
8424 (home-page
8425 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8426 (synopsis
8427 "Python screen-scraping library")
8428 (description
8429 "Beautiful Soup is a Python library designed for rapidly setting up
8430 screen-scraping projects. It offers Pythonic idioms for navigating,
8431 searching, and modifying a parse tree, providing a toolkit for
8432 dissecting a document and extracting what you need. It automatically
8433 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8434 (license license:expat)
8435 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8436
8437 (define-public python2-beautifulsoup4
8438 (let ((base (package-with-python2
8439 (strip-python2-variant python-beautifulsoup4))))
8440 (package/inherit base
8441 (arguments `(#:python ,python-2)))))
8442
8443 (define-public python-soupsieve
8444 (package
8445 (name "python-soupsieve")
8446 (version "2.2.1")
8447 (source
8448 (origin
8449 (method url-fetch)
8450 (uri (pypi-uri "soupsieve" version))
8451 (sha256
8452 (base32
8453 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8454 (build-system python-build-system)
8455 (arguments `(#:tests? #f))
8456 ;;XXX: 2 tests fail currently despite claming they were to be
8457 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8458 ;;don't want to create a circular dependency.
8459 (home-page "https://github.com/facelessuser/soupsieve")
8460 (synopsis "CSS selector library")
8461 (description
8462 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8463 Soup 4. It aims to provide selecting, matching, and filtering using modern
8464 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8465 specifications up through the latest CSS level 4 drafts and beyond (though
8466 some are not yet implemented).")
8467 (properties `((python2-variant . ,(delay python2-soupsieve))))
8468 (license license:expat)))
8469
8470 ;; This is the last version that supports python-2
8471 (define-public python2-soupsieve
8472 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8473 (package
8474 (inherit base)
8475 (version "1.9.6")
8476 (source
8477 (origin
8478 (method url-fetch)
8479 (uri (pypi-uri "soupsieve" version))
8480 (sha256
8481 (base32
8482 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8483 (propagated-inputs
8484 `(("python2-backports-functools-lru-cache"
8485 ,python2-backports-functools-lru-cache)
8486 ,@(package-propagated-inputs base))))))
8487
8488 (define-public python-netifaces
8489 (package
8490 (name "python-netifaces")
8491 (version "0.10.9")
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "netifaces" version))
8496 (sha256
8497 (base32
8498 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8499 (build-system python-build-system)
8500 (home-page "https://github.com/al45tair/netifaces")
8501 (synopsis
8502 "Python module for portable network interface information")
8503 (description
8504 "Netifaces is a Python module providing information on network
8505 interfaces in an easy and portable manner.")
8506 (license license:expat)))
8507
8508 (define-public python2-netifaces
8509 (package-with-python2 python-netifaces))
8510
8511 (define-public python-networkx
8512 (package
8513 (name "python-networkx")
8514 (version "2.5.1")
8515 (source
8516 (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "networkx" version))
8519 (sha256
8520 (base32 "0ni3pdisdr8vfp5m9sw8jzr7jwzgqqmc9hq327vrf4n4ra2xb70h"))))
8521 (build-system python-build-system)
8522 (arguments
8523 '(#:phases (modify-phases %standard-phases
8524 (replace 'check
8525 (lambda* (#:key tests? #:allow-other-keys)
8526 (if tests?
8527 (invoke "pytest" "-vv" "--pyargs" "networkx")
8528 (format #t "test suite not run~%"))
8529 #t)))))
8530 ;; python-decorator is needed at runtime.
8531 (propagated-inputs
8532 `(("python-decorator" ,python-decorator)))
8533 (native-inputs
8534 `(("python-pytest" ,python-pytest)))
8535 (home-page "https://networkx.github.io/")
8536 (synopsis "Python module for creating and manipulating graphs and networks")
8537 (description
8538 "NetworkX is a Python package for the creation, manipulation, and study
8539 of the structure, dynamics, and functions of complex networks.")
8540 (properties `((python2-variant . ,(delay python2-networkx))))
8541 (license license:bsd-3)))
8542
8543 ;; NetworkX 2.2 is the last version with support for Python 2.
8544 (define-public python2-networkx
8545 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8546 (package
8547 (inherit base)
8548 (version "2.2")
8549 (source (origin
8550 (method url-fetch)
8551 (uri (pypi-uri "networkx" version ".zip"))
8552 (sha256
8553 (base32
8554 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8555 (arguments
8556 `(#:python ,python-2))
8557 (native-inputs
8558 `(("python-nose" ,python2-nose)
8559 ("unzip" ,unzip))))))
8560
8561 (define-public python-datrie
8562 (package
8563 (name "python-datrie")
8564 (version "0.8.2")
8565 (source
8566 (origin
8567 (method url-fetch)
8568 (uri (pypi-uri "datrie" version))
8569 (sha256
8570 (base32
8571 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8572 (build-system python-build-system)
8573 (native-inputs
8574 `(("python-cython" ,python-cython)
8575 ("python-hypothesis" ,python-hypothesis)
8576 ("python-pytest" ,python-pytest)
8577 ("python-pytest-runner" ,python-pytest-runner)))
8578 (home-page "https://github.com/kmike/datrie")
8579 (synopsis "Fast, efficiently stored trie for Python")
8580 (description
8581 "This package provides a fast, efficiently stored trie implementation for
8582 Python.")
8583 (license license:lgpl2.1+)))
8584
8585 (define-public python-amply
8586 (package
8587 (name "python-amply")
8588 (version "0.1.4")
8589 (source
8590 (origin
8591 (method url-fetch)
8592 (uri (pypi-uri "amply" version))
8593 (sha256
8594 (base32
8595 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8596 (build-system python-build-system)
8597 (propagated-inputs
8598 `(("python-docutils" ,python-docutils)
8599 ("python-pyparsing" ,python-pyparsing)))
8600 (native-inputs
8601 `(("python-setuptools-scm" ,python-setuptools-scm)))
8602 (home-page "https://github.com/willu47/amply")
8603 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8604 (description
8605 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8606 structures.")
8607 (license license:epl1.0)))
8608
8609 (define-public python-pulp
8610 (package
8611 (name "python-pulp")
8612 (version "2.4")
8613 (source
8614 (origin
8615 (method url-fetch)
8616 (uri (pypi-uri "PuLP" version))
8617 (sha256
8618 (base32
8619 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8620 (build-system python-build-system)
8621 (propagated-inputs
8622 `(("python-amply" ,python-amply)))
8623 (home-page "https://github.com/coin-or/pulp")
8624 (synopsis "Linear Programming modeler")
8625 (description
8626 "PuLP is a Linear Programming modeler written in Python. PuLP can
8627 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8628 solve linear problems.")
8629 (license license:expat)))
8630
8631 (define-public python-toposort
8632 (package
8633 (name "python-toposort")
8634 (version "1.6")
8635 (source
8636 (origin
8637 (method url-fetch)
8638 (uri (pypi-uri "toposort" version))
8639 (sha256
8640 (base32
8641 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8642 (build-system python-build-system)
8643 (home-page "https://gitlab.com/ericvsmith/toposort")
8644 (synopsis "Topological sort algorithm")
8645 (description
8646 "This package provides an implementation of a topological sort
8647 algorithm.")
8648 (license license:asl2.0)))
8649
8650 (define-public python-three-merge
8651 (package
8652 (name "python-three-merge")
8653 (version "0.1.1")
8654 (source
8655 (origin
8656 ;; There are no tests in the PyPI tarball.
8657 (method git-fetch)
8658 (uri (git-reference
8659 (url "https://github.com/spyder-ide/three-merge")
8660 (commit (string-append "v" version))))
8661 (file-name (git-file-name name version))
8662 (sha256
8663 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
8664 (build-system python-build-system)
8665 (arguments
8666 `(#:test-target "pytest"))
8667 (propagated-inputs
8668 `(("python-diff-match-patch" ,python-diff-match-patch)))
8669 (native-inputs
8670 `(("python-flaky" ,python-flaky)
8671 ("python-pytest" ,python-pytest)
8672 ("python-pytest-cov" ,python-pytest-cov)
8673 ("python-pytest-runner" ,python-pytest-runner)
8674 ("python-pytest-timeout" ,python-pytest-timeout)))
8675 (home-page "https://github.com/spyder-ide/three-merge")
8676 (synopsis "Library for merging two strings with respect to a base one")
8677 (description
8678 "This package provides a Python library to perform a 3-way merge between
8679 strings, based on @code{diff-match-patch}. This library performs merges at a
8680 character level, as opposed to most VCS systems, which opt for a line-based
8681 approach.")
8682 (license license:expat)))
8683
8684 (define-public snakemake
8685 (package
8686 (name "snakemake")
8687 (version "5.32.2")
8688 (source
8689 (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "snakemake" version))
8692 (sha256
8693 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8694 (build-system python-build-system)
8695 (arguments
8696 ;; TODO: Package missing test dependencies.
8697 '(#:tests? #f
8698 #:phases
8699 (modify-phases %standard-phases
8700 ;; For cluster execution Snakemake will call Python. Since there is
8701 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8702 ;; this by calling the snakemake wrapper instead.
8703 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8704 (lambda* (#:key outputs #:allow-other-keys)
8705 (substitute* "snakemake/executors/__init__.py"
8706 (("\\{sys.executable\\} -m snakemake")
8707 (string-append (assoc-ref outputs "out")
8708 "/bin/snakemake")))
8709 #t)))))
8710 (propagated-inputs
8711 `(("python-appdirs" ,python-appdirs)
8712 ("python-configargparse" ,python-configargparse)
8713 ("python-datrie" ,python-datrie)
8714 ("python-docutils" ,python-docutils)
8715 ("python-gitpython" ,python-gitpython)
8716 ("python-jinja2" ,python-jinja2)
8717 ("python-jsonschema" ,python-jsonschema)
8718 ("python-nbformat" ,python-nbformat)
8719 ("python-networkx" ,python-networkx)
8720 ("python-psutil" ,python-psutil)
8721 ("python-pulp" ,python-pulp)
8722 ("python-pyyaml" ,python-pyyaml)
8723 ("python-ratelimiter" ,python-ratelimiter)
8724 ("python-requests" ,python-requests)
8725 ("python-toposort" ,python-toposort)
8726 ("python-wrapt" ,python-wrapt)))
8727 (home-page "https://snakemake.readthedocs.io")
8728 (synopsis "Python-based execution environment for make-like workflows")
8729 (description
8730 "Snakemake aims to reduce the complexity of creating workflows by
8731 providing a clean and modern domain specific specification language (DSL) in
8732 Python style, together with a fast and comfortable execution environment.")
8733 (license license:expat)))
8734
8735 (define-public python-pyqrcode
8736 (package
8737 (name "python-pyqrcode")
8738 (version "1.2.1")
8739 (source
8740 (origin
8741 (method url-fetch)
8742 (uri (pypi-uri "PyQRCode" version))
8743 (sha256
8744 (base32
8745 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8746 (build-system python-build-system)
8747 (home-page
8748 "https://github.com/mnooner256/pyqrcode")
8749 (synopsis "QR code generator")
8750 (description
8751 "Pyqrcode is a QR code generator written purely in Python with
8752 SVG, EPS, PNG and terminal output.")
8753 (license license:bsd-3)))
8754
8755 (define-public python-seaborn
8756 (package
8757 (name "python-seaborn")
8758 (version "0.10.0")
8759 (source
8760 (origin
8761 (method url-fetch)
8762 (uri (pypi-uri "seaborn" version))
8763 (sha256
8764 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8765 (build-system python-build-system)
8766 (arguments
8767 `(#:phases
8768 (modify-phases %standard-phases
8769 (add-before 'check 'start-xserver
8770 (lambda* (#:key inputs #:allow-other-keys)
8771 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8772 ;; There must be a running X server and make check doesn't
8773 ;; start one. Therefore we must do it.
8774 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8775 (setenv "DISPLAY" ":1")
8776 #t)))
8777 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8778 (propagated-inputs
8779 `(("python-pandas" ,python-pandas)
8780 ("python-matplotlib" ,python-matplotlib)
8781 ("python-numpy" ,python-numpy)
8782 ("python-scipy" ,python-scipy)))
8783 (native-inputs
8784 `(("python-pytest" ,python-pytest)
8785 ("xorg-server" ,xorg-server-for-tests)))
8786 (home-page "https://seaborn.pydata.org/")
8787 (synopsis "Statistical data visualization")
8788 (description
8789 "Seaborn is a library for making attractive and informative statistical
8790 graphics in Python. It is built on top of matplotlib and tightly integrated
8791 with the PyData stack, including support for numpy and pandas data structures
8792 and statistical routines from scipy and statsmodels.")
8793 (properties `((python2-variant . ,(delay python2-seaborn))))
8794 (license license:bsd-3)))
8795
8796 ;; 0.9.1 is the last release with support for Python 2.
8797 (define-public python2-seaborn
8798 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8799 (package
8800 (inherit base)
8801 (version "0.9.1")
8802 (source (origin
8803 (method url-fetch)
8804 (uri (pypi-uri "seaborn" version))
8805 (sha256
8806 (base32
8807 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8808
8809 (define-public python-mpmath
8810 (package
8811 (name "python-mpmath")
8812 (version "1.1.0")
8813 (source (origin
8814 (method url-fetch)
8815 (uri (pypi-uri "mpmath" version))
8816 (file-name (git-file-name name version))
8817 (sha256
8818 (base32
8819 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8820 (build-system python-build-system)
8821 (native-inputs
8822 `(("python-pytest" ,python-pytest)))
8823 (arguments
8824 '(#:phases
8825 (modify-phases %standard-phases
8826 (replace 'check
8827 (lambda _
8828 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8829 (home-page "https://mpmath.org")
8830 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8831 (description
8832 "@code{mpmath} can be used as an arbitrary-precision substitute for
8833 Python's float/complex types and math/cmath modules, but also does much
8834 more advanced mathematics.")
8835 (license license:bsd-3)))
8836
8837 (define-public python2-mpmath
8838 (package-with-python2 python-mpmath))
8839
8840 (define-public python-bigfloat
8841 (package
8842 (name "python-bigfloat")
8843 (version "0.3.0")
8844 (source
8845 (origin
8846 (method url-fetch)
8847 (uri (pypi-uri "bigfloat" version))
8848 (sha256
8849 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8850 (build-system python-build-system)
8851 (inputs
8852 `(("mpfr" ,mpfr)))
8853 (home-page "https://github.com/mdickinson/bigfloat")
8854 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8855 (description
8856 "This package provides a Python interface to the MPFR library for
8857 multiprecision arithmetic.")
8858 (license license:lgpl3+)))
8859
8860 (define-public python-sympy
8861 (package
8862 (name "python-sympy")
8863 (version "1.7.1")
8864 (source
8865 (origin
8866 (method url-fetch)
8867 (uri (pypi-uri "sympy" version))
8868 (sha256
8869 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8870 (build-system python-build-system)
8871 (arguments
8872 `(#:phases
8873 (modify-phases %standard-phases
8874 (replace 'check
8875 (lambda* (#:key outputs #:allow-other-keys)
8876 (invoke
8877 (or (which "python3") (which "python"))
8878 "-c" "import sympy; sympy.test(\"/core\")"))))))
8879 (propagated-inputs
8880 `(("python-mpmath" ,python-mpmath)))
8881 (home-page "https://www.sympy.org/")
8882 (synopsis "Python library for symbolic mathematics")
8883 (description
8884 "SymPy is a Python library for symbolic mathematics. It aims to become a
8885 full-featured computer algebra system (CAS) while keeping the code as simple
8886 as possible in order to be comprehensible and easily extensible.")
8887 (license license:bsd-3)))
8888
8889 (define-public python2-sympy
8890 (package
8891 (inherit (package-with-python2 python-sympy))
8892 (version "1.5.1") ; last release for python2
8893 (source
8894 (origin
8895 (method url-fetch)
8896 (uri (pypi-uri "sympy" version))
8897 (sha256
8898 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8899
8900 (define-public python-q
8901 (package
8902 (name "python-q")
8903 (version "2.6")
8904 (source
8905 (origin
8906 (method url-fetch)
8907 (uri (pypi-uri "q" version))
8908 (sha256
8909 (base32
8910 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8911 (build-system python-build-system)
8912 (home-page "https://github.com/zestyping/q")
8913 (synopsis "Quick-and-dirty debugging output for tired programmers")
8914 (description
8915 "q is a Python module for \"print\" style of debugging Python code. It
8916 provides convenient short API for print out of values, tracebacks, and
8917 falling into the Python interpreter.")
8918 (license license:asl2.0)))
8919
8920 (define-public python2-q
8921 (package-with-python2 python-q))
8922
8923 (define-public python-xlib
8924 (package
8925 (name "python-xlib")
8926 (version "0.29")
8927 (source
8928 (origin
8929 (method git-fetch)
8930 (uri (git-reference
8931 (url "https://github.com/python-xlib/python-xlib")
8932 (commit version)))
8933 (file-name (git-file-name name version))
8934 (sha256
8935 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8936 (build-system python-build-system)
8937 (arguments
8938 `(#:phases
8939 (modify-phases %standard-phases
8940 (add-before 'check 'start-xserver
8941 (lambda* (#:key inputs #:allow-other-keys)
8942 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8943 ;; There must be a running X server and make check doesn't
8944 ;; start one. Therefore we must do it.
8945 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8946 (setenv "DISPLAY" ":1")
8947 #t))))))
8948 (native-inputs
8949 `(("python-mock" ,python-mock)
8950 ("python-setuptools-scm" ,python-setuptools-scm)
8951 ("xorg-server" ,xorg-server)))
8952 (propagated-inputs
8953 `(("python-six" ,python-six)))
8954 (home-page "https://github.com/python-xlib/python-xlib")
8955 (synopsis "Python X11 client library")
8956 (description
8957 "The Python X Library is intended to be a fully functional
8958 X client library for Python programs. It is useful to implement
8959 low-level X clients. It is written entirely in Python.")
8960 (license license:gpl2+)))
8961
8962 (define-public python2-xlib
8963 (package-with-python2 python-xlib))
8964
8965 (define-public python-singledispatch
8966 (package
8967 (name "python-singledispatch")
8968 (version "3.4.0.3")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "singledispatch" version))
8973 (sha256
8974 (base32
8975 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8976 (build-system python-build-system)
8977 (native-inputs
8978 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8979 (home-page
8980 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8981 (synopsis "Backport of singledispatch feature from Python 3.4")
8982 (description
8983 "This library brings functools.singledispatch from Python 3.4 to Python
8984 2.6-3.3.")
8985 (license license:expat)))
8986
8987 (define-public python2-singledispatch
8988 (package-with-python2 python-singledispatch))
8989
8990 ;; the python- version can be removed with python-3.5
8991 (define-public python-backports-abc
8992 (package
8993 (name "python-backports-abc")
8994 (version "0.5")
8995 (source
8996 (origin
8997 (method url-fetch)
8998 (uri (pypi-uri "backports_abc" version))
8999 (sha256
9000 (base32
9001 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9002 (build-system python-build-system)
9003 (home-page "https://github.com/cython/backports_abc")
9004 (synopsis "Backport of additions to the 'collections.abc' module")
9005 (description
9006 "Python-backports-abc provides a backport of additions to the
9007 @code{collections.abc} module in Python-3.5.")
9008 (license license:psfl)))
9009
9010 (define-public python2-backports-abc
9011 (package-with-python2 python-backports-abc))
9012
9013 (define-public python-backports-csv
9014 (package
9015 (name "python-backports-csv")
9016 (version "1.0.7")
9017 (source
9018 (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "backports.csv" version))
9021 (sha256
9022 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9023 (build-system python-build-system)
9024 (home-page "https://github.com/ryanhiebert/backports.csv")
9025 (synopsis "Backport of Python 3's csv module for Python 2")
9026 (description
9027 "Provides a backport of Python 3's @code{csv} module for parsing
9028 comma separated values. The API of the @code{csv} module in Python 2
9029 is drastically different from the @code{csv} module in Python 3.
9030 This is due, for the most part, to the difference between str in
9031 Python 2 and Python 3.")
9032 (license license:psfl)))
9033
9034 (define-public python2-backports-csv
9035 (package-with-python2 python-backports-csv))
9036
9037 (define-public python2-backports-shutil-get-terminal-size
9038 (package
9039 (name "python2-backports-shutil-get-terminal-size")
9040 (version "1.0.0")
9041 (source
9042 (origin
9043 (method url-fetch)
9044 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9045 (sha256
9046 (base32
9047 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9048 (build-system python-build-system)
9049 (arguments
9050 `(#:python ,python-2
9051 #:phases
9052 (modify-phases %standard-phases
9053 (replace 'check
9054 (lambda _
9055 (setenv "PYTHONPATH" (string-append "./build/lib:"
9056 (getenv "PYTHONPATH")))
9057 (invoke "py.test" "-v"))))))
9058 (native-inputs
9059 `(("python2-pytest" ,python2-pytest)))
9060 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9061 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9062 (description
9063 "This package provides a backport of the @code{get_terminal_size
9064 function} from Python 3.3's @code{shutil}.
9065 Unlike the original version it is written in pure Python rather than C,
9066 so it might be a tiny bit slower.")
9067 (license license:expat)))
9068
9069 (define-public python-waf
9070 (package
9071 (name "python-waf")
9072 (version "2.0.19")
9073 (source (origin
9074 (method url-fetch)
9075 (uri (string-append "https://waf.io/"
9076 "waf-" version ".tar.bz2"))
9077 (sha256
9078 (base32
9079 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9080 (build-system python-build-system)
9081 (arguments
9082 '(#:phases
9083 (modify-phases %standard-phases
9084 (replace 'build
9085 (lambda _
9086 ;; XXX: Find a way to add all extra tools.
9087 (let ((tools '("gccdeps"
9088 "clang_compilation_database")))
9089 (invoke "python" "waf-light" "configure" "build"
9090 (string-append "--tools="
9091 (string-join tools ","))))))
9092 (replace 'check
9093 (lambda _
9094 (invoke "python" "waf" "--version")))
9095 (replace 'install
9096 (lambda* (#:key outputs #:allow-other-keys)
9097 (let ((out (assoc-ref outputs "out")))
9098 (install-file "waf" (string-append out "/bin")))
9099 #t))
9100 ;; waf breaks when it is wrapped.
9101 (delete 'wrap))))
9102 (home-page "https://waf.io/")
9103 (synopsis "Python-based build system")
9104 (description
9105 "Waf is a Python-based framework for configuring, compiling and installing
9106 applications.")
9107 (license license:bsd-3)))
9108
9109 (define-public python2-waf
9110 (package-with-python2 python-waf))
9111
9112 (define-public python-pyzmq
9113 (package
9114 (name "python-pyzmq")
9115 (version "22.1.0")
9116 (source
9117 (origin
9118 (method url-fetch)
9119 (uri (pypi-uri "pyzmq" version))
9120 (sha256
9121 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9122 (build-system python-build-system)
9123 (arguments
9124 `(#:configure-flags
9125 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9126 #:phases
9127 (modify-phases %standard-phases
9128 (add-before 'check 'build-extensions
9129 (lambda _
9130 ;; Cython extensions have to be built before running the tests.
9131 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9132 (inputs
9133 `(("zeromq" ,zeromq)))
9134 (native-inputs
9135 `(("pkg-config" ,pkg-config)
9136 ("python-cython" ,python-cython)
9137 ("python-pytest" ,python-pytest)))
9138 (home-page "https://github.com/zeromq/pyzmq")
9139 (synopsis "Python bindings for 0MQ")
9140 (description
9141 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9142 (license license:bsd-4)))
9143
9144 (define-public python2-pyzmq
9145 (package-with-python2 python-pyzmq))
9146
9147 (define-public python-pep8
9148 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9149 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9150 ;; some dependents' test suites, and nothing more.
9151 (package
9152 (name "python-pep8")
9153 (version "1.7.0")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (pypi-uri "pep8" version))
9158 (sha256
9159 (base32
9160 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9161 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9162 (build-system python-build-system)
9163 (home-page "https://pep8.readthedocs.org/")
9164 (synopsis "Python style guide checker")
9165 (description
9166 "This tools checks Python code against some of the style conventions in
9167 PEP 8.")
9168 (license license:expat)))
9169
9170 (define-public python2-pep8
9171 (package-with-python2 python-pep8))
9172
9173 (define-public python-pep517
9174 (package
9175 (inherit python-pep517-bootstrap)
9176 (name "python-pep517")
9177 (arguments
9178 '(#:phases
9179 (modify-phases %standard-phases
9180 (replace 'check
9181 (lambda* (#:key tests? #:allow-other-keys)
9182 (delete-file "pytest.ini")
9183 ;; This test tries to connect to the internet
9184 (delete-file "tests/test_meta.py")
9185 (if tests?
9186 (invoke "pytest")
9187 #t))))))
9188 (native-inputs
9189 `(("python-mock" ,python-mock)
9190 ("python-pytest" ,python-pytest)
9191 ("python-testpath" ,python-testpath)))
9192 (properties `((python2-variant . ,(delay python2-pep517))))))
9193
9194 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9195 (define-public python2-pep517
9196 (let ((base (package-with-python2
9197 (strip-python2-variant python-pep517))))
9198 (package/inherit base
9199 (name "python2-pep517")
9200 (arguments
9201 `(#:tests? #f
9202 ,@(package-arguments base)))
9203 (native-inputs `()))))
9204
9205 (define-public python-pyflakes
9206 (package
9207 (name "python-pyflakes")
9208 (version "2.3.1")
9209 (source
9210 (origin
9211 (method url-fetch)
9212 (uri (pypi-uri "pyflakes" version))
9213 (sha256
9214 (base32
9215 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9216 (build-system python-build-system)
9217 (home-page
9218 "https://github.com/pyflakes/pyflakes")
9219 (synopsis "Passive checker of Python programs")
9220 (description
9221 "Pyflakes statically checks Python source code for common errors.")
9222 (license license:expat)))
9223
9224 (define-public python2-pyflakes
9225 (package-with-python2 python-pyflakes))
9226
9227 (define-public python-pyflakes-2.2
9228 (package
9229 (inherit python-pyflakes)
9230 (version "2.2.0")
9231 (source (origin
9232 (method url-fetch)
9233 (uri (pypi-uri "pyflakes" version))
9234 (sha256
9235 (base32
9236 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9237
9238 (define-public python-mccabe
9239 (package
9240 (name "python-mccabe")
9241 (version "0.6.1")
9242 (source
9243 (origin
9244 (method url-fetch)
9245 (uri (pypi-uri "mccabe" version))
9246 (sha256
9247 (base32
9248 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9249 (build-system python-build-system)
9250 (native-inputs
9251 `(("python-pytest" ,python-pytest-bootstrap)
9252 ("python-pytest-runner" ,python-pytest-runner)))
9253 (home-page "https://github.com/flintwork/mccabe")
9254 (synopsis "McCabe checker, plugin for flake8")
9255 (description
9256 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
9257 complexity of Python source code.")
9258 (license license:expat)))
9259
9260 (define-public python2-mccabe
9261 (package-with-python2 python-mccabe))
9262
9263 (define-public python-flake8
9264 (package
9265 (name "python-flake8")
9266 (version "3.9.1")
9267 (source (origin
9268 (method url-fetch)
9269 (uri (pypi-uri "flake8" version))
9270 (sha256
9271 (base32
9272 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9273 (build-system python-build-system)
9274 (arguments
9275 `(#:phases
9276 (modify-phases %standard-phases
9277 (replace 'check
9278 (lambda* (#:key inputs outputs #:allow-other-keys)
9279 (add-installed-pythonpath inputs outputs)
9280 (invoke "pytest" "-v"))))))
9281 (propagated-inputs
9282 `(("python-pycodestyle" ,python-pycodestyle)
9283 ("python-entrypoints" ,python-entrypoints)
9284 ("python-pyflakes" ,python-pyflakes)
9285 ("python-mccabe" ,python-mccabe)))
9286 (native-inputs
9287 `(("python-mock" ,python-mock)
9288 ("python-pytest" ,python-pytest)))
9289 (home-page "https://gitlab.com/pycqa/flake8")
9290 (synopsis
9291 "The modular source code checker: pep8, pyflakes and co")
9292 (description
9293 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9294 (properties `((python2-variant . ,(delay python2-flake8))))
9295 (license license:expat)))
9296
9297 (define-public python2-flake8
9298 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9299 (package/inherit base
9300 (propagated-inputs
9301 `(("python2-configparser" ,python2-configparser)
9302 ("python2-enum34" ,python2-enum34)
9303 ("python2-functools32" ,python2-functools32)
9304 ("python2-typing" ,python2-typing)
9305 ,@(package-propagated-inputs base))))))
9306
9307 (define-public python-flake8-3.8
9308 (package
9309 (inherit python-flake8)
9310 (version "3.8.4")
9311 (source (origin
9312 (method url-fetch)
9313 (uri (pypi-uri "flake8" version))
9314 (sha256
9315 (base32
9316 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9317 (propagated-inputs
9318 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9319 ("python-entrypoints" ,python-entrypoints)
9320 ("python-pyflakes" ,python-pyflakes-2.2)
9321 ("python-mccabe" ,python-mccabe)))))
9322
9323 (define-public python-flake8-bugbear
9324 (package
9325 (name "python-flake8-bugbear")
9326 (version "20.1.4")
9327 (source
9328 (origin
9329 (method url-fetch)
9330 (uri (pypi-uri "flake8-bugbear" version))
9331 (sha256
9332 (base32
9333 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9334 (build-system python-build-system)
9335 (arguments
9336 '(#:phases
9337 (modify-phases %standard-phases
9338 (add-before 'check 'disable-test
9339 (lambda _
9340 ;; This test fails on slow computers.
9341 (substitute* "tests/test_bugbear.py"
9342 (("def test_does_not_crash_on_any_valid_code")
9343 "def _test_does_not_crash_on_any_valid_code")))))))
9344 (native-inputs
9345 `(("python-hypothesis" ,python-hypothesis)
9346 ("python-hypothesmith" ,python-hypothesmith)))
9347 (propagated-inputs
9348 `(("python-attrs" ,python-attrs)
9349 ("python-flake8" ,python-flake8)))
9350 (home-page "https://github.com/PyCQA/flake8-bugbear")
9351 (synopsis
9352 "Flake8 plugin for finding likely bugs and design problems in your program")
9353 (description
9354 "This package contains a plugin for Flake8 finding likely bugs and
9355 design problems in your program. It contains warnings that don't belong
9356 in pyflakes and pycodestyle.")
9357 (license license:expat)))
9358
9359 (define-public python-flake8-continuation
9360 (package
9361 (name "python-flake8-continuation")
9362 (version "1.0.5")
9363 (source
9364 (origin
9365 (method url-fetch)
9366 (uri (pypi-uri "flake8-continuation" version))
9367 (sha256
9368 (base32
9369 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9370 (build-system python-build-system)
9371 (propagated-inputs
9372 `(("python-flake8" ,python-flake8)
9373 ("python-pycodestyle" ,python-pycodestyle)
9374 ("python-six" ,python-six)))
9375 (home-page "https://github.com/planetlabs/flake8-continuation")
9376 (synopsis "Flake8 Line Continuation Plugin")
9377 (description "A Flake8 plugin that checks for the line continuation
9378 style to be in the preferred method according to PEP-8, specifically:
9379 @quotation
9380 The preferred way of wrapping long lines is by using Python's implied
9381 line continuation inside parentheses, brackets and braces. Long lines
9382 can be broken over multiple lines by wrapping expressions in parentheses.
9383 These should be used in preference to using a backslash for line continuation.
9384 @end quotation")
9385 (license license:asl2.0)))
9386
9387 (define-public python-flake8-implicit-str-concat
9388 (package
9389 (name "python-flake8-implicit-str-concat")
9390 (version "0.2.0")
9391 (source
9392 (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "flake8_implicit_str_concat" version))
9395 (sha256
9396 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9397 (build-system python-build-system)
9398 (propagated-inputs
9399 `(("python-attrs" ,python-attrs)
9400 ("python-more-itertools" ,python-more-itertools)))
9401 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9402 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9403 (description
9404 "This is a plugin for the Python code checking tool Flake8 to encourage
9405 correct string literal concatenation.
9406
9407 It looks for style problems like implicitly concatenated string literals on
9408 the same line (which can be introduced by the code formatting tool Black), or
9409 unnecessary plus operators for explicit string literal concatenation.")
9410 (license license:expat)))
9411
9412 (define-public python-flake8-polyfill
9413 (package
9414 (name "python-flake8-polyfill")
9415 (version "1.0.2")
9416 (source
9417 (origin
9418 (method url-fetch)
9419 (uri (pypi-uri "flake8-polyfill" version))
9420 (sha256
9421 (base32
9422 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9423 (build-system python-build-system)
9424 (arguments
9425 '(#:phases
9426 (modify-phases %standard-phases
9427 (replace 'check
9428 (lambda _
9429 ;; Be compatible with Pytest 4:
9430 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9431 (substitute* "setup.cfg"
9432 (("\\[pytest\\]")
9433 "[tool:pytest]"))
9434
9435 (setenv "PYTHONPATH"
9436 (string-append (getcwd) "/build/lib:"
9437 (getenv "PYTHONPATH")))
9438 (invoke "py.test" "-v"))))))
9439 (native-inputs
9440 `(("python-flake8" ,python-flake8)
9441 ("python-mock" ,python-mock)
9442 ("python-pep8" ,python-pep8)
9443 ("python-pycodestyle" ,python-pycodestyle)
9444 ("python-pytest" ,python-pytest)))
9445 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9446 (synopsis "Polyfill package for Flake8 plugins")
9447 (description
9448 "This package that provides some compatibility helpers for Flake8
9449 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
9450 (license license:expat)))
9451
9452 (define-public python2-flake8-polyfill
9453 (package-with-python2 python-flake8-polyfill))
9454
9455 (define-public python-flake8-print
9456 (package
9457 (name "python-flake8-print")
9458 (version "4.0.0")
9459 (source
9460 (origin
9461 (method url-fetch)
9462 (uri (pypi-uri "flake8-print" version))
9463 (sha256
9464 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
9465 (build-system python-build-system)
9466 (propagated-inputs
9467 `(("python-flake8" ,python-flake8)
9468 ("python-pycodestyle" ,python-pycodestyle)
9469 ("python-six" ,python-six)))
9470 (home-page "https://github.com/jbkahn/flake8-print")
9471 (synopsis "Print statement checker plugin for Flake8")
9472 (description
9473 "This plugin for Flake8 checks for @code{print} statements in Python
9474 files.")
9475 (license license:expat)))
9476
9477 (define-public python-flake8-pyi
9478 (package
9479 (name "python-flake8-pyi")
9480 (version "20.5.0")
9481 (source
9482 (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "flake8-pyi" version))
9485 (sha256
9486 (base32
9487 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
9488 (build-system python-build-system)
9489 (propagated-inputs
9490 `(("python-attrs" ,python-attrs)
9491 ("python-flake8" ,python-flake8)
9492 ("python-pyflakes" ,python-pyflakes)))
9493 (home-page "https://github.com/ambv/flake8-pyi")
9494 (synopsis
9495 "Flake8 plugin that provides specializations for type hinting stub files")
9496 (description
9497 "This package contains a plugin that provides specializations for
9498 type hinting stub files, especially interesting for linting typeshed. It
9499 adds the @file{.pyi} extension to the default value of the @code{--filename}
9500 command-line argument to Flake8. This means stubs are linted by default with
9501 this plugin enabled, without needing to explicitly list every file. It
9502 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9503 expressions after the entire file has been read. This enables support for
9504 first-class forward references that stub files use.")
9505 (license license:expat)))
9506
9507 (define-public python-flake8-pie
9508 (package
9509 (name "python-flake8-pie")
9510 (version "0.5.0")
9511 (source
9512 (origin
9513 (method url-fetch)
9514 (uri (pypi-uri "flake8-pie" version))
9515 (sha256
9516 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9517 (build-system python-build-system)
9518 (home-page "https://github.com/sbdchd/flake8-pie")
9519 (synopsis "Flake8 extension that implements lints")
9520 (description
9521 "This package provides a flake8 extension that implements miscellaneous
9522 lints.")
9523 (license license:bsd-2)))
9524
9525 (define-public python-flake8-quotes
9526 (package
9527 (name "python-flake8-quotes")
9528 (version "3.2.0")
9529 (source
9530 (origin
9531 (method url-fetch)
9532 (uri (pypi-uri "flake8-quotes" version))
9533 (sha256
9534 (base32
9535 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9536 (build-system python-build-system)
9537 (propagated-inputs
9538 `(("python-flake8" ,python-flake8)))
9539 (home-page "https://github.com/zheller/flake8-quotes/")
9540 (synopsis "Flake8 lint for quotes")
9541 (description "This package provides a Flake8 lint for quotes.")
9542 (license license:expat)))
9543
9544 (define-public python-autoflake
9545 (package
9546 (name "python-autoflake")
9547 (version "1.3.1")
9548 (source
9549 (origin
9550 (method url-fetch)
9551 (uri (pypi-uri "autoflake" version))
9552 (sha256
9553 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9554 (build-system python-build-system)
9555 (propagated-inputs
9556 `(("python-pyflakes" ,python-pyflakes)))
9557 (home-page "https://github.com/myint/autoflake")
9558 (synopsis "Removes unused imports and unused variables")
9559 (description
9560 "@code{autoflake} removes unused imports and unused variables from Python
9561 code as reported by @code{pyflakes}.
9562
9563 By default, it only removes unused imports for modules that are part of the
9564 standard library. Removal of unused variables is also disabled by default.
9565 It also removes useless @code{pass} statements.")
9566 (license license:expat)))
9567
9568 (define-public python-mistune
9569 (package
9570 (name "python-mistune")
9571 (version "0.8.4")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (pypi-uri "mistune" version))
9576 (sha256
9577 (base32
9578 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9579 (build-system python-build-system)
9580 (native-inputs
9581 `(("python-nose" ,python-nose)
9582 ("python-cython" ,python-cython)))
9583 (home-page "https://github.com/lepture/mistune")
9584 (synopsis "Markdown parser in pure Python")
9585 (description "This package provides a fast markdown parser in pure
9586 Python.")
9587 (license license:bsd-3)))
9588
9589 (define-public python2-mistune
9590 (package-with-python2 python-mistune))
9591
9592 (define-public python-markdown
9593 (package
9594 (name "python-markdown")
9595 (version "3.3.4")
9596 (source
9597 (origin
9598 (method url-fetch)
9599 (uri (pypi-uri "Markdown" version))
9600 (sha256
9601 (base32
9602 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9603 (build-system python-build-system)
9604 (native-inputs
9605 `(("python-nose" ,python-nose)
9606 ("python-pyyaml" ,python-pyyaml)))
9607 (home-page "https://python-markdown.github.io/")
9608 (synopsis "Python implementation of Markdown")
9609 (description
9610 "This package provides a Python implementation of John Gruber's
9611 Markdown. The library features international input, various Markdown
9612 extensions, and several HTML output formats. A command line wrapper
9613 markdown_py is also provided to convert Markdown files to HTML.")
9614 (properties `((python2-variant . ,(delay python2-markdown))))
9615 (license license:bsd-3)))
9616
9617 ;; Markdown 3.2 dropped support for Python 2.
9618 (define-public python2-markdown
9619 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9620 (package
9621 (inherit base)
9622 (version "3.1.1")
9623 (source (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "Markdown" version))
9626 (sha256
9627 (base32
9628 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9629
9630 (define-public python-ptyprocess
9631 (package
9632 (name "python-ptyprocess")
9633 (version "0.5.2")
9634 (source
9635 (origin
9636 (method url-fetch)
9637 (uri (pypi-uri "ptyprocess" version))
9638 (sha256
9639 (base32
9640 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9641 (build-system python-build-system)
9642 (native-inputs
9643 `(("python-nose" ,python-nose)))
9644 (arguments
9645 `(#:phases
9646 (modify-phases %standard-phases
9647 (replace 'check
9648 (lambda _ (invoke "nosetests"))))))
9649 (home-page "https://github.com/pexpect/ptyprocess")
9650 (synopsis "Run a subprocess in a pseudo terminal")
9651 (description
9652 "This package provides a Python library used to launch a subprocess in a
9653 pseudo terminal (pty), and interact with both the process and its pty.")
9654 (license license:isc)))
9655
9656 (define-public python2-ptyprocess
9657 (package-with-python2 python-ptyprocess))
9658
9659 (define-public python-cram
9660 (package
9661 (name "python-cram")
9662 (version "0.7")
9663 (home-page "https://bitheap.org/cram/")
9664 (source (origin
9665 (method url-fetch)
9666 (uri (list (string-append home-page "cram-"
9667 version ".tar.gz")
9668 (pypi-uri "cram" version)))
9669 (sha256
9670 (base32
9671 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9672 (arguments
9673 '(#:phases
9674 (modify-phases %standard-phases
9675 (add-after 'unpack 'patch-source
9676 (lambda _
9677 (substitute* (find-files "cram" ".*\\.py$")
9678 ;; Replace default shell path.
9679 (("/bin/sh") (which "sh")))
9680 (substitute* (find-files "tests" ".*\\.t$")
9681 (("md5") "md5sum")
9682 (("/bin/bash") (which "bash"))
9683 (("/bin/sh") (which "sh")))
9684 (substitute* "cram/_test.py"
9685 ;; This hack works around a bug triggered by substituting
9686 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9687 ;; "cram -h", which breaks the output at 80 characters. This
9688 ;; causes the line showing the default shell to break into two
9689 ;; lines, but the test expects a single line...
9690 (("env\\['COLUMNS'\\] = '80'")
9691 "env['COLUMNS'] = '160'"))
9692
9693 (substitute* "Makefile"
9694 ;; Recent versions of python-coverage have caused the test
9695 ;; coverage to decrease (as of version 0.7). Allow that.
9696 (("--fail-under=100")
9697 "--fail-under=90"))
9698
9699 #t))
9700 (replace 'check
9701 ;; The test phase uses the built library and executable.
9702 (lambda* (#:key inputs outputs #:allow-other-keys)
9703 (add-installed-pythonpath inputs outputs)
9704 (setenv "PATH" (string-append (getenv "PATH") ":"
9705 (assoc-ref outputs "out") "/bin"))
9706 (invoke "make" "test"))))))
9707 (build-system python-build-system)
9708 (native-inputs
9709 `(("python-coverage" ,python-coverage)
9710 ("which" ,which)))
9711 (synopsis "Simple testing framework for command line applications")
9712 (description
9713 "Cram is a functional testing framework for command line applications.
9714 Cram tests look like snippets of interactive shell sessions. Cram runs each
9715 command and compares the command output in the test with the command’s actual
9716 output.")
9717 (license license:gpl2+)))
9718
9719 (define-public python2-cram
9720 (package-with-python2 python-cram))
9721
9722 (define-public python-crashtest
9723 (package
9724 (name "python-crashtest")
9725 (version "0.3.1")
9726 (source
9727 (origin
9728 (method url-fetch)
9729 (uri (pypi-uri "crashtest" version))
9730 (sha256
9731 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9732 (build-system python-build-system)
9733 (home-page "https://github.com/sdispater/crashtest")
9734 (synopsis "Manage Python errors with ease")
9735 (description
9736 "Python library that makes exceptions handling and inspection easier.")
9737 (license license:expat)))
9738
9739 (define-public python-stdlib-list
9740 (package
9741 (name "python-stdlib-list")
9742 (version "0.8.0")
9743 (source (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "stdlib-list" version))
9746 (sha256
9747 (base32
9748 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
9749 (build-system python-build-system)
9750 (arguments
9751 `(#:tests? #f)) ; Tests require more dependencies.
9752 (native-inputs
9753 `(("python-sphinx" ,python-sphinx)))
9754 (home-page "https://github.com/jackmaney/python-stdlib-list")
9755 (synopsis "Python Standard Libraries")
9756 (description "This package contains a list of Python Standard Libraries.")
9757 (license license:expat)))
9758
9759 (define-public python-straight-plugin
9760 (package
9761 (name "python-straight-plugin")
9762 (version "1.4.1")
9763 (source
9764 (origin
9765 (method url-fetch)
9766 (uri (pypi-uri "straight.plugin" version))
9767 (sha256
9768 (base32
9769 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9770 (build-system python-build-system)
9771 (home-page "https://github.com/ironfroggy/straight.plugin")
9772 (synopsis "Simple namespaced plugin facility")
9773 (description "Straight Plugin provides a type of plugin you can create from
9774 almost any existing Python modules, and an easy way for outside developers to
9775 add functionality and customization to your projects with their own plugins.")
9776 (license license:expat)))
9777
9778 (define-public python2-straight-plugin
9779 (package-with-python2 python-straight-plugin))
9780
9781 (define-public python-fonttools
9782 (package
9783 (name "python-fonttools")
9784 (version "4.6.0")
9785 (source (origin
9786 (method url-fetch)
9787 (uri (pypi-uri "fonttools" version ".zip"))
9788 (sha256
9789 (base32
9790 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9791 (build-system python-build-system)
9792 (native-inputs
9793 `(("unzip" ,unzip)
9794 ("python-pytest" ,python-pytest)
9795 ("python-pytest-runner" ,python-pytest-runner)))
9796 (home-page "https://github.com/fonttools/fonttools")
9797 (synopsis "Tools to manipulate font files")
9798 (description
9799 "FontTools/TTX is a library to manipulate font files from Python. It
9800 supports reading and writing of TrueType/OpenType fonts, reading and writing
9801 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9802 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9803 from an XML-based format.")
9804 (license license:expat)))
9805
9806 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9807 (define-public python2-fonttools
9808 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9809 (package
9810 (inherit base)
9811 (version "3.44.0")
9812 (source (origin
9813 (method url-fetch)
9814 (uri (pypi-uri "fonttools" version ".zip"))
9815 (sha256
9816 (base32
9817 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9818
9819 (define-public python-ly
9820 (package
9821 (name "python-ly")
9822 (version "0.9.5")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (pypi-uri name version))
9827 (sha256
9828 (base32
9829 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9830 (build-system python-build-system)
9831 (arguments
9832 ;; FIXME: Some tests need network access.
9833 '(#:tests? #f))
9834 (synopsis "Tool and library for manipulating LilyPond files")
9835 (description "This package provides a Python library to parse, manipulate
9836 or create documents in LilyPond format. A command line program ly is also
9837 provided that can be used to do various manipulations with LilyPond files.")
9838 (home-page "https://pypi.org/project/python-ly/")
9839 (license license:gpl2+)))
9840
9841 (define-public python-appdirs
9842 (package
9843 (name "python-appdirs")
9844 (version "1.4.3")
9845 (source
9846 (origin
9847 (method url-fetch)
9848 (uri (pypi-uri "appdirs" version))
9849 (sha256
9850 (base32
9851 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9852 (build-system python-build-system)
9853 (home-page "https://github.com/ActiveState/appdirs")
9854 (synopsis
9855 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9856 (description
9857 "This module provides a portable way of finding out where user data
9858 should be stored on various operating systems.")
9859 (license license:expat)))
9860
9861 (define-public python2-appdirs
9862 (package-with-python2 python-appdirs))
9863
9864 (define-public python-gorilla
9865 (package
9866 (name "python-gorilla")
9867 (version "0.3.0")
9868 (source (origin
9869 (method url-fetch)
9870 (uri (pypi-uri "gorilla" version))
9871 (sha256
9872 (base32
9873 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9874 (build-system python-build-system)
9875 (home-page "https://github.com/christophercrouzet/gorilla")
9876 (synopsis "Convenient monkey patching with Python")
9877 (description
9878 "Gorilla is a Python library that provides a convenient approach to
9879 monkey patching. Monkey patching is the process of modifying module and
9880 class attributes at runtime with the purpose of replacing or extending
9881 third-party code.")
9882 (license license:expat)))
9883
9884 (define-public python-llfuse
9885 (package
9886 (name "python-llfuse")
9887 (version "1.3.8")
9888 (source (origin
9889 (method url-fetch)
9890 (uri (pypi-uri "llfuse" version))
9891 (sha256
9892 (base32
9893 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9894 (build-system python-build-system)
9895 (inputs
9896 `(("fuse" ,fuse)
9897 ("attr" ,attr)))
9898 (native-inputs
9899 `(("pkg-config" ,pkg-config)))
9900 (synopsis "Python bindings for FUSE")
9901 (description
9902 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9903 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9904 (license license:lgpl2.0+)
9905 (properties `((python2-variant . ,(delay python2-llfuse))))))
9906
9907 (define-public python2-llfuse
9908 (let ((base (package-with-python2
9909 (strip-python2-variant python-llfuse))))
9910 (package/inherit base
9911 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9912
9913 (define-public python-msgpack
9914 (package
9915 (name "python-msgpack")
9916 (version "1.0.0")
9917 (source (origin
9918 (method url-fetch)
9919 (uri (pypi-uri "msgpack" version))
9920 (sha256
9921 (base32
9922 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9923 (build-system python-build-system)
9924 (arguments
9925 `(#:modules ((guix build utils)
9926 (guix build python-build-system)
9927 (ice-9 ftw)
9928 (srfi srfi-1)
9929 (srfi srfi-26))
9930 #:phases
9931 (modify-phases %standard-phases
9932 (replace 'check
9933 (lambda _
9934 (let ((cwd (getcwd)))
9935 (setenv "PYTHONPATH"
9936 (string-append cwd "/build/"
9937 (find (cut string-prefix? "lib" <>)
9938 (scandir (string-append cwd "/build")))
9939 ":"
9940 (getenv "PYTHONPATH")))
9941 (invoke "pytest" "-v" "test")))))))
9942 (native-inputs
9943 `(("python-pytest" ,python-pytest)))
9944 (synopsis "MessagePack (de)serializer")
9945 (description "MessagePack is a fast, compact binary serialization format,
9946 suitable for similar data to JSON. This package provides CPython bindings for
9947 reading and writing MessagePack data.")
9948 (home-page "https://pypi.org/project/msgpack/")
9949 (license license:asl2.0)))
9950
9951 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9952 ;; release 0.5. Some packages like borg still call it by the old name for now.
9953 ;; <https://bugs.gnu.org/30662>
9954 (define-public python-msgpack-transitional
9955 (package
9956 (inherit python-msgpack)
9957 (name "python-msgpack-transitional")
9958 (version "0.5.6")
9959 (source (origin
9960 (method url-fetch)
9961 (uri (pypi-uri "msgpack" version))
9962 (sha256
9963 (base32
9964 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9965 (arguments
9966 (substitute-keyword-arguments (package-arguments python-msgpack)
9967 ((#:phases phases)
9968 `(modify-phases ,phases
9969 (add-after 'unpack 'configure-transitional
9970 (lambda _
9971 ;; Keep using the old name.
9972 (substitute* "setup.py"
9973 (("TRANSITIONAL = False")
9974 "TRANSITIONAL = 1"))
9975 #t))))))))
9976
9977 (define-public python2-msgpack
9978 (package-with-python2 python-msgpack))
9979
9980 (define-public python-netaddr
9981 (package
9982 (name "python-netaddr")
9983 (version "0.8.0")
9984 (source
9985 (origin
9986 (method url-fetch)
9987 (uri (pypi-uri "netaddr" version))
9988 (sha256
9989 (base32
9990 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
9991 (build-system python-build-system)
9992 (arguments `(#:tests? #f)) ;; No tests.
9993 (home-page "https://github.com/drkjam/netaddr/")
9994 (synopsis "Pythonic manipulation of network addresses")
9995 (description
9996 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
9997 and MAC network addresses.")
9998 (license license:bsd-3)))
9999
10000 (define-public python2-netaddr
10001 (package-with-python2 python-netaddr))
10002
10003 (define-public python2-pyroute2
10004 (package
10005 (name "python2-pyroute2")
10006 (version "0.5.6")
10007 (source
10008 (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "pyroute2" version))
10011 (sha256
10012 (base32
10013 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10014 (build-system python-build-system)
10015 (arguments
10016 `(#:python ,python-2)) ;Python 3.x is not supported
10017 (home-page "https://github.com/svinota/pyroute2")
10018 (synopsis "Python netlink library")
10019 (description
10020 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10021 Supported netlink families and protocols include:
10022 @itemize
10023 @item rtnl, network settings - addresses, routes, traffic controls
10024 @item nfnetlink - netfilter API: ipset, nftables, ...
10025 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10026 @item devlink - manage and monitor devlink-enabled hardware
10027 @item generic - generic netlink families
10028 @itemize
10029 @item nl80211 - wireless functions API (basic support)
10030 @item taskstats - extended process statistics
10031 @item acpi_events - ACPI events monitoring
10032 @item thermal_events - thermal events monitoring
10033 @item VFS_DQUOT - disk quota events monitoring
10034 @end itemize
10035 @end itemize")
10036 (license license:gpl2+)))
10037
10038 (define-public python-wrapt
10039 (package
10040 (name "python-wrapt")
10041 (version "1.11.2")
10042 (source
10043 (origin
10044 (method url-fetch)
10045 (uri (pypi-uri "wrapt" version))
10046 (sha256
10047 (base32
10048 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10049 (build-system python-build-system)
10050 (arguments
10051 ;; Tests are not included in the tarball, they are only available in the
10052 ;; git repository.
10053 `(#:tests? #f))
10054 (home-page "https://github.com/GrahamDumpleton/wrapt")
10055 (synopsis "Module for decorators, wrappers and monkey patching")
10056 (description
10057 "The aim of the wrapt module is to provide a transparent object proxy for
10058 Python, which can be used as the basis for the construction of function
10059 wrappers and decorator functions.")
10060 (license license:bsd-2)))
10061
10062 (define-public python2-wrapt
10063 (package-with-python2 python-wrapt))
10064
10065 (define-public python-commonmark
10066 (package
10067 (name "python-commonmark")
10068 (version "0.9.1")
10069 (source
10070 (origin
10071 (method url-fetch)
10072 (uri (pypi-uri "commonmark" version))
10073 (sha256
10074 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10075 (build-system python-build-system)
10076 (arguments
10077 `(#:phases
10078 (modify-phases %standard-phases
10079 (replace 'check
10080 (lambda* (#:key inputs outputs #:allow-other-keys)
10081 (add-installed-pythonpath inputs outputs)
10082 (invoke "python" "setup.py" "test"))))))
10083 (home-page "https://github.com/readthedocs/commonmark.py")
10084 (synopsis "Python parser for the CommonMark Markdown spec")
10085 (description
10086 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10087 Markdown parser and renderer for the CommonMark specification, using only
10088 native modules.")
10089 (license license:bsd-3)))
10090
10091 (define-public python-xlrd
10092 (package
10093 (name "python-xlrd")
10094 (version "1.2.0")
10095 (source (origin
10096 (method url-fetch)
10097 (uri (pypi-uri "xlrd" version))
10098 (sha256
10099 (base32
10100 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10101 (build-system python-build-system)
10102 (arguments
10103 `(#:phases
10104 (modify-phases %standard-phases
10105 ;; Some tests depend on writing a temporary file to the user's home
10106 ;; directory.
10107 (add-after 'unpack 'fix-tests
10108 (lambda _
10109 (delete-file "tests/test_open_workbook.py")
10110 #t)))))
10111 (home-page "http://www.python-excel.org/")
10112 (synopsis "Library for extracting data from Excel files")
10113 (description "This package provides a library to extract data from
10114 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10115 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10116 Unicode-aware. It is not intended as an end-user tool.")
10117 (license license:bsd-3)))
10118
10119 (define-public python2-xlrd
10120 (package-with-python2 python-xlrd))
10121
10122 (define-public python-immutables
10123 (package
10124 (name "python-immutables")
10125 (version "0.14")
10126 (source
10127 (origin
10128 (method url-fetch)
10129 (uri (pypi-uri "immutables" version))
10130 (sha256
10131 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10132 (build-system python-build-system)
10133 (home-page "https://github.com/MagicStack/immutables")
10134 (synopsis "High-performance immutable mapping type for Python")
10135 (description
10136 "An immutable mapping type for Python. The underlying datastructure is a
10137 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10138 functional languages.")
10139 (license license:asl2.0)))
10140
10141 (define-public python-prettytable
10142 (package
10143 (name "python-prettytable")
10144 (version "0.7.2")
10145 (source
10146 (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10149 (sha256
10150 (base32
10151 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10152 (build-system python-build-system)
10153 (home-page "https://code.google.com/archive/p/prettytable/")
10154 (synopsis "Display tabular data in an ASCII table format")
10155 (description
10156 "A library designed to represent tabular data in visually appealing ASCII
10157 tables. PrettyTable allows for selection of which columns are to be printed,
10158 independent alignment of columns (left or right justified or centred) and
10159 printing of sub-tables by specifying a row range.")
10160 (license license:bsd-3)))
10161
10162 (define-public python2-prettytable
10163 (package-with-python2 python-prettytable))
10164
10165 (define-public python-curio
10166 (package
10167 (name "python-curio")
10168 (version "1.2")
10169 (source
10170 (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "curio" version))
10173 (sha256
10174 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
10175 (build-system python-build-system)
10176 (arguments
10177 `(#:phases
10178 (modify-phases %standard-phases
10179 (replace 'check
10180 (lambda* (#:key inputs outputs #:allow-other-keys)
10181 (add-installed-pythonpath inputs outputs)
10182 (invoke "pytest" "-vv" "-k"
10183 ;; Tries to open an outgoing connection.
10184 "not test_ssl_outgoing"))))))
10185 (native-inputs
10186 `(("python-pytest" ,python-pytest)))
10187 (home-page "https://github.com/dabeaz/curio")
10188 (synopsis "Coroutine-based library for concurrent Python")
10189 (description
10190 "Curio is a coroutine-based library for concurrent Python systems
10191 programming. It provides standard programming abstractions such as as
10192 tasks, sockets, files, locks, and queues.")
10193 (license license:bsd-3)))
10194
10195 (define-public python-tables
10196 (package
10197 (name "python-tables")
10198 (version "3.6.1")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "tables" version))
10203 (sha256
10204 (base32
10205 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10206 (modules '((guix build utils)))
10207 (snippet
10208 '(begin
10209 ;; Remove pre-compiled .pyc files from source.
10210 (for-each delete-file-recursively
10211 (find-files "." "__pycache__" #:directories? #t))
10212 (for-each delete-file (find-files "." "\\.pyc$"))
10213 #t))))
10214 (build-system python-build-system)
10215 (arguments
10216 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10217 ;; or "check", so we must override the build and check phases.
10218 #:phases
10219 (modify-phases %standard-phases
10220 (add-after 'unpack 'use-gcc
10221 (lambda _
10222 (substitute* "setup.py"
10223 (("^( +)compiler = new_compiler\\(\\)" line indent)
10224 (string-append line
10225 "\n"
10226 indent
10227 "compiler.set_executables(compiler='gcc',"
10228 "compiler_so='gcc',"
10229 "linker_exe='gcc',"
10230 "linker_so='gcc -shared')")))
10231 #t))
10232 (add-after 'unpack 'disable-tuning
10233 (lambda _
10234 (substitute* "setup.py"
10235 (("cpu_flags = .*")
10236 "cpu_flags = ['sse2']\n"))
10237 #t))
10238 (replace 'build
10239 (lambda* (#:key inputs #:allow-other-keys)
10240 (invoke "python" "setup.py" "build"
10241 (string-append "--hdf5="
10242 (assoc-ref inputs "hdf5")))))
10243 (replace 'check
10244 (lambda* (#:key inputs #:allow-other-keys)
10245 (invoke "python" "setup.py" "check"
10246 (string-append "--hdf5="
10247 (assoc-ref inputs "hdf5"))))))))
10248 (propagated-inputs
10249 `(("python-numexpr" ,python-numexpr)
10250 ("python-numpy" ,python-numpy)))
10251 (native-inputs
10252 `(("python-cython" ,python-cython)
10253 ("pkg-config" ,pkg-config)))
10254 (inputs
10255 `(("hdf5" ,hdf5-1.10)
10256 ("bzip2" ,bzip2)
10257 ("zlib" ,zlib)))
10258 (home-page "https://www.pytables.org/")
10259 (synopsis "Hierarchical datasets for Python")
10260 (description "PyTables is a package for managing hierarchical datasets and
10261 designed to efficiently cope with extremely large amounts of data.")
10262 (license license:bsd-3)))
10263
10264 (define-public python-sniffio
10265 (package
10266 (name "python-sniffio")
10267 (version "1.2.0")
10268 (source
10269 (origin
10270 (method url-fetch)
10271 (uri (pypi-uri "sniffio" version))
10272 (sha256
10273 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10274 (build-system python-build-system)
10275 (arguments
10276 `(#:phases
10277 (modify-phases %standard-phases
10278 (replace 'check
10279 (lambda _
10280 (invoke "pytest" "-vv"))))))
10281 (native-inputs
10282 `(("python-curio" ,python-curio)
10283 ("python-pytest" ,python-pytest)
10284 ("python-pytest-cov" ,python-pytest-cov)))
10285 (home-page "https://github.com/python-trio/sniffio")
10286 (synopsis "Detect which async library a program is running under")
10287 (description "This package detects which async library a program is
10288 running under. It supports multiple async I/O packages, like Trio, and
10289 asyncio.")
10290 ;; Either license applies.
10291 (license (list license:expat license:asl2.0))))
10292
10293 (define-public python-pytest-black
10294 (package
10295 (name "python-pytest-black")
10296 (version "0.3.8")
10297 (source
10298 (origin
10299 (method url-fetch)
10300 (uri (pypi-uri "pytest-black" version))
10301 (sha256
10302 (base32
10303 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
10304 (build-system python-build-system)
10305 (propagated-inputs
10306 `(("python-pytest" ,python-pytest)
10307 ("python-black" ,python-black)
10308 ("python-toml" ,python-toml)))
10309 (native-inputs
10310 `(("python-setuptools-scm" ,python-setuptools-scm)))
10311 (home-page "https://github.com/shopkeep/pytest-black")
10312 (synopsis "Pytest plugin to enable format checking with black")
10313 (description
10314 "This package provides a pytest plugin to enable format checking with the
10315 Python code formatter \"black\".")
10316 (license license:expat)))
10317
10318 (define-public python-get-version
10319 (package
10320 (name "python-get-version")
10321 (version "2.1")
10322 (source
10323 (origin
10324 (method url-fetch)
10325 (uri (pypi-uri "get_version" version))
10326 (sha256
10327 (base32
10328 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
10329 (build-system python-build-system)
10330 (propagated-inputs
10331 `(("python-pygments" ,python-pygments)
10332 ("python-pytest" ,python-pytest)
10333 ("python-pytest-black" ,python-pytest-black)
10334 ("python-pytest-cov" ,python-pytest-cov)
10335 ("python-setuptools" ,python-setuptools)
10336 ("python-testpath" ,python-testpath)))
10337 (home-page "https://github.com/flying-sheep/get_version")
10338 (synopsis "Version helper in the spirit of versioneer")
10339 (description
10340 "This package provides a version helper that lets you automatically use
10341 the latest @code{vX.X.X} Git tag as the version in your Python package. It
10342 also supports getting the version from Python source distributions or, once
10343 your package is installed, via @code{pkg_resources} (part of
10344 @code{setuptools}).")
10345 (license license:gpl3+)))
10346
10347 (define-public python-legacy-api-wrap
10348 (package
10349 (name "python-legacy-api-wrap")
10350 (version "1.2")
10351 (source
10352 (origin
10353 (method url-fetch)
10354 (uri (pypi-uri "legacy-api-wrap" version))
10355 (sha256
10356 (base32
10357 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
10358 (build-system python-build-system)
10359 (propagated-inputs
10360 `(("python-get-version" ,python-get-version)
10361 ("python-pytest" ,python-pytest)
10362 ("python-pytest-black" ,python-pytest-black)
10363 ("python-pytest-cov" ,python-pytest-cov)
10364 ("python-setuptools" ,python-setuptools)))
10365 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
10366 (synopsis "Legacy API wrapper")
10367 (description "This module defines a decorator to wrap legacy APIs. The
10368 primary use case is APIs defined before keyword-only parameters existed.")
10369 (license license:gpl3+)))
10370
10371 (define-public python-pyasn1
10372 (package
10373 (name "python-pyasn1")
10374 (version "0.4.8")
10375 (source
10376 (origin
10377 (method url-fetch)
10378 (uri (pypi-uri "pyasn1" version))
10379 (sha256
10380 (base32
10381 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
10382 (build-system python-build-system)
10383 (home-page "http://pyasn1.sourceforge.net/")
10384 (synopsis "ASN.1 types and codecs")
10385 (description
10386 "This is an implementation of ASN.1 types and codecs in Python. It is
10387 suitable for a wide range of protocols based on the ASN.1 specification.")
10388 (license license:bsd-2)))
10389
10390 (define-public python2-pyasn1
10391 (package-with-python2 python-pyasn1))
10392
10393 (define-public python-pyasn1-modules
10394 (package
10395 (name "python-pyasn1-modules")
10396 (version "0.2.2")
10397 (source
10398 (origin
10399 (method url-fetch)
10400 (uri (pypi-uri "pyasn1-modules" version))
10401 (sha256
10402 (base32
10403 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
10404 (build-system python-build-system)
10405 (propagated-inputs
10406 `(("python-pyasn1" ,python-pyasn1)))
10407 (home-page "https://sourceforge.net/projects/pyasn1/")
10408 (synopsis "ASN.1 codec implementations")
10409 (description
10410 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
10411 implementations of ASN.1-based codecs and protocols.")
10412 (license license:bsd-3)))
10413
10414 (define-public python2-pyasn1-modules
10415 (package-with-python2 python-pyasn1-modules))
10416
10417 (define-public python2-ipaddress
10418 (package
10419 (name "python2-ipaddress")
10420 (version "1.0.23")
10421 (source (origin
10422 (method url-fetch)
10423 (uri (pypi-uri "ipaddress" version))
10424 (sha256
10425 (base32
10426 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
10427 (build-system python-build-system)
10428 (arguments
10429 `(#:python ,python-2))
10430 (home-page "https://github.com/phihag/ipaddress")
10431 (synopsis "IP address manipulation library")
10432 (description
10433 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
10434 in Python. This library is used to create, poke at, and manipulate IPv4 and
10435 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
10436 module to older versions of Python.")
10437 (license license:psfl)))
10438
10439 (define-public python-asn1tools
10440 (package
10441 (name "python-asn1tools")
10442 (version "0.158.0")
10443 (source
10444 (origin
10445 (method url-fetch)
10446 (uri (pypi-uri "asn1tools" version))
10447 (sha256
10448 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
10449 (build-system python-build-system)
10450 (propagated-inputs
10451 `(("python-bitstruct" ,python-bitstruct)
10452 ("python-diskcache" ,python-diskcache)
10453 ("python-prompt-toolkit" ,python-prompt-toolkit)
10454 ("python-pyparsing" ,python-pyparsing)))
10455 (home-page "https://github.com/eerimoq/asn1tools")
10456 (synopsis "ASN.1 parsing, encoding and decoding")
10457 (description "This package provides ASN.1 parsing, encoding and decoding
10458 for Python, including constraints checking. It supports several
10459 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
10460 for OER and UPER.")
10461 (license license:expat)))
10462
10463 (define-public python2-ipaddr
10464 (package
10465 (name "python2-ipaddr")
10466 (version "2.1.11")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (pypi-uri "ipaddr" version))
10471 (sha256
10472 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
10473 (build-system python-build-system)
10474 (arguments
10475 `(#:python ,python-2 ;version 2 only
10476 #:phases
10477 (modify-phases %standard-phases
10478 (replace 'check
10479 (lambda _ (invoke "python" "ipaddr_test.py"))))))
10480 (home-page "https://github.com/google/ipaddr-py")
10481 (synopsis "IP address manipulation library")
10482 (description
10483 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
10484 IPv6 addresses and networks.
10485
10486 For new implementations you may prefer to use the standard module
10487 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
10488 versions of Python.")
10489 (license license:asl2.0)))
10490
10491 (define-public python-idna
10492 (package
10493 (name "python-idna")
10494 (version "2.10")
10495 (source
10496 (origin
10497 (method url-fetch)
10498 (uri (pypi-uri "idna" version))
10499 (sha256
10500 (base32
10501 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
10502 (build-system python-build-system)
10503 (home-page "https://github.com/kjd/idna")
10504 (synopsis "Internationalized domain names in applications")
10505 (description
10506 "This is a library to support the Internationalised Domain Names in
10507 Applications (IDNA) protocol as specified in RFC 5891. This version of the
10508 protocol is often referred to as “IDNA2008” and can produce different results
10509 from the earlier standard from 2003. The library is also intended to act as a
10510 suitable drop-in replacement for the “encodings.idna” module that comes with
10511 the Python standard library but currently only supports the older 2003
10512 specification.")
10513 (license license:bsd-4)))
10514
10515 (define-public python-idna-2.7
10516 (package (inherit python-idna)
10517 (version "2.7")
10518 (source (origin
10519 (method url-fetch)
10520 (uri (pypi-uri "idna" version))
10521 (sha256
10522 (base32
10523 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
10524
10525
10526 (define-public python2-idna
10527 (package-with-python2 python-idna))
10528
10529 (define-public python-libsass
10530 (package
10531 (name "python-libsass")
10532 (version "0.20.1")
10533 (source
10534 (origin
10535 ;; PyPI tarball is missing some test files.
10536 (method git-fetch)
10537 (uri (git-reference
10538 (url "https://github.com/sass/libsass-python")
10539 (commit version)))
10540 (file-name (git-file-name name version))
10541 (sha256
10542 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10543 (build-system python-build-system)
10544 (arguments
10545 `(#:phases
10546 (modify-phases %standard-phases
10547 ;; Use Guix package of libsass instead of compiling from a checkout.
10548 (add-before 'build 'set-libsass
10549 (lambda _
10550 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10551 #t))
10552 (replace 'check
10553 (lambda* (#:key inputs outputs #:allow-other-keys)
10554 (add-installed-pythonpath inputs outputs)
10555 (invoke "pytest" "sasstests.py"))))))
10556 (native-inputs
10557 `(("python-pytest" ,python-pytest)
10558 ("python-werkzeug" ,python-werkzeug)))
10559 (inputs
10560 `(("libsass" ,libsass)))
10561 (propagated-inputs
10562 `(("python-six" ,python-six)))
10563 (home-page "https://sass.github.io/libsass-python/")
10564 (synopsis "Straightforward binding of libsass for Python")
10565 (description
10566 "This package provides a simple Python extension module @code{sass} which
10567 is binding LibSass.")
10568 (license license:expat)))
10569
10570 (define-public python-idna-ssl
10571 (package
10572 (name "python-idna-ssl")
10573 (version "1.0.1")
10574 (source
10575 (origin
10576 (method url-fetch)
10577 (uri (pypi-uri "idna-ssl" version))
10578 (sha256
10579 (base32
10580 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10581 (build-system python-build-system)
10582 (arguments
10583 `(#:tests? #f)) ;circular dependency with python-aiohttp
10584 (home-page "https://github.com/aio-libs/idna-ssl")
10585 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10586 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10587 domains support.")
10588 (license license:expat)))
10589
10590 (define-public python-pretend
10591 (package
10592 (name "python-pretend")
10593 (version "1.0.9")
10594 (source
10595 (origin
10596 (method url-fetch)
10597 (uri (pypi-uri "pretend" version))
10598 (sha256
10599 (base32
10600 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10601 (build-system python-build-system)
10602 (home-page "https://github.com/alex/pretend")
10603 (synopsis "Library for stubbing in Python")
10604 (description
10605 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10606 technique for writing tests. You may hear the term mixed up with mocks,
10607 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10608 responses, rather than doing any computation.")
10609 (license license:bsd-3)))
10610
10611 (define-public python2-pretend
10612 (package-with-python2 python-pretend))
10613
10614 (define-public python-pip
10615 (package
10616 (name "python-pip")
10617 (version "20.2.4")
10618 (source
10619 (origin
10620 (method url-fetch)
10621 (uri (pypi-uri "pip" version))
10622 (sha256
10623 (base32
10624 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10625 (build-system python-build-system)
10626 (arguments
10627 '(#:tests? #f)) ; there are no tests in the pypi archive.
10628 (home-page "https://pip.pypa.io/")
10629 (synopsis "Package manager for Python software")
10630 (description
10631 "Pip is a package manager for Python software, that finds packages on the
10632 Python Package Index (PyPI).")
10633 (license license:expat)))
10634
10635 (define-public python2-pip
10636 (package-with-python2 python-pip))
10637
10638 (define-public python-tlsh
10639 (package
10640 (name "python-tlsh")
10641 (version "3.4.5")
10642 (home-page "https://github.com/trendmicro/tlsh")
10643 (source
10644 (origin
10645 (method git-fetch)
10646 (uri (git-reference
10647 (url "https://github.com/trendmicro/tlsh")
10648 (commit (string-append "v" version))))
10649 (file-name (git-file-name name version))
10650 (sha256
10651 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10652 (build-system cmake-build-system)
10653 (arguments
10654 '(#:out-of-source? #f
10655 #:phases (modify-phases %standard-phases
10656 (replace
10657 'install
10658 (lambda* (#:key outputs #:allow-other-keys)
10659 ;; Build and install the Python bindings. The underlying
10660 ;; C++ library is apparently not meant to be installed.
10661 (let ((out (assoc-ref outputs "out")))
10662 (with-directory-excursion "py_ext"
10663 (and (system* "python" "setup.py" "build")
10664 (system* "python" "setup.py" "install"
10665 (string-append "--prefix=" out))))))))))
10666 (inputs `(("python" ,python-wrapper))) ;for the bindings
10667 (synopsis "Fuzzy matching library for Python")
10668 (description
10669 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10670 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10671 value which can be used for similarity comparisons. Similar objects have
10672 similar hash values, which allows for the detection of similar objects by
10673 comparing their hash values. The byte stream should have a sufficient amount
10674 of complexity; for example, a byte stream of identical bytes will not generate
10675 a hash value.")
10676 (license license:asl2.0)))
10677
10678 (define-public python2-tlsh
10679 (package/inherit python-tlsh
10680 (name "python2-tlsh")
10681 (inputs `(("python" ,python-2)))))
10682
10683 (define-public python-termcolor
10684 (package
10685 (name "python-termcolor")
10686 (version "1.1.0")
10687 (source
10688 (origin
10689 (method url-fetch)
10690 (uri (pypi-uri "termcolor" version))
10691 (sha256
10692 (base32
10693 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10694 (build-system python-build-system)
10695 (arguments
10696 ;; There are no tests.
10697 `(#:tests? #f))
10698 (home-page "https://pypi.org/project/termcolor/")
10699 (synopsis "ANSII Color formatting for terminal output")
10700 (description
10701 "This package provides ANSII Color formatting for output in terminals.")
10702 (license license:expat)))
10703
10704 (define-public python2-termcolor
10705 (package-with-python2 python-termcolor))
10706
10707 (define-public python-terminaltables
10708 (package
10709 (name "python-terminaltables")
10710 (version "3.1.0")
10711 (source
10712 (origin
10713 (method url-fetch)
10714 (uri (pypi-uri "terminaltables" version))
10715 (sha256
10716 (base32
10717 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10718 (build-system python-build-system)
10719 (home-page "https://github.com/Robpol86/terminaltables")
10720 (synopsis
10721 "Generate simple tables in terminals from a nested list of strings")
10722 (description
10723 "This package makes it easy to draw tables in terminal/console
10724 applications from a list of lists of strings. It supports multi-line rows.")
10725 (license license:expat)))
10726
10727 (define-public python-libarchive-c
10728 (package
10729 (name "python-libarchive-c")
10730 (version "2.9")
10731 (source (origin
10732 (method url-fetch)
10733 (uri (pypi-uri "libarchive-c" version))
10734 (sha256
10735 (base32
10736 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10737 (build-system python-build-system)
10738 (arguments
10739 '(#:phases (modify-phases %standard-phases
10740 (add-before
10741 'build 'reference-libarchive
10742 (lambda* (#:key inputs #:allow-other-keys)
10743 ;; Retain the absolute file name of libarchive.so.
10744 (let ((libarchive (assoc-ref inputs "libarchive")))
10745 (substitute* "libarchive/ffi.py"
10746 (("find_library\\('archive'\\)")
10747 (string-append "'" libarchive
10748 "/lib/libarchive.so'"))))))
10749 (replace 'check
10750 (lambda _ (invoke "pytest" "-vv"))))))
10751 (native-inputs
10752 `(("python-mock" ,python-mock)
10753 ("python-pytest" ,python-pytest)))
10754 (inputs
10755 `(("libarchive" ,libarchive)))
10756 (home-page "https://github.com/Changaco/python-libarchive-c")
10757 (synopsis "Python interface to libarchive")
10758 (description
10759 "This package provides Python bindings to libarchive, a C library to
10760 access possibly compressed archives in many different formats. It uses
10761 Python's @code{ctypes} foreign function interface (FFI).")
10762 (license license:lgpl2.0+)))
10763
10764 (define-public python2-libarchive-c
10765 (package-with-python2 python-libarchive-c))
10766
10767 (define-public python-file
10768 (package/inherit file
10769 (name "python-file")
10770 (build-system python-build-system)
10771 (arguments
10772 '(#:tests? #f ;no tests
10773 #:configure-flags '("--single-version-externally-managed" "--root=/")
10774 #:phases (modify-phases %standard-phases
10775 (add-before 'build 'change-directory
10776 (lambda _
10777 (chdir "python")
10778 #t))
10779 (add-before 'build 'set-library-file-name
10780 (lambda* (#:key inputs #:allow-other-keys)
10781 (let ((file (assoc-ref inputs "file")))
10782 (substitute* "magic.py"
10783 (("find_library\\('magic'\\)")
10784 (string-append "'" file "/lib/libmagic.so'")))
10785 #t))))))
10786 (inputs `(("file" ,file)))
10787 (native-inputs (if (%current-target-system)
10788 `(("self" ,this-package))
10789 '()))
10790 (synopsis "Python bindings to the libmagic file type guesser")
10791 (description "This package provides Python bindings to the libmagic file
10792 type guesser.
10793
10794 Note that this module and the @code{python-magic} module both provide a
10795 @file{magic.py} file; these two modules, which are different and were
10796 developed separately, both serve the same purpose: provide Python bindings for
10797 libmagic.")))
10798
10799 (define-public python2-file
10800 (package-with-python2 python-file))
10801
10802 (define-public python-debian
10803 (package
10804 (name "python-debian")
10805 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10806 (version "0.1.36")
10807 (source
10808 (origin
10809 ;; Use git-fetch, as pypi doesn't include test suite.
10810 (method git-fetch)
10811 (uri (git-reference
10812 (url home-page)
10813 (commit version)))
10814 (file-name (git-file-name name version))
10815 (sha256
10816 (base32
10817 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10818 (build-system python-build-system)
10819 (arguments
10820 `(#:phases (modify-phases %standard-phases
10821 (add-after 'unpack 'remove-debian-specific-tests
10822 ;; python-apt, apt and dpkg are not yet available in guix,
10823 ;; and these tests heavily depend on them.
10824 (lambda _
10825 (delete-file "lib/debian/tests/test_deb822.py")
10826 (delete-file "lib/debian/tests/test_debfile.py")
10827 #t)))))
10828 (propagated-inputs
10829 `(("python-six" ,python-six)
10830 ("python-chardet" ,python-chardet)))
10831 (synopsis "Debian package related modules")
10832 (description
10833 ;; XXX: Use @enumerate instead of @itemize to work around
10834 ;; <http://bugs.gnu.org/21772>.
10835 "This package provides Python modules that abstract many formats of
10836 Debian-related files, such as:
10837
10838 @enumerate
10839 @item Debtags information;
10840 @item @file{debian/changelog} files;
10841 @item packages files, pdiffs;
10842 @item control files of single or multiple RFC822-style paragraphs---e.g.
10843 @file{debian/control}, @file{.changes}, @file{.dsc};
10844 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10845 contained files and meta-information.
10846 @end enumerate\n")
10847
10848 ;; Modules are either GPLv2+ or GPLv3+.
10849 (license license:gpl3+)))
10850
10851 (define-public python-json-spec
10852 (package
10853 (name "python-json-spec")
10854 (version "0.10.1")
10855 (source
10856 (origin
10857 (method url-fetch)
10858 (uri (pypi-uri "json-spec" version))
10859 (sha256
10860 (base32
10861 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
10862 (build-system python-build-system)
10863 (propagated-inputs
10864 `(("python-pathlib" ,python-pathlib)
10865 ("python-six" ,python-six)))
10866 (native-inputs
10867 `(("python-pytest" ,python-pytest)))
10868 (home-page "http://py.errorist.io/json-spec")
10869 (synopsis
10870 "JSON Schema, JSON Pointer and JSON Reference for Python")
10871 (description
10872 "This Python library implements several JSON specs, like JSON Schema,
10873 JSON Reference and JSON Pointer.")
10874 (license license:bsd-3)))
10875
10876 (define-public python-fastjsonschema
10877 (package
10878 (name "python-fastjsonschema")
10879 (version "2.15.1")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (pypi-uri "fastjsonschema" version))
10884 (sha256
10885 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
10886 (build-system python-build-system)
10887 (arguments
10888 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
10889 #:phases
10890 (modify-phases %standard-phases
10891 (replace 'check
10892 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10893 (when tests?
10894 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
10895 (native-inputs
10896 `(("python-colorama" ,python-colorama)
10897 ("python-json-spec" ,python-json-spec)
10898 ("python-jsonschema" ,python-jsonschema)
10899 ("python-pylint" ,python-pylint)
10900 ("python-pytest" ,python-pytest-6)
10901 ("python-pytest-benchmark"
10902 ,python-pytest-benchmark)
10903 ("python-pytest-cache" ,python-pytest-cache)
10904 ("python-validictory" ,python-validictory)))
10905 (home-page
10906 "https://github.com/horejsek/python-fastjsonschema")
10907 (synopsis
10908 "Fast Python implementation of JSON schema")
10909 (description
10910 "This library implements validation of JSON documents by JSON schema for
10911 drafts 04, 06 and 07.")
10912 (license license:bsd-3)))
10913
10914 (define-public python-nbformat
10915 (package
10916 (name "python-nbformat")
10917 (version "5.1.3")
10918 ;; The PyPi release tarball lacks some test cases and test data.
10919 (source (origin
10920 (method git-fetch)
10921 (uri (git-reference
10922 (url "https://github.com/jupyter/nbformat.git")
10923 (commit version)))
10924 (sha256
10925 (base32
10926 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
10927 (file-name (git-file-name name version))))
10928 (build-system python-build-system)
10929 (arguments
10930 `(#:phases
10931 (modify-phases %standard-phases
10932 (replace 'check
10933 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10934 (when tests?
10935 (invoke "pytest" "-vv")))))))
10936 (propagated-inputs
10937 `(("python-ipython-genutils" ,python-ipython-genutils)
10938 ("python-jsonschema" ,python-jsonschema)
10939 ("python-jupyter-core" ,python-jupyter-core)
10940 ("python-traitlets" ,python-traitlets)))
10941 (native-inputs
10942 `(("python-pytest" ,python-pytest)
10943 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
10944 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
10945 ; testing only.
10946 ("python-testpath" ,python-testpath)))
10947 (home-page "https://jupyter.org")
10948 (synopsis "Jupyter Notebook format")
10949 (description "This package provides the reference implementation of the
10950 Jupyter Notebook format and Python APIs for working with notebooks.")
10951 (properties `((python2-variant . ,(delay python2-nbformat))))
10952 (license license:bsd-3)))
10953
10954 (define-public python2-nbformat
10955 (let ((parent (package-with-python2
10956 (strip-python2-variant python-nbformat))))
10957 (package
10958 (inherit parent)
10959 (version "4.4.0")
10960 (source
10961 (origin
10962 (method url-fetch)
10963 (uri (pypi-uri "nbformat" version))
10964 (sha256
10965 (base32
10966 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))))))
10967
10968 (define-public python-bleach
10969 (package
10970 (name "python-bleach")
10971 (version "3.1.5")
10972 (source
10973 (origin
10974 (method url-fetch)
10975 (uri (pypi-uri "bleach" version))
10976 (sha256
10977 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10978 (build-system python-build-system)
10979 (propagated-inputs
10980 `(("python-webencodings" ,python-webencodings)
10981 ("python-six" ,python-six)))
10982 (native-inputs
10983 `(("python-datrie" ,python-datrie)
10984 ("python-genshi" ,python-genshi)
10985 ("python-lxml" ,python-lxml)
10986 ("python-pytest" ,python-pytest)))
10987 (home-page "https://github.com/mozilla/bleach")
10988 (synopsis "Whitelist-based HTML-sanitizing tool")
10989 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10990 (license license:asl2.0)))
10991
10992 (define-public python2-bleach
10993 (package-with-python2 python-bleach))
10994
10995 (define-public python-entrypoints
10996 (package
10997 (name "python-entrypoints")
10998 (version "0.3")
10999 (source
11000 (origin
11001 (method url-fetch)
11002 (uri (pypi-uri "entrypoints" version))
11003 (sha256
11004 (base32
11005 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11006 (build-system python-build-system)
11007 ;; The package does not come with a setup.py file, so we have to generate
11008 ;; one ourselves.
11009 (arguments
11010 `(#:tests? #f
11011 #:phases
11012 (modify-phases %standard-phases
11013 (add-after 'unpack 'create-setup.py
11014 (lambda _
11015 (call-with-output-file "setup.py"
11016 (lambda (port)
11017 (format port "\
11018 from setuptools import setup
11019 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11020 " ,version))))))))
11021 (home-page "https://github.com/takluyver/entrypoints")
11022 (synopsis "Discover and load entry points from installed Python packages")
11023 (description "Entry points are a way for Python packages to advertise
11024 objects with some common interface. The most common examples are
11025 @code{console_scripts} entry points, which define shell commands by
11026 identifying a Python function to run. The @code{entrypoints} module contains
11027 functions to find and load entry points.")
11028 (license license:expat)))
11029
11030 (define-public python2-entrypoints
11031 (package-with-python2 python-entrypoints))
11032
11033 (define-public python-epc
11034 (package
11035 (name "python-epc")
11036 (version "0.0.5")
11037 (source
11038 (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "epc" version))
11041 (sha256
11042 (base32
11043 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11044 (build-system python-build-system)
11045 (propagated-inputs
11046 `(("python-sexpdata" ,python-sexpdata)))
11047 (native-inputs
11048 `(("python-nose" ,python-nose)))
11049 (home-page "https://github.com/tkf/python-epc")
11050 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11051 (description
11052 "Python-EPC can call elisp functions from Python and Python functions
11053 from elisp.")
11054 (license license:gpl3)))
11055
11056 (define-public python-forex-python
11057 (package
11058 (name "python-forex-python")
11059 (version "1.5")
11060 (source
11061 (origin
11062 (method url-fetch)
11063 (uri (pypi-uri "forex-python" version))
11064 (sha256
11065 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11066 (build-system python-build-system)
11067 (arguments
11068 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11069 ;; repository require online data.
11070 `(#:tests? #f))
11071 (propagated-inputs
11072 `(("python-requests" ,python-requests)
11073 ("python-simplejson" ,python-simplejson)))
11074 (home-page "https://github.com/MicroPyramid/forex-python")
11075 (synopsis "Foreign exchange rates and currency conversion")
11076 (description
11077 "@code{python-forex-python} can be used to manipulate foreign
11078 exchange rates and to operate currency conversions.
11079
11080 Features:
11081 @itemize
11082 @item List all currency rates.
11083 @item BitCoin price for all currencies.
11084 @item Converting amount to BitCoins.
11085 @item Get historical rates for any day since 1999.
11086 @item Conversion rate for one currency(ex; USD to INR).
11087 @item Convert amount from one currency to other.('USD 10$' to INR).
11088 @item Currency symbols.
11089 @item Currency names.
11090 @end itemize")
11091 (license license:expat)))
11092
11093 (define-public python-simpleeval
11094 (package
11095 (name "python-simpleeval")
11096 (version "0.9.10")
11097 (source
11098 (origin
11099 (method url-fetch)
11100 (uri (pypi-uri "simpleeval" version))
11101 (sha256
11102 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11103 (build-system python-build-system)
11104 (home-page "https://github.com/danthedeckie/simpleeval")
11105 (synopsis "Simple, safe single expression evaluator library")
11106 (description
11107 "This package provides a quick single file library for easily adding
11108 evaluatable expressions into python projects. Say you want to allow a user
11109 to set an alarm volume, which could depend on the time of day, alarm level,
11110 how many previous alarms had gone off, and if there is music playing at the
11111 time.")
11112 (license license:expat)))
11113
11114 (define-public python-nbconvert
11115 (package
11116 (name "python-nbconvert")
11117 (version "6.0.7")
11118 (source
11119 (origin
11120 (method url-fetch)
11121 (uri (pypi-uri "nbconvert" version))
11122 (sha256
11123 (base32
11124 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11125 (build-system python-build-system)
11126 (arguments
11127 `(#:phases
11128 (modify-phases %standard-phases
11129 (add-after 'unpack 'fix-paths-and-tests
11130 (lambda _
11131 ;; Use pandoc binary from input.
11132 (substitute* "nbconvert/utils/pandoc.py"
11133 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11134 ;; Same for LaTeX.
11135 (substitute* "nbconvert/exporters/pdf.py"
11136 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11137 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11138 ;; Make sure tests are not skipped.
11139 (substitute* (find-files "." "test_.+\\.py$")
11140 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11141 ;; Pandoc is never missing, disable test.
11142 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11143 (("import os" all) (string-append all "\nimport pytest"))
11144 (("(.+)(def test_pandoc_available)" all indent def)
11145 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11146 indent def)))
11147 ;; Not installing pyppeteer, delete test.
11148 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11149 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11150 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11151 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11152 indent def)))))
11153 (replace 'check
11154 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11155 (when tests?
11156 ;; Some tests invoke the installed nbconvert binary.
11157 (add-installed-pythonpath inputs outputs)
11158 ;; Tries to write to this path.
11159 (unsetenv "JUPYTER_CONFIG_DIR")
11160 ;; Tests depend on templates installed to output.
11161 (setenv "JUPYTER_PATH"
11162 (string-append
11163 (assoc-ref outputs "out")
11164 "/share/jupyter:"
11165 (getenv "JUPYTER_PATH")))
11166 ;; Some tests need HOME
11167 (setenv "HOME" "/tmp")
11168 (invoke "pytest" "-vv")))))))
11169 (inputs
11170 `(("pandoc" ,pandoc)
11171 ;; XXX: Disabled, needs substitute*.
11172 ;;("inkscape" ,inkscape)
11173 ))
11174 (native-inputs
11175 `(("python-ipykernel" ,python-ipykernel)
11176 ;; XXX: Disabled, not in guix.
11177 ;;("python-pyppeteer" ,python-pyppeteer)
11178 ("python-pytest" ,python-pytest)
11179 ("python-pytest-cov" ,python-pytest-cov)
11180 ("python-pytest-dependency" ,python-pytest-dependency)
11181 ("texlive" ,(texlive-union (list texlive-adjustbox
11182 texlive-amsfonts/patched
11183 texlive-booktabs
11184 texlive-caption
11185 texlive-eurosym
11186 texlive-fonts-rsfs
11187 texlive-generic-ulem
11188 texlive-iftex
11189 texlive-jknappen
11190 texlive-latex-amsmath
11191 texlive-latex-enumitem
11192 texlive-latex-fancyvrb
11193 texlive-latex-float
11194 texlive-latex-fontspec
11195 texlive-latex-geometry
11196 texlive-latex-hyperref
11197 texlive-latex-jknapltx
11198 texlive-latex-ms
11199 texlive-latex-oberdiek
11200 texlive-latex-parskip
11201 texlive-latex-trimspaces
11202 texlive-latex-upquote
11203 texlive-latex-ucs
11204 texlive-lm
11205 texlive-mathpazo
11206 texlive-tcolorbox
11207 texlive-titling
11208 texlive-tools
11209 texlive-xcolor
11210 texlive-zapfding)))))
11211 (propagated-inputs
11212 `(("python-bleach" ,python-bleach)
11213 ("python-defusedxml" ,python-defusedxml)
11214 ("python-entrypoints" ,python-entrypoints)
11215 ("python-jinja2" ,python-jinja2)
11216 ("python-jupyter-core" ,python-jupyter-core)
11217 ("python-mistune" ,python-mistune)
11218 ("python-nbclient" ,python-nbclient)
11219 ("python-nbformat" ,python-nbformat)
11220 ("python-pandocfilters" ,python-pandocfilters)
11221 ("python-pygments" ,python-pygments)
11222 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11223 ("python-testpath" ,python-testpath)
11224 ("python-traitlets" ,python-traitlets)
11225 ;; Required, even if [serve] is not used.
11226 ("python-tornado" ,python-tornado-6)))
11227 (home-page "https://jupyter.org")
11228 (synopsis "Converting Jupyter Notebooks")
11229 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11230 notebooks to various other formats via Jinja templates. It allows you to
11231 convert an @code{.ipynb} notebook file into various static formats including:
11232
11233 @enumerate
11234 @item HTML
11235 @item LaTeX
11236 @item PDF
11237 @item Reveal JS
11238 @item Markdown (md)
11239 @item ReStructured Text (rst)
11240 @item executable script
11241 @end enumerate\n")
11242 (license license:bsd-3)
11243 (properties `((python2-variant . ,(delay python2-nbconvert))))))
11244
11245 (define-public python2-nbconvert
11246 (let ((parent
11247 (package-with-python2
11248 (strip-python2-variant python-nbconvert))))
11249 (package
11250 (inherit parent)
11251 (version "5.0.0b1")
11252 (source
11253 (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "nbconvert" version))
11256 (sha256
11257 (base32
11258 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
11259 (arguments
11260 `(;; The "bdist_egg" target is disabled by default, causing the installation
11261 ;; to fail.
11262 #:configure-flags (list "bdist_egg")
11263 ;; FIXME: 5 failures, 40 errors.
11264 #:tests? #f))
11265 (propagated-inputs
11266 `(("python-bleach" ,python-bleach)
11267 ("python-entrypoints" ,python-entrypoints)
11268 ("python-jinja2" ,python-jinja2)
11269 ("python-jupyter-core" ,python-jupyter-core)
11270 ("python-mistune" ,python-mistune)
11271 ("python-nbformat" ,python-nbformat)
11272 ("python-pygments" ,python-pygments)
11273 ("python-traitlets" ,python-traitlets))))))
11274
11275 (define-public python-notebook
11276 (package
11277 (name "python-notebook")
11278 (version "6.3.0")
11279 (source (origin
11280 (method url-fetch)
11281 (uri (pypi-uri "notebook" version))
11282 (sha256
11283 (base32
11284 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11285 (build-system python-build-system)
11286 (arguments
11287 `(#:phases
11288 (modify-phases %standard-phases
11289 (replace 'check
11290 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11291 ;; These tests require a browser
11292 (delete-file-recursively "notebook/tests/selenium")
11293 (when tests?
11294 (add-installed-pythonpath inputs outputs)
11295 ;; Some tests do not expect all files to be installed in the
11296 ;; same directory, but JUPYTER_PATH contains multiple entries.
11297 (unsetenv "JUPYTER_PATH")
11298 ;; Some tests need HOME
11299 (setenv "HOME" "/tmp")
11300 (with-directory-excursion "/tmp"
11301 (invoke "pytest" "-vv"
11302 ;; TODO: This tests fails because nbconvert does not
11303 ;; list "python" as a format.
11304 "-k" "not test_list_formats"))))))))
11305 (propagated-inputs
11306 `(("python-argon2-cffi" ,python-argon2-cffi)
11307 ("python-ipykernel" ,python-ipykernel)
11308 ("python-ipython-genutils" ,python-ipython-genutils)
11309 ("python-jinja2" ,python-jinja2)
11310 ("python-jupyter-client" ,python-jupyter-client)
11311 ("python-jupyter-core" ,python-jupyter-core)
11312 ("python-nbconvert" ,python-nbconvert)
11313 ("python-nbformat" ,python-nbformat)
11314 ("python-prometheus-client" ,python-prometheus-client)
11315 ("python-pyzmq" ,python-pyzmq)
11316 ("python-send2trash" ,python-send2trash)
11317 ("python-terminado" ,python-terminado)
11318 ("python-tornado" ,python-tornado-6)
11319 ("python-traitlets" ,python-traitlets)))
11320 (native-inputs
11321 `(("python-coverage" ,python-coverage)
11322 ("python-nbval" ,python-nbval)
11323 ("python-pytest" ,python-pytest)
11324 ("python-pytest-cov" ,python-pytest-cov)
11325 ("python-requests" ,python-requests)
11326 ("python-requests-unixsocket" ,python-requests-unixsocket)))
11327 (home-page "https://jupyter.org/")
11328 (synopsis "Web-based notebook environment for interactive computing")
11329 (description
11330 "The Jupyter HTML notebook is a web-based notebook environment for
11331 interactive computing.")
11332 (license license:bsd-3)))
11333
11334 (define-public python-widgetsnbextension
11335 (package
11336 (name "python-widgetsnbextension")
11337 (version "3.5.1")
11338 (source
11339 (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "widgetsnbextension" version))
11342 (sha256
11343 (base32
11344 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
11345 (build-system python-build-system)
11346 (propagated-inputs
11347 `(("python-notebook" ,python-notebook)))
11348 (home-page "https://ipython.org")
11349 (synopsis "IPython HTML widgets for Jupyter")
11350 (description "This package provides interactive HTML widgets for Jupyter
11351 notebooks.")
11352 (license license:bsd-3)))
11353
11354 (define-public python-ipywidgets
11355 (package
11356 (name "python-ipywidgets")
11357 (version "7.6.3")
11358 (source
11359 (origin
11360 (method url-fetch)
11361 (uri (pypi-uri "ipywidgets" version))
11362 (sha256
11363 (base32
11364 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
11365 (build-system python-build-system)
11366 (propagated-inputs
11367 `(("python-ipykernel" ,python-ipykernel)
11368 ("python-ipython" ,python-ipython)
11369 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
11370 ("python-nbformat" ,python-nbformat)
11371 ("python-traitlets" ,python-traitlets)
11372 ("python-widgetsnbextension" ,python-widgetsnbextension)))
11373 (native-inputs
11374 `(("python-mock" ,python-mock)
11375 ("python-pytest" ,python-pytest)
11376 ("python-pytest-cov" ,python-pytest-cov)))
11377 (home-page "https://ipython.org")
11378 (synopsis "IPython HTML widgets for Jupyter")
11379 (description "Ipywidgets are interactive HTML widgets for Jupyter
11380 notebooks and the IPython kernel. Notebooks come alive when interactive
11381 widgets are used. Users gain control of their data and can visualize changes
11382 in the data.")
11383 (license license:bsd-3)))
11384
11385 (define-public python-jupyter-console
11386 (package
11387 (name "python-jupyter-console")
11388 (version "6.1.0")
11389 (source
11390 (origin
11391 (method url-fetch)
11392 (uri (pypi-uri "jupyter_console" version))
11393 (sha256
11394 (base32
11395 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
11396 (build-system python-build-system)
11397 (propagated-inputs
11398 `(("python-ipykernel" ,python-ipykernel)
11399 ("python-jupyter-client" ,python-jupyter-client)
11400 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
11401 ("python-pygments" ,python-pygments)))
11402 (native-inputs
11403 `(("python-nose" ,python-nose)))
11404 (home-page "https://jupyter.org")
11405 (synopsis "Jupyter terminal console")
11406 (description "This package provides a terminal-based console frontend for
11407 Jupyter kernels. It also allows for console-based interaction with non-Python
11408 Jupyter kernels such as IJulia and IRKernel.")
11409 (license license:bsd-3)))
11410
11411 ;; The python-ipython and python-jupyter-console require each other. To get
11412 ;; the functionality in both packages working, strip down the
11413 ;; python-jupyter-console package when using it as an input to python-ipython.
11414 (define python-jupyter-console-minimal
11415 (package/inherit python-jupyter-console
11416 (name "python-jupyter-console-minimal")
11417 (arguments
11418 (substitute-keyword-arguments
11419 (package-arguments python-jupyter-console)
11420 ((#:phases phases)
11421 `(modify-phases ,phases
11422 (add-after 'install 'delete-bin
11423 (lambda* (#:key outputs #:allow-other-keys)
11424 ;; Delete the bin files, to avoid conflicts in profiles
11425 ;; where python-ipython and python-jupyter-console are
11426 ;; both present.
11427 (delete-file-recursively
11428 (string-append
11429 (assoc-ref outputs "out") "/bin"))))))))
11430 ;; Remove the python-ipython propagated input, to avoid the cycle
11431 (propagated-inputs
11432 (alist-delete
11433 "python-ipython"
11434 (package-propagated-inputs python-jupyter-console)))))
11435
11436 (define-public python-qtconsole
11437 (package
11438 (name "python-qtconsole")
11439 (version "4.4.3")
11440 (source
11441 (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "qtconsole" version))
11444 (sha256
11445 (base32
11446 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
11447 (build-system python-build-system)
11448 (arguments
11449 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
11450 ;; but we only have the LTS version 5.x. This means that there might be
11451 ;; runtime errors, but since this is a dependency of the Jupyter package,
11452 ;; and Jupyter can be used without the qtconsole we can overlook this for
11453 ;; now.
11454 `(#:tests? #f
11455 #:phases
11456 (modify-phases %standard-phases
11457 (add-before 'check 'pre-check
11458 (lambda _
11459 (setenv "QT_QPA_PLATFORM" "offscreen")
11460 #t)))))
11461 (propagated-inputs
11462 `(("python-ipykernel" ,python-ipykernel)
11463 ("python-ipython" ,python-ipython)))
11464 (native-inputs
11465 `(("python-pytest" ,python-pytest)))
11466 (home-page "https://jupyter.org")
11467 (synopsis "Jupyter Qt console")
11468 (description "This package provides a Qt-based console for Jupyter with
11469 support for rich media output.")
11470 (license license:bsd-3)))
11471
11472 (define-public python-jsbeautifier
11473 (package
11474 (name "python-jsbeautifier")
11475 (version "1.10.2")
11476 (home-page "https://github.com/beautify-web/js-beautify")
11477 (source (origin
11478 (method git-fetch)
11479 (uri (git-reference
11480 (url home-page)
11481 (commit (string-append "v" version))))
11482 (file-name (git-file-name name version))
11483 (sha256
11484 (base32
11485 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
11486 (build-system python-build-system)
11487 (arguments
11488 `(#:phases (modify-phases %standard-phases
11489 (add-after 'unpack 'chdir
11490 (lambda _
11491 ;; The upstream Git repository contains all the code,
11492 ;; but this package only builds the python code.
11493 (chdir "python")
11494 #t))
11495 (add-after 'unpack 'patch-python-six-requirements
11496 (lambda _
11497 (substitute* "python/setup.py"
11498 (("six>=1.12.0")
11499 "six>=1.11.0"))
11500 #t)))))
11501 (propagated-inputs
11502 `(("python-editorconfig" ,python-editorconfig)
11503 ("python-six" ,python-six)))
11504 (native-inputs
11505 `(("python-pytest" ,python-pytest)))
11506 (synopsis "JavaScript unobfuscator and beautifier")
11507 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
11508 popular online obfuscators.")
11509 (license license:expat)))
11510
11511 (define-public jupyter
11512 (package
11513 (name "jupyter")
11514 (version "1.0.0")
11515 (source
11516 (origin
11517 (method url-fetch)
11518 (uri (pypi-uri "jupyter" version))
11519 (sha256
11520 (base32
11521 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
11522 (build-system python-build-system)
11523 (arguments '(#:tests? #f)) ; there are none.
11524 (propagated-inputs
11525 `(("python-ipykernel" ,python-ipykernel)
11526 ("python-ipywidgets" ,python-ipywidgets)
11527 ("python-jupyter-console" ,python-jupyter-console)
11528 ("python-nbconvert" ,python-nbconvert)
11529 ("python-notebook" ,python-notebook)
11530 ("python-qtconsole" ,python-qtconsole)))
11531 (home-page "https://jupyter.org")
11532 (synopsis "Web application for interactive documents")
11533 (description
11534 "The Jupyter Notebook is a web application that allows you to create and
11535 share documents that contain live code, equations, visualizations and
11536 explanatory text. Uses include: data cleaning and transformation, numerical
11537 simulation, statistical modeling, machine learning and much more.")
11538 (license license:bsd-3)))
11539
11540 (define-public python-chardet
11541 (package
11542 (name "python-chardet")
11543 (version "3.0.4")
11544 (source
11545 (origin
11546 (method url-fetch)
11547 (uri (pypi-uri "chardet" version))
11548 (sha256
11549 (base32
11550 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
11551 (native-inputs
11552 `(("python-hypothesis" ,python-hypothesis)
11553 ("python-pytest" ,python-pytest)
11554 ("python-pytest-runner" ,python-pytest-runner)))
11555 (build-system python-build-system)
11556 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
11557 (arguments `(#:tests? #f))
11558 (home-page "https://github.com/chardet/chardet")
11559 (synopsis "Universal encoding detector for Python 2 and 3")
11560 (description
11561 "This package provides @code{chardet}, a Python module that can
11562 automatically detect a wide range of file encodings.")
11563 (license license:lgpl2.1+)))
11564
11565 (define-public python2-chardet
11566 (package-with-python2 python-chardet))
11567
11568 (define-public python-docopt
11569 (package
11570 (name "python-docopt")
11571 (version "0.6.2")
11572 (source
11573 (origin
11574 (method git-fetch)
11575 ;; The release on PyPI does not include tests.
11576 (uri (git-reference
11577 (url "https://github.com/docopt/docopt")
11578 (commit version)))
11579 (file-name (git-file-name name version))
11580 (sha256
11581 (base32
11582 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
11583 (build-system python-build-system)
11584 (native-inputs
11585 `(("python-pytest" ,python-pytest)))
11586 (arguments
11587 `(#:phases
11588 (modify-phases %standard-phases
11589 (replace 'check
11590 (lambda _ (invoke "py.test"))))))
11591 (home-page "http://docopt.org")
11592 (synopsis "Command-line interface description language for Python")
11593 (description "This library allows the user to define a command-line
11594 interface from a program's help message rather than specifying it
11595 programmatically with command-line parsers like @code{getopt} and
11596 @code{argparse}.")
11597 (license license:expat)))
11598
11599 (define-public python2-docopt
11600 (package-with-python2 python-docopt))
11601
11602 (define-public python-pythondialog
11603 (package
11604 (name "python-pythondialog")
11605 (version "3.4.0")
11606 (source
11607 (origin
11608 (method url-fetch)
11609 (uri (pypi-uri "pythondialog" version))
11610 (sha256
11611 (base32
11612 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
11613 (build-system python-build-system)
11614 (arguments
11615 `(#:phases
11616 (modify-phases %standard-phases
11617 (add-after 'unpack 'patch-path
11618 (lambda* (#:key inputs #:allow-other-keys)
11619 (let* ((dialog (assoc-ref inputs "dialog")))
11620 ;; Since this library really wants to grovel the search path, we
11621 ;; must hardcode dialog's store path into it.
11622 (substitute* "dialog.py"
11623 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
11624 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
11625 #t))))
11626 #:tests? #f)) ; no test suite
11627 (propagated-inputs
11628 `(("dialog" ,dialog)))
11629 (home-page "http://pythondialog.sourceforge.net/")
11630 (synopsis "Python interface to the UNIX dialog utility")
11631 (description "A Python wrapper for the dialog utility. Its purpose is to
11632 provide an easy to use, pythonic and comprehensive Python interface to dialog.
11633 This allows one to make simple text-mode user interfaces on Unix-like systems")
11634 (license license:lgpl2.1)
11635 (properties `((python2-variant . ,(delay python2-pythondialog))))))
11636
11637 (define-public python2-pythondialog
11638 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
11639 (package
11640 (inherit base)
11641 (version (package-version python-pythondialog))
11642 (source (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "python2-pythondialog" version))
11645 (sha256
11646 (base32
11647 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11648
11649 (define-public python-configobj
11650 (package
11651 (name "python-configobj")
11652 (version "5.0.6")
11653 (source (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "configobj" version))
11656 (sha256
11657 (base32
11658 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11659 ;; Patch setup.py so it looks for python-setuptools, which is
11660 ;; required to parse the keyword 'install_requires' in setup.py.
11661 (patches (search-patches "python-configobj-setuptools.patch"))))
11662 (build-system python-build-system)
11663 (propagated-inputs
11664 `(("python-six" ,python-six)))
11665 (synopsis "Config file reading, writing and validation")
11666 (description "ConfigObj is a simple but powerful config file reader and
11667 writer: an ini file round tripper. Its main feature is that it is very easy to
11668 use, with a straightforward programmer’s interface and a simple syntax for
11669 config files.")
11670 (home-page "https://github.com/DiffSK/configobj")
11671 (license license:bsd-3)))
11672
11673 (define-public python2-configobj
11674 (package-with-python2 python-configobj))
11675
11676 (define-public python-configargparse
11677 (package
11678 (name "python-configargparse")
11679 (version "1.2.3")
11680 (source (origin
11681 (method url-fetch)
11682 (uri (pypi-uri "ConfigArgParse" version))
11683 (sha256
11684 (base32
11685 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11686 (build-system python-build-system)
11687 (native-inputs
11688 `(("python-pyyaml" ,python-pyyaml)))
11689 (arguments
11690 `(#:phases
11691 (modify-phases %standard-phases
11692 (replace 'check
11693 (lambda _
11694 ;; Bypass setuptools-shim because one test relies on "setup.py"
11695 ;; being the first argument passed to the python call.
11696 ;;
11697 ;; NOTE: Many tests do not run because they rely on Python's
11698 ;; built-in test.test_argparse, but we remove the unit tests from
11699 ;; our Python installation.
11700 (invoke "python" "setup.py" "test"))))))
11701 (synopsis "Replacement for argparse")
11702 (description "A drop-in replacement for argparse that allows options to also
11703 be set via config files and/or environment variables.")
11704 (home-page "https://github.com/bw2/ConfigArgParse")
11705 (license license:expat)))
11706
11707 (define-public python-argparse-manpage
11708 (package
11709 (name "python-argparse-manpage")
11710 (version "1.1")
11711 (source
11712 (origin
11713 (method url-fetch)
11714 (uri (pypi-uri "argparse-manpage" version))
11715 (sha256
11716 (base32
11717 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11718 (build-system python-build-system)
11719 (home-page "https://github.com/praiskup/argparse-manpage")
11720 (synopsis "Build manual page from Python's ArgumentParser object")
11721 (description
11722 "This package provides tools to build manual pages from Python's
11723 @code{ArgumentParser} object.")
11724 (license license:asl2.0)))
11725
11726 (define-public python-contextlib2
11727 (package
11728 (name "python-contextlib2")
11729 (version "0.6.0.post1")
11730 (source
11731 (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "contextlib2" version))
11734 (sha256
11735 (base32
11736 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11737 (build-system python-build-system)
11738 (home-page "https://contextlib2.readthedocs.org/")
11739 (synopsis "Tools for decorators and context managers")
11740 (description "This module is primarily a backport of the Python
11741 3.2 contextlib to earlier Python versions. Like contextlib, it
11742 provides utilities for common tasks involving decorators and context
11743 managers. It also contains additional features that are not part of
11744 the standard library.")
11745 (properties `((python2-variant . ,(delay python2-contextlib2))))
11746 (license license:psfl)))
11747
11748 (define-public python2-contextlib2
11749 (let ((base (package-with-python2
11750 (strip-python2-variant python-contextlib2))))
11751 (package/inherit base
11752 (arguments
11753 (substitute-keyword-arguments (package-arguments base)
11754 ((#:phases phases)
11755 `(modify-phases ,phases
11756 (replace 'check
11757 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11758 (native-inputs
11759 `(("python2-unittest2" ,python2-unittest2))))))
11760
11761 ;; This package is used by python2-pytest via python2-importlib-metadata,
11762 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11763 (define-public python2-contextlib2-bootstrap
11764 (hidden-package
11765 (package/inherit
11766 python2-contextlib2
11767 (name "python2-contextlib2-bootstrap")
11768 (arguments
11769 `(#:tests? #f
11770 ,@(package-arguments python2-contextlib2)))
11771 (native-inputs '()))))
11772
11773 (define-public python-texttable
11774 (package
11775 (name "python-texttable")
11776 (version "1.6.2")
11777 (source
11778 (origin
11779 (method url-fetch)
11780 (uri (pypi-uri "texttable" version))
11781 (sha256
11782 (base32
11783 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11784 (build-system python-build-system)
11785 (arguments
11786 `(#:phases
11787 (modify-phases %standard-phases
11788 (replace 'check
11789 (lambda _ (invoke "pytest" "tests.py"))))))
11790 (native-inputs
11791 `(("python-pytest" ,python-pytest)))
11792 (home-page "https://github.com/foutaise/texttable/")
11793 (synopsis "Python module for creating simple ASCII tables")
11794 (description "Texttable is a Python module for creating simple ASCII
11795 tables.")
11796 (license license:expat)))
11797
11798 (define-public python2-texttable
11799 (package-with-python2 python-texttable))
11800
11801 (define-public python-atomicwrites
11802 (package
11803 (name "python-atomicwrites")
11804 (version "1.3.0")
11805 (source (origin
11806 (method url-fetch)
11807 (uri (pypi-uri "atomicwrites" version))
11808 (sha256
11809 (base32
11810 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
11811 (build-system python-build-system)
11812 (synopsis "Atomic file writes in Python")
11813 (description "Library for atomic file writes using platform dependent tools
11814 for atomic file system operations.")
11815 (home-page "https://github.com/untitaker/python-atomicwrites")
11816 (license license:expat)))
11817
11818 (define-public python2-atomicwrites
11819 (package-with-python2 python-atomicwrites))
11820
11821 (define-public python-qstylizer
11822 (package
11823 (name "python-qstylizer")
11824 (version "0.1.10")
11825 (source
11826 (origin
11827 (method git-fetch)
11828 (uri (git-reference
11829 (url "https://github.com/blambright/qstylizer")
11830 (commit version)))
11831 (file-name (git-file-name name version))
11832 (sha256
11833 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
11834 (build-system python-build-system)
11835 (arguments
11836 `(#:test-target "pytest"
11837 #:phases
11838 (modify-phases %standard-phases
11839 (add-before 'build 'set-pbr-version
11840 (lambda _
11841 (setenv "PBR_VERSION" "3.0.1"))))))
11842 (native-inputs
11843 `(("python-pbr" ,python-pbr)
11844 ("python-pytest" ,python-pytest)
11845 ("python-pytest-catchlog" ,python-pytest-catchlog)
11846 ("python-pytest-cov" ,python-pytest-cov)
11847 ("python-pytest-mock" ,python-pytest-mock)
11848 ("python-pytest-runner" ,python-pytest-runner)
11849 ("python-pytest-xdist" ,python-pytest-xdist)))
11850 (propagated-inputs
11851 `(("python-inflection" ,python-inflection)
11852 ("python-tinycss" ,python-tinycss)))
11853 (home-page "https://github.com/blambright/qstylizer")
11854 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
11855 (description "@code{qstylizer} is a Python package designed to help with
11856 the construction of PyQt/PySide stylesheets.")
11857 (license license:expat)))
11858
11859 (define-public python-click-threading
11860 (package
11861 (name "python-click-threading")
11862 (version "0.4.4")
11863 (source (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "click-threading" version))
11866 (sha256
11867 (base32
11868 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11869 (build-system python-build-system)
11870 (propagated-inputs
11871 `(("python-click" ,python-click)))
11872 (synopsis "Utilities for multithreading in Click")
11873 (description "This package provides utilities for multithreading in Click
11874 applications.")
11875 (home-page "https://github.com/click-contrib/click-threading")
11876 (license license:expat)))
11877
11878 (define-public python-click-log
11879 (package
11880 (name "python-click-log")
11881 (version "0.3.2")
11882 (source (origin
11883 (method url-fetch)
11884 (uri (pypi-uri "click-log" version))
11885 (sha256
11886 (base32
11887 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11888 (build-system python-build-system)
11889 (propagated-inputs
11890 `(("python-click" ,python-click)))
11891 (synopsis "Logging for click applications")
11892 (description "This package provides a Python library for logging Click
11893 applications.")
11894 (home-page "https://github.com/click-contrib/click-log")
11895 (license license:expat)))
11896
11897 (define-public python-click-default-group
11898 (package
11899 (name "python-click-default-group")
11900 (version "1.2.2")
11901 (source (origin
11902 (method url-fetch)
11903 (uri (pypi-uri "click-default-group" version))
11904 (sha256
11905 (base32
11906 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11907 (build-system python-build-system)
11908 (arguments
11909 `(#:tests? #f)) ; no target
11910 (propagated-inputs
11911 `(("python-click" ,python-click)))
11912 (synopsis "Extends click.Group")
11913 (description "This package extends click.Group to invoke a command without
11914 explicit subcommand name.")
11915 (home-page "https://github.com/click-contrib/click-default-group")
11916 (license license:bsd-3)))
11917
11918 (define-public python-structlog
11919 (package
11920 (name "python-structlog")
11921 (version "20.2.0")
11922 (source
11923 (origin
11924 (method url-fetch)
11925 (uri (pypi-uri "structlog" version))
11926 (sha256
11927 (base32
11928 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11929 (build-system python-build-system)
11930 (arguments
11931 `(#:phases
11932 (modify-phases %standard-phases
11933 (replace 'check
11934 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11935 (when tests?
11936 (add-installed-pythonpath inputs outputs)
11937 (invoke "pytest"))
11938 #t)))))
11939 (native-inputs
11940 `(("python-coverage" ,python-coverage)
11941 ("python-freezegun" ,python-freezegun)
11942 ("python-pretend" ,python-pretend)
11943 ("python-pytest" ,python-pytest)
11944 ("python-pytest-asyncio" ,python-pytest-asyncio)
11945 ("python-simplejson" ,python-simplejson)
11946 ("python-twisted" ,python-twisted)))
11947 (home-page "https://www.structlog.org/")
11948 (synopsis "Structured Logging for Python")
11949 (description "@code{structlog} changes logging in Python by adding structure
11950 to your log entries.")
11951 (license (list license:asl2.0 license:expat))))
11952
11953 (define-public python-apipkg
11954 (package
11955 (name "python-apipkg")
11956 (version "1.5")
11957 (source (origin
11958 (method url-fetch)
11959 (uri (pypi-uri "apipkg" version))
11960 (sha256
11961 (base32
11962 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11963 (build-system python-build-system)
11964 (native-inputs
11965 `(("python-pytest" ,python-pytest)
11966 ("python-setuptools-scm" ,python-setuptools-scm)))
11967 (synopsis "Namespace control and lazy-import mechanism")
11968 (description "With apipkg you can control the exported namespace of a Python
11969 package and greatly reduce the number of imports for your users. It is a small
11970 pure Python module that works on virtually all Python versions.")
11971 (home-page "https://github.com/pytest-dev/apipkg")
11972 (license license:expat)))
11973
11974 (define-public python-execnet
11975 (package
11976 (name "python-execnet")
11977 (version "1.4.1")
11978 (source (origin
11979 (method url-fetch)
11980 (uri (pypi-uri "execnet" version))
11981 (sha256
11982 (base32
11983 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11984 (build-system python-build-system)
11985 (arguments
11986 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11987 ;; The two test failures are caused by the lack of an `ssh` executable.
11988 ;; The test suite can be run with pytest after the 'install' phase.
11989 #:tests? #f))
11990 (native-inputs
11991 `(("python-pytest" ,python-pytest)
11992 ("python-setuptools-scm" ,python-setuptools-scm)))
11993 (propagated-inputs
11994 `(("python-apipkg" ,python-apipkg)))
11995 (synopsis "Rapid multi-Python deployment")
11996 (description "Execnet provides a share-nothing model with
11997 channel-send/receive communication for distributing execution across many
11998 Python interpreters across version, platform and network barriers. It has a
11999 minimal and fast API targeting the following uses:
12000 @enumerate
12001 @item distribute tasks to (many) local or remote CPUs
12002 @item write and deploy hybrid multi-process applications
12003 @item write scripts to administer multiple environments
12004 @end enumerate")
12005 (home-page "https://codespeak.net/execnet/")
12006 (license license:expat)))
12007
12008 (define-public python2-execnet
12009 (package-with-python2 python-execnet))
12010
12011 (define-public python-icalendar
12012 (package
12013 (name "python-icalendar")
12014 (version "4.0.7")
12015 (source (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "icalendar" version))
12018 (sha256
12019 (base32
12020 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
12021 (build-system python-build-system)
12022 (propagated-inputs
12023 `(("python-dateutil" ,python-dateutil)
12024 ("python-pytz" ,python-pytz)))
12025 (synopsis "Python library for parsing iCalendar files")
12026 (description "The icalendar package is a parser/generator of iCalendar
12027 files for use with Python.")
12028 (home-page "https://github.com/collective/icalendar")
12029 (license license:bsd-2)))
12030
12031 (define-public python-args
12032 (package
12033 (name "python-args")
12034 (version "0.1.0")
12035 (source (origin
12036 (method url-fetch)
12037 (uri (pypi-uri "args" version))
12038 (sha256
12039 (base32
12040 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12041 (build-system python-build-system)
12042 (home-page "https://github.com/kennethreitz/args")
12043 (synopsis "Command-line argument parser")
12044 (description
12045 "This library provides a Python module to parse command-line arguments.")
12046 (license license:bsd-3)))
12047
12048 (define-public python2-args
12049 (package-with-python2 python-args))
12050
12051 (define-public python-clint
12052 (package
12053 (name "python-clint")
12054 (version "0.5.1")
12055 (source (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "clint" version))
12058 (sha256
12059 (base32
12060 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12061 (build-system python-build-system)
12062 (arguments
12063 '(#:phases
12064 (modify-phases %standard-phases
12065 (replace 'check
12066 (lambda _ (invoke "py.test" "-v"))))))
12067 (native-inputs
12068 `(("python-pytest" ,python-pytest)))
12069 (propagated-inputs
12070 `(("python-args" ,python-args)))
12071 (home-page "https://github.com/kennethreitz/clint")
12072 (synopsis "Command-line interface tools")
12073 (description
12074 "Clint is a Python module filled with a set of tools for developing
12075 command-line applications, including tools for colored and indented
12076 output, progress bar display, and pipes.")
12077 (license license:isc)))
12078
12079 (define-public python2-clint
12080 (package-with-python2 python-clint))
12081
12082 (define-public python-rply
12083 (package
12084 (name "python-rply")
12085 (version "0.7.8")
12086 (source (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "rply" version))
12089 (sha256
12090 (base32
12091 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12092 (build-system python-build-system)
12093 (propagated-inputs
12094 `(("python-appdirs" ,python-appdirs)))
12095 (home-page "https://github.com/alex/rply")
12096 (synopsis "Parser generator for Python")
12097 (description
12098 "This package provides a pure Python based parser generator, that also
12099 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12100 with a new public API, and RPython support.")
12101 (license license:bsd-3)))
12102
12103 (define-public python2-rply
12104 (package-with-python2 python-rply))
12105
12106 (define-public python-hy
12107 (package
12108 (name "python-hy")
12109 (version "0.18.0")
12110 (source (origin
12111 (method url-fetch)
12112 (uri (pypi-uri "hy" version))
12113 (sha256
12114 (base32
12115 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12116 (build-system python-build-system)
12117 (arguments
12118 '(#:phases
12119 (modify-phases %standard-phases
12120 (add-before 'install 'set-HOME
12121 (lambda _
12122 (setenv "HOME" "/tmp") #t))
12123 (replace 'check
12124 (lambda _
12125 ;; Tests require write access to HOME.
12126 (setenv "HOME" "/tmp")
12127 (invoke "nosetests"))))))
12128 (native-inputs
12129 `(("python-coverage" ,python-coverage)
12130 ("python-nose" ,python-nose)))
12131 (propagated-inputs
12132 `(("python-astor" ,python-astor)
12133 ("python-colorama" ,python-colorama)
12134 ("python-rply" ,python-rply)
12135 ("python-funcparserlib"
12136 ,python-funcparserlib)))
12137 (home-page "http://hylang.org/")
12138 (synopsis "Lisp frontend to Python")
12139 (description
12140 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12141 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12142 Python at your fingertips, in Lisp form.")
12143 (license license:expat)))
12144
12145 (define-public python-hissp
12146 (package
12147 (name "python-hissp")
12148 (version "0.2.0")
12149 (source
12150 (origin
12151 (method url-fetch)
12152 (uri (pypi-uri "hissp" version))
12153 (sha256
12154 (base32
12155 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12156 (build-system python-build-system)
12157 (home-page "https://github.com/gilch/hissp")
12158 (synopsis "It's Python with a Lissp")
12159 (description "Hissp is a modular Lisp implementation that compiles to a
12160 functional subset of Python—Syntactic macro metaprogramming with full access
12161 to the Python ecosystem.")
12162 (license license:asl2.0)))
12163
12164 (define-public python2-functools32
12165 (package
12166 (name "python2-functools32")
12167 (version "3.2.3-2")
12168 (source
12169 (origin
12170 (method url-fetch)
12171 (uri (pypi-uri "functools32" version))
12172 (sha256
12173 (base32
12174 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12175 (build-system python-build-system)
12176 (arguments
12177 `(#:python ,python-2
12178 #:tests? #f)) ; no test target
12179 (home-page "https://github.com/MiCHiLU/python-functools32")
12180 (synopsis
12181 "Backport of the functools module from Python 3.2.3")
12182 (description
12183 "This package is a backport of the @code{functools} module from Python
12184 3.2.3 for use with older versions of Python and PyPy.")
12185 (license license:expat)))
12186
12187 (define-public python2-subprocess32
12188 (package
12189 (name "python2-subprocess32")
12190 (version "3.2.7")
12191 (source (origin
12192 (method url-fetch)
12193 (uri (pypi-uri "subprocess32" version))
12194 (sha256
12195 (base32
12196 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12197 (patches
12198 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12199 (build-system python-build-system)
12200 (arguments
12201 `(#:python ,python-2
12202 ;; The test suite fails with Python > 2.7.13:
12203 ;; import test.support
12204 ;; ImportError: No module named support
12205 #:tests? #f
12206 #:phases
12207 (modify-phases %standard-phases
12208 (add-after 'unpack 'patch-/bin/sh
12209 (lambda _
12210 (substitute* '("subprocess32.py"
12211 "test_subprocess32.py")
12212 (("/bin/sh") (which "sh")))
12213 #t)))))
12214 (home-page "https://github.com/google/python-subprocess32")
12215 (synopsis "Backport of the subprocess module from Python 3.2")
12216 (description
12217 "This is a backport of the @code{subprocess} standard library module
12218 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12219 new features. On POSIX systems it is guaranteed to be reliable when used
12220 in threaded applications. It includes timeout support from Python 3.3 but
12221 otherwise matches 3.2’s API.")
12222 (license license:psfl)))
12223
12224 (define-public python2-futures
12225 (package
12226 (name "python2-futures")
12227 (version "3.2.0")
12228 (source
12229 (origin
12230 (method url-fetch)
12231 (uri (pypi-uri "futures" version))
12232 (sha256
12233 (base32
12234 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12235 (build-system python-build-system)
12236 (arguments
12237 `(#:python ,python-2
12238 #:phases
12239 (modify-phases %standard-phases
12240 (replace 'check
12241 (lambda _
12242 (invoke "python" "test_futures.py")
12243 #t)))))
12244 (home-page "https://github.com/agronholm/pythonfutures")
12245 (synopsis
12246 "Backport of the concurrent.futures package from Python 3.2")
12247 (description
12248 "The concurrent.futures module provides a high-level interface for
12249 asynchronously executing callables. This package backports the
12250 concurrent.futures package from Python 3.2")
12251 (license license:bsd-3)))
12252
12253 (define-public python-promise
12254 (package
12255 (name "python-promise")
12256 (version "0.4.2")
12257 (source
12258 (origin
12259 (method url-fetch)
12260 (uri (pypi-uri "promise" version))
12261 (sha256
12262 (base32
12263 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12264 (build-system python-build-system)
12265 ;; Tests wants python-futures, which is a python2 only program, and
12266 ;; can't be found by python-promise at test time.
12267 (arguments `(#:tests? #f))
12268 (home-page "https://github.com/syrusakbary/promise")
12269 (synopsis "Promises/A+ implementation for Python")
12270 (description
12271 "Promises/A+ implementation for Python")
12272 (properties `((python2-variant . ,(delay python2-promise))))
12273 (license license:expat)))
12274
12275 (define-public python2-promise
12276 (let ((promise (package-with-python2
12277 (strip-python2-variant python-promise))))
12278 (package/inherit promise
12279 (arguments (substitute-keyword-arguments (package-arguments promise)
12280 ((#:tests? _) #t)))
12281 (native-inputs
12282 `(("python2-futures" ,python2-futures)
12283 ("python2-pytest" ,python2-pytest)
12284 ,@(package-native-inputs promise))))))
12285
12286 (define-public python-progressbar2
12287 (package
12288 (name "python-progressbar2")
12289 (version "3.51.3")
12290 (source
12291 (origin
12292 (method url-fetch)
12293 (uri (pypi-uri "progressbar2" version))
12294 (sha256
12295 (base32
12296 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
12297 (build-system python-build-system)
12298 (propagated-inputs
12299 `(("python-six" ,python-six)
12300 ("python-utils" ,python-utils)))
12301 (native-inputs
12302 `(("python-flake8" ,python-flake8)
12303 ("python-freezegun" ,python-freezegun)
12304 ("python-pycodestyle" ,python-pycodestyle)
12305 ("python-pytest" ,python-pytest)
12306 ("python-pytest-cache" ,python-pytest-cache)
12307 ("python-pytest-cov" ,python-pytest-cov)
12308 ("python-pytest-flakes" ,python-pytest-flakes)
12309 ("python-pytest-pep8" ,python-pytest-pep8)
12310 ("python-sphinx" ,python-sphinx)))
12311 (home-page "https://github.com/WoLpH/python-progressbar")
12312 (synopsis "Text progress bar library for Python")
12313 (description
12314 "This package provides a Python progressbar library to provide
12315 visual (yet text based) progress to long running operations.")
12316 (license license:bsd-3)))
12317
12318 (define-public python-progressbar33
12319 (package
12320 (name "python-progressbar33")
12321 (version "2.4")
12322 (source
12323 (origin
12324 (method url-fetch)
12325 (uri (pypi-uri "progressbar33" version))
12326 (sha256
12327 (base32
12328 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
12329 (build-system python-build-system)
12330 (home-page "https://github.com/germangh/python-progressbar")
12331 (synopsis "Text progress bar library for Python")
12332 (description
12333 "This package provides a text progress bar library for Python. This
12334 version only differs from the original @code{progressbar} package in that it
12335 uses relative package imports instead of absolute imports, which is necessary
12336 for the module to work under Python 3.3.")
12337 ;; Either or both of these licenses may be selected.
12338 (license (list license:lgpl2.1+ license:bsd-3))))
12339
12340 (define-public python-colorama
12341 (package
12342 (name "python-colorama")
12343 (version "0.4.4")
12344 (source
12345 (origin
12346 (method url-fetch)
12347 (uri (pypi-uri "colorama" version))
12348 (sha256
12349 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
12350 (build-system python-build-system)
12351 (synopsis "Colored terminal text rendering for Python")
12352 (description "Colorama is a Python library for rendering colored terminal
12353 text.")
12354 (home-page "https://pypi.org/project/colorama/")
12355 (license license:bsd-3)))
12356
12357 (define-public python2-colorama
12358 (package-with-python2 python-colorama))
12359
12360 (define-public python-moto
12361 (package
12362 (name "python-moto")
12363 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
12364 (version "1.3.16.dev134")
12365 (source (origin
12366 (method url-fetch)
12367 (uri (pypi-uri "moto" version))
12368 (sha256
12369 (base32
12370 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
12371 (build-system python-build-system)
12372 (arguments
12373 `(#:phases (modify-phases %standard-phases
12374 (add-after 'unpack 'patch-hardcoded-executable-names
12375 (lambda _
12376 (substitute* "moto/batch/models.py"
12377 (("/bin/sh")
12378 (which "sh")))
12379 (substitute* (find-files "tests" "\\.py$")
12380 (("#!/bin/bash")
12381 (string-append "#!" (which "bash"))))
12382 #t))
12383 (replace 'check
12384 (lambda _
12385 (setenv "PYTHONPATH" (string-append "./build/lib:"
12386 (getenv "PYTHONPATH")))
12387 (invoke "pytest" "-vv" "-m" "not network"
12388 ;; These tests require Docker.
12389 "-k" "not test_terminate_job \
12390 and not test_invoke_function_from_sqs_exception"))))))
12391 (native-inputs
12392 `(("python-flask" ,python-flask)
12393 ("python-flask-cors" ,python-flask-cors)
12394 ("python-freezegun" ,python-freezegun)
12395 ("python-parameterized" ,python-parameterized)
12396 ("python-pytest" ,python-pytest)
12397 ("python-sure" ,python-sure)))
12398 (propagated-inputs
12399 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
12400 ("python-boto" ,python-boto)
12401 ("python-boto3" ,python-boto3)
12402 ("python-botocore" ,python-botocore)
12403 ("python-cfn-lint" ,python-cfn-lint)
12404 ("python-cryptography" ,python-cryptography)
12405 ("python-dateutil" ,python-dateutil)
12406 ("python-docker" ,python-docker)
12407 ("python-idna" ,python-idna)
12408 ("python-jinja2" ,python-jinja2)
12409 ("python-jose" ,python-jose)
12410 ("python-jsondiff" ,python-jsondiff)
12411 ("python-mock" ,python-mock)
12412 ("python-pytz" ,python-pytz)
12413 ("python-pyyaml" ,python-pyyaml)
12414 ("python-requests" ,python-requests)
12415 ("python-responses" ,python-responses)
12416 ("python-six" ,python-six)
12417 ("python-sshpubkeys" ,python-sshpubkeys)
12418 ("python-werkzeug" ,python-werkzeug)
12419 ("python-xmltodict" ,python-xmltodict)))
12420 (home-page "https://github.com/spulec/moto")
12421 (synopsis "Mock out the boto library")
12422 (description
12423 "@code{moto} is a library designed to easily mock out the
12424 @code{boto} library.")
12425 (license license:asl2.0)))
12426
12427 (define-public python-rsa
12428 (package
12429 (name "python-rsa")
12430 (version "3.4.2")
12431 (source
12432 (origin
12433 (method url-fetch)
12434 (uri (pypi-uri "rsa" version))
12435 (sha256
12436 (base32
12437 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
12438 (build-system python-build-system)
12439 (propagated-inputs
12440 `(("python-pyasn1" ,python-pyasn1)))
12441 (synopsis "Pure-Python RSA implementation")
12442 (description "Python-RSA is a pure-Python RSA implementation. It supports
12443 encryption and decryption, signing and verifying signatures, and key
12444 generation according to PKCS#1 version 1.5. It can be used as a Python
12445 library as well as on the command line.")
12446 (home-page "https://stuvel.eu/rsa")
12447 (license license:asl2.0)))
12448
12449 (define-public python2-rsa
12450 (package-with-python2 python-rsa))
12451
12452 (define-public python-pluggy
12453 (package
12454 (name "python-pluggy")
12455 (version "0.13.1")
12456 (source
12457 (origin
12458 (method url-fetch)
12459 (uri (pypi-uri "pluggy" version))
12460 (sha256
12461 (base32
12462 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
12463 (build-system python-build-system)
12464 (native-inputs
12465 `(("python-setuptools-scm" ,python-setuptools-scm)))
12466 (synopsis "Plugin and hook calling mechanism for Python")
12467 (description "Pluggy is an extraction of the plugin manager as used by
12468 Pytest but stripped of Pytest specific details.")
12469 (home-page "https://pypi.org/project/pluggy/")
12470 (properties `((python2-variant . ,(delay python2-pluggy))))
12471 (license license:expat)))
12472
12473 (define-public python2-pluggy
12474 (let ((base (package-with-python2 (strip-python2-variant
12475 python-pluggy))))
12476 (package/inherit
12477 base
12478 (propagated-inputs
12479 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
12480
12481 ;; This package requires python2-importlib-metadata, but that package
12482 ;; ends up needing python2-pluggy via python2-pytest, so we need this
12483 ;; variant to solve the circular dependency.
12484 (define-public python2-pluggy-bootstrap
12485 (hidden-package
12486 (package/inherit
12487 python2-pluggy
12488 (name "python2-pluggy-bootstrap")
12489 (arguments
12490 `(#:tests? #f
12491 ,@(package-arguments python2-pluggy)))
12492 (propagated-inputs
12493 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
12494
12495 (define-public python-plumbum
12496 (package
12497 (name "python-plumbum")
12498 (version "1.7.0")
12499 (source
12500 (origin
12501 (method url-fetch)
12502 (uri (pypi-uri "plumbum" version))
12503 (sha256
12504 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
12505 (build-system python-build-system)
12506 (arguments
12507 `(#:tests? #f)) ;no tests
12508 (native-inputs
12509 ;; XXX: Not actually used since there are no tests but required for
12510 ;; build.
12511 `(("python-pytest" ,python-pytest)))
12512 (home-page "https://plumbum.readthedocs.io")
12513 (synopsis "Python shell combinators library")
12514 (description
12515 "Plumbum is a library of tools for replacing shell scripts with Python
12516 code.")
12517 (license license:expat)))
12518
12519 (define-public python-deprecation
12520 (package
12521 (name "python-deprecation")
12522 (version "2.1.0")
12523 (source
12524 (origin
12525 (method url-fetch)
12526 (uri (pypi-uri "deprecation" version))
12527 (sha256
12528 (base32
12529 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
12530 (build-system python-build-system)
12531 (propagated-inputs
12532 `(("python-packaging" ,python-packaging)))
12533 (native-inputs
12534 `(("python-unittest2" ,python-unittest2)))
12535 (home-page "https://deprecation.readthedocs.io/")
12536 (synopsis "Python library to handle automated deprecations")
12537 (description
12538 "This is a library that enables automated deprecations. It offers the
12539 @code{deprecated()} decorator to wrap functions, providing proper warnings
12540 both in documentation and via Python’s warnings system, as well as the
12541 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
12542 that deprecated code is eventually removed.")
12543 (license license:asl2.0)))
12544
12545 (define-public python-tox
12546 (package
12547 (name "python-tox")
12548 (version "3.20.0")
12549 (source
12550 (origin
12551 (method url-fetch)
12552 (uri (pypi-uri "tox" version))
12553 (sha256
12554 (base32
12555 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
12556 (build-system python-build-system)
12557 (arguments
12558 ;; FIXME: Tests require pytest-timeout, which itself requires
12559 ;; pytest>=2.8.0 for installation.
12560 '(#:tests? #f))
12561 (propagated-inputs
12562 `(("python-filelock" ,python-filelock)
12563 ("python-packaging" ,python-packaging)
12564 ("python-pluggy" ,python-pluggy)
12565 ("python-py" ,python-py)
12566 ("python-six" ,python-six)
12567 ("python-toml" ,python-toml)
12568 ("python-virtualenv" ,python-virtualenv)))
12569 (native-inputs
12570 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
12571 ("python-pytest" ,python-pytest) ; >= 2.3.5
12572 ("python-setuptools-scm" ,python-setuptools-scm)))
12573 (home-page "https://tox.readthedocs.io")
12574 (synopsis "Virtualenv-based automation of test activities")
12575 (description "Tox is a generic virtualenv management and test command line
12576 tool. It can be used to check that a package installs correctly with
12577 different Python versions and interpreters, or run tests in each type of
12578 supported environment, or act as a frontend to continuous integration
12579 servers.")
12580 (license license:expat)))
12581
12582 (define-public python-jmespath
12583 (package
12584 (name "python-jmespath")
12585 (version "0.9.4")
12586 (source
12587 (origin
12588 (method url-fetch)
12589 (uri (pypi-uri "jmespath" version))
12590 (sha256
12591 (base32
12592 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
12593 (build-system python-build-system)
12594 (native-inputs
12595 `(("python-nose" ,python-nose)))
12596 (synopsis "JSON Matching Expressions")
12597 (description "JMESPath (pronounced “james path”) is a Python library that
12598 allows one to declaratively specify how to extract elements from a JSON
12599 document.")
12600 (home-page "https://github.com/jmespath/jmespath.py")
12601 (license license:expat)))
12602
12603 (define-public python2-jmespath
12604 (package-with-python2 python-jmespath))
12605
12606 (define-public python-symengine
12607 (package
12608 (name "python-symengine")
12609 (version "0.6.1")
12610 (source
12611 (origin
12612 (method url-fetch)
12613 (uri (pypi-uri "symengine" version))
12614 (sha256
12615 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
12616 (build-system python-build-system)
12617 (native-inputs
12618 `(("cmake" ,cmake)
12619 ("python-cython" ,python-cython)))
12620 (inputs
12621 `(("symengine" ,symengine)))
12622 (home-page "https://github.com/symengine/symengine.py")
12623 (synopsis "Python library providing wrappers to SymEngine")
12624 (description
12625 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
12626 manipulation library.")
12627 (license license:expat)))
12628
12629 (define-public python-uncertainties
12630 (package
12631 (name "python-uncertainties")
12632 (version "3.1.5")
12633 (source
12634 (origin
12635 (method url-fetch)
12636 (uri (pypi-uri "uncertainties" version))
12637 (sha256
12638 (base32
12639 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
12640 (build-system python-build-system)
12641 ;; While there are test files, there is no "tests" directory, so the tests
12642 ;; fail.
12643 (arguments '(#:tests? #false))
12644 (propagated-inputs
12645 `(("python-future" ,python-future)))
12646 (native-inputs
12647 `(("python-nose" ,python-nose)
12648 ("python-numpy" ,python-numpy)))
12649 (home-page "https://uncertainties-python-package.readthedocs.io/")
12650 (synopsis "Calculations with uncertainties")
12651 (description
12652 "The uncertainties package transparently handles calculations with
12653 numbers with uncertainties. It can also yield the derivatives of any
12654 expression.")
12655 (license license:bsd-3)))
12656
12657 (define-public python-asteval
12658 (package
12659 (name "python-asteval")
12660 (version "0.9.23")
12661 (source
12662 (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "asteval" version))
12665 (sha256
12666 (base32
12667 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
12668 (build-system python-build-system)
12669 (native-inputs
12670 `(("python-pytest" ,python-pytest)))
12671 (home-page "https://github.com/newville/asteval")
12672 (synopsis "Minimalistic evaluator of Python expressions")
12673 (description
12674 "This package provides a minimalistic evaluator of Python expression
12675 using the @code{ast} module")
12676 (license license:expat)))
12677
12678 (define-public python-lmfit
12679 (package
12680 (name "python-lmfit")
12681 (version "1.0.2")
12682 (source
12683 (origin
12684 (method url-fetch)
12685 (uri (pypi-uri "lmfit" version))
12686 (sha256
12687 (base32
12688 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
12689 (build-system python-build-system)
12690 (propagated-inputs
12691 `(("python-asteval" ,python-asteval)
12692 ("python-numpy" ,python-numpy)
12693 ("python-scipy" ,python-scipy)
12694 ("python-uncertainties" ,python-uncertainties)))
12695 (native-inputs
12696 `(("python-pytest" ,python-pytest)))
12697 (home-page "https://lmfit.github.io/lmfit-py/")
12698 (synopsis "Least-Squares minimization with bounds and constraints")
12699 (description
12700 "Lmfit provides a high-level interface to non-linear optimization and
12701 curve fitting problems for Python. It builds on and extends many of the
12702 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12703 named for) extending the Levenberg-Marquardt method from
12704 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12705 enhancements to optimization and data fitting problems.")
12706 (license license:bsd-3)))
12707
12708 (define-public python-boto
12709 (package
12710 (name "python-boto")
12711 (version "2.49.0")
12712 (source (origin
12713 (method url-fetch)
12714 (uri (pypi-uri "boto" version))
12715 (sha256
12716 (base32
12717 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12718 (build-system python-build-system)
12719 (arguments
12720 ;; XXX: This package is unmaintained and has problems with newer versions
12721 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12722 ;; subset of this library, so keep it around for now, but disable tests.
12723 '(#:tests? #f))
12724 (propagated-inputs
12725 `(("python-paramiko" ,python-paramiko)
12726 ("python-requests" ,python-requests)))
12727 (home-page "https://github.com/boto/boto")
12728 (synopsis "Python interfaces for Amazon Web Services")
12729 (description
12730 "This package provides various facilities for interacting with Amazon
12731 Web Services through Python.
12732
12733 This software is unmaintained, and new projects should use @code{boto3} instead.")
12734 (license license:expat)))
12735
12736 (define-public python-botocore
12737 ;; Note: When updating botocore, also make sure that boto3 and awscli
12738 ;; are compatible.
12739 (package
12740 (name "python-botocore")
12741 (version "1.19.22")
12742 (source
12743 (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "botocore" version))
12746 (sha256
12747 (base32
12748 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12749 (build-system python-build-system)
12750 (arguments
12751 ;; FIXME: Many tests are failing.
12752 '(#:tests? #f))
12753 (propagated-inputs
12754 `(("python-dateutil" ,python-dateutil)
12755 ("python-jmespath" ,python-jmespath)
12756 ("python-urllib3" ,python-urllib3)))
12757 (home-page "https://github.com/boto/botocore")
12758 (synopsis "Low-level interface to AWS")
12759 (description "Botocore is a Python library that provides a low-level
12760 interface to the Amazon Web Services (AWS) API.")
12761 (license license:asl2.0)))
12762
12763 (define-public python2-botocore
12764 (package-with-python2 python-botocore))
12765
12766 (define-public python-boto3
12767 (package
12768 (name "python-boto3")
12769 (version "1.16.22")
12770 (home-page "https://github.com/boto/boto3")
12771 (source (origin
12772 (method git-fetch)
12773 (uri (git-reference (url home-page) (commit version)))
12774 (file-name (git-file-name name version))
12775 (sha256
12776 (base32
12777 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12778 (arguments
12779 `(#:phases
12780 (modify-phases %standard-phases
12781 (add-after 'unpack 'delete-network-tests
12782 ;; Deleting integration tests because they are trying to connect to AWS.
12783 (lambda _
12784 (delete-file-recursively "tests/integration")
12785 #t)))))
12786 (build-system python-build-system)
12787 (native-inputs
12788 `(("python-nose" ,python-nose)
12789 ("python-mock" ,python-mock)))
12790 (propagated-inputs
12791 `(("python-botocore" ,python-botocore)
12792 ("python-jmespath" ,python-jmespath)
12793 ("python-s3transfer" ,python-s3transfer)))
12794 (synopsis "AWS SDK for Python")
12795 (description
12796 "Boto3 is a Python library for writing programs that interact with
12797 @acronym{AWS,Amazon Web Services}.")
12798 (license license:asl2.0)))
12799
12800 (define-public python-pyfiglet
12801 (package
12802 (name "python-pyfiglet")
12803 (version "0.8.post1")
12804 (source
12805 (origin
12806 (method url-fetch)
12807 (uri (pypi-uri "pyfiglet" version))
12808 (sha256
12809 (base32
12810 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12811 (build-system python-build-system)
12812 (home-page "https://github.com/pwaller/pyfiglet")
12813 (synopsis "Draw ASCII art big letters in Python")
12814 (description "This module lets you draw large letter from ordinary characters
12815 in pure Python.")
12816 (license license:expat)))
12817
12818 (define-public python-xdo
12819 (package
12820 (name "python-xdo")
12821 (version "0.3")
12822 (source (origin
12823 (method url-fetch)
12824 (uri (string-append
12825 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12826 "python-xdo_" version ".orig.tar.gz"))
12827 (sha256
12828 (base32
12829 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12830 (build-system python-build-system)
12831 (arguments
12832 '(#:phases
12833 (modify-phases %standard-phases
12834 (add-before 'install 'patch-libxdo-path
12835 ;; Hardcode the path of dynamically loaded libxdo library.
12836 (lambda* (#:key inputs #:allow-other-keys)
12837 (let ((libxdo (string-append
12838 (assoc-ref inputs "xdotool")
12839 "/lib/libxdo.so")))
12840 (substitute* "xdo/_xdo.py"
12841 (("find_library\\(\"xdo\"\\)")
12842 (simple-format #f "\"~a\"" libxdo)))
12843 #t))))
12844 #:tests? #f)) ; no tests provided
12845 (propagated-inputs
12846 `(("python-six" ,python-six)))
12847 (inputs
12848 `(("xdotool" ,xdotool)
12849 ("libX11" ,libx11)))
12850 (home-page "https://tracker.debian.org/pkg/python-xdo")
12851 (synopsis "Python library for simulating X11 keyboard/mouse input")
12852 (description "Provides bindings to libxdo for manipulating X11 via simulated
12853 input. (Note that this is mostly a legacy library; you may wish to look at
12854 python-xdo for newer bindings.)")
12855 (license license:bsd-3)))
12856
12857 (define-public python2-xdo
12858 (package-with-python2 python-xdo))
12859
12860 (define-public python-mako
12861 (package
12862 (name "python-mako")
12863 (version "1.1.3")
12864 (source
12865 (origin
12866 (method url-fetch)
12867 (uri (pypi-uri "Mako" version))
12868 (sha256
12869 (base32
12870 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
12871 (build-system python-build-system)
12872 (arguments
12873 `(#:phases (modify-phases %standard-phases
12874 (replace 'check
12875 (lambda* (#:key tests? #:allow-other-keys)
12876 (if tests?
12877 (invoke "nosetests" "-v")
12878 (format #t "test suite not run~%"))
12879 #t)))))
12880 (propagated-inputs
12881 `(("python-markupsafe" ,python-markupsafe)))
12882 (native-inputs
12883 `(("python-mock" ,python-mock)
12884 ("python-nose" ,python-nose)))
12885 (home-page "https://www.makotemplates.org/")
12886 (synopsis "Templating language for Python")
12887 (description "Mako is a templating language for Python that compiles
12888 templates into Python modules.")
12889 (license license:expat)))
12890
12891 (define-public python2-mako
12892 (package-with-python2 python-mako))
12893
12894 (define-public python-waitress
12895 (package
12896 (name "python-waitress")
12897 (version "1.1.0")
12898 (source
12899 (origin
12900 (method url-fetch)
12901 (uri (pypi-uri "waitress" version))
12902 (patches (search-patches "python-waitress-fix-tests.patch"))
12903 (sha256
12904 (base32
12905 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12906 (build-system python-build-system)
12907 (home-page "https://github.com/Pylons/waitress")
12908 (synopsis "Waitress WSGI server")
12909 (description "Waitress is meant to be a production-quality pure-Python WSGI
12910 server with very acceptable performance.")
12911 (license license:zpl2.1)))
12912
12913 (define-public python2-waitress
12914 (package-with-python2 python-waitress))
12915
12916 (define-public python-whichcraft
12917 (package
12918 (name "python-whichcraft")
12919 (version "0.6.1")
12920 (source
12921 (origin
12922 (method url-fetch)
12923 (uri (pypi-uri "whichcraft" version))
12924 (sha256
12925 (base32
12926 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12927 (build-system python-build-system)
12928 (native-inputs
12929 `(("python-pytest" ,python-pytest)))
12930 (home-page "https://github.com/pydanny/whichcraft")
12931 (synopsis "Cross-platform cross-python shutil.which functionality")
12932 (description
12933 "This package provides a shim of the shutil.which function that's
12934 designed to work across multiple versions of Python.")
12935 (license license:bsd-3)))
12936
12937 (define-public python-cookiecutter
12938 (package
12939 (name "python-cookiecutter")
12940 (version "1.7.3")
12941 (source
12942 (origin
12943 (method url-fetch)
12944 (uri (pypi-uri "cookiecutter" version))
12945 (sha256
12946 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
12947 (build-system python-build-system)
12948 (native-inputs
12949 `(("python-freezegun" ,python-freezegun)
12950 ("python-pytest" ,python-pytest)
12951 ("python-pytest-catchlog" ,python-pytest-catchlog)
12952 ("python-pytest-cov" ,python-pytest-cov)
12953 ("python-pytest-mock" ,python-pytest-mock)))
12954 (propagated-inputs
12955 `(("python-binaryornot" ,python-binaryornot)
12956 ("python-click" ,python-click)
12957 ("python-future" ,python-future)
12958 ("python-jinja2" ,python-jinja2)
12959 ("python-jinja2-time" ,python-jinja2-time)
12960 ("python-poyo" ,python-poyo)
12961 ("python-requests" ,python-requests)
12962 ("python-slugify" ,python-slugify)
12963 ("python-text-unidecode" ,python-text-unidecode)
12964 ("python-whichcraft" ,python-whichcraft)))
12965 (home-page "https://github.com/cookiecutter/cookiecutter")
12966 (synopsis
12967 "Command-line utility that creates projects from project templates")
12968 (description
12969 "This package provides a command-line utility that creates projects from
12970 project templates, e.g. creating a Python package project from a Python package
12971 project template.")
12972 (license license:bsd-3)))
12973
12974 (define-public python-pyquery
12975 (package
12976 (name "python-pyquery")
12977 (version "1.2.17")
12978 (source
12979 (origin
12980 (method url-fetch)
12981 (uri (pypi-uri "pyquery" version))
12982 (sha256
12983 (base32
12984 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12985 (build-system python-build-system)
12986 (native-inputs
12987 `(("python-webob" ,python-webob)
12988 ("python-webtest" ,python-webtest)))
12989 (propagated-inputs
12990 `(("python-lxml" ,python-lxml)
12991 ("python-cssselect" ,python-cssselect)))
12992 (home-page "https://github.com/gawel/pyquery")
12993 (synopsis "Make jQuery-like queries on xml documents")
12994 (description "pyquery allows you to make jQuery queries on xml documents.
12995 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12996 fast xml and html manipulation.")
12997 (license license:bsd-3)))
12998
12999 (define-public python-anyjson
13000 (package
13001 (name "python-anyjson")
13002 (version "0.3.3")
13003 (source
13004 (origin
13005 (method url-fetch)
13006 (uri (pypi-uri "anyjson" version))
13007 (sha256
13008 (base32
13009 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
13010 (build-system python-build-system)
13011 (arguments
13012 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
13013 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
13014 ;; whatever) so this transformation needs to be done before the tests
13015 ;; can be run. Maybe we could add a build step to transform beforehand
13016 ;; but it could be annoying/difficult.
13017 ;; We can enable tests for the Python 2 version, though, and do below.
13018 #:tests? #f))
13019 (home-page "https://bitbucket.org/runeh/anyjson/")
13020 (synopsis
13021 "Wraps best available JSON implementation in a common interface")
13022 (description
13023 "Anyjson loads whichever is the fastest JSON module installed
13024 and provides a uniform API regardless of which JSON implementation is used.")
13025 (license license:bsd-3)
13026 (properties `((python2-variant . ,(delay python2-anyjson))))))
13027
13028 (define-public python2-anyjson
13029 (let ((anyjson (package-with-python2
13030 (strip-python2-variant python-anyjson))))
13031 (package/inherit anyjson
13032 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13033 #:tests? #t
13034 ,@(package-arguments anyjson)))
13035 (native-inputs `(("python2-nose" ,python2-nose))))))
13036
13037 (define-public python-amqp
13038 (package
13039 (name "python-amqp")
13040 (version "2.3.2")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "amqp" version))
13045 (sha256
13046 (base32
13047 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13048 (build-system python-build-system)
13049 (native-inputs
13050 `(("python-case" ,python-case)
13051 ("python-pytest-sugar" ,python-pytest-sugar)
13052 ("python-mock" ,python-mock)))
13053 (propagated-inputs
13054 `(("python-vine" ,python-vine)))
13055 (home-page "https://github.com/celery/py-amqp")
13056 (synopsis
13057 "Low-level AMQP client for Python (fork of amqplib)")
13058 (description
13059 "This is a fork of amqplib which was originally written by Barry Pederson.
13060 It is maintained by the Celery project, and used by kombu as a pure python
13061 alternative when librabbitmq is not available.")
13062 (license license:lgpl2.1+)
13063 (properties `((python2-variant . ,(delay python2-amqp))))))
13064
13065 (define-public python2-amqp
13066 (let ((amqp (package-with-python2
13067 (strip-python2-variant python-amqp))))
13068 (package/inherit amqp
13069 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13070 ;; unmaintained. Weirdly, does not do this on the python 3
13071 ;; version?
13072 #:tests? #f
13073 ,@(package-arguments amqp))))))
13074
13075 (define-public python-txamqp
13076 (package
13077 (name "python-txamqp")
13078 (version "0.8.2")
13079 (source
13080 (origin
13081 (method url-fetch)
13082 (uri (pypi-uri "txAMQP" version))
13083 (sha256
13084 (base32
13085 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13086 (build-system python-build-system)
13087 (propagated-inputs
13088 `(("python-six" ,python-six)
13089 ("python-twisted" ,python-twisted)))
13090 (home-page "https://github.com/txamqp/txamqp")
13091 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13092 (description
13093 "This package provides a Python library for communicating with AMQP peers
13094 and brokers using the asynchronous networking framework Twisted. It contains
13095 all the necessary code to connect, send and receive messages to/from an
13096 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13097 also includes support for using Thrift RPC over AMQP in Twisted
13098 applications.")
13099 (license license:asl2.0)))
13100
13101 (define-public python2-txamqp
13102 (package-with-python2 python-txamqp))
13103
13104 (define-public python-kombu
13105 (package
13106 (name "python-kombu")
13107 (version "4.2.2")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "kombu" version))
13112 (sha256
13113 (base32
13114 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13115 (build-system python-build-system)
13116 (native-inputs
13117 `(("python-mock" ,python-mock)
13118 ("python-case" ,python-case)
13119 ("python-pyro4" ,python-pyro4)
13120 ("python-pytest-sugar" ,python-pytest-sugar)
13121 ("python-pytz" ,python-pytz)))
13122 (propagated-inputs
13123 `(("python-anyjson" ,python-anyjson)
13124 ("python-amqp" ,python-amqp)
13125 ("python-redis" ,python-redis)))
13126 (home-page "https://kombu.readthedocs.io")
13127 (synopsis "Message passing library for Python")
13128 (description "The aim of Kombu is to make messaging in Python as easy as
13129 possible by providing an idiomatic high-level interface for the AMQ protocol,
13130 and also provide proven and tested solutions to common messaging problems.
13131 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13132 message orientation, queuing, routing, reliability and security, for which the
13133 RabbitMQ messaging server is the most popular implementation.")
13134 (license license:bsd-3)
13135 (properties `((python2-variant . ,(delay python2-kombu))))))
13136
13137 (define-public python2-kombu
13138 (let ((kombu (package-with-python2
13139 (strip-python2-variant python-kombu))))
13140 (package/inherit kombu
13141 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13142 ;; It works fine on the python3 variant.
13143 #:tests? #f
13144 ,@(package-arguments kombu)))
13145 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13146 ,@(package-native-inputs kombu))))))
13147
13148 (define-public python-billiard
13149 (package
13150 (name "python-billiard")
13151 (version "3.5.0.5")
13152 (source
13153 (origin
13154 (method url-fetch)
13155 (uri (pypi-uri "billiard" version))
13156 (sha256
13157 (base32
13158 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13159 (build-system python-build-system)
13160 (native-inputs
13161 `(("python-case" ,python-case)
13162 ("python-pytest" ,python-pytest)))
13163 (home-page "https://github.com/celery/billiard")
13164 (synopsis
13165 "Python multiprocessing fork with improvements and bugfixes")
13166 (description
13167 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13168 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13169 pyprocessing package. This standalone variant is intended to be compatible with
13170 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13171 (license license:bsd-3)
13172 (properties `((python2-variant . ,(delay python2-billiard))))))
13173
13174 (define-public python2-billiard
13175 (let ((billiard (package-with-python2
13176 (strip-python2-variant python-billiard))))
13177 (package/inherit billiard
13178 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13179 ("python2-mock" ,python2-mock)
13180 ,@(package-native-inputs billiard))))))
13181
13182 (define-public python-celery
13183 (package
13184 (name "python-celery")
13185 (version "4.2.1")
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "celery" version))
13190 (sha256
13191 (base32
13192 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13193 (build-system python-build-system)
13194 (arguments
13195 '(;; TODO The tests fail with Python 3.7
13196 ;; https://github.com/celery/celery/issues/4849
13197 #:tests? #f
13198 #:phases
13199 (modify-phases %standard-phases
13200 (add-after 'unpack 'patch-requirements
13201 (lambda _
13202 (substitute* "requirements/test.txt"
13203 (("pytest>=3\\.0,<3\\.3")
13204 "pytest>=3.0"))
13205 #t)))))
13206 (native-inputs
13207 `(("python-case" ,python-case)
13208 ("python-pytest" ,python-pytest)))
13209 (propagated-inputs
13210 `(("python-pytz" ,python-pytz)
13211 ("python-billiard" ,python-billiard)
13212 ("python-kombu" ,python-kombu)))
13213 (home-page "https://celeryproject.org")
13214 (synopsis "Distributed Task Queue")
13215 (description "Celery is an asynchronous task queue/job queue based on
13216 distributed message passing. It is focused on real-time operation, but
13217 supports scheduling as well. The execution units, called tasks, are executed
13218 concurrently on a single or more worker servers using multiprocessing,
13219 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13220 synchronously (wait until ready).")
13221 (license license:bsd-3)
13222 (properties `((python2-variant . ,(delay python2-celery))))))
13223
13224 (define-public python2-celery
13225 (let ((celery (package-with-python2
13226 (strip-python2-variant python-celery))))
13227 (package/inherit celery
13228 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13229 ("python2-mock" ,python2-mock)
13230 ,@(package-native-inputs celery))))))
13231
13232 (define-public python-translitcodec
13233 (package
13234 (name "python-translitcodec")
13235 (version "0.4.0")
13236 (source
13237 (origin
13238 (method url-fetch)
13239 (uri (pypi-uri "translitcodec" version))
13240 (sha256
13241 (base32
13242 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13243 (build-system python-build-system)
13244 (arguments
13245 `(#:tests? #f)) ; no tests provided
13246 (home-page
13247 "https://github.com/claudep/translitcodec")
13248 (synopsis
13249 "Unicode to 8-bit charset transliteration codec")
13250 (description
13251 "This package contains codecs for transliterating ISO 10646 texts into
13252 best-effort representations using smaller coded character sets (ASCII,
13253 ISO 8859, etc.).")
13254 (license license:expat)))
13255
13256 (define-public python2-translitcodec
13257 (package-with-python2 python-translitcodec))
13258
13259 (define-public python-anyqt
13260 (package
13261 (name "python-anyqt")
13262 (version "0.0.11")
13263 (source
13264 (origin
13265 (method url-fetch)
13266 (uri (pypi-uri "AnyQt" version))
13267 (sha256
13268 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13269 (build-system python-build-system)
13270 (arguments
13271 `(#:tests? #f ;there are no tests
13272 #:phases
13273 (modify-phases %standard-phases
13274 (add-after 'unpack 'delete-files
13275 ;; Delete files related to other operating systems.
13276 (lambda _
13277 (delete-file "AnyQt/QtMacExtras.py")
13278 (delete-file "AnyQt/QtWinExtras.py")
13279 #t)))))
13280 (home-page "https://github.com/ales-erjavec/anyqt")
13281 (synopsis "PyQt4/PyQt5 compatibility layer")
13282 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
13283 (license license:gpl3)))
13284
13285 (define-public python-pyqtgraph
13286 (package
13287 (name "python-pyqtgraph")
13288 (version "0.12.1")
13289 (source
13290 (origin
13291 (method url-fetch)
13292 (uri (pypi-uri "pyqtgraph" version))
13293 (sha256
13294 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
13295 (build-system python-build-system)
13296 (arguments
13297 `(#:phases
13298 (modify-phases %standard-phases
13299 (add-before 'check 'set-home-and-qpa
13300 (lambda _
13301 (setenv "HOME" "/tmp")
13302 (setenv "QT_QPA_PLATFORM" "offscreen")
13303 #t))
13304 (replace 'check
13305 (lambda* (#:key inputs outputs #:allow-other-keys)
13306 (add-installed-pythonpath inputs outputs)
13307 (invoke "pytest" "-vv" "-k"
13308 ;; These tests try to download online data.
13309 (string-append "not test_PolyLineROI"
13310 " and not test_getArrayRegion_axisorder"
13311 " and not test_getArrayRegion"
13312 " and not test_PlotCurveItem"
13313 " and not test_NonUniformImage_colormap"
13314 " and not test_NonUniformImage_lut"
13315 " and not test_ImageItem_axisorder"
13316 " and not test_ImageItem")))))))
13317 (native-inputs
13318 `(("python-pytest" ,python-pytest)
13319 ("python-pytest-cov" ,python-pytest-cov)
13320 ("python-pytest-xdist" ,python-pytest-xdist)))
13321 (inputs
13322 `(("qtbase" ,qtbase-5)))
13323 (propagated-inputs
13324 `(("python-h5py" ,python-h5py)
13325 ("python-numpy" ,python-numpy)
13326 ("python-pyopengl" ,python-pyopengl)
13327 ("python-scipy" ,python-scipy)
13328 ("python-pyqt" ,python-pyqt)))
13329 (home-page "http://www.pyqtgraph.org")
13330 (synopsis "Scientific graphics and GUI library for Python")
13331 (description
13332 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
13333 and PySide6. It is intended for use in mathematics, scientific or engineering
13334 applications.")
13335 (license license:expat)))
13336
13337 (define-public python-qasync
13338 (package
13339 (name "python-qasync")
13340 (version "0.15.0")
13341 (source
13342 (origin
13343 ;; There are no tests in the PyPI tarball.
13344 (method git-fetch)
13345 (uri (git-reference
13346 (url "https://github.com/CabbageDevelopment/qasync/")
13347 (commit (string-append "v" version))))
13348 (file-name (git-file-name name version))
13349 (sha256
13350 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
13351 (build-system python-build-system)
13352 (arguments
13353 `(#:test-target "pytest"
13354 #:phases
13355 (modify-phases %standard-phases
13356 (add-before 'check 'set-qpa
13357 (lambda _
13358 (setenv "QT_QPA_PLATFORM" "offscreen")
13359 #t)))))
13360 (native-inputs
13361 `(("python-pytest" ,python-pytest)
13362 ("python-pytest-runner" ,python-pytest-runner)))
13363 (propagated-inputs
13364 `(("python-pyqt" ,python-pyqt)))
13365 (home-page "https://github.com/CabbageDevelopment/qasync")
13366 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
13367 (description
13368 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
13369 by providing an implementation of the PEP 3156 event-loop.")
13370 (license license:bsd-2)))
13371
13372 (define-public python-editor
13373 (package
13374 (name "python-editor")
13375 (version "1.0.4")
13376 (source
13377 (origin
13378 (method url-fetch)
13379 (uri (pypi-uri "python-editor" version))
13380 (sha256
13381 (base32
13382 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
13383 (build-system python-build-system)
13384 (arguments
13385 '(#:tests? #f)) ;XXX: needs a TTY and an editor
13386 (home-page "https://github.com/fmoo/python-editor")
13387 (synopsis "Programmatically open an editor, capture the result")
13388 (description
13389 "python-editor is a library that provides the editor module for
13390 programmatically interfacing with your system's $EDITOR.")
13391 (license license:asl2.0)))
13392
13393 (define-public python2-editor
13394 (package-with-python2 python-editor))
13395
13396 (define-public python-multiprocessing-logging
13397 (package
13398 (name "python-multiprocessing-logging")
13399 (version "0.3.1")
13400 (home-page "https://github.com/jruere/multiprocessing-logging")
13401 (source (origin
13402 (method git-fetch)
13403 (uri (git-reference
13404 (url home-page)
13405 (commit (string-append "v" version))))
13406 (file-name (git-file-name name version))
13407 (sha256
13408 (base32
13409 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
13410 (build-system python-build-system)
13411 (synopsis "Manage logs from multiple processes")
13412 (description
13413 "This Python module implements a multiprocessing-aware @code{Handler}
13414 that, when set on the root @code{Logger}, will tunnel log records to the
13415 main process so that they are handled correctly.")
13416 (license license:lgpl3+)))
13417
13418 (define-public python-vobject
13419 (package
13420 (name "python-vobject")
13421 (version "0.9.6.1")
13422 (source (origin
13423 (method url-fetch)
13424 (uri (pypi-uri "vobject" version))
13425 (sha256
13426 (base32
13427 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
13428 (build-system python-build-system)
13429 (arguments
13430 '(;; The test suite relies on some non-portable Windows interfaces.
13431 #:tests? #f))
13432 (propagated-inputs
13433 `(("python-dateutil" ,python-dateutil)
13434 ("python-pyicu" ,python-pyicu)))
13435 (synopsis "Parse and generate vCard and vCalendar files")
13436 (description "Vobject is intended to be a full featured Python package for
13437 parsing and generating vCard and vCalendar files. Currently, iCalendar files
13438 are supported and well tested. vCard 3.0 files are supported, and all data
13439 should be imported, but only a few components are understood in a sophisticated
13440 way.")
13441 (home-page "https://eventable.github.io/vobject/")
13442 (license license:asl2.0)))
13443
13444 (define-public python2-vobject
13445 (package-with-python2 python-vobject))
13446
13447 (define-public python-munkres
13448 (package
13449 (name "python-munkres")
13450 (version "1.0.8")
13451 (source (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "munkres" version))
13454 (sha256
13455 (base32
13456 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
13457 (build-system python-build-system)
13458 (arguments
13459 '(#:tests? #f)) ; no test suite
13460 (home-page "https://software.clapper.org/munkres/")
13461 (synopsis "Implementation of the Munkres algorithm")
13462 (description "The Munkres module provides an implementation of the Munkres
13463 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
13464 useful for solving the Assignment Problem.")
13465 (license license:bsd-3)))
13466
13467 (define-public python2-munkres
13468 (package-with-python2 python-munkres))
13469
13470 (define-public python-whoosh
13471 (package
13472 (name "python-whoosh")
13473 (version "2.7.4")
13474 (source
13475 (origin
13476 (method url-fetch)
13477 (uri (pypi-uri "Whoosh" version))
13478 (sha256
13479 (base32
13480 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
13481 (build-system python-build-system)
13482 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
13483 (native-inputs
13484 `(("python-pytest" ,python-pytest)))
13485 (home-page "https://bitbucket.org/mchaput/whoosh")
13486 (synopsis "Full text indexing, search, and spell checking library")
13487 (description
13488 "Whoosh is a fast, pure-Python full text indexing, search, and spell
13489 checking library.")
13490 (license license:bsd-2)))
13491
13492 (define-public python2-whoosh
13493 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
13494 (package/inherit whoosh
13495 (propagated-inputs
13496 `(("python2-backport-ssl-match-hostname"
13497 ,python2-backport-ssl-match-hostname)
13498 ,@(package-propagated-inputs whoosh))))))
13499
13500 (define-public python-pathlib
13501 (package
13502 (name "python-pathlib")
13503 (version "1.0.1")
13504 (source (origin
13505 (method url-fetch)
13506 (uri (pypi-uri "pathlib" version))
13507 (sha256
13508 (base32
13509 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
13510 (build-system python-build-system)
13511 ;; The tests depend on the internal "test" module, which does not provide
13512 ;; a stable interface.
13513 (arguments `(#:tests? #f))
13514 (home-page "https://pathlib.readthedocs.org/")
13515 (synopsis "Object-oriented file system paths")
13516 (description "Pathlib offers a set of classes to handle file system paths.
13517 It offers the following advantages over using string objects:
13518
13519 @enumerate
13520 @item No more cumbersome use of os and os.path functions. Everything can
13521 be done easily through operators, attribute accesses, and method calls.
13522 @item Embodies the semantics of different path types. For example,
13523 comparing Windows paths ignores casing.
13524 @item Well-defined semantics, eliminating any inconsistencies or
13525 ambiguities (forward vs. backward slashes, etc.).
13526 @end enumerate
13527
13528 Note: In Python 3.4, pathlib is now part of the standard library. For other
13529 Python versions please consider python-pathlib2 instead, which tracks the
13530 standard library module. This module (python-pathlib) isn't maintained
13531 anymore.")
13532 (license license:expat)))
13533
13534 (define-public python2-pathlib
13535 (package-with-python2 python-pathlib))
13536
13537 (define-public python2-pathlib2
13538 (package
13539 (name "python2-pathlib2")
13540 (version "2.3.5")
13541 (source (origin
13542 (method url-fetch)
13543 (uri (pypi-uri "pathlib2" version))
13544 (sha256
13545 (base32
13546 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
13547 (build-system python-build-system)
13548 ;; We only need the the Python 2 variant, since for Python 3 our minimum
13549 ;; version is 3.4 which already includes this package as part of the
13550 ;; standard library.
13551 (arguments
13552 `(#:python ,python-2))
13553 (propagated-inputs
13554 `(("python2-scandir" ,python2-scandir)
13555 ("python2-six" ,python2-six)))
13556 (home-page "https://pypi.org/project/pathlib2/")
13557 (synopsis "Object-oriented file system paths - backport of standard
13558 pathlib module")
13559 (description "The goal of pathlib2 is to provide a backport of standard
13560 pathlib module which tracks the standard library module, so all the newest
13561 features of the standard pathlib can be used also on older Python versions.
13562
13563 Pathlib offers a set of classes to handle file system paths. It offers the
13564 following advantages over using string objects:
13565
13566 @enumerate
13567 @item No more cumbersome use of os and os.path functions. Everything can
13568 be done easily through operators, attribute accesses, and method calls.
13569 @item Embodies the semantics of different path types. For example,
13570 comparing Windows paths ignores casing.
13571 @item Well-defined semantics, eliminating any inconsistencies or
13572 ambiguities (forward vs. backward slashes, etc.).
13573 @end enumerate")
13574 (license license:expat)))
13575
13576 (define-public python2-pathlib2-bootstrap
13577 (hidden-package
13578 (package
13579 (inherit python2-pathlib2)
13580 (name "python2-pathlib2-bootstrap")
13581 (propagated-inputs
13582 `(("python2-scandir" ,python2-scandir)
13583 ("python2-six" ,python2-six-bootstrap))))))
13584
13585 (define-public python-jellyfish
13586 (package
13587 (name "python-jellyfish")
13588 (version "0.5.6")
13589 (source (origin
13590 (method url-fetch)
13591 (uri (pypi-uri "jellyfish" version))
13592 (sha256
13593 (base32
13594 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
13595 (build-system python-build-system)
13596 (native-inputs
13597 `(("python-pytest" ,python-pytest)))
13598 (home-page "https://github.com/jamesturk/jellyfish")
13599 (synopsis "Approximate and phonetic matching of strings")
13600 (description "Jellyfish uses a variety of string comparison and phonetic
13601 encoding algorithms to do fuzzy string matching.")
13602 (license license:bsd-2)
13603 (properties `((python2-variant . ,(delay python2-jellyfish))))))
13604
13605 (define-public python2-jellyfish
13606 (let ((jellyfish (package-with-python2
13607 (strip-python2-variant python-jellyfish))))
13608 (package/inherit jellyfish
13609 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
13610 ,@(package-native-inputs jellyfish))))))
13611
13612 (define-public python2-unicodecsv
13613 (package
13614 (name "python2-unicodecsv")
13615 (version "0.14.1")
13616 (source (origin
13617 (method git-fetch)
13618 ;; The test suite is not included in the PyPi release.
13619 ;; https://github.com/jdunck/python-unicodecsv/issues/19
13620 (uri (git-reference
13621 (url "https://github.com/jdunck/python-unicodecsv")
13622 (commit version)))
13623 (file-name (git-file-name name version))
13624 (sha256
13625 (base32
13626 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
13627 (build-system python-build-system)
13628 (arguments
13629 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
13630 #:python ,python-2))
13631 (native-inputs
13632 `(("python2-unittest2" ,python2-unittest2)))
13633 (home-page "https://github.com/jdunck/python-unicodecsv")
13634 (synopsis "Unicode CSV module for Python 2")
13635 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
13636 module, adding support for Unicode strings.")
13637 (license license:bsd-2)))
13638
13639 (define-public python-pdfminer-six
13640 (package
13641 (name "python-pdfminer-six")
13642 (version "20201018")
13643 ;; There are no tests in the PyPI tarball.
13644 (source
13645 (origin
13646 (method git-fetch)
13647 (uri (git-reference
13648 (url "https://github.com/pdfminer/pdfminer.six")
13649 (commit version)))
13650 (file-name (git-file-name name version))
13651 (sha256
13652 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
13653 (build-system python-build-system)
13654 (arguments
13655 `(#:phases
13656 (modify-phases %standard-phases
13657 ;; Tests write to the source tree.
13658 (add-after 'unpack 'make-git-checkout-writable
13659 (lambda _
13660 (for-each make-file-writable (find-files "."))
13661 #t))
13662 (replace 'check
13663 (lambda _
13664 (invoke "make" "test")))
13665 (add-before 'reset-gzip-timestamps 'make-files-writable
13666 (lambda* (#:key outputs #:allow-other-keys)
13667 (let ((out (assoc-ref outputs "out")))
13668 (for-each make-file-writable
13669 (find-files out "\\.gz$"))
13670 #t))))))
13671 (propagated-inputs
13672 `(("python-chardet" ,python-chardet)
13673 ("python-cryptography" ,python-cryptography)
13674 ("python-sortedcontainers" ,python-sortedcontainers)))
13675 (native-inputs
13676 `(("python-nose" ,python-nose)
13677 ("python-tox" ,python-tox)))
13678 (home-page "https://github.com/pdfminer/pdfminer.six")
13679 (synopsis "PDF parser and analyzer")
13680 (description "@code{pdfminer.six} is a community maintained fork of
13681 the original PDFMiner. It is a tool for extracting information from PDF
13682 documents. It focuses on getting and analyzing text data. Pdfminer.six
13683 extracts the text from a page directly from the sourcecode of the PDF. It
13684 can also be used to get the exact location, font or color of the text.")
13685 (license license:expat)))
13686
13687 (define-public python-rarfile
13688 (package
13689 (name "python-rarfile")
13690 (version "2.8")
13691 (source (origin
13692 (method url-fetch)
13693 (uri (pypi-uri "rarfile" version))
13694 (sha256
13695 (base32
13696 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
13697 (build-system python-build-system)
13698 (arguments
13699 '(#:phases
13700 (modify-phases %standard-phases
13701 (replace 'check
13702 ;; Many tests fail, but the installation proceeds.
13703 (lambda _ (invoke "make" "-C" "test" "test"))))))
13704 (native-inputs
13705 `(("which" ,which))) ; required for tests
13706 (propagated-inputs
13707 `(("libarchive" ,libarchive)))
13708 (home-page "https://github.com/markokr/rarfile")
13709 (synopsis "RAR archive reader for Python")
13710 (description "This is Python module for RAR archive reading. The interface
13711 is made as zipfile like as possible.")
13712 (license license:isc)))
13713
13714 (define-public python2-rarfile
13715 (package-with-python2 python-rarfile))
13716
13717 (define-public python-rich
13718 (package
13719 (name "python-rich")
13720 (version "10.2.2")
13721 (source (origin
13722 (method url-fetch)
13723 (uri (pypi-uri "rich" version))
13724 (sha256
13725 (base32
13726 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
13727 (build-system python-build-system)
13728 (arguments
13729 `(#:phases
13730 (modify-phases %standard-phases
13731 (replace 'check
13732 (lambda* (#:key inputs tests? #:allow-other-keys)
13733 (when tests?
13734 (copy-recursively (string-append
13735 (assoc-ref inputs "tests") "/tests")
13736 "tests")
13737 (invoke "python" "-m" "pytest" "-vv")))))))
13738 (propagated-inputs
13739 `(("python-attrs" ,python-attrs)
13740 ("python-colorama" ,python-colorama)
13741 ("python-commonmark" ,python-commonmark)
13742 ("python-ipywidgets" ,python-ipywidgets)
13743 ("python-pygments" ,python-pygments)
13744 ("python-typing-extensions" ,python-typing-extensions)))
13745 (native-inputs
13746 `(("python-pytest" ,python-pytest)
13747 ("tests"
13748 ;; The release on pypi comes without tests. We can't build from this
13749 ;; checkout, though, because installation requires an invocation of
13750 ;; poetry.
13751 ,(origin
13752 (method git-fetch)
13753 (uri (git-reference
13754 (url "https://github.com/willmcgugan/rich")
13755 (commit (string-append "v" version))))
13756 (file-name (git-file-name name version))
13757 (sha256
13758 (base32
13759 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
13760 (home-page "https://github.com/willmcgugan/rich")
13761 (synopsis "Render rich text and more to the terminal")
13762 (description
13763 "This is a Python package for rendering rich text, tables, progress bars,
13764 syntax highlighting, markdown and more to the terminal.")
13765 (license license:expat)))
13766
13767 (define-public python-magic
13768 (package
13769 (name "python-magic")
13770 (version "0.4.15")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "python-magic" version))
13775 (sha256
13776 (base32
13777 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
13778 (file-name (string-append name "-" version "-checkout"))))
13779 (build-system python-build-system)
13780 (arguments
13781 ;; The tests are unreliable, so don't run them. The tests fail
13782 ;; under Python3 because they were written for Python2 and
13783 ;; contain import statements that do not work in Python3. One of
13784 ;; the tests fails under Python2 because its assertions are
13785 ;; overly stringent; it relies on comparing output strings which
13786 ;; are brittle and can change depending on the version of
13787 ;; libmagic being used and the system on which the test is
13788 ;; running. In my case, under GuixSD 0.10.0, only one test
13789 ;; failed, and it seems to have failed only because the version
13790 ;; of libmagic that is packaged in Guix outputs a slightly
13791 ;; different (but not wrong) string than the one that the test
13792 ;; expected.
13793 '(#:tests? #f
13794 #:phases (modify-phases %standard-phases
13795 ;; Replace a specific method call with a hard-coded
13796 ;; path to the necessary libmagic.so file in the
13797 ;; store. If we don't do this, then the method call
13798 ;; will fail to find the libmagic.so file, which in
13799 ;; turn will cause any application using
13800 ;; python-magic to fail.
13801 (add-before 'build 'hard-code-path-to-libmagic
13802 (lambda* (#:key inputs #:allow-other-keys)
13803 (let ((file (assoc-ref inputs "file")))
13804 (substitute* "magic.py"
13805 (("ctypes.util.find_library\\('magic'\\)")
13806 (string-append "'" file "/lib/libmagic.so'")))
13807 #t)))
13808 (add-before 'install 'disable-egg-compression
13809 (lambda _
13810 (let ((port (open-file "setup.cfg" "a")))
13811 (display "\n[easy_install]\nzip_ok = 0\n"
13812 port)
13813 (close-port port)
13814 #t))))))
13815 (inputs
13816 ;; python-magic needs to be able to find libmagic.so.
13817 `(("file" ,file)))
13818 (home-page
13819 "https://github.com/ahupp/python-magic")
13820 (synopsis
13821 "File type identification using libmagic")
13822 (description
13823 "This module uses ctypes to access the libmagic file type
13824 identification library. It makes use of the local magic database and
13825 supports both textual and MIME-type output. Note that this module and
13826 the python-file module both provide a \"magic.py\" file; these two
13827 modules, which are different and were developed separately, both serve
13828 the same purpose: to provide Python bindings for libmagic.")
13829 (license license:expat)))
13830
13831 (define-public python2-magic
13832 (package-with-python2 python-magic))
13833
13834 (define-public python2-s3cmd
13835 (package
13836 (name "python2-s3cmd")
13837 (version "1.6.1")
13838 (source
13839 (origin
13840 (method url-fetch)
13841 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
13842 "s3cmd-" version ".tar.gz"))
13843 (sha256
13844 (base32
13845 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
13846 (build-system python-build-system)
13847 (arguments
13848 ;; s3cmd is written for python2 only and contains no tests.
13849 `(#:python ,python-2
13850 #:tests? #f))
13851 (propagated-inputs
13852 `(("python2-dateutil" ,python2-dateutil)
13853 ;; The python-file package also provides a magic.py module.
13854 ;; This is an unfortunate state of affairs; however, s3cmd
13855 ;; fails to install if it cannot find specifically the
13856 ;; python-magic package. Thus we include it, instead of using
13857 ;; python-file. Ironically, s3cmd sometimes works better
13858 ;; without libmagic bindings at all:
13859 ;; https://github.com/s3tools/s3cmd/issues/198
13860 ("python2-magic" ,python2-magic)))
13861 (home-page "https://s3tools.org/s3cmd")
13862 (synopsis "Command line tool for S3-compatible storage services")
13863 (description
13864 "S3cmd is a command line tool for uploading, retrieving and managing data
13865 in storage services that are compatible with the Amazon Simple Storage
13866 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13867 GnuPG encryption, and more. It also supports management of Amazon's
13868 CloudFront content delivery network.")
13869 (license license:gpl2+)))
13870
13871 (define-public python-pkgconfig
13872 (package
13873 (name "python-pkgconfig")
13874 (version "1.3.1")
13875 (source
13876 (origin
13877 (method url-fetch)
13878 (uri (pypi-uri "pkgconfig" version))
13879 (sha256
13880 (base32
13881 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
13882 (build-system python-build-system)
13883 (native-inputs
13884 `(("python-nose" ,python-nose)))
13885 (inputs
13886 `(("pkg-config" ,pkg-config)))
13887 (arguments
13888 `(#:phases
13889 (modify-phases %standard-phases
13890 (add-before 'build 'patch
13891 ;; Hard-code the path to pkg-config.
13892 (lambda _
13893 (substitute* "pkgconfig/pkgconfig.py"
13894 (("cmd = 'pkg-config")
13895 (string-append "cmd = '" (which "pkg-config"))))
13896 #t))
13897 (replace 'check
13898 (lambda _
13899 (invoke "nosetests" "test.py"))))))
13900 (home-page "https://github.com/matze/pkgconfig")
13901 (synopsis "Python interface for pkg-config")
13902 (description "This module provides a Python interface to pkg-config. It
13903 can be used to find all pkg-config packages, check if a package exists,
13904 check if a package meets certain version requirements, query CFLAGS and
13905 LDFLAGS and parse the output to build extensions with setup.py.")
13906 (license license:expat)))
13907
13908 (define-public python2-pkgconfig
13909 (package-with-python2 python-pkgconfig))
13910
13911 (define-public python-bz2file
13912 (package
13913 (name "python-bz2file")
13914 (version "0.98")
13915 (source
13916 (origin
13917 (method url-fetch)
13918 (uri (pypi-uri "bz2file" version))
13919 (sha256
13920 (base32
13921 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
13922 (build-system python-build-system)
13923 (arguments
13924 `(#:tests? #f)) ; Tests use deprecated python modules.
13925 (home-page "https://github.com/nvawda/bz2file")
13926 (synopsis "Read and write bzip2-compressed files")
13927 (description
13928 "Bz2file is a Python library for reading and writing bzip2-compressed
13929 files. It contains a drop-in replacement for the I/O interface in the
13930 standard library's @code{bz2} module, including features from the latest
13931 development version of CPython that are not available in older releases.")
13932 (license license:asl2.0)))
13933
13934 (define-public python2-bz2file
13935 (package-with-python2 python-bz2file))
13936
13937 (define-public python-future
13938 (package
13939 (name "python-future")
13940 (version "0.17.1")
13941 (source
13942 (origin
13943 (method url-fetch)
13944 (uri (pypi-uri "future" version))
13945 (sha256
13946 (base32
13947 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
13948 (build-system python-build-system)
13949 ;; Many tests connect to the network or are otherwise flawed.
13950 ;; https://github.com/PythonCharmers/python-future/issues/210
13951 (arguments
13952 `(#:tests? #f))
13953 (home-page "https://python-future.org")
13954 (synopsis "Single-source support for Python 3 and 2")
13955 (description
13956 "@code{python-future} is the missing compatibility layer between Python 2 and
13957 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
13958 to support both Python 2 and Python 3 with minimal overhead.")
13959 (license license:expat)))
13960
13961 (define-public python2-future
13962 (package-with-python2 python-future))
13963
13964 (define-public python-cysignals
13965 (package
13966 (name "python-cysignals")
13967 (version "1.9.0")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "cysignals" version))
13972 (sha256
13973 (base32
13974 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
13975 (build-system python-build-system)
13976 (native-inputs
13977 `(("python-cython" ,python-cython)
13978 ("python-sphinx" ,python-sphinx)))
13979 (inputs
13980 `(("pari-gp" ,pari-gp)))
13981 (arguments
13982 `(#:modules ((guix build python-build-system)
13983 ((guix build gnu-build-system) #:prefix gnu:)
13984 (guix build utils))
13985 ;; FIXME: Tests are executed after installation and currently fail
13986 ;; when not installing into standard locations; the author is working
13987 ;; on a fix.
13988 #:tests? #f
13989 #:phases
13990 (modify-phases %standard-phases
13991 (add-before
13992 'build 'configure
13993 (assoc-ref gnu:%standard-phases 'configure)))))
13994 (home-page
13995 "https://github.com/sagemath/cysignals")
13996 (synopsis
13997 "Handling of interrupts and signals for Cython")
13998 (description
13999 "The cysignals package provides mechanisms to handle interrupts (and
14000 other signals and errors) in Cython code, using two related approaches,
14001 for mixed Cython/Python code or external C libraries and pure Cython code,
14002 respectively.")
14003 (license license:lgpl3+)))
14004
14005 (define-public python2-cysignals
14006 (package-with-python2 python-cysignals))
14007
14008 (define-public python2-shedskin
14009 (package
14010 (name "python2-shedskin")
14011 (version "0.9.4")
14012 (source
14013 (origin
14014 (method url-fetch)
14015 (uri (string-append "https://github.com/shedskin/shedskin/"
14016 "releases/download/v" version
14017 "/shedskin-" version ".tgz"))
14018 (sha256
14019 (base32
14020 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
14021 (build-system python-build-system)
14022 (arguments
14023 `(#:python ,python-2
14024 #:phases (modify-phases %standard-phases
14025 (add-after 'unpack 'fix-resulting-include-libs
14026 (lambda* (#:key inputs #:allow-other-keys)
14027 (let ((libgc (assoc-ref inputs "libgc"))
14028 (pcre (assoc-ref inputs "pcre")))
14029 (substitute* "shedskin/makefile.py"
14030 (("variable == 'CCFLAGS':[ ]*")
14031 (string-append "variable == 'CCFLAGS':\n"
14032 " line += ' -I " pcre "/include"
14033 " -I " libgc "/include'"))
14034 (("variable == 'LFLAGS':[ ]*")
14035 (string-append "variable == 'LFLAGS':\n"
14036 " line += ' -L" pcre "/lib"
14037 " -L " libgc "/lib'")))
14038 #t))))))
14039 (inputs `(("pcre" ,pcre)
14040 ("libgc" ,libgc)))
14041 (home-page "https://shedskin.github.io/")
14042 (synopsis "Experimental Python-2 to C++ Compiler")
14043 (description (string-append "This is an experimental compiler for a subset of
14044 Python. It generates C++ code and a Makefile."))
14045 (license (list license:gpl3 license:bsd-3 license:expat))))
14046
14047 (define-public python2-rope
14048 (package
14049 (name "python2-rope")
14050 (version "0.11.0")
14051 (source
14052 (origin
14053 (method url-fetch)
14054 (uri (pypi-uri "rope" version))
14055 (sha256
14056 (base32
14057 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
14058 (arguments
14059 ;; Rope has only partial python3 support, see `python-rope'
14060 `(#:python ,python-2))
14061 (build-system python-build-system)
14062 (native-inputs
14063 `(("python2-unittest2" ,python2-unittest2)))
14064 (home-page "https://github.com/python-rope/rope")
14065 (synopsis "Refactoring library for Python")
14066 (description "Rope is a refactoring library for Python. It facilitates
14067 the renaming, moving and extracting of attributes, functions, modules, fields
14068 and parameters in Python 2 source code. These refactorings can also be applied
14069 to occurrences in strings and comments.")
14070 (license license:gpl2)))
14071
14072 (define-public python-rope
14073 (package/inherit python2-rope
14074 (name "python-rope")
14075 (arguments `(#:python ,python-wrapper
14076 ;; XXX: Only partial python3 support, results in some failing
14077 ;; tests: <https://github.com/python-rope/rope/issues/247>.
14078 #:tests? #f))
14079 (properties `((python2-variant . ,(delay python2-rope))))))
14080
14081 (define-public python-py3status
14082 (package
14083 (name "python-py3status")
14084 (version "3.21")
14085 (source
14086 (origin
14087 (method url-fetch)
14088 (uri (pypi-uri "py3status" version))
14089 (sha256
14090 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14091 (build-system python-build-system)
14092 (inputs
14093 `(("file" ,file)))
14094 (arguments
14095 '(#:phases
14096 (modify-phases %standard-phases
14097 ;; 'file' is used for detection of configuration file encoding
14098 ;; let's make link the dependency to particular input
14099 (add-before 'build 'patch-file-path
14100 (lambda* (#:key inputs #:allow-other-keys)
14101 (let ((file-path (assoc-ref inputs "file")))
14102 (substitute* "py3status/parse_config.py"
14103 (("\\[\"file\", \"-b\"")
14104 (string-append "['" file-path "/bin/file', '-b'")))
14105 #t))))
14106 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14107 (home-page "https://github.com/ultrabug/py3status")
14108 (synopsis "Extensible i3status wrapper written in Python")
14109 (description "py3status is an i3status wrapper which extends i3status
14110 functionality in a modular way, allowing you to extend your panel with your
14111 own code, responding to click events and updating clock every second.")
14112 (license license:bsd-3)))
14113
14114 (define-public python2-selectors2
14115 (package
14116 (name "python2-selectors2")
14117 (version "2.0.1")
14118 (source (origin
14119 (method url-fetch)
14120 (uri (pypi-uri "selectors2" version))
14121 (sha256
14122 (base32
14123 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
14124 (build-system python-build-system)
14125 (arguments
14126 `(#:python ,python-2))
14127 (native-inputs
14128 `(("python2-mock" ,python2-mock)
14129 ("python2-psutil" ,python2-psutil)))
14130 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
14131 (synopsis "Backport of the selectors module from Python 3.5+")
14132 (description
14133 "This package provides a drop-in replacement for the @code{selectors}
14134 module in Python 3.5 and later.")
14135 (license license:expat)))
14136
14137 (define-public python-tblib
14138 (package
14139 (name "python-tblib")
14140 (version "1.6.0")
14141 (source (origin
14142 (method url-fetch)
14143 (uri (pypi-uri "tblib" version))
14144 (sha256
14145 (base32
14146 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14147 (build-system python-build-system)
14148 (arguments
14149 `(#:phases
14150 (modify-phases %standard-phases
14151 (replace 'check
14152 (lambda _
14153 ;; Upstream runs tests after installation and the package itself
14154 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
14155 ;; found.
14156 (setenv "PYTHONPATH"
14157 (string-append (getcwd) "/build/lib:"
14158 (getenv "PYTHONPATH")))
14159 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14160 (native-inputs
14161 `(("python-pytest" ,python-pytest)
14162 ("python-six" ,python-six)))
14163 (home-page "https://github.com/ionelmc/python-tblib")
14164 (synopsis "Traceback serialization library")
14165 (description
14166 "Traceback serialization allows you to:
14167
14168 @enumerate
14169 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14170 different processes. This allows better error handling when running code over
14171 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14172
14173 @item Parse traceback strings and raise with the parsed tracebacks.
14174 @end enumerate\n")
14175 (license license:bsd-3)))
14176
14177 (define-public python2-tblib
14178 (package-with-python2 python-tblib))
14179
14180 (define-public python-greenlet
14181 (package
14182 (name "python-greenlet")
14183 (version "1.0.0")
14184 (source (origin
14185 (method url-fetch)
14186 (uri (pypi-uri "greenlet" version))
14187 (sha256
14188 (base32
14189 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
14190 (build-system python-build-system)
14191 (home-page "https://greenlet.readthedocs.io/")
14192 (synopsis "Lightweight in-process concurrent programming")
14193 (description
14194 "Greenlet package is a spin-off of Stackless, a version of CPython
14195 that supports micro-threads called \"tasklets\". Tasklets run
14196 pseudo-concurrently (typically in a single or a few OS-level threads) and
14197 are synchronized with data exchanges on \"channels\".")
14198 (license (list license:psfl license:expat))))
14199
14200 (define-public python-objgraph
14201 (package
14202 (name "python-objgraph")
14203 (version "3.4.1")
14204 (source
14205 (origin
14206 (method url-fetch)
14207 (uri (pypi-uri "objgraph" version))
14208 (sha256
14209 (base32
14210 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14211 (build-system python-build-system)
14212 (propagated-inputs
14213 `(("python-graphviz" ,python-graphviz)))
14214 (native-inputs
14215 `(("python-mock" ,python-mock)
14216 ("graphviz" ,graphviz)))
14217 (home-page "https://mg.pov.lt/objgraph/")
14218 (synopsis "Draw Python object reference graphs with graphviz")
14219 (description
14220 "This package provides tools to draw Python object reference graphs with
14221 graphviz.")
14222 (license license:expat)))
14223
14224 (define-public python2-objgraph
14225 (package-with-python2 python-objgraph))
14226
14227 (define-public python-gevent
14228 (package
14229 (name "python-gevent")
14230 (version "21.1.2")
14231 (source (origin
14232 (method url-fetch)
14233 (uri (pypi-uri "gevent" version))
14234 (sha256
14235 (base32
14236 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14237 (modules '((guix build utils)))
14238 (snippet
14239 '(begin
14240 ;; unbunding libev and c-ares
14241 (delete-file-recursively "deps")))))
14242 (build-system python-build-system)
14243 (arguments
14244 `(#:modules ((ice-9 ftw)
14245 (ice-9 match)
14246 (srfi srfi-26)
14247 (guix build utils)
14248 (guix build python-build-system))
14249 #:phases (modify-phases %standard-phases
14250 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14251 (lambda _
14252 (substitute* "src/gevent/subprocess.py"
14253 (("/bin/sh") (which "sh")))
14254 (for-each (lambda (file)
14255 (substitute* file
14256 (("/bin/sh") (which "sh"))
14257 (("/bin/true") (which "true"))))
14258 (find-files "src/greentest" "\\.py$"))))
14259 (add-before 'build 'do-not-use-bundled-sources
14260 (lambda _
14261 (setenv "GEVENTSETUP_EMBED" "0")
14262
14263 ;; Prevent building bundled libev.
14264 (substitute* "setup.py"
14265 (("run_make=_BUILDING")
14266 "run_make=False"))))
14267 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14268 (lambda* (#:key inputs #:allow-other-keys)
14269 (let ((greenlet (string-append
14270 (assoc-ref inputs "python-greenlet")
14271 "/include")))
14272 (match (scandir greenlet
14273 (lambda (item)
14274 (string-prefix? "python" item)))
14275 ((python)
14276 (setenv "C_INCLUDE_PATH"
14277 (string-append greenlet "/" python ":"
14278 (or (getenv "C_INCLUDE_PATH")
14279 ""))))))))
14280 (add-before 'check 'pretend-to-be-CI
14281 (lambda _
14282 ;; A few tests are skipped due to network constraints or
14283 ;; get longer timeouts when running in a CI environment.
14284 ;; Piggy-back on that, as we need the same adjustments.
14285 (setenv "TRAVIS" "1")
14286 (setenv "APPVEYOR" "1")))
14287 (add-before 'check 'adjust-tests
14288 (lambda _
14289 (let ((disabled-tests
14290 '(;; These tests relies on networking which is
14291 ;; not available in the build container.
14292 "test__getaddrinfo_import.py"
14293 "test__server_pywsgi.py"
14294 ;; XXX: These tests borrow functionality from the
14295 ;; Python builtin 'test' module, but it is not
14296 ;; installed with the Guix Python distribution.
14297 "test_smtpd.py"
14298 "test_wsgiref.py"
14299 "test_urllib2.py"
14300 "test_thread.py"
14301 "test_threading.py"
14302 "test__threading_2.py"
14303 ;; These tests rely on KeyboardInterrupts which do not
14304 ;; work inside the build container for some reason
14305 ;; (lack of controlling terminal?).
14306 "test_subprocess.py"
14307 "test__issues461_471.py"
14308 ;; TODO: Patch out the tests that use getprotobyname, etc
14309 ;; instead of disabling all the tests from these files.
14310 "test__resolver_dnspython.py"
14311 "test__doctests.py"
14312 "test__all__.py"
14313 "test___config.py"
14314 "test__execmodules.py")))
14315 (call-with-output-file "skipped_tests.txt"
14316 (lambda (port)
14317 (format port "~a~%"
14318 (string-join disabled-tests "\n")))))))
14319 (replace 'check
14320 (lambda _
14321 ;; Make sure the build directory is on PYTHONPATH.
14322 (setenv "PYTHONPATH"
14323 (string-append
14324 (getenv "PYTHONPATH") ":"
14325 (getcwd) "/build/"
14326 (car (scandir "build" (cut string-prefix? "lib." <>)))))
14327
14328 ;; Use the build daemons configured number of workers.
14329 (setenv "NWORKERS" (number->string (parallel-job-count)))
14330
14331 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
14332 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
14333 (propagated-inputs
14334 `(("python-greenlet" ,python-greenlet)
14335 ("python-objgraph" ,python-objgraph)
14336 ("python-zope.event" ,python-zope-event)
14337 ("python-zope.interface" ,python-zope-interface)))
14338 (native-inputs
14339 `(("python-six" ,python-six)
14340
14341 ;; For tests.
14342 ("python-dnspython" ,python-dnspython)
14343 ("python-psutil" ,python-psutil)))
14344 (inputs
14345 `(("c-ares" ,c-ares)
14346 ("libev" ,libev)))
14347 (home-page "https://www.gevent.org/")
14348 (synopsis "Coroutine-based network library")
14349 (description
14350 "@code{gevent} is a coroutine-based Python networking library that uses
14351 @code{greenlet} to provide a high-level synchronous API on top of the
14352 @code{libev} event loop.")
14353 (license license:expat)))
14354
14355 (define-public python-fastimport
14356 (package
14357 (name "python-fastimport")
14358 (version "0.9.9")
14359 (source
14360 (origin
14361 (method url-fetch)
14362 (uri (pypi-uri "fastimport" version))
14363 (sha256
14364 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
14365 (build-system python-build-system)
14366 (home-page "https://github.com/jelmer/python-fastimport")
14367 (synopsis "VCS fastimport parser and generator in Python")
14368 (description "This package provides a parser for and generator of the Git
14369 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
14370 format.")
14371 (license license:gpl2+)))
14372
14373 (define-public python-twisted
14374 (package
14375 (name "python-twisted")
14376 (version "19.7.0")
14377 (source (origin
14378 (method url-fetch)
14379 (uri (pypi-uri "Twisted" version ".tar.bz2"))
14380 (sha256
14381 (base32
14382 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
14383 (build-system python-build-system)
14384 (arguments
14385 '(#:tests? #f)) ; FIXME: some tests fail
14386 (propagated-inputs
14387 `(("python-zope-interface" ,python-zope-interface)
14388 ("python-pyhamcrest" ,python-pyhamcrest)
14389 ("python-incremental" ,python-incremental)
14390 ("python-hyperlink" ,python-hyperlink)
14391 ("python-constantly" ,python-constantly)
14392 ("python-automat" ,python-automat)))
14393 (home-page "https://twistedmatrix.com/")
14394 (synopsis "Asynchronous networking framework written in Python")
14395 (description
14396 "Twisted is an extensible framework for Python programming, with special
14397 focus on event-based network programming and multiprotocol integration.")
14398 (license license:expat)))
14399
14400 (define-public python2-twisted
14401 (package-with-python2 python-twisted))
14402
14403 (define-public python-pika
14404 (package
14405 (name "python-pika")
14406 (version "1.2.0")
14407 (source
14408 (origin
14409 (method git-fetch)
14410 (uri (git-reference
14411 (url "https://github.com/pika/pika")
14412 (commit version)))
14413 (file-name (git-file-name name version))
14414 (sha256
14415 (base32
14416 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
14417 (build-system python-build-system)
14418 (arguments
14419 '(#:phases (modify-phases %standard-phases
14420 (add-before 'check 'disable-live-tests
14421 (lambda _
14422 ;; Disable tests that require RabbitMQ, which is not
14423 ;; yet available in Guix.
14424 (substitute* "setup.cfg"
14425 (("tests/unit,tests/acceptance")
14426 "tests/unit"))
14427 (with-directory-excursion "tests"
14428 (for-each delete-file
14429 '("unit/base_connection_tests.py"
14430 "unit/threaded_test_wrapper_test.py")))))
14431 (replace 'check
14432 (lambda _
14433 (invoke "nosetests"))))))
14434 (native-inputs
14435 `(("python-mock" ,python-mock)
14436 ("python-nose" ,python-nose)
14437
14438 ;; These are optional at runtime, and provided here for tests.
14439 ("python-gevent" ,python-gevent)
14440 ("python-tornado" ,python-tornado)
14441 ("python-twisted" ,python-twisted)))
14442 (home-page "https://pika.readthedocs.org")
14443 (synopsis "Pure Python AMQP Client Library")
14444 (description
14445 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
14446 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
14447 network support library.")
14448 (license license:bsd-3)))
14449
14450 (define-public python-ply
14451 (package
14452 (name "python-ply")
14453 (version "3.11")
14454 (source
14455 (origin
14456 (method url-fetch)
14457 (uri (pypi-uri "ply" version))
14458 (sha256
14459 (base32
14460 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
14461 (build-system python-build-system)
14462 (home-page "http://www.dabeaz.com/ply/")
14463 (synopsis "Python Lex & Yacc")
14464 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
14465 It uses LR parsing and does extensive error checking.")
14466 (license license:bsd-3)))
14467
14468 (define-public python-tabulate
14469 (package
14470 (name "python-tabulate")
14471 (version "0.8.9")
14472 (source (origin
14473 (method url-fetch)
14474 (uri (pypi-uri "tabulate" version))
14475 (sha256
14476 (base32
14477 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
14478 (build-system python-build-system)
14479 (arguments
14480 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
14481 ;; and the latest release is not tagged in the upstream repository.
14482 '(#:tests? #f))
14483 (home-page "https://bitbucket.org/astanin/python-tabulate")
14484 (synopsis "Pretty-print tabular data")
14485 (description
14486 "Tabulate is a library and command-line utility to pretty-print tabular
14487 data in Python.")
14488 (license license:expat)))
14489
14490 (define-public python2-tabulate
14491 (package-with-python2 python-tabulate))
14492
14493 (define-public python-kazoo
14494 (package
14495 (name "python-kazoo")
14496 (version "2.4.0")
14497 (source
14498 (origin
14499 (method url-fetch)
14500 (uri (pypi-uri "kazoo" version))
14501 (sha256
14502 (base32
14503 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
14504 (build-system python-build-system)
14505 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
14506 (propagated-inputs
14507 `(("python-six" ,python-six)))
14508 (home-page "https://kazoo.readthedocs.org")
14509 (synopsis "High-level Zookeeper client library")
14510 (description
14511 "Kazoo is a Python client library for the Apache Zookeeper distributed
14512 application service. It is designed to be easy to use and to avoid common
14513 programming errors.")
14514 (license license:asl2.0)))
14515
14516 (define-public python2-kazoo
14517 (package-with-python2 python-kazoo))
14518
14519 (define-public python-pykafka
14520 (package
14521 (name "python-pykafka")
14522 (version "2.4.0")
14523 (source (origin
14524 (method url-fetch)
14525 (uri (pypi-uri "pykafka" version))
14526 (sha256
14527 (base32
14528 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
14529 (build-system python-build-system)
14530 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
14531 (propagated-inputs
14532 `(("python-gevent" ,python-gevent)
14533 ("python-kazoo" ,python-kazoo)
14534 ("python-tabulate" ,python-tabulate)))
14535 (inputs
14536 `(("librdkafka" ,librdkafka)))
14537 (home-page "https://pykafka.readthedocs.io/")
14538 (synopsis "Apache Kafka client for Python")
14539 (description
14540 "PyKafka is a client for the Apache Kafka distributed messaging system.
14541 It includes Python implementations of Kafka producers and consumers, which
14542 are optionally backed by a C extension built on librdkafka.")
14543 (license license:asl2.0)))
14544
14545 (define-public python-wcwidth
14546 (package
14547 (name "python-wcwidth")
14548 (version "0.1.8")
14549 (source (origin
14550 (method url-fetch)
14551 (uri (pypi-uri "wcwidth" version))
14552 (sha256
14553 (base32
14554 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
14555 (build-system python-build-system)
14556 (home-page "https://github.com/jquast/wcwidth")
14557 (synopsis "Measure number of terminal column cells of wide-character codes")
14558 (description "Wcwidth measures the number of terminal column cells of
14559 wide-character codes. It is useful for those implementing a terminal emulator,
14560 or programs that carefully produce output to be interpreted by one. It is a
14561 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
14562 specified in POSIX.1-2001 and POSIX.1-2008.")
14563 (license license:expat)))
14564
14565 (define-public python2-wcwidth
14566 (package-with-python2 python-wcwidth))
14567
14568 (define-public python2-jsonrpclib
14569 (package
14570 (name "python2-jsonrpclib")
14571 (version "0.1.7")
14572 (source (origin
14573 (method url-fetch)
14574 (uri (pypi-uri "jsonrpclib" version))
14575 (sha256
14576 (base32
14577 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
14578 (build-system python-build-system)
14579 (arguments
14580 `(#:tests? #f
14581 #:python ,python-2))
14582 (home-page "https://github.com/joshmarshall/jsonrpclib/")
14583 (synopsis "Implementation of JSON-RPC specification for Python")
14584 (description
14585 "This library is an implementation of the JSON-RPC specification.
14586 It supports both the original 1.0 specification, as well as the
14587 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
14588 etc.")
14589 (license license:asl2.0)))
14590
14591 (define-public python-chai
14592 (package
14593 (name "python-chai")
14594 (version "1.1.2")
14595 (source (origin
14596 (method url-fetch)
14597 (uri (pypi-uri "chai" version))
14598 (sha256
14599 (base32
14600 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
14601 (build-system python-build-system)
14602 (home-page "https://github.com/agoragames/chai")
14603 (synopsis "Mocking framework for Python")
14604 (description
14605 "Chai provides an api for mocking, stubbing and spying your python
14606 objects, patterned after the Mocha library for Ruby.")
14607 (license license:bsd-3)))
14608
14609 (define-public python2-chai
14610 (package-with-python2 python-chai))
14611
14612 (define-public python-inflection
14613 (package
14614 (name "python-inflection")
14615 (version "0.3.1")
14616 (source
14617 (origin (method url-fetch)
14618 (uri (pypi-uri "inflection" version))
14619 (sha256
14620 (base32
14621 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
14622 (build-system python-build-system)
14623 (native-inputs
14624 `(("python-pytest" ,python-pytest)))
14625 (home-page "https://github.com/jpvanhal/inflection")
14626 (synopsis "Python string transformation library")
14627 (description
14628 "Inflection is a string transformation library. It singularizes
14629 and pluralizes English words, and transforms strings from CamelCase to
14630 underscored string.")
14631 (license license:expat)))
14632
14633 (define-public python2-inflection
14634 (package-with-python2 python-inflection))
14635
14636 (define-public python-pylev
14637 (package
14638 (name "python-pylev")
14639 (version "1.3.0")
14640 (source (origin
14641 (method url-fetch)
14642 (uri (pypi-uri "pylev" version))
14643 (sha256
14644 (base32
14645 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
14646 (build-system python-build-system)
14647 (home-page "https://github.com/toastdriven/pylev")
14648 (synopsis "Levenshtein distance implementation in Python")
14649 (description "Pure Python Levenshtein implementation, based off the
14650 Wikipedia code samples at
14651 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
14652 (license license:bsd-3)))
14653
14654 (define-public python2-pylev
14655 (package-with-python2 python-pylev))
14656
14657 (define-public python-cleo
14658 (package
14659 (name "python-cleo")
14660 (version "0.8.1")
14661 (source (origin
14662 (method url-fetch)
14663 (uri (pypi-uri "cleo" version))
14664 (sha256
14665 (base32
14666 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
14667 (build-system python-build-system)
14668 (native-inputs
14669 `( ;; For testing
14670 ("python-mock" ,python-mock)
14671 ("python-pytest-mock" ,python-pytest-mock)
14672 ("python-pytest" ,python-pytest)))
14673 (propagated-inputs
14674 `(("python-backpack" ,python-backpack)
14675 ("python-clikit" ,python-clikit)
14676 ("python-pastel" ,python-pastel)
14677 ("python-pylev" ,python-pylev)))
14678 (home-page "https://github.com/sdispater/cleo")
14679 (synopsis "Command-line arguments library for Python")
14680 (description
14681 "Cleo allows you to create command-line commands with signature in
14682 docstring and colored output.")
14683 (license license:expat)))
14684
14685 (define-public python2-cleo
14686 (package-with-python2 python-cleo))
14687
14688 (define-public python-tomlkit
14689 (package
14690 (name "python-tomlkit")
14691 (version "0.7.0")
14692 (source
14693 (origin
14694 (method url-fetch)
14695 (uri (pypi-uri "tomlkit" version))
14696 (sha256
14697 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
14698 (build-system python-build-system)
14699 (native-inputs
14700 `(("python-pytest" ,python-pytest)
14701 ("python-pyyaml" ,python-pyyaml)))
14702 (home-page "https://github.com/sdispater/tomlkit")
14703 (synopsis "Style-preserving TOML library")
14704 (description
14705 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
14706 preserves all comments, indentations, whitespace and internal element ordering,
14707 and makes them accessible and editable via an intuitive API. It can also
14708 create new TOML documents from scratch using the provided helpers. Part of the
14709 implementation has been adapted, improved, and fixed from Molten.")
14710 (license license:expat)))
14711
14712 (define-public python-shellingham
14713 (package
14714 (name "python-shellingham")
14715 (version "1.3.2")
14716 (source
14717 (origin
14718 (method url-fetch)
14719 (uri (pypi-uri "shellingham" version))
14720 (sha256
14721 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
14722 (build-system python-build-system)
14723 (arguments
14724 `(#:phases
14725 (modify-phases %standard-phases
14726 (add-after 'unpack 'restore-setup.py
14727 ;; setup.py will return in the next release.
14728 ;; <https://github.com/sarugaku/shellingham/issues/33>
14729 (lambda _
14730 (with-output-to-file "setup.py"
14731 (lambda _
14732 (display "from setuptools import setup\nsetup()\n")))
14733 #t)))))
14734 (home-page "https://github.com/sarugaku/shellingham")
14735 (synopsis "Tool to detect surrounding shell")
14736 (description
14737 "Shellingham detects what shell the current Python executable is
14738 running in.")
14739 (license license:isc)))
14740
14741 (define-public python-memcached
14742 (package
14743 (name "python-memcached")
14744 (version "1.59")
14745 (source
14746 (origin
14747 (method url-fetch)
14748 (uri (pypi-uri "python-memcached" version))
14749 (sha256
14750 (base32
14751 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
14752 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
14753 (build-system python-build-system)
14754 (propagated-inputs `(("python-six" ,python-six)))
14755 (home-page
14756 "https://github.com/linsomniac/python-memcached")
14757 (synopsis "Pure python memcached client")
14758 (description
14759 "This software is a pure Python interface to the memcached memory cache
14760 daemon. It is the client side software which allows storing values in one or
14761 more, possibly remote, memcached servers.")
14762 (license license:psfl)))
14763
14764 (define-public python-clikit
14765 (package
14766 (name "python-clikit")
14767 (version "0.6.2")
14768 (source
14769 (origin
14770 (method url-fetch)
14771 (uri (pypi-uri "clikit" version))
14772 (sha256
14773 (base32
14774 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
14775 (build-system python-build-system)
14776 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
14777 (propagated-inputs
14778 `(("python-crashtest" ,python-crashtest)
14779 ("python-pastel" ,python-pastel)
14780 ("python-pylev" ,python-pylev)))
14781 (home-page "https://github.com/sdispater/clikit")
14782 (synopsis "Group of utilities to build command line interfaces")
14783 (description
14784 "CliKit is a group of utilities to build testable command line
14785 interfaces.")
14786 (properties `((python2-variant . ,(delay python2-clikit))))
14787 (license license:expat)))
14788
14789 (define-public python2-clikit
14790 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
14791 (package/inherit
14792 base
14793 (propagated-inputs
14794 `(("python-enum34" ,python2-enum34)
14795 ("python-typing" ,python2-typing)
14796 ,@(package-propagated-inputs base))))))
14797
14798 (define-public python-msgpack-python
14799 (package
14800 (name "python-msgpack-python")
14801 (version "0.5.6")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (pypi-uri "msgpack-python" version))
14806 (sha256
14807 (base32
14808 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
14809 (build-system python-build-system)
14810 (home-page "https://msgpack.org/")
14811 (synopsis "Package to deserialize messages in MessagePack binary format")
14812 (description
14813 "MessagePack is an efficient binary serialization format. It lets you
14814 exchange data among multiple languages like JSON. But it's faster and
14815 smaller. Small integers are encoded into a single byte, and typical short
14816 strings require only one extra byte in addition to the strings themselves.")
14817 (license license:asl2.0)))
14818
14819 (define-public python-cachy
14820 (package
14821 (name "python-cachy")
14822 (version "0.3.0")
14823 (source
14824 (origin
14825 (method url-fetch)
14826 (uri (pypi-uri "cachy" version))
14827 (sha256
14828 (base32
14829 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
14830 (build-system python-build-system)
14831 (arguments
14832 '(#:phases
14833 (modify-phases %standard-phases
14834 (replace 'check
14835 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
14836 "pytest"))))))
14837 (native-inputs
14838 `(("memcached" ,memcached)
14839 ("python-fakeredis" ,python-fakeredis)
14840 ("python-flexmock" ,python-flexmock)
14841 ("python-pifpaf" ,python-pifpaf)
14842 ("python-pytest" ,python-pytest)))
14843 (propagated-inputs
14844 `(("python-memcached" ,python-memcached)
14845 ("python-msgpack-python" ,python-msgpack-python)
14846 ("python-redis" ,python-redis)))
14847 (home-page "https://github.com/sdispater/cachy")
14848 (synopsis "Simple yet effective caching library")
14849 (description
14850 "Cachy provides a simple yet effective caching library. A simple but
14851 powerful API: thread-safety; decorator syntax; support for memcached, redis,
14852 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
14853 (license license:expat)))
14854
14855 (define-public poetry
14856 (package
14857 (name "poetry")
14858 (version "1.1.5")
14859 ;; Poetry can only be built from source with Poetry.
14860 (source
14861 (origin
14862 (method url-fetch)
14863 (uri (pypi-uri "poetry" version))
14864 (sha256
14865 (base32
14866 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
14867 (build-system python-build-system)
14868 (arguments
14869 `(#:tests? #f ;; Pypi does not have tests.
14870 #:phases
14871 (modify-phases %standard-phases
14872 (add-before 'build 'patch-setup-py
14873 (lambda _
14874 (substitute* "setup.py"
14875 ;; Allow newer versions of python-keyring.
14876 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
14877 ;; TODO: remove after the next release cycle,
14878 ;; when packaging has been updated.
14879 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
14880 #t)))))
14881 (propagated-inputs
14882 `(("python-cachecontrol" ,python-cachecontrol)
14883 ("python-cachy" ,python-cachy)
14884 ("python-cleo" ,python-cleo)
14885 ("python-clikit" ,python-clikit)
14886 ("python-html5lib" ,python-html5lib)
14887 ("python-keyring" ,python-keyring)
14888 ("python-msgpack-transitional" ,python-msgpack-transitional)
14889 ("python-packaging" ,python-packaging)
14890 ("python-pexpect" ,python-pexpect)
14891 ("python-pip" ,python-pip)
14892 ("python-pkginfo" ,python-pkginfo)
14893 ("python-poetry-core" ,python-poetry-core)
14894 ("python-requests" ,python-requests)
14895 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
14896 ("python-shellingham" ,python-shellingham)
14897 ("python-tomlkit" ,python-tomlkit)
14898 ("python-virtualenv" ,python-virtualenv)))
14899 (home-page "https://python-poetry.org")
14900 (synopsis "Python dependency management and packaging made easy")
14901 (description "Poetry is a tool for dependency management and packaging
14902 in Python. It allows you to declare the libraries your project depends on and
14903 it will manage (install/update) them for you.")
14904 (license license:expat)))
14905
14906 (define-public python-lark-parser
14907 (package
14908 (name "python-lark-parser")
14909 (version "0.9.0")
14910 (source (origin
14911 (method url-fetch)
14912 (uri (pypi-uri "lark-parser" version))
14913 (sha256
14914 (base32
14915 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
14916 (build-system python-build-system)
14917 (home-page "https://github.com/lark-parser/lark")
14918 (synopsis "Multi-language parser for Python")
14919 (description
14920 "Lark is a parser built with a focus on ergonomics, performance and
14921 resilience. Lark can parse all context-free languages. That means it is
14922 capable of parsing almost any programming language out there, and to
14923 some degree most natural languages too.")
14924 (license license:expat)))
14925
14926 (define-public python-libcst
14927 (package
14928 (name "python-libcst")
14929 (version "0.3.8")
14930 (source (origin
14931 (method url-fetch)
14932 (uri (pypi-uri "libcst" version))
14933 (sha256
14934 (base32
14935 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
14936 (build-system python-build-system)
14937 (arguments
14938 `(#:phases
14939 (modify-phases %standard-phases
14940 (add-after 'unpack 'remove-failing-tests
14941 (lambda _
14942 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
14943 (delete-file "libcst/tests/test_fuzz.py")
14944 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
14945 (delete-file "libcst/tests/test_pyre_integration.py")
14946 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
14947 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
14948 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
14949 #t))
14950 (add-before 'check 'generate-test-data
14951 (lambda _
14952 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14953 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
14954 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
14955 (replace 'check
14956 (lambda _
14957 (invoke "python" "-m" "unittest")
14958 #t)))))
14959 (native-inputs
14960 `(("python-black" ,python-black)
14961 ("python-isort" ,python-isort)))
14962 (propagated-inputs
14963 `(("python-typing-extensions" ,python-typing-extensions)
14964 ("python-typing-inspect" ,python-typing-inspect)
14965 ("python-pyyaml" ,python-pyyaml)))
14966 (home-page "https://github.com/Instagram/LibCST")
14967 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
14968 (description
14969 "LibCST parses Python source code as a CST tree that keeps all
14970 formatting details (comments, whitespaces, parentheses, etc). It's useful
14971 for building automated refactoring (codemod) applications and linters.
14972 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
14973 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
14974 naming node types and fields, LibCST creates a lossless CST that looks and
14975 feels like an AST.")
14976 (license (list license:expat
14977 ;; Some files unde libcst/_parser/ are under Python Software
14978 ;; Foundation license (see LICENSE file for details)
14979 license:psfl
14980 ;; libcst/_add_slots.py
14981 license:asl2.0))))
14982
14983 (define-public python-typing-inspect
14984 (package
14985 (name "python-typing-inspect")
14986 (version "0.6.0")
14987 (source (origin
14988 (method url-fetch)
14989 (uri (pypi-uri "typing_inspect" version))
14990 (sha256
14991 (base32
14992 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
14993 (build-system python-build-system)
14994 (propagated-inputs
14995 `(("python-mypy-extensions" ,python-mypy-extensions)
14996 ("python-typing-extensions" ,python-typing-extensions)))
14997 (home-page "https://github.com/ilevkivskyi/typing_inspect")
14998 (synopsis "API for inspection of types in the Python @code{typing} module")
14999 (description
15000 "The @code{typing_inspect} module defines experimental API for runtime
15001 inspection of types defined in the Python standard typing module.")
15002 (license license:expat)))
15003
15004 (define-public python-lazy-object-proxy
15005 (package
15006 (name "python-lazy-object-proxy")
15007 (version "1.5.1")
15008 (source (origin
15009 (method url-fetch)
15010 (uri (pypi-uri "lazy-object-proxy" version))
15011 (sha256
15012 (base32
15013 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
15014 (native-inputs
15015 `(("python-setuptools-scm" ,python-setuptools-scm)))
15016 (build-system python-build-system)
15017 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
15018 (synopsis "Lazy object proxy for python")
15019 (description
15020 "Lazy object proxy is an object that wraps a callable but defers the call
15021 until the object is actually required, and caches the result of said call.")
15022 (license license:bsd-2)))
15023
15024 (define-public python2-lazy-object-proxy
15025 (package-with-python2 python-lazy-object-proxy))
15026
15027 (define-public python-dnspython
15028 (package
15029 (name "python-dnspython")
15030 (version "2.1.0")
15031 (source (origin
15032 (method url-fetch)
15033 (uri (pypi-uri "dnspython" version ".zip"))
15034 (sha256
15035 (base32
15036 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15037 (build-system python-build-system)
15038 (native-inputs `(("unzip" ,unzip)))
15039 (arguments '(#:tests? #f)) ; XXX: requires internet access
15040 (home-page "https://www.dnspython.org")
15041 (synopsis "DNS toolkit for Python")
15042 (description
15043 "dnspython is a DNS toolkit for Python. It supports almost all record
15044 types. It can be used for queries, zone transfers, and dynamic updates.
15045 It supports TSIG authenticated messages and EDNS0.")
15046 (license license:expat)))
15047
15048 (define-public python-dnspython-1.16
15049 (package
15050 (inherit python-dnspython)
15051 (version "1.16.0")
15052 (source (origin
15053 (method url-fetch)
15054 (uri (string-append "http://www.dnspython.org/kits/"
15055 version "/dnspython-" version ".tar.gz"))
15056 (sha256
15057 (base32
15058 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15059 (native-inputs '())))
15060
15061 (define-public python2-dnspython-1.16
15062 (package-with-python2 python-dnspython-1.16))
15063
15064 (define-public python-py3dns
15065 (package
15066 (name "python-py3dns")
15067 (version "3.2.1")
15068 (source
15069 (origin
15070 (method url-fetch)
15071 (uri (pypi-uri "py3dns" version))
15072 (sha256
15073 (base32
15074 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15075 (build-system python-build-system)
15076 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15077 ;; removing functionality so we copy from Nix and "just don't build it".
15078 (arguments
15079 `(#:phases
15080 (modify-phases %standard-phases
15081 (add-after 'unpack 'patch-source
15082 (lambda _
15083 (substitute* "setup.py"
15084 (("import DNS") "")
15085 (("DNS.__version__") (string-append "\"" ,version "\"")))
15086 #t)))
15087 #:tests? #f)) ; Also skip the tests.
15088 (home-page "https://launchpad.net/py3dns")
15089 (synopsis "Python 3 DNS library")
15090 (description "This Python 3 module provides a DNS API for looking up DNS
15091 entries from within Python 3 modules and applications. This module is a
15092 simple, lightweight implementation.")
15093 (license license:psfl)))
15094
15095 (define-public python-email-validator
15096 (package
15097 (name "python-email-validator")
15098 (version "1.0.2")
15099 (source
15100 (origin (method url-fetch)
15101 (uri (pypi-uri "email_validator" version))
15102 (sha256
15103 (base32
15104 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15105 (build-system python-build-system)
15106 (arguments
15107 '(#:phases
15108 (modify-phases %standard-phases
15109 (add-before 'build 'use-dnspython
15110 (lambda _
15111 (substitute* "setup.py"
15112 (("dnspython3") "dnspython"))
15113 #t)))))
15114 (propagated-inputs
15115 `(("python-dnspython" ,python-dnspython)
15116 ("python-idna" ,python-idna)))
15117 (home-page "https://github.com/JoshData/python-email-validator")
15118 (synopsis "Email address validation library for Python")
15119 (description
15120 "This library validates email address syntax and deliverability.")
15121 (license license:cc0)))
15122
15123 (define-public python2-email-validator
15124 (package-with-python2 python-email-validator))
15125
15126 (define-public python-ukpostcodeparser
15127 (package
15128 (name "python-ukpostcodeparser")
15129 (version "1.0.3")
15130 (source (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "UkPostcodeParser" version))
15133 (sha256
15134 (base32
15135 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
15136 (build-system python-build-system)
15137 (home-page "https://github.com/hamstah/ukpostcodeparser")
15138 (synopsis "UK Postcode parser for Python")
15139 (description
15140 "This library provides the @code{parse_uk_postcode} function for
15141 parsing UK postcodes.")
15142 (license license:expat)))
15143
15144 (define-public python2-ukpostcodeparser
15145 (package-with-python2 python-ukpostcodeparser))
15146
15147 (define-public python-faker
15148 (package
15149 (name "python-faker")
15150 (version "4.0.2")
15151 (source (origin
15152 (method url-fetch)
15153 (uri (pypi-uri "Faker" version))
15154 (sha256
15155 (base32
15156 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
15157 (build-system python-build-system)
15158 (arguments
15159 '(#:phases
15160 (modify-phases %standard-phases
15161 (replace 'check
15162 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15163 (native-inputs
15164 `(;; For testing
15165 ("python-freezegun" ,python-freezegun)
15166 ("python-pytest" ,python-pytest)
15167 ("python-random2" ,python-random2)
15168 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15169 ("python-validators" ,python-validators)))
15170 (propagated-inputs
15171 `(("python-dateutil" ,python-dateutil)
15172 ("python-text-unidecode" ,python-text-unidecode)))
15173 (home-page "https://github.com/joke2k/faker")
15174 (synopsis "Python package that generates fake data")
15175 (description
15176 "Faker is a Python package that generates fake data such as names,
15177 addresses, and phone numbers.")
15178 (license license:expat)
15179 (properties `((python2-variant . ,(delay python2-faker))))))
15180
15181 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15182 (define-public python2-faker
15183 (let ((base (package-with-python2 (strip-python2-variant
15184 python-faker))))
15185 (package
15186 (inherit base)
15187 (version "3.0.1")
15188 (source (origin
15189 (method url-fetch)
15190 (uri (pypi-uri "Faker" version))
15191 (sha256
15192 (base32
15193 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15194 (native-inputs
15195 `(("python-mock" ,python2-mock)
15196 ,@(package-native-inputs base)))
15197 (propagated-inputs
15198 `(("python2-ipaddress" ,python2-ipaddress)
15199 ("python2-six" ,python2-six)
15200 ,@(package-propagated-inputs base))))))
15201
15202 (define-public python-pyaml
15203 (package
15204 (name "python-pyaml")
15205 (version "18.11.0")
15206 (source (origin
15207 (method url-fetch)
15208 (uri (pypi-uri "pyaml" version))
15209 (sha256
15210 (base32
15211 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15212 (build-system python-build-system)
15213 (native-inputs
15214 `(("python-unidecode" ,python-unidecode)))
15215 (propagated-inputs
15216 `(("python-pyyaml" ,python-pyyaml)))
15217 (home-page "https://github.com/mk-fg/pretty-yaml")
15218 (synopsis "YAML pretty-print library for Python")
15219 (description
15220 "pyaml is a PyYAML based python module to produce pretty and readable
15221 YAML-serialized data.")
15222 (license license:wtfpl2)))
15223
15224 (define-public python2-pyaml
15225 (package-with-python2 python-pyaml))
15226
15227 (define-public python-backpack
15228 (package
15229 (name "python-backpack")
15230 (version "0.1")
15231 (source
15232 (origin
15233 (method url-fetch)
15234 (uri (pypi-uri "backpack" version))
15235 (sha256
15236 (base32
15237 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15238 (build-system python-build-system)
15239 (native-inputs
15240 `(("python-pytest" ,python-pytest)
15241 ("python-nose" ,python-nose)))
15242 (propagated-inputs
15243 `(("python-simplejson" ,python-simplejson)))
15244 (home-page "https://github.com/sdispater/backpack")
15245 (synopsis "Utilities for working with Python collections")
15246 (description "Backpack provides some useful utilities for working with
15247 collections of data.")
15248 (license license:expat)))
15249
15250 (define-public python2-backpack
15251 (package-with-python2 python-backpack))
15252
15253 (define-public python-prompt-toolkit
15254 (package
15255 (name "python-prompt-toolkit")
15256 (version "3.0.18")
15257 (source
15258 (origin
15259 (method url-fetch)
15260 (uri (pypi-uri "prompt_toolkit" version))
15261 (sha256
15262 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15263 (build-system python-build-system)
15264 (arguments
15265 `(#:phases
15266 (modify-phases %standard-phases
15267 (delete 'check)
15268 (add-after 'install 'post-install-check
15269 (lambda* (#:key inputs outputs #:allow-other-keys)
15270 ;; HOME is needed for the test
15271 ;; "test_pathcompleter_can_expanduser".
15272 (setenv "HOME" "/tmp")
15273 (add-installed-pythonpath inputs outputs)
15274 (invoke "py.test"))))))
15275 (propagated-inputs
15276 `(("python-wcwidth" ,python-wcwidth)))
15277 (native-inputs
15278 `(("python-pytest" ,python-pytest)))
15279 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
15280 (synopsis "Library for building command line interfaces in Python")
15281 (description
15282 "Prompt-Toolkit is a library for building interactive command line
15283 interfaces in Python. It's like GNU Readline but it also features syntax
15284 highlighting while typing, out-of-the-box multi-line input editing, advanced
15285 code completion, incremental search, support for Chinese double-width
15286 characters, mouse support, and auto suggestions.")
15287 (license license:bsd-3)
15288 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
15289
15290 (define-public python-prompt-toolkit-2
15291 (package (inherit python-prompt-toolkit)
15292 (name "python-prompt-toolkit")
15293 (version "2.0.7")
15294 (source
15295 (origin
15296 (method url-fetch)
15297 (uri (pypi-uri "prompt_toolkit" version))
15298 (sha256
15299 (base32
15300 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
15301 (propagated-inputs
15302 `(("python-wcwidth" ,python-wcwidth)
15303 ("python-six" ,python-six)
15304 ("python-pygments" ,python-pygments)))
15305 (properties '())))
15306
15307 (define-public python2-prompt-toolkit
15308 (package-with-python2 python-prompt-toolkit-2))
15309
15310 (define-public python-prompt-toolkit-1
15311 (package (inherit python-prompt-toolkit-2)
15312 (version "1.0.15")
15313 (source
15314 (origin
15315 (method url-fetch)
15316 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
15317 (sha256
15318 (base32
15319 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
15320
15321 (define-public python2-prompt-toolkit-1
15322 (package-with-python2 python-prompt-toolkit-1))
15323
15324 (define-public python-jedi
15325 (package
15326 (name "python-jedi")
15327 (version "0.17.2")
15328 (source
15329 (origin
15330 (method url-fetch)
15331 (uri (pypi-uri "jedi" version))
15332 (sha256
15333 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
15334 (build-system python-build-system)
15335 (arguments
15336 `(#:phases
15337 (modify-phases %standard-phases
15338 (replace 'check
15339 (lambda* (#:key tests? #:allow-other-keys)
15340 (when tests?
15341 (setenv "HOME" "/tmp")
15342 (invoke "python" "-m" "pytest" "-vv"))
15343 #t)))))
15344 (native-inputs
15345 `(("python-pytest" ,python-pytest)
15346 ("python-docopt" ,python-docopt)))
15347 (propagated-inputs
15348 `(("python-parso" ,python-parso)))
15349 (home-page "https://github.com/davidhalter/jedi")
15350 (synopsis "Autocompletion and static analysis library for Python")
15351 (description
15352 "Jedi is a static analysis tool for Python that can be used in Integrated
15353 Development Environments (@dfn{IDE}s) and text editors. It understands Python
15354 on a deeper level than many other static analysis frameworks for Python.
15355
15356 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
15357 well.")
15358 (license license:expat)))
15359
15360 (define-public python2-jedi
15361 (package-with-python2 python-jedi))
15362
15363 (define-public ptpython
15364 (package
15365 (name "ptpython")
15366 (version "3.0.17")
15367 (source (origin
15368 (method url-fetch)
15369 (uri (pypi-uri "ptpython" version))
15370 (sha256
15371 (base32
15372 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
15373 (build-system python-build-system)
15374 (arguments
15375 `(#:tests? #f)) ;there are no tests
15376 (propagated-inputs
15377 `(("python-appdirs" ,python-appdirs)
15378 ("python-black" ,python-black)
15379 ("python-jedi" ,python-jedi)
15380 ("python-prompt-toolkit" ,python-prompt-toolkit)
15381 ("python-pygments" ,python-pygments)))
15382 (home-page "https://github.com/jonathanslenders/ptpython")
15383 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
15384 (description
15385 "ptpython is a Python read-eval-print loop with IDE-like features.
15386 It supports syntax highlighting, multiline editing, autocompletion, mouse,
15387 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
15388 etc.")
15389 (license license:bsd-3)
15390 (properties `((python2-variant . ,(delay ptpython-2))))))
15391
15392 (define-public ptpython-2
15393 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
15394 (package/inherit base
15395 (name "ptpython2"))))
15396
15397 (define-public python-easyprocess
15398 (package
15399 (name "python-easyprocess")
15400 (version "0.3")
15401 (source
15402 (origin
15403 (method url-fetch)
15404 (uri (pypi-uri "EasyProcess" version))
15405 (sha256
15406 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
15407 (build-system python-build-system)
15408 (arguments
15409 ;; Tests require pyvirtualdisplay, which requires this package.
15410 `(#:tests? #f))
15411 (home-page "https://github.com/ponty/easyprocess")
15412 (synopsis "Python subprocess interface")
15413 (description
15414 "@code{easyprocess} is an easy to use Python subprocess interface.")
15415 (license license:bsd-3)))
15416
15417 (define-public python-entrypoint2
15418 (package
15419 (name "python-entrypoint2")
15420 (version "0.2.4")
15421 (source
15422 (origin
15423 (method url-fetch)
15424 (uri (pypi-uri "entrypoint2" version))
15425 (sha256
15426 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
15427 (build-system python-build-system)
15428 (arguments
15429 `(#:test-target "pytest"))
15430 (native-inputs
15431 `(("python-easyprocess" ,python-easyprocess)
15432 ("python-pytest" ,python-pytest)
15433 ("python-pytest-runner" ,python-pytest-runner)))
15434 (home-page "https://github.com/ponty/entrypoint2")
15435 (synopsis "Command-line interface for Python modules")
15436 (description
15437 "@code{entrypoint2} is an easy to use command-line interface for Python
15438 modules based on @code{argparse}. It translates function signature and
15439 documentation to argparse configuration.")
15440 (license license:bsd-3)))
15441
15442 (define-public python-pyvirtualdisplay
15443 (package
15444 (name "python-pyvirtualdisplay")
15445 (version "2.1")
15446 (source
15447 (origin
15448 (method url-fetch)
15449 (uri (pypi-uri "PyVirtualDisplay" version))
15450 (sha256
15451 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
15452 (build-system python-build-system)
15453 (arguments
15454 ;; Tests fail with:
15455 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
15456 `(#:tests? #f))
15457 (native-inputs
15458 `(("python-entrypoint2" ,python-entrypoint2)
15459 ("python-psutil" ,python-psutil)
15460 ("python-pytest" ,python-pytest)
15461 ("python-pytest-runner" ,python-pytest-runner)))
15462 (propagated-inputs
15463 `(("python-easyprocess" ,python-easyprocess)
15464 ("python-pillow" ,python-pillow)))
15465 (home-page "https://github.com/ponty/pyvirtualdisplay")
15466 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
15467 (description
15468 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
15469 (license license:bsd-3)))
15470
15471 (define-public python-stem
15472 (package
15473 (name "python-stem")
15474 (version "1.8.0")
15475 (source
15476 (origin
15477 (method url-fetch)
15478 (uri (pypi-uri "stem" version))
15479 (sha256
15480 (base32
15481 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
15482 (build-system python-build-system)
15483 (arguments
15484 `(#:phases
15485 (modify-phases %standard-phases
15486 (replace 'check
15487 (lambda _
15488 (invoke "./run_tests.py" "--unit")
15489 #t)))))
15490 (native-inputs
15491 `(("python-mock" ,python-mock)
15492 ("python-pycodestyle" ,python-pycodestyle)
15493 ("python-pyflakes" ,python-pyflakes)))
15494 (home-page "https://stem.torproject.org/")
15495 (synopsis
15496 "Python controller library that allows applications to interact with Tor")
15497 (description
15498 "Stem is a Python controller library for Tor. With it you can use Tor's
15499 control protocol to script against the Tor process and read descriptor data
15500 relays publish about themselves.")
15501 (license license:lgpl3)))
15502
15503 (define-public python-pyserial
15504 (package
15505 (name "python-pyserial")
15506 (version "3.5")
15507 (source
15508 (origin
15509 (method url-fetch)
15510 (uri (pypi-uri "pyserial" version))
15511 (sha256
15512 (base32
15513 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
15514 (build-system python-build-system)
15515 (arguments
15516 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
15517 ;; #:phases
15518 ;; (modify-phases %standard-phases
15519 ;; (replace 'check
15520 ;; (lambda _
15521 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
15522 (home-page
15523 "https://github.com/pyserial/pyserial")
15524 (synopsis "Python Serial Port Bindings")
15525 (description "@code{pyserial} provide serial port bindings for Python. It
15526 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
15527 and/or Xon/Xoff. The port is accessed in RAW mode.")
15528 (license license:bsd-3)))
15529
15530 (define-public python2-pyserial
15531 (package-with-python2 python-pyserial))
15532
15533 (define-public python-kivy
15534 (package
15535 (name "python-kivy")
15536 (version "1.10.1")
15537 (source
15538 (origin
15539 (method url-fetch)
15540 (uri (pypi-uri "Kivy" version))
15541 (file-name (string-append name "-" version ".tar.gz"))
15542 (sha256
15543 (base32
15544 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
15545 (build-system python-build-system)
15546 (arguments
15547 `(#:tests? #f ; Tests require many optional packages
15548 #:phases
15549 (modify-phases %standard-phases
15550 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
15551 (lambda* (#:key inputs #:allow-other-keys)
15552 (setenv "KIVY_SDL2_PATH"
15553 (string-append (assoc-ref inputs "sdl-union")
15554 "/include/SDL2"))
15555 #t)))))
15556 (native-inputs
15557 `(("pkg-config" ,pkg-config)
15558 ("python-cython" ,python-cython)))
15559 (inputs
15560 `(("gstreamer" ,gstreamer)
15561 ("mesa" ,mesa)
15562 ("sdl-union"
15563 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
15564 (home-page "https://kivy.org")
15565 (synopsis
15566 "Multitouch application framework")
15567 (description
15568 "A software library for rapid development of
15569 hardware-accelerated multitouch applications.")
15570 (license license:expat)))
15571
15572 (define-public python2-kivy
15573 (package-with-python2 python-kivy))
15574
15575 (define-public python-binaryornot
15576 (package
15577 (name "python-binaryornot")
15578 (version "0.4.4")
15579 (source (origin
15580 (method url-fetch)
15581 (uri (pypi-uri "binaryornot" version))
15582 (sha256
15583 (base32
15584 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
15585 (build-system python-build-system)
15586 (arguments
15587 `(#:phases
15588 (modify-phases %standard-phases
15589 (add-after 'unpack 'patch-tests
15590 (lambda _
15591 ;; TypeError: binary() got an unexpected keyword argument
15592 ;; 'average_size'.
15593 (substitute* "tests/test_check.py"
15594 (("average_size=512") ""))
15595 #t)))))
15596 (propagated-inputs
15597 `(("python-chardet" ,python-chardet)
15598 ("python-hypothesis" ,python-hypothesis)))
15599 (home-page "https://github.com/audreyr/binaryornot")
15600 (synopsis "Package to check if a file is binary or text")
15601 (description "Ultra-lightweight pure Python package to check if a file is
15602 binary or text.")
15603 (license license:bsd-3)
15604 (properties `((python2-variant . ,(delay python2-binaryornot))))))
15605
15606 (define-public python2-binaryornot
15607 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
15608 (package/inherit base
15609 (propagated-inputs
15610 `(("python2-enum34" ,python2-enum34)
15611 ,@(package-propagated-inputs base))))))
15612
15613 (define-public python-binwalk
15614 (package
15615 (name "python-binwalk")
15616 (version "2.2.0")
15617 (source
15618 (origin
15619 (method git-fetch)
15620 (uri (git-reference
15621 (url "https://github.com/ReFirmLabs/binwalk")
15622 (commit (string-append "v" version))))
15623 (file-name (git-file-name name version))
15624 (sha256
15625 (base32
15626 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
15627 (build-system python-build-system)
15628 (arguments
15629 `(#:phases
15630 (modify-phases %standard-phases
15631 (add-before 'check 'set-pythonpath
15632 (lambda _
15633 (setenv "PYTHONPATH"
15634 (string-append
15635 (getcwd) "/src/"
15636 ":" (getenv "PYTHONPATH")))
15637 (setenv "HOME" "")
15638 #t)))))
15639 (native-inputs
15640 `(("python-coverage" ,python-coverage)
15641 ("python-nose" ,python-nose)))
15642 (home-page "https://github.com/ReFirmLabs/binwalk")
15643 (synopsis "Firmware analysis tool")
15644 (description "Binwalk is a tool for analyzing, reverse engineering, and
15645 extracting firmware images")
15646 (license license:expat)))
15647
15648 (define-public python-nltk
15649 (package
15650 (name "python-nltk")
15651 (version "3.6.2")
15652 (source (origin
15653 (method url-fetch)
15654 (uri (pypi-uri "nltk" version ".zip"))
15655 (sha256
15656 (base32
15657 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
15658 (build-system python-build-system)
15659 (arguments
15660 '(;; The tests require some extra resources to be downloaded.
15661 ;; TODO Try packaging these resources.
15662 #:tests? #f))
15663 (propagated-inputs
15664 `(("python-click" ,python-click)
15665 ("python-joblib" ,python-joblib)
15666 ("python-regex" ,python-regex)
15667 ("python-tqdm" ,python-tqdm)))
15668 (native-inputs
15669 `(("unzip" ,unzip)))
15670 (home-page "http://nltk.org/")
15671 (synopsis "Natural Language Toolkit")
15672 (description "It provides interfaces to over 50 corpora and lexical
15673 resources such as WordNet, along with a suite of text processing libraries
15674 for classification, tokenization, stemming, tagging, parsing, and semantic
15675 reasoning, wrappers for natural language processing libraries.")
15676 (license license:asl2.0)))
15677
15678 ;; Versions >=3.5 breaks backward-compatibility,
15679 ;; so we keep version 3.4.x around for a while.
15680 (define-public python-nltk-3.4
15681 (package
15682 (inherit python-nltk)
15683 (version "3.4.5")
15684 (source
15685 (origin
15686 (method url-fetch)
15687 (uri (pypi-uri "nltk" version ".zip"))
15688 (sha256
15689 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
15690 (propagated-inputs `(("python-six" ,python-six)))))
15691
15692 (define-public python2-nltk
15693 (package-with-python2 python-nltk))
15694
15695 (define-public python-pymongo
15696 (package
15697 (name "python-pymongo")
15698 (version "3.7.2")
15699 (source (origin
15700 (method url-fetch)
15701 (uri (pypi-uri "pymongo" version))
15702 (sha256
15703 (base32
15704 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
15705 (build-system python-build-system)
15706 (propagated-inputs
15707 `(("python-certifi" ,python-certifi)))
15708 (home-page "https://github.com/mongodb/mongo-python-driver")
15709 (synopsis "Python driver for MongoDB")
15710 (description "Python driver for MongoDB.")
15711 (license license:asl2.0)))
15712
15713 (define-public python2-pymongo
15714 (package-with-python2 python-pymongo))
15715
15716 (define-public python-consul
15717 (package
15718 (name "python-consul")
15719 (version "0.6.1")
15720 (source
15721 (origin
15722 (method url-fetch)
15723 (uri (pypi-uri "python-consul" version))
15724 (sha256
15725 (base32
15726 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
15727 (build-system python-build-system)
15728 (arguments
15729 '(#:tests? #f)) ; The tests are not distributed
15730 (propagated-inputs
15731 `(("python-requests" ,python-requests)
15732 ("python-six" ,python-six)))
15733 (home-page "https://github.com/cablehead/python-consul")
15734 (synopsis "Python client for Consul")
15735 (description
15736 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
15737 discovery, monitoring and configuration.")
15738 (license license:expat)))
15739
15740 (define-public python2-consul
15741 (package-with-python2 python-consul))
15742
15743 (define-public python-schematics
15744 (package
15745 (name "python-schematics")
15746 (version "1.1.1")
15747 (source
15748 (origin
15749 (method git-fetch)
15750 (uri (git-reference
15751 (url "https://github.com/schematics/schematics")
15752 (commit (string-append "v" version))))
15753 (file-name (git-file-name name version))
15754 (sha256
15755 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
15756 (build-system python-build-system)
15757 (propagated-inputs
15758 `(("python-six" ,python-six)))
15759 (arguments
15760 ;; The tests require a bunch of not very nice packages with fixed
15761 ;; version requirements (e.g. python-coveralls).
15762 `(#:tests? #f))
15763 (home-page "https://github.com/schematics/schematics")
15764 (synopsis "Python Data Structures for Humans")
15765 (description "Python Data Structures for Humans.")
15766 (license license:bsd-3)))
15767
15768 (define-public python2-schematics
15769 (package-with-python2 python-schematics))
15770
15771 (define-public python-odfpy
15772 (package
15773 (name "python-odfpy")
15774 (version "1.4.1")
15775 (source (origin
15776 (method url-fetch)
15777 (uri (pypi-uri "odfpy" version))
15778 (sha256
15779 (base32
15780 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
15781 (arguments
15782 `(#:phases
15783 (modify-phases %standard-phases
15784 (replace 'check
15785 (lambda _
15786 (setenv "PYTHONPATH" (string-append "./build/lib:"
15787 (getenv "PYTHONPATH")))
15788 (invoke "pytest" "-vv"))))))
15789 (build-system python-build-system)
15790 (native-inputs
15791 `(("python-pytest" ,python-pytest)))
15792 (propagated-inputs
15793 `(("python-defusedxml" ,python-defusedxml)))
15794 (home-page "https://github.com/eea/odfpy")
15795 (synopsis "Python API and tools to manipulate OpenDocument files")
15796 (description "Collection of libraries and utility programs written in
15797 Python to manipulate OpenDocument 1.2 files.")
15798 (license
15799 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
15800 ;; number of files with other licenses.
15801 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
15802
15803 (define-public python2-odfpy
15804 (package-with-python2 python-odfpy))
15805
15806 (define-public python-natsort
15807 (package
15808 (name "python-natsort")
15809 (version "7.0.1")
15810 (source (origin
15811 (method url-fetch)
15812 (uri (pypi-uri "natsort" version))
15813 (sha256
15814 (base32
15815 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
15816 (build-system python-build-system)
15817 (arguments
15818 `(#:modules ((guix build utils)
15819 (guix build python-build-system)
15820 (srfi srfi-1)
15821 (srfi srfi-26)
15822 (ice-9 ftw))
15823 #:phases
15824 (modify-phases %standard-phases
15825 (add-before 'check 'set-cachedir
15826 ;; Tests require write access to $HOME by default
15827 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
15828 (replace 'check
15829 (lambda _
15830 (let ((cwd (getcwd)))
15831 (setenv "PYTHONPATH"
15832 (string-append
15833 cwd "/build/"
15834 (find (cut string-prefix? "lib" <>)
15835 (scandir (string-append cwd "/build")))
15836 ":"
15837 (getenv "PYTHONPATH")))
15838 (invoke "pytest" "-v")))))))
15839 (native-inputs
15840 `(("python-hypothesis" ,python-hypothesis)
15841 ("python-pytest-cov" ,python-pytest-cov)
15842 ("python-pytest-mock" ,python-pytest-mock)
15843 ("python-pytest" ,python-pytest)))
15844 (propagated-inputs ; TODO: Add python-fastnumbers.
15845 `(("python-pyicu" ,python-pyicu)))
15846 (home-page "https://github.com/SethMMorton/natsort")
15847 (synopsis "Natural sorting for python and shell")
15848 (description
15849 "Natsort lets you apply natural sorting on lists instead of
15850 lexicographical. If you use the built-in @code{sorted} method in python
15851 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
15852 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
15853 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
15854 identifies numbers and sorts them separately from strings. It can also sort
15855 version numbers, real numbers, mixed types and more, and comes with a shell
15856 command @command{natsort} that exposes this functionality in the command line.")
15857 (license license:expat)
15858 (properties `((python2-variant . ,(delay python2-natsort))))))
15859
15860 ;; Natsort 6.x are the last versions with support for Python 2.
15861 (define-public python2-natsort
15862 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
15863 (package (inherit base)
15864 (version "6.2.1")
15865 (source (origin
15866 (method url-fetch)
15867 (uri (pypi-uri "natsort" version))
15868 (sha256
15869 (base32
15870 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
15871 (native-inputs
15872 `(("python2-pathlib" ,python2-pathlib)
15873 ,@(package-native-inputs base))))))
15874
15875 (define-public glances
15876 (package
15877 (name "glances")
15878 (version "3.1.7")
15879 (source
15880 (origin
15881 (method url-fetch)
15882 (uri (pypi-uri "Glances" version))
15883 (sha256
15884 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
15885 (modules '((guix build utils)))
15886 (snippet
15887 '(begin
15888 ;; Glances phones PyPI for weekly update checks by default.
15889 ;; Disable these. The user can re-enable them if desired.
15890 (substitute* "glances/outdated.py"
15891 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
15892 (string-append indentation
15893 "self.args.disable_check_update = True\n"
15894 line)))
15895 #t))))
15896 (build-system python-build-system)
15897 (propagated-inputs
15898 `(("python-future" ,python-future)
15899 ("python-psutil" ,python-psutil)))
15900 (home-page "https://github.com/nicolargo/glances")
15901 (synopsis "Cross-platform curses-based monitoring tool")
15902 (description
15903 "Glances is a curses-based monitoring tool for a wide variety of platforms.
15904 Glances uses the PsUtil library to get information from your system. It
15905 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
15906 (license license:lgpl3+)))
15907
15908 (define-public python-glances
15909 (deprecated-package "python-glances" glances))
15910
15911 (define-public python-graphql-core
15912 (package
15913 (name "python-graphql-core")
15914 (version "3.1.2")
15915 (source
15916 (origin
15917 (method url-fetch)
15918 (uri (pypi-uri "graphql-core" version))
15919 (sha256
15920 (base32
15921 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
15922 (build-system python-build-system)
15923 (arguments
15924 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
15925 #:phases
15926 (modify-phases %standard-phases
15927 (add-after 'unpack 'patch-hardcoded-version
15928 (lambda _ (substitute*
15929 "setup.py"
15930 (("'gevent==1.1rc1'") "'gevent'"))
15931 #t)))))
15932 (native-inputs
15933 `(("python-gevent" ,python-gevent)
15934 ("python-mock" ,python-mock)
15935 ("python-pytest-mock" ,python-pytest-mock)))
15936 (propagated-inputs
15937 `(("python-promise" ,python-promise)
15938 ("python-six" ,python-six)))
15939 (home-page "https://github.com/graphql-python/graphql-core")
15940 (synopsis "GraphQL implementation for Python")
15941 (description
15942 "GraphQL implementation for Python. GraphQL is a data query language and
15943 runtime designed and used to request and deliver data to mobile and web apps.
15944 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
15945 to Python.")
15946 (license license:expat)))
15947
15948 (define-public python-graphql-relay
15949 (package
15950 (name "python-graphql-relay")
15951 (version "0.4.5")
15952 (source
15953 (origin
15954 (method url-fetch)
15955 (uri (pypi-uri "graphql-relay" version))
15956 (sha256
15957 (base32
15958 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
15959 (build-system python-build-system)
15960 (arguments
15961 '(#:tests? #f)) ; The tests are not distributed
15962 (propagated-inputs
15963 `(("python-graphql-core" ,python-graphql-core)
15964 ("python-promise" ,python-promise)
15965 ("python-six" ,python-six)))
15966 (home-page "https://github.com/graphql-python/graphql-relay-py")
15967 (synopsis "Relay implementation for Python")
15968 (description
15969 "This is a library to allow the easy creation of Relay-compliant servers
15970 using the GraphQL Python reference implementation of a GraphQL server. It
15971 should be noted that the code is a exact port of the original
15972 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
15973 from Facebook.")
15974 (license license:expat)))
15975
15976 (define-public python-graphene
15977 (package
15978 (name "python-graphene")
15979 (version "0.10.2")
15980 (source
15981 (origin
15982 (method url-fetch)
15983 (uri (pypi-uri "graphene" version))
15984 (sha256
15985 (base32
15986 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
15987 (build-system python-build-system)
15988 (propagated-inputs
15989 `(("python-graphql-core" ,python-graphql-core)
15990 ("python-graphql-relay" ,python-graphql-relay)
15991 ("python-iso8601" ,python-iso8601)
15992 ("python-promise" ,python-promise)
15993 ("python-six" ,python-six)))
15994 (arguments
15995 `(#:tests? #f)) ; no tests/ in the PyPI tarball
15996 (home-page "https://graphene-python.org/")
15997 (synopsis "GraphQL Framework for Python")
15998 (description
15999 "Graphene is a Python library for building GraphQL schemas/types.
16000 A GraphQL schema describes your data model, and provides a GraphQL server
16001 with an associated set of resolve methods that know how to fetch data.")
16002 (license license:expat)))
16003
16004 (define-public python-nautilus
16005 (package
16006 (name "python-nautilus")
16007 (version "0.4.9")
16008 (source
16009 (origin
16010 (method url-fetch)
16011 (uri (pypi-uri "nautilus" version))
16012 (sha256
16013 (base32
16014 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
16015 (build-system python-build-system)
16016 (arguments `(#:tests? #f)) ; fails to import test modules
16017 (propagated-inputs
16018 `(("python-bcrypt" ,python-bcrypt)
16019 ("python-click" ,python-click)
16020 ("python-consul" ,python-consul)
16021 ("python-graphene" ,python-graphene)
16022 ("python-jinja2" ,python-jinja2)
16023 ("python-peewee" ,python-peewee)
16024 ("python-pika" ,python-pika)
16025 ("python-tornado" ,python-tornado)
16026 ("python-wtforms" ,python-wtforms)))
16027 (native-inputs
16028 `(("python-nose2" ,python-nose2)))
16029 (home-page "https://github.com/AlecAivazis/nautilus")
16030 (synopsis "Library for creating microservice applications")
16031 (description
16032 "Nautilus is a framework for flux based microservices that looks to
16033 provide extendible implementations of common aspects of a cloud so that you can
16034 focus on building massively scalable web applications.")
16035 (license license:expat)))
16036
16037 (define-public python-random2
16038 (package
16039 (name "python-random2")
16040 (version "1.0.1")
16041 (source (origin
16042 (method url-fetch)
16043 (uri (pypi-uri "random2" version ".zip"))
16044 (sha256
16045 (base32
16046 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
16047 (build-system python-build-system)
16048 (native-inputs `(("unzip" ,unzip)))
16049 (home-page "http://pypi.python.org/pypi/random2")
16050 (synopsis "Python 3 version of the Python 2 @code{random} module")
16051 (description
16052 "This package provides a Python 3 ported version of Python 2.7’s
16053 @code{random} module. It has also been back-ported to work in Python 2.6.
16054
16055 In Python 3, the implementation of @code{randrange()} was changed, so that
16056 even with the same seed you get different sequences in Python 2 and 3.
16057
16058 This package closes that gap, allowing stable random number generation
16059 between the different Python versions.")
16060 (license license:psfl)))
16061
16062 (define-public python2-random2
16063 (package-with-python2 python-random2))
16064
16065 (define-public python-snowballstemmer
16066 (package
16067 (name "python-snowballstemmer")
16068 (version "2.0.0")
16069 (source (origin
16070 (method url-fetch)
16071 (uri (pypi-uri "snowballstemmer" version))
16072 (sha256
16073 (base32
16074 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16075 (build-system python-build-system)
16076 (arguments
16077 `(;; No tests exist
16078 #:tests? #f))
16079 (home-page "https://github.com/shibukawa/snowball_py")
16080 (synopsis "Snowball stemming library collection for Python")
16081 (description "This package provides 16 word stemmer algorithms generated
16082 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16083 English stemmer.")
16084 (license license:bsd-3)))
16085
16086 (define-public python2-snowballstemmer
16087 (package-with-python2 python-snowballstemmer))
16088
16089 (define-public python-setproctitle
16090 (package
16091 (name "python-setproctitle")
16092 (version "1.1.10")
16093 (source
16094 (origin
16095 (method url-fetch)
16096 (uri (pypi-uri "setproctitle" version))
16097 (sha256
16098 (base32
16099 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16100 (build-system python-build-system)
16101 (arguments
16102 '(#:phases
16103 (modify-phases %standard-phases
16104 (add-before 'check 'patch-Makefile
16105 ;; Stricly this is only required for the python2 variant.
16106 ;; But adding a phase in an inherited package seems to be
16107 ;; cumbersum. So we patch even for python3.
16108 (lambda _
16109 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16110 (when nose
16111 (substitute* "Makefile"
16112 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16113 (string-append nose "/bin/nosetests "))))
16114 #t)))
16115 (replace 'check
16116 (lambda _
16117 (setenv "PYTHON" (or (which "python3") (which "python")))
16118 (setenv "PYCONFIG" (if (which "python3-config")
16119 "python3-config --embed"
16120 "python-config"))
16121 (setenv "CC" "gcc")
16122 ;; No need to extend PYTHONPATH to find the built package, since
16123 ;; the Makefile will build anyway
16124 (invoke "make" "check"))))))
16125 (native-inputs
16126 `(("procps" ,procps))) ; required for tests
16127 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16128 (synopsis
16129 "Setproctitle implementation for Python to customize the process title")
16130 (description "The library allows a process to change its title (as displayed
16131 by system tools such as ps and top).
16132
16133 Changing the title is mostly useful in multi-process systems, for
16134 example when a master process is forked: changing the children's title
16135 allows identifying the task each process is busy with. The technique
16136 is used by PostgreSQL and the OpenSSH Server for example.")
16137 (license license:bsd-3)
16138 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16139
16140 (define-public python2-setproctitle
16141 (let ((base (package-with-python2
16142 (strip-python2-variant python-setproctitle))))
16143 (package/inherit base
16144 (native-inputs `(("python2-nose" ,python2-nose)
16145 ,@(package-native-inputs base))))))
16146
16147 (define-public python-validictory
16148 (package
16149 (name "python-validictory")
16150 (version "1.0.1")
16151 (source
16152 (origin
16153 (method url-fetch)
16154 (uri (pypi-uri "validictory" version))
16155 (sha256
16156 (base32
16157 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16158 (build-system python-build-system)
16159 (arguments
16160 '(#:phases
16161 (modify-phases %standard-phases
16162 (add-after 'unpack 'bootstrap
16163 ;; Move the tests out of the package directory to avoid
16164 ;; packaging them.
16165 (lambda* _
16166 (rename-file "validictory/tests" "tests")
16167 (delete-file "tests/__init__.py")))
16168 (replace 'check
16169 (lambda _
16170 ;; Extend PYTHONPATH so the built package will be found.
16171 (setenv "PYTHONPATH"
16172 (string-append (getcwd) "/build/lib:"
16173 (getenv "PYTHONPATH")))
16174 (invoke "py.test" "-vv" ))))))
16175 (native-inputs
16176 `(("python-pytest" ,python-pytest)))
16177 (home-page
16178 "https://github.com/jamesturk/validictory")
16179 (synopsis "General purpose Python data validator")
16180 (description "It allows validation of arbitrary Python data structures.
16181
16182 The schema format is based on the JSON Schema
16183 proposal (http://json-schema.org), so combined with json the library is also
16184 useful as a validator for JSON data.")
16185 (license license:expat)))
16186
16187 (define-public python2-validictory
16188 (package-with-python2 python-validictory))
16189
16190 (define-public python-pyelftools
16191 (package
16192 (name "python-pyelftools")
16193 (version "0.25")
16194 (source
16195 (origin
16196 (method url-fetch)
16197 (uri (pypi-uri "pyelftools" version))
16198 (sha256
16199 (base32
16200 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
16201 (build-system python-build-system)
16202 (arguments
16203 `(#:phases
16204 (modify-phases %standard-phases
16205 (add-before 'check 'set-pythonpath
16206 (lambda _
16207 (setenv "PYTHONPATH"
16208 (string-append
16209 (getcwd) "/test/"
16210 ":" (getenv "PYTHONPATH")))
16211 #t)))))
16212 (home-page
16213 "https://github.com/eliben/pyelftools")
16214 (synopsis
16215 "Analyze binary and library file information")
16216 (description "This Python library provides interfaces for parsing and
16217 analyzing two binary and library file formats; the Executable and Linking
16218 Format (ELF), and debugging information in the Debugging With Attributed
16219 Record Format (DWARF).")
16220 (license license:public-domain)))
16221
16222 (define-public python-pyev
16223 (package
16224 (name "python-pyev")
16225 (version "0.9.0")
16226 (source
16227 (origin
16228 (method url-fetch)
16229 (uri (pypi-uri "pyev" version))
16230 (sha256
16231 (base32
16232 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
16233 (build-system python-build-system)
16234 (arguments
16235 `(#:tests? #f ; no test suite
16236 #:phases
16237 (modify-phases %standard-phases
16238 (add-after 'unpack 'patch
16239 (lambda* (#:key inputs #:allow-other-keys)
16240 (let ((libev (string-append (assoc-ref inputs "libev")
16241 "/lib/libev.so.4")))
16242 (substitute* "setup.py"
16243 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
16244 (string-append "libev_dll_name = \"" libev "\"")))))))))
16245 (inputs
16246 `(("libev" ,libev)))
16247 (home-page "https://github.com/gabrielfalcao/pyev")
16248 (synopsis "Python libev interface")
16249 (description "Pyev provides a Python interface to libev.")
16250 (license license:gpl3)))
16251
16252 (define-public python2-pyev
16253 (package-with-python2 python-pyev))
16254
16255 (define-public python-imagesize
16256 (package
16257 (name "python-imagesize")
16258 (version "1.2.0")
16259 (source
16260 (origin
16261 (method url-fetch)
16262 (uri (pypi-uri "imagesize" version))
16263 (sha256
16264 (base32
16265 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
16266 (build-system python-build-system)
16267 (home-page "https://github.com/shibukawa/imagesize_py")
16268 (synopsis "Gets image size of files in various formats in Python")
16269 (description
16270 "This package allows determination of image size from
16271 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
16272 (license license:expat)))
16273
16274 (define-public python2-imagesize
16275 (package-with-python2 python-imagesize))
16276
16277 (define-public python-termstyle
16278 (package
16279 (name "python-termstyle")
16280 (version "0.1.11")
16281 (source
16282 (origin
16283 (method url-fetch)
16284 (uri (pypi-uri "termstyle" version))
16285 (sha256
16286 (base32
16287 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
16288 (build-system python-build-system)
16289 (arguments
16290 '(#:phases
16291 (modify-phases %standard-phases
16292 (replace 'check
16293 (lambda _
16294 (invoke "python" "test3.py"))))))
16295 (home-page "https://github.com/gfxmonk/termstyle")
16296 (synopsis "Console text coloring for Python")
16297 (description "This package provides console text coloring for Python.")
16298 (license license:bsd-3)))
16299
16300 (define-public python-argcomplete
16301 (package
16302 (name "python-argcomplete")
16303 (version "1.11.1")
16304 (source
16305 (origin
16306 (method url-fetch)
16307 (uri (pypi-uri "argcomplete" version))
16308 (sha256
16309 (base32
16310 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
16311 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
16312 (build-system python-build-system)
16313 (native-inputs
16314 `(("python-coverage" ,python-coverage)
16315 ("python-flake8" ,python-flake8)
16316 ("python-pexpect" ,python-pexpect)
16317 ("python-wheel" ,python-wheel)
16318 ("tcsh" ,tcsh)
16319 ("fish" ,fish)
16320 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
16321 (home-page "https://github.com/kislyuk/argcomplete")
16322 (synopsis "Shell tab completion for Python argparse")
16323 (description "argcomplete provides extensible command line tab completion
16324 of arguments and options for Python scripts using @code{argparse}. It's
16325 particularly useful for programs with many options or sub-parsers that can
16326 dynamically suggest completions; for example, when browsing resources over the
16327 network.")
16328 (license license:asl2.0)
16329 (properties `((python2-variant . ,(delay python2-argcomplete))))))
16330
16331 (define-public python2-argcomplete
16332 (let ((variant (package-with-python2
16333 (strip-python2-variant python-argcomplete))))
16334 (package/inherit variant
16335 (arguments
16336 (substitute-keyword-arguments (package-arguments variant)
16337 ((#:phases phases '%standard-phases)
16338 `(modify-phases ,phases
16339 (add-after 'unpack 'set-my-HOME
16340 (lambda _ (setenv "HOME" "/tmp")))))))
16341 (native-inputs
16342 `(("python2-importlib-metadata" ,python2-importlib-metadata)
16343 ,@(package-native-inputs variant))))))
16344
16345 (define-public python-csscompressor
16346 (package
16347 (name "python-csscompressor")
16348 (version "0.9.5")
16349 (source
16350 (origin
16351 (method url-fetch)
16352 (uri (pypi-uri "csscompressor" version))
16353 (sha256
16354 (base32
16355 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
16356 (build-system python-build-system)
16357 (arguments
16358 '(#:phases
16359 (modify-phases %standard-phases
16360 (replace 'check
16361 (lambda _
16362 (invoke "py.test"))))))
16363 (native-inputs
16364 `(("python-pytest" ,python-pytest)))
16365 (home-page "https://github.com/sprymix/csscompressor")
16366 (synopsis "Python port of YUI CSS Compressor")
16367 (description
16368 "This package provides a python port of YUI CSS Compressor.")
16369 (license license:bsd-3)))
16370
16371 (define-public python-rcssmin
16372 (package
16373 (name "python-rcssmin")
16374 (version "1.0.6")
16375 (source
16376 (origin
16377 (method url-fetch)
16378 (uri (pypi-uri "rcssmin" version))
16379 (sha256
16380 (base32
16381 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
16382 (build-system python-build-system)
16383 (arguments
16384 '(#:phases
16385 (modify-phases %standard-phases
16386 (replace 'check
16387 (lambda _
16388 (invoke "python" "run_tests.py" "tests"))))))
16389 (home-page "http://opensource.perlig.de/rcssmin/")
16390 (synopsis "CSS Minifier")
16391 (description "The minifier is based on the semantics of the YUI compressor,
16392 which itself is based on the rule list by Isaac Schlueter.")
16393 (license license:asl2.0)))
16394
16395 (define-public python-rjsmin
16396 (package
16397 (name "python-rjsmin")
16398 (version "1.1.0")
16399 (source
16400 (origin
16401 (method url-fetch)
16402 (uri (pypi-uri "rjsmin" version))
16403 (sha256
16404 (base32
16405 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
16406 (modules '((guix build utils)))
16407 (snippet
16408 '(begin
16409 (for-each delete-file (find-files "bench" "\\.js$"))
16410 #t))))
16411 (build-system python-build-system)
16412 (arguments
16413 '(#:tests? #f ; Not all test files included.
16414 #:phases
16415 (modify-phases %standard-phases
16416 (replace 'check
16417 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16418 (add-installed-pythonpath inputs outputs)
16419 (if tests?
16420 (invoke "py.test" "-vv" "tests")
16421 #t))))))
16422 (native-inputs
16423 `(("python-pytest" ,python-pytest)))
16424 (home-page "http://opensource.perlig.de/rjsmin/")
16425 (synopsis "Javascript Minifier")
16426 (description "@code{rJSmin} is a javascript minifier written in Python. The
16427 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
16428 is a re-implementation aiming for speed, so it can be used at runtime (rather
16429 than during a preprocessing step).")
16430 (license license:asl2.0)))
16431
16432 (define-public python-xopen
16433 (package
16434 (name "python-xopen")
16435 (version "0.5.0")
16436 (source
16437 (origin
16438 (method url-fetch)
16439 (uri (pypi-uri "xopen" version))
16440 (sha256
16441 (base32
16442 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
16443 (build-system python-build-system)
16444 (propagated-inputs
16445 `(("python-setuptools-scm" ,python-setuptools-scm)))
16446 (home-page "https://github.com/marcelm/xopen/")
16447 (synopsis "Open compressed files transparently")
16448 (description "This module provides an @code{xopen} function that works like
16449 Python's built-in @code{open} function, but can also deal with compressed files.
16450 Supported compression formats are gzip, bzip2 and, xz, and are automatically
16451 recognized by their file extensions. The focus is on being as efficient as
16452 possible on all supported Python versions.")
16453 (license license:expat)))
16454
16455 (define-public python2-xopen
16456 (let ((base (package-with-python2
16457 (strip-python2-variant python-xopen))))
16458 (package/inherit base
16459 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
16460 ,@(package-propagated-inputs base))))))
16461
16462 (define-public python-cheetah
16463 (package
16464 (name "python-cheetah")
16465 (version "3.2.4")
16466 (source
16467 (origin
16468 (method url-fetch)
16469 (uri (pypi-uri "Cheetah3" version))
16470 (sha256
16471 (base32
16472 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
16473 (build-system python-build-system)
16474 (arguments
16475 `(#:modules ((guix build utils)
16476 (guix build python-build-system)
16477 (ice-9 ftw)
16478 (srfi srfi-1)
16479 (srfi srfi-26))
16480 #:phases (modify-phases %standard-phases
16481 (add-after 'unpack 'use-absolute-python
16482 (lambda _
16483 (substitute* "Cheetah/CheetahWrapper.py"
16484 (("#!/usr/bin/env python")
16485 (string-append "#!" (which "python"))))
16486 #t))
16487 (add-after 'unpack 'fix-tests
16488 (lambda _
16489 (substitute* "Cheetah/Tests/ImportHooks.py"
16490 (("os.path.dirname\\(__file__\\)")
16491 (string-append "'" (getcwd) "/Cheetah/Tests'")))
16492 #t))
16493 (replace 'check
16494 (lambda _
16495 (let ((cwd (getcwd)))
16496 (setenv "PYTHONPATH"
16497 (string-append
16498 cwd "/build/"
16499 (find (cut string-prefix? "lib" <>)
16500 (scandir (string-append cwd "/build")))
16501 ":" (getenv "PYTHONPATH")))
16502 (setenv "PATH"
16503 (string-append (getenv "PATH")
16504 ":" cwd "/bin"))
16505 (setenv "TMPDIR" "/tmp")
16506
16507 (substitute* "Cheetah/Tests/Test.py"
16508 (("unittest.TextTestRunner\\(\\)")
16509 "unittest.TextTestRunner(verbosity=2)"))
16510
16511 (invoke "python" "Cheetah/Tests/Test.py")))))))
16512 (propagated-inputs
16513 `(("python-markdown" ,python-markdown))) ;optional
16514 (home-page "https://cheetahtemplate.org/")
16515 (synopsis "Template engine")
16516 (description "Cheetah is a text-based template engine and Python code
16517 generator.
16518
16519 Cheetah can be used as a standalone templating utility or referenced as
16520 a library from other Python applications. It has many potential uses,
16521 but web developers looking for a viable alternative to ASP, JSP, PHP and
16522 PSP are expected to be its principle user group.
16523
16524 Features:
16525 @enumerate
16526 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
16527 text-based format.
16528 @item Cleanly separates content, graphic design, and program code.
16529 @item Blends the power and flexibility of Python with a simple template language
16530 that non-programmers can understand.
16531 @item Gives template writers full access to any Python data structure, module,
16532 function, object, or method in their templates.
16533 @item Makes code reuse easy by providing an object-orientated interface to
16534 templates that is accessible from Python code or other Cheetah templates.
16535 One template can subclass another and selectively reimplement sections of it.
16536 @item Provides a simple, yet powerful, caching mechanism that can dramatically
16537 improve the performance of a dynamic website.
16538 @item Compiles templates into optimized, yet readable, Python code.
16539 @end enumerate")
16540 (license (license:x11-style "file://LICENSE"))))
16541
16542 (define-public python2-cheetah
16543 (package-with-python2 python-cheetah))
16544
16545 (define-public python-dulwich
16546 (package
16547 (name "python-dulwich")
16548 (version "0.19.16")
16549 (source
16550 (origin
16551 (method url-fetch)
16552 (uri (list (string-append "https://www.dulwich.io/releases/"
16553 "dulwich-" version ".tar.gz")
16554 (pypi-uri "dulwich" version)))
16555 (sha256
16556 (base32
16557 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
16558 (build-system python-build-system)
16559 (arguments
16560 `(#:phases
16561 (modify-phases %standard-phases
16562 (add-before 'check 'fix-tests
16563 (lambda* (#:key inputs #:allow-other-keys)
16564 ;; The tests use Popen with a custom environment which doesn't
16565 ;; include PATH.
16566 (substitute* "dulwich/tests/compat/utils.py"
16567 (("'git'") (string-append "'"
16568 (which "git")
16569 "'")))
16570 (substitute* '("dulwich/tests/test_repository.py"
16571 "dulwich/tests/test_hooks.py")
16572 (("#!/bin/sh") (string-append "#!" (which "sh"))))
16573 (setenv "TEST_RUNNER" "unittest")
16574 (setenv "PYTHONHASHSEED" "random")
16575 #t)))))
16576 (propagated-inputs
16577 `(("python-fastimport" ,python-fastimport)
16578 ("python-urllib3" ,python-urllib3)))
16579 (native-inputs
16580 `(("python-mock" ,python-mock)
16581 ("python-geventhttpclient" ,python-geventhttpclient)
16582 ("git" ,git)))
16583 (home-page "https://www.dulwich.io/")
16584 (synopsis "Git implementation in Python")
16585 (description "Dulwich is an implementation of the Git file formats and
16586 protocols written in pure Python.")
16587 ;; Can be used with either license.
16588 (license (list license:asl2.0 license:gpl2+))))
16589
16590 (define-public python-pbkdf2
16591 (package
16592 (name "python-pbkdf2")
16593 (version "1.3")
16594 (source
16595 (origin
16596 (method url-fetch)
16597 (uri (pypi-uri "pbkdf2" version))
16598 (sha256
16599 (base32
16600 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
16601 (build-system python-build-system)
16602 (arguments
16603 '(#:phases
16604 (modify-phases %standard-phases
16605 (replace 'check
16606 (lambda _
16607 (setenv "PYTHONPATH"
16608 (string-append (getcwd) "/build/lib:"
16609 (getenv "PYTHONPATH")))
16610 (invoke "python" "test/test_pbkdf2.py"))))))
16611 (propagated-inputs
16612 `(("python-pycrypto" ,python-pycrypto))) ; optional
16613 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
16614 (synopsis "Password-based key derivation")
16615 (description "This module implements the password-based key derivation
16616 function, PBKDF2, specified in RSA PKCS#5 v2.0.
16617
16618 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
16619 is part of the RSA Public Key Cryptography Standards series. The provided
16620 implementation takes a password or a passphrase and a salt value (and
16621 optionally a iteration count, a digest module, and a MAC module) and provides
16622 a file-like object from which an arbitrarily-sized key can be read.")
16623 (license license:expat)))
16624
16625 (define-public python2-pbkdf2
16626 (package-with-python2 python-pbkdf2))
16627
16628 (define-public python-qrcode
16629 (package
16630 (name "python-qrcode")
16631 (version "6.1")
16632 (source
16633 (origin
16634 (method url-fetch)
16635 (uri (pypi-uri "qrcode" version))
16636 (sha256
16637 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
16638 (build-system python-build-system)
16639 (arguments
16640 ;; FIXME: Tests require packaging 'pymaging'.
16641 '(#:tests? #f))
16642 (propagated-inputs
16643 `(("python-lxml" ,python-lxml) ; for SVG output
16644 ("python-pillow" ,python-pillow) ; for PNG output
16645 ("python-six" ,python-six)))
16646 (home-page "https://github.com/lincolnloop/python-qrcode")
16647 (synopsis "QR Code image generator")
16648 (description "This package provides a pure Python QR Code generator
16649 module. It uses the Python Imaging Library (PIL) to allow for the generation
16650 of QR Codes.
16651
16652 In addition this package provides a command line tool to generate QR codes and
16653 either write these QR codes to a file or do the output as ascii art at the
16654 console.")
16655 (license license:bsd-3)))
16656
16657 (define-public python2-qrcode
16658 (package-with-python2 python-qrcode))
16659
16660 (define-public python-rst2ansi
16661 (package
16662 (name "python-rst2ansi")
16663 (version "0.1.5")
16664 (source
16665 (origin
16666 (method url-fetch)
16667 (uri (pypi-uri "rst2ansi" version))
16668 (sha256
16669 (base32
16670 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
16671 (build-system python-build-system)
16672 (propagated-inputs
16673 `(("python-docutils" ,python-docutils)))
16674 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
16675 (synopsis "Convert RST to ANSI-decorated console output")
16676 (description
16677 "Python module dedicated to rendering RST (reStructuredText) documents
16678 to ansi-escaped strings suitable for display in a terminal.")
16679 (license license:expat)))
16680
16681 (define-public python-ansi2html
16682 (package
16683 (name "python-ansi2html")
16684 (version "1.2.0")
16685 (source
16686 (origin
16687 (method url-fetch)
16688 (uri (pypi-uri "ansi2html" version))
16689 (sha256
16690 (base32
16691 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
16692 (build-system python-build-system)
16693 (native-inputs
16694 `(("python-mock" ,python-mock)
16695 ("python-nose" ,python-nose)))
16696 (propagated-inputs
16697 `(("python-six" ,python-six)))
16698 (home-page "https://github.com/ralphbean/ansi2html")
16699 (synopsis "Convert ANSI-decorated console output to HTML")
16700 (description
16701 "@command{ansi2html} is a Python library and command line utility for
16702 converting text with ANSI color codes to HTML or LaTeX.")
16703 (license license:gpl3+)))
16704
16705 (define-public python2-ansi2html
16706 (package-with-python2 python-ansi2html))
16707
16708 (define-public python-easy-ansi
16709 (package
16710 (name "python-easy-ansi")
16711 (version "0.3")
16712 (source
16713 (origin
16714 (method git-fetch)
16715 (uri (git-reference
16716 (url "https://gitlab.com/joeysbytes/easy-ansi")
16717 (commit (string-append "v" version))))
16718 (file-name (git-file-name name version))
16719 (sha256
16720 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
16721 (build-system python-build-system)
16722 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
16723 (synopsis "Terminal framework API")
16724 (description
16725 "Easy ANSI is a terminal framework API to give you an easy way to use
16726 colors, cursor control movements, and line/box drawing. It is not meant as a
16727 replacement to more full-featured frameworks (such as curses or urwid), but as
16728 a tool to quickly create nice-looking screens in your terminal window. You
16729 can even create animations with the cursor controls.")
16730 (license license:expat)))
16731
16732 (define-public python-ddt
16733 (package
16734 (name "python-ddt")
16735 (version "1.4.2")
16736 (source
16737 (origin
16738 (method url-fetch)
16739 (uri (pypi-uri "ddt" version))
16740 (sha256
16741 (base32
16742 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
16743 (build-system python-build-system)
16744 (native-inputs
16745 `(("python-pytest" ,python-pytest)))
16746 (propagated-inputs
16747 `(("python-pyyaml" ,python-pyyaml)))
16748 (home-page "https://github.com/datadriventests/ddt")
16749 (synopsis "Data-Driven Tests")
16750 (description
16751 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
16752 running it with different test data, and make it appear as multiple test
16753 cases.")
16754 (license license:expat)))
16755
16756 (define-public python-pycountry
16757 (package
16758 (name "python-pycountry")
16759 (version "18.5.26")
16760 (source
16761 (origin
16762 (method url-fetch)
16763 (uri (pypi-uri "pycountry" version))
16764 (sha256
16765 (base32
16766 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
16767 (build-system python-build-system)
16768 (home-page "https://bitbucket.org/flyingcircus/pycountry")
16769 (synopsis "ISO databases for languages, countries, currencies, etc.")
16770 (description
16771 "@code{pycountry} provides the ISO databases for the standards:
16772 @enumerate
16773 @item 639-3 (Languages)
16774 @item 3166 (Countries)
16775 @item 3166-3 (Deleted Countries)
16776 @item 3166-2 (Subdivisions of countries)
16777 @item 4217 (Currencies)
16778 @item 15924 (Scripts)
16779 @end enumerate
16780 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
16781 through a Python API.")
16782 (license license:lgpl2.1+)))
16783
16784 (define-public python2-pycountry
16785 (package-with-python2 python-pycountry))
16786
16787 (define-public python-pycosat
16788 (package
16789 (name "python-pycosat")
16790 (version "0.6.3")
16791 (source
16792 (origin
16793 (method url-fetch)
16794 (uri (pypi-uri "pycosat" version ".zip"))
16795 (sha256
16796 (base32
16797 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
16798 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
16799 (build-system python-build-system)
16800 (native-inputs
16801 `(("unzip" ,unzip)))
16802 (home-page "https://github.com/ContinuumIO/pycosat")
16803 (synopsis "Bindings to picosat (a SAT solver)")
16804 (description
16805 "This package provides efficient Python bindings to @code{picosat} on
16806 the C level. When importing pycosat, the @code{picosat} solver becomes part
16807 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
16808 Problem} (SAT) solver.")
16809 (license license:expat)))
16810
16811 (define-public python2-pycosat
16812 (package-with-python2 python-pycosat))
16813
16814 (define-public python2-ruamel.ordereddict
16815 (package
16816 (name "python2-ruamel.ordereddict")
16817 (version "0.4.9")
16818 (source
16819 (origin
16820 (method url-fetch)
16821 (uri (pypi-uri "ruamel.ordereddict" version))
16822 (sha256
16823 (base32
16824 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
16825 (build-system python-build-system)
16826 (arguments
16827 `(#:python ,python-2
16828 #:phases
16829 (modify-phases %standard-phases
16830 (delete 'check)
16831 (add-after 'install 'check
16832 (lambda* (#:key inputs outputs #:allow-other-keys)
16833 (add-installed-pythonpath inputs outputs)
16834 (invoke "python" "test/testordereddict.py"))))))
16835 (home-page "https://bitbucket.org/ruamel/ordereddict")
16836 (synopsis "Version of dict that keeps keys in insertion order")
16837 (description
16838 "This is an implementation of an ordered dictionary with @dfn{Key
16839 Insertion Order} (KIO: updates of values do not affect the position of the
16840 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
16841 removed and put at the back). The standard library module @code{OrderedDict},
16842 implemented later, implements a subset of @code{ordereddict} functionality.
16843 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
16844 Order} (KSO, no sorting function can be specified, but a transform can be
16845 specified to apply on the key before comparison (e.g. @code{string.lower})).")
16846 (license license:expat)))
16847
16848 (define-public python-pypeg2
16849 (package
16850 (name "python-pypeg2")
16851 (version "2.15.2")
16852 (source
16853 (origin
16854 (method url-fetch)
16855 (uri (pypi-uri "pyPEG2" version))
16856 (sha256
16857 (base32
16858 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
16859 (build-system python-build-system)
16860 (propagated-inputs `(("python-lxml" ,python-lxml)))
16861 (arguments
16862 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
16863 '(#:tests? #f))
16864 (home-page "https://fdik.org/pyPEG/")
16865 (synopsis "Parsing Expression Grammars in Python")
16866 (description "PyPEG is an intrinsic parser interpreter framework for
16867 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
16868 parse many formal languages.")
16869 (license license:gpl2)))
16870
16871 (define-public python-incremental
16872 (package
16873 (name "python-incremental")
16874 (version "17.5.0")
16875 (source
16876 (origin
16877 (method url-fetch)
16878 (uri (pypi-uri "incremental" version))
16879 (sha256
16880 (base32
16881 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
16882 (build-system python-build-system)
16883 (home-page "https://github.com/hawkowl/incremental")
16884 (synopsis "Library for versioning Python projects")
16885 (description "Incremental is a small library that versions your Python
16886 projects.")
16887 (license license:expat)))
16888
16889 (define-public python2-incremental
16890 (package-with-python2 python-incremental))
16891
16892 (define-public python-invoke
16893 (package
16894 (name "python-invoke")
16895 (home-page "https://www.pyinvoke.org/")
16896 (version "1.5.0")
16897 (source (origin
16898 (method url-fetch)
16899 (uri (pypi-uri "invoke" version))
16900 (sha256
16901 (base32
16902 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
16903 (build-system python-build-system)
16904 (arguments
16905 ;; XXX: Requires many dependencies that are not yet in Guix.
16906 `(#:tests? #f
16907 #:phases
16908 (modify-phases %standard-phases
16909 (add-after 'unpack 'fix-bash-path
16910 (lambda* (#:key inputs #:allow-other-keys)
16911 (let ((bash (assoc-ref inputs "bash")))
16912 (substitute* "invoke/config.py"
16913 (("shell = \"/bin/bash\"")
16914 (string-append "shell = \"" bash "/bin/bash\""))
16915 )
16916 #t))))))
16917 (inputs
16918 `(("bash" ,bash-minimal)))
16919 (synopsis "Pythonic task execution")
16920 (description
16921 "Invoke is a Python task execution tool and library, drawing inspiration
16922 from various sources to arrive at a powerful and clean feature set. It is
16923 evolved from the Fabric project, but focuses on local and abstract concerns
16924 instead of servers and network commands.")
16925 (license license:bsd-3)))
16926
16927 (define-public python2-invoke
16928 (package-with-python2 python-invoke))
16929
16930 (define-public python-automat
16931 (package
16932 (name "python-automat")
16933 (version "20.2.0")
16934 (source (origin
16935 (method url-fetch)
16936 (uri (pypi-uri "Automat" version))
16937 (sha256
16938 (base32
16939 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
16940 (build-system python-build-system)
16941 ;; We disable the tests because they require python-twisted, while
16942 ;; python-twisted depends on python-automat. Twisted is optional, but the
16943 ;; tests fail if it is not available. Also see
16944 ;; <https://github.com/glyph/automat/issues/71>.
16945 (arguments '(#:tests? #f))
16946 (native-inputs
16947 `(("python-m2r" ,python-m2r)
16948 ("python-setuptools-scm" ,python-setuptools-scm)
16949 ("python-graphviz" ,python-graphviz)))
16950 (propagated-inputs
16951 `(("python-six" ,python-six)
16952 ("python-attrs" ,python-attrs)))
16953 (home-page "https://github.com/glyph/Automat")
16954 (synopsis "Self-service finite-state machines")
16955 (description "Automat is a library for concise, idiomatic Python
16956 expression of finite-state automata (particularly deterministic finite-state
16957 transducers).")
16958 (license license:expat)))
16959
16960 (define-public python2-automat
16961 (package-with-python2 python-automat))
16962
16963 (define-public python-m2r
16964 (package
16965 (name "python-m2r")
16966 (version "0.2.1")
16967 (source (origin
16968 (method url-fetch)
16969 (uri (pypi-uri "m2r" version))
16970 (sha256
16971 (base32
16972 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
16973 (build-system python-build-system)
16974 (propagated-inputs
16975 `(("python-docutils" ,python-docutils)
16976 ("python-mistune" ,python-mistune)))
16977 (native-inputs
16978 `(("python-pygments" ,python-pygments)
16979 ("python-mock" ,python-mock)))
16980 (home-page "https://github.com/miyakogi/m2r")
16981 (synopsis "Markdown to reStructuredText converter")
16982 (description "M2R converts a markdown file including reST markups to valid
16983 reST format.")
16984 (license license:expat)))
16985
16986 (define-public python2-m2r
16987 (package-with-python2 python-m2r))
16988
16989 (define-public python-constantly
16990 (package
16991 (name "python-constantly")
16992 (version "15.1.0")
16993 (source (origin
16994 (method url-fetch)
16995 (uri (pypi-uri "constantly" version))
16996 (sha256
16997 (base32
16998 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
16999 (build-system python-build-system)
17000 (home-page "https://github.com/twisted/constantly")
17001 (synopsis "Symbolic constants in Python")
17002 (description "Constantly is a Python library that provides symbolic
17003 constant support. It includes collections and constants with text, numeric,
17004 and bit flag values.")
17005 (license license:expat)))
17006
17007 (define-public python2-constantly
17008 (package-with-python2 python-constantly))
17009
17010 (define-public python-attrs
17011 (package
17012 (name "python-attrs")
17013 (version "21.2.0")
17014 (source (origin
17015 (method url-fetch)
17016 (uri (pypi-uri "attrs" version))
17017 (sha256
17018 (base32
17019 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
17020 (build-system python-build-system)
17021 (arguments
17022 `(#:modules ((guix build utils)
17023 (guix build python-build-system)
17024 (ice-9 ftw)
17025 (srfi srfi-1)
17026 (srfi srfi-26))
17027 #:phases
17028 (modify-phases %standard-phases
17029 (replace 'check
17030 (lambda* (#:key tests? #:allow-other-keys)
17031 (when tests?
17032 (let ((cwd (getcwd)))
17033 (setenv "PYTHONPATH"
17034 (string-append
17035 cwd "/build/"
17036 (find (cut string-prefix? "lib" <>)
17037 (scandir (string-append cwd "/build")))
17038 ":"
17039 (getenv "PYTHONPATH")))
17040 (invoke "python" "-m" "pytest"))))))))
17041 (native-inputs
17042 `(("python-coverage" ,python-coverage)
17043 ("python-hypothesis" ,python-hypothesis)
17044 ("python-pympler" ,python-pympler)
17045 ("python-pytest" ,python-pytest)
17046 ("python-six" ,python-six)
17047 ("python-sphinx" ,python-sphinx)
17048 ("python-zope-interface" ,python-zope-interface)))
17049 (home-page "https://github.com/python-attrs/attrs/")
17050 (synopsis "Attributes without boilerplate")
17051 (description "@code{attrs} is a Python package with class decorators that
17052 ease the chores of implementing the most common attribute-related object
17053 protocols.")
17054 (license license:expat)))
17055
17056 (define-public python2-attrs
17057 (package-with-python2 python-attrs))
17058
17059 (define-public python-attrs-bootstrap
17060 (package
17061 (inherit python-attrs)
17062 (name "python-attrs-bootstrap")
17063 (version "19.3.0")
17064 (source (origin
17065 (method url-fetch)
17066 (uri (pypi-uri "attrs" version))
17067 (sha256
17068 (base32
17069 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
17070 (native-inputs `())
17071 (arguments `(#:tests? #f))))
17072
17073 (define-public python2-attrs-bootstrap
17074 (package-with-python2 python-attrs-bootstrap))
17075
17076 (define-public python-cliapp
17077 (package
17078 (name "python-cliapp")
17079 (version "1.20180812.1")
17080 (source
17081 (origin
17082 (method url-fetch)
17083 (uri (string-append
17084 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17085 version ".tar.gz"))
17086 (sha256
17087 (base32
17088 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17089 (build-system python-build-system)
17090 (arguments
17091 `(;; XXX: The tests only do style and coverage checks, which
17092 ;; fails due to deprecation warnings, etc.
17093 #:tests? #f))
17094 (native-inputs
17095 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17096 ("python-pep8" ,python-pep8)))
17097 (propagated-inputs
17098 `(("python-pyaml" ,python-pyaml)))
17099 (home-page "https://liw.fi/cliapp/")
17100 (synopsis "Python framework for command line programs")
17101 (description "@code{cliapp} is a Python framework for command line
17102 programs. It contains the typical stuff such programs need to do, such
17103 as parsing the command line for options, and iterating over input files.")
17104 (license license:gpl2+)))
17105
17106 (define-public python2-cliapp
17107 (package-with-python2 python-cliapp))
17108
17109 (define-public python-ttystatus
17110 (package
17111 (name "python-ttystatus")
17112 (version "0.38")
17113 (source
17114 (origin
17115 (method git-fetch)
17116 (uri (git-reference
17117 (url "http://git.liw.fi/ttystatus")
17118 ;; There are no tags after ttystatus-0.36.
17119 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17120 (sha256
17121 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17122 (file-name (git-file-name name version))))
17123 (build-system python-build-system)
17124 (native-inputs
17125 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17126 ("python-pep8" ,python-pep8)))
17127 (arguments
17128 `(#:phases
17129 (modify-phases %standard-phases
17130 ;; check phase needs to be run before the build phase. If not,
17131 ;; coverage-test-runner looks for tests for the built source files,
17132 ;; and fails.
17133 (delete 'check)
17134 (add-before 'build 'check
17135 (lambda _ (invoke "make" "check"))))))
17136 (home-page "https://liw.fi/ttystatus/")
17137 (synopsis "Python library for showing progress reporting and
17138 status updates on terminals")
17139 (description "@code{ttystatus} is a Python library for showing progress
17140 reporting and status updates on terminals, for command line programs.
17141 Output is automatically adapted to the width of the terminal: truncated
17142 if it does not fit, and resized if the terminal size changes.")
17143 (license license:gpl3+)))
17144
17145 (define-public python2-ttystatus
17146 (package-with-python2 python-ttystatus))
17147
17148 (define-public python2-tracing
17149 (package
17150 (name "python2-tracing")
17151 (version "0.10")
17152 (source
17153 (origin
17154 (method url-fetch)
17155 (uri (string-append
17156 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17157 version ".tar.gz"))
17158 (sha256
17159 (base32
17160 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17161 (build-system python-build-system)
17162 (arguments
17163 `(#:python ,python-2))
17164 (home-page "https://liw.fi/tracing/")
17165 (synopsis "Python debug logging helper")
17166 (description "@code{python2-tracing} is a python library for
17167 logging debug messages. It provides a way to turn debugging messages
17168 on and off, based on the filename they occur in. It is much faster
17169 than using @code{logging.Filter} to accomplish the same thing, which
17170 matters when code is run in production mode. The actual logging still
17171 happens using the @code{logging} library.")
17172 (license license:gpl3+)))
17173
17174 (define-public python2-larch
17175 (package
17176 (name "python2-larch")
17177 (version "1.20151025")
17178 (source
17179 (origin
17180 (method url-fetch)
17181 (uri (string-append
17182 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
17183 version ".tar.gz"))
17184 (patches (search-patches
17185 "python2-larch-coverage-4.0a6-compatibility.patch"))
17186 (sha256
17187 (base32
17188 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
17189 (build-system python-build-system)
17190 (arguments
17191 `(#:python ,python-2
17192 #:phases
17193 (modify-phases %standard-phases
17194 ;; check phase needs to be run before the build phase. If not,
17195 ;; coverage-test-runner looks for tests for the built source files,
17196 ;; and fails.
17197 (delete 'check)
17198 (add-before 'build 'check
17199 (lambda _ (invoke "make" "check"))))))
17200 (native-inputs
17201 `(("cmdtest" ,cmdtest)
17202 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
17203 (propagated-inputs
17204 `(("python2-tracing" ,python2-tracing)))
17205 (home-page "https://liw.fi/larch/")
17206 (synopsis "Python copy-on-write B-tree library")
17207 (description "@code{python2-larch} is an implementation of
17208 particular kind of B-tree, based on research by Ohad Rodeh. See
17209 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
17210 on the data structure.
17211
17212 The distinctive feature of this B-tree is that a node is never
17213 (conceptually) modified. Instead, all updates are done by
17214 copy-on-write. This makes it easy to clone a tree, and modify only the
17215 clone, while other processes access the original tree.")
17216 (license license:gpl3+)))
17217
17218 (define-public python-astroid
17219 (package
17220 (name "python-astroid")
17221 (version "2.4.2")
17222 (source
17223 (origin
17224 (method url-fetch)
17225 (uri (pypi-uri "astroid" version))
17226 (sha256
17227 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
17228 (modules '((guix build utils)))
17229 (snippet
17230 '(begin
17231 ;; Check to see if the version pinning has been removed.
17232 (substitute* "astroid/__pkginfo__.py"
17233 (("==1\\.4\\.\\*") ">=1.4.0"))
17234 #t))))
17235 (build-system python-build-system)
17236 (propagated-inputs
17237 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17238 ("python-six" ,python-six)
17239 ("python-wrapt" ,python-wrapt)))
17240 (native-inputs
17241 `(("python-dateutil" ,python-dateutil)
17242 ("python-pytest" ,python-pytest)
17243 ("python-pytest-runner" ,python-pytest-runner)))
17244 (home-page "https://github.com/PyCQA/astroid")
17245 (synopsis "Common base representation of python source code for pylint and
17246 other projects")
17247 (description "@code{python-astroid} provides a common base representation
17248 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17249
17250 It provides a compatible representation which comes from the _ast module. It
17251 rebuilds the tree generated by the builtin _ast module by recursively walking
17252 down the AST and building an extended ast. The new node classes have
17253 additional methods and attributes for different usages. They include some
17254 support for static inference and local name scopes. Furthermore, astroid
17255 builds partial trees by inspecting living objects.")
17256 (license license:lgpl2.1+)
17257 (properties `((python2-variant . ,(delay python2-astroid))))))
17258
17259 (define-public python2-astroid
17260 (let ((base (package-with-python2
17261 (strip-python2-variant python-astroid))))
17262 (package (inherit base)
17263 ;; Version 2.x removes python2 support.
17264 (version "1.6.5")
17265 (source
17266 (origin
17267 (method url-fetch)
17268 (uri (pypi-uri "astroid" version))
17269 (sha256
17270 (base32
17271 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17272 (arguments
17273 (substitute-keyword-arguments (package-arguments base)
17274 ((#:phases phases)
17275 `(modify-phases ,phases
17276 (add-after 'unpack 'remove-spurious-test
17277 (lambda _
17278 ;; https://github.com/PyCQA/astroid/issues/276
17279 (delete-file "astroid/tests/unittest_brain.py")
17280 #t))
17281 (replace 'check
17282 (lambda _
17283 (invoke"python" "-m" "unittest" "discover"
17284 "-p" "unittest*.py")))))))
17285 (native-inputs `())
17286 (propagated-inputs
17287 `(("python2-backports-functools-lru-cache"
17288 ,python2-backports-functools-lru-cache)
17289 ("python2-enum34" ,python2-enum34)
17290 ("python2-singledispatch" ,python2-singledispatch)
17291 ,@(alist-delete "python-typed-ast"
17292 (package-propagated-inputs base)))))))
17293
17294 (define-public python-isbnlib
17295 (package
17296 (name "python-isbnlib")
17297 (version "3.10.4")
17298 (source
17299 (origin
17300 (method url-fetch)
17301 (uri (pypi-uri "isbnlib" version))
17302 (sha256
17303 (base32
17304 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
17305 (build-system python-build-system)
17306 (arguments '(#:tests? #f)) ; No test
17307 (home-page "https://github.com/xlcnd/isbnlib")
17308 (synopsis "Python library to work with ISBN strings")
17309 (description "@code{python-isbnlib} is a (pure) python library that provides
17310 several useful methods and functions to validate, clean, transform, hyphenate and
17311 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
17312 version, is suitable to be include as a dependency in other projects.")
17313 (license license:lgpl3+)))
17314
17315 (define-public python-isort
17316 (package
17317 (name "python-isort")
17318 (version "4.3.4")
17319 (source
17320 (origin
17321 (method git-fetch)
17322 (uri (git-reference
17323 ;; Tests pass only from the Github sources
17324 (url "https://github.com/timothycrosley/isort")
17325 (commit version)))
17326 (file-name (git-file-name name version))
17327 (sha256
17328 (base32
17329 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
17330 (build-system python-build-system)
17331 (native-inputs
17332 `(("python-mock" ,python-mock)
17333 ("python-pytest" ,python-pytest)))
17334 (home-page "https://github.com/timothycrosley/isort")
17335 (synopsis "Python utility/library to sort python imports")
17336 (description "@code{python-isort} is a python utility/library to sort
17337 imports alphabetically, and automatically separated into sections. It
17338 provides a command line utility, a python library and plugins for various
17339 editors.")
17340 (license license:expat)
17341 (properties `((python2-variant . ,(delay python2-isort))))))
17342
17343 (define-public python2-isort
17344 (let ((base (package-with-python2
17345 (strip-python2-variant python-isort))))
17346 (package/inherit base
17347 (native-inputs
17348 `(("python2-futures" ,python2-futures)
17349 ,@(package-native-inputs base))))))
17350
17351 (define-public python2-backports-functools-lru-cache
17352 (package
17353 (name "python2-backports-functools-lru-cache")
17354 (version "1.6.1")
17355 (source
17356 (origin
17357 (method url-fetch)
17358 ;; only the pypi tarballs contain the necessary metadata
17359 (uri (pypi-uri "backports.functools_lru_cache" version))
17360 (sha256
17361 (base32
17362 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
17363 (build-system python-build-system)
17364 (native-inputs
17365 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
17366 (arguments
17367 `(#:python ,python-2))
17368 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
17369 (synopsis "Backport of functools.lru_cache from Python 3.3")
17370 (description "@code{python2-backports-functools-lru-cache} is a backport
17371 of @code{functools.lru_cache} from python 3.3.")
17372 (license license:expat)))
17373
17374 (define-public python-configparser
17375 (package
17376 (name "python-configparser")
17377 (version "4.0.2")
17378 (source
17379 (origin
17380 (method url-fetch)
17381 (uri (pypi-uri "configparser" version))
17382 (sha256
17383 (base32
17384 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
17385 (native-inputs
17386 `(("python-setuptools_scm" ,python-setuptools-scm)))
17387 (build-system python-build-system)
17388 (home-page "https://github.com/jaraco/configparser/")
17389 (synopsis "Backport of configparser from python 3.5")
17390 (description "@code{python-configparser} is a backport of
17391 @code{configparser} from Python 3.5 so that it can be used directly
17392 in other versions.")
17393 (license license:expat)))
17394
17395 (define-public python2-configparser
17396 (package-with-python2 python-configparser))
17397
17398 (define-public python-iniconfig
17399 (package
17400 (name "python-iniconfig")
17401 (version "1.1.1")
17402 (source
17403 (origin
17404 (method url-fetch)
17405 (uri (pypi-uri "iniconfig" version))
17406 (sha256
17407 (base32
17408 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
17409 (build-system python-build-system)
17410 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
17411 (synopsis "Simple INI-file parser")
17412 (description "The @code{iniconfig} package provides a small and simple
17413 INI-file parser module having a unique set of features; @code{iniconfig}
17414 @itemize
17415 @item maintains the order of sections and entries;
17416 @item supports multi-line values with or without line-continuations;
17417 @item supports \"#\" comments everywhere;
17418 @item raises errors with proper line-numbers;
17419 @item raises an error when two sections have the same name.
17420 @end itemize")
17421 (license license:expat)))
17422
17423 (define-public python-mamba
17424 (package
17425 (name "python-mamba")
17426 (version "0.11.2")
17427 (source (origin
17428 (method url-fetch)
17429 (uri (pypi-uri "mamba" version))
17430 (sha256
17431 (base32
17432 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
17433 (build-system python-build-system)
17434 (arguments `(#:tests? #f)) ; No test
17435 (propagated-inputs
17436 `(("python-clint" ,python-clint)
17437 ("python-coverage" ,python-coverage)))
17438 (home-page "https://nestorsalceda.com/mamba/")
17439 (synopsis "Test runner for Python")
17440 (description
17441 "Mamba is a Behaviour-Driven Development tool for Python developers.
17442 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
17443 (license license:expat)))
17444
17445 (define-public python-mando
17446 (package
17447 (name "python-mando")
17448 (version "0.6.4")
17449 (source (origin
17450 (method url-fetch)
17451 (uri (pypi-uri "mando" version))
17452 (sha256
17453 (base32
17454 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
17455 (build-system python-build-system)
17456 (propagated-inputs
17457 `(("python-rst2ansi" ,python-rst2ansi)
17458 ("python-six" ,python-six)))
17459 (native-inputs
17460 `(("python-pytest" ,python-pytest)))
17461 (home-page "https://mando.readthedocs.org/")
17462 (synopsis
17463 "Wrapper around argparse, allowing creation of complete CLI applications")
17464 (description
17465 "This package is a wrapper around argparse, allowing you to write complete CLI
17466 applications in seconds while maintaining all the flexibility.")
17467 (license license:expat)))
17468
17469 (define-public python2-mando
17470 (package-with-python2 python-mando))
17471
17472 (define-public python2-argparse
17473 (package
17474 (name "python2-argparse")
17475 (version "1.4.0")
17476 (source
17477 (origin
17478 (method url-fetch)
17479 (uri (pypi-uri "argparse" version))
17480 (sha256
17481 (base32
17482 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
17483 (build-system python-build-system)
17484 (arguments
17485 `(#:python ,python-2))
17486 (home-page "https://github.com/ThomasWaldmann/argparse/")
17487 (synopsis "Python command-line parsing library")
17488 (description
17489 "This package is mostly for people who want to have @code{argparse} on
17490 older Pythons because it was not part of the standard library back then.")
17491 (license license:psfl)))
17492
17493 (define-public python-fudge
17494 (package
17495 (name "python-fudge")
17496 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
17497 ;; package, which is currently the only use of this package.
17498 (version "0.9.6")
17499 (source
17500 (origin
17501 (method url-fetch)
17502 (uri (pypi-uri "fudge" version))
17503 (sha256
17504 (base32
17505 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
17506 (build-system python-build-system)
17507 (arguments
17508 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
17509 (home-page "https://github.com/fudge-py/fudge")
17510 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
17511 (description
17512 "Fudge is a Python module for using fake objects (mocks and stubs) to
17513 test real ones.
17514
17515 In readable Python code, you declare the methods available on your fake object
17516 and how they should be called. Then you inject that into your application and
17517 start testing. This declarative approach means you don’t have to record and
17518 playback actions and you don’t have to inspect your fakes after running code.
17519 If the fake object was used incorrectly then you’ll see an informative
17520 exception message with a traceback that points to the culprit.")
17521 (license license:expat)))
17522
17523 (define-public python2-fudge
17524 (package-with-python2 python-fudge))
17525
17526 (define-public python-mwclient
17527 (package
17528 (name "python-mwclient")
17529 (version "0.10.1")
17530 (source
17531 (origin
17532 (method git-fetch)
17533 ;; The PyPI version wouldn't contain tests.
17534 (uri (git-reference
17535 (url "https://github.com/mwclient/mwclient")
17536 (commit (string-append "v" version))))
17537 (file-name (git-file-name name version))
17538 (sha256
17539 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
17540 (build-system python-build-system)
17541 (propagated-inputs
17542 `(("python-requests-oauthlib" ,python-requests-oauthlib)
17543 ("python-six" ,python-six)))
17544 (native-inputs
17545 `(("python-mock" ,python-mock)
17546 ("python-pytest" ,python-pytest)
17547 ("python-pytest-cov" ,python-pytest-cov)
17548 ("python-pytest-runner" ,python-pytest-runner)
17549 ("python-responses" ,python-responses)))
17550 (home-page "https://github.com/btongminh/mwclient")
17551 (synopsis "MediaWiki API client")
17552 (description "This package provides a MediaWiki API client.")
17553 (license license:expat)))
17554
17555 (define-public python-utils
17556 (package
17557 (name "python-utils")
17558 (version "2.4.0")
17559 (source (origin
17560 (method url-fetch)
17561 (uri (pypi-uri "python-utils" version))
17562 (sha256
17563 (base32
17564 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
17565 (build-system python-build-system)
17566 (arguments
17567 `(#:phases
17568 (modify-phases %standard-phases
17569 (replace 'check
17570 (lambda* (#:key inputs outputs #:allow-other-keys)
17571 (add-installed-pythonpath inputs outputs)
17572 (delete-file "pytest.ini")
17573 (invoke "pytest" "-vv"))))))
17574 (native-inputs
17575 `(("pytest-runner" ,python-pytest-runner)
17576 ("pytest" ,python-pytest)
17577 ("six" ,python-six)))
17578 (home-page "https://github.com/WoLpH/python-utils")
17579 (synopsis "Convenient utilities not included with the standard Python install")
17580 (description
17581 "Python Utils is a collection of small Python functions and classes which
17582 make common patterns shorter and easier.")
17583 (license license:bsd-2)))
17584
17585 (define-public python-diff-match-patch
17586 (package
17587 (name "python-diff-match-patch")
17588 (version "20121119")
17589 (source
17590 (origin
17591 (method url-fetch)
17592 (uri (pypi-uri "diff-match-patch" version))
17593 (sha256
17594 (base32
17595 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
17596 (build-system python-build-system)
17597 (home-page "https://code.google.com/p/google-diff-match-patch")
17598 (synopsis "Synchronize plain text")
17599 (description "Diff Match and Patch libraries offer robust algorithms to
17600 perform the operations required for synchronizing plain text.")
17601 (license license:asl2.0)))
17602
17603 (define-public python2-diff-match-patch
17604 (package-with-python2 python-diff-match-patch))
17605
17606 (define-public python-dirsync
17607 (package
17608 (name "python-dirsync")
17609 (version "2.2.5")
17610 (source
17611 (origin
17612 (method url-fetch)
17613 (uri (pypi-uri "dirsync" version))
17614 (sha256
17615 (base32
17616 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
17617 (build-system python-build-system)
17618 (propagated-inputs
17619 `(("six" ,python-six)))
17620 (home-page "https://github.com/tkhyn/dirsync")
17621 (synopsis "Advanced directory tree synchronisation tool")
17622 (description "Advanced directory tree synchronisation tool.")
17623 (license license:expat)))
17624
17625 (define-public python2-dirsync
17626 (package-with-python2 python-dirsync))
17627
17628 (define-public python-levenshtein
17629 (package
17630 (name "python-levenshtein")
17631 (version "0.12.0")
17632 (source
17633 (origin
17634 (method url-fetch)
17635 (uri (pypi-uri "python-Levenshtein" version))
17636 (sha256
17637 (base32
17638 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
17639 (build-system python-build-system)
17640 (home-page "https://github.com/ztane/python-Levenshtein")
17641 (synopsis "Fast computation of Levenshtein distance and string similarity")
17642 (description
17643 "The Levenshtein Python C extension module contains functions for fast computation of
17644 @enumerate
17645 @item Levenshtein (edit) distance, and edit operations
17646 @item string similarity
17647 @item approximate median strings, and generally string averaging
17648 @item string sequence and set similarity
17649 @end enumerate
17650 It supports both normal and Unicode strings.")
17651 (license license:gpl2+)))
17652
17653 (define-public python2-levenshtein
17654 (package-with-python2 python-levenshtein))
17655
17656 (define-public python-scandir
17657 (package
17658 (name "python-scandir")
17659 (version "1.10.0")
17660 (source
17661 (origin
17662 (method url-fetch)
17663 (uri (pypi-uri "scandir" version))
17664 (sha256
17665 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
17666 (build-system python-build-system)
17667 (arguments
17668 `(#:phases (modify-phases %standard-phases
17669 (replace 'check
17670 (lambda _
17671 (invoke "python" "test/run_tests.py"))))))
17672 (home-page "https://github.com/benhoyt/scandir")
17673 (synopsis "Directory iteration function")
17674 (description
17675 "Directory iteration function like os.listdir(), except that instead of
17676 returning a list of bare filenames, it yields DirEntry objects that include
17677 file type and stat information along with the name. Using scandir() increases
17678 the speed of os.walk() by 2-20 times (depending on the platform and file
17679 system) by avoiding unnecessary calls to os.stat() in most cases.
17680
17681 This package is part of the Python standard library since version 3.5.")
17682 (license license:bsd-3)))
17683
17684 (define-public python2-scandir
17685 (package-with-python2 python-scandir))
17686
17687 (define-public python2-stemming
17688 (package
17689 (name "python2-stemming")
17690 (version "1.0.1")
17691 (source
17692 (origin
17693 (method url-fetch)
17694 (uri (pypi-uri "stemming" version))
17695 (sha256
17696 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
17697 (build-system python-build-system)
17698 (arguments
17699 `(#:python ,python-2))
17700 (home-page "https://bitbucket.org/mchaput/stemming/overview")
17701 (synopsis "Python implementations of various stemming algorithms")
17702 (description
17703 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
17704 stemming algorithms for English. These implementations are straightforward and
17705 efficient, unlike some Python versions of the same algorithms available on the
17706 Web. This package is an extraction of the stemming code included in the Whoosh
17707 search engine.")
17708 (license license:public-domain)))
17709
17710 (define-public python-factory-boy
17711 (package
17712 (name "python-factory-boy")
17713 (version "2.8.1")
17714 (source
17715 (origin
17716 (method url-fetch)
17717 (uri (pypi-uri "factory_boy" version))
17718 (sha256
17719 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
17720 (build-system python-build-system)
17721 (arguments
17722 ;; Tests are not included in the tarball.
17723 `(#:tests? #f))
17724 (propagated-inputs
17725 `(("faker" ,python-faker)))
17726 (home-page "https://github.com/benhoyt/scandir")
17727 (synopsis "Versatile test fixtures replacement")
17728 (description
17729 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
17730
17731 As a fixtures replacement tool, it aims to replace static, hard to maintain
17732 fixtures with easy-to-use factories for complex object.
17733
17734 Instead of building an exhaustive test setup with every possible combination
17735 of corner cases, factory_boy allows you to use objects customized for the
17736 current test, while only declaring the test-specific fields")
17737 (license license:expat)))
17738
17739 (define-public python2-factory-boy
17740 (package-with-python2 python-factory-boy))
17741
17742 (define-public python-translate-toolkit
17743 (package
17744 (name "python-translate-toolkit")
17745 (version "2.1.0")
17746 (source
17747 (origin
17748 (method url-fetch)
17749 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
17750 (sha256
17751 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
17752 (build-system python-build-system)
17753 (native-inputs
17754 `(("python-pytest" ,python-pytest)
17755 ("python-sphinx" ,python-sphinx)))
17756 (propagated-inputs
17757 `(("python-babel" ,python-babel)
17758 ("python-beautifulsoup4" ,python-beautifulsoup4)
17759 ("python-chardet" ,python-chardet)
17760 ("python-diff-match-patch" ,python-diff-match-patch)
17761 ("python-levenshtein" ,python-levenshtein)
17762 ("python-lxml" ,python-lxml)
17763 ("python-six" ,python-six)
17764 ("python-vobject" ,python-vobject)
17765 ("python-pyyaml" ,python-pyyaml)))
17766 (arguments
17767 ;; TODO: tests are not run, because they end with
17768 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
17769 ;; 'parse_funcs'
17770 ;; during test setup.
17771 `(#:tests? #f))
17772 (home-page "https://toolkit.translatehouse.org")
17773 (synopsis "Tools and API for translation and localization engineering")
17774 (description
17775 "Tools and API for translation and localization engineering. It contains
17776 several utilities, as well as an API for building localization tools.")
17777 (license license:gpl2+)))
17778
17779 (define-public python2-translate-toolkit
17780 (package-with-python2 python-translate-toolkit))
17781
17782 (define-public python-packaging
17783 (package
17784 (name "python-packaging")
17785 (version "20.0")
17786 (source
17787 (origin
17788 (method url-fetch)
17789 (uri (pypi-uri "packaging" version))
17790 ;; XXX: The URL in the patch file is wrong, it should be
17791 ;; <https://github.com/pypa/packaging/pull/256>.
17792 (patches (search-patches "python-packaging-test-arch.patch"))
17793 (sha256
17794 (base32
17795 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
17796 (build-system python-build-system)
17797 (arguments
17798 `(#:phases (modify-phases %standard-phases
17799 (replace 'check
17800 (lambda* (#:key tests? #:allow-other-keys)
17801 (if tests?
17802 (invoke "py.test" "-vv")
17803 (format #t "test suite not run~%"))
17804 #t)))))
17805 (native-inputs
17806 `(("python-pretend" ,python-pretend)
17807 ("python-pytest" ,python-pytest)))
17808 (propagated-inputs
17809 `(("python-pyparsing" ,python-pyparsing)
17810 ("python-six" ,python-six)))
17811 (home-page "https://github.com/pypa/packaging")
17812 (synopsis "Core utilities for Python packages")
17813 (description "Packaging is a Python module for dealing with Python packages.
17814 It offers an interface for working with package versions, names, and dependency
17815 information.")
17816 ;; From 'LICENSE': This software is made available under the terms of
17817 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
17818 ;; Contributions to this software is made under the terms of *both* these
17819 ;; licenses.
17820 (license (list license:asl2.0 license:bsd-2))))
17821
17822 (define-public python2-packaging
17823 (package-with-python2 python-packaging))
17824
17825 ;; Variants with minimal dependencies, for bootstrapping Pytest.
17826 (define-public python-packaging-bootstrap
17827 (hidden-package
17828 (package/inherit
17829 python-packaging
17830 (name "python-packaging-bootstrap")
17831 (native-inputs '())
17832 (propagated-inputs
17833 `(("python-pyparsing" ,python-pyparsing)))
17834 (arguments '(#:tests? #f)))))
17835
17836 (define-public python2-packaging-bootstrap
17837 (hidden-package
17838 (package/inherit
17839 python2-packaging
17840 (name "python2-packaging-bootstrap")
17841 (native-inputs '())
17842 (propagated-inputs
17843 `(("python-pyparsing" ,python2-pyparsing)))
17844 (arguments
17845 `(#:tests? #f
17846 ,@(package-arguments python2-packaging))))))
17847
17848 (define-public python-relatorio
17849 (package
17850 (name "python-relatorio")
17851 (version "0.8.0")
17852 (source
17853 (origin
17854 (method url-fetch)
17855 (uri (pypi-uri "relatorio" version))
17856 (sha256
17857 (base32
17858 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
17859 (build-system python-build-system)
17860 (propagated-inputs
17861 `(("python-lxml" ,python-lxml)
17862 ("python-genshi" ,python-genshi)))
17863 (native-inputs
17864 `(("python-magic" ,python-magic)))
17865 (home-page "https://relatorio.tryton.org/")
17866 (synopsis "Templating library able to output ODT and PDF files")
17867 (description "Relatorio is a templating library which provides a way to
17868 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
17869 for more filetypes can be easily added by creating plugins for them.")
17870 (license license:gpl3+)))
17871
17872 (define-public python2-relatorio
17873 (package-with-python2 python-relatorio))
17874
17875 (define-public python-radon
17876 (package
17877 (name "python-radon")
17878 (version "4.1.0")
17879 (source
17880 (origin
17881 (method url-fetch)
17882 (uri (pypi-uri "radon" version))
17883 (sha256
17884 (base32
17885 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
17886 (build-system python-build-system)
17887 (arguments
17888 `(#:phases (modify-phases %standard-phases
17889 (replace 'check
17890 (lambda _
17891 (invoke "python" "radon/tests/run.py"))))))
17892 (propagated-inputs
17893 `(("python-colorama" ,python-colorama)
17894 ("python-flake8-polyfill" ,python-flake8-polyfill)
17895 ("python-mando" ,python-mando)))
17896 (native-inputs
17897 `(("python-pytest" ,python-pytest)
17898 ("python-pytest-mock" ,python-pytest-mock)))
17899 (home-page "https://radon.readthedocs.org/")
17900 (synopsis "Code Metrics in Python")
17901 (description "Radon is a Python tool which computes various code metrics.
17902 Supported metrics are:
17903 @itemize @bullet
17904 @item raw metrics: SLOC, comment lines, blank lines, &c.
17905 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
17906 @item Halstead metrics (all of them)
17907 @item the Maintainability Index (a Visual Studio metric)
17908 @end itemize")
17909 (properties `((python2-variant . ,(delay python2-radon))))
17910 (license license:expat)))
17911
17912 (define-public python2-radon
17913 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
17914 (package/inherit base
17915 (propagated-inputs
17916 `(("python-configparser" ,python2-configparser)
17917 ("python-future" ,python2-future)
17918 ,@(package-propagated-inputs base))))))
17919
17920 (define-public python-sure
17921 (package
17922 (name "python-sure")
17923 (version "1.4.11")
17924 (source
17925 (origin
17926 (method url-fetch)
17927 (uri (pypi-uri "sure" version))
17928 (sha256
17929 (base32
17930 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
17931 (build-system python-build-system)
17932 (propagated-inputs
17933 `(("python-mock" ,python-mock)
17934 ("python-six" ,python-six)))
17935 (native-inputs
17936 `(("python-nose" ,python-nose)))
17937 (home-page "https://github.com/gabrielfalcao/sure")
17938 (synopsis "Automated testing library in python for python")
17939 (description
17940 "Sure is a python library that leverages a DSL for writing assertions.
17941 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
17942 (license license:gpl3+)))
17943
17944 (define-public python2-sure
17945 (package-with-python2 python-sure))
17946
17947 (define-public python2-couleur
17948 ;; This package does not seem to support python3 at all, hence,
17949 ;; only the python2 variant definition is provided.
17950 (package
17951 (name "python2-couleur")
17952 (version "0.6.2")
17953 (source
17954 (origin
17955 (method url-fetch)
17956 (uri (pypi-uri "couleur" version))
17957 (sha256
17958 (base32
17959 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
17960 (build-system python-build-system)
17961 (arguments
17962 `(#:python ,python-2))
17963 (home-page "https://github.com/gabrielfalcao/couleur")
17964 (synopsis
17965 "ANSI terminal tool for python, colored shell and other handy fancy features")
17966 (description
17967 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
17968 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
17969 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
17970 ;; https://github.com/gabrielfalcao/couleur/issues/11
17971 (license license:lgpl3+)))
17972
17973 (define-public python-misaka
17974 (package
17975 (name "python-misaka")
17976 (version "2.1.1")
17977 (source
17978 (origin
17979 (method url-fetch)
17980 (uri (pypi-uri "misaka" version))
17981 (sha256
17982 (base32
17983 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
17984 (build-system python-build-system)
17985 (arguments
17986 `(;; Line 37 of setup.py calls self.run_command('develop')
17987 ;; in the 'check' phase. This command seems to be trying
17988 ;; to write to
17989 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
17990 ;; for which it does not have the permission to write.
17991 #:tests? #f))
17992 (propagated-inputs
17993 `(("python-cffi" ,python-cffi)))
17994 (home-page "https://github.com/FSX/misaka")
17995 (synopsis "Python binding for Hoedown")
17996 (description
17997 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
17998 library written in C. It features a fast HTML renderer and functionality to make custom
17999 renderers (e.g. man pages or LaTeX).")
18000 (license license:expat)))
18001
18002 (define-public python2-misaka
18003 (package-with-python2 python-misaka))
18004
18005 (define-public python2-steadymark
18006 ;; This is forced into being a python2 only variant
18007 ;; due to its dependence on couleur that has no support
18008 ;; for python3
18009 (package
18010 (name "python2-steadymark")
18011 (version "0.7.3")
18012 (source
18013 (origin
18014 (method url-fetch)
18015 (uri (pypi-uri "steadymark" version))
18016 (sha256
18017 (base32
18018 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
18019 (build-system python-build-system)
18020 (native-inputs
18021 `(("python-couleur" ,python2-couleur)
18022 ("python-sure" ,python2-sure)
18023 ("python-misaka" ,python2-misaka)))
18024 (arguments
18025 `(#:python ,python-2
18026 #:phases
18027 (modify-phases %standard-phases
18028 (add-before 'build 'patch-setup-py
18029 (lambda _
18030 ;; Update requirements from dependency==version
18031 ;; to dependency>=version
18032 (substitute* "setup.py"
18033 (("==") ">="))
18034 #t)))))
18035 (home-page "https://github.com/gabrielfalcao/steadymark")
18036 (synopsis "Markdown-based test runner for python")
18037 (description
18038 "@code{Steadymark} allows documentation to be written in github-flavoured
18039 markdown. The documentation may contain snippets of code surrounded by python
18040 code blocks and @code{Steadymark} will find these snippets and run them, making
18041 sure that there are no old malfunctional examples in the documentation examples.")
18042 (license license:expat)))
18043
18044 (define-public python-jsonpointer
18045 (package
18046 (name "python-jsonpointer")
18047 (version "1.10")
18048 (source
18049 (origin
18050 (method url-fetch)
18051 (uri (pypi-uri "jsonpointer" version))
18052 (sha256
18053 (base32
18054 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
18055 (build-system python-build-system)
18056 (home-page "https://github.com/stefankoegl/python-json-pointer")
18057 (synopsis "Identify specific nodes in a JSON document")
18058 (description "@code{jsonpointer} allows you to access specific nodes
18059 by path in a JSON document (see RFC 6901).")
18060 (license license:bsd-3)))
18061
18062 (define-public python2-jsonpointer
18063 (package-with-python2 python-jsonpointer))
18064
18065 (define-public python-jsonpatch
18066 (package
18067 (name "python-jsonpatch")
18068 (version "1.16")
18069 (source
18070 (origin
18071 (method git-fetch)
18072 ;; pypi version lacks tests.js
18073 (uri (git-reference
18074 (url "https://github.com/stefankoegl/python-json-patch")
18075 (commit (string-append "v" version))))
18076 (file-name (git-file-name name version))
18077 (sha256
18078 (base32
18079 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18080 (build-system python-build-system)
18081 (propagated-inputs
18082 `(("python-jsonpointer" ,python-jsonpointer)))
18083 (home-page "https://github.com/stefankoegl/python-json-patch")
18084 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18085 (description "@code{jsonpatch} is a library and program that allows
18086 applying JSON Patches according to RFC 6902.")
18087 (license license:bsd-3)))
18088
18089 (define-public python2-jsonpatch
18090 (package-with-python2 python-jsonpatch))
18091
18092 (define-public python-jsonpatch-0.4
18093 (package (inherit python-jsonpatch)
18094 (name "python-jsonpatch")
18095 (version "0.4")
18096 (source
18097 (origin
18098 (method git-fetch)
18099 (uri (git-reference
18100 (url "https://github.com/stefankoegl/python-json-patch")
18101 (commit (string-append "v" version))))
18102 (file-name (git-file-name name version))
18103 (sha256
18104 (base32
18105 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18106
18107 (define-public python2-jsonpatch-0.4
18108 (package-with-python2 python-jsonpatch-0.4))
18109
18110 (define-public python-rfc3986
18111 (package
18112 (name "python-rfc3986")
18113 (version "1.4.0")
18114 (source (origin
18115 (method url-fetch)
18116 (uri (pypi-uri "rfc3986" version))
18117 (sha256
18118 (base32
18119 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18120 (build-system python-build-system)
18121 (arguments
18122 `(#:modules ((guix build utils)
18123 (guix build python-build-system)
18124 (ice-9 ftw)
18125 (srfi srfi-1)
18126 (srfi srfi-26))
18127 #:phases
18128 (modify-phases %standard-phases
18129 (replace 'check
18130 (lambda _
18131 (let ((cwd (getcwd)))
18132 (setenv "PYTHONPATH"
18133 (string-append cwd "/build/"
18134 (find (cut string-prefix? "lib" <>)
18135 (scandir (string-append cwd "/build")))
18136 ":"
18137 (getenv "PYTHONPATH")))
18138 (invoke "pytest" "-v")))))))
18139 (native-inputs
18140 `(("python-pytest" ,python-pytest)))
18141 (home-page "https://rfc3986.readthedocs.io/")
18142 (synopsis "Parse and validate URI references")
18143 (description
18144 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18145 validation and authority parsing. This module also supports RFC@tie{}6874
18146 which adds support for zone identifiers to IPv6 addresses.")
18147 (license license:asl2.0)))
18148
18149 (define-public python2-rfc3986
18150 (package-with-python2 python-rfc3986))
18151
18152 (define-public python-rfc3987
18153 (package
18154 (name "python-rfc3987")
18155 (version "1.3.7")
18156 (source
18157 (origin
18158 (method url-fetch)
18159 (uri (pypi-uri "rfc3987" version))
18160 (sha256
18161 (base32
18162 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18163 (build-system python-build-system)
18164 (home-page "https://pypi.org/project/rfc3987/")
18165 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18166 (description "@code{rfc3987} provides routines for parsing and
18167 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18168 (license license:gpl3+)))
18169
18170 (define-public python2-rfc3987
18171 (package-with-python2 python-rfc3987))
18172
18173 ;; The latest commit contains fixes for building with both python3 and python2.
18174 (define-public python-rfc6555
18175 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18176 (revision "1"))
18177 (package
18178 (name "python-rfc6555")
18179 (version (git-version "0.0.0" revision commit))
18180 (source (origin
18181 (method git-fetch)
18182 (uri (git-reference
18183 (url "https://github.com/sethmlarson/rfc6555")
18184 (commit commit)))
18185 (file-name (git-file-name name version))
18186 (sha256
18187 (base32
18188 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18189 (build-system python-build-system)
18190 (arguments
18191 '(#:phases
18192 (modify-phases %standard-phases
18193 (replace 'check
18194 (lambda* (#:key tests? #:allow-other-keys)
18195 (if tests?
18196 ;; Other tests require network access.
18197 (invoke "pytest" "tests/test_ipv6.py")
18198 #t))))))
18199 (native-inputs
18200 `(("python-pytest" ,python-pytest)))
18201 (home-page "https://pypi.org/project/rfc6555/")
18202 (synopsis "Python implementation of RFC 6555")
18203 (description
18204 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18205 6555. Provided with a single file and dead-simple API to allow easy vendoring
18206 and integration into other projects.")
18207 (properties `((python2-variant . ,(delay python2-rfc6555))))
18208 (license license:asl2.0))))
18209
18210 (define-public python2-rfc6555
18211 (let ((base (package-with-python2
18212 (strip-python2-variant python-rfc6555))))
18213 (package/inherit base
18214 (propagated-inputs
18215 `(("python2-selectors2" ,python2-selectors2))))))
18216
18217 (define-public python-bagit
18218 (package
18219 (name "python-bagit")
18220 (version "1.7.0")
18221 (source
18222 (origin
18223 (method url-fetch)
18224 (uri (pypi-uri "bagit" version))
18225 (sha256
18226 (base32
18227 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18228 (build-system python-build-system)
18229 (native-inputs
18230 `(("python-setuptools-scm" ,python-setuptools-scm)
18231 ("python-coverage" ,python-coverage)
18232 ("python-mock" ,python-mock)))
18233 (home-page "https://libraryofcongress.github.io/bagit-python/")
18234 (synopsis "Create and validate BagIt packages")
18235 (description "Bagit is a Python library and command line utility for working
18236 with BagIt style packages. BagIt is a minimalist packaging format for digital
18237 preservation.")
18238 (license license:cc0)))
18239
18240 (define-public python-prov
18241 (package
18242 (name "python-prov")
18243 (version "2.0.0")
18244 (source
18245 (origin
18246 (method url-fetch)
18247 (uri (pypi-uri "prov" version))
18248 (sha256
18249 (base32
18250 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18251 (build-system python-build-system)
18252 (propagated-inputs
18253 `(("python-dateutil" ,python-dateutil)
18254 ("python-lxml" ,python-lxml)
18255 ("python-networkx" ,python-networkx)
18256 ("python-rdflib" ,python-rdflib)))
18257 (native-inputs
18258 `(("graphviz" ,graphviz)
18259 ("python-pydot" ,python-pydot)))
18260 (home-page "https://github.com/trungdong/prov")
18261 (synopsis
18262 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18263 (description
18264 "This package provides a library for W3C Provenance Data Model supporting
18265 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18266 (license license:expat)))
18267
18268 (define-public python-arcp
18269 (package
18270 (name "python-arcp")
18271 (version "0.2.1")
18272 (source
18273 (origin
18274 (method url-fetch)
18275 (uri (pypi-uri "arcp" version))
18276 (sha256
18277 (base32
18278 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
18279 (build-system python-build-system)
18280 (native-inputs
18281 `(("python-pytest" ,python-pytest)))
18282 (home-page "http://arcp.readthedocs.io/")
18283 (synopsis
18284 "Archive and Package URI parser and generator")
18285 (description
18286 "@acronym{arcp, Archive and Package} provides functions for creating
18287 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
18288 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
18289 consume or reference hypermedia resources bundled inside a file archive or an
18290 application package, as well as to resolve URIs for archive resources within a
18291 programmatic framework. This URI scheme provides mechanisms to generate a
18292 unique base URI to represent the root of the archive, so that relative URI
18293 references in a bundled resource can be resolved within the archive without
18294 having to extract the archive content on the local file system. An arcp URI can
18295 be used for purposes of isolation (e.g. when consuming multiple archives),
18296 security constraints (avoiding \"climb out\" from the archive), or for
18297 externally identiyfing sub-resources referenced by hypermedia formats.")
18298 (license license:asl2.0)))
18299
18300 (define-public python-shellescape
18301 (package
18302 (name "python-shellescape")
18303 (version "3.8.1")
18304 (source
18305 (origin
18306 (method git-fetch)
18307 (uri (git-reference
18308 (url "https://github.com/chrissimpkins/shellescape")
18309 (commit (string-append "v" version))))
18310 (file-name (git-file-name name version))
18311 (sha256
18312 (base32
18313 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
18314 (build-system python-build-system)
18315 (arguments
18316 '(#:phases
18317 (modify-phases %standard-phases
18318 (replace 'check
18319 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18320 (when tests?
18321 (add-installed-pythonpath inputs outputs)
18322 (invoke "python" "tests/test_shellescape.py"))
18323 #t)))))
18324 (native-inputs
18325 `(("python-pytest" ,python-pytest)))
18326 (home-page "https://github.com/chrissimpkins/shellescape")
18327 (synopsis
18328 "Shell escape a string to safely use it as a token in a shell command")
18329 (description
18330 "The shellescape Python module defines the @code{shellescape.quote()}
18331 function that returns a shell-escaped version of a Python string. This is a
18332 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
18333 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
18334 (license license:expat)))
18335
18336 (define-public python-validators
18337 (package
18338 (name "python-validators")
18339 (version "0.14.2")
18340 (source (origin
18341 (method url-fetch)
18342 (uri (pypi-uri "validators" version))
18343 (sha256
18344 (base32
18345 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
18346 (build-system python-build-system)
18347 (arguments
18348 '(#:phases (modify-phases %standard-phases
18349 (replace 'check
18350 (lambda _
18351 (invoke "pytest" "-vv"))))))
18352 (propagated-inputs
18353 `(("python-decorator" ,python-decorator)
18354 ("python-six" ,python-six)))
18355 (native-inputs
18356 `(("python-flake8" ,python-flake8)
18357 ("python-isort" ,python-isort)
18358 ("python-pytest" ,python-pytest)))
18359 (home-page "https://github.com/kvesteri/validators")
18360 (synopsis "Data validation library")
18361 (description
18362 "This package contains validators for different things such as email
18363 addresses, IP addresses, URLs, hashes and more. It has been designed to
18364 be easy to use and not require defining a schema or form just to validate
18365 some input.")
18366 (license license:expat)))
18367
18368 (define-public python2-validators
18369 (package-with-python2 python-validators))
18370
18371 (define-public python-validate-email
18372 (package
18373 (name "python-validate-email")
18374 (version "1.3")
18375 (source
18376 (origin
18377 (method url-fetch)
18378 (uri (pypi-uri "validate_email" version))
18379 (sha256
18380 (base32
18381 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
18382 (build-system python-build-system)
18383 (home-page "https://github.com/syrusakbary/validate_email")
18384 (synopsis "Verifies if an email address is valid and really exists")
18385 (description "@code{validate_email} can be used to verify if an email
18386 address is valid and really exists.")
18387 (license license:lgpl3+)))
18388
18389 (define-public python2-validate-email
18390 (package-with-python2 python-validate-email))
18391
18392 (define-public python-flex
18393 (package
18394 (name "python-flex")
18395 (version "6.10.0")
18396 (source
18397 (origin
18398 (method url-fetch)
18399 (uri (pypi-uri "flex" version))
18400 (sha256
18401 (base32
18402 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
18403 (build-system python-build-system)
18404 (propagated-inputs
18405 `(("python-click" ,python-click)
18406 ("python-iso8601" ,python-iso8601)
18407 ("python-jsonpointer" ,python-jsonpointer)
18408 ("python-pyyaml" ,python-pyyaml)
18409 ("python-requests" ,python-requests)
18410 ("python-rfc3987" ,python-rfc3987)
18411 ("python-six" ,python-six)
18412 ("python-validate-email" ,python-validate-email)))
18413 (home-page "https://github.com/pipermerriam/flex")
18414 (synopsis "Validates Swagger schemata")
18415 (description "@code{flex} can be used to validate Swagger schemata.")
18416 (license license:bsd-3)))
18417
18418 (define-public python2-flex
18419 (package-with-python2 python-flex))
18420
18421 (define-public python-marshmallow
18422 (package
18423 (name "python-marshmallow")
18424 (version "3.9.1")
18425 (source
18426 (origin
18427 (method url-fetch)
18428 (uri (pypi-uri "marshmallow" version))
18429 (sha256
18430 (base32
18431 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
18432 (build-system python-build-system)
18433 (propagated-inputs
18434 `(("python-dateutil" ,python-dateutil)
18435 ("python-simplejson" ,python-simplejson)))
18436 (native-inputs
18437 `(("python-pytest" ,python-pytest)
18438 ("python-pytz" ,python-pytz)))
18439 (home-page "https://github.com/marshmallow-code/marshmallow")
18440 (synopsis "Convert complex datatypes to and from native
18441 Python datatypes.")
18442 (description "@code{marshmallow} provides a library for converting
18443 complex datatypes to and from native Python datatypes.")
18444 (license license:expat)))
18445
18446 (define-public python-apispec
18447 (package
18448 (name "python-apispec")
18449 (version "4.0.0")
18450 (source
18451 (origin
18452 (method url-fetch)
18453 (uri (pypi-uri "apispec" version))
18454 (sha256
18455 (base32
18456 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
18457 (build-system python-build-system)
18458 (arguments
18459 '(#:phases (modify-phases %standard-phases
18460 (add-after 'unpack 'disable-prance-tests
18461 (lambda _
18462 ;; Disable validation tests since they require the
18463 ;; optional 'prance' library which is not yet in Guix.
18464 (substitute* "tests/test_ext_marshmallow_openapi.py"
18465 (("def test_openapi_tools_validate.*" all)
18466 (string-append "@pytest.mark.xfail\n" all)))))
18467 (replace 'check
18468 (lambda _
18469 (setenv "PYTHONPATH"
18470 (string-append "./build/lib:"
18471 (getenv "PYTHONPATH")))
18472 (invoke "pytest" "-vv"))))))
18473 (propagated-inputs
18474 `(("python-pyyaml" ,python-pyyaml)))
18475 (native-inputs
18476 `(("python-pytest" ,python-pytest)
18477 ("python-marshmallow" ,python-marshmallow)))
18478 (home-page "https://github.com/marshmallow-code/apispec")
18479 (synopsis "Swagger/OpenAPI specification generator")
18480 (description "@code{python-apispec} is a pluggable API specification
18481 generator. It currently supports the OpenAPI specification, formerly known
18482 as Swagger.")
18483 (license license:expat)))
18484
18485 (define-public python-flasgger
18486 (package
18487 (name "python-flasgger")
18488 (version "0.6.3")
18489 (source
18490 (origin
18491 (method git-fetch)
18492 (uri (git-reference
18493 (url "https://github.com/rochacbruno/flasgger")
18494 (commit version)))
18495 (file-name (git-file-name name version))
18496 (sha256
18497 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
18498 (build-system python-build-system)
18499 (arguments
18500 `(#:phases
18501 (modify-phases %standard-phases
18502 (replace 'check
18503 (lambda* (#:key inputs outputs #:allow-other-keys)
18504 (substitute* "Makefile"
18505 (("flake8 flasgger --ignore=F403")
18506 "flake8 flasgger --ignore=E731,F403"))
18507 (setenv "PYTHONPATH" (string-append (getcwd)
18508 ":"
18509 (getenv "PYTHONPATH")))
18510 (invoke "py.test"))))))
18511 (propagated-inputs
18512 `(("python-flask" ,python-flask)
18513 ("python-pyyaml" ,python-pyyaml)
18514 ("python-jsonschema" ,python-jsonschema)
18515 ("python-mistune" ,python-mistune)
18516 ("python-six" ,python-six)))
18517 (native-inputs
18518 `(("python-decorator" ,python-decorator)
18519 ("python-flake8" ,python-flake8)
18520 ("python-flask-restful" ,python-flask-restful)
18521 ("python-flex" ,python-flex)
18522 ("python-pytest" ,python-pytest)
18523 ("python-pytest-cov" ,python-pytest-cov)
18524 ("python-marshmallow" ,python-marshmallow)
18525 ("python-apispec" ,python-apispec)))
18526 (home-page "https://github.com/rochacbruno/flasgger/")
18527 (synopsis "Extract Swagger specs from your Flask project")
18528 (description "@code{python-flasgger} allows extracting Swagger specs
18529 from your Flask project. It is a fork of Flask-Swagger.")
18530 (license license:expat)))
18531
18532 (define-public python-swagger-spec-validator
18533 (package
18534 (name "python-swagger-spec-validator")
18535 (version "2.4.3")
18536 (source
18537 (origin
18538 (method url-fetch)
18539 (uri (pypi-uri "swagger-spec-validator" version))
18540 (sha256
18541 (base32
18542 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
18543 (build-system python-build-system)
18544 (propagated-inputs
18545 `(("python-jsonschema" ,python-jsonschema)
18546 ("python-pyyaml" ,python-pyyaml)
18547 ("python-six" ,python-six)))
18548 (home-page
18549 "https://github.com/Yelp/swagger_spec_validator")
18550 (synopsis "Validation of Swagger specifications")
18551 (description "@code{swagger_spec_validator} provides a library for
18552 validating Swagger API specifications.")
18553 (license license:asl2.0)))
18554
18555 (define-public python2-swagger-spec-validator
18556 (package-with-python2 python-swagger-spec-validator))
18557
18558 (define-public python-apache-libcloud
18559 (package
18560 (name "python-apache-libcloud")
18561 (version "3.1.0")
18562 (source
18563 (origin
18564 (method url-fetch)
18565 (uri (pypi-uri "apache-libcloud" version))
18566 (sha256
18567 (base32
18568 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
18569 (build-system python-build-system)
18570 (arguments
18571 `(#:phases
18572 (modify-phases %standard-phases
18573 (add-after 'unpack 'patch-ssh
18574 (lambda* (#:key inputs #:allow-other-keys)
18575 (substitute* "libcloud/compute/ssh.py"
18576 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
18577 "/bin/ssh" "'")))
18578 #t))
18579 (add-after 'unpack 'patch-tests
18580 (lambda _
18581 (substitute* "libcloud/test/compute/test_ssh_client.py"
18582 (("class ShellOutSSHClientTests")
18583 "@unittest.skip(\"Guix container doesn't have ssh service\")
18584 class ShellOutSSHClientTests"))
18585 #t))
18586 (add-before 'check 'copy-secret
18587 (lambda _
18588 (copy-file "libcloud/test/secrets.py-dist"
18589 "libcloud/test/secrets.py")
18590 #t)))))
18591 (inputs
18592 `(("openssh" ,openssh)))
18593 (propagated-inputs
18594 `(("python-paramiko" ,python-paramiko)
18595 ("python-requests" ,python-requests)))
18596 (native-inputs
18597 `(("python-lockfile" ,python-lockfile)
18598 ("python-mock" ,python-mock)
18599 ("python-pytest" ,python-pytest)
18600 ("python-pytest-runner" ,python-pytest-runner)
18601 ("python-requests-mock" ,python-requests-mock)))
18602 (home-page "https://libcloud.apache.org/")
18603 (synopsis "Unified Cloud API")
18604 (description "@code{libcloud} is a Python library for interacting with
18605 many of the popular cloud service providers using a unified API.")
18606 (license license:asl2.0)))
18607
18608 (define-public python-smmap
18609 (package
18610 (name "python-smmap")
18611 (version "3.0.1")
18612 (source
18613 (origin
18614 (method url-fetch)
18615 (uri (pypi-uri "smmap" version))
18616 (sha256
18617 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
18618 (build-system python-build-system)
18619 (native-inputs
18620 `(("python-nosexcover" ,python-nosexcover)))
18621 (home-page "https://github.com/Byron/smmap")
18622 (synopsis "Python sliding window memory map manager")
18623 (description "@code{smmap} is a pure Python implementation of a sliding
18624 window memory map manager.")
18625 (license license:bsd-3)))
18626
18627 (define-public python-smmap2
18628 (deprecated-package "python-smmap2" python-smmap))
18629
18630 (define-public python2-smmap
18631 (package-with-python2 python-smmap))
18632
18633 (define-public python2-smmap2
18634 (deprecated-package "python2-smmap2" python2-smmap))
18635
18636 (define-public python-regex
18637 (package
18638 (name "python-regex")
18639 (version "2020.6.8")
18640 (source (origin
18641 (method url-fetch)
18642 (uri (pypi-uri "regex" version))
18643 (sha256
18644 (base32
18645 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
18646 (build-system python-build-system)
18647 (arguments
18648 '(#:phases
18649 (modify-phases %standard-phases
18650 (replace 'check
18651 (lambda* (#:key inputs outputs #:allow-other-keys)
18652 (add-installed-pythonpath inputs outputs)
18653 (invoke "python" "-c"
18654 "from regex.test_regex import test_main; test_main()"))))))
18655 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
18656 (synopsis "Alternative regular expression module")
18657 (description "This regular expression implementation is backwards-
18658 compatible with the standard @code{re} module, but offers additional
18659 functionality like full case-folding for case-insensitive matches in Unicode.")
18660 (license license:psfl)))
18661
18662 (define-public python2-regex
18663 (package-with-python2 python-regex))
18664
18665 (define-public python-pyopengl
18666 (package
18667 (name "python-pyopengl")
18668 (version "3.1.5")
18669 (source
18670 (origin
18671 (method url-fetch)
18672 (uri (pypi-uri "PyOpenGL" version))
18673 (sha256
18674 (base32
18675 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
18676 (build-system python-build-system)
18677 (inputs
18678 `(("mesa" ,mesa)
18679 ("freeglut" ,freeglut)
18680 ("glu" ,glu)))
18681 (arguments
18682 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
18683 ;attribute 'OSMesa'
18684 #:phases
18685 (modify-phases %standard-phases
18686 (add-before 'build 'fix-paths
18687 (lambda* (#:key inputs outputs #:allow-other-keys)
18688 (substitute* '("OpenGL/platform/ctypesloader.py")
18689 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
18690 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
18691 (("'GL'")
18692 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
18693 (("'GLU'")
18694 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
18695 (("'glut',")
18696 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
18697 (("'GLESv1_CM'")
18698 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
18699 (("'GLESv2'")
18700 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
18701 ;; Not providing libgle. It seems to be very old.
18702 #t)))))
18703 (home-page "http://pyopengl.sourceforge.net")
18704 (synopsis "Standard OpenGL bindings for Python")
18705 (description
18706 "PyOpenGL is the most common cross platform Python binding to OpenGL and
18707 related APIs. The binding is created using the standard @code{ctypes}
18708 library.")
18709 (license license:bsd-3)))
18710
18711 (define-public python-pyopengl-accelerate
18712 (package
18713 (inherit python-pyopengl)
18714 (name "python-pyopengl-accelerate")
18715 (version "3.1.5")
18716 (source
18717 (origin
18718 (method url-fetch)
18719 (uri (pypi-uri "PyOpenGL-accelerate" version))
18720 (sha256
18721 (base32
18722 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
18723 (inputs
18724 `(("mesa" ,mesa)
18725 ("python-numpy" ,python-numpy))) ; for cython module
18726 ; numpy_formathandler, thus not propagated
18727 (arguments
18728 `(#:tests? #f
18729 #:phases
18730 (modify-phases %standard-phases
18731 (delete 'fix-paths))))
18732 (synopsis "Acceleration code for PyOpenGL")
18733 (description
18734 "This is the Cython-coded accelerator module for PyOpenGL.")))
18735
18736 (define-public python-rencode
18737 (package
18738 (name "python-rencode")
18739 (version "1.0.5")
18740 (source
18741 (origin
18742 (method url-fetch)
18743 (uri (pypi-uri "rencode" version))
18744 (sha256
18745 (base32
18746 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
18747 (build-system python-build-system)
18748 (arguments
18749 `(#:phases
18750 (modify-phases %standard-phases
18751 (add-before 'check 'delete-bogus-test
18752 ;; This test requires /home/aresch/Downloads, which is not provided by
18753 ;; the build environment.
18754 (lambda _
18755 (delete-file "rencode/t.py")
18756 #t)))))
18757 (native-inputs `(("pkg-config" ,pkg-config)
18758 ("python-cython" ,python-cython)))
18759 (home-page "https://github.com/aresch/rencode")
18760 (synopsis "Serialization of heterogeneous data structures")
18761 (description
18762 "The @code{rencode} module is a data structure serialization library,
18763 similar to @code{bencode} from the BitTorrent project. For complex,
18764 heterogeneous data structures with many small elements, r-encoding stake up
18765 significantly less space than b-encodings. This version of rencode is a
18766 complete rewrite in Cython to attempt to increase the performance over the
18767 pure Python module.")
18768 (license license:bsd-3)))
18769
18770 (define-public python2-rencode
18771 (package-with-python2 python-rencode))
18772
18773 (define-public python-xenon
18774 (package
18775 (name "python-xenon")
18776 (version "0.7.0")
18777 (source
18778 (origin
18779 (method url-fetch)
18780 (uri (pypi-uri "xenon" version))
18781 (sha256
18782 (base32
18783 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
18784 (build-system python-build-system)
18785 (native-inputs
18786 `(("python-pyyaml" ,python-pyyaml)
18787 ("python-radon" ,python-radon)
18788 ("python-requests" ,python-requests)
18789 ("python-flake8" ,python-flake8)
18790 ("python-tox" ,python-tox)))
18791 (arguments
18792 `(#:tests? #f ;test suite not shipped with the PyPI archive
18793 #:phases
18794 (modify-phases %standard-phases
18795 (add-before 'build 'patch-test-requirements
18796 (lambda _
18797 ;; Remove httpretty dependency for tests.
18798 (substitute* "setup.py"
18799 (("httpretty") ""))
18800 #t)))))
18801 (home-page "https://xenon.readthedocs.org/")
18802 (synopsis "Monitor code metrics for Python on your CI server")
18803 (description
18804 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
18805 Ideally, @code{xenon} is run every time code is committed. Through command
18806 line options, various thresholds can be set for the complexity of code. It
18807 will fail (i.e. it will exit with a non-zero exit code) when any of these
18808 requirements is not met.")
18809 (license license:expat)))
18810
18811 (define-public python-pysocks
18812 (package
18813 (name "python-pysocks")
18814 (version "1.7.1")
18815 (source
18816 (origin
18817 (method url-fetch)
18818 (uri (pypi-uri "PySocks" version))
18819 (sha256
18820 (base32
18821 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
18822 (build-system python-build-system)
18823 (arguments `(#:tests? #f))
18824 (home-page "https://github.com/Anorov/PySocks")
18825 (synopsis "SOCKS client module")
18826 (description "@code{pysocks} is an updated and semi-actively maintained
18827 version of @code{SocksiPy} with bug fixes and extra features.")
18828 (license license:bsd-3)))
18829
18830 (define-public python2-pysocks
18831 (package-with-python2 python-pysocks))
18832
18833 (define-public python-pydiff
18834 (package
18835 (name "python-pydiff")
18836 (version "0.2")
18837 (source
18838 (origin
18839 (method url-fetch)
18840 (uri (pypi-uri "pydiff" version))
18841 (sha256
18842 (base32
18843 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
18844 (build-system python-build-system)
18845 (home-page "https://github.com/myint/pydiff")
18846 (synopsis "Library to diff two Python files at the bytecode level")
18847 (description
18848 "@code{pydiff} makes it easy to look for actual code changes while
18849 ignoring formatting changes.")
18850 (license license:expat)))
18851
18852 (define-public python2-pydiff
18853 (package-with-python2 python-pydiff))
18854
18855 (define-public python-pydub
18856 (package
18857 (name "python-pydub")
18858 (version "0.24.1")
18859 (source
18860 (origin
18861 (method url-fetch)
18862 (uri (pypi-uri "pydub" version))
18863 (sha256
18864 (base32
18865 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
18866 (build-system python-build-system)
18867 (arguments
18868 `(#:phases
18869 (modify-phases %standard-phases
18870 (add-after 'unpack 'fix-ffmpeg-path
18871 (lambda* (#:key inputs #:allow-other-keys)
18872 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
18873 (substitute* '("pydub/utils.py")
18874 (("return \"ffmpeg\"")
18875 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
18876 (("return \"ffplay\"")
18877 (string-append "return \"" ffmpeg "/bin/ffplay\""))
18878 (("return \"ffprobe\"")
18879 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
18880 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
18881 #t))))))
18882 (home-page "https://pydub.com")
18883 (inputs
18884 `(("ffmpeg" ,ffmpeg)))
18885 (propagated-inputs
18886 `(("python-scipy" ,python-scipy)))
18887 (synopsis "Manipulate audio with a high level interface in Python")
18888 (description
18889 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
18890 @code{ffmpeg} to open various audio formats.")
18891 (license license:expat))) ; MIT license
18892
18893 (define-public python-tqdm
18894 (package
18895 (name "python-tqdm")
18896 (version "4.43.0")
18897 (source
18898 (origin
18899 (method url-fetch)
18900 (uri (pypi-uri "tqdm" version))
18901 (sha256
18902 (base32
18903 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
18904 (build-system python-build-system)
18905 (arguments
18906 '(#:phases (modify-phases %standard-phases
18907 (replace 'check
18908 (lambda* (#:key inputs outputs #:allow-other-keys)
18909 (add-installed-pythonpath inputs outputs)
18910 ;; This invokation is taken from tox.ini.
18911 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
18912 "-d" "-v" "tqdm/"))))))
18913 (native-inputs
18914 `(("python-nose" ,python-nose)))
18915 (home-page "https://github.com/tqdm/tqdm")
18916 (synopsis "Fast, extensible progress meter")
18917 (description
18918 "Make loops show a progress bar on the console by just wrapping any
18919 iterable with @code{|tqdm(iterable)|}. Offers many options to define
18920 design and layout.")
18921 (license (list license:mpl2.0 license:expat))))
18922
18923 (define-public python2-tqdm
18924 (package-with-python2 python-tqdm))
18925
18926 (define-public python-pkginfo
18927 (package
18928 (name "python-pkginfo")
18929 (version "1.7.0")
18930 (source
18931 (origin
18932 (method url-fetch)
18933 (uri (pypi-uri "pkginfo" version))
18934 (sha256
18935 (base32
18936 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
18937 (build-system python-build-system)
18938 (arguments
18939 `(#:phases
18940 (modify-phases %standard-phases
18941 (add-before 'check 'patch-tests
18942 (lambda _
18943 (substitute* "pkginfo/tests/test_installed.py"
18944 (("test_ctor_w_package_no_PKG_INFO")
18945 "_test_ctor_w_package_no_PKG_INFO"))
18946 #t)))))
18947 (home-page
18948 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
18949 (synopsis
18950 "Query metadatdata from sdists, bdists, and installed packages")
18951 (description
18952 "API to query the distutils metadata written in @file{PKG-INFO} inside a
18953 source distriubtion (an sdist) or a binary distribution (e.g., created by
18954 running bdist_egg). It can also query the EGG-INFO directory of an installed
18955 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
18956 created by running @code{python setup.py develop}).")
18957 (license license:expat)))
18958
18959 (define-public python2-pkginfo
18960 (package-with-python2 python-pkginfo))
18961
18962 (define-public python-twine
18963 (package
18964 (name "python-twine")
18965 (version "1.15.0")
18966 (source
18967 (origin
18968 (method url-fetch)
18969 (uri (pypi-uri "twine" version))
18970 (sha256
18971 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
18972 (build-system python-build-system)
18973 (propagated-inputs
18974 `(("python-tqdm" ,python-tqdm)
18975 ("python-packaging" ,python-packaging)
18976 ("python-pkginfo" ,python-pkginfo)
18977 ("python-readme-renderer" ,python-readme-renderer)
18978 ("python-requests" ,python-requests)
18979 ("python-requests-toolbelt" ,python-requests-toolbelt)))
18980 (home-page "https://github.com/pypa/twine")
18981 (synopsis "Collection of utilities for interacting with PyPI")
18982 (description
18983 "@code{twine} currently supports registering projects and uploading
18984 distributions. It authenticates the user over HTTPS, allows them to pre-sign
18985 their files and supports any packaging format (including wheels).")
18986 (license license:asl2.0)))
18987
18988 (define-public python2-twine
18989 (package-with-python2 python-twine))
18990
18991 (define-public python-linecache2
18992 (package
18993 (name "python-linecache2")
18994 (version "1.0.0")
18995 (source
18996 (origin
18997 (method url-fetch)
18998 (uri (pypi-uri "linecache2" version))
18999 (sha256
19000 (base32
19001 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
19002 (build-system python-build-system)
19003 (arguments
19004 `(;; The tests depend on unittest2, and our version is a bit too old.
19005 #:tests? #f))
19006 (native-inputs
19007 `(("python-pbr" ,python-pbr-minimal)))
19008 (home-page
19009 "https://github.com/testing-cabal/linecache2")
19010 (synopsis "Backports of the linecache module")
19011 (description
19012 "The linecache module allows one to get any line from any file, while
19013 attempting to optimize internally, using a cache, the common case where many
19014 lines are read from a single file.")
19015 (license license:psfl)))
19016
19017 (define-public python2-linecache2
19018 (package-with-python2 python-linecache2))
19019
19020 (define-public python-traceback2
19021 (package
19022 (name "python-traceback2")
19023 (version "1.4.0")
19024 (source
19025 (origin
19026 (method url-fetch)
19027 (uri (pypi-uri "traceback2" version))
19028 (sha256
19029 (base32
19030 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
19031 (build-system python-build-system)
19032 (arguments
19033 `(;; python-traceback2 and python-unittest2 depend on one another.
19034 #:tests? #f))
19035 (native-inputs
19036 `(("python-pbr" ,python-pbr-minimal)))
19037 (propagated-inputs
19038 `(("python-linecache2" ,python-linecache2)))
19039 (home-page
19040 "https://github.com/testing-cabal/traceback2")
19041 (synopsis "Backports of the traceback module")
19042 (description
19043 "This module provides a standard interface to extract, format and print
19044 stack traces of Python programs. It exactly mimics the behavior of the Python
19045 interpreter when it prints a stack trace.")
19046 (license license:psfl)))
19047
19048 (define-public python2-traceback2
19049 (package-with-python2 python-traceback2))
19050
19051 (define-public python-ratelimiter
19052 (package
19053 (name "python-ratelimiter")
19054 (version "1.2.0")
19055 (source
19056 (origin
19057 (method url-fetch)
19058 (uri (pypi-uri "ratelimiter" version))
19059 (sha256
19060 (base32
19061 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
19062 (build-system python-build-system)
19063 (arguments
19064 '(#:tests? #f)) ; There are no tests in the pypi archive.
19065 (home-page "https://github.com/RazerM/ratelimiter")
19066 (synopsis "Simple rate limiting object")
19067 (description
19068 "The @code{ratelimiter} module ensures that an operation will not be
19069 executed more than a given number of times during a given period.")
19070 (license license:asl2.0)))
19071
19072 (define-public python2-ratelimiter
19073 (package-with-python2 python-ratelimiter))
19074
19075 (define-public python-dukpy
19076 (package
19077 (name "python-dukpy")
19078 (version "0.3")
19079 (source
19080 (origin
19081 (method git-fetch)
19082 (uri (git-reference
19083 (url "https://github.com/kovidgoyal/dukpy")
19084 (commit (string-append "v" version))))
19085 (file-name (git-file-name name version))
19086 (sha256
19087 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19088 (build-system python-build-system)
19089 (home-page "https://github.com/kovidgoyal/dukpy")
19090 (synopsis "Run JavaScript in python")
19091 (description
19092 "dukpy is a JavaScript runtime environment for Python using the duktape
19093 embeddable JavaScript engine.")
19094 ;; Dukpy is licensed under MIT like the embedded duktape library,
19095 ;; with 'errors.c' as GPL3.
19096 (license (list license:expat license:gpl3))))
19097
19098 (define-public python2-dukpy
19099 (package-with-python2 python-dukpy))
19100
19101 (define-public python-jsonrpclib-pelix
19102 (package
19103 (name "python-jsonrpclib-pelix")
19104 (version "0.3.2")
19105 (source
19106 (origin
19107 (method url-fetch)
19108 (uri (pypi-uri "jsonrpclib-pelix" version))
19109 (sha256
19110 (base32
19111 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19112 (build-system python-build-system)
19113 (arguments
19114 `(#:tests? #f)) ; no tests in PyPI tarball
19115 (home-page "https://github.com/tcalmant/jsonrpclib/")
19116 (synopsis "JSON-RPC 2.0 client library for Python")
19117 (description
19118 "This library implements the JSON-RPC v2.0
19119 specification (backwards-compatible) as a client library for Python. This
19120 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19121 services.")
19122 (license license:asl2.0)))
19123
19124 (define-public python2-jsonrpclib-pelix
19125 (package-with-python2 python-jsonrpclib-pelix))
19126
19127 (define-public python-setuptools-scm-git-archive
19128 (package
19129 (name "python-setuptools-scm-git-archive")
19130 (version "1.0")
19131 (source
19132 (origin
19133 (method url-fetch)
19134 (uri (pypi-uri "setuptools_scm_git_archive" version))
19135 (sha256
19136 (base32
19137 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19138 (build-system python-build-system)
19139 (native-inputs
19140 `(("python-pytest" ,python-pytest)))
19141 (propagated-inputs
19142 `(("python-setuptools-scm" ,python-setuptools-scm)))
19143 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19144 (synopsis "Setuptools_scm plugin for git archives")
19145 (description
19146 "The setuptools_scm_git_archive package is a plugin to
19147 setuptools_scm, which supports obtaining versions from git archives that
19148 belong to tagged versions.")
19149 (license license:expat)))
19150
19151 (define-public python2-setuptools-scm-git-archive
19152 (package-with-python2 python-setuptools-scm-git-archive))
19153
19154 (define-public python-setuptools-git
19155 (package
19156 (name "python-setuptools-git")
19157 (version "1.2")
19158 (source
19159 (origin
19160 (method url-fetch)
19161 (uri (pypi-uri "setuptools-git" version))
19162 (sha256
19163 (base32
19164 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19165 (build-system python-build-system)
19166 (arguments
19167 `(#:phases
19168 (modify-phases %standard-phases
19169 ;; This is needed for tests.
19170 (add-after 'unpack 'configure-git
19171 (lambda _
19172 (setenv "HOME" "/tmp")
19173 (invoke "git" "config" "--global" "user.email" "guix")
19174 (invoke "git" "config" "--global" "user.name" "guix")
19175 #t)))))
19176 (native-inputs
19177 `(("git" ,git-minimal)))
19178 (home-page "https://github.com/msabramo/setuptools-git")
19179 (synopsis "Setuptools revision control system plugin for Git")
19180 (description
19181 "This package provides a plugin for Setuptools for revision control with
19182 Git.")
19183 (license license:bsd-3)))
19184
19185 (define-public python-pyclipper
19186 (package
19187 (name "python-pyclipper")
19188 (version "1.1.0.post3")
19189 (source
19190 (origin
19191 (method url-fetch)
19192 (uri (pypi-uri "pyclipper" version ".zip"))
19193 (sha256
19194 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19195 (modules '((guix build utils)))
19196 (snippet
19197 '(begin
19198 ;; This file is generated by Cython.
19199 (delete-file "pyclipper/pyclipper.cpp") #t))))
19200 (build-system python-build-system)
19201 (arguments
19202 `(#:phases
19203 (modify-phases %standard-phases
19204 (add-before 'build 'cythonize-sources
19205 (lambda _
19206 (with-directory-excursion "pyclipper"
19207 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19208 (propagated-inputs
19209 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19210 (native-inputs
19211 `(("python-cython" ,python-cython)
19212 ("python-pytest" ,python-pytest)
19213 ("python-pytest-runner" ,python-pytest-runner)
19214 ("python-unittest2" ,python-unittest2)
19215 ("unzip" ,unzip)))
19216 (home-page "https://github.com/greginvm/pyclipper")
19217 (synopsis "Wrapper for Angus Johnson's Clipper library")
19218 (description
19219 "Pyclipper is a Cython wrapper for the C++ translation of the
19220 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19221 (license license:expat)))
19222
19223 (define-public python2-pyclipper
19224 (package-with-python2 python-pyclipper))
19225
19226 (define-public python2-booleanoperations
19227 (package
19228 (name "python2-booleanoperations")
19229 (version "0.7.1")
19230 (source
19231 (origin
19232 (method url-fetch)
19233 (uri (pypi-uri "booleanOperations" version ".zip"))
19234 (sha256
19235 (base32
19236 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19237 (build-system python-build-system)
19238 (arguments
19239 `(#:python ,python-2))
19240 (native-inputs
19241 `(("unzip" ,unzip)
19242 ("python2-pytest" ,python2-pytest)
19243 ("python2-pytest-runner" ,python2-pytest-runner)))
19244 (propagated-inputs
19245 `(("python-fonttools" ,python2-fonttools)
19246 ("python-pyclipper" ,python2-pyclipper)
19247 ("python-ufolib" ,python2-ufolib)))
19248 (home-page "https://github.com/typemytype/booleanOperations")
19249 (synopsis "Boolean operations on paths")
19250 (description
19251 "BooleanOperations provides a Python library that enables
19252 boolean operations on paths.")
19253 (license license:expat)))
19254
19255 (define-public python-tempdir
19256 (package
19257 (name "python-tempdir")
19258 (version "0.7.1")
19259 (source
19260 (origin
19261 (method url-fetch)
19262 (uri (pypi-uri "tempdir" version))
19263 (sha256
19264 (base32
19265 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19266 (build-system python-build-system)
19267 (home-page "https://pypi.org/project/tempdir/")
19268 (arguments
19269 ;; the package has no tests
19270 '(#:tests? #f))
19271 (synopsis "Python library for managing temporary directories")
19272 (description
19273 "This library manages temporary directories that are automatically
19274 deleted with all their contents when they are no longer needed. It is
19275 particularly convenient for use in tests.")
19276 (license license:expat)))
19277
19278 (define-public python2-tempdir
19279 (package-with-python2 python-tempdir))
19280
19281 (define-public python-activepapers
19282 (package
19283 (name "python-activepapers")
19284 (version "0.2.2")
19285 (source
19286 (origin
19287 (method url-fetch)
19288 (uri (pypi-uri "ActivePapers.Py" version))
19289 (sha256
19290 (base32
19291 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
19292 (build-system python-build-system)
19293 (arguments
19294 `(#:modules ((ice-9 ftw)
19295 (srfi srfi-1)
19296 (guix build utils)
19297 (guix build python-build-system))
19298
19299 #:phases
19300 (modify-phases %standard-phases
19301 (add-after 'unpack 'delete-python2-code
19302 (lambda _
19303 (for-each delete-file
19304 '("lib/activepapers/builtins2.py"
19305 "lib/activepapers/standardlib2.py"
19306 "lib/activepapers/utility2.py"))))
19307 (replace 'check
19308 (lambda _
19309 ;; Deactivate the test cases that download files
19310 (setenv "NO_NETWORK_ACCESS" "1")
19311 ;; For some strange reason, some tests fail if nosetests runs all
19312 ;; test modules in a single execution. They pass if each test
19313 ;; module is run individually.
19314 (for-each (lambda (filename)
19315 (invoke "nosetests"
19316 (string-append "tests/" filename)))
19317 (scandir "tests"
19318 (lambda (filename)
19319 (string-suffix? ".py" filename)))))))))
19320 (native-inputs
19321 `(("python-tempdir" ,python-tempdir)
19322 ("python-nose" ,python-nose)))
19323 (propagated-inputs
19324 `(("python-h5py" ,python-h5py)))
19325 (home-page "https://www.activepapers.org/")
19326 (synopsis "Executable papers for scientific computing")
19327 (description
19328 "ActivePapers is a tool for working with executable papers, which
19329 combine data, code, and documentation in single-file packages,
19330 suitable for publication as supplementary material or on repositories
19331 such as figshare or Zenodo.")
19332 (properties `((python2-variant . ,(delay python2-activepapers))))
19333 (license license:bsd-3)))
19334
19335 (define-public python2-activepapers
19336 (let ((base (package-with-python2
19337 (strip-python2-variant python-activepapers))))
19338 (package/inherit base
19339 (arguments
19340 (substitute-keyword-arguments (package-arguments base)
19341 ((#:phases phases)
19342 `(modify-phases ,phases
19343 (delete 'delete-python2-code)
19344 (add-after 'unpack 'delete-python3-code
19345 (lambda _
19346 (for-each delete-file
19347 '("lib/activepapers/builtins3.py"
19348 "lib/activepapers/standardlib3.py"
19349 "lib/activepapers/utility3.py")))))))))))
19350
19351 (define-public python-semver
19352 (package
19353 (name "python-semver")
19354 (version "2.9.0")
19355 (source
19356 (origin
19357 (method url-fetch)
19358 (uri (pypi-uri "semver" version))
19359 (sha256
19360 (base32
19361 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
19362 (build-system python-build-system)
19363 (arguments
19364 `(#:phases (modify-phases %standard-phases
19365 (replace 'check
19366 (lambda _
19367 (delete-file "setup.cfg")
19368 (invoke "py.test"))))))
19369 (native-inputs
19370 `(("python-pytest" ,python-pytest)))
19371 (home-page "https://github.com/k-bx/python-semver")
19372 (synopsis "Python helper for Semantic Versioning")
19373 (description "This package provides a Python library for
19374 @url{Semantic Versioning, http://semver.org/}.")
19375 (license license:bsd-3)))
19376
19377 (define-public python2-semver
19378 (package-with-python2 python-semver))
19379
19380 (define-public python-pyro4
19381 (package
19382 (name "python-pyro4")
19383 (version "4.77")
19384 (source
19385 (origin
19386 (method url-fetch)
19387 (uri (pypi-uri "Pyro4" version))
19388 (sha256
19389 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
19390 (build-system python-build-system)
19391 (arguments
19392 '(#:tests? #f)) ;FIXME: Some tests require network access.
19393 (native-inputs
19394 `(("python-cloudpickle" ,python-cloudpickle)
19395 ("python-dill" ,python-dill)
19396 ("python-msgpack" ,python-msgpack)))
19397 (propagated-inputs
19398 `(("python-serpent" ,python-serpent)))
19399 (home-page "https://pyro4.readthedocs.io")
19400 (synopsis "Distributed object middleware for Python")
19401 (description
19402 "Pyro enables you to build applications in which objects can talk to each
19403 other over the network. You can just use normal Python method calls to call
19404 objects on other machines, also known as remote procedure calls (RPC).")
19405 (license license:expat)))
19406
19407 (define-public python2-pyro
19408 (package
19409 (name "python2-pyro")
19410 (version "3.16")
19411 (source
19412 (origin
19413 (method url-fetch)
19414 (uri (pypi-uri "Pyro" version))
19415 (file-name (string-append "Pyro-" version ".tar.gz"))
19416 (sha256
19417 (base32
19418 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
19419 (build-system python-build-system)
19420 (arguments
19421 ;; Pyro is not compatible with Python 3
19422 `(#:python ,python-2
19423 ;; Pyro has no test cases for automatic execution
19424 #:tests? #f))
19425 (home-page "https://pythonhosted.org/Pyro/")
19426 (synopsis "Distributed object manager for Python")
19427 (description "Pyro is a Distributed Object Technology system
19428 written in Python that is designed to be easy to use. It resembles
19429 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
19430 which is a system and language independent Distributed Object Technology
19431 and has much more to offer than Pyro or RMI. Pyro 3.x is no
19432 longer maintained. New projects should use Pyro4 instead, which
19433 is the new Pyro version that is actively developed.")
19434 (license license:expat)))
19435
19436 (define-public python2-scientific
19437 (package
19438 (name "python2-scientific")
19439 (version "2.9.4")
19440 (source
19441 (origin
19442 (method git-fetch)
19443 (uri (git-reference
19444 (url "https://github.com/khinsen/ScientificPython")
19445 (commit (string-append "rel" version))))
19446 (file-name (git-file-name name version))
19447 (sha256
19448 (base32
19449 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
19450 (build-system python-build-system)
19451 (inputs
19452 `(("netcdf" ,netcdf)))
19453 (propagated-inputs
19454 `(("python-numpy" ,python2-numpy-1.8)
19455 ("python-pyro" ,python2-pyro)))
19456 (arguments
19457 ;; ScientificPython is not compatible with Python 3
19458 `(#:python ,python-2
19459 #:tests? #f ; No test suite
19460 #:phases
19461 (modify-phases %standard-phases
19462 (replace 'build
19463 (lambda* (#:key inputs #:allow-other-keys)
19464 (invoke "python" "setup.py" "build"
19465 (string-append "--netcdf_prefix="
19466 (assoc-ref inputs "netcdf"))))))))
19467 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
19468 (synopsis "Python modules for scientific computing")
19469 (description "ScientificPython is a collection of Python modules that are
19470 useful for scientific computing. Most modules are rather general (Geometry,
19471 physical units, automatic derivatives, ...) whereas others are more
19472 domain-specific (e.g. netCDF and PDB support). The library is currently
19473 not actively maintained and works only with Python 2 and NumPy < 1.9.")
19474 (license license:cecill-c)))
19475
19476 (define-public python2-mmtk
19477 (package
19478 (name "python2-mmtk")
19479 (version "2.7.12")
19480 (source
19481 (origin
19482 (method git-fetch)
19483 (uri (git-reference
19484 (url "https://github.com/khinsen/MMTK")
19485 (commit (string-append "rel" version))))
19486 (file-name (git-file-name name version))
19487 (sha256
19488 (base32
19489 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
19490 (build-system python-build-system)
19491 (native-inputs
19492 `(("netcdf" ,netcdf)))
19493 (propagated-inputs
19494 `(("python-scientific" ,python2-scientific)
19495 ("python-tkinter" ,python-2 "tk")))
19496 (arguments
19497 `(#:python ,python-2
19498 #:tests? #f
19499 #:phases
19500 (modify-phases %standard-phases
19501 (add-before 'build 'includes-from-scientific
19502 (lambda* (#:key inputs #:allow-other-keys)
19503 (mkdir-p "Include/Scientific")
19504 (copy-recursively
19505 (string-append
19506 (assoc-ref inputs "python-scientific")
19507 "/include/python2.7/Scientific")
19508 "Include/Scientific"))))))
19509 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
19510 (synopsis "Python library for molecular simulation")
19511 (description "MMTK is a library for molecular simulations with an emphasis
19512 on biomolecules. It provides widely used methods such as Molecular Dynamics
19513 and normal mode analysis, but also basic routines for implementing new methods
19514 for simulation and analysis. The library is currently not actively maintained
19515 and works only with Python 2 and NumPy < 1.9.")
19516 (license license:cecill-c)))
19517
19518 (define-public python-phonenumbers
19519 (package
19520 (name "python-phonenumbers")
19521 (version "8.9.1")
19522 (source
19523 (origin
19524 (method url-fetch)
19525 (uri (pypi-uri "phonenumbers" version))
19526 (sha256
19527 (base32
19528 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
19529 (build-system python-build-system)
19530 (home-page
19531 "https://github.com/daviddrysdale/python-phonenumbers")
19532 (synopsis
19533 "Python library for dealing with international phone numbers")
19534 (description
19535 "This package provides a Python port of Google's libphonenumber library.")
19536 (license license:asl2.0)))
19537
19538 (define-public python2-phonenumbers
19539 (package-with-python2 python-phonenumbers))
19540
19541 (define-public python-send2trash
19542 (package
19543 (name "python-send2trash")
19544 (version "1.5.0")
19545 (source
19546 (origin (method git-fetch)
19547 ;; Source tarball on PyPI doesn't include tests.
19548 (uri (git-reference
19549 (url "https://github.com/hsoft/send2trash")
19550 (commit version)))
19551 (file-name (git-file-name name version))
19552 (sha256
19553 (base32
19554 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
19555 (build-system python-build-system)
19556 (arguments
19557 '(#:phases
19558 (modify-phases %standard-phases
19559 (add-before 'check 'pre-check
19560 (lambda _
19561 (mkdir-p "/tmp/foo")
19562 (setenv "HOME" "/tmp/foo")
19563 #t)))))
19564 (home-page "https://github.com/hsoft/send2trash")
19565 (synopsis "Send files to the user's @file{~/Trash} directory")
19566 (description "This package provides a Python library to send files to the
19567 user's @file{~/Trash} directory.")
19568 (properties `((python2-variant . ,(delay python2-send2trash))))
19569 (license license:bsd-3)))
19570
19571 (define-public python2-send2trash
19572 (let ((base (package-with-python2
19573 (strip-python2-variant python-send2trash))))
19574 (package/inherit base
19575 (arguments
19576 (substitute-keyword-arguments (package-arguments python-send2trash)
19577 ((#:phases phases)
19578 `(modify-phases ,phases
19579 (add-before 'check 'setenv
19580 (lambda _
19581 (setenv "PYTHONPATH"
19582 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19583 #t)))))))))
19584
19585 (define-public python-pyfavicon
19586 (package
19587 (name "python-pyfavicon")
19588 (version "0.1.1")
19589 (source
19590 (origin
19591 (method url-fetch)
19592 (uri (pypi-uri "pyfavicon" version))
19593 (sha256
19594 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
19595 (build-system python-build-system)
19596 (arguments
19597 ;; There are no tests in the PyPI tarball and the tests from the
19598 ;; repository require online data.
19599 '(#:tests? #f))
19600 (propagated-inputs
19601 `(("python-aiohttp" ,python-aiohttp)
19602 ("python-beautifulsoup4" ,python-beautifulsoup4)
19603 ("python-pillow" ,python-pillow)))
19604 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
19605 (synopsis "Async favicon fetcher")
19606 (description
19607 "@code{pyfavicon} is an async favicon fetcher.")
19608 (license license:expat)))
19609
19610 (define-public python-yamllint
19611 (package
19612 (name "python-yamllint")
19613 (version "1.26.1")
19614 (source
19615 (origin
19616 (method url-fetch)
19617 (uri (pypi-uri "yamllint" version))
19618 (sha256
19619 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
19620 (build-system python-build-system)
19621 (propagated-inputs
19622 `(("python-pathspec" ,python-pathspec)
19623 ("python-pyyaml" ,python-pyyaml)
19624 ("python-setuptools" ,python-setuptools)))
19625 (home-page "https://github.com/adrienverge/yamllint")
19626 (synopsis "Linter for YAML files")
19627 (description
19628 "Yamllint is a linter for YAML files. yamllint does not only check for
19629 syntax validity, but for weirdnesses like key repetition and cosmetic problems
19630 such as lines length, trailing spaces, indentation, etc.")
19631 (license license:gpl3+)))
19632
19633 (define-public python-yapf
19634 (package
19635 (name "python-yapf")
19636 (version "0.29.0")
19637 (source
19638 (origin
19639 (method url-fetch)
19640 (uri (pypi-uri "yapf" version))
19641 (sha256
19642 (base32
19643 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
19644 (build-system python-build-system)
19645 (home-page "https://github.com/google/yapf")
19646 (synopsis "Formatter for Python code")
19647 (description "YAPF is a formatter for Python code. It's based off of
19648 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
19649 takes the code and reformats it to the best formatting that conforms to the
19650 style guide, even if the original code didn't violate the style guide.")
19651 (license license:asl2.0)))
19652
19653 (define-public python2-yapf
19654 (package-with-python2 python-yapf))
19655
19656 (define-public python-yq
19657 (package
19658 (name "python-yq")
19659 (version "2.11.1")
19660 (source
19661 (origin
19662 (method url-fetch)
19663 (uri (pypi-uri "yq" version))
19664 (sha256
19665 (base32
19666 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
19667 (build-system python-build-system)
19668 (arguments
19669 '(#:phases
19670 (modify-phases %standard-phases
19671 (add-after 'unpack 'patch
19672 (lambda* (#:key inputs #:allow-other-keys)
19673 (substitute* "yq/__init__.py"
19674 (("Popen\\(\\[\"jq")
19675 (string-append
19676 "Popen([\""
19677 (assoc-ref inputs "jq")
19678 "/bin/jq")))
19679 #t)))))
19680 (inputs
19681 `(("python-argcomplete" ,python-argcomplete)
19682 ("python-pyyaml" ,python-pyyaml)
19683 ("python-xmltodict" ,python-xmltodict)
19684 ("jq" ,jq)))
19685 (native-inputs
19686 `(("python-coverage" ,python-coverage)
19687 ("python-flake8" ,python-flake8)
19688 ("python-wheel" ,python-wheel)))
19689 (home-page "https://github.com/kislyuk/yq")
19690 (synopsis "Command-line YAML/XML processor")
19691 (description
19692 "This package provides @command{yq} and @command{xq} for processing YAML
19693 and XML respectively. The processing is done through @command{jq}, @command{jq}
19694 filters can be used to process the data as it passes through.")
19695 (license license:asl2.0)))
19696
19697 (define-public python-gyp
19698 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
19699 (revision "0"))
19700 (package
19701 (name "python-gyp")
19702 ;; Google does not release versions,
19703 ;; based on second most recent commit date.
19704 (version (git-version "0.0.0" revision commit))
19705 (source
19706 (origin
19707 ;; Google does not release tarballs,
19708 ;; git checkout is needed.
19709 (method git-fetch)
19710 (uri (git-reference
19711 (url "https://chromium.googlesource.com/external/gyp")
19712 (commit commit)))
19713 (file-name (git-file-name name version))
19714 (sha256
19715 (base32
19716 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
19717 (build-system python-build-system)
19718 (home-page "https://gyp.gsrc.io/")
19719 (synopsis "GYP is a Meta-Build system")
19720 (description
19721 "GYP builds build systems for large, cross platform applications.
19722 It can be used to generate XCode projects, Visual Studio projects, Ninja build
19723 files, and Makefiles.")
19724 (license license:bsd-3))))
19725
19726 (define-public python2-gyp
19727 (package-with-python2 python-gyp))
19728
19729 (define-public python-whatever
19730 (package
19731 (name "python-whatever")
19732 (version "0.6")
19733 (source
19734 (origin
19735 (method git-fetch)
19736 (uri (git-reference
19737 (url "https://github.com/Suor/whatever")
19738 (commit version)))
19739 (file-name (git-file-name name version))
19740 (sha256
19741 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
19742 (build-system python-build-system)
19743 (arguments
19744 `(#:phases
19745 (modify-phases %standard-phases
19746 (replace 'check
19747 (lambda _
19748 (invoke "py.test"))))))
19749 (native-inputs
19750 `(("python-pytest" ,python-pytest)))
19751 (home-page "https://github.com/Suor/whatever")
19752 (synopsis "Make anonymous functions by partial application of operators")
19753 (description "@code{whatever} provides an easy way to make anonymous
19754 functions by partial application of operators.")
19755 (license license:bsd-3)))
19756
19757 (define-public python2-whatever
19758 (package-with-python2 python-whatever))
19759
19760 (define-public python-funcy
19761 (package
19762 (name "python-funcy")
19763 (version "1.11")
19764 (source
19765 (origin
19766 (method git-fetch)
19767 (uri (git-reference
19768 (url "https://github.com/Suor/funcy")
19769 (commit version)))
19770 (sha256
19771 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
19772 (file-name (git-file-name name version))))
19773 (build-system python-build-system)
19774 (arguments
19775 `(#:phases
19776 (modify-phases %standard-phases
19777 (replace 'check
19778 (lambda _
19779 (invoke "py.test"))))))
19780 (native-inputs
19781 `(("python-pytest" ,python-pytest)
19782 ("python-whatever" ,python-whatever)))
19783 (home-page "https://github.com/Suor/funcy")
19784 (synopsis "Functional tools")
19785 (description "@code{funcy} is a library that provides functional tools.
19786 Examples are:
19787 @enumerate
19788 @item merge - Merges collections of the same type
19789 @item walk - Type-preserving map
19790 @item select - Selects a part of a collection
19791 @item take - Takes the first n items of a collection
19792 @item first - Takes the first item of a collection
19793 @item remove - Predicated-removes items of a collection
19794 @item concat - Concatenates two collections
19795 @item flatten - Flattens a collection with subcollections
19796 @item distinct - Returns only distinct items
19797 @item split - Predicated-splits a collection
19798 @item split_at - Splits a collection at a given item
19799 @item group_by - Groups items by group
19800 @item pairwise - Pairs off adjacent items
19801 @item partial - Partially-applies a function
19802 @item curry - Curries a function
19803 @item compose - Composes functions
19804 @item complement - Complements a predicate
19805 @item all_fn - \"all\" with predicate
19806 @end enumerate")
19807 (license license:bsd-3)))
19808
19809 (define-public python2-funcy
19810 (package-with-python2 python-funcy))
19811
19812 (define-public python-isoweek
19813 (package
19814 (name "python-isoweek")
19815 (version "1.3.3")
19816 (source
19817 (origin
19818 (method url-fetch)
19819 (uri (pypi-uri "isoweek" version))
19820 (sha256
19821 (base32
19822 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
19823 (build-system python-build-system)
19824 (home-page "https://github.com/gisle/isoweek")
19825 (synopsis "Objects representing a week")
19826 (description "The @code{isoweek} module provide the class Week that
19827 implements the week definition of ISO 8601. This standard also defines
19828 a notation for identifying weeks; yyyyWww (where the W is a literal).
19829 Week instances stringify to this form.")
19830 (license license:bsd-3)))
19831
19832 (define-public python2-isoweek
19833 (package-with-python2 python-isoweek))
19834
19835 (define-public python-pyzbar
19836 (package
19837 (name "python-pyzbar")
19838 (version "0.1.8")
19839 (source
19840 (origin
19841 ;; There's no source tarball on PyPI.
19842 (method git-fetch)
19843 (uri (git-reference
19844 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
19845 (commit (string-append "v" version))))
19846 (file-name (git-file-name name version))
19847 (sha256
19848 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
19849 (build-system python-build-system)
19850 (arguments
19851 `(#:phases
19852 (modify-phases %standard-phases
19853 (add-after 'unpack 'remove-failing-test
19854 (lambda _
19855 ;; This tests if find_library was called once, but we remove
19856 ;; the call in the stage below to make the library find libzbar.
19857 (delete-file "pyzbar/tests/test_zbar_library.py")
19858 #t))
19859 (add-before 'build 'set-library-file-name
19860 (lambda* (#:key inputs #:allow-other-keys)
19861 (let ((libzbar (assoc-ref inputs "zbar")))
19862 (substitute* "pyzbar/zbar_library.py"
19863 (("find_library\\('zbar'\\)")
19864 (string-append "'" libzbar "/lib/libzbar.so.0'")))
19865 #t))))))
19866 (native-inputs
19867 `(("pkg-config" ,pkg-config)
19868 ("python-numpy" ,python-numpy)
19869 ("python-pillow" ,python-pillow)))
19870 (inputs
19871 `(("zbar" ,zbar)))
19872 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
19873 (synopsis "Read one-dimensional barcodes and QR codes")
19874 (description
19875 "Read one-dimensional barcodes and QR codes using the zbar library.
19876
19877 Features:
19878
19879 @itemize
19880 @item Pure python
19881 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
19882 @item Decodes locations of barcodes
19883 @item No dependencies, other than the zbar library itself
19884 @end itemize")
19885 (license license:expat)))
19886
19887 (define-public python-tokenize-rt
19888 (package
19889 (name "python-tokenize-rt")
19890 (version "2.0.1")
19891 (source
19892 (origin
19893 (method url-fetch)
19894 (uri (pypi-uri "tokenize-rt" version))
19895 (sha256
19896 (base32
19897 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
19898 (build-system python-build-system)
19899 (home-page "https://github.com/asottile/tokenize-rt")
19900 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
19901 (description
19902 "This Python library is a wrapper around @code{tokenize} from the Python
19903 standard library. It provides two additional tokens @code{ESCAPED_NL} and
19904 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
19905 and @code{tokens_to_src} to roundtrip.")
19906 (license license:expat)))
19907
19908 (define-public python-future-fstrings
19909 (package
19910 (name "python-future-fstrings")
19911 (version "0.4.1")
19912 (source
19913 (origin
19914 (method url-fetch)
19915 (uri (pypi-uri "future_fstrings" version))
19916 (sha256
19917 (base32
19918 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
19919 (build-system python-build-system)
19920 (propagated-inputs
19921 `(("python-tokenize-rt" ,python-tokenize-rt)))
19922 (home-page "https://github.com/asottile/future-fstrings")
19923 (synopsis "Backport of fstrings to Python < 3.6")
19924 (description
19925 "This package provides a UTF-8 compatible encoding
19926 @code{future_fstrings}, which performs source manipulation. It decodes the
19927 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
19928 @code{f} strings.")
19929 (license license:expat)))
19930
19931 (define-public python-typed-ast
19932 (package
19933 (name "python-typed-ast")
19934 (version "1.4.0")
19935 (source
19936 (origin
19937 (method git-fetch)
19938 (uri (git-reference
19939 (url "https://github.com/python/typed_ast")
19940 (commit version)))
19941 (sha256
19942 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
19943 (file-name (git-file-name name version))))
19944 (build-system python-build-system)
19945 (arguments
19946 `(#:modules ((guix build utils)
19947 (guix build python-build-system)
19948 (ice-9 ftw)
19949 (srfi srfi-1)
19950 (srfi srfi-26))
19951 #:phases
19952 (modify-phases %standard-phases
19953 (replace 'check
19954 (lambda _
19955 (let ((cwd (getcwd)))
19956 (setenv "PYTHONPATH"
19957 (string-append cwd "/build/"
19958 (find (cut string-prefix? "lib" <>)
19959 (scandir (string-append cwd "/build")))
19960 ":"
19961 (getenv "PYTHONPATH"))))
19962 (invoke "pytest")
19963 #t)))))
19964 (native-inputs `(("python-pytest" ,python-pytest)))
19965 (home-page "https://github.com/python/typed_ast")
19966 (synopsis "Fork of Python @code{ast} modules with type comment support")
19967 (description "This package provides a parser similar to the standard
19968 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
19969 include PEP 484 type comments and are independent of the version of Python
19970 under which they are run. The @code{typed_ast} parsers produce the standard
19971 Python AST (plus type comments), and are both fast and correct, as they are
19972 based on the CPython 2.7 and 3.7 parsers.")
19973 ;; See the file "LICENSE" for the details.
19974 (license (list license:psfl
19975 license:asl2.0
19976 license:expat)))) ;ast27/Parser/spark.py
19977
19978 (define-public python-typer
19979 (package
19980 (name "python-typer")
19981 (version "0.3.2")
19982 (source
19983 (origin
19984 ;; Building `python-typer` from the git repository requires the `flit-core`
19985 ;; Python package that is not installed by `python-flit`.
19986 (method url-fetch)
19987 (uri (pypi-uri "typer" version))
19988 (sha256
19989 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
19990 (build-system python-build-system)
19991 (arguments
19992 `(#:phases
19993 (modify-phases %standard-phases
19994 (add-before 'check 'disable-failing-tests
19995 (lambda _
19996 (substitute* "tests/test_completion/test_completion.py"
19997 (("def test_show_completion")
19998 "def _test_show_completion")
19999 (("def test_install_completion")
20000 "def _test_install_completion"))
20001 (substitute* "tests/test_completion/test_completion_install.py"
20002 (("def test_completion_install_bash")
20003 "def _test_completion_install_bash")
20004 (("def test_completion_install_zsh")
20005 "def _test_completion_install_zsh")
20006 (("def test_completion_install_fish")
20007 "def _test_completion_install_fish")
20008 (("def test_completion_install_powershell")
20009 "def _test_completion_install_powershell"))
20010 #t))
20011 (replace 'check
20012 (lambda _
20013 (setenv "PYTHONPATH"
20014 (string-append (getcwd) ":"
20015 (getenv "PYTHONPATH")))
20016 (invoke "python" "-m" "pytest" "tests/")
20017 #t)))))
20018 (propagated-inputs
20019 `(("python-click" ,python-click)))
20020 (native-inputs
20021 `(("python-coverage" ,python-coverage)
20022 ("python-pytest" ,python-pytest)
20023 ("python-shellingham" ,python-shellingham)))
20024 (home-page "https://github.com/tiangolo/typer")
20025 (synopsis
20026 "Typer builds CLI based on Python type hints")
20027 (description
20028 "Typer is a library for building CLI applications. It's based on
20029 Python 3.6+ type hints.")
20030 ;; MIT license
20031 (license license:expat)))
20032
20033 (define-public python-typing
20034 (package
20035 (name "python-typing")
20036 (version "3.7.4.3")
20037 (source
20038 (origin
20039 (method url-fetch)
20040 (uri (pypi-uri "typing" version))
20041 (sha256
20042 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
20043 (build-system python-build-system)
20044 (home-page "https://docs.python.org/3/library/typing.html")
20045 (synopsis "Type hints for Python")
20046 (description "This is a backport of the standard library @code{typing}
20047 module to Python versions older than 3.5. Typing defines a standard notation
20048 for Python function and variable type annotations. The notation can be used
20049 for documenting code in a concise, standard format, and it has been designed
20050 to also be used by static and runtime type checkers, static analyzers, IDEs
20051 and other tools.")
20052 (license license:psfl)))
20053
20054 (define-public python2-typing
20055 (package-with-python2 python-typing))
20056
20057 (define-public python-typing-extensions
20058 (package
20059 (name "python-typing-extensions")
20060 (version "3.7.4.3")
20061 (source
20062 (origin
20063 (method url-fetch)
20064 (uri (pypi-uri "typing_extensions" version))
20065 (sha256
20066 (base32
20067 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20068 (build-system python-build-system)
20069 (home-page
20070 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20071 (synopsis "Experimental type hints for Python")
20072 (description
20073 "The typing_extensions module contains additional @code{typing} hints not
20074 yet present in the of the @code{typing} standard library.
20075 Included are implementations of:
20076 @enumerate
20077 @item ClassVar
20078 @item ContextManager
20079 @item Counter
20080 @item DefaultDict
20081 @item Deque
20082 @item NewType
20083 @item NoReturn
20084 @item overload
20085 @item Protocol
20086 @item runtime
20087 @item Text
20088 @item Type
20089 @item TYPE_CHECKING
20090 @item AsyncGenerator
20091 @end enumerate\n")
20092 (license license:psfl)))
20093
20094 (define-public bpython
20095 (package
20096 (name "bpython")
20097 (version "0.20.1")
20098 (source
20099 (origin
20100 (method url-fetch)
20101 (uri (pypi-uri "bpython" version))
20102 (sha256
20103 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
20104 (build-system python-build-system)
20105 (arguments
20106 `(#:phases
20107 (modify-phases %standard-phases
20108 (add-after 'unpack 'remove-failing-test
20109 (lambda _
20110 ;; Remove failing test. FIXME: make it pass
20111 (delete-file "bpython/test/test_args.py")
20112 #t))
20113 (add-after 'wrap 'add-aliases
20114 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20115 (lambda* (#:key outputs #:allow-other-keys)
20116 (let ((out (assoc-ref outputs "out")))
20117 (for-each
20118 (lambda (old new)
20119 (symlink old (string-append out "/bin/" new)))
20120 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20121 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20122 #t)))))
20123 (propagated-inputs
20124 `(("python-pygments" ,python-pygments)
20125 ("python-requests" ,python-requests)
20126 ("python-curtsies" ,python-curtsies)
20127 ("python-greenlet" ,python-greenlet)
20128 ("python-six" ,python-six)
20129 ("python-wcwidth" ,python-wcwidth)
20130 ;; optional dependencies
20131 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20132 ("python-watchdog" ,python-watchdog)
20133 ("python-jedi" ,python-jedi)))
20134 (native-inputs
20135 `(("python-sphinx" ,python-sphinx)
20136 ("python-mock" ,python-mock)))
20137 (home-page "https://bpython-interpreter.org/")
20138 (synopsis "Fancy interface to the Python interpreter")
20139 (description "Bpython is a fancy interface to the Python
20140 interpreter. bpython's main features are
20141
20142 @enumerate
20143 @item in-line syntax highlighting,
20144 @item readline-like autocomplete with suggestions displayed as you type,
20145 @item expected parameter list for any Python function,
20146 @item \"rewind\" function to pop the last line of code from memory and
20147 re-evaluate,
20148 @item send the code you've entered off to a pastebin,
20149 @item save the code you've entered to a file, and
20150 @item auto-indentation.
20151 @end enumerate")
20152 (license license:expat)))
20153
20154 (define-public python-pyinotify
20155 (package
20156 (name "python-pyinotify")
20157 (version "0.9.6")
20158 (source (origin
20159 (method url-fetch)
20160 (uri (pypi-uri "pyinotify" version))
20161 (sha256
20162 (base32
20163 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20164 (build-system python-build-system)
20165 (arguments `(#:tests? #f)) ;no tests
20166 (home-page "https://github.com/seb-m/pyinotify")
20167 (synopsis "Python library for monitoring inotify events")
20168 (description
20169 "@code{pyinotify} provides a Python interface for monitoring
20170 file system events on Linux.")
20171 (license license:expat)))
20172
20173 (define-public python2-pyinotify
20174 (package-with-python2 python-pyinotify))
20175
20176 ;; Ada parser uses this version.
20177 (define-public python2-quex-0.67.3
20178 (package
20179 (name "python2-quex")
20180 (version "0.67.3")
20181 (source
20182 (origin
20183 (method url-fetch)
20184 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20185 (version-major+minor version)
20186 "/quex-" version ".zip"))
20187 (sha256
20188 (base32
20189 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20190 (build-system python-build-system)
20191 (native-inputs
20192 `(("unzip" ,unzip)))
20193 (arguments
20194 `(#:python ,python-2
20195 #:tests? #f
20196 #:phases
20197 (modify-phases %standard-phases
20198 (delete 'configure)
20199 (delete 'build)
20200 (replace 'install
20201 (lambda* (#:key outputs #:allow-other-keys)
20202 (let* ((out (assoc-ref outputs "out"))
20203 (share/quex (string-append out "/share/quex"))
20204 (bin (string-append out "/bin")))
20205 (copy-recursively "." share/quex)
20206 (mkdir-p bin)
20207 (symlink (string-append share/quex "/quex-exe.py")
20208 (string-append bin "/quex"))
20209 #t))))))
20210 (native-search-paths
20211 (list (search-path-specification
20212 (variable "QUEX_PATH")
20213 (files '("share/quex")))))
20214 (home-page "http://quex.sourceforge.net/")
20215 (synopsis "Lexical analyzer generator in Python")
20216 (description "@code{quex} is a lexical analyzer generator in Python.")
20217 (license license:lgpl2.1+))) ; Non-military
20218
20219 (define-public python2-quex
20220 (package (inherit python2-quex-0.67.3)
20221 (name "python2-quex")
20222 (version "0.68.1")
20223 (source
20224 (origin
20225 (method url-fetch)
20226 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20227 (sha256
20228 (base32
20229 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20230 (file-name (string-append name "-" version ".tar.gz"))))))
20231
20232 (define-public python-more-itertools
20233 (package
20234 (name "python-more-itertools")
20235 (version "8.2.0")
20236 (source
20237 (origin
20238 (method url-fetch)
20239 (uri (pypi-uri "more-itertools" version))
20240 (sha256
20241 (base32
20242 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
20243 (build-system python-build-system)
20244 (home-page "https://github.com/erikrose/more-itertools")
20245 (synopsis "More routines for operating on iterables, beyond itertools")
20246 (description "Python's built-in @code{itertools} module implements a
20247 number of iterator building blocks inspired by constructs from APL, Haskell,
20248 and SML. @code{more-itertools} includes additional building blocks for
20249 working with iterables.")
20250 (properties `((python2-variant . ,(delay python2-more-itertools))))
20251 (license license:expat)))
20252
20253 ;; The 5.x series are the last versions supporting Python 2.7.
20254 (define-public python2-more-itertools
20255 (package
20256 (inherit python-more-itertools)
20257 (name "python2-more-itertools")
20258 (version "5.0.0")
20259 (source (origin
20260 (method url-fetch)
20261 (uri (pypi-uri "more-itertools" version))
20262 (sha256
20263 (base32
20264 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
20265 (arguments
20266 `(#:python ,python-2))
20267 (propagated-inputs
20268 `(("python2-six" ,python2-six-bootstrap)))))
20269
20270 (define-public python-latexcodec
20271 (package
20272 (name "python-latexcodec")
20273 (version "1.0.7")
20274 (source
20275 (origin
20276 (method url-fetch)
20277 (uri (pypi-uri "latexcodec" version))
20278 (sha256
20279 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
20280 (build-system python-build-system)
20281 (inputs
20282 `(("python-six" ,python-six)))
20283 (home-page "https://readthedocs.org/projects/latexcodec/")
20284 (synopsis "Work with LaTeX code in Python")
20285 (description "Lexer and codec to work with LaTeX code in Python.")
20286 (license license:expat)))
20287
20288 (define-public python-pybtex
20289 (package
20290 (name "python-pybtex")
20291 (version "0.22.2")
20292 (source
20293 (origin
20294 (method url-fetch)
20295 (uri (pypi-uri "pybtex" version))
20296 (sha256
20297 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
20298 (build-system python-build-system)
20299 (native-inputs
20300 `(("python-nose" ,python-nose)))
20301 (inputs
20302 `(("python-latexcodec" ,python-latexcodec)
20303 ("python-pyyaml" ,python-pyyaml)
20304 ("python-six" ,python-six)))
20305 (arguments
20306 `(#:test-target "nosetests"))
20307 (home-page "https://pybtex.org/")
20308 (synopsis "BibTeX-compatible bibliography processor")
20309 (description "Pybtex is a BibTeX-compatible bibliography processor written
20310 in Python. You can simply type pybtex instead of bibtex.")
20311 (license license:expat)))
20312
20313 (define-public python-onetimepass
20314 (package
20315 (name "python-onetimepass")
20316 (version "1.0.1")
20317 (source
20318 (origin
20319 (method url-fetch)
20320 (uri (pypi-uri "onetimepass" version))
20321 (sha256
20322 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
20323 (build-system python-build-system)
20324 (propagated-inputs `(("python-six" ,python-six)))
20325 (home-page "https://github.com/tadeck/onetimepass/")
20326 (synopsis "One-time password library")
20327 (description "Python one-time password library for HMAC-based (HOTP) and
20328 time-based (TOTP) passwords.")
20329 (license license:expat)))
20330
20331 (define-public python-parso
20332 (package
20333 (name "python-parso")
20334 (version "0.7.1")
20335 (source
20336 (origin
20337 (method url-fetch)
20338 (uri (pypi-uri "parso" version))
20339 (sha256
20340 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
20341 (native-inputs
20342 `(("python-pytest" ,python-pytest)))
20343 (build-system python-build-system)
20344 (arguments
20345 `(#:phases (modify-phases %standard-phases
20346 (replace 'check
20347 (lambda _ (invoke "pytest" "-vv"))))))
20348 (home-page "https://github.com/davidhalter/parso")
20349 (synopsis "Python Parser")
20350 (description "Parso is a Python parser that supports error recovery and
20351 round-trip parsing for different Python versions (in multiple Python versions).
20352 Parso is also able to list multiple syntax errors in your Python file.")
20353 (license license:expat)))
20354
20355 (define-public python2-parso
20356 (package-with-python2 python-parso))
20357
20358 (define-public python-async-generator
20359 (package
20360 (name "python-async-generator")
20361 (version "1.10")
20362 (source
20363 (origin
20364 (method url-fetch)
20365 (uri (pypi-uri "async_generator" version))
20366 (sha256
20367 (base32
20368 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
20369 (build-system python-build-system)
20370 (native-inputs
20371 `(("python-pytest" ,python-pytest)))
20372 (home-page "https://github.com/python-trio/async_generator")
20373 (synopsis "Async generators and context managers for Python 3.5+")
20374 (description "@code{async_generator} back-ports Python 3.6's native async
20375 generators and Python 3.7's context managers into Python 3.5.")
20376 ;; Dual licensed.
20377 (license (list license:expat license:asl2.0))))
20378
20379 (define-public python-async-timeout
20380 (package
20381 (name "python-async-timeout")
20382 (version "3.0.1")
20383 (source
20384 (origin
20385 (method url-fetch)
20386 (uri (pypi-uri "async-timeout" version))
20387 (sha256
20388 (base32
20389 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
20390 (build-system python-build-system)
20391 (home-page "https://github.com/aio-libs/async_timeout/")
20392 (synopsis "Timeout context manager for asyncio programs")
20393 (description "@code{async-timeout} provides a timeout timeout context
20394 manager compatible with @code{asyncio}.")
20395 (license license:asl2.0)))
20396
20397 (define-public python-glob2
20398 (package
20399 (name "python-glob2")
20400 (version "0.7")
20401 (source
20402 (origin
20403 (method git-fetch)
20404 (uri (git-reference
20405 (url "https://github.com/miracle2k/python-glob2")
20406 (commit (string-append "v" version))))
20407 (file-name (git-file-name name version))
20408 (sha256
20409 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
20410 (build-system python-build-system)
20411 (home-page "https://github.com/miracle2k/python-glob2/")
20412 (synopsis "Extended Version of the python buildin glob module")
20413 (description "This is an extended version of the Python
20414 @url{http://docs.python.org/library/glob.html, built-in glob module} which
20415 adds:
20416
20417 @itemize
20418 @item The ability to capture the text matched by glob patterns, and return
20419 those matches alongside the file names.
20420 @item A recursive @code{**} globbing syntax, akin for example to the
20421 @code{globstar} option of Bash.
20422 @item The ability to replace the file system functions used, in order to glob
20423 on virtual file systems.
20424 @item Compatible with Python 2 and Python 3 (tested with 3.3).
20425 @end itemize
20426
20427 Glob2 currently based on the glob code from Python 3.3.1.")
20428 (license license:bsd-2)))
20429
20430 (define-public python2-glob2
20431 (package-with-python2 python-glob2))
20432
20433 (define-public python-gipc
20434 (package
20435 (name "python-gipc")
20436 (version "0.6.0")
20437 (source
20438 (origin
20439 (method url-fetch)
20440 (uri (pypi-uri "gipc" version ".zip"))
20441 (sha256
20442 (base32
20443 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
20444 (build-system python-build-system)
20445 (native-inputs
20446 `(("unzip" ,unzip)))
20447 (propagated-inputs
20448 `(("python-gevent" ,python-gevent)))
20449 (home-page "https://gehrcke.de/gipc/")
20450 (synopsis "Child process management in the context of gevent")
20451 (description "Usage of Python's multiprocessing package in a
20452 gevent-powered application may raise problems. With @code{gipc},
20453 process-based child processes can safely be created anywhere within a
20454 gevent-powered application.")
20455 (license license:expat)))
20456
20457 (define-public python-beautifultable
20458 (package
20459 (name "python-beautifultable")
20460 (version "1.0.0")
20461 (source
20462 (origin
20463 (method url-fetch)
20464 (uri (pypi-uri "beautifultable" version))
20465 (sha256
20466 (base32
20467 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
20468 (build-system python-build-system)
20469 (propagated-inputs
20470 `(("python-wcwidth" ,python-wcwidth)))
20471 (arguments
20472 `(#:phases
20473 (modify-phases %standard-phases
20474 (add-after 'unpack 'patch-setup.py
20475 (lambda _
20476 (substitute* "setup.py"
20477 (("setup\\(")
20478 "setup(\n test_suite=\"test\",")))))))
20479 (home-page "https://github.com/pri22296/beautifultable")
20480 (synopsis "Print ASCII tables for terminals")
20481 (description "@code{python-beautifultable} provides a class for easily
20482 printing tabular data in a visually appealing ASCII format to a terminal.
20483
20484 Features include, but are not limited to:
20485 @itemize
20486 @item Full customization of the look and feel of the table
20487 @item Row and column accessors.
20488 @item Full support for colors using ANSI sequences or any library.
20489 @item Plenty of predefined styles and option to create custom ones.
20490 @item Support for Unicode characters.
20491 @item Supports streaming table when data is slow to retrieve.
20492 @end itemize")
20493 (license license:expat)))
20494
20495 (define-public python-globber
20496 (package
20497 (name "python-globber")
20498 (version "0.2.1")
20499 (source
20500 (origin
20501 (method git-fetch)
20502 (uri (git-reference
20503 (url "https://github.com/asharov/globber")
20504 (commit version)))
20505 (file-name (git-file-name name version))
20506 (sha256
20507 (base32
20508 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
20509 (build-system python-build-system)
20510 (home-page "https://github.com/asharov/globber")
20511 (synopsis "Library for string matching with glob patterns")
20512 (description
20513 "Globber is a Python library for matching file names against glob patterns.
20514 In contrast to other glob-matching libraries, it matches arbitrary strings and
20515 doesn't require the matched names to be existing files. In addition, it
20516 supports the globstar @code{**} operator to match an arbitrary number of
20517 path components.")
20518 (license license:asl2.0)))
20519
20520 (define-public python-git-hammer
20521 (package
20522 (name "python-git-hammer")
20523 (version "0.3.1")
20524 (source
20525 (origin
20526 (method git-fetch)
20527 (uri (git-reference
20528 (url "https://github.com/asharov/git-hammer")
20529 (commit version)))
20530 (file-name (git-file-name name version))
20531 (sha256
20532 (base32
20533 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
20534 (build-system python-build-system)
20535 (arguments
20536 `(#:phases
20537 (modify-phases %standard-phases
20538 (add-after 'unpack 'patch-setup.py
20539 (lambda _
20540 (substitute* "setup.py"
20541 (("setup\\(")
20542 "setup(\n test_suite=\"test\",")))))))
20543 (propagated-inputs
20544 `(("python-beautifultable" ,python-beautifultable)
20545 ("python-dateutil" ,python-dateutil)
20546 ("python-gitpython" ,python-gitpython)
20547 ("python-globber" ,python-globber)
20548 ("python-matplotlib" ,python-matplotlib)
20549 ("python-sqlalchemy" ,python-sqlalchemy)
20550 ("python-sqlalchemy-utils"
20551 ,python-sqlalchemy-utils)))
20552 (home-page "https://github.com/asharov/git-hammer")
20553 (synopsis "Provide statistics for git repositories")
20554 (description
20555 "Git Hammer is a statistics tool for projects in git repositories.
20556 Its major feature is tracking the number of lines authored by each person for every
20557 commit, but it also includes some other useful statistics.")
20558 (license license:asl2.0)))
20559
20560 (define-public python-fusepy
20561 (package
20562 (name "python-fusepy")
20563 (version "2.0.4")
20564 (source
20565 (origin
20566 (method url-fetch)
20567 (uri (pypi-uri "fusepy" version))
20568 (sha256
20569 (base32
20570 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
20571 (build-system python-build-system)
20572 (arguments
20573 `(#:phases
20574 (modify-phases %standard-phases
20575 (add-before 'build 'set-library-file-name
20576 (lambda* (#:key inputs #:allow-other-keys)
20577 (let ((fuse (assoc-ref inputs "fuse")))
20578 (substitute* "fuse.py"
20579 (("find_library\\('fuse'\\)")
20580 (string-append "'" fuse "/lib/libfuse.so'")))
20581 #t))))))
20582 (propagated-inputs
20583 `(("fuse" ,fuse)))
20584 (home-page "https://github.com/fusepy/fusepy")
20585 (synopsis "Simple ctypes bindings for FUSE")
20586 (description "Python module that provides a simple interface to FUSE and
20587 MacFUSE. The binding is created using the standard @code{ctypes} library.")
20588 (license license:isc)))
20589
20590 (define-public python2-fusepy
20591 (package-with-python2 python-fusepy))
20592
20593 (define-public python-fusepyng
20594 (package
20595 (name "python-fusepyng")
20596 (version "1.0.7")
20597 (source
20598 (origin
20599 (method url-fetch)
20600 (uri (pypi-uri "fusepyng" version))
20601 (sha256
20602 (base32
20603 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
20604 (build-system python-build-system)
20605 (arguments
20606 '(#:phases
20607 (modify-phases %standard-phases
20608 (add-after 'unpack 'set-libfuse-path
20609 (lambda* (#:key inputs #:allow-other-keys)
20610 (let ((fuse (assoc-ref inputs "fuse")))
20611 (substitute* "fusepyng.py"
20612 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
20613 (string-append "\"" fuse "/lib/libfuse.so\""))))
20614 #t)))))
20615 (inputs
20616 `(("fuse" ,fuse)))
20617 (propagated-inputs
20618 `(("python-paramiko" ,python-paramiko)))
20619 (home-page "https://github.com/rianhunter/fusepyng")
20620 (synopsis "Simple ctypes bindings for FUSE")
20621 (description "@code{fusepyng} is a Python module that provides a simple
20622 interface to FUSE on various operating systems. It's just one file and is
20623 implemented using @code{ctypes}.")
20624 (license license:isc)))
20625
20626 (define-public python-userspacefs
20627 (package
20628 (name "python-userspacefs")
20629 (version "2.0.3")
20630 (source
20631 (origin
20632 (method url-fetch)
20633 (uri (pypi-uri "userspacefs" version))
20634 (sha256
20635 (base32
20636 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
20637 (build-system python-build-system)
20638 (propagated-inputs
20639 `(("python-fusepyng" ,python-fusepyng)))
20640 (home-page "https://github.com/rianhunter/userspacefs")
20641 (synopsis "User-space file systems for Python")
20642 (description
20643 "@code{userspacefs} is a library that allows you to easily write
20644 user-space file systems in Python.")
20645 (license license:gpl3+)))
20646
20647 (define-public python-stone
20648 (package
20649 (name "python-stone")
20650 (version "3.2.1")
20651 (source
20652 (origin
20653 (method url-fetch)
20654 (uri (pypi-uri "stone" version))
20655 (sha256
20656 (base32
20657 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
20658 (build-system python-build-system)
20659 (arguments
20660 `(#:phases
20661 (modify-phases %standard-phases
20662 (add-after 'unpack 'change-version-requirements
20663 (lambda _
20664 ;; Match the requirement in test/requirements.txt
20665 (substitute* "setup.py"
20666 (("pytest < 5") "pytest < 7"))
20667 ;; We don't care about a coverage report.
20668 (substitute* "test/requirements.txt"
20669 (("coverage.*") "coverage\n"))
20670 #t))
20671 (replace 'check
20672 (lambda* (#:key tests? #:allow-other-keys)
20673 (when tests?
20674 ;; These tests don't import currectly.
20675 (delete-file "test/test_js_client.py")
20676 (delete-file "test/test_tsd_types.py")
20677 (delete-file "test/test_python_gen.py")
20678 (setenv "PYTHONPATH"
20679 (string-append (getcwd) ":"
20680 (getenv "PYTHONPATH")))
20681 (invoke "pytest"))
20682 #t)))))
20683 (propagated-inputs
20684 `(("python-ply" ,python-ply)
20685 ("python-six" ,python-six)))
20686 (native-inputs
20687 `(("python-coverage" ,python-coverage)
20688 ("python-mock" ,python-mock)
20689 ("python-pytest" ,python-pytest)
20690 ("python-pytest-runner" ,python-pytest-runner)))
20691 (home-page "https://github.com/dropbox/stone")
20692 (synopsis "Official Api Spec Language for Dropbox")
20693 (description
20694 "Stone is an interface description language (IDL) for APIs.")
20695 (license license:expat)))
20696
20697 (define-public pybind11
20698 (package
20699 (name "pybind11")
20700 (version "2.6.2")
20701 (source (origin
20702 (method git-fetch)
20703 (uri (git-reference
20704 (url "https://github.com/pybind/pybind11")
20705 (commit (string-append "v" version))))
20706 (sha256
20707 (base32
20708 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
20709 (file-name (git-file-name name version))))
20710 (build-system cmake-build-system)
20711 (native-inputs
20712 `(("python" ,python-wrapper)
20713
20714 ;; The following dependencies are used for tests.
20715 ("python-pytest" ,python-pytest)
20716 ("catch" ,catch-framework2-1)
20717 ("eigen" ,eigen)))
20718 (arguments
20719 `(#:configure-flags
20720 (list (string-append "-DCATCH_INCLUDE_DIR="
20721 (assoc-ref %build-inputs "catch")
20722 "/include/catch"))
20723
20724 #:phases (modify-phases %standard-phases
20725 (add-after 'install 'install-python
20726 (lambda* (#:key outputs #:allow-other-keys)
20727 (let ((out (assoc-ref outputs "out")))
20728 (with-directory-excursion "../source"
20729 (setenv "PYBIND11_USE_CMAKE" "yes")
20730 (invoke "python" "setup.py" "install"
20731 "--single-version-externally-managed"
20732 "--root=/"
20733 (string-append "--prefix=" out)))))))
20734
20735 #:test-target "check"))
20736 (home-page "https://github.com/pybind/pybind11/")
20737 (synopsis "Seamless operability between C++11 and Python")
20738 (description
20739 "@code{pybind11} is a lightweight header-only library that exposes C++
20740 types in Python and vice versa, mainly to create Python bindings of existing
20741 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
20742 library: to minimize boilerplate code in traditional extension modules by
20743 inferring type information using compile-time introspection.")
20744 (license license:bsd-3)))
20745
20746 (define-public python-pooch
20747 (package
20748 (name "python-pooch")
20749 (version "1.3.0")
20750 (source
20751 (origin
20752 (method url-fetch)
20753 (uri (pypi-uri "pooch" version))
20754 (sha256
20755 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
20756 (build-system python-build-system)
20757 (arguments
20758 `(#:tests? #f)) ;requires online data
20759 (propagated-inputs
20760 `(("python-appdirs" ,python-appdirs)
20761 ("python-packaging" ,python-packaging)
20762 ("python-requests" ,python-requests)))
20763 (home-page "https://github.com/fatiando/pooch")
20764 (synopsis "Manage your Python library's sample data files")
20765 (description
20766 "Pooch manages your Python library's sample data files: it automatically
20767 downloads and stores them in a local directory, with support for versioning
20768 and corruption checks.")
20769 (license license:bsd-3)))
20770
20771 (define-public python-fasteners
20772 (package
20773 (name "python-fasteners")
20774 (version "0.15")
20775 (source
20776 (origin
20777 (method url-fetch)
20778 (uri (pypi-uri "fasteners" version))
20779 (sha256
20780 (base32
20781 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
20782 (build-system python-build-system)
20783 (propagated-inputs
20784 `(("python-monotonic" ,python-monotonic)
20785 ("python-six" ,python-six)))
20786 (native-inputs
20787 `(("python-testtools" ,python-testtools)))
20788 (home-page "https://github.com/harlowja/fasteners")
20789 (synopsis "Python package that provides useful locks")
20790 (description
20791 "This package provides a Python program that provides following locks:
20792
20793 @itemize
20794 @item Locking decorator
20795 @item Reader-writer locks
20796 @item Inter-process locks
20797 @item Generic helpers
20798 @end itemize\n")
20799 (license license:asl2.0)))
20800
20801 (define-public python-requests-file
20802 (package
20803 (name "python-requests-file")
20804 (version "1.4.3")
20805 (source
20806 (origin
20807 (method url-fetch)
20808 (uri (pypi-uri "requests-file" version))
20809 (sha256
20810 (base32
20811 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
20812 (build-system python-build-system)
20813 (propagated-inputs
20814 `(("python-requests" ,python-requests)
20815 ("python-six" ,python-six)))
20816 (home-page
20817 "https://github.com/dashea/requests-file")
20818 (synopsis "File transport adapter for Requests")
20819 (description
20820 "Requests-File is a transport adapter for use with the Requests Python
20821 library to allow local file system access via @code{file://} URLs.")
20822 (license license:asl2.0)))
20823
20824 (define-public python2-requests-file
20825 (package-with-python2 python-requests-file))
20826
20827 (define-public python-identify
20828 (package
20829 (name "python-identify")
20830 (version "1.4.25")
20831 (source
20832 (origin
20833 ;; There are no tests in the PyPI tarball.
20834 (method git-fetch)
20835 (uri (git-reference
20836 (url "https://github.com/chriskuehl/identify")
20837 (commit (string-append "v" version))))
20838 (file-name (git-file-name name version))
20839 (sha256
20840 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
20841 (build-system python-build-system)
20842 (arguments
20843 `(#:phases
20844 (modify-phases %standard-phases
20845 (replace 'check
20846 (lambda _
20847 (invoke "pytest" "-vv"))))))
20848 (native-inputs
20849 `(("python-coverage" ,python-coverage)
20850 ("python-pytest" ,python-pytest)))
20851 (propagated-inputs
20852 `(("python-editdistance" ,python-editdistance)))
20853 (home-page "https://github.com/chriskuehl/identify")
20854 (synopsis "File identification library for Python")
20855 (description
20856 "@code{identify} is a file identification library for Python. Given
20857 a file (or some information about a file), return a set of standardized tags
20858 identifying what the file is.")
20859 (license license:expat)))
20860
20861 (define-public python-tldextract
20862 (package
20863 (name "python-tldextract")
20864 (version "2.2.0")
20865 (source
20866 (origin
20867 (method url-fetch)
20868 (uri (pypi-uri "tldextract" version))
20869 (sha256
20870 (base32
20871 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
20872 (build-system python-build-system)
20873 (native-inputs
20874 `(("python-pytest" ,python-pytest)
20875 ("python-responses" ,python-responses)))
20876 (propagated-inputs
20877 `(("python-idna" ,python-idna)
20878 ("python-requests" ,python-requests)
20879 ("python-requests-file" ,python-requests-file)))
20880 (home-page
20881 "https://github.com/john-kurkowski/tldextract")
20882 (synopsis
20883 "Separate the TLD from the registered domain and subdomains of a URL")
20884 (description
20885 "TLDExtract accurately separates the TLD from the registered domain and
20886 subdomains of a URL, using the Public Suffix List. By default, this includes
20887 the public ICANN TLDs and their exceptions. It can optionally support the
20888 Public Suffix List's private domains as well.")
20889 (license license:bsd-3)))
20890
20891 (define-public python2-tldextract
20892 (package-with-python2 python-tldextract))
20893
20894 (define-public python-nodeenv
20895 (package
20896 (name "python-nodeenv")
20897 (version "1.4.0")
20898 (source
20899 (origin
20900 ;; There's no tarball in PyPI.
20901 (method git-fetch)
20902 (uri (git-reference
20903 (url "https://github.com/ekalinin/nodeenv")
20904 (commit version)))
20905 (file-name (git-file-name name version))
20906 (sha256
20907 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
20908 (build-system python-build-system)
20909 (arguments
20910 `(#:phases
20911 (modify-phases %standard-phases
20912 (replace 'check
20913 (lambda _
20914 ;; This test fails. It tries to open a network socket.
20915 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
20916 (native-inputs
20917 `(("python-coverage" ,python-coverage)
20918 ("python-mock" ,python-mock)
20919 ("python-pytest" ,python-pytest)))
20920 (home-page "https://ekalinin.github.io/nodeenv/")
20921 (synopsis "Create isolated node.js environments")
20922 (description
20923 "Nodeenv (node.js virtual environment) is a tool to create isolated
20924 node.js environments. It creates an environment that has its own installation
20925 directories, that doesn't share libraries with other node.js virtual
20926 environments.")
20927 (license license:bsd-3)))
20928
20929 (define-public python-pynamecheap
20930 (package
20931 (name "python-pynamecheap")
20932 (version "0.0.3")
20933 (source
20934 (origin
20935 (method url-fetch)
20936 (uri (pypi-uri "PyNamecheap" version))
20937 (sha256
20938 (base32
20939 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
20940 (build-system python-build-system)
20941 (propagated-inputs
20942 `(("python-requests" ,python-requests)))
20943 (home-page
20944 "https://github.com/Bemmu/PyNamecheap")
20945 (synopsis
20946 "Namecheap API client in Python")
20947 (description
20948 "PyNamecheap is a Namecheap API client in Python.")
20949 (license license:expat)))
20950
20951 (define-public python2-pynamecheap
20952 (package-with-python2 python-pynamecheap))
20953
20954 (define-public python-dns-lexicon
20955 (package
20956 (name "python-dns-lexicon")
20957 (version "2.4.0")
20958 (source
20959 (origin
20960 (method url-fetch)
20961 (uri (pypi-uri "dns-lexicon" version))
20962 (sha256
20963 (base32
20964 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
20965 (build-system python-build-system)
20966 (arguments
20967 `(#:tests? #f)) ;requires internet access
20968 (propagated-inputs
20969 `(("python-future" ,python-future)
20970 ("python-pynamecheap" ,python-pynamecheap)
20971 ("python-requests" ,python-requests)
20972 ("python-tldextract" ,python-tldextract)
20973 ("python-urllib3" ,python-urllib3)))
20974 (home-page "https://github.com/AnalogJ/lexicon")
20975 (synopsis
20976 "Manipulate DNS records on various DNS providers")
20977 (description
20978 "Lexicon provides a way to manipulate DNS records on multiple DNS
20979 providers in a standardized way. It has a CLI but it can also be used as a
20980 Python library. It was designed to be used in automation, specifically with
20981 Let's Encrypt.")
20982 (license license:expat)))
20983
20984 (define-public python2-dns-lexicon
20985 (package-with-python2 python-dns-lexicon))
20986
20987 (define-public python-cfgv
20988 (package
20989 (name "python-cfgv")
20990 (version "3.1.0")
20991 (source
20992 (origin
20993 ;; There are no tests in the PyPI tarball.
20994 (method git-fetch)
20995 (uri (git-reference
20996 (url "https://github.com/asottile/cfgv")
20997 (commit (string-append "v" version))))
20998 (file-name (git-file-name name version))
20999 (sha256
21000 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
21001 (build-system python-build-system)
21002 (arguments
21003 `(#:phases
21004 (modify-phases %standard-phases
21005 (replace 'check
21006 (lambda _
21007 (invoke "pytest" "-vv"))))))
21008 (native-inputs
21009 `(("python-covdefaults" ,python-covdefaults)
21010 ("python-coverage" ,python-coverage)
21011 ("python-pytest" ,python-pytest)))
21012 (home-page "https://github.com/asottile/cfgv")
21013 (synopsis "Configuration validation library")
21014 (description
21015 "This library helps to validate configuration files and produce human
21016 readable error messages.")
21017 (license license:expat)))
21018
21019 (define-public python-commandlines
21020 (package
21021 (name "python-commandlines")
21022 (version "0.4.1")
21023 (source
21024 (origin
21025 (method url-fetch)
21026 (uri (pypi-uri "commandlines" version))
21027 (sha256
21028 (base32
21029 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
21030 (build-system python-build-system)
21031 (home-page "https://github.com/chrissimpkins/commandlines")
21032 (synopsis "Command line argument to object parsing library")
21033 (description
21034 "@code{Commandlines} is a Python library for command line application
21035 development that supports command line argument parsing, command string
21036 validation testing and application logic.")
21037 (license license:expat)))
21038
21039 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
21040 ;; python-numba. They have a very unflexible relationship.
21041 (define-public python-numba
21042 (package
21043 (name "python-numba")
21044 (version "0.51.2")
21045 (source
21046 (origin
21047 (method url-fetch)
21048 (uri (pypi-uri "numba" version))
21049 (sha256
21050 (base32
21051 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
21052 (build-system python-build-system)
21053 (arguments
21054 `(#:phases
21055 (modify-phases %standard-phases
21056 (add-after 'unpack 'disable-proprietary-features
21057 (lambda _
21058 (setenv "NUMBA_DISABLE_HSA" "1")
21059 (setenv "NUMBA_DISABLE_CUDA" "1")
21060 #t))
21061 (replace 'check
21062 (lambda* (#:key inputs outputs #:allow-other-keys)
21063 (add-installed-pythonpath inputs outputs)
21064 ;; Something is wrong with the PYTHONPATH when running the
21065 ;; tests from the build directory, as it complains about not being
21066 ;; able to import certain modules.
21067 (with-directory-excursion "/tmp"
21068 (setenv "HOME" (getcwd))
21069 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21070 (propagated-inputs
21071 `(("python-llvmlite" ,python-llvmlite)
21072 ("python-numpy" ,python-numpy)
21073 ("python-singledispatch" ,python-singledispatch)))
21074 (native-inputs ;for tests
21075 `(("python-jinja2" ,python-jinja2)
21076 ("python-pygments" ,python-pygments)))
21077 (home-page "https://numba.pydata.org")
21078 (synopsis "Compile Python code using LLVM")
21079 (description "Numba gives you the power to speed up your applications with
21080 high performance functions written directly in Python. With a few
21081 annotations, array-oriented and math-heavy Python code can be just-in-time
21082 compiled to native machine instructions, similar in performance to C, C++ and
21083 Fortran, without having to switch languages or Python interpreters.
21084
21085 Numba works by generating optimized machine code using the LLVM compiler
21086 infrastructure at import time, runtime, or statically (using the included pycc
21087 tool).")
21088 (license license:bsd-3)))
21089
21090 (define-public python-numcodecs
21091 (package
21092 (name "python-numcodecs")
21093 (version "0.6.4")
21094 (source
21095 (origin
21096 (method url-fetch)
21097 (uri (pypi-uri "numcodecs" version))
21098 (sha256
21099 (base32
21100 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21101 (build-system python-build-system)
21102 (propagated-inputs
21103 `(("python-numpy" ,python-numpy)
21104 ("python-msgpack" ,python-msgpack)))
21105 (native-inputs
21106 `(("python-pytest" ,python-pytest)
21107 ("python-setuptools-scm" ,python-setuptools-scm)))
21108 (home-page "https://github.com/zarr-developers/numcodecs")
21109 (synopsis "Buffer compression and transformation codecs")
21110 (description
21111 "This Python package provides buffer compression and transformation
21112 codecs for use in data storage and communication applications.")
21113 (license license:expat)))
21114
21115 (define-public python-asciitree
21116 (package
21117 (name "python-asciitree")
21118 (version "0.3.3")
21119 (source
21120 (origin
21121 (method url-fetch)
21122 (uri (pypi-uri "asciitree" version))
21123 (sha256
21124 (base32
21125 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21126 (build-system python-build-system)
21127 (home-page "https://github.com/mbr/asciitree")
21128 (synopsis "Draws ASCII trees")
21129 (description "This package draws tree structures using characters.")
21130 (license license:expat)))
21131
21132 (define-public python-zarr
21133 (package
21134 (name "python-zarr")
21135 (version "2.4.0")
21136 (source
21137 (origin
21138 (method url-fetch)
21139 (uri (pypi-uri "zarr" version))
21140 (sha256
21141 (base32
21142 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21143 (build-system python-build-system)
21144 (arguments
21145 `(#:phases
21146 (modify-phases %standard-phases
21147 (add-after 'unpack 'disable-service-tests
21148 (lambda _
21149 (setenv "ZARR_TEST_ABS" "0")
21150 (setenv "ZARR_TEST_MONGO" "0")
21151 (setenv "ZARR_TEST_REDIS" "0")
21152 #t))
21153 (replace 'check
21154 (lambda _
21155 (invoke "pytest" "-vv" "-k" "not lmdb")
21156 #t)))))
21157 (propagated-inputs
21158 `(("python-asciitree" ,python-asciitree)
21159 ("python-fasteners" ,python-fasteners)
21160 ("python-numcodecs" ,python-numcodecs)
21161 ("python-numpy" ,python-numpy)))
21162 (native-inputs
21163 `(("python-pytest" ,python-pytest)
21164 ("python-setuptools-scm" ,python-setuptools-scm)))
21165 (home-page "https://github.com/zarr-developers/zarr-python")
21166 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21167 (description
21168 "This package provides an implementation of chunked, compressed,
21169 N-dimensional arrays for Python.")
21170 (license license:expat)))
21171
21172 (define-public python-anndata
21173 (package
21174 (name "python-anndata")
21175 (version "0.7.6")
21176 (source
21177 (origin
21178 (method url-fetch)
21179 (uri (pypi-uri "anndata" version))
21180 (sha256
21181 (base32
21182 "1ch8yp0xmag6z0kl01pljm35lbbwax7lrimfhiclpkd4m6xngk53"))))
21183 (build-system python-build-system)
21184 (arguments
21185 `(#:tests? #f ; The tarball from PyPi doesn't include tests.
21186 #:phases
21187 (modify-phases %standard-phases
21188 (delete 'check)
21189 (add-before 'build 'relax-dependency-requirements
21190 (lambda _
21191 ;; We need to upgrade python-pandas to avoid
21192 ;; https://github.com/pandas-dev/pandas/issues/35446
21193 (substitute* "pyproject.toml"
21194 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21195 (replace 'build
21196 (lambda _
21197 ;; ZIP does not support timestamps before 1980.
21198 (setenv "SOURCE_DATE_EPOCH" "315532800")
21199 (invoke "flit" "build")))
21200 (replace 'install
21201 (lambda* (#:key inputs outputs #:allow-other-keys)
21202 (add-installed-pythonpath inputs outputs)
21203 (let ((out (assoc-ref outputs "out")))
21204 (for-each (lambda (wheel)
21205 (format #true wheel)
21206 (invoke "python" "-m" "pip" "install"
21207 wheel (string-append "--prefix=" out)))
21208 (find-files "dist" "\\.whl$")))
21209 #t)))))
21210 (propagated-inputs
21211 `(("python-h5py" ,python-h5py)
21212 ("python-importlib-metadata" ,python-importlib-metadata)
21213 ("python-natsort" ,python-natsort)
21214 ("python-numcodecs" ,python-numcodecs)
21215 ("python-packaging" ,python-packaging)
21216 ("python-pandas" ,python-pandas)
21217 ("python-scipy" ,python-scipy)
21218 ("python-zarr" ,python-zarr)))
21219 (native-inputs
21220 `(("python-joblib" ,python-joblib)
21221 ("python-pytest" ,python-pytest)
21222 ("python-toml" ,python-toml)
21223 ("python-flit" ,python-flit)
21224 ("python-setuptools-scm" ,python-setuptools-scm)))
21225 (home-page "https://github.com/theislab/anndata")
21226 (synopsis "Annotated data for data analysis pipelines")
21227 (description "Anndata is a package for simple (functional) high-level APIs
21228 for data analysis pipelines. In this context, it provides an efficient,
21229 scalable way of keeping track of data together with learned annotations and
21230 reduces the code overhead typically encountered when using a mostly
21231 object-oriented library such as @code{scikit-learn}.")
21232 (license license:bsd-3)))
21233
21234 (define-public python-dill
21235 (package
21236 (name "python-dill")
21237 (version "0.3.1.1")
21238 (source
21239 (origin
21240 (method url-fetch)
21241 (uri (pypi-uri "dill" version))
21242 (sha256
21243 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
21244 (build-system python-build-system)
21245 (arguments
21246 `(#:phases
21247 (modify-phases %standard-phases
21248 (replace 'check
21249 (lambda _
21250 (with-directory-excursion "/tmp"
21251 (invoke "nosetests" "-v"))
21252 #t)))))
21253 (native-inputs
21254 `(("python-nose" ,python-nose)))
21255 (home-page "https://pypi.org/project/dill/")
21256 (synopsis "Serialize all of Python")
21257 (description "Dill extends Python's @code{pickle} module for serializing
21258 and de-serializing Python objects to the majority of the built-in Python
21259 types. Dill provides the user the same interface as the @code{pickle} module,
21260 and also includes some additional features. In addition to pickling Python
21261 objects, @code{dill} provides the ability to save the state of an interpreter
21262 session in a single command. Hence, it would be feasible to save a
21263 interpreter session, close the interpreter, ship the pickled file to another
21264 computer, open a new interpreter, unpickle the session and thus continue from
21265 the saved state of the original interpreter session.")
21266 (license license:bsd-3)))
21267
21268 (define-public python-multiprocess
21269 (package
21270 (name "python-multiprocess")
21271 (version "0.70.9")
21272 (source
21273 (origin
21274 (method url-fetch)
21275 (uri (pypi-uri "multiprocess" version))
21276 (sha256
21277 (base32
21278 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
21279 (build-system python-build-system)
21280 (arguments
21281 `(#:phases
21282 (modify-phases %standard-phases
21283 (add-after 'unpack 'disable-broken-tests
21284 (lambda _
21285 ;; This test is broken as there is no keyboard interrupt.
21286 (substitute* "py3.7/multiprocess/tests/__init__.py"
21287 (("^(.*)def test_wait_result"
21288 line indent)
21289 (string-append indent
21290 "@unittest.skip(\"Disabled by Guix\")\n"
21291 line)))
21292 #t))
21293 ;; Tests must be run after installation.
21294 (delete 'check)
21295 (add-after 'install 'check
21296 (lambda* (#:key inputs outputs #:allow-other-keys)
21297 (add-installed-pythonpath inputs outputs)
21298 (invoke "python" "-m" "multiprocess.tests")
21299 #t)))))
21300 (propagated-inputs
21301 `(("python-dill" ,python-dill)))
21302 (home-page "https://pypi.org/project/multiprocess/")
21303 (synopsis "Multiprocessing and multithreading in Python")
21304 (description
21305 "This package is a fork of the multiprocessing Python package, a package
21306 which supports the spawning of processes using the API of the standard
21307 library's @code{threading} module.")
21308 (license license:bsd-3)))
21309
21310 (define-public python-toolz
21311 (package
21312 (name "python-toolz")
21313 (version "0.11.1")
21314 (source
21315 (origin
21316 (method url-fetch)
21317 (uri (pypi-uri "toolz" version))
21318 (sha256
21319 (base32
21320 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
21321 (build-system python-build-system)
21322 (arguments
21323 `(#:phases
21324 (modify-phases %standard-phases
21325 (replace 'check
21326 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
21327 (when tests?
21328 (add-installed-pythonpath inputs outputs)
21329 (invoke "python" "-m" "pytest" "--doctest-modules"
21330 "--pyargs" "toolz")))))))
21331 (native-inputs
21332 `(("python-pytest" ,python-pytest)))
21333 (home-page "https://github.com/pytoolz/toolz/")
21334 (synopsis "List processing tools and functional utilities")
21335 (description
21336 "This package provides a set of utility functions for iterators,
21337 functions, and dictionaries.")
21338 (license license:bsd-3)))
21339
21340 (define-public python2-toolz
21341 (package-with-python2 python-toolz))
21342
21343 (define-public python-cytoolz
21344 (package
21345 (name "python-cytoolz")
21346 (version "0.9.0.1")
21347 (source
21348 (origin
21349 (method url-fetch)
21350 (uri (pypi-uri "cytoolz" version))
21351 (sha256
21352 (base32
21353 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
21354 (build-system python-build-system)
21355 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
21356 ;; 'exceptions'"
21357 (arguments '(#:tests? #f))
21358 (propagated-inputs
21359 `(("python-toolz" ,python-toolz)))
21360 (native-inputs
21361 `(("python-cython" ,python-cython)))
21362 (home-page "https://github.com/pytoolz/cytoolz")
21363 (synopsis "High performance functional utilities")
21364 (description
21365 "The cytoolz package implements the same API as provided by toolz. The
21366 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
21367 that is accessible to other projects developed in Cython.")
21368 (license license:bsd-3)))
21369
21370 (define-public python-sortedcollections
21371 (package
21372 (name "python-sortedcollections")
21373 (version "2.1.0")
21374 (source
21375 (origin
21376 (method url-fetch)
21377 (uri (pypi-uri "sortedcollections" version))
21378 (sha256
21379 (base32
21380 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
21381 (build-system python-build-system)
21382 (propagated-inputs
21383 `(("python-sortedcontainers" ,python-sortedcontainers)))
21384 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
21385 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
21386 (synopsis "Python Sorted Collections")
21387 (description "Sorted Collections is a Python sorted collections library.")
21388 (license license:asl2.0)))
21389
21390 (define-public python-sortedcontainers
21391 (package
21392 (name "python-sortedcontainers")
21393 (version "2.1.0")
21394 (source
21395 (origin
21396 (method url-fetch)
21397 (uri (pypi-uri "sortedcontainers" version))
21398 (sha256
21399 (base32
21400 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
21401 (build-system python-build-system)
21402 (arguments
21403 ;; FIXME: Tests require many extra dependencies, and would introduce
21404 ;; a circular dependency on hypothesis, which uses this package.
21405 '(#:tests? #f))
21406 (propagated-inputs
21407 `(("python-appdirs" ,python-appdirs)
21408 ("python-distlib" ,python-distlib)
21409 ("python-filelock" ,python-filelock)
21410 ("python-six" ,python-six-bootstrap)))
21411 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
21412 (synopsis "Sorted List, Sorted Dict, Sorted Set")
21413 (description
21414 "This package provides a sorted collections library, written in
21415 pure-Python.")
21416 (license license:asl2.0)))
21417
21418 (define-public python2-sortedcontainers
21419 (package-with-python2 python-sortedcontainers))
21420
21421 (define-public python-cloudpickle
21422 (package
21423 (name "python-cloudpickle")
21424 (version "1.3.0")
21425 (source
21426 (origin
21427 (method url-fetch)
21428 (uri (pypi-uri "cloudpickle" version))
21429 (sha256
21430 (base32
21431 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
21432 (build-system python-build-system)
21433 (arguments
21434 '(#:phases (modify-phases %standard-phases
21435 (add-before 'check 'do-not-override-PYTHONPATH
21436 (lambda _
21437 ;; Append to PYTHONPATH instead of overriding it so
21438 ;; that dependencies from Guix can be found.
21439 (substitute* "tests/testutils.py"
21440 (("env\\['PYTHONPATH'\\] = pythonpath")
21441 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
21442 #t))
21443 (replace 'check
21444 (lambda* (#:key tests? #:allow-other-keys)
21445 (if tests?
21446 (invoke "pytest" "-s" "-vv")
21447 (format #t "test suite not run~%"))
21448 #t)))))
21449 (native-inputs
21450 `(;; For tests.
21451 ("python-psutil" ,python-psutil)
21452 ("python-pytest" ,python-pytest)
21453 ("python-tornado" ,python-tornado)))
21454 (home-page "https://github.com/cloudpipe/cloudpickle")
21455 (synopsis "Extended pickling support for Python objects")
21456 (description
21457 "Cloudpickle makes it possible to serialize Python constructs not
21458 supported by the default pickle module from the Python standard library. It
21459 is especially useful for cluster computing where Python expressions are
21460 shipped over the network to execute on remote hosts, possibly close to the
21461 data.")
21462 (properties `((python2-variant . ,(delay python2-cloudpickle))))
21463 (license license:bsd-3)))
21464
21465 (define-public python2-cloudpickle
21466 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
21467 (package/inherit base
21468 (native-inputs
21469 `(("python-mock" ,python2-mock)
21470 ,@(package-native-inputs base)))
21471 (propagated-inputs
21472 `(("python-futures" ,python2-futures)
21473 ,@(package-propagated-inputs base))))))
21474
21475 (define-public python-locket
21476 (package
21477 (name "python-locket")
21478 (version "0.2.0")
21479 (source
21480 (origin
21481 (method url-fetch)
21482 (uri (pypi-uri "locket" version))
21483 (sha256
21484 (base32
21485 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
21486 (build-system python-build-system)
21487 (home-page "https://github.com/mwilliamson/locket.py")
21488 (synopsis "File-based locks for Python")
21489 (description
21490 "Locket implements a lock that can be used by multiple processes provided
21491 they use the same path.")
21492 (license license:bsd-2)))
21493
21494 (define-public python2-locket
21495 (package-with-python2 python-locket))
21496
21497 (define-public python-blosc
21498 (package
21499 (name "python-blosc")
21500 (version "1.5.1")
21501 (source
21502 (origin
21503 (method url-fetch)
21504 (uri (pypi-uri "blosc" version))
21505 (sha256
21506 (base32
21507 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
21508 (build-system python-build-system)
21509 ;; FIXME: all tests pass, but then this error is printed:
21510 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
21511 (arguments '(#:tests? #f))
21512 (propagated-inputs
21513 `(("python-numpy" ,python-numpy)))
21514 (home-page "https://github.com/blosc/python-blosc")
21515 (synopsis "Python wrapper for the Blosc data compressor library")
21516 (description "Blosc is a high performance compressor optimized for binary
21517 data. It has been designed to transmit data to the processor cache faster
21518 than the traditional, non-compressed, direct memory fetch approach via a
21519 @code{memcpy()} system call.
21520
21521 Blosc works well for compressing numerical arrays that contains data with
21522 relatively low entropy, like sparse data, time series, grids with
21523 regular-spaced values, etc.
21524
21525 This Python package wraps the Blosc library.")
21526 (license license:bsd-3)))
21527
21528 (define-public python2-blosc
21529 (package-with-python2 python-blosc))
21530
21531 (define-public python-partd
21532 (package
21533 (name "python-partd")
21534 (version "0.3.9")
21535 (source
21536 (origin
21537 (method url-fetch)
21538 (uri (pypi-uri "partd" version))
21539 (sha256
21540 (base32
21541 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
21542 (build-system python-build-system)
21543 (propagated-inputs
21544 `(("python-blosc" ,python-blosc)
21545 ("python-locket" ,python-locket)
21546 ("python-numpy" ,python-numpy)
21547 ("python-pandas" ,python-pandas)
21548 ("python-pyzmq" ,python-pyzmq)
21549 ("python-toolz" ,python-toolz)))
21550 (home-page "https://github.com/dask/partd/")
21551 (synopsis "Appendable key-value storage")
21552 (description "Partd stores key-value pairs. Values are raw bytes. We
21553 append on old values. Partd excels at shuffling operations.")
21554 (license license:bsd-3)))
21555
21556 (define-public python-fsspec
21557 (package
21558 (name "python-fsspec")
21559 (version "0.6.1")
21560 (source
21561 (origin
21562 (method url-fetch)
21563 (uri (pypi-uri "fsspec" version))
21564 (sha256
21565 (base32
21566 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
21567 (build-system python-build-system)
21568 (arguments '(#:tests? #f)) ; there are none
21569 (home-page "https://github.com/intake/filesystem_spec")
21570 (synopsis "File-system specification")
21571 (description "The purpose of this package is to produce a template or
21572 specification for a file-system interface, that specific implementations
21573 should follow, so that applications making use of them can rely on a common
21574 behavior and not have to worry about the specific internal implementation
21575 decisions with any given backend.")
21576 (license license:bsd-3)))
21577
21578 (define-public python-dask
21579 (package
21580 (name "python-dask")
21581 (version "2.14.0")
21582 (source
21583 (origin
21584 (method url-fetch)
21585 (uri (pypi-uri "dask" version))
21586 (sha256
21587 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
21588 (build-system python-build-system)
21589 (arguments
21590 `(#:phases
21591 (modify-phases %standard-phases
21592 (add-after 'unpack 'disable-broken-tests
21593 (lambda _
21594 ;; This test is marked as xfail when pytest-xdist is used.
21595 (substitute* "dask/tests/test_threaded.py"
21596 (("def test_interrupt\\(\\)" m)
21597 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21598 m)))
21599 ;; This one fails with a type error:
21600 ;; TypeError: Already tz-aware, use tz_convert to convert.
21601 (substitute* "dask/dataframe/tests/test_shuffle.py"
21602 (("def test_set_index_timestamp\\(\\)" m)
21603 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21604 m)))
21605 #t))
21606 (replace 'check
21607 (lambda _ (invoke "pytest" "-vv"))))))
21608 (propagated-inputs
21609 `(("python-cloudpickle" ,python-cloudpickle)
21610 ("python-fsspec" ,python-fsspec)
21611 ("python-numpy" ,python-numpy)
21612 ("python-packaging" ,python-packaging)
21613 ("python-pandas" ,python-pandas)
21614 ("python-partd" ,python-partd)
21615 ("python-toolz" ,python-toolz)
21616 ("python-pyyaml" ,python-pyyaml)))
21617 (native-inputs
21618 `(("python-pytest" ,python-pytest)
21619 ("python-pytest-runner" ,python-pytest-runner)))
21620 (home-page "https://github.com/dask/dask/")
21621 (synopsis "Parallel computing with task scheduling")
21622 (description
21623 "Dask is a flexible parallel computing library for analytics. It
21624 consists of two components: dynamic task scheduling optimized for computation,
21625 and large data collections like parallel arrays, dataframes, and lists that
21626 extend common interfaces like NumPy, Pandas, or Python iterators to
21627 larger-than-memory or distributed environments. These parallel collections
21628 run on top of the dynamic task schedulers. ")
21629 (license license:bsd-3)))
21630
21631 (define-public python-ilinkedlist
21632 (package
21633 (name "python-ilinkedlist")
21634 (version "0.4.0")
21635 (source
21636 (origin
21637 (method url-fetch)
21638 (uri (pypi-uri "ilinkedlist" version))
21639 (sha256
21640 (base32
21641 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
21642 (build-system python-build-system)
21643 (native-inputs `(("python-pytest" ,python-pytest)))
21644 (inputs `(("python" ,python)))
21645 (home-page "https://github.com/luther9/ilinkedlist-py")
21646 (synopsis "Immutable linked list library")
21647 (description
21648 "This is a implementation of immutable linked lists for Python. It
21649 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
21650 Since a linked list is treated as immutable, it is hashable, and its length
21651 can be retrieved in constant time. Some of the terminology is inspired by
21652 LISP. It is possible to create an improper list by creating a @code{Pair}
21653 with a non-list @code{cdr}.")
21654 (license license:gpl3+)))
21655
21656 (define-public python-readlike
21657 (package
21658 (name "python-readlike")
21659 (version "0.1.3")
21660 (source
21661 (origin
21662 (method url-fetch)
21663 (uri (pypi-uri "readlike" version))
21664 (sha256
21665 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
21666 (build-system python-build-system)
21667 (home-page "https://github.com/jangler/readlike")
21668 (synopsis "GNU Readline-like line editing module")
21669 (description
21670 "This Python module provides line editing functions similar to the default
21671 Emacs-style ones of GNU Readline. Unlike the Python standard library's
21672 @code{readline} package, this one allows access to those capabilities in settings
21673 outside of a standard command-line interface. It is especially well-suited to
21674 interfacing with Urwid, due to a shared syntax for describing key inputs.
21675
21676 Currently, all stateless Readline commands are implemented. Yanking and history
21677 are not supported.")
21678 (license license:expat)))
21679
21680 (define-public python2-readlike
21681 (package-with-python2 python-readlike))
21682
21683 (define-public python-reparser
21684 (package
21685 (name "python-reparser")
21686 (version "1.4.3")
21687 (source
21688 (origin
21689 (method url-fetch)
21690 (uri (pypi-uri "ReParser" version))
21691 (sha256
21692 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
21693 (build-system python-build-system)
21694 (home-page "https://github.com/xmikos/reparser")
21695 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
21696 (description
21697 "This Python library provides a simple lexer/parser for inline markup based
21698 on regular expressions.")
21699 (license license:expat)))
21700
21701 (define-public python2-reparser
21702 (let ((reparser (package-with-python2
21703 (strip-python2-variant python-reparser))))
21704 (package/inherit reparser
21705 (propagated-inputs
21706 `(("python2-enum34" ,python2-enum34)
21707 ,@(package-propagated-inputs reparser))))))
21708
21709 (define-public python-retrying
21710 (package
21711 (name "python-retrying")
21712 (version "1.3.3")
21713 (source
21714 (origin
21715 (method git-fetch)
21716 (uri (git-reference
21717 (url "https://github.com/rholder/retrying")
21718 (commit (string-append "v" version))))
21719 (file-name (git-file-name name version))
21720 (sha256
21721 (base32
21722 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
21723 (build-system python-build-system)
21724 (propagated-inputs
21725 `(("python-six" ,python-six)))
21726 (home-page "https://github.com/rholder/retrying")
21727 (synopsis "Library for adding retry behavior")
21728 (description "Retrying is a general-purpose retrying library to simplify
21729 the task of adding retry behavior to just about anything.
21730
21731 Features:
21732
21733 @itemize
21734 @item Generic Decorator API.
21735 @item Specify stop condition (i.e. limit by number of attempts).
21736 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
21737 @item Customize retrying on Exceptions.
21738 @item Customize retrying on expected returned result.
21739 @end itemize")
21740 (license license:asl2.0)))
21741
21742 (define-public python-pre-commit
21743 (package
21744 (name "python-pre-commit")
21745 (version "2.10.0")
21746 (source
21747 (origin
21748 (method url-fetch)
21749 (uri (pypi-uri "pre_commit" version))
21750 (sha256
21751 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
21752 (build-system python-build-system)
21753 (arguments
21754 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
21755 ;; attribute 'empty_template_setup'".
21756 `(#:tests? #false))
21757 (propagated-inputs
21758 `(("python-cfgv" ,python-cfgv)
21759 ("python-identify" ,python-identify)
21760 ("python-importlib-metadata" ,python-importlib-metadata)
21761 ("python-importlib-resources" ,python-importlib-resources)
21762 ("python-nodeenv" ,python-nodeenv)
21763 ("python-pyyaml" ,python-pyyaml)
21764 ("python-toml" ,python-toml)
21765 ("python-virtualenv" ,python-virtualenv)))
21766 (home-page "https://github.com/pre-commit/pre-commit")
21767 (synopsis "Framework for managing multi-language pre-commit hooks")
21768 (description
21769 "This package provides a framework for managing and maintaining
21770 multi-language pre-commit hooks.")
21771 (license license:expat)))
21772
21773 (define-public python-precis-i18n
21774 (package
21775 (name "python-precis-i18n")
21776 (version "1.0.0")
21777 (source
21778 (origin
21779 (method url-fetch)
21780 (uri (pypi-uri "precis_i18n" version))
21781 (sha256
21782 (base32
21783 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
21784 (build-system python-build-system)
21785 (home-page "https://github.com/byllyfish/precis_i18n")
21786 (synopsis "Implementation of the PRECIS framework")
21787 (description
21788 "This module implements the PRECIS Framework as described in RFC 8264,
21789 RFC 8265 and RFC 8266.")
21790 (license license:expat)))
21791
21792 (define-public python-absl-py
21793 (package
21794 (name "python-absl-py")
21795 (version "0.6.1")
21796 (source
21797 (origin
21798 (method url-fetch)
21799 (uri (pypi-uri "absl-py" version))
21800 (sha256
21801 (base32
21802 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
21803 (build-system python-build-system)
21804 (propagated-inputs
21805 `(("python-six" ,python-six)))
21806 (home-page "https://github.com/abseil/abseil-py")
21807 (synopsis "Abseil Python common libraries")
21808 (description
21809 "This package provides the Abseil Python Common Libraries, a collection
21810 of Python libraries for building Python applications.")
21811 (license license:asl2.0)))
21812
21813 (define-public python-astor
21814 (package
21815 (name "python-astor")
21816 (version "0.8.1")
21817 (source
21818 (origin
21819 (method url-fetch)
21820 (uri (pypi-uri "astor" version))
21821 (sha256
21822 (base32
21823 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
21824 (build-system python-build-system)
21825 ;; FIXME: There are two errors and two test failures.
21826 (arguments `(#:tests? #f))
21827 (home-page "https://github.com/berkerpeksag/astor")
21828 (synopsis "Read and write Python ASTs")
21829 (description "Astor is designed to allow easy manipulation of Python
21830 source via the Abstract Syntax Tree.")
21831 (license license:bsd-3)))
21832
21833 (define-public python2-astor
21834 (package-with-python2 python-astor))
21835
21836 (define-public python-astunparse
21837 (package
21838 (name "python-astunparse")
21839 (version "1.6.2")
21840 (source
21841 (origin
21842 (method url-fetch)
21843 (uri (pypi-uri "astunparse" version))
21844 (sha256
21845 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
21846 (build-system python-build-system)
21847 (arguments '(#:tests? #f)) ; there are none
21848 (propagated-inputs
21849 `(("python-six" ,python-six)
21850 ("python-wheel" ,python-wheel)))
21851 (home-page "https://github.com/simonpercivall/astunparse")
21852 (synopsis "AST unparser for Python")
21853 (description "This package provides an AST unparser for Python. It is a
21854 factored out version of @code{unparse} found in the Python source
21855 distribution.")
21856 (license license:bsd-3)))
21857
21858 (define-public python-gast
21859 (package
21860 (name "python-gast")
21861 (version "0.3.3")
21862 (source
21863 (origin
21864 (method url-fetch)
21865 (uri (pypi-uri "gast" version))
21866 (sha256
21867 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
21868 (build-system python-build-system)
21869 (propagated-inputs
21870 `(("python-astunparse" ,python-astunparse)))
21871 (home-page "https://pypi.org/project/gast/")
21872 (synopsis "Generic Python AST that abstracts the underlying Python version")
21873 (description
21874 "GAST provides a compatibility layer between the AST of various Python
21875 versions, as produced by @code{ast.parse} from the standard @code{ast}
21876 module.")
21877 (license license:bsd-3)))
21878
21879 (define-public python-wikidata
21880 (package
21881 (name "python-wikidata")
21882 (version "0.6.1")
21883 (source
21884 (origin
21885 (method url-fetch)
21886 (uri (pypi-uri "Wikidata" version))
21887 (sha256
21888 (base32
21889 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
21890 (build-system python-build-system)
21891 (propagated-inputs
21892 `(("python-babel" ,python-babel)))
21893 (home-page "https://github.com/dahlia/wikidata")
21894 (synopsis "Wikidata client library")
21895 (description
21896 "This package provides a Python interface to
21897 @url{https://www.wikidata.org/, Wikidata}.")
21898 (properties '((upstream-name . "Wikidata")))
21899 (license license:gpl3+)))
21900
21901 (define-public python-doctest-ignore-unicode
21902 (package
21903 (name "python-doctest-ignore-unicode")
21904 (version "0.1.2")
21905 (source
21906 (origin
21907 (method url-fetch)
21908 (uri (pypi-uri "doctest-ignore-unicode" version))
21909 (sha256
21910 (base32
21911 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
21912 (build-system python-build-system)
21913 (native-inputs
21914 `(("python-nose" ,python-nose)))
21915 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
21916 (synopsis "Ignore Unicode literal prefixes in doctests")
21917 (description
21918 "This package adds support for a flag to ignore Unicode literal prefixes
21919 in doctests.")
21920 (license license:asl2.0)))
21921
21922 (define-public python-attr
21923 (package
21924 (name "python-attr")
21925 (version "0.3.1")
21926 (source
21927 (origin
21928 (method url-fetch)
21929 (uri (pypi-uri "attr" version))
21930 (sha256
21931 (base32
21932 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
21933 (build-system python-build-system)
21934 (home-page "https://github.com/denis-ryzhkov/attr")
21935 (synopsis "Decorator for attributes of target function or class")
21936 (description "Simple decorator to set attributes of target function or
21937 class in a @acronym{DRY, Don't Repeat Yourself} way.")
21938 (license license:expat)))
21939
21940 (define-public python-construct
21941 (package
21942 (name "python-construct")
21943 (version "2.10.56")
21944 (source
21945 (origin
21946 (method url-fetch)
21947 (uri (pypi-uri "construct" version))
21948 (sha256
21949 (base32
21950 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
21951 (build-system python-build-system)
21952 (arguments
21953 `(#:tests? #f)) ; No tests exist.
21954 (propagated-inputs
21955 `(("python-extras" ,python-extras)
21956 ("python-arrow" ,python-arrow)
21957 ("python-numpy" ,python-numpy)
21958 ("python-ruamel.yaml" ,python-ruamel.yaml)))
21959 (home-page "https://construct.readthedocs.io")
21960 (synopsis "Declarative and symmetrical parser and builder for binary data")
21961 (description
21962 "This package provides both simple, atomic constructs (such as
21963 integers of various sizes), as well as composite ones which allow you
21964 form hierarchical and sequential structures of increasing complexity.
21965 It features bit and byte granularity, easy debugging and testing, an
21966 easy-to-extend subclass system, and lots of primitive constructs to
21967 make your work easier.")
21968 (license license:expat)))
21969
21970 (define-public python-outcome
21971 (package
21972 (name "python-outcome")
21973 (version "1.0.1")
21974 (source
21975 (origin
21976 (method url-fetch)
21977 (uri (pypi-uri "outcome" version))
21978 (sha256
21979 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
21980 (build-system python-build-system)
21981 (arguments
21982 `(#:phases
21983 (modify-phases %standard-phases
21984 (replace 'check
21985 (lambda* (#:key inputs outputs #:allow-other-keys)
21986 (add-installed-pythonpath inputs outputs)
21987 (invoke "pytest" "-vv"))))))
21988 (native-inputs
21989 `(("python-pytest" ,python-pytest)
21990 ("python-pytest-cov" ,python-pytest-cov)
21991 ("python-pytest-asyncio" ,python-pytest-asyncio)))
21992 (propagated-inputs
21993 `(("python-async-generator" ,python-async-generator)
21994 ("python-attrs" ,python-attrs)))
21995 (home-page "https://github.com/python-trio/outcome")
21996 (synopsis "Capture the outcome of Python function calls")
21997 (description
21998 "Capture the outcome of Python function calls. Extracted from the Trio
21999 project.")
22000 ;; Either license applies.
22001 (license (list license:expat license:asl2.0))))
22002
22003 (define-public python-trio
22004 (package
22005 (name "python-trio")
22006 (version "0.17.0")
22007 (source
22008 (origin
22009 (method url-fetch)
22010 (uri (pypi-uri "trio" version))
22011 (sha256
22012 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
22013 (build-system python-build-system)
22014 (arguments
22015 `(#:phases
22016 (modify-phases %standard-phases
22017 (add-before 'check 'change-home
22018 (lambda _
22019 ;; Tests require a writable home.
22020 (setenv "HOME" "/tmp")
22021 #t))
22022 (replace 'check
22023 (lambda _
22024 (invoke "pytest" "-vv" "-k"
22025 (string-append
22026 ;; This test times out.
22027 "not test_ki_protection_works"
22028 ;; Assertion errors.
22029 " and not test_guest_mode_ki"
22030 " and not test_run_in_trio_thread_ki"
22031 ;; These try to raise KeyboardInterrupt which does not work
22032 ;; in the build environment.
22033 " and not test_ki_self"
22034 " and not test_ki_wakes_us_up"
22035 ;; Failure in name resolution.
22036 " and not test_getnameinfo"
22037 " and not test_SocketType_resolve"
22038 ;; OSError: protocol not found.
22039 " and not test_getprotobyname")))))))
22040 (native-inputs
22041 `(("python-astor" ,python-astor)
22042 ("python-ipython" ,python-ipython)
22043 ("python-jedi" ,python-jedi)
22044 ("python-pylint" ,python-pylint)
22045 ("python-pyopenssl" ,python-pyopenssl)
22046 ("python-pytest" ,python-pytest)
22047 ("python-pytest-cov" ,python-pytest-cov)
22048 ("python-trustme" ,python-trustme)))
22049 (propagated-inputs
22050 `(("python-attrs" ,python-attrs)
22051 ("python-idna" ,python-idna)
22052 ("python-outcome" ,python-outcome)
22053 ("python-sniffio" ,python-sniffio)
22054 ("python-sortedcontainers"
22055 ,python-sortedcontainers)))
22056 (home-page "https://github.com/python-trio/trio")
22057 (synopsis "Friendly Python library for async concurrency and I/O")
22058 (description
22059 "Trio strives to be a production-quality, async/await-native I/O library
22060 for Python. Like all async libraries, its main purpose is to help you write
22061 programs that do multiple things at the same time with parallelized I/O.")
22062 ;; Either license applies.
22063 (license (list license:expat license:asl2.0))))
22064
22065 (define-public python-trio-typing
22066 (package
22067 (name "python-trio-typing")
22068 (version "0.5.0")
22069 (source
22070 (origin
22071 (method url-fetch)
22072 (uri (pypi-uri "trio-typing" version))
22073 (sha256
22074 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22075 (build-system python-build-system)
22076 (arguments
22077 `(#:phases
22078 (modify-phases %standard-phases
22079 (replace 'check
22080 (lambda _
22081 (invoke "pytest" "-vv"))))))
22082 (native-inputs
22083 `(("python-attrs" ,python-attrs)
22084 ("python-pytest" ,python-pytest)))
22085 (propagated-inputs
22086 `(("python-mypy" ,python-mypy)
22087 ("python-mypy-extensions"
22088 ,python-mypy-extensions)
22089 ("python-trio" ,python-trio)
22090 ("python-typing-extensions"
22091 ,python-typing-extensions)))
22092 (home-page "https://github.com/python-trio/trio-typing")
22093 (synopsis "Static type checking support for Trio and related projects")
22094 (description
22095 "This package provides:
22096
22097 @itemize
22098 @item PEP 561 typing stubs packages for the Trio project packages:
22099
22100 @itemize
22101 @item trio (@code{trio-stubs})
22102 @item outcome (@code{outcome-stubs})
22103 @item async_generator (@code{async_generator-stubs})
22104 @end itemize
22105
22106 @item A package @code{trio_typing} containing types that Trio programs often
22107 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22108 a mypy plugin that smooths over some limitations in the basic type hints.
22109 @end itemize")
22110 ;; Either license applies.
22111 (license (list license:expat license:asl2.0))))
22112
22113 (define-public python-humanize
22114 (package
22115 (name "python-humanize")
22116 (version "0.5.1")
22117 (source
22118 (origin
22119 (method url-fetch)
22120 (uri (pypi-uri "humanize" version))
22121 (sha256
22122 (base32
22123 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22124 (arguments
22125 '(#:tests? #f)) ; tests not in pypi archive
22126 (build-system python-build-system)
22127 (home-page "https://github.com/jmoiron/humanize")
22128 (synopsis "Print numerical information in a human-readable form")
22129 (description "This package provides a Python module that displays numbers
22130 and dates in \"human readable\" forms. For example, it would display
22131 \"12345591313\" as \"12.3 billion\".")
22132 (license license:expat)))
22133
22134 (define-public python-txaio
22135 (package
22136 (name "python-txaio")
22137 (version "18.8.1")
22138 (source
22139 (origin
22140 (method url-fetch)
22141 (uri (pypi-uri "txaio" version))
22142 (sha256
22143 (base32
22144 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22145 (build-system python-build-system)
22146 (propagated-inputs
22147 `(("python-twisted" ,python-twisted)
22148 ("python-six" ,python-six)))
22149 (home-page "https://github.com/crossbario/txaio")
22150 (synopsis "Compatibility layer between Python asyncio and Twisted")
22151 (description "Txaio provides a compatibility layer between the Python
22152 @code{asyncio} module and @code{Twisted}.")
22153 (license license:expat)))
22154
22155 (define-public python-toolshed
22156 (package
22157 (name "python-toolshed")
22158 (version "0.4.6")
22159 (source
22160 (origin
22161 (method url-fetch)
22162 (uri (pypi-uri "toolshed" version))
22163 (sha256
22164 (base32
22165 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22166 (build-system python-build-system)
22167 (native-inputs
22168 `(("python-nose" ,python-nose)))
22169 (home-page "https://github.com/brentp/toolshed/")
22170 (synopsis "Collection of modules and functions for working with data")
22171 (description "This is a collection of well-tested, simple modules and
22172 functions that aim to reduce boilerplate when working with data.")
22173 (license license:bsd-2)))
22174
22175 (define-public python-annoy
22176 (package
22177 (name "python-annoy")
22178 (version "1.15.1")
22179 (source
22180 (origin
22181 (method url-fetch)
22182 (uri (pypi-uri "annoy" version))
22183 (sha256
22184 (base32
22185 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
22186 (build-system python-build-system)
22187 (native-inputs
22188 `(("python-nose" ,python-nose)))
22189 (home-page "https://github.com/spotify/annoy/")
22190 (synopsis "Approximate nearest neighbors library")
22191 (description
22192 "Annoy is a C++ library with Python bindings to search for points in
22193 space that are close to a given query point. It also creates large read-only
22194 file-based data structures that are @code{mmap}ped into memory so that many
22195 processes may share the same data.")
22196 (license license:asl2.0)))
22197
22198 (define-public python-croniter
22199 (package
22200 (name "python-croniter")
22201 (version "0.3.34")
22202 (source (origin
22203 (method url-fetch)
22204 (uri (pypi-uri "croniter" version))
22205 (sha256
22206 (base32
22207 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
22208 (build-system python-build-system)
22209 (propagated-inputs
22210 `(("python-dateutil" ,python-dateutil)
22211 ("python-natsort" ,python-natsort)))
22212 (home-page "https://github.com/kiorky/croniter")
22213 (synopsis "Iterate datetime objects with cron-like syntax")
22214 (description
22215 "@code{croniter} provides iteration for datetime object with cron-like
22216 format.")
22217 (license license:expat)))
22218
22219 (define-public python-pylzma
22220 (package
22221 (name "python-pylzma")
22222 (version "0.5.0")
22223 (source
22224 (origin
22225 (method url-fetch)
22226 (uri (pypi-uri "pylzma" version))
22227 (sha256
22228 (base32
22229 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
22230 (build-system python-build-system)
22231 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
22232 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
22233 (description "This package provides Python bindings for the LZMA library
22234 by Igor Pavlov.")
22235 (license license:lgpl2.1+)))
22236
22237 (define-public python2-pylzma
22238 (package-with-python2 python-pylzma))
22239
22240 (define-public python-ifaddr
22241 (package
22242 (name "python-ifaddr")
22243 (version "0.1.7")
22244 (source
22245 (origin
22246 (method url-fetch)
22247 (uri (pypi-uri "ifaddr" version))
22248 (sha256
22249 (base32
22250 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
22251 (build-system python-build-system)
22252 (arguments
22253 `(#:phases
22254 (modify-phases %standard-phases
22255 (replace 'check
22256 (lambda _ (invoke "nosetests"))))))
22257 (native-inputs
22258 `(("python-nose" ,python-nose)))
22259 (home-page "https://github.com/pydron/ifaddr")
22260 (synopsis "Network interface and IP address enumeration library")
22261 (description "This package provides a network interface and IP address
22262 enumeration library in Python.")
22263 (license license:expat)))
22264
22265 (define-public python-zeroconf
22266 (package
22267 (name "python-zeroconf")
22268 (version "0.28.8")
22269 (source
22270 (origin
22271 (method url-fetch)
22272 (uri (pypi-uri "zeroconf" version))
22273 (sha256
22274 (base32
22275 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
22276 (build-system python-build-system)
22277 (native-inputs
22278 `(("python-nose" ,python-nose)))
22279 (propagated-inputs
22280 `(("python-ifaddr" ,python-ifaddr)))
22281 (arguments
22282 `(#:phases
22283 (modify-phases %standard-phases
22284 (replace 'check
22285 (lambda _ ;; Networking isn't available for these tests.
22286 (invoke "nosetests" "-v"
22287 "--exclude" "test_integration_with_listener_ipv6"
22288 "--exclude" "test_launch_and_close_v6_only"
22289 "--exclude" "test_launch_and_close_v4_v6"
22290 "--exclude" "test_launch_and_close"))))))
22291 (home-page "https://github.com/jstasiak/python-zeroconf")
22292 (synopsis "Pure Python mDNS service discovery")
22293 (description
22294 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22295 compatible).")
22296 (license license:lgpl2.1+)))
22297
22298 (define-public python2-zeroconf
22299 (package
22300 (name "python2-zeroconf")
22301
22302 ;; This is the last version that supports Python 2.x.
22303 (version "0.19.1")
22304 (source
22305 (origin
22306 (method url-fetch)
22307 (uri (pypi-uri "zeroconf" version))
22308 (sha256
22309 (base32
22310 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
22311 (build-system python-build-system)
22312 (arguments
22313 `(#:python ,python-2
22314 #:phases
22315 (modify-phases %standard-phases
22316 (add-after 'unpack 'patch-requires
22317 (lambda* (#:key inputs #:allow-other-keys)
22318 (substitute* "setup.py"
22319 (("enum-compat")
22320 "enum34"))
22321 #t)))))
22322 (native-inputs
22323 `(("python2-six" ,python2-six)
22324 ("python2-enum32" ,python2-enum34)
22325 ("python2-netifaces" ,python2-netifaces)
22326 ("python2-typing" ,python2-typing)))
22327 (home-page "https://github.com/jstasiak/python-zeroconf")
22328 (synopsis "Pure Python mDNS service discovery")
22329 (description
22330 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22331 compatible).")
22332 (license license:lgpl2.1+)))
22333
22334 (define-public python-bsddb3
22335 (package
22336 (name "python-bsddb3")
22337 (version "6.2.6")
22338 (source
22339 (origin
22340 (method url-fetch)
22341 (uri (pypi-uri "bsddb3" version))
22342 (sha256
22343 (base32
22344 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
22345 (build-system python-build-system)
22346 (inputs
22347 `(("bdb" ,bdb)))
22348 (arguments
22349 '(#:phases
22350 (modify-phases %standard-phases
22351 (add-after 'unpack 'configure-locations
22352 (lambda* (#:key inputs #:allow-other-keys)
22353 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
22354 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
22355 #t))
22356 (replace 'check
22357 (lambda _
22358 (invoke "python3" "test3.py" "-v"))))))
22359 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
22360 (synopsis "Python bindings for Oracle Berkeley DB")
22361 (description
22362 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
22363 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
22364 Transaction objects, and each of these is exposed as a Python type in the
22365 bsddb3.db module. The database objects can use various access methods: btree,
22366 hash, recno, and queue. Complete support of Berkeley DB distributed
22367 transactions. Complete support for Berkeley DB Replication Manager.
22368 Complete support for Berkeley DB Base Replication. Support for RPC.")
22369 (license license:bsd-3)))
22370
22371 (define-public python-dbfread
22372 (package
22373 (name "python-dbfread")
22374 (version "2.0.7")
22375 (source (origin
22376 (method url-fetch)
22377 (uri (pypi-uri "dbfread" version))
22378 (sha256
22379 (base32
22380 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
22381 (build-system python-build-system)
22382 (native-inputs
22383 `(("python-pytest" ,python-pytest)))
22384 (home-page "https://dbfread.readthedocs.io")
22385 (synopsis "Read DBF Files with Python")
22386 (description
22387 "This library reads DBF files and returns the data as native Python data
22388 types for further processing. It is primarily intended for batch jobs and
22389 one-off scripts.")
22390 (license license:expat)))
22391
22392 (define-public python-cached-property
22393 (package
22394 (name "python-cached-property")
22395 (version "1.5.2")
22396 (source
22397 (origin
22398 (method url-fetch)
22399 (uri (pypi-uri "cached-property" version))
22400 (sha256
22401 (base32
22402 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
22403 (build-system python-build-system)
22404 (arguments
22405 `(#:phases
22406 (modify-phases %standard-phases
22407 ;; https://github.com/pydanny/cached-property/issues/131
22408 ;; recent versions of freezegun break one test
22409 (add-after 'unpack 'disable-broken-test
22410 (lambda _
22411 (substitute* "tests/test_cached_property.py"
22412 (("def test_threads_ttl_expiry\\(self\\)" m)
22413 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
22414 " " m)))
22415 #t)))))
22416 (native-inputs
22417 `(("python-freezegun" ,python-freezegun)))
22418 (home-page
22419 "https://github.com/pydanny/cached-property")
22420 (synopsis
22421 "Decorator for caching properties in classes")
22422 (description
22423 "This package provides a decorator which makes caching
22424 time-or-computationally-expensive properties quick and easy and works in Python
22425 2 or 3.")
22426 (license license:bsd-3)))
22427
22428 (define-public python-folium
22429 (package
22430 (name "python-folium")
22431 (version "0.12.1")
22432 (source
22433 (origin
22434 ;; PyPI has a ".whl" file but not a proper source release.
22435 ;; Thus, fetch code from Git.
22436 (method git-fetch)
22437 (uri (git-reference
22438 (url "https://github.com/python-visualization/folium")
22439 (commit (string-append "v" version))))
22440 (file-name (git-file-name name version))
22441 (sha256
22442 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
22443 (build-system python-build-system)
22444 (propagated-inputs
22445 `(("python-branca" ,python-branca)
22446 ("python-jinja2" ,python-jinja2)
22447 ("python-numpy" ,python-numpy)
22448 ("python-requests" ,python-requests)))
22449 (native-inputs
22450 `(("python-pytest" ,python-pytest)))
22451 (home-page "https://github.com/python-visualization/folium")
22452 (synopsis "Make beautiful maps with Leaflet.js & Python")
22453 (description "@code{folium} makes it easy to visualize data that’s been
22454 manipulated in Python on an interactive leaflet map. It enables both the
22455 binding of data to a map for @code{choropleth} visualizations as well as
22456 passing rich vector/raster/HTML visualizations as markers on the map.
22457
22458 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
22459 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
22460 supports Image, Video, GeoJSON and TopoJSON overlays.")
22461 (license license:expat)))
22462
22463 (define-public jube
22464 (package
22465 ;; This is a command-line tool, so no "python-" prefix.
22466 (name "jube")
22467 (version "2.2.2")
22468 (source (origin
22469 (method url-fetch)
22470 (uri (string-append
22471 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
22472 version))
22473 (sha256
22474 (base32
22475 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
22476 (file-name (string-append "jube-" version ".tar.gz"))))
22477 (build-system python-build-system)
22478 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
22479 (synopsis "Benchmarking environment")
22480 (description
22481 "JUBE helps perform and analyze benchmarks in a systematic way. For each
22482 benchmarked application, benchmark data is stored in a format that allows JUBE
22483 to deduct the desired information. This data can be parsed by automatic pre-
22484 and post-processing scripts that draw information and store it more densely
22485 for manual interpretation.")
22486 (license license:gpl3+)))
22487
22488 (define-public python-pyroutelib3
22489 (package
22490 (name "python-pyroutelib3")
22491 (version "1.3.post1")
22492 (source
22493 (origin
22494 (method url-fetch)
22495 (uri (pypi-uri "pyroutelib3" version))
22496 (sha256
22497 (base32
22498 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
22499 (build-system python-build-system)
22500 (propagated-inputs
22501 `(("python-dateutil" ,python-dateutil)))
22502 (home-page "https://github.com/MKuranowski/pyroutelib3")
22503 (synopsis "Library for simple routing on OSM data")
22504 (description "Library for simple routing on OSM data")
22505 (license license:gpl3+)))
22506
22507 (define-public python-bibtexparser
22508 (package
22509 (name "python-bibtexparser")
22510 (version "1.1.0")
22511 (source
22512 (origin
22513 (method url-fetch)
22514 (uri (pypi-uri "bibtexparser" version))
22515 (sha256
22516 (base32
22517 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
22518 (build-system python-build-system)
22519 (propagated-inputs
22520 `(("python-pyparsing" ,python-pyparsing)))
22521 (native-inputs
22522 `(("python-future" ,python-future)))
22523 (home-page "https://github.com/sciunto-org/python-bibtexparser")
22524 (synopsis "Python library to parse BibTeX files")
22525 (description "BibtexParser is a Python library to parse BibTeX files.")
22526 (license (list license:bsd-3 license:lgpl3))))
22527
22528 (define-public python-distro
22529 (package
22530 (name "python-distro")
22531 (version "1.4.0")
22532 (source
22533 (origin
22534 (method url-fetch)
22535 (uri (pypi-uri "distro" version))
22536 (sha256
22537 (base32
22538 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
22539 (build-system python-build-system)
22540 (native-inputs
22541 `(("python-pytest" ,python-pytest)))
22542 (home-page "https://github.com/nir0s/distro")
22543 (synopsis
22544 "OS platform information API")
22545 (description
22546 "@code{distro} provides information about the OS distribution it runs on,
22547 such as a reliable machine-readable ID, or version information.
22548
22549 It is the recommended replacement for Python's original
22550 `platform.linux_distribution` function (which will be removed in Python 3.8).
22551 @code{distro} also provides a command-line interface to output the platform
22552 information in various formats.")
22553 (license license:asl2.0)))
22554
22555 (define-public python-cairosvg
22556 (package
22557 (name "python-cairosvg")
22558 (version "2.5.0")
22559 (source
22560 (origin
22561 (method url-fetch)
22562 (uri (pypi-uri "CairoSVG" version))
22563 (sha256
22564 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
22565 (build-system python-build-system)
22566 (arguments
22567 `(#:phases
22568 (modify-phases %standard-phases
22569 (replace 'check
22570 (lambda _ (invoke "pytest"))))))
22571 (propagated-inputs
22572 `(("python-cairocffi" ,python-cairocffi)
22573 ("python-cssselect2" ,python-cssselect2)
22574 ("python-defusedxml" ,python-defusedxml)
22575 ("python-pillow" ,python-pillow)
22576 ("python-tinycss2" ,python-tinycss2)))
22577 (native-inputs
22578 `(("python-pytest-flake8" ,python-pytest-flake8)
22579 ("python-pytest-isort" ,python-pytest-isort)
22580 ("python-pytest-runner" ,python-pytest-runner)))
22581 (home-page "https://cairosvg.org/")
22582 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
22583 (description "CairoSVG is a SVG converter based on Cairo. It can export
22584 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
22585 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
22586 parsed, the result is drawn to a Cairo surface that can be exported to
22587 qvarious formats: PDF, PostScript, PNG and even SVG.")
22588 (license license:lgpl3+)))
22589
22590 (define-public python-pyphen
22591 (package
22592 (name "python-pyphen")
22593 (version "0.10.0")
22594 (source
22595 (origin
22596 (method url-fetch)
22597 (uri (pypi-uri "Pyphen" version))
22598 (sha256
22599 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
22600 (build-system python-build-system)
22601 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
22602 ;; embedded set provided by upstream - like Debian does.
22603 (home-page "https://github.com/Kozea/Pyphen")
22604 (synopsis "Pure Python module to hyphenate text")
22605 (description "Pyphen is a pure Python module to hyphenate text using
22606 existing Hunspell hyphenation dictionaries.")
22607 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
22608
22609 (define-public python-intelhex
22610 (package
22611 (name "python-intelhex")
22612 (version "2.2.1")
22613 (source
22614 (origin
22615 (method url-fetch)
22616 (uri (pypi-uri "intelhex" version))
22617 (sha256
22618 (base32
22619 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
22620 (build-system python-build-system)
22621 (arguments '(#:tests? #f)) ;issue with version
22622 (home-page "https://pypi.org/project/IntelHex/")
22623 (synopsis "Python library for Intel HEX files manipulations")
22624 (description "The Intel HEX file format is widely used in microprocessors
22625 and microcontrollers area (embedded systems etc.) as the de facto standard for
22626 representation of code to be programmed into microelectronic devices. This
22627 package provides an intelhex Python library to read, write, create from
22628 scratch and manipulate data from Intel HEX file format. It also includes
22629 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
22630 converters and more, those based on the library itself.")
22631 (license license:bsd-3)))
22632
22633 (define-public python-pykwalify
22634 (package
22635 (name "python-pykwalify")
22636 (version "1.7.0")
22637 (source
22638 (origin
22639 (method url-fetch)
22640 (uri (pypi-uri "pykwalify" version))
22641 (sha256
22642 (base32
22643 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
22644 (build-system python-build-system)
22645 (arguments '(#:tests? #f)) ;missing dependencies
22646 (propagated-inputs
22647 `(("python-dateutil" ,python-dateutil)
22648 ("python-docopt" ,python-docopt)
22649 ("python-pyyaml" ,python-pyyaml)))
22650 (home-page "https://github.com/grokzen/pykwalify")
22651 (synopsis
22652 "Python lib/cli for JSON/YAML schema validation")
22653 (description
22654 "This package provides a parser, schema validator, and data binding tool
22655 for YAML and JSON.")
22656 (license license:expat)))
22657
22658 (define-public python-dbusmock
22659 (package
22660 (name "python-dbusmock")
22661 (version "0.18.3")
22662 (source
22663 (origin
22664 (method url-fetch)
22665 (uri (pypi-uri "python-dbusmock" version))
22666 (sha256
22667 (base32
22668 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
22669 (build-system python-build-system)
22670 (arguments
22671 '(#:phases
22672 (modify-phases %standard-phases
22673 (add-after 'unpack 'patch-shell-path
22674 (lambda _
22675 (substitute* "tests/test_code.py"
22676 (("/bin/bash") (which "bash")))
22677 #t)))))
22678 (native-inputs
22679 `(;; For tests.
22680 ("dbus" ,dbus) ; for dbus-daemon
22681 ("python-nose" ,python-nose)
22682 ("which" ,which)))
22683 (propagated-inputs
22684 `(("python-dbus" ,python-dbus)
22685 ("python-pygobject" ,python-pygobject)))
22686 (home-page "https://github.com/martinpitt/python-dbusmock")
22687 (synopsis "Python library for mock D-Bus objects")
22688 (description "python-dbusmock allows for the easy creation of mock objects on
22689 D-Bus. This is useful for writing tests for software which talks to D-Bus
22690 services such as upower, systemd, logind, gnome-session or others, and it is
22691 hard (or impossible without root privileges) to set the state of the real
22692 services to what you expect in your tests.")
22693 (license license:lgpl3+)))
22694
22695 (define-public python-jsonplus
22696 (package
22697 (name "python-jsonplus")
22698 (version "0.8.0")
22699 (home-page "https://github.com/randomir/jsonplus")
22700 (source (origin
22701 (method url-fetch)
22702 (uri (pypi-uri "jsonplus" version))
22703 (sha256
22704 (base32
22705 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
22706 (build-system python-build-system)
22707 ;; XXX: No tests on PyPI, and the repository has no tags.
22708 (arguments '(#:tests? #f))
22709 (propagated-inputs
22710 `(("python-dateutil" ,python-dateutil)
22711 ("python-simplejson" ,python-simplejson)
22712 ("python-sortedcontainers" ,python-sortedcontainers)))
22713 (synopsis "Serialize Python types to/from JSON")
22714 (description
22715 "This package provides functionality to serialize arbitrary data types
22716 to and from JSON. Common data types are implemented and it is easy to
22717 register custom encoders and decoders.")
22718 (license license:expat)))
22719
22720 (define-public python-ujson
22721 (package
22722 (name "python-ujson")
22723 (version "4.0.2")
22724 (source
22725 (origin
22726 (method url-fetch)
22727 (uri (pypi-uri "ujson" version))
22728 (sha256
22729 (base32
22730 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
22731 (modules '((guix build utils)))
22732 (snippet
22733 '(begin (delete-file-recursively "deps") #t))))
22734 (build-system python-build-system)
22735 (arguments
22736 `(#:phases
22737 (modify-phases %standard-phases
22738 (add-after 'unpack 'link-to-system-double-conversion
22739 (lambda* (#:key inputs #:allow-other-keys)
22740 (let ((d-c (assoc-ref inputs "double-conversion")))
22741 (substitute* "setup.py"
22742 (("./deps/double-conversion/double-conversion\"")
22743 (string-append d-c "/include/double-conversion\""))
22744 (("-lstdc++" stdc)
22745 (string-append "-L" d-c "/lib\","
22746 " \"-ldouble-conversion\","
22747 " \"" stdc)))
22748 #t)))
22749 (replace 'check
22750 (lambda* (#:key inputs outputs #:allow-other-keys)
22751 (add-installed-pythonpath inputs outputs)
22752 (invoke "pytest"))))))
22753 (native-inputs
22754 `(("double-conversion" ,double-conversion)
22755 ("python-setuptools-scm" ,python-setuptools-scm)
22756 ("python-pytest" ,python-pytest)))
22757 (home-page "https://github.com/ultrajson/ultrajson")
22758 (synopsis "Ultra fast JSON encoder and decoder for Python")
22759 (description
22760 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
22761 bindings for Python 3.")
22762 (license license:bsd-3)))
22763
22764 (define-public python-iocapture
22765 ;; The latest release is more than a year older than this commit.
22766 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
22767 (revision "1"))
22768 (package
22769 (name "python-iocapture")
22770 (version "0.1.2")
22771 (source
22772 (origin
22773 (method git-fetch)
22774 (uri (git-reference
22775 (url "https://github.com/oinume/iocapture")
22776 (commit commit)))
22777 (file-name (git-file-name name version))
22778 (sha256
22779 (base32
22780 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
22781 (build-system python-build-system)
22782 (arguments
22783 `(#:phases
22784 (modify-phases %standard-phases
22785 (delete 'check)
22786 (add-after 'install 'check
22787 (lambda* (#:key inputs outputs #:allow-other-keys)
22788 (add-installed-pythonpath inputs outputs)
22789 (invoke "py.test" "-v" "tests")
22790 #t)))))
22791 (propagated-inputs
22792 `(("python-flexmock" ,python-flexmock)
22793 ("python-pytest" ,python-pytest)
22794 ("python-pytest-cov" ,python-pytest-cov)
22795 ("python-six" ,python-six)))
22796 (home-page "https://github.com/oinume/iocapture")
22797 (synopsis "Python capturing tool for stdout and stderr")
22798 (description
22799 "This package helps you to capture the standard out (stdout) and the
22800 standard error channel (stderr) in your program.")
22801 (license license:expat))))
22802
22803 (define-public python-argh
22804 ;; There are 21 commits since the latest release containing important
22805 ;; improvements.
22806 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
22807 (revision "1"))
22808 (package
22809 (name "python-argh")
22810 (version (git-version "0.26.2" revision commit))
22811 (source
22812 (origin
22813 (method git-fetch)
22814 (uri (git-reference
22815 (url "https://github.com/neithere/argh")
22816 (commit commit)))
22817 (file-name (git-file-name name version))
22818 (sha256
22819 (base32
22820 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
22821 (build-system python-build-system)
22822 (propagated-inputs
22823 `(("python-iocapture" ,python-iocapture)
22824 ("python-mock" ,python-mock)
22825 ("python-pytest" ,python-pytest)
22826 ("python-pytest-cov" ,python-pytest-cov)
22827 ("python-pytest-xdist" ,python-pytest-xdist)))
22828 (home-page "https://github.com/neithere/argh/")
22829 (synopsis "Argparse wrapper with natural syntax")
22830 (description
22831 "python-argh is a small library that provides several layers of
22832 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
22833 always possible to declare a command with the highest possible (and least
22834 flexible) layer and then tune the behaviour with any of the lower layers
22835 including the native API of @code{python-argparse}.")
22836 (license license:lgpl3+))))
22837
22838 (define-public python-ppft
22839 (package
22840 (name "python-ppft")
22841 (version "1.6.6.1")
22842 (source
22843 (origin
22844 (method url-fetch)
22845 (uri (pypi-uri "ppft" version))
22846 (sha256
22847 (base32
22848 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
22849 (build-system python-build-system)
22850 (arguments '(#:tests? #f)) ; there are none
22851 (propagated-inputs
22852 `(("python-six" ,python-six)))
22853 (home-page "https://pypi.org/project/ppft/")
22854 (synopsis "Fork of Parallel Python")
22855 (description
22856 "This package is a fork of Parallel Python. The Parallel Python
22857 module (@code{pp}) provides an easy and efficient way to create
22858 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
22859 computers and clusters. It features cross-platform portability and dynamic
22860 load balancing.")
22861 (license license:bsd-3)))
22862
22863 (define-public python-pox
22864 (package
22865 (name "python-pox")
22866 (version "0.2.7")
22867 (source
22868 (origin
22869 (method url-fetch)
22870 (uri (pypi-uri "pox" version))
22871 (sha256
22872 (base32
22873 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
22874 (build-system python-build-system)
22875 (arguments
22876 `(#:phases
22877 (modify-phases %standard-phases
22878 (replace 'check
22879 (lambda _
22880 (mkdir-p "/tmp/guix")
22881 (setenv "SHELL" "bash")
22882 (setenv "USERNAME" "guix")
22883 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
22884 (invoke "py.test" "-vv")
22885 #t)))))
22886 (native-inputs
22887 `(("python-pytest" ,python-pytest)
22888 ("which" ,which)))
22889 (home-page "https://pypi.org/project/pox/")
22890 (synopsis "Python utilities for file system exploration and automated builds")
22891 (description
22892 "Pox provides a collection of utilities for navigating and manipulating
22893 file systems. This module is designed to facilitate some of the low-level
22894 operating system interactions that are useful when exploring a file system on a
22895 remote host. Pox provides Python equivalents of several shell commands such
22896 as @command{which} and @command{find}. These commands allow automated
22897 discovery of what has been installed on an operating system, and where the
22898 essential tools are located.")
22899 (license license:bsd-3)))
22900
22901 (define-public python-pathos
22902 (package
22903 (name "python-pathos")
22904 (version "0.2.5")
22905 (source
22906 (origin
22907 (method url-fetch)
22908 (uri (pypi-uri "pathos" version))
22909 (sha256
22910 (base32
22911 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
22912 (build-system python-build-system)
22913 (arguments
22914 '(#:phases
22915 (modify-phases %standard-phases
22916 (replace 'check
22917 (lambda _
22918 (setenv "PYTHONPATH"
22919 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
22920 (invoke "python" "./tests/__main__.py"))))))
22921 (propagated-inputs
22922 `(("python-dill" ,python-dill)
22923 ("python-multiprocess" ,python-multiprocess)
22924 ("python-pox" ,python-pox)
22925 ("python-ppft" ,python-ppft)))
22926 (native-inputs
22927 `(("python-pytest" ,python-pytest)))
22928 (home-page "https://pypi.org/project/pathos/")
22929 (synopsis
22930 "Parallel graph management and execution in heterogeneous computing")
22931 (description
22932 "Python-pathos is a framework for heterogeneous computing. It provides a
22933 consistent high-level interface for configuring and launching parallel
22934 computations across heterogeneous resources. Python-pathos provides configurable
22935 launchers for parallel and distributed computing, where each launcher contains
22936 the syntactic logic to configure and launch jobs in an execution environment.")
22937 (license license:bsd-3)))
22938
22939 (define-public python-flit
22940 (package
22941 (name "python-flit")
22942 (version "3.2.0")
22943 ;; We fetch the sources via git because on pypi the package is split into
22944 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
22945 (source (origin
22946 (method git-fetch)
22947 (uri (git-reference
22948 (url "https://github.com/takluyver/flit")
22949 (commit version)))
22950 (file-name (git-file-name name version))
22951 (sha256
22952 (base32
22953 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
22954 (build-system python-build-system)
22955 (arguments
22956 `(#:phases
22957 (modify-phases %standard-phases
22958 (add-before 'build 'bootstrap
22959 (lambda* (#:key inputs #:allow-other-keys)
22960 (let ((home (string-append (getcwd) "/home")))
22961 (mkdir-p home)
22962 (setenv "HOME" home))
22963 (for-each make-file-writable (find-files "."))
22964 (copy-recursively (assoc-ref inputs "python-testpath")
22965 (string-append (getcwd) "/testpath"))
22966 (substitute* "pyproject.toml"
22967 (("\"testpath\",") ""))
22968 (invoke "python" "bootstrap_dev.py")))
22969 (replace 'build
22970 (lambda _
22971 ;; A ZIP archive should be generated, but it fails with "ZIP does
22972 ;; not support timestamps before 1980". Luckily,
22973 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
22974 ;; 1980.
22975 (setenv "SOURCE_DATE_EPOCH" "315532800")
22976 (for-each (lambda (toml)
22977 (invoke "python3" "-m" "flit"
22978 "--debug" "--ini-file" toml
22979 "build"))
22980 '("testpath/pyproject.toml"
22981 "pyproject.toml"))
22982 (with-directory-excursion "flit_core"
22983 (invoke "python" "build_dists.py"))))
22984 (replace 'install
22985 (lambda* (#:key inputs outputs #:allow-other-keys)
22986 (add-installed-pythonpath inputs outputs)
22987 (let ((out (assoc-ref outputs "out")))
22988 (delete-file-recursively "./home")
22989 (for-each (lambda (wheel)
22990 (format #true wheel)
22991 (invoke "python" "-m" "pip" "install"
22992 wheel (string-append "--prefix=" out)))
22993 (append
22994 (find-files "flit_core/dist" "\\.whl$")
22995 (find-files "dist" "\\.whl$")))))))
22996 #:tests? #f)) ; XXX: Check requires network access.
22997 (propagated-inputs
22998 `(("python-pytoml" ,python-pytoml)
22999 ("python-toml" ,python-toml)))
23000 (native-inputs
23001 `(("python-docutils" ,python-docutils)
23002 ("python-responses" ,python-responses)
23003 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
23004 ("python-pytest" ,python-pytest)
23005 ("python-pytest-cov" ,python-pytest-cov)
23006 ("python-sphinx" ,python-sphinx)
23007 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
23008 ;; This package needs testpath, but testpath also needs flit...
23009 ("python-testpath"
23010 ,(let ((name "python-testpath")
23011 (version "0.4.4"))
23012 (origin
23013 (method git-fetch)
23014 (uri (git-reference
23015 (url "https://github.com/jupyter/testpath")
23016 (commit version)))
23017 (file-name (git-file-name name version))
23018 (sha256
23019 (base32
23020 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
23021 (home-page "https://flit.readthedocs.io/")
23022 (synopsis
23023 "Simple packaging tool for simple packages")
23024 (description
23025 "Flit is a simple way to put Python packages and modules on PyPI. Flit
23026 packages a single importable module or package at a time, using the import
23027 name as the name on PyPI. All subpackages and data files within a package
23028 are included automatically.")
23029 (license license:bsd-3)))
23030
23031 (define-public python-pathtools
23032 (package
23033 (name "python-pathtools")
23034 (version "0.1.2")
23035 (source
23036 (origin
23037 (method url-fetch)
23038 (uri (pypi-uri "pathtools" version))
23039 (sha256
23040 (base32
23041 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
23042 (build-system python-build-system)
23043 (home-page
23044 "https://github.com/gorakhargosh/pathtools")
23045 (synopsis "Path utilities for Python")
23046 (description "Pattern matching and various utilities for file systems
23047 paths.")
23048 (license license:expat)))
23049
23050 (define-public python-fastentrypoints
23051 (package
23052 (name "python-fastentrypoints")
23053 (version "0.12")
23054 (source
23055 (origin
23056 (method url-fetch)
23057 (uri (pypi-uri "fastentrypoints" version))
23058 (sha256
23059 (base32
23060 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
23061 (build-system python-build-system)
23062 (home-page
23063 "https://github.com/ninjaaron/fast-entry_points")
23064 (synopsis
23065 "Makes entry_points specified in setup.py load more quickly")
23066 (description
23067 "Using entry_points in your setup.py makes scripts that start really
23068 slowly because it imports pkg_resources. This package allows such setup
23069 scripts to load entry points more quickly.")
23070 (license license:bsd-3)))
23071
23072 (define-public python-funcparserlib
23073 (package
23074 (name "python-funcparserlib")
23075 (version "0.3.6")
23076 (source
23077 (origin
23078 (method url-fetch)
23079 (uri (pypi-uri "funcparserlib" version))
23080 (sha256
23081 (base32
23082 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
23083 (native-inputs
23084 `(("python-tox" ,python-tox)))
23085 (arguments
23086 `(#:phases
23087 (modify-phases %standard-phases
23088 (replace 'check
23089 (lambda _
23090 (invoke "tox"))))))
23091 (build-system python-build-system)
23092 (home-page
23093 "https://github.com/vlasovskikh/funcparserlib")
23094 (synopsis
23095 "Recursive descent parsing library based on functional combinators")
23096 (description
23097 "This package is a recursive descent parsing library for Python based on
23098 functional combinators. Parser combinators are just higher-order functions
23099 that take parsers as their arguments and return them as result values.")
23100 (license license:expat)))
23101
23102 (define-public python-speg
23103 (package
23104 (name "python-speg")
23105 (version "0.3")
23106 (source
23107 (origin
23108 (method url-fetch)
23109 (uri (pypi-uri "speg" version ".zip"))
23110 (sha256
23111 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
23112 (arguments
23113 `(#:tests? #f)) ;FIXME: tests fail, not sure why
23114 (native-inputs
23115 `(("unzip" ,unzip)))
23116 (build-system python-build-system)
23117 (home-page "https://github.com/avakar/speg")
23118 (synopsis "PEG-based parser interpreter with memoization")
23119 (description "This package is a PEG-based parser and interpreter with
23120 memoization.")
23121 (license license:expat)))
23122
23123 (define-public python-cson
23124 (package
23125 (name "python-cson")
23126 (version "0.8")
23127 (source
23128 (origin
23129 (method url-fetch)
23130 (uri (pypi-uri "cson" version))
23131 (sha256
23132 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
23133 (build-system python-build-system)
23134 (propagated-inputs
23135 `(("python-speg" ,python-speg)))
23136 (home-page "https://github.com/avakar/pycson")
23137 (synopsis "Parser for Coffeescript Object Notation (CSON)")
23138 (description "This package is a parser for Coffeescript Object
23139 Notation (CSON).")
23140 (license license:expat)))
23141
23142 (define-public python-asynctest
23143 (package
23144 (name "python-asynctest")
23145 (version "0.13.0")
23146 (source
23147 (origin
23148 (method url-fetch)
23149 (uri (pypi-uri "asynctest" version))
23150 (sha256
23151 (base32
23152 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
23153 (build-system python-build-system)
23154 (arguments
23155 '(#:phases
23156 (modify-phases %standard-phases
23157 (replace 'check
23158 (lambda _
23159 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
23160 (add-after 'unpack 'disable-tests
23161 (lambda* _
23162 ;; XXX: 7 tests fail out of 220. Disable them for now.
23163 (substitute* (list "test/test_selector.py"
23164 "test/test_mock.py")
23165 (("def test_events_watched_outside_test_are_ignored")
23166 "@unittest.skip('disabled by guix')
23167 def test_events_watched_outside_test_are_ignored")
23168 (("def test_awaited_from_autospec_mock.*" line)
23169 (string-append line " return True\n"))
23170 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
23171 (string-append line " return True\n"))
23172 (("def test_patch_coroutine_with_multiple_scopes.*" line)
23173 (string-append line " return True\n"))
23174 (("def test_multiple_patches_on_coroutine.*" line)
23175 (string-append line " return True\n"))
23176 (("def test_patch_coroutine_only_when_running.*" line)
23177 (string-append line " return True\n")))
23178 #t)))))
23179 (home-page "https://github.com/Martiusweb/asynctest")
23180 (synopsis "Extension of unittest for testing asyncio libraries")
23181 (description
23182 "The package asynctest is built on top of the standard unittest module
23183 and cuts down boilerplate code when testing libraries for asyncio.")
23184 (license license:asl2.0)))
23185
23186 (define-public python-aionotify
23187 (package
23188 (name "python-aionotify")
23189 (version "0.2.0")
23190 (source
23191 (origin
23192 ;; Source tarball on PyPi lacks tests
23193 (method git-fetch)
23194 (uri (git-reference
23195 (url "https://github.com/rbarrois/aionotify")
23196 (commit (string-append "v" version))))
23197 (file-name (git-file-name name version))
23198 (sha256
23199 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
23200 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
23201 (build-system python-build-system)
23202 (home-page "https://github.com/rbarrois/aionotify")
23203 (synopsis "Asyncio-powered inotify library")
23204 (description
23205 "@code{aionotify} is a simple, asyncio-based inotify library.")
23206 (license license:bsd-3)))
23207
23208 (define-public python-forbiddenfruit
23209 (package
23210 (name "python-forbiddenfruit")
23211 (version "0.1.3")
23212 (source
23213 (origin
23214 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
23215 (method git-fetch)
23216 (uri (git-reference
23217 (url "https://github.com/clarete/forbiddenfruit")
23218 (commit version)))
23219 (file-name (git-file-name name version))
23220 (sha256
23221 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
23222 (build-system python-build-system)
23223 (arguments
23224 '(#:phases
23225 (modify-phases %standard-phases
23226 (replace 'check
23227 (lambda _
23228 (invoke "make" "SKIP_DEPS=1"))))))
23229 (native-inputs
23230 `(("python-nose" ,python-nose)
23231 ("python-coverage" ,python-coverage)))
23232 (home-page "https://github.com/clarete/forbiddenfruit")
23233 (synopsis "Patch python built-in objects")
23234 (description "This project allows Python code to extend built-in types.")
23235 (license (list license:gpl3+ license:expat))))
23236
23237 (define-public python-k5test
23238 (package
23239 (name "python-k5test")
23240 (version "0.9.2")
23241 (source
23242 (origin
23243 (method url-fetch)
23244 (uri (pypi-uri "k5test" version))
23245 (sha256
23246 (base32
23247 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
23248 (build-system python-build-system)
23249 (propagated-inputs
23250 `(("python-six" ,python-six)
23251 ;; `which`, `kadmin.local` binaries called inside library
23252 ("which" ,which)
23253 ("mit-krb5" ,mit-krb5)))
23254 (native-inputs `(("mit-krb5" ,mit-krb5)))
23255 (arguments
23256 '(#:phases
23257 (modify-phases %standard-phases
23258 (add-after 'unpack 'patch-paths
23259 (lambda* _
23260 (substitute* "k5test/realm.py"
23261 (("'kadmin_local'") "'kadmin.local'")))))))
23262 (home-page "https://github.com/pythongssapi/k5test")
23263 (synopsis "Library for setting up self-contained Kerberos 5 environments")
23264 (description
23265 "@code{k5test} is a library for setting up self-contained Kerberos 5
23266 environments, and running Python unit tests inside those environments. It is
23267 based on the file of the same name found alongside the MIT Kerberos 5 unit
23268 tests.")
23269 (license license:isc)))
23270
23271 (define-public python-gssapi
23272 (package
23273 (name "python-gssapi")
23274 (version "1.6.12")
23275 (source
23276 (origin
23277 (method url-fetch)
23278 (uri (pypi-uri "gssapi" version))
23279 (sha256
23280 (base32
23281 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
23282 (build-system python-build-system)
23283 (propagated-inputs
23284 `(("python-decorator" ,python-decorator)
23285 ("python-six" ,python-six)))
23286 (inputs
23287 `(("mit-krb5" ,mit-krb5)))
23288 ;; for tests
23289 (native-inputs
23290 `(("python-parameterized" ,python-parameterized)
23291 ("python-k5test" ,python-k5test)
23292 ("python-nose" ,python-nose)))
23293 (home-page "https://github.com/pythongssapi/python-gssapi")
23294 (synopsis "Python GSSAPI Wrapper")
23295 (description
23296 "Python-GSSAPI provides both low-level and high level wrappers around the
23297 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
23298 also be usable with other GSSAPI mechanisms.")
23299 (license license:isc)))
23300
23301 (define-public python-check-manifest
23302 (package
23303 (name "python-check-manifest")
23304 (version "0.37")
23305 (source
23306 (origin
23307 (method url-fetch)
23308 (uri (pypi-uri "check-manifest" version))
23309 (sha256
23310 (base32
23311 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
23312 (build-system python-build-system)
23313 (native-inputs
23314 `(("python-mock" ,python-mock)
23315 ("git" ,git)))
23316 (home-page "https://github.com/mgedmin/check-manifest")
23317 (synopsis "Check MANIFEST.in in a Python source package for completeness")
23318 (description "Python package can include a MANIFEST.in file to help with
23319 sending package files to the Python Package Index. This package checks that
23320 file to ensure it completely and accurately describes your project.")
23321 (license license:expat)))
23322
23323 (define-public python-android-stringslib
23324 (package
23325 (name "python-android-stringslib")
23326 (version "0.1.2")
23327 (source
23328 (origin
23329 (method git-fetch)
23330 (uri (git-reference
23331 (url "https://framagit.org/tyreunom/python-android-strings-lib")
23332 (commit (string-append "v" version))))
23333 (file-name (git-file-name name version))
23334 (sha256
23335 (base32
23336 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
23337 (build-system python-build-system)
23338 (arguments
23339 `(#:tests? #f))
23340 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
23341 (synopsis "Android strings.xml support")
23342 (description "Android Strings Lib provides support for android's strings.xml
23343 files. These files are used to translate strings in android apps.")
23344 (license license:expat)))
23345
23346 (define-public python-watchdog
23347 (package
23348 (name "python-watchdog")
23349 (version "0.9.0")
23350 (source
23351 (origin
23352 (method url-fetch)
23353 (uri (pypi-uri "watchdog" version))
23354 (sha256
23355 (base32
23356 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
23357 (build-system python-build-system)
23358 (arguments
23359 `(#:phases
23360 (modify-phases %standard-phases
23361 (add-before 'check 'remove-failing
23362 (lambda _
23363 (delete-file "tests/test_inotify_buffer.py")
23364 (delete-file "tests/test_snapshot_diff.py")
23365 #t)))))
23366 (propagated-inputs
23367 `(("python-argh" ,python-argh)
23368 ("python-pathtools" ,python-pathtools)
23369 ("python-pyyaml" ,python-pyyaml)))
23370 (native-inputs
23371 `(("python-pytest-cov" ,python-pytest-cov)
23372 ("python-pytest-timeout" ,python-pytest-timeout)))
23373 (home-page "https://github.com/gorakhargosh/watchdog")
23374 (synopsis "File system events monitoring")
23375 (description "This package provides a way to monitor file system events
23376 such as a file modification and trigger an action. This is similar to inotify,
23377 but portable.")
23378 (license license:asl2.0)))
23379
23380 (define-public python-watchgod
23381 (package
23382 (name "python-watchgod")
23383 (version "0.6")
23384 (source
23385 (origin
23386 ;; There are no tests in the PyPI tarball.
23387 (method git-fetch)
23388 (uri (git-reference
23389 (url "https://github.com/samuelcolvin/watchgod")
23390 (commit (string-append "v" version))))
23391 (file-name (git-file-name name version))
23392 (sha256
23393 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
23394 (build-system python-build-system)
23395 (arguments
23396 `(#:phases
23397 (modify-phases %standard-phases
23398 (replace 'check
23399 (lambda _
23400 (invoke "pytest" "-vv"))))))
23401 (native-inputs
23402 `(("python-coverage" ,python-coverage)
23403 ("python-docutils" ,python-docutils)
23404 ("python-flake8" ,python-flake8)
23405 ("python-isort" ,python-isort)
23406 ("python-pycodestyle" ,python-pycodestyle)
23407 ("python-pyflakes" ,python-pyflakes)
23408 ("python-pygments" ,python-pygments)
23409 ("python-pytest" ,python-pytest)
23410 ("python-pytest-cov" ,python-pytest-cov)
23411 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
23412 ("python-pytest-mock" ,python-pytest-mock)
23413 ("python-pytest-sugar" ,python-pytest-sugar)
23414 ("python-pytest-toolbox" ,python-pytest-toolbox)))
23415 (home-page "https://github.com/samuelcolvin/watchgod")
23416 (synopsis "Simple, modern file watching and code reload in Python")
23417 (description
23418 "Simple, modern file watching and code reload in Python inspired by
23419 @code{watchdog}. Among the differences are a unified approach for each
23420 operating systems and an elegant approach to concurrency using threading.")
23421 (license license:expat)))
23422
23423 (define-public python-wget
23424 (package
23425 (name "python-wget")
23426 (version "3.2")
23427 (source
23428 (origin
23429 (method url-fetch)
23430 (uri (pypi-uri "wget" version ".zip"))
23431 (sha256
23432 (base32
23433 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
23434 (build-system python-build-system)
23435 (native-inputs `(("unzip" ,unzip)))
23436 (home-page "https://bitbucket.org/techtonik/python-wget/")
23437 (synopsis "Pure Python download utility")
23438 (description "The python-wget library provides an API to download files
23439 with features similar to the @command{wget} utility.")
23440 (license license:unlicense)))
23441
23442 (define-public offlate
23443 (package
23444 (name "offlate")
23445 (version "0.5")
23446 (source
23447 (origin
23448 (method git-fetch)
23449 (uri (git-reference
23450 (url "https://framagit.org/tyreunom/offlate")
23451 (commit version)))
23452 (file-name (git-file-name name version))
23453 (sha256
23454 (base32
23455 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
23456 (build-system python-build-system)
23457 (arguments
23458 ;; No tests
23459 `(#:tests? #f))
23460 (propagated-inputs
23461 `(("python-android-stringslib" ,python-android-stringslib)
23462 ("python-dateutil" ,python-dateutil)
23463 ("python-gitlab" ,python-gitlab)
23464 ("python-lxml" ,python-lxml)
23465 ("python-polib" ,python-polib)
23466 ("python-pyenchant" ,python-pyenchant)
23467 ("python-pygit2" ,python-pygit2)
23468 ("python-pygithub" ,python-pygithub)
23469 ("python-pyqt" ,python-pyqt)
23470 ("python-requests" ,python-requests)
23471 ("python-ruamel.yaml" ,python-ruamel.yaml)
23472 ("python-translation-finder" ,python-translation-finder)
23473 ("python-watchdog" ,python-watchdog)))
23474 (native-inputs
23475 `(("qttools" ,qttools)))
23476 (home-page "https://framagit.org/tyreunom/offlate")
23477 (synopsis "Offline translation interface for online translation tools")
23478 (description "Offlate offers a unified interface for different translation
23479 file formats, as well as many different online translation platforms. You can
23480 use it to get work from online platforms, specialized such as the Translation
23481 Project, or not such a gitlab instance when your upstream doesn't use any
23482 dedicated platform. The tool proposes a unified interface for any format and
23483 an upload option to send your work back to the platform.")
23484 (license license:gpl3+)))
23485
23486 (define-public python-titlecase
23487 (package
23488 (name "python-titlecase")
23489 (version "0.12.0")
23490 (source
23491 (origin
23492 (method url-fetch)
23493 (uri (pypi-uri "titlecase" version))
23494 (sha256
23495 (base32
23496 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
23497 (build-system python-build-system)
23498 (native-inputs
23499 `(("python-nose" ,python-nose)))
23500 (home-page "https://github.com/ppannuto/python-titlecase")
23501 (synopsis "Capitalize strings similar to book titles")
23502 (description
23503 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
23504 It capitalizes (predominantly English) strings in a way that is similar to
23505 book titles, using the New York Times Manual of Style to leave certain words
23506 lowercase.")
23507 (license license:expat)))
23508
23509 (define-public python-pypng
23510 (package
23511 (name "python-pypng")
23512 (version "0.0.20")
23513 (source
23514 (origin
23515 (method url-fetch)
23516 (uri (pypi-uri "pypng" version))
23517 (sha256
23518 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
23519 (build-system python-build-system)
23520 (home-page "https://github.com/drj11/pypng")
23521 (synopsis "Pure Python PNG image encoder/decoder")
23522 (description
23523 "The PyPNG module implements support for PNG images. It reads and writes
23524 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
23525 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
23526 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
23527 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
23528 A number of optional chunks can be specified (when writing) and
23529 understood (when reading): tRNS, bKGD, gAMA.
23530
23531 PyPNG is not a high level toolkit for image processing (like PIL) and does not
23532 aim at being a replacement or competitor. Its strength lies in fine-grained
23533 extensive support of PNG features. It can also read and write Netpbm PAM
23534 files, with a focus on its use as an intermediate format for implementing
23535 custom PNG processing.")
23536 (license license:expat)))
23537
23538 (define-public python-fuzzywuzzy
23539 (package
23540 (name "python-fuzzywuzzy")
23541 (version "0.18.0")
23542 (source
23543 (origin
23544 (method url-fetch)
23545 (uri (pypi-uri "fuzzywuzzy" version))
23546 (sha256
23547 (base32
23548 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
23549 (build-system python-build-system)
23550 (native-inputs
23551 `(("python-hypothesis" ,python-hypothesis)
23552 ("python-pycodestyle" ,python-pycodestyle)
23553 ("python-pytest" ,python-pytest)))
23554 (propagated-inputs
23555 `(("python-levenshtein" ,python-levenshtein)))
23556 (home-page "https://github.com/seatgeek/fuzzywuzzy")
23557 (synopsis "Fuzzy string matching in Python")
23558 (description "Approximate string matching using
23559 @emph{Levenshtein Distance} to calculate the differences between
23560 sequences.")
23561 (license license:gpl2)))
23562
23563 (define-public python2-fuzzywuzzy
23564 (package-with-python2 python-fuzzywuzzy))
23565
23566 (define-public python-block-tracing
23567 (package
23568 (name "python-block-tracing")
23569 (version "1.0.1")
23570 (source
23571 (origin
23572 (method url-fetch)
23573 (uri (pypi-uri "block_tracing" version))
23574 (sha256
23575 (base32
23576 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
23577 (build-system python-build-system)
23578 (arguments '(#:tests? #f)) ; no tests
23579 (home-page "https://github.com/rianhunter/block_tracing")
23580 (synopsis "Protect process memory")
23581 (description
23582 "@code{block_tracing} is a tiny Python library that can be used to
23583 prevent debuggers and other applications from inspecting the memory within
23584 your process.")
23585 (license license:expat)))
23586
23587 (define-public python-gcovr
23588 (package
23589 (name "python-gcovr")
23590 (version "4.2")
23591 (source
23592 (origin
23593 (method url-fetch)
23594 (uri (pypi-uri "gcovr" version))
23595 (sha256
23596 (base32
23597 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
23598 (build-system python-build-system)
23599 (propagated-inputs
23600 `(("python-lxml" ,python-lxml)
23601 ("python-jinja2" ,python-jinja2)))
23602 (home-page "https://gcovr.com/")
23603 (synopsis "Utility for generating code coverage results")
23604 (description
23605 "Gcovr provides a utility for managing the use of the GNU gcov
23606 utility and generating summarized code coverage results. It is inspired
23607 by the Python coverage.py package, which provides a similar utility for
23608 Python.")
23609 (license license:bsd-3)))
23610
23611 (define-public python-owslib
23612 (package
23613 (name "python-owslib")
23614 (version "0.19.2")
23615 (source
23616 (origin
23617 (method url-fetch)
23618 (uri (pypi-uri "OWSLib" version))
23619 (sha256
23620 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
23621 (build-system python-build-system)
23622 (arguments
23623 '(#:tests? #f)) ; TODO: package dependencies required for tests.
23624 (synopsis "Interface for Open Geospatial Consortium web service")
23625 (description
23626 "OWSLib is a Python package for client programming with Open Geospatial
23627 Consortium (OGC) web service (hence OWS) interface standards, and their related
23628 content models.")
23629 (home-page "https://geopython.github.io/OWSLib/")
23630 (license license:bsd-3)))
23631
23632 (define-public python-docusign-esign
23633 (package
23634 (name "python-docusign-esign")
23635 (version "3.1.0")
23636 (source (origin
23637 (method url-fetch)
23638 (uri (pypi-uri "docusign_esign" version))
23639 (sha256
23640 (base32
23641 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
23642 (build-system python-build-system)
23643 ;; Testing requires undocumented setup changes, and so testing is disabled here.
23644 (arguments `(#:tests? #f))
23645 (propagated-inputs
23646 `(("python-certifi" ,python-certifi)
23647 ("python-six" ,python-six)
23648 ("python-dateutil" ,python-dateutil)
23649 ("python-urllib3" ,python-urllib3)
23650 ("python-pyjwt" ,python-pyjwt)
23651 ("python-cryptography" ,python-cryptography)
23652 ("python-nose" ,python-nose)))
23653 (synopsis "DocuSign Python Client")
23654 (description "The Official DocuSign Python Client Library used to interact
23655 with the eSign REST API. Send, sign, and approve documents using this client.")
23656 (home-page "https://www.docusign.com/devcenter")
23657 (license license:expat)))
23658
23659 (define-public python-xattr
23660 (package
23661 (name "python-xattr")
23662 (version "0.9.7")
23663 (source
23664 (origin
23665 (method url-fetch)
23666 (uri (pypi-uri "xattr" version))
23667 (sha256
23668 (base32
23669 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
23670 (build-system python-build-system)
23671 (propagated-inputs
23672 `(("python-cffi" ,python-cffi)))
23673 (home-page "https://github.com/xattr/xattr")
23674 (synopsis
23675 "Python wrapper for extended file system attributes")
23676 (description "This package provides a Python wrapper for using extended
23677 file system attributes. Extended attributes extend the basic attributes of files
23678 and directories in the file system. They are stored as name:data pairs
23679 associated with file system objects (files, directories, symlinks, etc).")
23680 (license license:expat)))
23681
23682 (define-public python-json-logger
23683 (package
23684 (name "python-json-logger")
23685 (version "0.1.11")
23686 (source
23687 (origin
23688 (method url-fetch)
23689 (uri (pypi-uri "python-json-logger" version))
23690 (sha256
23691 (base32
23692 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
23693 (build-system python-build-system)
23694 (home-page
23695 "https://github.com/madzak/python-json-logger")
23696 (synopsis "JSON log formatter in Python")
23697 (description "This library allows standard Python logging to output log data
23698 as JSON objects. With JSON we can make our logs more readable by machines and
23699 we can stop writing custom parsers for syslog-type records.")
23700 (license license:bsd-3)))
23701
23702 (define-public python-daiquiri
23703 (package
23704 (name "python-daiquiri")
23705 (version "2.1.1")
23706 (source
23707 (origin
23708 (method url-fetch)
23709 (uri (pypi-uri "daiquiri" version))
23710 (sha256
23711 (base32
23712 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
23713 (build-system python-build-system)
23714 (propagated-inputs
23715 `(("python-json-logger" ,python-json-logger)))
23716 (native-inputs
23717 `(("python-mock" ,python-mock)
23718 ("python-pytest" ,python-pytest)
23719 ("python-setuptools-scm" ,python-setuptools-scm)
23720 ("python-six" ,python-six)))
23721 (home-page "https://github.com/jd/daiquiri")
23722 (synopsis
23723 "Library to configure Python logging easily")
23724 (description "The daiquiri library provides an easy way to configure
23725 logging in Python. It also provides some custom formatters and handlers.")
23726 (license license:asl2.0)))
23727
23728 (define-public python-pifpaf
23729 (package
23730 (name "python-pifpaf")
23731 (version "2.5.0")
23732 (source
23733 (origin
23734 (method url-fetch)
23735 (uri (pypi-uri "pifpaf" version))
23736 (sha256
23737 (base32
23738 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
23739 (build-system python-build-system)
23740 (arguments
23741 '(#:phases
23742 (modify-phases %standard-phases
23743 (replace 'check
23744 (lambda _
23745 (invoke "python" "setup.py" "testr" "--slowest"
23746 "--testr-args=until-failure"))))))
23747 (propagated-inputs
23748 `(("python-click" ,python-click)
23749 ("python-daiquiri" ,python-daiquiri)
23750 ("python-fixtures" ,python-fixtures)
23751 ("python-jinja2" ,python-jinja2)
23752 ("python-pbr" ,python-pbr)
23753 ("python-psutil" ,python-psutil)
23754 ("python-six" ,python-six)
23755 ("python-xattr" ,python-xattr)))
23756 (native-inputs
23757 `(("python-mock" ,python-mock)
23758 ("python-os-testr" ,python-os-testr)
23759 ("python-requests" ,python-requests)
23760 ("python-testrepository" ,python-testrepository)
23761 ("python-testtools" ,python-testtools)))
23762 (home-page "https://github.com/jd/pifpaf")
23763 (synopsis "Tools and fixtures to manage daemons for testing in Python")
23764 (description "Pifpaf is a suite of fixtures and a command-line tool that
23765 starts and stops daemons for a quick throw-away usage. This is typically
23766 useful when needing these daemons to run integration testing. It originally
23767 evolved from its precursor @code{overtest}.")
23768 (license license:asl2.0)))
23769
23770 (define-public python-pytest-check-links
23771 (package
23772 (name "python-pytest-check-links")
23773 (version "0.3.0")
23774 (source
23775 (origin
23776 (method url-fetch)
23777 ;; URI uses underscores
23778 (uri (pypi-uri "pytest_check_links" version))
23779 (sha256
23780 (base32
23781 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
23782 (build-system python-build-system)
23783 (propagated-inputs
23784 `(("python-docutils" ,python-docutils)
23785 ("python-html5lib" ,python-html5lib)
23786 ("python-nbconvert" ,python-nbconvert)
23787 ("python-nbformat" ,python-nbformat)
23788 ("python-pytest" ,python-pytest)
23789 ("python-six" ,python-six)))
23790 (native-inputs
23791 `(("python-pbr-minimal" ,python-pbr-minimal)))
23792 (home-page "https://github.com/minrk/pytest-check-links")
23793 (synopsis "Check links in files")
23794 (description "This package provides a pytest plugin that checks URLs for
23795 HTML-containing files.")
23796 (license license:bsd-3)))
23797
23798 (define-public python-json5
23799 (package
23800 (name "python-json5")
23801 (version "0.8.5")
23802 (source
23803 (origin
23804 ;; sample.json5 is missing from PyPi source tarball
23805 (method git-fetch)
23806 (uri (git-reference
23807 (url "https://github.com/dpranke/pyjson5")
23808 (commit (string-append "v" version))))
23809 (file-name (git-file-name name version))
23810 (sha256
23811 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
23812 (build-system python-build-system)
23813 (home-page "https://github.com/dpranke/pyjson5")
23814 (synopsis
23815 "Python implementation of the JSON5 data format")
23816 (description
23817 "JSON5 extends the JSON data interchange format to make it slightly more
23818 usable as a configuration language. This Python package implements parsing and
23819 dumping of JSON5 data structures.")
23820 (license license:asl2.0)))
23821
23822 (define-public python-frozendict
23823 (package
23824 (name "python-frozendict")
23825 (version "1.2")
23826 (source
23827 (origin
23828 (method url-fetch)
23829 (uri (pypi-uri "frozendict" version))
23830 (sha256
23831 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
23832 (build-system python-build-system)
23833 (home-page "https://github.com/slezica/python-frozendict")
23834 (synopsis "Simple immutable mapping for Python")
23835 (description
23836 "@dfn{frozendict} is an immutable wrapper around dictionaries that
23837 implements the complete mapping interface. It can be used as a drop-in
23838 replacement for dictionaries where immutability is desired.")
23839 (license license:expat)))
23840
23841 (define-public python-unpaddedbase64
23842 (package
23843 (name "python-unpaddedbase64")
23844 (version "1.1.0")
23845 (source
23846 (origin
23847 (method git-fetch)
23848 (uri (git-reference
23849 (url "https://github.com/matrix-org/python-unpaddedbase64")
23850 (commit (string-append "v" version))))
23851 (file-name (git-file-name name version))
23852 (sha256
23853 (base32
23854 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
23855 (build-system python-build-system)
23856 (home-page "https://pypi.org/project/unpaddedbase64/")
23857 (synopsis "Encode and decode Base64 without “=” padding")
23858 (description
23859 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
23860 using “=” characters. However this conveys no benefit so many protocols
23861 choose to use Base64 without the “=” padding.")
23862 (license license:asl2.0)))
23863
23864 (define-public python-py-cpuinfo
23865 (package
23866 (name "python-py-cpuinfo")
23867 (version "5.0.0")
23868 (source
23869 (origin
23870 (method url-fetch)
23871 (uri (pypi-uri "py-cpuinfo" version))
23872 (sha256
23873 (base32
23874 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
23875 (build-system python-build-system)
23876 (home-page "https://github.com/workhorsy/py-cpuinfo")
23877 (synopsis "Get CPU info with Python")
23878 (description
23879 "This Python module returns the CPU info by using the best sources of
23880 information for your operating system.")
23881 (license license:expat)))
23882
23883 (define-public python-canonicaljson
23884 (package
23885 (name "python-canonicaljson")
23886 (version "1.4.0")
23887 (source
23888 (origin
23889 (method url-fetch)
23890 (uri (pypi-uri "canonicaljson" version))
23891 (sha256
23892 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
23893 (build-system python-build-system)
23894 (propagated-inputs
23895 `(("python-six" ,python-six)
23896 ("python-frozendict" ,python-frozendict)
23897 ("python-simplejson" ,python-simplejson)))
23898 (home-page "https://github.com/matrix-org/python-canonicaljson")
23899 (synopsis "Canonical JSON")
23900 (description
23901 "Deterministically encode JSON.
23902
23903 @itemize
23904 @item Encodes objects and arrays as RFC 7159 JSON.
23905 @item Sorts object keys so that you get the same result each time.
23906 @item Has no insignificant whitespace to make the output as small as possible.
23907 @item Escapes only the characters that must be escaped, U+0000 to
23908 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
23909 @item Uses the shortest escape sequence for each escaped character.
23910 @item Encodes the JSON as UTF-8.
23911 @item Can encode frozendict immutable dictionaries.
23912 @end itemize")
23913 (license license:asl2.0)))
23914
23915 (define-public python-signedjson
23916 (package
23917 (name "python-signedjson")
23918 (version "1.1.1")
23919 (source
23920 (origin
23921 (method url-fetch)
23922 (uri (pypi-uri "signedjson" version))
23923 (sha256
23924 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
23925 (build-system python-build-system)
23926 (propagated-inputs
23927 `(("python-canonicaljson" ,python-canonicaljson)
23928 ("python-importlib-metadata" ,python-importlib-metadata)
23929 ("python-pynacl" ,python-pynacl)
23930 ("python-typing-extensions" ,python-typing-extensions)
23931 ("python-unpaddedbase64" ,python-unpaddedbase64)))
23932 (native-inputs
23933 `(("python-setuptools-scm" ,python-setuptools-scm)))
23934 (home-page "https://github.com/matrix-org/python-signedjson")
23935 (synopsis "Sign JSON objects with ED25519 signatures")
23936 (description
23937 "Sign JSON objects with ED25519 signatures.
23938
23939 @itemize
23940 @item More than one entity can sign the same object.
23941 @item Each entity can sign the object with more than one key making it easier to
23942 rotate keys
23943 @item ED25519 can be replaced with a different algorithm.
23944 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
23945 key.
23946 @end itemize")
23947 (license license:asl2.0)))
23948
23949 (define-public python-daemonize
23950 (package
23951 (name "python-daemonize")
23952 (version "2.5.0")
23953 (source
23954 (origin
23955 (method url-fetch)
23956 (uri (pypi-uri "daemonize" version))
23957 (sha256
23958 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
23959 (build-system python-build-system)
23960 (home-page "https://github.com/thesharp/daemonize")
23961 (synopsis "Library for writing system daemons in Python")
23962 (description "Daemonize is a library for writing system daemons in Python.")
23963 (license license:expat)))
23964
23965 (define-public python-pymacaroons
23966 (package
23967 (name "python-pymacaroons")
23968 (version "0.13.0")
23969 (source
23970 (origin
23971 (method url-fetch)
23972 (uri (pypi-uri "pymacaroons" version))
23973 (sha256
23974 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
23975 (build-system python-build-system)
23976 (propagated-inputs
23977 `(("python-six" ,python-six)
23978 ("python-pynacl" ,python-pynacl)))
23979 (home-page "https://github.com/ecordell/pymacaroons")
23980 (synopsis "Python Macaroon Library")
23981 (description
23982 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
23983 tokens, macaroons embed caveats that define specific authorization
23984 requirements for the target service, the service that issued the root macaroon
23985 and which is capable of verifying the integrity of macaroons it receives.
23986
23987 Macaroons allow for delegation and attenuation of authorization. They are
23988 simple and fast to verify, and decouple authorization policy from the
23989 enforcement of that policy.")
23990 (license license:expat)))
23991
23992 (define-public python-ldap3
23993 (package
23994 (name "python-ldap3")
23995 (version "2.7")
23996 (home-page "https://github.com/cannatag/ldap3")
23997 (source
23998 (origin
23999 (method git-fetch)
24000 (uri (git-reference (url home-page)
24001 (commit (string-append "v" version))))
24002 (file-name (git-file-name name version))
24003 (sha256
24004 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
24005 (build-system python-build-system)
24006 (arguments
24007 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
24008 #:phases (modify-phases %standard-phases
24009 (replace 'check
24010 (lambda* (#:key tests? #:allow-other-keys)
24011 (when tests?
24012 (invoke "nosetests" "-s" "test"))
24013 #t)))))
24014 (native-inputs
24015 `(("python-nose" ,python-nose)))
24016 (propagated-inputs
24017 `(("python-gssapi" ,python-gssapi)
24018 ("python-pyasn1" ,python-pyasn1)))
24019 (synopsis "Python LDAP client")
24020 (description
24021 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
24022 library.")
24023 (license license:lgpl3+)))
24024
24025 (define-public python-boltons
24026 (package
24027 (name "python-boltons")
24028 (version "20.0.0")
24029 (source
24030 (origin
24031 (method url-fetch)
24032 (uri (pypi-uri "boltons" version))
24033 (sha256
24034 (base32
24035 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
24036 (build-system python-build-system)
24037 (home-page "https://github.com/mahmoud/boltons")
24038 (synopsis "Extensions to the Python standard library")
24039 (description
24040 "Boltons is a set of over 230 pure-Python utilities in the same spirit
24041 as — and yet conspicuously missing from — the standard library, including:
24042
24043 @itemize
24044 @item Atomic file saving, bolted on with fileutils
24045 @item A highly-optimized OrderedMultiDict, in dictutils
24046 @item Two types of PriorityQueue, in queueutils
24047 @item Chunked and windowed iteration, in iterutils
24048 @item Recursive data structure iteration and merging, with iterutils.remap
24049 @item Exponential backoff functionality, including jitter, through
24050 iterutils.backoff
24051 @item A full-featured TracebackInfo type, for representing stack traces, in
24052 tbutils
24053 @end itemize")
24054 (license license:bsd-3)))
24055
24056 (define-public python-eliot
24057 (package
24058 (name "python-eliot")
24059 (version "1.12.0")
24060 (source
24061 (origin
24062 (method url-fetch)
24063 (uri (pypi-uri "eliot" version))
24064 (sha256
24065 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
24066 (build-system python-build-system)
24067 (arguments
24068 `(#:phases
24069 (modify-phases %standard-phases
24070 (add-after 'unpack 'remove-journald-support
24071 (lambda _
24072 (for-each delete-file
24073 '("eliot/tests/test_journald.py"
24074 "eliot/journald.py"))
24075 #t))
24076 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
24077 ;; remove command-line tool's tests. TODO eliot-prettyprint should
24078 ;; be installed and these tests should pass.
24079 (lambda _
24080 (delete-file "eliot/tests/test_prettyprint.py")
24081 #t)))))
24082 (propagated-inputs
24083 `(("python-boltons" ,python-boltons)
24084 ("python-pyrsistent" ,python-pyrsistent)
24085 ("python-six" ,python-six)
24086 ("python-zope-interface" ,python-zope-interface)))
24087 (native-inputs
24088 `(("python-black" ,python-black)
24089 ("python-coverage" ,python-coverage)
24090 ("python-dask" ,python-dask)
24091 ("python-flake8" ,python-flake8)
24092 ("python-hypothesis" ,python-hypothesis)
24093 ("python-pytest" ,python-pytest)
24094 ("python-setuptools" ,python-setuptools)
24095 ("python-sphinx" ,python-sphinx)
24096 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24097 ("python-testtools" ,python-testtools)
24098 ("python-twine" ,python-twine)
24099 ("python-twisted" ,python-twisted)))
24100 (home-page "https://github.com/itamarst/eliot/")
24101 (synopsis "Eliot: the logging system that tells you why it happened")
24102 (description
24103 "@dfn{eliot} is a Python logging system that outputs causal chains of
24104 actions: actions can spawn other actions, and eventually they either succeed
24105 or fail. The resulting logs tell you the story of what your software did: what
24106 happened, and what caused it.")
24107 (license license:asl2.0)))
24108
24109 (define-public python-pem
24110 (package
24111 (name "python-pem")
24112 (version "20.1.0")
24113 (source
24114 (origin
24115 (method url-fetch)
24116 (uri (pypi-uri "pem" version))
24117 (sha256
24118 (base32
24119 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
24120 (build-system python-build-system)
24121 (native-inputs
24122 `(("python-certifi" ,python-certifi)
24123 ("python-coverage" ,python-coverage)
24124 ("python-pretend" ,python-pretend)
24125 ("python-pyopenssl" ,python-pyopenssl)
24126 ("python-pytest" ,python-pytest)
24127 ("python-sphinx" ,python-sphinx)
24128 ("python-twisted" ,python-twisted)))
24129 (home-page "https://pem.readthedocs.io/")
24130 (synopsis "Easy PEM file parsing in Python")
24131 (description
24132 "This package provides a Python module for parsing and splitting PEM files.")
24133 (license license:expat)))
24134
24135 (define-public python-txsni
24136 ;; We need a few commits on top of 0.1.9 for compatibility with newer
24137 ;; Python and OpenSSL.
24138 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
24139 (revision "0"))
24140 (package
24141 (name "python-txsni")
24142 (version (git-version "0.1.9" revision commit))
24143 (home-page "https://github.com/glyph/txsni")
24144 (source
24145 (origin
24146 (method git-fetch)
24147 (uri (git-reference (url home-page) (commit commit)))
24148 (file-name (git-file-name name version))
24149 (sha256
24150 (base32
24151 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
24152 (build-system python-build-system)
24153 (propagated-inputs
24154 `(("python-pyopenssl" ,python-pyopenssl)
24155 ("python-service-identity" ,python-service-identity)
24156 ("python-twisted" ,python-twisted)))
24157 (synopsis "Run TLS servers with Twisted")
24158 (description
24159 "This package provides an easy-to-use SNI endpoint for use
24160 with the Twisted web framework.")
24161 (license license:expat))))
24162
24163 (define-public python-txacme
24164 (package
24165 (name "python-txacme")
24166 (version "0.9.2")
24167 (source
24168 (origin
24169 (method url-fetch)
24170 (uri (pypi-uri "txacme" version))
24171 (sha256
24172 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
24173 (build-system python-build-system)
24174 (propagated-inputs
24175 `(("python-acme" ,python-acme)
24176 ("python-attrs" ,python-attrs)
24177 ("python-eliot" ,python-eliot)
24178 ("python-josepy" ,python-josepy)
24179 ("python-pem" ,python-pem)
24180 ("python-treq" ,python-treq)
24181 ("python-twisted" ,python-twisted)
24182 ("python-txsni" ,python-txsni)))
24183 (native-inputs
24184 `(("python-fixtures" ,python-fixtures)
24185 ("python-hypothesis" ,python-hypothesis)
24186 ("python-mock" ,python-mock)
24187 ("python-service-identity"
24188 ,python-service-identity)
24189 ("python-testrepository" ,python-testrepository)
24190 ("python-testscenarios" ,python-testscenarios)
24191 ("python-testtools" ,python-testtools)))
24192 (home-page "https://github.com/twisted/txacme")
24193 (synopsis "Twisted implexmentation of the ACME protocol")
24194 (description
24195 "ACME is Automatic Certificate Management Environment, a protocol that
24196 allows clients and certificate authorities to automate verification and
24197 certificate issuance. The ACME protocol is used by the free Let's Encrypt
24198 Certificate Authority.
24199
24200 txacme is an implementation of the protocol for Twisted, the event-driven
24201 networking engine for Python.")
24202 (license license:expat)))
24203
24204 (define-public python-pysaml2
24205 (package
24206 (name "python-pysaml2")
24207 (version "6.5.1")
24208 (source
24209 (origin
24210 (method url-fetch)
24211 (uri (pypi-uri "pysaml2" version))
24212 (sha256
24213 (base32
24214 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
24215 (build-system python-build-system)
24216 (propagated-inputs
24217 `(("python-cryptography" ,python-cryptography)
24218 ("python-dateutil" ,python-dateutil)
24219 ("python-defusedxml" ,python-defusedxml)
24220 ("python-importlib-resources"
24221 ,python-importlib-resources)
24222 ("python-pyopenssl" ,python-pyopenssl)
24223 ("python-pytz" ,python-pytz)
24224 ("python-requests" ,python-requests)
24225 ("python-six" ,python-six)
24226 ("python-xmlschema" ,python-xmlschema)))
24227 (home-page "https://idpy.org")
24228 (synopsis "Python implementation of SAML Version 2 Standard")
24229 (description
24230 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
24231 It contains all necessary pieces for building a SAML2 service provider or
24232 an identity provider. The distribution contains examples of both.
24233
24234 This package was originally written to work in a WSGI environment, but
24235 there are extensions that allow you to use it with other frameworks.")
24236 (license license:asl2.0)))
24237
24238 (define-public python-click-plugins
24239 (package
24240 (name "python-click-plugins")
24241 (version "1.1.1")
24242 (source
24243 (origin
24244 (method url-fetch)
24245 (uri (pypi-uri "click-plugins" version))
24246 (sha256
24247 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
24248 (build-system python-build-system)
24249 (native-inputs
24250 `(("python-pytest" ,python-pytest)))
24251 (propagated-inputs
24252 `(("python-click" ,python-click)))
24253 (synopsis "Extension for Click to register external CLI commands")
24254 (description "This package provides n extension module for Click to
24255 register external CLI commands via setuptools entry-points.")
24256 (home-page "https://github.com/click-contrib/click-plugins")
24257 (license license:bsd-3)))
24258
24259 (define-public python-diceware
24260 (package
24261 (name "python-diceware")
24262 (version "0.9.6")
24263 (source
24264 (origin
24265 (method url-fetch)
24266 (uri (pypi-uri "diceware" version))
24267 (sha256
24268 (base32
24269 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
24270 (build-system python-build-system)
24271 (native-inputs
24272 `(("python-coverage" ,python-coverage)
24273 ("python-pytest" ,python-pytest)
24274 ("python-pytest-runner" ,python-pytest-runner)))
24275 (home-page "https://github.com/ulif/diceware/")
24276 (synopsis "Generates memorable passphrases")
24277 (description "This package generates passphrases by concatenating words
24278 randomly picked from wordlists. It supports several sources of
24279 randomness (including real life dice) and different wordlists (including
24280 cryptographically signed ones).")
24281 (license license:gpl3+)))
24282
24283 (define-public python-dictdiffer
24284 (package
24285 (name "python-dictdiffer")
24286 (version "0.8.1")
24287 (source (origin
24288 (method url-fetch)
24289 (uri (pypi-uri "dictdiffer" version))
24290 (sha256
24291 (base32
24292 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
24293 (build-system python-build-system)
24294 (native-inputs
24295 `(("python-check-manifest" ,python-check-manifest)
24296 ("python-coverage" ,python-coverage)
24297 ("python-isort" ,python-isort)
24298 ("python-mock" ,python-mock)
24299 ("python-pydoctstyle" ,python-pydocstyle)
24300 ("python-pytest-cache" ,python-pytest-cache)
24301 ("python-pytest-cov" ,python-pytest-cov)
24302 ("python-pytest-pep8" ,python-pytest-pep8)
24303 ("python-pytest-runner" ,python-pytest-runner)
24304 ("python-pytest" ,python-pytest)
24305 ("python-setuptools-scm" ,python-setuptools-scm)
24306 ("python-tox" ,python-tox)))
24307 (home-page "https://github.com/inveniosoftware/dictdiffer")
24308 (synopsis "Diff and patch Python dictionary objects")
24309 (description
24310 "Dictdiffer is a Python module that helps you to diff and patch
24311 dictionaries.")
24312 (license license:expat)))
24313
24314 (define-public pyzo
24315 (package
24316 (name "pyzo")
24317 (version "4.11.2")
24318 (source
24319 (origin
24320 (method url-fetch)
24321 (uri (pypi-uri "pyzo" version))
24322 (sha256
24323 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
24324 (build-system python-build-system)
24325 (arguments
24326 `(#:phases
24327 (modify-phases %standard-phases
24328 (add-before 'check 'fix-home-directory
24329 (lambda _
24330 ;; Tests fail with "Permission denied: '/homeless-shelter'".
24331 (setenv "HOME" "/tmp")
24332 #t)))
24333 ;; Tests fail with "Uncaught Python exception: python: undefined
24334 ;; symbol: objc_getClass".
24335 #:tests? #f))
24336 (propagated-inputs
24337 `(("python-pyqt" ,python-pyqt)))
24338 (home-page "https://pyzo.org")
24339 (synopsis
24340 "Python IDE for scientific computing")
24341 (description
24342 "Pyzo is a Python IDE focused on interactivity and introspection,
24343 which makes it very suitable for scientific computing. Its practical
24344 design is aimed at simplicity and efficiency.
24345
24346 It consists of two main components, the editor and the shell, and uses
24347 a set of pluggable tools to help the programmer in various ways. Some
24348 example tools are source structure, project manager, interactive help,
24349 workspace...")
24350 (license license:bsd-2)))
24351
24352 (define-public python-osc
24353 (package
24354 (name "python-osc")
24355 (version "1.7.4")
24356 (source
24357 (origin
24358 (method url-fetch)
24359 (uri (pypi-uri "python-osc" version))
24360 (sha256
24361 (base32
24362 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
24363 (build-system python-build-system)
24364 (home-page "https://github.com/attwad/python-osc")
24365 (synopsis "Open Sound Control server and client implementations")
24366 (description
24367 "@code{python-osc} is a pure Python library with no external
24368 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
24369 Open Sound Control 1.0} specification.")
24370 (license license:unlicense)))
24371
24372 (define-public python-voluptuous
24373 (package
24374 (name "python-voluptuous")
24375 (version "0.11.7")
24376 (source
24377 (origin
24378 (method url-fetch)
24379 (uri (pypi-uri "voluptuous" version))
24380 (sha256
24381 (base32
24382 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
24383 (build-system python-build-system)
24384 (native-inputs
24385 `(("python-nose" ,python-nose)))
24386 (home-page "https://github.com/alecthomas/voluptuous")
24387 (synopsis "Python data validation library")
24388 (description
24389 "Voluptuous is a Python data validation library. It is primarily
24390 intended for validating data coming into Python as JSON, YAML, etc.")
24391 (license license:bsd-3)))
24392
24393 (define-public python-cmd2
24394 (package
24395 (name "python-cmd2")
24396 (version "1.0.2")
24397 (source
24398 (origin
24399 (method url-fetch)
24400 (uri (pypi-uri "cmd2" version))
24401 (sha256
24402 (base32
24403 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
24404 (build-system python-build-system)
24405 (propagated-inputs
24406 `(("python-attrs" ,python-attrs)
24407 ("python-colorama" ,python-colorama)
24408 ("python-pyperclip" ,python-pyperclip)
24409 ("python-wcwidth" ,python-wcwidth)))
24410 (native-inputs
24411 `(("python-codecov" ,python-codecov)
24412 ("python-coverage" ,python-coverage)
24413 ("python-doc8" ,python-doc8)
24414 ("python-flake8" ,python-flake8)
24415 ("python-invoke" ,python-invoke)
24416 ("python-mock" ,python-mock)
24417 ("python-pytest" ,python-pytest)
24418 ("python-pytest-cov" ,python-pytest-cov)
24419 ("python-pytest-mock" ,python-pytest-mock)
24420 ("python-setuptools-scm" ,python-setuptools-scm)
24421 ("python-sphinx" ,python-sphinx)
24422 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
24423 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24424 ("python-tox" ,python-tox)
24425 ("python-twine" ,python-twine)
24426 ("which" ,which)))
24427 (home-page "https://github.com/python-cmd2/cmd2")
24428 (synopsis "Tool for building interactive command line applications")
24429 (description
24430 "Cmd2 is a tool for building interactive command line applications in
24431 Python. Its goal is to make it quick and easy for developers to build
24432 feature-rich and user-friendly interactive command line applications. It
24433 provides a simple API which is an extension of Python's built-in @code{cmd}
24434 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
24435 make your life easier and eliminates much of the boilerplate code which would
24436 be necessary when using @code{cmd}.")
24437 (license license:expat)))
24438
24439 (define-public python-pytidylib
24440 (package
24441 (name "python-pytidylib")
24442 (version "0.3.2")
24443 (source (origin
24444 (method url-fetch)
24445 (uri (pypi-uri "pytidylib" version))
24446 (sha256
24447 (base32
24448 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
24449 (build-system python-build-system)
24450 (arguments
24451 '(#:phases
24452 (modify-phases %standard-phases
24453 (add-before 'build 'qualify-libtidy
24454 (lambda* (#:key inputs #:allow-other-keys)
24455 (let ((libtidy (string-append (assoc-ref inputs "tidy")
24456 "/lib/libtidy.so")))
24457 (substitute* "tidylib/tidy.py"
24458 (("ctypes\\.util\\.find_library\\('tidy'\\)")
24459 (format #f "'~a'" libtidy)))
24460 #t))))))
24461 (inputs `(("tidy" ,tidy)))
24462 (home-page "https://github.com/countergram/pytidylib")
24463 (synopsis "Python wrapper for HTML Tidy library")
24464 (description
24465 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
24466 allows you, from Python code, to “fix” invalid (X)HTML markup.")
24467 (license license:expat)))
24468
24469 (define-public python2-pytidylib
24470 (package-with-python2 python-pytidylib))
24471
24472 (define-public python-mujson
24473 (package
24474 (name "python-mujson")
24475 (version "1.4")
24476 (source
24477 (origin
24478 (method url-fetch)
24479 (uri (pypi-uri "mujson" version))
24480 (sha256
24481 (base32
24482 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
24483 (build-system python-build-system)
24484 (home-page "https://github.com/mattgiles/mujson")
24485 (synopsis "Use the fastest JSON functions available at import time")
24486 (description "This package selects the fastest JSON functions available
24487 at import time.")
24488 (license license:expat)))
24489
24490 (define-public python-bashlex
24491 (package
24492 (name "python-bashlex")
24493 (version "0.14")
24494 (source
24495 (origin
24496 (method url-fetch)
24497 (uri (pypi-uri "bashlex" version))
24498 (sha256
24499 (base32
24500 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
24501 (build-system python-build-system)
24502 (arguments
24503 `(#:phases
24504 (modify-phases %standard-phases
24505 (add-before 'build 'pregenerate-yacc-tables
24506 (lambda _
24507 ;; parser.py caches tables, which attempts to write to site lib
24508 ;; see https://github.com/idank/bashlex/issues/51
24509 (invoke "python" "-c" "import bashlex"))))))
24510 (home-page
24511 "https://github.com/idank/bashlex")
24512 (synopsis "Python parser for bash")
24513 (description "@code{bashlex} is a Python port of the parser used
24514 internally by GNU bash.
24515
24516 For the most part it's transliterated from C, the major differences are:
24517
24518 @itemize
24519 @item it does not execute anything
24520 @item it is reentrant
24521 @item it generates a complete AST
24522 @end itemize
24523 ")
24524 (license license:gpl3+)))
24525
24526 (define-public python-jinxed
24527 (package
24528 (name "python-jinxed")
24529 (version "1.0.0")
24530 (source
24531 (origin
24532 (method url-fetch)
24533 (uri (pypi-uri "jinxed" version))
24534 (sha256
24535 (base32
24536 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
24537 (build-system python-build-system)
24538 (arguments
24539 '(#:phases
24540 (modify-phases %standard-phases
24541 (add-before 'check 'set-environment-variables
24542 (lambda* (#:key inputs #:allow-other-keys)
24543 (let ((ncurses (assoc-ref inputs "ncurses")))
24544 (setenv "TERM" "LINUX")
24545 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
24546 #t))))
24547 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
24548 (native-inputs
24549 `(("ncurses" ,ncurses)))
24550 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
24551 (synopsis "Jinxed Terminal Library")
24552 (description
24553 "Jinxed is an implementation of a subset of the Python curses library.")
24554 (license license:mpl2.0)))
24555
24556 (define-public python-blessed
24557 (package
24558 (name "python-blessed")
24559 (version "1.17.8")
24560 (source
24561 (origin
24562 (method url-fetch)
24563 (uri (pypi-uri "blessed" version))
24564 (sha256
24565 (base32
24566 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
24567 (modules '((guix build utils)))
24568 (snippet
24569 '(begin
24570 ;; Don't get hung up on Windows test failures.
24571 (delete-file "blessed/win_terminal.py") #t))))
24572 (build-system python-build-system)
24573 (propagated-inputs
24574 `(("python-jinxed" ,python-jinxed)
24575 ("python-six" ,python-six)
24576 ("python-wcwidth" ,python-wcwidth)))
24577 (native-inputs
24578 `(("python-mock" ,python-mock)
24579 ("python-pytest" ,python-pytest)))
24580 (home-page "https://github.com/jquast/blessed")
24581 (synopsis "Wrapper around terminal capabilities")
24582 (description
24583 "Blessed is a thin, practical wrapper around terminal styling, screen
24584 positioning, and keyboard input.")
24585 (license license:expat)))
24586
24587 (define-public python-readme-renderer
24588 (package
24589 (name "python-readme-renderer")
24590 (version "26.0")
24591 (source
24592 (origin
24593 (method url-fetch)
24594 (uri (pypi-uri "readme_renderer" version))
24595 (sha256
24596 (base32
24597 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
24598 (build-system python-build-system)
24599 (propagated-inputs
24600 `(("python-bleach" ,python-bleach)
24601 ("python-docutils" ,python-docutils)
24602 ("python-pygments" ,python-pygments)
24603 ("python-six" ,python-six)))
24604 (native-inputs
24605 `(("python-mock" ,python-mock)
24606 ("python-pytest" ,python-pytest)))
24607 (home-page "https://github.com/pypa/readme_renderer")
24608 (synopsis "Render README files in Warehouse")
24609 (description
24610 "Readme Renderer is a library that will safely render arbitrary README
24611 files into HTML. It is designed to be used in Warehouse to render the
24612 @code{long_description} for packages. It can handle Markdown, reStructuredText,
24613 and plain text.")
24614 (license license:asl2.0)))
24615
24616 (define-public python-lazr-delegates
24617 (package
24618 (name "python-lazr-delegates")
24619 (version "2.0.4")
24620 (source
24621 (origin
24622 (method url-fetch)
24623 (uri (pypi-uri "lazr.delegates" version))
24624 (sha256
24625 (base32
24626 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
24627 (build-system python-build-system)
24628 (arguments
24629 '(#:phases
24630 (modify-phases %standard-phases
24631 (replace 'check
24632 (lambda _
24633 (invoke "python" "setup.py" "nosetests"))))))
24634 (native-inputs
24635 `(("python-nose" ,python-nose)))
24636 (propagated-inputs
24637 `(("python-zope-interface" ,python-zope-interface)))
24638 (home-page "https://launchpad.net/lazr.delegates")
24639 (synopsis "Easily write objects that delegate behavior")
24640 (description
24641 "The @code{lazr.delegates} package makes it easy to write objects that
24642 delegate behavior to another object. The new object adds some property or
24643 behavior on to the other object, while still providing the underlying interface,
24644 and delegating behavior.")
24645 (license license:lgpl3)))
24646
24647 (define-public python-lazr-config
24648 (package
24649 (name "python-lazr-config")
24650 (version "2.2.2")
24651 (source
24652 (origin
24653 (method url-fetch)
24654 (uri (pypi-uri "lazr.config" version))
24655 (sha256
24656 (base32
24657 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
24658 (build-system python-build-system)
24659 (arguments
24660 '(#:phases
24661 (modify-phases %standard-phases
24662 (replace 'check
24663 (lambda _
24664 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
24665 (native-inputs
24666 `(("python-nose" ,python-nose)))
24667 (propagated-inputs
24668 `(("python-lazr-delegates" ,python-lazr-delegates)
24669 ("python-zope-interface" ,python-zope-interface)))
24670 (home-page "https://launchpad.net/lazr.config")
24671 (synopsis "Create configuration schemas and process and validate configurations")
24672 (description
24673 "The LAZR config system is typically used to manage process configuration.
24674 Process configuration is for saying how things change when we run systems on
24675 different machines, or under different circumstances. This system uses ini-like
24676 file format of section, keys, and values. The config file supports inheritance
24677 to minimize duplication of information across files. The format supports schema
24678 validation.")
24679 (license license:lgpl3)))
24680
24681 (define-public python-flufl-bounce
24682 (package
24683 (name "python-flufl-bounce")
24684 (version "3.0.1")
24685 (source
24686 (origin
24687 (method url-fetch)
24688 (uri (pypi-uri "flufl.bounce" version))
24689 (sha256
24690 (base32
24691 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
24692 (build-system python-build-system)
24693 (propagated-inputs
24694 `(("python-atpublic" ,python-atpublic)
24695 ("python-zope-interface" ,python-zope-interface)))
24696 (native-inputs
24697 `(("python-nose2" ,python-nose2)))
24698 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
24699 (synopsis "Email bounce detectors")
24700 (description "The @code{flufl.bounce} library provides a set of heuristics
24701 and an API for detecting the original bouncing email addresses from a bounce
24702 message. Many formats found in the wild are supported, as are VERP and
24703 RFC 3464.")
24704 (license (list license:asl2.0
24705 license:lgpl3)))) ; only for setup_headers.py
24706
24707 (define-public python-flufl-i18n
24708 (package
24709 (name "python-flufl-i18n")
24710 (version "3.0")
24711 (source
24712 (origin
24713 (method url-fetch)
24714 (uri (pypi-uri "flufl.i18n" version))
24715 (sha256
24716 (base32
24717 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
24718 (build-system python-build-system)
24719 (propagated-inputs
24720 `(("python-atpublic" ,python-atpublic)))
24721 (home-page "https://flufli18n.readthedocs.io")
24722 (synopsis "API for Python internationalization")
24723 (description
24724 "This package provides a high-level, convenient API for managing
24725 internationalization/translation contexts in Python applications. There is a
24726 simple API for single-context applications, such as command line scripts which
24727 only need to translate into one language during the entire course of their
24728 execution. There is a more flexible, but still convenient API for multi-context
24729 applications, such as servers, which may need to switch language contexts for
24730 different tasks.")
24731 (license license:asl2.0)))
24732
24733 (define-public python-flufl-lock
24734 (package
24735 (name "python-flufl-lock")
24736 (version "4.0")
24737 (source
24738 (origin
24739 (method url-fetch)
24740 (uri (pypi-uri "flufl.lock" version))
24741 (sha256
24742 (base32
24743 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
24744 (build-system python-build-system)
24745 (propagated-inputs
24746 `(("python-atpublic" ,python-atpublic)
24747 ("python-psutil" ,python-psutil)))
24748 (home-page "https://flufllock.readthedocs.io")
24749 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
24750 (description
24751 "The @dfn{flufl.lock} package provides NFS-safe file locking with
24752 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
24753 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
24754 and have a maximum lifetime built-in.")
24755 (license (list license:asl2.0
24756 license:lgpl3)))) ; only for setup_helpers.py
24757
24758 (define-public python-flufl-testing
24759 (package
24760 (name "python-flufl-testing")
24761 (version "0.8")
24762 (source
24763 (origin
24764 (method url-fetch)
24765 (uri (pypi-uri "flufl.testing" version))
24766 (sha256
24767 (base32
24768 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
24769 (build-system python-build-system)
24770 (native-inputs
24771 `(("python-nose2" ,python-nose2)))
24772 (home-page "https://gitlab.com/warsaw/flufl.testing")
24773 (synopsis "Collection of test tool plugins")
24774 (description
24775 "This package contains a small collection of test tool plugins for
24776 @code{nose2} and @code{flake8}.")
24777 (license license:asl2.0)))
24778
24779 (define-public python-devtools
24780 (package
24781 (name "python-devtools")
24782 (version "0.6")
24783 (source
24784 (origin
24785 (method git-fetch)
24786 (uri (git-reference
24787 (url "https://github.com/samuelcolvin/python-devtools")
24788 (commit (string-append "v" version))))
24789 (file-name (git-file-name name version))
24790 (sha256
24791 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
24792 (build-system python-build-system)
24793 (native-inputs
24794 `(("python-pytest" ,python-pytest)
24795 ("python-pytest-mock" ,python-pytest-mock)))
24796 (propagated-inputs
24797 `(("python-pygments" ,python-pygments)))
24798 (arguments
24799 `(#:phases (modify-phases %standard-phases
24800 (replace 'check
24801 (lambda _
24802 (invoke "pytest")
24803 #t)))))
24804 (home-page "https://github.com/samuelcolvin/python-devtools")
24805 (synopsis "Debug command and development tools")
24806 (description
24807 "This package provides a debug print command and other development tools.
24808 It adds a simple and readable way to print stuff during development.")
24809 (license license:expat)))
24810
24811 (define-public python-dateparser
24812 (package
24813 (name "python-dateparser")
24814 (version "0.7.6")
24815 (source
24816 (origin
24817 (method url-fetch)
24818 (uri (pypi-uri "dateparser" version))
24819 (sha256
24820 (base32
24821 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
24822 (build-system python-build-system)
24823 (propagated-inputs
24824 `(("python-dateutil" ,python-dateutil)
24825 ("python-pytz" ,python-pytz)
24826 ("python-regex" ,python-regex)
24827 ("python-ruamel.yaml" ,python-ruamel.yaml)
24828 ("python-tzlocal" ,python-tzlocal)))
24829 (native-inputs
24830 `(("python-mock" ,python-mock)
24831 ("python-parameterized" ,python-parameterized)
24832 ("tzdata" ,tzdata-for-tests)))
24833 (arguments
24834 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
24835 #:tests? #f
24836 #:phases
24837 (modify-phases %standard-phases
24838 (add-before 'check 'set-check-environment
24839 (lambda* (#:key inputs #:allow-other-keys)
24840 (setenv "TZ" "UTC")
24841 (setenv "TZDIR"
24842 (string-append (assoc-ref inputs "tzdata")
24843 "/share/zoneinfo"))
24844 #t)))))
24845 (home-page "https://github.com/scrapinghub/dateparser")
24846 (synopsis
24847 "Date parsing library designed to parse dates from HTML pages")
24848 (description
24849 "@code{python-dateparser} provides modules to easily parse localized
24850 dates in almost any string formats commonly found on web pages.")
24851 (license license:bsd-3)))
24852
24853 (define-public python-dparse
24854 (package
24855 (name "python-dparse")
24856 (version "0.5.1")
24857 (source
24858 (origin
24859 (method url-fetch)
24860 (uri (pypi-uri "dparse" version))
24861 (sha256
24862 (base32
24863 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
24864 (build-system python-build-system)
24865 (native-inputs
24866 `(("python-pytest" ,python-pytest)))
24867 (propagated-inputs
24868 `(("python-packaging" ,python-packaging)
24869 ("python-pyyaml" ,python-pyyaml)
24870 ("python-toml" ,python-toml)))
24871 (home-page "https://github.com/pyupio/dparse")
24872 (synopsis "Parser for Python dependency files")
24873 (description "This package provides a parser for Python dependency files.")
24874 (license license:expat)))
24875
24876 (define-public python-dpath
24877 (package
24878 (name "python-dpath")
24879 (version "2.0.1")
24880 (source
24881 (origin
24882 (method url-fetch)
24883 (uri (pypi-uri "dpath" version))
24884 (sha256
24885 (base32
24886 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
24887 (build-system python-build-system)
24888 (native-inputs
24889 `(("python-hypothesis" ,python-hypothesis)
24890 ("python-mock" ,python-mock)
24891 ("python-nose" ,python-nose)))
24892 (arguments
24893 '(#:phases
24894 (modify-phases %standard-phases
24895 (replace 'check
24896 (lambda* (#:key inputs outputs #:allow-other-keys)
24897 (add-installed-pythonpath inputs outputs)
24898 ;; This invokation is taken from tox.ini.
24899 (invoke "nosetests" "-d" "-v" "tests/"))))))
24900 (home-page "https://github.com/akesterson/dpath-python")
24901 (synopsis "File-system-like pathing and searching for dictionaries")
24902 (description
24903 "@code{python-dpath} is a library for accessing and searching
24904 dictionaries via /slashed/paths ala xpath.
24905
24906 Basically it lets you glob over a dictionary as if it were a file system. It
24907 allows you to specify globs (ala the bash eglob syntax, through some advanced
24908 fnmatch.fnmatch magic) to access dictionary elements, and provides some
24909 facility for filtering those results.")
24910 (license license:expat)))
24911
24912 (define-public python-safety
24913 (package
24914 (name "python-safety")
24915 (version "1.9.0")
24916 (source
24917 (origin
24918 (method url-fetch)
24919 (uri (pypi-uri "safety" version))
24920 (sha256
24921 (base32
24922 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
24923 (build-system python-build-system)
24924 (arguments
24925 `(#:phases
24926 (modify-phases %standard-phases
24927 (add-after 'unpack 'disable-tests
24928 (lambda _
24929 (substitute* "tests/test_safety.py"
24930 ;; requires network
24931 (("def test_check_live") "def _test_check_live"))
24932 #t)))))
24933 (propagated-inputs
24934 `(("python-click" ,python-click)
24935 ("python-dparse" ,python-dparse)
24936 ("python-packaging" ,python-packaging)
24937 ("python-requests" ,python-requests)))
24938 (home-page "https://github.com/pyupio/safety")
24939 (synopsis "Check installed dependencies for known vulnerabilities")
24940 (description "Safety checks installed dependencies for known vulnerabilities.
24941 By default it uses the open Python vulnerability database Safety DB.")
24942 (license license:expat)))
24943
24944 (define-public python-pypandoc
24945 (package
24946 (name "python-pypandoc")
24947 (version "1.5")
24948 (source
24949 (origin
24950 (method url-fetch)
24951 (uri (pypi-uri "pypandoc" version))
24952 (sha256
24953 (base32
24954 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
24955 (build-system python-build-system)
24956 (inputs
24957 `(("pandoc" ,pandoc)
24958 ("pandoc-citeproc" ,pandoc-citeproc)))
24959 (propagated-inputs
24960 `(("wheel" ,python-wheel)))
24961 (native-inputs
24962 `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
24963 texlive-fonts-ec
24964 texlive-latex-hyperref
24965 texlive-latex-oberdiek
24966 texlive-lm
24967 texlive-xcolor)))))
24968 (arguments
24969 `(#:phases
24970 (modify-phases %standard-phases
24971 (add-before 'check 'disable-tests
24972 (lambda _
24973 ;; Disable test requiring network access
24974 (substitute* "tests.py"
24975 (("test_basic_conversion_from_http_url")
24976 "skip_test_basic_conversion_from_http_url"))
24977 ;; Needed by texlive-union to generate fonts
24978 (setenv "HOME" "/tmp")
24979 #t)))))
24980 (home-page "https://github.com/bebraw/pypandoc")
24981 (synopsis "Python wrapper for pandoc")
24982 (description "pypandoc is a thin Python wrapper around pandoc
24983 and pandoc-citeproc.")
24984 (license license:expat)))
24985
24986 (define-public python-rnc2rng
24987 (package
24988 (name "python-rnc2rng")
24989 (version "2.6.4")
24990 (source
24991 (origin
24992 (method url-fetch)
24993 (uri (pypi-uri "rnc2rng" version))
24994 (sha256
24995 (base32
24996 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
24997 (build-system python-build-system)
24998 (propagated-inputs
24999 `(("python-rply" ,python-rply)))
25000 (arguments
25001 `(#:phases (modify-phases %standard-phases
25002 (replace 'check
25003 (lambda _
25004 (invoke "python" "test.py"))))))
25005 (home-page "https://github.com/djc/rnc2rng")
25006 (synopsis "Convert RELAX NG Compact to regular syntax")
25007 (description
25008 "This package provides the @command{rnc2rng} command-line tool as well as
25009 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
25010 equivalent schemata in the XML-based default RELAX NG syntax.")
25011 (license license:expat)))
25012
25013 (define-public python-telethon
25014 (package
25015 (name "python-telethon")
25016 (version "1.17.5")
25017 (source
25018 (origin
25019 (method git-fetch)
25020 (uri (git-reference
25021 (url "https://github.com/LonamiWebs/Telethon")
25022 (commit (string-append "v" version))))
25023 (file-name (git-file-name name version))
25024 (sha256
25025 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
25026 (build-system python-build-system)
25027 (arguments
25028 '(#:phases
25029 (modify-phases %standard-phases
25030 (replace 'check
25031 (lambda* (#:key tests? #:allow-other-keys)
25032 (when tests?
25033 (invoke "py.test" "-v"))
25034 #t)))))
25035 (propagated-inputs
25036 `(("python-rsa" ,python-rsa)
25037 ("python-pyaes" ,python-pyaes)))
25038 (native-inputs
25039 `(("python-pytest" ,python-pytest)
25040 ("python-pytest-asyncio" ,python-pytest-asyncio)
25041 ("python-pytest-trio" ,python-pytest-trio)))
25042 (home-page "https://docs.telethon.dev")
25043 (synopsis "Full-featured Telegram client library for Python 3")
25044 (description "This library is designed to make it easy to write Python
25045 programs that can interact with Telegram.")
25046 (license license:expat)))
25047
25048 (define-public python-citeproc-py
25049 (package
25050 (name "python-citeproc-py")
25051 (version "0.5.1")
25052 (source
25053 (origin
25054 (method url-fetch)
25055 (uri (pypi-uri "citeproc-py" version))
25056 (sha256
25057 (base32
25058 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
25059 (build-system python-build-system)
25060 (propagated-inputs
25061 `(("python-lxml" ,python-lxml)
25062 ("python-rnc2rng" ,python-rnc2rng)))
25063 (home-page
25064 "https://github.com/brechtm/citeproc-py")
25065 (synopsis "Citations and bibliography formatter")
25066 (description
25067 "Citeproc-py is a CSL processor for Python. It aims to implement the
25068 CSL 1.0.1 specification. citeproc-py can output styled citations and
25069 bibliographies in a number of different output formats. Currently supported
25070 are plain text, reStructuredText and HTML.")
25071 (license license:bsd-2)))
25072
25073 (define-public python-inform
25074 (package
25075 (name "python-inform")
25076 (version "1.23.0")
25077 (source
25078 (origin
25079 (method url-fetch)
25080 (uri (pypi-uri "inform" version))
25081 (sha256
25082 (base32
25083 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
25084 (build-system python-build-system)
25085 (arguments
25086 `(#:tests? #f)) ; PyPI tarball lacks tests
25087 (native-inputs
25088 `(("python-hypothesis" ,python-hypothesis)
25089 ("python-pytest-cov" ,python-pytest-cov)
25090 ("python-pytest-runner" ,python-pytest-runner)))
25091 (propagated-inputs
25092 `(("python-arrow" ,python-arrow)
25093 ("python-six" ,python-six)))
25094 (home-page "https://inform.readthedocs.io")
25095 (synopsis "Print & logging utilities for communicating with user")
25096 (description
25097 "Inform is designed to display messages from programs that are typically run from
25098 a console. It provides a collection of ‘print’ functions that allow you to simply and
25099 cleanly print different types of messages.")
25100 (license license:gpl3+)))
25101
25102 (define-public python-nestedtext
25103 (package
25104 (name "python-nestedtext")
25105 (version "1.0.0")
25106 (source
25107 (origin
25108 (method url-fetch)
25109 (uri (pypi-uri "nestedtext" version))
25110 (sha256
25111 (base32
25112 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
25113 (build-system python-build-system)
25114 (arguments
25115 `(#:tests? #f)) ; PyPI tarball lacks tests
25116 (propagated-inputs
25117 `(("python-inform" ,python-inform)))
25118 (home-page "https://nestedtext.org")
25119 (synopsis "Human readable and writable data interchange format")
25120 (description
25121 "NestedText is a file format for holding data that is to be entered, edited, or
25122 viewed by people. It allows data to be organized into a nested collection of
25123 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
25124 without the complexity and risk of YAML and without the syntactic clutter of JSON.
25125 NestedText is both simple and natural. Only a small number of concepts and rules must
25126 be kept in mind when creating it. It is easily created, modified, or viewed with
25127 a text editor and easily understood and used by both programmers and non-programmers.")
25128 (license license:expat))) ; MIT license
25129
25130 (define-public python-nest-asyncio
25131 (package
25132 (name "python-nest-asyncio")
25133 (version "1.5.1")
25134 (source
25135 (origin
25136 (method url-fetch)
25137 (uri (pypi-uri "nest_asyncio" version))
25138 (sha256
25139 (base32
25140 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
25141 (build-system python-build-system)
25142 (home-page "https://github.com/erdewit/nest_asyncio")
25143 (synopsis "Patch asyncio to allow nested event loops")
25144 (description
25145 "By design @code{asyncio} does not allow its event loop to be nested.
25146 This presents a practical problem: when in an environment where the event loop
25147 is already running it's impossible to run tasks and wait for the result. This
25148 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
25149 @code{loop.run_until_complete}.")
25150 (license license:bsd-3)))
25151
25152 (define-public python-simpervisor
25153 (package
25154 (name "python-simpervisor")
25155 (version "0.4")
25156 (source
25157 (origin
25158 ;; Tests not included in release.
25159 (method git-fetch)
25160 (uri (git-reference
25161 (url "https://github.com/yuvipanda/simpervisor")
25162 (commit (string-append "v" version))))
25163 (file-name (git-file-name name version))
25164 (sha256
25165 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
25166 (build-system python-build-system)
25167 (arguments
25168 `(#:tests? #f ; Test suite can't find aiohttp.
25169 #:phases
25170 (modify-phases %standard-phases
25171 (replace 'check
25172 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25173 (when tests?
25174 (add-installed-pythonpath inputs outputs)
25175 (invoke "pytest" "--maxfail" "3" "--verbose"))
25176 #t)))))
25177 (native-inputs
25178 `(("python-aiohttp" ,python-aiohttp)
25179 ("python-pytest" ,python-pytest)
25180 ("python-pytest-asyncio" ,python-pytest-asyncio)))
25181 (home-page "https://github.com/yuvipanda/simpervisor")
25182 (synopsis "Simple async process supervisor")
25183 (description
25184 "This package provides a simple async process supervisor in Python.")
25185 (license license:bsd-3)))
25186
25187 (define-public python-parallel
25188 (package
25189 (name "python-parallel")
25190 (version "1.6.4.4")
25191 (source
25192 (origin
25193 (method url-fetch)
25194 (uri (string-append
25195 "https://www.parallelpython.com/downloads/pp/pp-"
25196 version ".zip"))
25197 (sha256
25198 (base32
25199 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
25200 (native-inputs
25201 `(("unzip" ,unzip)))
25202 (build-system python-build-system)
25203 (arguments '(#:tests? #f)) ; No test suite.
25204 (home-page "https://www.parallelpython.com")
25205 (synopsis "Parallel and distributed programming for Python")
25206 (description "Parallel Python module (PP) provides an easy and efficient
25207 way to create parallel-enabled applications for SMP computers and clusters.
25208 PP module features cross-platform portability and dynamic load balancing.
25209 Thus applications written with PP will parallelize efficiently even on
25210 heterogeneous and multi-platform clusters (including clusters running other
25211 applications with variable CPU loads).")
25212 (license license:bsd-3)))
25213
25214 (define-public python2-parallel
25215 (package-with-python2 python-parallel))
25216
25217 (define-public python-djvulibre
25218 (package
25219 (name "python-djvulibre")
25220 (version "0.8.6")
25221 (source
25222 (origin
25223 (method url-fetch)
25224 (uri (pypi-uri "python-djvulibre" version))
25225 (sha256
25226 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
25227 (build-system python-build-system)
25228 (native-inputs
25229 `(("ghostscript" ,ghostscript)
25230 ("pkg-config" ,pkg-config)
25231 ("python-nose" ,python-nose)))
25232 (inputs
25233 `(("djvulibre" ,djvulibre)
25234 ("python-cython" ,python-cython)))
25235 (arguments
25236 `(#:phases
25237 (modify-phases %standard-phases
25238 (add-after 'unpack 'fix-tests
25239 (lambda _
25240 ;; Unit tests try to load the 'dllpath.py' and fail, because it
25241 ;; doesn't make sense on GNU/Linux.
25242 (delete-file "djvu/dllpath.py")
25243 #t)))))
25244 (synopsis "Python bindings for DjVuLibre")
25245 (description "This is a set of Python bindings for the DjVuLibre library.")
25246 (home-page "https://jwilk.net/software/python-djvulibre")
25247 (license license:gpl2)))
25248
25249 (define-public python2-djvulibre
25250 (package-with-python2 python-djvulibre))
25251
25252 (define-public python-versioneer
25253 (package
25254 (name "python-versioneer")
25255 (version "0.19")
25256 (source
25257 (origin
25258 (method url-fetch)
25259 (uri (pypi-uri "versioneer" version))
25260 (sha256
25261 (base32
25262 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
25263 (build-system python-build-system)
25264 (home-page
25265 "https://github.com/python-versioneer/python-versioneer")
25266 (synopsis
25267 "Version-string management for VCS-controlled trees")
25268 (description
25269 "@code{versioneer} is a tool for managing a recorded version number in
25270 distutils-based python projects. The goal is to remove the tedious and
25271 error-prone \"update the embedded version string\" step from your release
25272 process.")
25273 (license license:public-domain)))
25274
25275 (define-public python2-gamera
25276 (package
25277 (name "python2-gamera")
25278 (version "3.4.4")
25279 (source
25280 (origin
25281 (method url-fetch)
25282 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
25283 "gamera-" version ".tar.gz"))
25284 (sha256
25285 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
25286 (modules '((guix build utils)))
25287 (snippet
25288 '(begin
25289 ;; Remove bundled libraries.
25290 (for-each delete-file-recursively
25291 '("src/libpng-1.2.5"
25292 "src/libtiff"
25293 "src/zlib-1.2.8"))))))
25294 (build-system python-build-system)
25295 (inputs
25296 `(("libpng" ,libpng)
25297 ("libtiff" ,libtiff)
25298 ("python2-wxpython" ,python2-wxpython)
25299 ("zlib" ,zlib)))
25300 (arguments
25301 `(#:python ,python-2))
25302 (synopsis "Framework for building document analysis applications")
25303 (description
25304 "Gamera is a toolkit for building document image recognition systems.")
25305 (home-page "https://gamera.informatik.hsnr.de/")
25306 (license license:gpl2+)))
25307
25308 (define-public python-contextvars
25309 (package
25310 (name "python-contextvars")
25311 (version "2.4")
25312 (source
25313 (origin
25314 (method url-fetch)
25315 (uri (pypi-uri "contextvars" version))
25316 (sha256
25317 (base32
25318 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
25319 (build-system python-build-system)
25320 (propagated-inputs
25321 `(("python-immutables" ,python-immutables)))
25322 (home-page
25323 "https://github.com/MagicStack/contextvars")
25324 (synopsis "PEP 567 Backport")
25325 (description "This package implements a backport of Python 3.7
25326 @code{contextvars} module (see PEP 567) for Python 3.6.")
25327 (license license:asl2.0)))
25328
25329 (define-public python-aiofiles
25330 (package
25331 (name "python-aiofiles")
25332 (version "0.6.0")
25333 (source
25334 (origin
25335 (method url-fetch)
25336 (uri (pypi-uri "aiofiles" version))
25337 (sha256
25338 (base32
25339 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
25340 (build-system python-build-system)
25341 (home-page "https://github.com/Tinche/aiofiles")
25342 (synopsis "File support for @code{asyncio}")
25343 (description "@code{python-aiofiles} is a library for handling local
25344 disk files in asyncio applications.")
25345 (license license:asl2.0)))
25346
25347 (define-public python-pyre-extensions
25348 (package
25349 (name "python-pyre-extensions")
25350 (version "0.0.18")
25351 (source
25352 (origin
25353 (method url-fetch)
25354 (uri (pypi-uri "pyre-extensions" version))
25355 (sha256
25356 (base32
25357 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
25358 (build-system python-build-system)
25359 (propagated-inputs
25360 `(("python-typing-extensions"
25361 ,python-typing-extensions)
25362 ("python-typing-inspect" ,python-typing-inspect)))
25363 (home-page "https://pyre-check.org")
25364 (synopsis
25365 "Type system extensions for use with @code{python-pyre}")
25366 (description
25367 "@code{python-pyre-extensions} defines extensions to the standard
25368 @code{typing} module that are supported by the Pyre typechecker.")
25369 (license license:expat)))
25370
25371 (define-public python-dataclasses
25372 (package
25373 (name "python-dataclasses")
25374 (version "0.8")
25375 (source
25376 (origin
25377 (method url-fetch)
25378 (uri (pypi-uri "dataclasses" version))
25379 (sha256
25380 (base32
25381 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
25382 (build-system python-build-system)
25383 (home-page
25384 "https://github.com/ericvsmith/dataclasses")
25385 (synopsis
25386 "Backport of the @code{dataclasses} module for Python 3.6")
25387 (description
25388 "This is an implementation of PEP 557, Data Classes. It is a
25389 backport of the @code{dataclasses} module for Python 3.6.")
25390 (license license:asl2.0)))
25391
25392 (define-public python-pywatchman
25393 (package
25394 (name "python-pywatchman")
25395 (version "1.4.1")
25396 (source
25397 (origin
25398 (method url-fetch)
25399 (uri (pypi-uri "pywatchman" version))
25400 (sha256
25401 (base32
25402 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
25403 (build-system python-build-system)
25404 (arguments
25405 `(#:tests? #f)) ;there are none
25406 (home-page
25407 "https://facebook.github.io/watchman/")
25408 (synopsis "Watchman client for python")
25409 (description "@code{python-pywatchman} is a library to connect and
25410 query Watchman to discover file changes.")
25411 (license license:bsd-3)))
25412
25413 (define-public python-helpdev
25414 (package
25415 (name "python-helpdev")
25416 (version "0.7.1")
25417 (source
25418 (origin
25419 (method url-fetch)
25420 (uri (pypi-uri "helpdev" version))
25421 (sha256
25422 (base32
25423 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
25424 (build-system python-build-system)
25425 (arguments
25426 `(#:phases
25427 (modify-phases %standard-phases
25428 (replace 'check
25429 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25430 (when tests?
25431 (add-installed-pythonpath inputs outputs)
25432 (invoke "pytest" "tests"))
25433 #t)))))
25434 (propagated-inputs
25435 `(("python-importlib-metadata" ,python-importlib-metadata)))
25436 (native-inputs
25437 `(("python-pytest" ,python-pytest)))
25438 (home-page "https://gitlab.com/dpizetta/helpdev")
25439 (synopsis
25440 "Extract information about the Python environment easily")
25441 (description
25442 "Helpdev is a library to easily extract information about the Python
25443 environment.")
25444 (license license:expat)))
25445
25446 (define-public python-logutils
25447 (package
25448 (name "python-logutils")
25449 (version "0.3.5")
25450 (source
25451 (origin
25452 (method url-fetch)
25453 (uri (pypi-uri "logutils" version))
25454 (sha256
25455 (base32
25456 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
25457 (build-system python-build-system)
25458 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
25459 (synopsis "Logging utilities")
25460 (description "This package provides a set of handlers for the Python
25461 standard library logging package. Some of these handlers are out-of-scope
25462 for the standard library, and so they are packaged here. Others are updated
25463 versions which have appeared in recent Python releases, but are usable with
25464 older versions of Python and so are packaged here.")
25465 (license license:bsd-3)))
25466
25467 (define-public python-helper
25468 (package
25469 (name "python-helper")
25470 (version "2.5.0")
25471 (source (origin
25472 (method url-fetch)
25473 (uri (pypi-uri "helper" version))
25474 (sha256
25475 (base32
25476 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
25477 (build-system python-build-system)
25478 (native-inputs
25479 `(("python-mock" ,python-mock)))
25480 (propagated-inputs
25481 `(("python-logutils" ,python-logutils)
25482 ("python-pyyaml" ,python-pyyaml)))
25483 (home-page "https://github.com/gmr/helper")
25484 (synopsis "Library for writing configurable applications and daemons")
25485 (description
25486 "This package provides procedures for quickly writing configurable
25487 applications and daemons.")
25488 (license license:bsd-3)))
25489
25490 (define-public python-qtsass
25491 (package
25492 (name "python-qtsass")
25493 (version "0.3.0")
25494 (source
25495 (origin
25496 ;; There are no tests in the PyPI tarball.
25497 (method git-fetch)
25498 (uri (git-reference
25499 (url "https://github.com/spyder-ide/qtsass/")
25500 (commit (string-append "v" version))))
25501 (file-name (git-file-name name version))
25502 (sha256
25503 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
25504 (build-system python-build-system)
25505 (arguments
25506 `(#:test-target "pytest"
25507 #:phases
25508 (modify-phases %standard-phases
25509 ;; Tests need to read and write files.
25510 (add-before 'check 'make-git-checkout-writable
25511 (lambda _
25512 (for-each make-file-writable (find-files "."))
25513 #t)))))
25514 (native-inputs
25515 `(("python-pytest" ,python-pytest)
25516 ("python-pytest-cov" ,python-pytest-cov)
25517 ("python-pytest-runner" ,python-pytest-runner)))
25518 (propagated-inputs
25519 `(("python-libsass" ,python-libsass)))
25520 (home-page "https://github.com/spyder-ide/qtsass")
25521 (synopsis "Compile SCSS files to valid Qt stylesheets")
25522 (description
25523 "Besides being used in web development, CSS is also the way to stylize
25524 Qt-based desktop applications. However, Qt's CSS has a few variations that
25525 prevent the direct use of SASS compiler.
25526
25527 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
25528 handling those variations.")
25529 (license license:expat)))
25530
25531 (define-public python-qdarkstyle
25532 (package
25533 (name "python-qdarkstyle")
25534 (version "2.8.1")
25535 (source
25536 (origin
25537 (method url-fetch)
25538 (uri (pypi-uri "QDarkStyle" version))
25539 (sha256
25540 (base32
25541 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
25542 (build-system python-build-system)
25543 (arguments
25544 `(;; Fails unable to detect valid Qt bindings even when
25545 ;; added as native-inputs.
25546 #:tests? #f))
25547 (propagated-inputs
25548 `(("python-helpdev" ,python-helpdev)
25549 ("python-qtpy" ,python-qtpy)))
25550 (home-page
25551 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
25552 (synopsis
25553 "Complete dark stylesheet for Python and Qt applications")
25554 (description "QDarkStyle is the most complete dark stylesheet for Python and
25555 Qt applications.")
25556 (license license:expat)))
25557
25558 (define-public python-bitstring
25559 (package
25560 (name "python-bitstring")
25561 (version "3.1.7")
25562 (source
25563 (origin
25564 (method url-fetch)
25565 (uri (pypi-uri "bitstring" version))
25566 (sha256
25567 (base32
25568 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
25569 (build-system python-build-system)
25570 (arguments
25571 `(#:phases
25572 (modify-phases %standard-phases
25573 (replace 'check
25574 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25575 (when tests?
25576 (add-installed-pythonpath inputs outputs)
25577 (with-directory-excursion "test"
25578 (invoke "pytest")))
25579 #t)))))
25580 (native-inputs
25581 `(("python-pytest" ,python-pytest)))
25582 (home-page "https://github.com/scott-griffiths/bitstring")
25583 (synopsis
25584 "Simple construction, analysis and modification of binary data")
25585 (description
25586 "Bitstring is a library for simple construction, analysis and modification
25587 of binary data.")
25588 (license license:expat)))
25589
25590 (define-public python-confuse
25591 (package
25592 (name "python-confuse")
25593 (version "1.4.0")
25594 (source
25595 (origin
25596 (method url-fetch)
25597 (uri (pypi-uri "confuse" version))
25598 (sha256
25599 (base32
25600 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
25601 (build-system python-build-system)
25602 (propagated-inputs
25603 `(("python-pathlib" ,python-pathlib)
25604 ("python-pyyaml" ,python-pyyaml)))
25605 (home-page "https://github.com/beetbox/confuse")
25606 (synopsis "Painless YAML configuration.")
25607 (description "Confuse is a configuration library for Python that uses
25608 YAML. It takes care of defaults, overrides, type checking, command-line
25609 integration, human-readable errors, and standard OS-specific locations.")
25610 (license license:expat)))
25611
25612 (define-public python-reflink
25613 (package
25614 (name "python-reflink")
25615 (version "0.2.1")
25616 (source
25617 (origin
25618 (method url-fetch)
25619 (uri (pypi-uri "reflink" version))
25620 (sha256
25621 (base32
25622 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
25623 (build-system python-build-system)
25624 (arguments
25625 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
25626 (propagated-inputs
25627 `(("python-cffi" ,python-cffi)))
25628 (native-inputs
25629 `(("python-pytest" ,python-pytest)
25630 ("python-pytest-runner" ,python-pytest-runner)))
25631 (home-page "https://gitlab.com/rubdos/pyreflink")
25632 (synopsis "Python wrapper around reflink system call")
25633 (description
25634 "Python reflink wraps around platform specific @code{reflink}
25635 implementations.")
25636 (license license:expat)))
25637
25638 (define-public python-pivy
25639 (package
25640 (name "python-pivy")
25641 (version "0.6.5")
25642 (source
25643 (origin
25644 (method git-fetch)
25645 (uri (git-reference
25646 (url "https://github.com/coin3d/pivy")
25647 (commit version)))
25648 (file-name (git-file-name name version))
25649 (sha256
25650 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
25651 (build-system python-build-system)
25652 (arguments
25653 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
25654 #:tests? #f
25655 #:phases
25656 (modify-phases %standard-phases
25657 (add-after 'unpack 'patch-cmake-include-dirs
25658 (lambda _
25659 ;; Patch buildsystem to respect Coin3D include directory
25660 (substitute* "CMakeLists.txt"
25661 (("\\$\\{SoQt_INCLUDE_DIRS}")
25662 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
25663 #t)))))
25664 (native-inputs
25665 `(("cmake" ,cmake)
25666 ("swig" ,swig)))
25667 (inputs
25668 `(("python-wrapper" ,python-wrapper)
25669 ("qtbase" ,qtbase-5)
25670 ("libxi" ,libxi)
25671 ("libice" ,libice)
25672 ("soqt" ,soqt)
25673 ("glew" ,glew)
25674 ("coin3D" ,coin3D-4)))
25675 (home-page "https://github.com/coin3d/pivy")
25676 (synopsis "Python bindings to Coin3D")
25677 (description
25678 "Pivy provides python bindings for Coin, a 3D graphics library with an
25679 Application Programming Interface based on the Open Inventor 2.1 API.")
25680 (license license:isc)))
25681
25682 (define-public python-crayons
25683 (package
25684 (name "python-crayons")
25685 (version "0.4.0")
25686 (source
25687 (origin
25688 (method url-fetch)
25689 (uri (pypi-uri "crayons" version))
25690 (sha256
25691 (base32
25692 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
25693 (build-system python-build-system)
25694 (propagated-inputs
25695 `(("python-colorama" ,python-colorama)))
25696 (home-page "https://github.com/MasterOdin/crayons")
25697 (synopsis "TextUI colors for Python")
25698 (description "This package gives you colored strings for the terminal.
25699 Crayons automatically wraps a given string in the foreground color and
25700 restores the original state after the string is printed.")
25701 (license license:expat)))
25702
25703 (define-public python-sane
25704 (package
25705 (name "python-sane")
25706 (version "2.9.1")
25707 (source
25708 (origin
25709 (method url-fetch)
25710 (uri (pypi-uri name version))
25711 (sha256
25712 (base32
25713 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
25714 (build-system python-build-system)
25715 (native-inputs
25716 `(("python-pytest" ,python-pytest)))
25717 (inputs
25718 `(("sane-backends" ,sane-backends)))
25719 (home-page "https://github.com/python-pillow/Sane")
25720 (synopsis "Python interface to the SANE scanner")
25721 (description "This package provides Python interface to the SANE scanner
25722 and frame grabber interface.")
25723 (license (license:non-copyleft
25724 ;; Yet another variant of the X/MIT license.
25725 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
25726
25727 (define-public python-screenkey
25728 (package
25729 (name "python-screenkey")
25730 (version "1.4")
25731 (source
25732 (origin
25733 (method git-fetch)
25734 (uri (git-reference
25735 (url "https://gitlab.com/screenkey/screenkey")
25736 (commit (string-append "v" version))))
25737 (file-name (git-file-name name version))
25738 (sha256
25739 (base32
25740 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
25741 (build-system python-build-system)
25742 (arguments
25743 `(#:phases
25744 (modify-phases %standard-phases
25745 (add-after 'unpack 'fix-dlopen-paths
25746 (lambda* (#:key inputs outputs #:allow-other-keys)
25747 (let* ((x11 (assoc-ref inputs "libx11"))
25748 (xtst (assoc-ref inputs "libxtst")))
25749 (substitute* "Screenkey/xlib.py"
25750 (("libX11.so.6")
25751 (string-append x11 "/lib/libX11.so.6")))
25752 (substitute* "Screenkey/xlib.py"
25753 (("libXtst.so.6")
25754 (string-append xtst "/lib/libXtst.so.6")))
25755 #t)))
25756 (add-after 'install 'wrap-screenkey
25757 (lambda* (#:key outputs #:allow-other-keys)
25758 (wrap-program
25759 (string-append (assoc-ref outputs "out") "/bin/screenkey")
25760 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
25761 `("GI_TYPELIB_PATH"
25762 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
25763 #t)))))
25764 (inputs
25765 `(("python-distutils-extra" ,python-distutils-extra)
25766 ("python-tokenize-rt" ,python-tokenize-rt)
25767 ("libx11" ,libx11)
25768 ("libxtst" ,libxtst)
25769 ("gtk+" ,gtk+)
25770 ("python-pygobject" ,python-pygobject)
25771 ("python-pycairo" ,python-pycairo)
25772 ("python-setuptools-git" ,python-setuptools-git)
25773 ("python-babel" ,python-babel)))
25774 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
25775 (synopsis
25776 "Screencast tool to display pressed keys")
25777 (description
25778 "A screencast tool to display your keys inspired by Screenflick.")
25779 (license license:gpl3+)))
25780
25781 (define-public python-jinja2-cli
25782 (package
25783 (name "python-jinja2-cli")
25784 (version "0.7.0")
25785 (source
25786 (origin
25787 (method url-fetch)
25788 (uri (pypi-uri "jinja2-cli" version))
25789 (sha256
25790 (base32
25791 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
25792 (build-system python-build-system)
25793 (propagated-inputs
25794 `(("python-jinja2" ,python-jinja2)))
25795 (native-inputs
25796 `(("python-flake8" ,python-flake8)
25797 ("python-jinja2" ,python-jinja2)
25798 ("python-pytest" ,python-pytest)))
25799 (home-page "https://github.com/mattrobenolt/jinja2-cli")
25800 (synopsis "Command-line interface to Jinja2")
25801 (description
25802 "This package provides a command-line interface (CLI) to the Jinja2
25803 template engine.")
25804 (license license:bsd-3)))
25805
25806 (define-public python-readability
25807 (package
25808 (name "python-readability")
25809 (version "0.3.1")
25810 (source
25811 (origin
25812 (method url-fetch)
25813 (uri (pypi-uri "readability" version))
25814 (sha256
25815 (base32
25816 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
25817 (build-system python-build-system)
25818 (home-page
25819 "https://github.com/andreasvc/readability/")
25820 (synopsis
25821 "Measure the readability of a given text using surface
25822 characteristics")
25823 (description
25824 "This package provides a Python library that is an implementation of
25825 traditional readability measures based on simple surface
25826 characteristics. These measures are basically linear regressions based on the
25827 number of words, syllables, and sentences.")
25828 (license license:asl2.0)))
25829
25830 (define-public python-listparser
25831 (package
25832 (name "python-listparser")
25833 (version "0.18")
25834 (source
25835 (origin
25836 (method url-fetch)
25837 (uri (pypi-uri "listparser" version))
25838 (sha256
25839 (base32
25840 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
25841 (build-system python-build-system)
25842 (home-page
25843 "https://github.com/kurtmckee/listparser")
25844 (synopsis
25845 "Parse subscription lists in Python")
25846 (description
25847 "This package provides a Python library that can parse OPML, FOAF, and
25848 iGoogle subscription lists.")
25849 (license license:expat)))
25850
25851 (define-public python-smartypants
25852 (package
25853 (name "python-smartypants")
25854 (version "2.0.1")
25855 (source
25856 (origin
25857 ;; There's no source tarball for 2.0.1 on PyPI.
25858 (method git-fetch)
25859 (uri (git-reference
25860 (url "https://github.com/leohemsted/smartypants.py")
25861 (commit (string-append "v" version))))
25862 (file-name (git-file-name name version))
25863 (sha256
25864 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
25865 (build-system python-build-system)
25866 (arguments
25867 '(#:phases
25868 (modify-phases %standard-phases
25869 (replace 'check
25870 ;; Its `setup.py test` doesn't report failure with exit status, so
25871 ;; we use `nose` instead.
25872 (lambda _
25873 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
25874 (native-inputs
25875 ;; For tests.
25876 `(("python-docutils" ,python-docutils)
25877 ("python-nose" ,python-nose)
25878 ("python-pygments" ,python-pygments)))
25879 (home-page "https://github.com/leohemsted/smartypants.py")
25880 (synopsis "Translate punctuation characters into smart quotes")
25881 (description
25882 "@command{smartpants} can perform the following transformations:
25883 @enumerate
25884 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
25885 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
25886 entities
25887 @item Dashes (-- and ---) into en- and em-dash entities
25888 @item Three consecutive dots (... or . . .) into an ellipsis entity
25889 @end enumerate")
25890 (license license:bsd-3)))
25891
25892 (define-public python-typogrify
25893 (package
25894 (name "python-typogrify")
25895 (version "2.0.7")
25896 (source (origin
25897 (method url-fetch)
25898 (uri (pypi-uri "typogrify" version))
25899 (sha256
25900 (base32
25901 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
25902 (build-system python-build-system)
25903 (arguments
25904 '(#:phases
25905 (modify-phases %standard-phases
25906 (replace 'check
25907 (lambda _
25908 (invoke "nosetests" "-v"))))))
25909 (propagated-inputs
25910 `(("python-smartypants" ,python-smartypants)))
25911 (native-inputs
25912 ;; For tests.
25913 `(("python-nose" ,python-nose)))
25914 (home-page "https://github.com/mintchaos/typogrify")
25915 (synopsis "Filters to transform text into typographically-improved HTML")
25916 (description
25917 "@code{typogrify} provides a set of custom filters that automatically
25918 apply various transformations to plain text in order to yield
25919 typographically-improved HTML. While often used in conjunction with Jinja and
25920 Django template systems, the filters can be used in any environment.")
25921 (license license:bsd-3)))
25922
25923 (define-public python-ld
25924 (package
25925 (name "python-ld")
25926 (version "0.5.0")
25927 (source
25928 (origin
25929 (method url-fetch)
25930 (uri (pypi-uri "ld" version))
25931 (sha256
25932 (base32
25933 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
25934 (build-system python-build-system)
25935 (propagated-inputs
25936 `(("python-six" ,python-six)))
25937 (home-page "https://github.com/nir0s/ld")
25938 (synopsis "OS platform information API")
25939 (description
25940 "The ld package provides information about the GNU/Linux distribution it
25941 runs on, such as a reliable machine-readable ID, or version information.")
25942 (license license:asl2.0)))
25943
25944 (define-public python-quicktions
25945 (package
25946 (name "python-quicktions")
25947 (version "1.11")
25948 (source
25949 (origin
25950 (method url-fetch)
25951 (uri (pypi-uri "quicktions" version))
25952 (sha256
25953 (base32
25954 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
25955 (modules '((guix build utils)))
25956 (snippet
25957 '(begin
25958 ;; This file is generated by Cython.
25959 (delete-file "src/quicktions.c") #t))))
25960 (build-system python-build-system)
25961 (arguments
25962 `(#:phases
25963 (modify-phases %standard-phases
25964 (add-before 'build 'cythonize-sources
25965 (lambda _
25966 (with-directory-excursion "src"
25967 (invoke "cython" "quicktions.pyx"))))
25968 (replace 'check
25969 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25970 (when tests?
25971 (add-installed-pythonpath inputs outputs)
25972 (invoke "pytest"))
25973 #t)))))
25974 (native-inputs
25975 `(("python-cython" ,python-cython)
25976 ("python-pytest" ,python-pytest)))
25977 (home-page "https://github.com/scoder/quicktions")
25978 (synopsis "Fast fractions data type for rational numbers")
25979 (description
25980 "This package provides fast fractions data type for rational numbers. It
25981 is the cythonized version of @code{fractions.Fraction}.")
25982 (license license:psfl)))
25983
25984 (define-public python-pathvalidate
25985 (package
25986 (name "python-pathvalidate")
25987 (version "2.4.1")
25988 (source
25989 (origin
25990 (method url-fetch)
25991 (uri (pypi-uri "pathvalidate" version))
25992 (sha256
25993 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
25994 (build-system python-build-system)
25995 (arguments
25996 '(#:tests? #f))
25997 ;; Tests disabled because of circular dependencies.
25998 ;; pathvalidate tests depend on pytest-md-report, which
25999 ;; depends on pathvalidate.
26000 (native-inputs
26001 `(("python-allpairspy" ,python-allpairspy)
26002 ("python-click" ,python-click)
26003 ("python-faker" ,python-faker)
26004 ("python-pytest" ,python-pytest)))
26005 (home-page "https://github.com/thombashi/pathvalidate")
26006 (synopsis "Sanitize strings representing paths")
26007 (description
26008 "@code{pathvalidate} is a Python library to sanitize/validate strings
26009 representing paths or filenames.")
26010 (license license:expat)))