819ad26e3e2668a232c3fc92df0ecc69a529c3d7
[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 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
104 ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
105 ;;;
106 ;;; This file is part of GNU Guix.
107 ;;;
108 ;;; GNU Guix is free software; you can redistribute it and/or modify it
109 ;;; under the terms of the GNU General Public License as published by
110 ;;; the Free Software Foundation; either version 3 of the License, or (at
111 ;;; your option) any later version.
112 ;;;
113 ;;; GNU Guix is distributed in the hope that it will be useful, but
114 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
115 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
116 ;;; GNU General Public License for more details.
117 ;;;
118 ;;; You should have received a copy of the GNU General Public License
119 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
120
121 (define-module (gnu packages python-xyz)
122 #:use-module ((guix licenses) #:prefix license:)
123 #:use-module (gnu packages)
124 #:use-module (gnu packages algebra)
125 #:use-module (gnu packages adns)
126 #:use-module (gnu packages aidc)
127 #:use-module (gnu packages attr)
128 #:use-module (gnu packages backup)
129 #:use-module (gnu packages bash)
130 #:use-module (gnu packages check)
131 #:use-module (gnu packages cmake)
132 #:use-module (gnu packages compression)
133 #:use-module (gnu packages crypto)
134 #:use-module (gnu packages databases)
135 #:use-module (gnu packages dbm)
136 #:use-module (gnu packages djvu)
137 #:use-module (gnu packages docker)
138 #:use-module (gnu packages enchant)
139 #:use-module (gnu packages file)
140 #:use-module (gnu packages fontutils)
141 #:use-module (gnu packages gcc)
142 #:use-module (gnu packages geo)
143 #:use-module (gnu packages ghostscript)
144 #:use-module (gnu packages gl)
145 #:use-module (gnu packages glib)
146 #:use-module (gnu packages gnome)
147 #:use-module (gnu packages gnupg)
148 #:use-module (gnu packages graphviz)
149 #:use-module (gnu packages graphics)
150 #:use-module (gnu packages gsasl)
151 #:use-module (gnu packages gstreamer)
152 #:use-module (gnu packages gtk)
153 #:use-module (gnu packages haskell-xyz)
154 #:use-module (gnu packages icu4c)
155 #:use-module (gnu packages image)
156 #:use-module (gnu packages imagemagick)
157 #:use-module (gnu packages jupyter)
158 #:use-module (gnu packages kerberos)
159 #:use-module (gnu packages libevent)
160 #:use-module (gnu packages libffi)
161 #:use-module (gnu packages libidn)
162 #:use-module (gnu packages linux)
163 #:use-module (gnu packages llvm)
164 #:use-module (gnu packages man)
165 #:use-module (gnu packages markup)
166 #:use-module (gnu packages maths)
167 #:use-module (gnu packages monitoring)
168 #:use-module (gnu packages multiprecision)
169 #:use-module (gnu packages networking)
170 #:use-module (gnu packages ncurses)
171 #:use-module (gnu packages openstack)
172 #:use-module (gnu packages pcre)
173 #:use-module (gnu packages pdf)
174 #:use-module (gnu packages perl)
175 #:use-module (gnu packages photo)
176 #:use-module (gnu packages pkg-config)
177 #:use-module (gnu packages python)
178 #:use-module (gnu packages python-build)
179 #:use-module (gnu packages python-check)
180 #:use-module (gnu packages python-compression)
181 #:use-module (gnu packages python-crypto)
182 #:use-module (gnu packages python-science)
183 #:use-module (gnu packages python-web)
184 #:use-module (gnu packages qt)
185 #:use-module (gnu packages rdf)
186 #:use-module (gnu packages readline)
187 #:use-module (gnu packages regex)
188 #:use-module (gnu packages sdl)
189 #:use-module (gnu packages search)
190 #:use-module (gnu packages scanner)
191 #:use-module (gnu packages shells)
192 #:use-module (gnu packages sphinx)
193 #:use-module (gnu packages ssh)
194 #:use-module (gnu packages swig)
195 #:use-module (gnu packages terminals)
196 #:use-module (gnu packages tex)
197 #:use-module (gnu packages texinfo)
198 #:use-module (gnu packages textutils)
199 #:use-module (gnu packages time)
200 #:use-module (gnu packages tls)
201 #:use-module (gnu packages version-control)
202 #:use-module (gnu packages video)
203 #:use-module (gnu packages web)
204 #:use-module (gnu packages wxwidgets)
205 #:use-module (gnu packages base)
206 #:use-module (gnu packages xml)
207 #:use-module (gnu packages xorg)
208 #:use-module (gnu packages xdisorg)
209 #:use-module (gnu packages tcl)
210 #:use-module (gnu packages bdw-gc)
211 #:use-module (gnu packages serialization)
212 #:use-module (guix packages)
213 #:use-module (guix download)
214 #:use-module (guix git-download)
215 #:use-module (guix hg-download)
216 #:use-module (guix utils)
217 #:use-module (guix build-system gnu)
218 #:use-module (guix build-system cmake)
219 #:use-module (guix build-system python)
220 #:use-module (guix build-system trivial)
221 #:use-module (srfi srfi-1)
222 #:use-module (srfi srfi-26))
223
224 (define-public python-fire
225 (package
226 (name "python-fire")
227 (version "0.4.0")
228 (source
229 (origin
230 (method url-fetch)
231 (uri (pypi-uri "fire" version))
232 (sha256
233 (base32
234 "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
235 (build-system python-build-system)
236 (native-inputs
237 `(("python-pytest", python-pytest)))
238 (arguments
239 '(#:phases
240 (modify-phases %standard-phases
241 (replace 'check
242 (lambda* (#:key tests? #:allow-other-keys)
243 (when tests?
244 (invoke "pytest")))))))
245 (inputs
246 `(("python-six", python-six)
247 ("python-termcolor", python-termcolor)))
248 (synopsis "Library for automatically generating command line interfaces")
249 (description
250 "Fire is a library for automatically generating command line interfaces
251 from absolutely any Python object. The following are the advantages:
252 @itemize
253 @item A simple way to create a CLI in Python.
254 @item A helpful tool for developing and debugging Python code.
255 @item Helps with exploring existing code or turning other people's code into a
256 command line interface.
257 @item Makes transitioning between Bash and Python easier.
258 @item Makes using a Python REPL easier by setting up the REPL with the modules
259 and variables you'll need already imported and created.
260 @end itemize")
261 (home-page "https://github.com/google/python-fire")
262 (license license:asl2.0)))
263
264 (define-public python-twodict
265 (package
266 (name "python-twodict")
267 (version "1.2")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (pypi-uri "twodict" version))
272 (sha256
273 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
274 (build-system python-build-system)
275 (home-page "https://github.com/MrS0m30n3/twodict")
276 (synopsis "Two way ordered dictionary for Python")
277 (description "TwoDict is a custom dictionary in which you can get the
278 key:value relationship but you can also get the value:key relationship. It also
279 remembers the order in which the items were inserted and supports almost all the
280 features of the Python's built-in dict.")
281 (license license:unlicense)))
282
283 (define-public python2-twodict
284 (package
285 (inherit python-twodict)
286 (name "python2-twodict")
287 (version "1.2")
288 (source
289 (origin
290 (method url-fetch)
291 (uri (pypi-uri "twodict" version))
292 (sha256
293 (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
294 (build-system python-build-system)
295 (arguments
296 `(#:python ,python-2))))
297
298 (define-public python-argopt
299 (package
300 (name "python-argopt")
301 (version "0.7.0")
302 (source (origin
303 (method url-fetch)
304 (uri (pypi-uri "argopt" version))
305 (sha256
306 (base32
307 "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
308 (build-system python-build-system)
309 (native-inputs
310 `(("python-coverage" ,python-coverage)
311 ("python-nose" ,python-nose)
312 ("python-setuptools" ,python-setuptools) ; Won't build without this.
313 ("python-setuptools-scm" ,python-setuptools-scm)))
314 (propagated-inputs
315 `(("python-toml" ,python-toml)
316 ("python-flake8" ,python-flake8)))
317 (home-page "https://github.com/casperdcl/argopt")
318 (synopsis "Generate a command-line interface from a docstring")
319 (description "This package provides tools to define a command line interface
320 from a docstring rather than the other way around.")
321 (license license:mpl2.0)))
322
323 (define-public python-cachetools
324 (package
325 (name "python-cachetools")
326 (version "4.2.2")
327 (source (origin
328 (method url-fetch)
329 (uri (pypi-uri "cachetools" version))
330 (sha256
331 (base32
332 "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
333 (build-system python-build-system)
334 (home-page "https://github.com/tkem/cachetools/")
335 (synopsis "Extensible memoizing collections and decorators")
336 (description "This module provides various memoizing collections and
337 decorators, including variants of the Python standard library's
338 @code{lru_cache} function decorator.")
339 (license license:expat)))
340
341 (define-public python-colorful
342 (package
343 (name "python-colorful")
344 (version "0.5.4")
345 (source
346 (origin
347 (method url-fetch)
348 (uri
349 (pypi-uri "colorful" version))
350 (sha256
351 (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
352 (build-system python-build-system)
353 ;; FIXME: tests cannot be computed:
354 ;; "Can't perform this operation for unregistered loader type"
355 (arguments
356 `(#:tests? #f))
357 (native-inputs
358 `(("python-coverage" ,python-coverage)
359 ("python-flake8" ,python-flake8)
360 ("python-pytest" ,python-pytest)))
361 (propagated-inputs
362 `(("python-colorama" ,python-colorama)))
363 (home-page "http://github.com/timofurrer/colorful")
364 (synopsis "Terminal string styling")
365 (description "Colorful provides an array of text styles, that can be used
366 as functions or string constants to form colored terminal output.")
367 (license license:expat)))
368
369 (define-public python-yaspin
370 (package
371 (name "python-yaspin")
372 (version "1.5.0")
373 (source
374 (origin
375 (method url-fetch)
376 (uri
377 (pypi-uri "yaspin" version))
378 (sha256
379 (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
380 (build-system python-build-system)
381 (native-inputs
382 `(("python-pytest" ,python-pytest)))
383 (home-page "https://github.com/pavdmyt/yaspin")
384 (synopsis "Yet Another Terminal Spinner")
385 (description "Yaspin provides a terminal spinner to indicate the progress
386 during long operations.")
387 (license license:expat)))
388
389 (define-public python-lunr
390 (package
391 (name "python-lunr")
392 (version "0.6.0")
393 (source
394 (origin
395 (method url-fetch)
396 (uri
397 (pypi-uri "lunr" version))
398 (sha256
399 (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
400 (build-system python-build-system)
401 (native-inputs
402 `(("python-mock" ,python-mock)
403 ("python-pytest" ,python-pytest)))
404 (propagated-inputs
405 `(("python-nltk" ,python-nltk-3.4)))
406 (home-page
407 "https://github.com/yeraydiazdiaz/lunr.py")
408 (synopsis "Full-text search library")
409 (description "This package provides python library for full-text search.
410 It indexes documents and provides a search interface for retrieving documents
411 that best match text queries.")
412 (license license:expat)))
413
414 (define-public python-mkdocs
415 (package
416 (name "python-mkdocs")
417 (version "1.1.2")
418 (source
419 (origin
420 (method url-fetch)
421 (uri
422 (pypi-uri "mkdocs" version))
423 (sha256
424 (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
425 (build-system python-build-system)
426 (arguments
427 `(#:phases
428 (modify-phases %standard-phases
429 ;; Requirements refer to a specific version of dependencies,
430 ;; which are too old. So we patch to refer to any later version.
431 (add-after 'unpack 'patch-requirements
432 (lambda _
433 (substitute* "setup.py"
434 (("==") ">=")))))))
435 (propagated-inputs
436 `(("python-click" ,python-click)
437 ("python-jinja2" ,python-jinja2)
438 ("python-livereload" ,python-livereload)
439 ("python-lunr" ,python-lunr)
440 ("python-markdown" ,python-markdown)
441 ("python-pyyaml" ,python-pyyaml)
442 ("python-tornado" ,python-tornado)))
443 (home-page "https://www.mkdocs.org")
444 (synopsis "Project documentation with Markdown")
445 (description "MkDocs is a static site generator geared towards building
446 project documentation. Documentation source files are written in Markdown, and
447 configured with a single YAML configuration file.")
448 (license license:bsd-3)))
449
450 (define-public python-pymdown-extensions
451 (package
452 (name "python-pymdown-extensions")
453 (version "8.1.1")
454 (source
455 (origin
456 (method url-fetch)
457 (uri
458 (pypi-uri "pymdown-extensions" version))
459 (sha256
460 (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
461 (build-system python-build-system)
462 ;; FIXME: "AssertionError: False is not true"
463 (arguments
464 `(#:tests? #f))
465 (propagated-inputs
466 `(("python-markdown" ,python-markdown)))
467 (home-page "https://github.com/facelessuser/pymdown-extensions")
468 (synopsis "Extension pack for Python Markdown")
469 (description "PyMdown Extensions is a collection of extensions for Python
470 Markdown. All extensions are found under the module namespace of pymdownx.")
471 (license license:expat)))
472
473 (define-public python-mkdocs-material
474 (package
475 (name "python-mkdocs-material")
476 (version "7.1.3")
477 (source
478 (origin
479 (method url-fetch)
480 (uri
481 (pypi-uri "mkdocs-material" version))
482 (sha256
483 (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
484 (build-system python-build-system)
485 (arguments
486 `(#:phases
487 (modify-phases %standard-phases
488 ;; Requirement mkdocs-material-extensions
489 ;; in-turn requires mkdocs-material. This causes
490 ;; circular dependency, so we remove this requirement.
491 (add-after 'unpack 'patch-requirements
492 (lambda _
493 (substitute* "requirements.txt"
494 (("mkdocs-material-extensions.*$") "")))))))
495 (propagated-inputs
496 `(("python-markdown" ,python-markdown)
497 ("python-mkdocs" ,python-mkdocs)
498 ("python-pygments" ,python-pygments)
499 ("python-pymdown-extensions"
500 ,python-pymdown-extensions)))
501 (home-page "https://squidfunk.github.io/mkdocs-material/")
502 (synopsis "Material Design theme for MkDocs")
503 (description "This package provides a theme plugin for the static site
504 generator MkDocs.")
505 (license license:expat)))
506
507 (define-public python-slixmpp
508 (package
509 (name "python-slixmpp")
510 (version "1.5.2")
511 (source
512 (origin
513 (method git-fetch)
514 (uri
515 (git-reference
516 (url "https://lab.louiz.org/poezio/slixmpp.git")
517 (commit
518 (string-append "slix-" version))))
519 (file-name
520 (git-file-name name version))
521 (sha256
522 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
523 (build-system python-build-system)
524 (arguments
525 `(#:phases
526 (modify-phases %standard-phases
527 (add-after 'unpack 'patch
528 (lambda _
529 (substitute* "setup.py"
530 (("'CC', 'cc'")
531 "'CC', 'gcc'"))
532 #t)))))
533 (native-inputs
534 `(("cython" ,python-cython)
535 ("gnupg" ,gnupg)
536 ("pkg-config" ,pkg-config)))
537 (propagated-inputs
538 `(("python-aiodns" ,python-aiodns)
539 ("python-aiohttp" ,python-aiohttp)
540 ("python-pyasn1" ,python-pyasn1)
541 ("python-pyasn1-modules" ,python-pyasn1-modules)))
542 (inputs
543 `(("libidn" ,libidn)
544 ("python" ,python))) ; We are building a Python extension.
545 (synopsis "XMPP library without threads")
546 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
547 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
548 socket handling, the timers, the events dispatching) in order to remove all
549 threads.")
550 (home-page "https://lab.louiz.org/poezio/slixmpp")
551 (license license:expat)))
552
553 (define-public python-tenacity
554 (package
555 (name "python-tenacity")
556 (version "6.1.0")
557 (source (origin
558 (method url-fetch)
559 (uri (pypi-uri "tenacity" version))
560 (sha256
561 (base32
562 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
563 (build-system python-build-system)
564 (native-inputs
565 `(("python-setuptools-scm" ,python-setuptools-scm)
566 ("python-sphinx" ,python-sphinx)
567 ("python-tornado" ,python-tornado)
568 ("python-pytest" ,python-pytest)))
569 (propagated-inputs
570 `(("python-six" ,python-six)))
571 (arguments
572 `(#:phases (modify-phases %standard-phases
573 (replace 'check
574 (lambda _
575 (invoke "pytest")
576 #t)))))
577 (home-page "https://github.com/jd/tenacity")
578 (synopsis "Retrying library for python")
579 (description "Tenacity is a general-purpose python library to simplify the
580 task of adding retry behavior to just about anything.")
581 (license license:asl2.0)))
582
583 (define-public python-pytelegrambotapi
584 (package
585 (name "python-pytelegrambotapi")
586 (version "3.7.4")
587 (source
588 (origin
589 (method git-fetch)
590 (uri (git-reference
591 (url "https://github.com/eternnoir/pyTelegramBotAPI")
592 (commit version)))
593 (file-name (git-file-name name version))
594 (sha256
595 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
596 (build-system python-build-system)
597 (arguments
598 `(#:phases
599 (modify-phases %standard-phases
600 (replace 'check
601 (lambda* (#:key tests? #:allow-other-keys)
602 (when tests?
603 (with-directory-excursion "tests"
604 (invoke "py.test")))
605 #t)))))
606 (propagated-inputs
607 `(("python-requests" ,python-requests)))
608 (native-inputs
609 `(("python-pytest" ,python-pytest)))
610 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
611 (synopsis "Python Telegram bot api")
612 (description "This package provides a simple, but extensible Python
613 implementation for the Telegram Bot API.")
614 (license license:gpl2)))
615
616 (define-public python-colorlog
617 (package
618 (name "python-colorlog")
619 (version "4.1.0")
620 (source (origin
621 (method url-fetch)
622 (uri (pypi-uri "colorlog" version))
623 (sha256
624 (base32
625 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
626 (build-system python-build-system)
627 (native-inputs
628 `(("python-pytest" ,python-pytest)))
629 (arguments
630 `(#:phases (modify-phases %standard-phases
631 (replace 'check
632 (lambda _
633 ;; Extend PYTHONPATH so the built package will be found.
634 (setenv "PYTHONPATH"
635 (string-append (getcwd) "/build/lib:"
636 (getenv "PYTHONPATH")))
637 (invoke "pytest" "-p" "no:logging")
638 #t)))))
639 (home-page "https://github.com/borntyping/python-colorlog")
640 (synopsis "Log formatting with colors for python")
641 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
642 with Python's logging module that outputs records using terminal colors.")
643 (license license:expat)))
644
645 (define-public python-pyprind
646 (package
647 (name "python-pyprind")
648 (version "2.11.3")
649 (source (origin
650 (method url-fetch)
651 (uri (pypi-uri "PyPrind" version))
652 (sha256
653 (base32
654 "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
655 (build-system python-build-system)
656 (propagated-inputs
657 `(("python-psutil" ,python-psutil)))
658 (home-page "https://github.com/rasbt/pyprind")
659 (synopsis "Python Progress Bar and Percent Indicator Utility")
660 (description "The PyPrind (Python Progress Indicator) module provides a
661 progress bar and a percentage indicator object that let you track the progress
662 of a loop structure or other iterative computation.")
663 (license license:bsd-3)))
664
665 (define-public python-gphoto2
666 (package
667 (name "python-gphoto2")
668 (version "2.2.1")
669 (source (origin
670 (method url-fetch)
671 (uri (pypi-uri "gphoto2" version))
672 (sha256
673 (base32
674 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
675 (build-system python-build-system)
676 (native-inputs
677 `(("pkg-config" ,pkg-config)))
678 (inputs
679 `(("libgphoto2" ,libgphoto2)))
680 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
681 (synopsis "Python interface to libgphoto2")
682 (description "@code{python-gphoto2} is a comprehensive Python interface
683 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
684 automatically generate the interface code.")
685 (license license:gpl3+)))
686
687 (define-public python-colour
688 (package
689 (name "python-colour")
690 (version "0.1.5")
691 (source (origin
692 (method url-fetch)
693 (uri (pypi-uri "colour" version))
694 (sha256
695 (base32
696 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
697 (build-system python-build-system)
698 (native-inputs
699 `(("python-d2to1" ,python-d2to1)))
700 (home-page "https://github.com/vaab/colour")
701 (synopsis "Convert and manipulate various color representations")
702 (description "Pythonic way to manipulate color representations (HSL, RVB,
703 web, X11, ...).")
704 (license license:expat)))
705
706 (define-public python-d2to1
707 (package
708 (name "python-d2to1")
709 (version "0.2.12.post1")
710 (source (origin
711 (method url-fetch)
712 (uri (pypi-uri "d2to1" version))
713 (sha256
714 (base32
715 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
716 (build-system python-build-system)
717 (native-inputs
718 `(("python-nose" ,python-nose)))
719 (home-page "https://github.com/embray/d2to1")
720 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
721 in python")
722 (description "The python package d2to1 (the d is for distutils) allows
723 using distutils2-like setup.cfg files for a package's metadata with a
724 distribute/setuptools setup.py script.")
725 (license license:bsd-2)))
726
727 (define-public python-rawkit
728 (package
729 (name "python-rawkit")
730 (version "0.6.0")
731 (source (origin
732 (method url-fetch)
733 (uri (pypi-uri "rawkit" version))
734 (sha256
735 (base32
736 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
737 (build-system python-build-system)
738 (native-inputs
739 `(("python-pytest" ,python-pytest)
740 ("python-mock" ,python-mock)))
741 (inputs
742 `(("libraw" ,libraw)))
743 (home-page "https://rawkit.readthedocs.io")
744 (synopsis "Ctypes-based LibRaw binding for Python")
745 (description "The rawkit package provides two modules: rawkit and libraw.
746 The rawkit module provides a high-level Pythonic interface for developing raw
747 photos, while the libraw module provides a CTypes based interface for
748 interacting with the low-level LibRaw C APIs.")
749 (license license:expat)))
750
751 (define-public python-easygui
752 (package
753 (name "python-easygui")
754 (version "0.98.1")
755 (source (origin
756 (method url-fetch)
757 (uri (pypi-uri "easygui" version))
758 (sha256
759 (base32
760 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
761 (build-system python-build-system)
762 (propagated-inputs
763 `(("python-tkinter" ,python "tk")))
764 (home-page "https://github.com/robertlugg/easygui")
765 (synopsis "GUI programming module for Python")
766 (description "EasyGUI is a module for very simple, very easy GUI
767 programming in Python. EasyGUI is different from other GUI generators in that
768 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
769 simple function calls.")
770 (license license:bsd-3)))
771
772 (define-public python-pymd4c
773 (package
774 (name "python-pymd4c")
775 (version "0.4.6.0b1")
776 (source
777 (origin
778 (method url-fetch)
779 (uri (pypi-uri "pymd4c" version))
780 (sha256
781 (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
782 (build-system python-build-system)
783 (inputs
784 `(("md4c" ,md4c)))
785 (native-inputs
786 `(("python-flake8" ,python-flake8)
787 ("python-pkgconfig" ,python-pkgconfig)
788 ("pkg-config" ,pkg-config)))
789 (home-page "https://github.com/dominickpastore/pymd4c")
790 (synopsis "Python bindings for MD4C")
791 (description
792 "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
793 to CommonMark.")
794 (license license:expat)))
795
796 (define-public python-pymediainfo
797 (package
798 (name "python-pymediainfo")
799 (version "4.1")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "pymediainfo" version))
804 (sha256
805 (base32
806 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
807 (build-system python-build-system)
808 (native-inputs
809 `(("python-setuptools-scm" ,python-setuptools-scm)
810 ("python-pytest" ,python-pytest)))
811 (inputs
812 `(("libmediainfo" ,libmediainfo)))
813 (arguments
814 `(#:phases
815 (modify-phases %standard-phases
816 (add-after 'unpack 'patch-libmediainfo
817 (lambda _
818 (substitute* "pymediainfo/__init__.py"
819 (("libmediainfo.so.0")
820 (string-append (assoc-ref %build-inputs "libmediainfo")
821 "/lib/libmediainfo.so.0")))
822 #t))
823 (replace 'check
824 (lambda _
825 ;; Extend PYTHONPATH so the built package will be found.
826 (setenv "PYTHONPATH"
827 (string-append (getcwd) "/build/lib:"
828 (getenv "PYTHONPATH")))
829 ;; Skip the only failing test "test_parse_url"
830 (invoke "pytest" "-vv" "-k" "not test_parse_url")
831 #t)))))
832 (home-page
833 "https://github.com/sbraz/pymediainfo")
834 (synopsis
835 "Python wrapper for the mediainfo library")
836 (description
837 "Python wrapper for the mediainfo library to access the technical and tag
838 data for video and audio files.")
839 (license license:expat)))
840
841 (define-public python-psutil
842 (package
843 (name "python-psutil")
844 (version "5.8.0")
845 (source
846 (origin
847 (method url-fetch)
848 (uri (pypi-uri "psutil" version))
849 (sha256
850 (base32 "1immnj532bnnrh1qmk5q3lsw3san8qfk9kxy1cpmy0knmfcwp70c"))))
851 (build-system python-build-system)
852 (arguments
853 ;; FIXME: some tests do not return and time out. Some tests fail because
854 ;; some processes survive kill().
855 '(#:tests? #f))
856 (home-page "https://github.com/giampaolo/psutil")
857 (synopsis "Library for retrieving information on running processes")
858 (description
859 "@code{psutil} (Python system and process utilities) is a library for
860 retrieving information on running processes and system utilization (CPU,
861 memory, disks, network) in Python. It is useful mainly for system monitoring,
862 profiling and limiting process resources and management of running processes.
863 It implements many functionalities offered by command line tools such as: ps,
864 top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
865 iotop, uptime, pidof, tty, taskset, pmap.")
866 (properties `((python2-variant . ,(delay python2-psutil))))
867 (license license:bsd-3)))
868
869 (define-public python2-psutil
870 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
871 (package/inherit base
872 (propagated-inputs
873 `(("python2-enum34" ,python2-enum34) ;optional
874 ,@(package-propagated-inputs base))))))
875
876 (define-public python-shapely
877 (package
878 (name "python-shapely")
879 (version "1.7.1")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "Shapely" version))
884 (sha256
885 (base32
886 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
887 (modules '((guix build utils)))
888 (snippet
889 '(begin
890 (delete-file "shapely/speedups/_speedups.c")
891 (delete-file "shapely/vectorized/_vectorized.c")
892 #t))))
893 (build-system python-build-system)
894 (native-inputs
895 `(("python-cython" ,python-cython)
896 ("python-matplotlib" ,python-matplotlib)
897 ("python-pytest" ,python-pytest)
898 ("python-pytest-cov" ,python-pytest-cov)))
899 (inputs
900 `(("geos" ,geos)))
901 (propagated-inputs
902 `(("python-numpy" ,python-numpy)))
903 (arguments
904 `(#:phases
905 (modify-phases %standard-phases
906 (add-after 'unpack 'patch-geos-path
907 (lambda* (#:key inputs #:allow-other-keys)
908 (let ((geos (assoc-ref inputs "geos"))
909 (glibc (assoc-ref inputs ,(if (%current-target-system)
910 "cross-libc" "libc"))))
911 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
912 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
913 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
914 geos "/lib/libgeos_c.so'])"))
915 (("free = load_dll\\('c'\\)\\.free")
916 (string-append "free = load_dll('c', fallbacks=['"
917 glibc "/lib/libc.so.6']).free"))
918 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
919 (string-append "free = load_dll('c', fallbacks=['"
920 glibc "/lib/libc.so.6']).free"))))
921 #t)))))
922 (home-page "https://github.com/Toblerity/Shapely")
923 (synopsis "Library for the manipulation and analysis of geometric objects")
924 (description "Shapely is a Python package for manipulation and analysis of
925 planar geometric objects. It is based on the @code{GEOS} library.")
926 (license license:bsd-3)))
927
928 (define-public python-shortuuid
929 (package
930 (name "python-shortuuid")
931 (version "0.5.0")
932 (source
933 (origin
934 (method url-fetch)
935 (uri (pypi-uri "shortuuid" version))
936 (sha256
937 (base32
938 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
939 (build-system python-build-system)
940 (native-inputs
941 `(("python-pep8" ,python-pep8)))
942 (home-page "https://github.com/skorokithakis/shortuuid")
943 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
944 (description
945 "@code{shortuuid} is a Python library for generating concise, unambiguous
946 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
947 module and then similar looking characters are removed.")
948 (license license:bsd-3)))
949
950 (define-public python-logwrap
951 (package
952 (name "python-logwrap")
953 (version "8.2.0.post0")
954 (source
955 (origin
956 (method url-fetch)
957 (uri (pypi-uri "logwrap" version))
958 (sha256
959 (base32
960 "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
961 (build-system python-build-system)
962 (arguments
963 `(#:tests? #f ; Tests not included in pypi release.
964 #:phases
965 (modify-phases %standard-phases
966 (replace 'check
967 (lambda* (#:key tests? #:allow-other-keys)
968 (when tests?
969 (invoke "pytest"))
970 #t)))))
971 (native-inputs
972 `(("python-cython" ,python-cython)
973 ("python-pytest" ,python-pytest)
974 ("python-setuptools-scm" ,python-setuptools-scm)
975 ("python-toml" ,python-toml)
976 ("python-wheel" ,python-wheel)))
977 (home-page "https://github.com/python-useful-helpers/logwrap")
978 (synopsis "Decorator for logging function arguments")
979 (description "This package provides a decorator to log function arguments
980 and function call return values in a human-readable way.")
981 (license license:asl2.0)))
982
983 (define-public python-clyent
984 (package
985 (name "python-clyent")
986 (version "1.2.1")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "clyent" version))
991 (sha256
992 (base32
993 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
994 (build-system python-build-system)
995 (native-inputs
996 `(("python-mock" ,python-mock)))
997 (home-page "https://github.com/Anaconda-Platform/clyent")
998 (synopsis "Command line client library")
999 (description "Clyent is a Python command line utility library. It is used
1000 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
1001 (license license:bsd-3)))
1002
1003 (define-public python2-clyent
1004 (package-with-python2 python-clyent))
1005
1006 (define-public python-babel
1007 (package
1008 (name "python-babel")
1009 (version "2.9.0")
1010 (source
1011 (origin
1012 (method url-fetch)
1013 (uri (pypi-uri "Babel" version))
1014 (sha256
1015 (base32
1016 "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
1017 (build-system python-build-system)
1018 (native-inputs
1019 `(("python-freezegun" ,python-freezegun)
1020 ("python-pytest" ,python-pytest)))
1021 (propagated-inputs
1022 `(("python-pytz" ,python-pytz)))
1023 (arguments
1024 `(#:phases (modify-phases %standard-phases
1025 (replace 'check
1026 (lambda _
1027 (invoke "pytest" "-vv"))))))
1028 (home-page "http://babel.pocoo.org/")
1029 (synopsis
1030 "Tools for internationalizing Python applications")
1031 (description
1032 "Babel is composed of two major parts:
1033 - tools to build and work with gettext message catalogs
1034 - a Python interface to the CLDR (Common Locale Data Repository), providing
1035 access to various locale display names, localized number and date formatting,
1036 etc. ")
1037 (license license:bsd-3)))
1038
1039 (define-public python2-babel
1040 (package-with-python2 python-babel))
1041
1042 (define-public python2-backport-ssl-match-hostname
1043 (package
1044 (name "python2-backport-ssl-match-hostname")
1045 (version "3.5.0.1")
1046 (source
1047 (origin
1048 (method url-fetch)
1049 (uri (pypi-uri "backports.ssl_match_hostname" version))
1050 (sha256
1051 (base32
1052 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
1053 (build-system python-build-system)
1054 (arguments
1055 `(#:python ,python-2
1056 #:tests? #f)) ; no test target
1057 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
1058 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
1059 (description
1060 "This backport brings the ssl.match_hostname() function to users of
1061 earlier versions of Python. The function checks the hostname in the
1062 certificate returned by the server to which a connection has been established,
1063 and verifies that it matches the intended target hostname.")
1064 (license license:psfl)))
1065
1066 (define-public python-bidict
1067 (package
1068 (name "python-bidict")
1069 (version "0.21.2")
1070 (source
1071 (origin
1072 (method url-fetch)
1073 (uri (pypi-uri "bidict" version))
1074 (sha256
1075 (base32
1076 "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
1077 (build-system python-build-system)
1078 (native-inputs
1079 `(("python-coverage" ,python-coverage)
1080 ("python-hypothesis" ,python-hypothesis-5.23) ; use_true_random=... from >=5.19.0
1081 ("python-pre-commit" ,python-pre-commit)
1082 ("python-py" ,python-py)
1083 ("python-pytest" ,python-pytest)
1084 ("python-pytest-benchmark" ,python-pytest-benchmark)
1085 ("python-pytest-cov" ,python-pytest-cov)
1086 ("python-setuptools-scm" ,python-setuptools-scm)
1087 ("python-sortedcollections" ,python-sortedcollections)
1088 ("python-sortedcontainers" ,python-sortedcontainers)
1089 ("python-sphinx" ,python-sphinx)
1090 ("python-sphinx-autodoc-typehints" ,python-sphinx-autodoc-typehints)
1091 ("python-tox" ,python-tox)))
1092 (arguments
1093 `(#:phases (modify-phases %standard-phases
1094 (add-after 'unpack 'relax-reqs
1095 (lambda _
1096 (substitute* "setup.py"
1097 (("sortedcollections < 2") "sortedcollections"))
1098 #t))
1099 (replace 'check
1100 (lambda _ (invoke "./run_tests.py"))))))
1101 (home-page "https://bidict.readthedocs.io")
1102 (synopsis "Bidirectional mapping library")
1103 (description "The @code{bidict} library provides several data structures
1104 for working with bidirectional mappings in Python.")
1105 (license license:mpl2.0)))
1106
1107 (define-public python-bitarray
1108 (package
1109 (name "python-bitarray")
1110 (version "1.4.0")
1111 (source (origin
1112 (method url-fetch)
1113 (uri (pypi-uri "bitarray" version))
1114 (sha256
1115 (base32
1116 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
1117 (build-system python-build-system)
1118 (home-page "https://github.com/ilanschnell/bitarray")
1119 (synopsis "Efficient arrays of booleans")
1120 (description "This package provides an object type which efficiently
1121 represents an array of booleans. Bitarrays are sequence types and behave very
1122 much like usual lists. Eight bits are represented by one byte in a contiguous
1123 block of memory. The user can select between two representations:
1124 little-endian and big-endian. All of the functionality is implemented in C.
1125 Methods for accessing the machine representation are provided. This can be
1126 useful when bit level access to binary files is required, such as portable
1127 bitmap image files. Also, when dealing with compressed data which uses
1128 variable bit length encoding, you may find this module useful.")
1129 (license license:psfl)))
1130
1131 (define-public python-boolean.py
1132 (package
1133 (name "python-boolean.py")
1134 (version "3.6")
1135 (source
1136 (origin
1137 ;; There's no source tarball on PyPI.
1138 (method git-fetch)
1139 (uri (git-reference
1140 (url "https://github.com/bastikr/boolean.py")
1141 (commit (string-append "v" version))))
1142 (file-name (git-file-name name version))
1143 (sha256
1144 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
1145 (build-system python-build-system)
1146 (home-page "https://github.com/bastikr/boolean.py")
1147 (synopsis "Boolean algebra in one Python module")
1148 (description
1149 "This is a small Python library that implements boolean algebra.
1150 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
1151 @code{Symbol} class that can take on one of these two values. Calculations
1152 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
1153 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
1154 Expressions are constructed from parsed strings or directly in Python.")
1155 (license license:bsd-2)))
1156
1157 (define-public python-hdf4
1158 (package
1159 (name "python-hdf4")
1160 (version "0.9")
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri name version))
1165 (sha256
1166 (base32
1167 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
1168 (build-system python-build-system)
1169 (native-inputs `(("nose" ,python-nose)))
1170 (propagated-inputs `(("numpy" ,python-numpy)))
1171 (inputs
1172 `(("hdf4" ,hdf4)
1173 ("libjpeg" ,libjpeg-turbo)
1174 ("zlib" ,zlib)))
1175 (arguments
1176 `(#:phases
1177 (modify-phases %standard-phases
1178 (replace 'check
1179 (lambda _
1180 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
1181 ;; on to import numpy. Somehow this works on their CI system.
1182 ;; Let's just manage PYTHONPATH here instead.
1183 (substitute* "runexamples.sh"
1184 (("export PYTHONPATH=.*") ""))
1185 (setenv "PYTHONPATH"
1186 (string-append (getcwd) ":"
1187 (getenv "PYTHONPATH")))
1188 (invoke "./runexamples.sh")
1189 (invoke "nosetests" "-v"))))))
1190 (home-page "https://github.com/fhs/python-hdf4")
1191 (synopsis "Python interface to the NCSA HDF4 library")
1192 (description
1193 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
1194 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
1195 NetCDF files can also be read and modified. Python-HDF4 is a fork of
1196 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
1197 (license license:expat)))
1198
1199 (define-public python-h5py
1200 (package
1201 (name "python-h5py")
1202 (version "2.10.0")
1203 (source
1204 (origin
1205 (method url-fetch)
1206 (uri (pypi-uri "h5py" version))
1207 (sha256
1208 (base32
1209 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
1210 (build-system python-build-system)
1211 (arguments
1212 `(#:tests? #f ; no test target
1213 #:phases
1214 (modify-phases %standard-phases
1215 (add-after 'unpack 'fix-hdf5-paths
1216 (lambda* (#:key inputs #:allow-other-keys)
1217 (let ((prefix (assoc-ref inputs "hdf5")))
1218 (substitute* "setup_build.py"
1219 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
1220 (string-append "['" prefix "/lib" "']"))
1221 (("'/opt/local/include', '/usr/local/include'")
1222 (string-append "'" prefix "/include" "'")))
1223 (substitute* "setup_configure.py"
1224 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
1225 (string-append "['" prefix "/lib" "']")))
1226 #t))))))
1227 (propagated-inputs
1228 `(("python-six" ,python-six)
1229 ("python-numpy" ,python-numpy)))
1230 (inputs
1231 `(("hdf5" ,hdf5-1.10)))
1232 (native-inputs
1233 `(("python-cython" ,python-cython)
1234 ("python-pkgconfig" ,python-pkgconfig)
1235 ("pkg-config" ,pkg-config)))
1236 (home-page "https://www.h5py.org/")
1237 (synopsis "Read and write HDF5 files from Python")
1238 (description
1239 "The h5py package provides both a high- and low-level interface to the
1240 HDF5 library from Python. The low-level interface is intended to be a
1241 complete wrapping of the HDF5 API, while the high-level component supports
1242 access to HDF5 files, datasets and groups using established Python and NumPy
1243 concepts.")
1244 (license license:bsd-3)))
1245
1246 (define-public python2-h5py
1247 (package-with-python2 python-h5py))
1248
1249 (define-public python-pyls-black
1250 (package
1251 (name "python-pyls-black")
1252 (version "0.4.6")
1253 (source
1254 (origin
1255 ;; There are no tests in the PyPI tarball.
1256 (method git-fetch)
1257 (uri (git-reference
1258 (url "https://github.com/rupert/pyls-black/")
1259 (commit (string-append "v" version))))
1260 (file-name (git-file-name name version))
1261 (sha256
1262 (base32 "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"))))
1263 (build-system python-build-system)
1264 (arguments
1265 `(#:test-target "pytest"))
1266 (propagated-inputs
1267 `(("python-black" ,python-black)
1268 ("python-language-server"
1269 ,python-language-server)
1270 ("python-toml" ,python-toml)))
1271 (native-inputs
1272 `(("python-flake8" ,python-flake8)
1273 ("python-isort" ,python-isort)
1274 ("python-mypy" ,python-mypy)
1275 ("python-pytest" ,python-pytest)
1276 ("python-pytest-runner" ,python-pytest-runner)))
1277 (home-page "https://github.com/rupert/pyls-black")
1278 (synopsis "Black plugin for the Python Language Server")
1279 (description "Black plugin for the Python Language Server.")
1280 (license license:expat)))
1281
1282 (define-public python-sh
1283 (package
1284 (name "python-sh")
1285 (version "1.12.14")
1286 (source
1287 (origin
1288 (method url-fetch)
1289 (uri (pypi-uri "sh" version))
1290 (sha256
1291 (base32
1292 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
1293 (build-system python-build-system)
1294 (arguments
1295 '(#:phases
1296 (modify-phases %standard-phases
1297 (replace 'check
1298 (lambda _
1299 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
1300 (setenv "HOME" "/tmp")
1301 (invoke "python" "sh.py" "test"))))))
1302 (native-inputs
1303 `(("python-coverage" ,python-coverage)))
1304 (home-page "https://github.com/amoffat/sh")
1305 (synopsis "Python subprocess replacement")
1306 (description "This package provides a replacement for Python's
1307 @code{subprocess} feature.")
1308 (license license:expat)))
1309
1310 (define-public python-cftime
1311 (package
1312 (name "python-cftime")
1313 (version "1.0.4.2")
1314 (source
1315 (origin
1316 (method url-fetch)
1317 (uri (pypi-uri "cftime" version))
1318 (sha256
1319 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
1320 (build-system python-build-system)
1321 (propagated-inputs
1322 `(("python-numpy" ,python-numpy)))
1323 (native-inputs
1324 `(("python-coveralls" ,python-coveralls)
1325 ("python-cython" ,python-cython)
1326 ("python-pytest-cov" ,python-pytest-cov)))
1327 (home-page "https://github.com/Unidata/cftime")
1328 (synopsis "Library for time handling")
1329 (description
1330 "This package provides time-handling functionality that used to be part
1331 of the netcdf4 package before.")
1332 ;; This package claims to include code under the GPLv3 but is released
1333 ;; under ISC.
1334 (license (list license:isc license:gpl3+))))
1335
1336 (define-public python-netcdf4
1337 (package
1338 (name "python-netcdf4")
1339 (version "1.5.3")
1340 (source
1341 (origin
1342 (method url-fetch)
1343 (uri (pypi-uri "netCDF4" version))
1344 (sha256
1345 (base32
1346 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
1347 (build-system python-build-system)
1348 (arguments
1349 '(#:phases
1350 (modify-phases %standard-phases
1351 (add-after 'unpack 'configure-locations
1352 (lambda* (#:key inputs #:allow-other-keys)
1353 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
1354 #t)))))
1355 (native-inputs
1356 `(("python-cython" ,python-cython)))
1357 (propagated-inputs
1358 `(("python-numpy" ,python-numpy)
1359 ("python-cftime" ,python-cftime)))
1360 (inputs
1361 `(("netcdf" ,netcdf)
1362 ("hdf4" ,hdf4)
1363 ("hdf5" ,hdf5)))
1364 (home-page "https://github.com/Unidata/netcdf4-python")
1365 (synopsis "Python/numpy interface to the netCDF library")
1366 (description "Netcdf4-python is a Python interface to the netCDF C
1367 library. netCDF version 4 has many features not found in earlier
1368 versions of the library and is implemented on top of HDF5. This module
1369 can read and write files in both the new netCDF 4 and the old netCDF 3
1370 format, and can create files that are readable by HDF5 clients. The
1371 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
1372 to users of that module.")
1373 ;; The software is mainly ISC, but includes some files covered
1374 ;; by the Expat license.
1375 (license (list license:isc license:expat))))
1376
1377 (define-public python-license-expression
1378 (package
1379 (name "python-license-expression")
1380 (version "1.2")
1381 (source
1382 (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "license-expression" version))
1385 (sha256
1386 (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
1387 (build-system python-build-system)
1388 (propagated-inputs
1389 `(("python-boolean.py" ,python-boolean.py)))
1390 (home-page "https://github.com/nexB/license-expression")
1391 (synopsis "Apply boolean logic to license expressions")
1392 (description
1393 "This Python module defines a tiny language to evaluate and compare
1394 license expressions using boolean logic. Logical combinations of licenses can
1395 be tested for equality, containment, and equivalence. They can be normalised
1396 and simplified. It supports SPDX license expressions as well as other naming
1397 conventions and aliases in the same expression.")
1398 (license license:gpl2+)))
1399
1400 (define-public python-lockfile
1401 (package
1402 (name "python-lockfile")
1403 (version "0.12.2")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "lockfile" version))
1408 (sha256
1409 (base32
1410 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1411 (build-system python-build-system)
1412 (arguments '(#:test-target "check"))
1413 (native-inputs
1414 `(("python-pbr" ,python-pbr)))
1415 (home-page "https://launchpad.net/pylockfile")
1416 (synopsis "Platform-independent file locking module")
1417 (description
1418 "The lockfile package exports a LockFile class which provides a simple
1419 API for locking files.")
1420 (license license:expat)))
1421
1422 (define-public python-fb-re2
1423 (package
1424 (name "python-fb-re2")
1425 (version "1.0.7")
1426 (source
1427 (origin
1428 (method git-fetch)
1429 (uri (git-reference
1430 (url "https://github.com/facebook/pyre2")
1431 (commit (string-append "v" version))))
1432 (file-name (git-file-name name version))
1433 (sha256
1434 (base32
1435 "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
1436 (build-system python-build-system)
1437 (inputs
1438 `(("re2" ,re2)))
1439 (home-page "https://github.com/facebook/pyre2")
1440 (synopsis "Python wrapper for RE2")
1441 (description "This package provides a Python extension that wraps Google's
1442 RE2 regular expression library. It implements many of the features of
1443 Python's built-in @code{re} module with compatible interfaces.")
1444 (license license:bsd-3)))
1445
1446 (define-public python-filelock
1447 (package
1448 (name "python-filelock")
1449 (version "3.0.12")
1450 (source
1451 (origin
1452 (method url-fetch)
1453 (uri (pypi-uri "filelock" version))
1454 (sha256
1455 (base32
1456 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1457 (build-system python-build-system)
1458 (home-page
1459 "https://github.com/benediktschmitt/py-filelock")
1460 (synopsis "Platform independent file lock")
1461 (description "@code{filelock} contains a single module implementing
1462 a platform independent file lock in Python, which provides a simple way of
1463 inter-process communication.")
1464 (license license:unlicense)))
1465
1466 (define-public python-semantic-version
1467 (package
1468 (name "python-semantic-version")
1469 (version "2.8.5")
1470 (source
1471 (origin
1472 (method url-fetch)
1473 (uri (pypi-uri "semantic_version" version))
1474 (sha256
1475 (base32
1476 "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
1477 (build-system python-build-system)
1478 (home-page "https://github.com/rbarrois/python-semanticversion")
1479 (synopsis "Semantic versioning module for Python")
1480 (description
1481 "The @code{semantic_version} class is a small library for handling
1482 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1483
1484 It can compare versions, generate a new version that represents a bump in one of
1485 the version levels, and check whether any given string is a proper semantic
1486 version identifier.")
1487 (license license:bsd-3)))
1488
1489 (define-public python2-semantic-version
1490 (package-with-python2 python-semantic-version))
1491
1492 (define-public python-serpent
1493 (package
1494 (name "python-serpent")
1495 (version "1.28")
1496 (source
1497 (origin
1498 (method url-fetch)
1499 (uri (pypi-uri "serpent" version))
1500 (sha256
1501 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1502 (build-system python-build-system)
1503 (native-inputs
1504 `(("python-attrs" ,python-attrs)
1505 ("python-pytz" ,python-pytz)))
1506 (home-page "https://github.com/irmen/Serpent")
1507 (synopsis "Serializer for literal Python expressions")
1508 (description
1509 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1510 serialization. It serializes an object tree into bytes (an utf-8 encoded
1511 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1512 to rebuild the original object tree.
1513
1514 Because only safe literals are encoded, it is safe to send serpent data to
1515 other machines, such as over the network.")
1516 (properties `((python2-variant . ,(delay python2-serpent))))
1517 (license license:expat)))
1518
1519 (define-public python2-serpent
1520 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1521 (package/inherit base
1522 (propagated-inputs
1523 `(("python-enum34" ,python2-enum34)
1524 ,@(package-propagated-inputs base))))))
1525
1526 (define-public python-setuptools
1527 (package
1528 (name "python-setuptools")
1529 (version "52.0.0")
1530 (source
1531 (origin
1532 (method url-fetch)
1533 (uri (pypi-uri "setuptools" version))
1534 (sha256
1535 (base32
1536 "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
1537 (modules '((guix build utils)))
1538 (snippet
1539 '(begin
1540 ;; Remove included binaries which are used to build self-extracting
1541 ;; installers for Windows.
1542 ;; TODO: Find some way to build them ourself so we can include them.
1543 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1544 #t))))
1545 (build-system python-build-system)
1546 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1547 ;; One could bootstrap with an internal untested setuptools.
1548 (arguments
1549 `(#:tests? #f))
1550 (home-page "https://pypi.org/project/setuptools/")
1551 (synopsis
1552 "Library designed to facilitate packaging Python projects")
1553 (description
1554 "Setuptools is a fully-featured, stable library designed to facilitate
1555 packaging Python projects, where packaging includes:
1556 Python package and module definitions,
1557 distribution package metadata,
1558 test hooks,
1559 project installation,
1560 platform-specific details,
1561 Python 3 support.")
1562 ;; TODO: setuptools now bundles the following libraries:
1563 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1564 (license (list license:psfl ; setuptools itself
1565 license:expat ; six, appdirs, pyparsing
1566 license:asl2.0 ; packaging is dual ASL2/BSD-2
1567 license:bsd-2))
1568 (properties `((python2-variant . ,(delay python2-setuptools))))))
1569
1570 ;; Newer versions of setuptools no longer support Python 2.
1571 (define-public python2-setuptools
1572 (package
1573 (name "python2-setuptools")
1574 (version "41.0.1")
1575 (source
1576 (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "setuptools" version ".zip"))
1579 (sha256
1580 (base32
1581 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1582 (modules '((guix build utils)))
1583 (snippet
1584 '(begin
1585 ;; Remove included binaries which are used to build self-extracting
1586 ;; installers for Windows.
1587 ;; TODO: Find some way to build them ourself so we can include them.
1588 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1589 #t))))
1590 (build-system python-build-system)
1591 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1592 ;; One could bootstrap with an internal untested setuptools.
1593 (arguments
1594 `(#:tests? #f))
1595 (native-inputs
1596 `(("unzip" ,unzip)))
1597 (home-page "https://pypi.org/project/setuptools/")
1598 (synopsis
1599 "Library designed to facilitate packaging Python projects")
1600 (description
1601 "Setuptools is a fully-featured, stable library designed to facilitate
1602 packaging Python projects, where packaging includes:
1603 Python package and module definitions,
1604 distribution package metadata,
1605 test hooks,
1606 project installation,
1607 platform-specific details,
1608 Python 3 support.")
1609 ;; TODO: setuptools now bundles the following libraries:
1610 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1611 (license (list license:psfl ; setuptools itself
1612 license:expat ; six, appdirs, pyparsing
1613 license:asl2.0 ; packaging is dual ASL2/BSD-2
1614 license:bsd-2))))
1615
1616 (define-public python-setuptools-declarative-requirements
1617 (package
1618 (name "python-setuptools-declarative-requirements")
1619 (version "1.2.0")
1620 (source
1621 (origin
1622 (method url-fetch)
1623 (uri (pypi-uri
1624 "setuptools-declarative-requirements"
1625 version))
1626 (sha256
1627 (base32
1628 "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
1629 (build-system python-build-system)
1630 (native-inputs
1631 `(("python-pytest" ,python-pytest)
1632 ("python-setuptools-scm" ,python-setuptools-scm)))
1633 (propagated-inputs
1634 `(("python-toml" ,python-toml)
1635 ("python-wheel" ,python-wheel)))
1636 (home-page
1637 "https://github.com/s0undt3ch/setuptools-declarative-requirements")
1638 (synopsis "File support for setuptools declarative setup.cfg")
1639 (description
1640 "This package provides file support for setuptools declarative
1641 @code{setup.cfg}.")
1642 (license license:asl2.0)))
1643
1644 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1645 (define-public python-setuptools-for-tensorflow
1646 (hidden-package
1647 (package
1648 (inherit python-setuptools)
1649 (version "39.1.0")
1650 (source (origin
1651 (inherit (package-source python-setuptools))
1652 (uri (pypi-uri "setuptools" version ".zip"))
1653 (sha256
1654 (base32
1655 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1656
1657 (define-public python-uniseg
1658 (package
1659 (name "python-uniseg")
1660 (version "0.7.1")
1661 (source
1662 (origin
1663 (method url-fetch)
1664 (uri (pypi-uri "uniseg" version ".zip"))
1665 (sha256
1666 (base32
1667 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1668 (build-system python-build-system)
1669 (arguments
1670 '(#:tests? #f)) ; The test suite requires network access.
1671 (native-inputs
1672 `(("unzip" ,unzip)))
1673 (home-page
1674 "https://bitbucket.org/emptypage/uniseg-python")
1675 (synopsis
1676 "Python library to determine Unicode text segmentations")
1677 (description
1678 "Uniseg is a Python package used to determine Unicode text segmentations.
1679 Supported segmentations include:
1680 @enumerate
1681 @item @dfn{Code point} (any value in the Unicode codespace)
1682 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1683 multiple Unicode code points, e.g. \"G\" + acute-accent)
1684 @item Word break
1685 @item Sentence break
1686 @item Line break
1687 @end enumerate")
1688 (license license:expat)))
1689
1690 (define-public python2-uniseg
1691 (package-with-python2 python-uniseg))
1692
1693 (define-public python-humanfriendly
1694 (package
1695 (name "python-humanfriendly")
1696 (version "8.2")
1697 (source
1698 (origin
1699 (method url-fetch)
1700 (uri (pypi-uri "humanfriendly" version))
1701 (sha256
1702 (base32
1703 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1704 (build-system python-build-system)
1705 (arguments
1706 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1707 #:tests? #f))
1708 (home-page "https://humanfriendly.readthedocs.io")
1709 (synopsis "Human-friendly input and output in Python")
1710 (description
1711 "The functions and classes in @code{humanfriendly} can be used to make
1712 text interfaces more user-friendly. It includes tools to parse and format
1713 numbers, file sizes, and timespans, timers for long-running operations, menus
1714 to allow the user to choose from a list of options, and terminal interaction
1715 helpers.")
1716 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1717 (license license:expat)))
1718
1719 (define-public python2-humanfriendly
1720 (let ((base (package-with-python2
1721 (strip-python2-variant python-humanfriendly))))
1722 (package/inherit base
1723 (propagated-inputs
1724 `(("python2-monotonic" ,python2-monotonic)
1725 ,@(package-propagated-inputs base))))))
1726
1727 (define-public python-textparser
1728 (package
1729 (name "python-textparser")
1730 (version "0.23.0")
1731 (source
1732 (origin
1733 (method url-fetch)
1734 (uri (pypi-uri "textparser" version))
1735 (sha256
1736 (base32
1737 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1738 (build-system python-build-system)
1739 (home-page "https://github.com/eerimoq/textparser")
1740 (synopsis "Fast text parser for Python")
1741 (description "This library provides a text parser written in the Python
1742 language. It aims to be fast.")
1743 (license license:expat)))
1744
1745 (define-public python-aenum
1746 (package
1747 (name "python-aenum")
1748 (version "2.2.4")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "aenum" version))
1753 (sha256
1754 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1755 (build-system python-build-system)
1756 (arguments
1757 `(#:phases (modify-phases %standard-phases
1758 (replace 'check
1759 (lambda _
1760 (format #t "current working dir ~s~%" (getcwd))
1761 (setenv "PYTHONPATH"
1762 (string-append ".:" (getenv "PYTHONPATH")))
1763 ;; We must run the test suite module directly, as it
1764 ;; fails to define the 'tempdir' variable in scope for
1765 ;; the tests otherwise
1766 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1767 ;; issues/32/running-tests-with-python-setuppy-test).
1768 (invoke "python3" "aenum/test.py")
1769 ;; This one fails with "NameError: name
1770 ;; 'test_pickle_dump_load' is not defined" (see:
1771 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1772 ;; /error-running-the-test_v3py-test-suite).
1773 ;; (invoke "python3" "aenum/test_v3.py")
1774 #t)))))
1775 (home-page "https://bitbucket.org/stoneleaf/aenum")
1776 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1777 (description "The aenum library includes an @code{Enum} base class, a
1778 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1779 class.")
1780 (license license:bsd-3)))
1781
1782 (define-public python-can
1783 (package
1784 (name "python-can")
1785 (version "3.3.3")
1786 (source
1787 (origin
1788 (method url-fetch)
1789 (uri (pypi-uri "python-can" version))
1790 (sha256
1791 (base32
1792 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1793 (build-system python-build-system)
1794 (arguments
1795 `(#:phases (modify-phases %standard-phases
1796 (add-after 'unpack 'relax-version-requirements
1797 (lambda _
1798 (substitute* "setup.py"
1799 (("mock~=2\\.0") "mock")
1800 (("coverage<5") "coverage")
1801 (("pytest~=4\\.3") "pytest")
1802 (("hypothesis~=4\\.56") "hypothesis"))
1803 #t))
1804 (add-after 'unpack 'fix-broken-tests
1805 ;; The tests try to run two scripts it expects should be
1806 ;; in PATH, but they aren't at this time (see:
1807 ;; https://github.com/hardbyte/python-can/issues/805).
1808 (lambda _
1809 (substitute* "test/test_scripts.py"
1810 (("\"can_logger\\.py --help\"") "")
1811 (("\"can_player\\.py --help\"") ""))
1812 #t)))))
1813 (propagated-inputs
1814 `(("python-aenum" ,python-aenum)
1815 ("python-wrapt" ,python-wrapt)))
1816 (native-inputs
1817 `(("python-codecov" ,python-codecov)
1818 ("python-coverage" ,python-coverage)
1819 ("python-future" ,python-future)
1820 ("python-hypothesis" ,python-hypothesis)
1821 ("python-mock" ,python-mock)
1822 ("python-pyserial" ,python-pyserial)
1823 ("python-pytest" ,python-pytest)
1824 ("python-pytest-cov" ,python-pytest-cov)
1825 ("python-pytest-runner" ,python-pytest-runner)
1826 ("python-pytest-timeout" ,python-pytest-timeout)))
1827 (home-page "https://github.com/hardbyte/python-can")
1828 (synopsis "Controller Area Network (CAN) interface module for Python")
1829 (description "This package defines the @code{can} module, which provides
1830 controller area network (CAN) support for Python developers; providing common
1831 abstractions to different hardware devices, and a suite of utilities for
1832 sending and receiving messages on a CAN bus.")
1833 (license license:lgpl3+)))
1834
1835 (define-public python-caniusepython3
1836 (package
1837 (name "python-caniusepython3")
1838 (version "7.2.0")
1839 (source
1840 (origin
1841 (method url-fetch)
1842 (uri (pypi-uri "caniusepython3" version))
1843 (sha256
1844 (base32
1845 "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
1846 (build-system python-build-system)
1847 (arguments
1848 `(#:phases (modify-phases %standard-phases
1849 (add-after 'unpack 'relax-requirements
1850 (lambda _
1851 (substitute* "setup.py"
1852 ;; These are for compatibility with Python 2.
1853 ((".*'argparse', 'backports.functools_lru_cache',.*")
1854 ""))
1855 (substitute* "dev_requirements.txt"
1856 ((".*pylint.*") "")) ;not actually required
1857 #t))
1858 (replace 'check
1859 (lambda _
1860 (invoke "py.test" "-k" "not NetworkTests"))))))
1861 (propagated-inputs
1862 `(("python-distlib" ,python-distlib)
1863 ("python-packaging" ,python-packaging)
1864 ("python-requests" ,python-requests)))
1865 (native-inputs
1866 `(("python-mock" ,python-mock)
1867 ("python-pytest" ,python-pytest)))
1868 (home-page "https://github.com/brettcannon/caniusepython3")
1869 (synopsis "Check for Python 3-incompatible Python libraries")
1870 (description "The @command{caniusepython3} command scans your project and
1871 reports the Python 3-incompatible libraries it found. It can also be used as
1872 a library.")
1873 (license license:asl2.0)))
1874
1875 (define-public python-diskcache
1876 (package
1877 (name "python-diskcache")
1878 (version "4.1.0")
1879 (source
1880 (origin
1881 (method url-fetch)
1882 (uri (pypi-uri "diskcache" version))
1883 (sha256
1884 (base32
1885 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1886 (build-system python-build-system)
1887 (arguments
1888 `(#:tests? #f)) ;test suite not included in the release
1889 (home-page "http://www.grantjenks.com/docs/diskcache/")
1890 (synopsis "Disk and file backed cache library")
1891 (description "DiskCache is a disk and file backed persistent cache.")
1892 (license license:asl2.0)))
1893
1894 (define-public python-bitstruct
1895 (package
1896 (name "python-bitstruct")
1897 (version "8.9.0")
1898 (source
1899 (origin
1900 (method url-fetch)
1901 (uri (pypi-uri "bitstruct" version))
1902 (sha256
1903 (base32
1904 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1905 (build-system python-build-system)
1906 (home-page "https://github.com/eerimoq/bitstruct")
1907 (synopsis "Python values to and C bit field structs converter")
1908 (description "This module performs conversions between Python values and C
1909 bit field structs represented as Python byte strings. It is intended to have
1910 a similar interface as the @code{struct} module from Python, but working on
1911 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1912 (license license:expat)))
1913
1914 (define-public python-cantools
1915 (package
1916 (name "python-cantools")
1917 (version "33.1.1")
1918 (source
1919 (origin
1920 ;; We take the sources from the Git repository as the documentation is
1921 ;; not included with the PyPI archive.
1922 (method git-fetch)
1923 (uri (git-reference
1924 (url "https://github.com/eerimoq/cantools")
1925 (commit version)))
1926 (file-name (git-file-name name version))
1927 (sha256
1928 (base32
1929 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1930 (build-system python-build-system)
1931 (arguments
1932 `(#:phases
1933 (modify-phases %standard-phases
1934 (add-after 'build 'build-doc
1935 (lambda _
1936 ;; See: https://github.com/eerimoq/cantools/issues/190.
1937 (substitute* "README.rst"
1938 (("https://github.com/eerimoq/cantools/raw/master\
1939 /docs/monitor.png")
1940 "monitor.png"))
1941 (with-directory-excursion "docs"
1942 (invoke "make" "man" "info"))))
1943 (add-after 'install 'install-doc
1944 (lambda* (#:key outputs #:allow-other-keys)
1945 (let* ((out (assoc-ref outputs "out"))
1946 (info (string-append out "/share/info"))
1947 (man1 (string-append out "/share/man/man1")))
1948 (format #t "CWD: ~s~%" (getcwd))
1949 (install-file "docs/_build/texinfo/cantools.info" info)
1950 (install-file "docs/_build/man/cantools.1" man1)
1951 #t))))))
1952 (native-inputs
1953 `(("sphinx" ,python-sphinx)
1954 ("texinfo" ,texinfo)))
1955 (propagated-inputs
1956 `(("python-bitstruct" ,python-bitstruct)
1957 ("python-can" ,python-can)
1958 ("python-diskcache" ,python-diskcache)
1959 ("python-textparser" ,python-textparser)))
1960 (home-page "https://github.com/eerimoq/cantools")
1961 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1962 (description "This package includes Controller Area Network (CAN) related
1963 tools that can be used to:
1964 @itemize
1965 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1966 @item encode and decode CAN messages
1967 @item multiplex simple and extended signals
1968 @item diagnose DID encoding and decoding
1969 @item dump the CAN decoder output
1970 @item test CAN nodes
1971 @item generate C source code
1972 @item monitor the CAN bus
1973 @end itemize")
1974 (license license:expat)))
1975
1976 (define-public python-capturer
1977 (package
1978 (name "python-capturer")
1979 (version "2.4")
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (pypi-uri "capturer" version))
1984 (sha256
1985 (base32
1986 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1987 (build-system python-build-system)
1988 (arguments
1989 `(#:tests? #f))
1990 (propagated-inputs
1991 `(("python-humanfriendly" ,python-humanfriendly)))
1992 (home-page "https://capturer.readthedocs.io")
1993 (synopsis "Capture stdout and stderr streams of the current process")
1994 (description
1995 "The capturer package makes it easy to capture the stdout and stderr
1996 streams of the current process and subprocesses. Output can be relayed
1997 to the terminal in real time but is also available to the Python program
1998 for additional processing.")
1999 (license license:expat)))
2000
2001 (define-public python2-capturer
2002 (package-with-python2 python-capturer))
2003
2004 (define-public python-case
2005 (package
2006 (name "python-case")
2007 (version "1.5.3")
2008 (source
2009 (origin
2010 (method url-fetch)
2011 (uri (pypi-uri "case" version))
2012 (sha256
2013 (base32
2014 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
2015 (build-system python-build-system)
2016 (propagated-inputs
2017 `(("python-mock" ,python-mock)
2018 ("python-nose" ,python-nose)
2019 ("python-six" ,python-six)
2020 ("python-unittest2" ,python-unittest2)))
2021 (native-inputs
2022 `(("python-coverage" ,python-coverage)))
2023 (home-page "https://github.com/celery/case")
2024 (synopsis "Unittest utilities and convenience methods")
2025 (description
2026 "The @code{case} package provides utilities on top of unittest, including
2027 some helpful Python 2 compatibility convenience methods.")
2028 (license license:bsd-3)))
2029
2030 (define-public python-verboselogs
2031 (package
2032 (name "python-verboselogs")
2033 (version "1.7")
2034 (source
2035 (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "verboselogs" version))
2038 (sha256
2039 (base32
2040 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
2041 (build-system python-build-system)
2042 (arguments
2043 `(#:phases
2044 (modify-phases %standard-phases
2045 (replace 'check
2046 (lambda _
2047 ;; Do not run pylint plugin test, as astroid is an old
2048 ;; unsupported version.
2049 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
2050 "verboselogs/tests.py"))))))
2051 (native-inputs
2052 `(("python-mock" ,python-mock)
2053 ("python-pytest" ,python-pytest)))
2054 (home-page "https://verboselogs.readthedocs.io")
2055 (synopsis "Verbose logging level for Python's logging module")
2056 (description
2057 "The @code{verboselogs} package extends Python's @code{logging} module to
2058 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
2059 (license license:expat)))
2060
2061 (define-public python2-verboselogs
2062 (package-with-python2 python-verboselogs))
2063
2064 (define-public python-coloredlogs
2065 (package
2066 (name "python-coloredlogs")
2067 (version "10.0")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (pypi-uri "coloredlogs" version))
2072 (sha256
2073 (base32
2074 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
2075 (build-system python-build-system)
2076 (arguments
2077 `(;Tests require some updated modules
2078 #:tests? #f))
2079 (propagated-inputs
2080 `(("python-capturer" ,python-capturer)))
2081 (home-page "https://coloredlogs.readthedocs.io")
2082 (synopsis "Colored stream handler for Python's logging module")
2083 (description
2084 "The @code{coloredlogs} package enables colored terminal output for
2085 Python's logging module. The @code{ColoredFormatter} class inherits from
2086 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
2087 messages in color.")
2088 (license license:expat)))
2089
2090 (define-public python2-coloredlogs
2091 (package-with-python2 python-coloredlogs))
2092
2093 (define-public python-editorconfig
2094 (package
2095 (name "python-editorconfig")
2096 (version "0.12.2")
2097 (source
2098 (origin
2099 (method url-fetch)
2100 (uri (pypi-uri "EditorConfig" version))
2101 (sha256
2102 (base32
2103 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
2104 (build-system python-build-system)
2105 (home-page "https://editorconfig.org/")
2106 (synopsis "EditorConfig bindings for python")
2107 (description "The EditorConfig project consists of a file format for
2108 defining coding styles and a collection of text editor plugins that enable
2109 editors to read the file format and adhere to defined styles. EditorConfig
2110 files are easily readable and they work nicely with version control systems.")
2111 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
2112 (license (list license:bsd-2 license:psfl))))
2113
2114 (define-public dosage
2115 (package
2116 (name "dosage")
2117 (version "2.17")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (pypi-uri "dosage" version))
2122 (sha256
2123 (base32
2124 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
2125 (build-system python-build-system)
2126 (propagated-inputs
2127 `(("python2-backports-functools-lru-cache"
2128 ,python2-backports-functools-lru-cache)
2129 ("python2-backports-shutil-get-terminal-size"
2130 ,python2-backports-shutil-get-terminal-size)
2131 ("python-cached-property" ,python-cached-property)
2132 ("python-colorama" ,python-colorama)
2133 ("python-imagesize" ,python-imagesize)
2134 ("python-importlib-metadata" ,python-importlib-metadata)
2135 ("python-lxml" ,python-lxml)
2136 ("python-requests" ,python-requests)
2137 ("python-six" ,python-six)))
2138 (native-inputs
2139 `(("python-pytest-cov" ,python-pytest-cov)
2140 ("python-pytest-xdist" ,python-pytest-xdist)
2141 ("python-responses" ,python-responses)
2142 ("python-setuptools-scm" ,python-setuptools-scm)))
2143 (home-page "https://github.com/webcomics/dosage")
2144 (synopsis "Comic strip downloader and archiver")
2145 (description "Dosage is designed to keep a local copy of specific webcomics and other
2146 picture-based content such as Picture of the Day sites. With the @command{dosage}
2147 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
2148 downloaded, or download a strip for a particular date or index, if possible.")
2149 (license license:expat)))
2150
2151 (define-public python-et-xmlfile
2152 (package
2153 (name "python-et-xmlfile")
2154 (version "1.0.1")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "et_xmlfile" version))
2159 (sha256
2160 (base32
2161 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
2162 (build-system python-build-system)
2163 (arguments
2164 `(#:phases (modify-phases %standard-phases
2165 (replace 'check
2166 (lambda _
2167 (invoke "pytest"))))))
2168 (native-inputs
2169 `(("python-pytest" ,python-pytest)
2170 ("python-lxml" ,python-lxml))) ;used for the tests
2171 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
2172 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
2173 (description "This Python library is based upon the @code{xmlfile} module
2174 from @code{lxml}. It aims to provide a low memory, compatible implementation
2175 of @code{xmlfile}.")
2176 (license license:expat)))
2177
2178 (define-public python2-et-xmlfile
2179 (package-with-python2 python-et-xmlfile))
2180
2181 (define-public python-openpyxl
2182 (package
2183 (name "python-openpyxl")
2184 (version "3.0.5")
2185 (source
2186 (origin
2187 ;; We use the upstream repository, as the tests are not included in the
2188 ;; PyPI releases.
2189 (method hg-fetch)
2190 (uri (hg-reference
2191 (url "https://foss.heptapod.net/openpyxl/openpyxl")
2192 (changeset version)))
2193 (file-name (string-append name "-" version "-checkout"))
2194 (sha256
2195 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
2196 (build-system python-build-system)
2197 (arguments
2198 `(#:phases (modify-phases %standard-phases
2199 (replace 'check
2200 (lambda _
2201 (invoke "pytest"))))))
2202 (native-inputs
2203 ;; For the test suite.
2204 `(("python-lxml" ,python-lxml)
2205 ("python-pillow" ,python-pillow)
2206 ("python-pytest" ,python-pytest)))
2207 (propagated-inputs
2208 `(("python-et-xmlfile" ,python-et-xmlfile)
2209 ("python-jdcal" ,python-jdcal)))
2210 (home-page "https://openpyxl.readthedocs.io")
2211 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
2212 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
2213 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
2214 standard.")
2215 (properties `((python2-variant . ,(delay python2-openpyxl))))
2216 (license license:expat)))
2217
2218 (define-public python2-openpyxl
2219 (let ((base (package-with-python2
2220 (strip-python2-variant python-openpyxl))))
2221 (package
2222 (inherit base)
2223 ;; This is the latest version that has python2 support
2224 (version "2.6.4")
2225 (source
2226 (origin
2227 (method url-fetch)
2228 (uri (pypi-uri "openpyxl" version))
2229 (sha256
2230 (base32
2231 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
2232 (arguments '(#:tests? #f))))) ; No test suite.
2233
2234 (define-public python-eventlet
2235 (package
2236 (name "python-eventlet")
2237 (version "0.25.1")
2238 (source
2239 (origin
2240 (method url-fetch)
2241 (uri (pypi-uri "eventlet" version))
2242 (sha256
2243 (base32
2244 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
2245 (build-system python-build-system)
2246 (propagated-inputs
2247 `(("python-dnspython" ,python-dnspython)
2248 ("python-greenlet" ,python-greenlet)
2249 ("python-monotonic" ,python-monotonic)))
2250 (arguments
2251 ;; TODO: Requires unpackaged 'enum-compat'.
2252 '(#:tests? #f))
2253 (home-page "https://eventlet.net")
2254 (synopsis "Concurrent networking library for Python")
2255 (description
2256 "Eventlet is a concurrent networking library for Python that
2257 allows you to change how you run your code, not how you write it.
2258 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
2259 Coroutines ensure that the developer uses a blocking style of programming
2260 that is similar to threading, but provide the benefits of non-blocking I/O.
2261 The event dispatch is implicit, which means you can easily use @code{Eventlet}
2262 from the Python interpreter, or as a small part of a larger application.")
2263 (license license:expat)))
2264
2265 (define-public python-sinfo
2266 (package
2267 (name "python-sinfo")
2268 (version "0.3.4")
2269 (source (origin
2270 (method url-fetch)
2271 (uri (pypi-uri "sinfo" version))
2272 (sha256
2273 (base32
2274 "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
2275 (build-system python-build-system)
2276 (propagated-inputs
2277 `(("python-stdlib-list" ,python-stdlib-list)))
2278 (home-page "https://gitlab.com/joelostblom/session_info")
2279 (synopsis "Output module version information loaded in a Python session")
2280 (description "This package outputs version information for modules loaded
2281 in the current session, Python, and the OS.")
2282 (license license:bsd-3)))
2283
2284 (define-public python-six
2285 (package
2286 (name "python-six")
2287 (version "1.14.0")
2288 (source
2289 (origin
2290 (method url-fetch)
2291 (uri (pypi-uri "six" version))
2292 (sha256
2293 (base32
2294 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
2295 (build-system python-build-system)
2296 (arguments
2297 `(#:phases
2298 (modify-phases %standard-phases
2299 (replace 'check
2300 (lambda _
2301 (invoke "py.test" "-v"))))))
2302 (native-inputs
2303 `(("python-pytest" ,python-pytest-bootstrap)))
2304 (home-page "https://pypi.org/project/six/")
2305 (synopsis "Python 2 and 3 compatibility utilities")
2306 (description
2307 "Six is a Python 2 and 3 compatibility library. It provides utility
2308 functions for smoothing over the differences between the Python versions with
2309 the goal of writing Python code that is compatible on both Python versions.
2310 Six supports every Python version since 2.5. It is contained in only one
2311 Python file, so it can be easily copied into your project.")
2312 (license license:x11)))
2313
2314 (define-public python2-six
2315 (package-with-python2 python-six))
2316
2317 (define-public python-six-bootstrap
2318 (package
2319 (inherit python-six)
2320 (name "python-six-bootstrap")
2321 (native-inputs `())
2322 (arguments `(#:tests? #f))))
2323
2324 (define-public python2-six-bootstrap
2325 (package-with-python2 python-six-bootstrap))
2326
2327 (define-public python-schedule
2328 (package
2329 (name "python-schedule")
2330 (version "0.4.3")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "schedule" version))
2335 (sha256
2336 (base32
2337 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
2338 (build-system python-build-system)
2339 (native-inputs
2340 `(("python-pytest" ,python-pytest)
2341 ("python-mock" ,python-mock)))
2342 (home-page "https://github.com/dbader/schedule")
2343 (synopsis "Schedule periodic function calls in Python")
2344 (description
2345 "Schedule is an in-process scheduler for periodic jobs that uses the
2346 builder pattern for configuration. Schedule lets you run Python functions (or
2347 any other callable) periodically at pre-determined intervals using a simple,
2348 human-friendly syntax.")
2349 (license license:expat)))
2350
2351 (define-public python2-schedule
2352 (package-with-python2 python-schedule))
2353
2354 (define-public python-scour
2355 (package
2356 (name "python-scour")
2357 (version "0.38.2")
2358 (source
2359 (origin
2360 (method git-fetch)
2361 (uri
2362 (git-reference
2363 (url "https://github.com/scour-project/scour")
2364 (commit
2365 (string-append "v" version))))
2366 (file-name (git-file-name name version))
2367 (sha256
2368 (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
2369 (propagated-inputs
2370 `(("python-six" ,python-six)))
2371 (build-system python-build-system)
2372 (home-page "https://github.com/scour-project/scour")
2373 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
2374 (description "The goal of Scour is to output a file that renders
2375 identically at a fraction of the size by removing a lot of redundant
2376 information created by most SVG editors. Optimization options are typically
2377 lossless but can be tweaked for more aggressive cleaning.")
2378 (license license:asl2.0)))
2379
2380 (define-public python-mechanize
2381 (package
2382 (name "python-mechanize")
2383 (version "0.4.5")
2384 (source
2385 (origin
2386 (method url-fetch)
2387 (uri (pypi-uri "mechanize" version))
2388 (sha256
2389 (base32
2390 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
2391 (build-system python-build-system)
2392 (propagated-inputs
2393 `(("python-html5lib" ,python-html5lib)))
2394 (home-page "https://github.com/python-mechanize/mechanize")
2395 (synopsis
2396 "Stateful programmatic web browsing in Python")
2397 (description
2398 "Mechanize implements stateful programmatic web browsing in Python,
2399 after Andy Lester’s Perl module WWW::Mechanize.")
2400 (license license:bsd-3)))
2401
2402 (define-public python2-mechanize
2403 (package-with-python2 python-mechanize))
2404
2405 (define-public python-simpleaudio
2406 (package
2407 (name "python-simpleaudio")
2408 (version "1.0.4")
2409 (source
2410 (origin
2411 (method url-fetch)
2412 (uri (pypi-uri "simpleaudio" version))
2413 (sha256
2414 (base32
2415 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
2416 (build-system python-build-system)
2417 (arguments
2418 `(#:tests? #f))
2419 (inputs
2420 `(("alsa-lib" ,alsa-lib)))
2421 (home-page
2422 "https://github.com/hamiltron/py-simple-audio")
2423 (synopsis "Simple, asynchronous audio playback for Python 3")
2424 (description
2425 "The @code{simplaudio} package provides cross-platform, dependency-free
2426 audio playback capability for Python 3 on OSX, Windows, and Linux.")
2427 (license license:expat))) ; MIT license
2428
2429 (define-public python-simplejson
2430 (package
2431 (name "python-simplejson")
2432 (version "3.17.0")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "simplejson" version))
2437 (sha256
2438 (base32
2439 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
2440 (build-system python-build-system)
2441 (home-page "http://simplejson.readthedocs.org/en/latest/")
2442 (synopsis
2443 "Json library for Python")
2444 (description
2445 "JSON (JavaScript Object Notation) is a subset of JavaScript
2446 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
2447 format.
2448
2449 Simplejson exposes an API familiar to users of the standard library marshal
2450 and pickle modules. It is the externally maintained version of the json
2451 library contained in Python 2.6, but maintains compatibility with Python 2.5
2452 and (currently) has significant performance advantages, even without using
2453 the optional C extension for speedups. Simplejson is also supported on
2454 Python 3.3+.")
2455 (license license:x11)))
2456
2457 (define-public python2-simplejson
2458 (package-with-python2 python-simplejson))
2459
2460
2461 (define-public python-pyicu
2462 (package
2463 (name "python-pyicu")
2464 (version "2.4.3")
2465 (source
2466 (origin
2467 (method url-fetch)
2468 (uri (pypi-uri "PyICU" version))
2469 (sha256
2470 (base32
2471 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
2472 (build-system python-build-system)
2473 (inputs
2474 `(("icu4c" ,icu4c)))
2475 (native-inputs
2476 `(("python-pytest" ,python-pytest)
2477 ("python-six" ,python-six)))
2478 (home-page "https://github.com/ovalhub/pyicu")
2479 (synopsis "Python extension wrapping the ICU C++ API")
2480 (description
2481 "PyICU is a python extension wrapping the ICU C++ API.")
2482 (license license:x11)))
2483
2484 (define-public python2-pyicu
2485 (package-with-python2 python-pyicu))
2486
2487 (define-public python-dogtail
2488 (package
2489 (name "python-dogtail")
2490 (version "0.9.11")
2491 (source (origin
2492 (method url-fetch)
2493 (uri
2494 (string-append
2495 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
2496 "dogtail-" version ".tar.gz"))
2497 (sha256
2498 (base32
2499 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
2500 (build-system python-build-system)
2501 (arguments
2502 `(#:tests? #f ; TODO Launching dbus for the tests
2503 ; fails
2504 #:phases
2505 (modify-phases %standard-phases
2506 (replace 'check
2507 (lambda* (#:key tests? #:allow-other-keys)
2508 (when tests?
2509 (system "Xvfb :1 &")
2510 (setenv "DISPLAY" ":1")
2511 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
2512 #t)))))
2513 (propagated-inputs
2514 `(("python-pygobject" ,python-pygobject)
2515 ("python-pycairo" ,python-pycairo)
2516 ("python-pyatspi" ,python-pyatspi)))
2517 (native-inputs
2518 `(("python-nose" ,python-nose)
2519 ("gtk+" ,gtk+)
2520 ("xvfb" ,xorg-server)
2521 ("dbus" ,dbus)
2522 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2523 ("gobject-introspection" ,gobject-introspection)))
2524 (home-page "https://gitlab.com/dogtail/dogtail/")
2525 (synopsis "GUI test tool and automation framework written in Python")
2526 (description
2527 "Dogtail is a GUI test tool and automation framework written in Python.
2528 It uses Accessibility (a11y) technologies to communicate with desktop
2529 applications. dogtail scripts are written in Python and executed like any
2530 other Python program.")
2531 (license license:gpl2+)))
2532
2533 (define-public python2-dogtail
2534 (package-with-python2 python-dogtail))
2535
2536 (define-public python-empy
2537 (package
2538 (name "python-empy")
2539 (version "3.3.3")
2540 (source (origin
2541 (method url-fetch)
2542 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2543 version ".tar.gz"))
2544 (sha256
2545 (base32
2546 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:tests? #f)) ; python2 only
2550 (home-page "http://www.alcyone.com/software/empy/")
2551 (synopsis "Templating system for Python")
2552 (description
2553 "EmPy is a system for embedding Python expressions and statements in
2554 template text; it takes an EmPy source file, processes it, and produces
2555 output. This is accomplished via expansions, which are special signals to the
2556 EmPy system and are set off by a special prefix (by default the at sign, @@).
2557 EmPy can expand arbitrary Python expressions and statements in this way, as
2558 well as a variety of special forms. Textual data not explicitly delimited in
2559 this way is sent unaffected to the output, allowing Python to be used in
2560 effect as a markup language. Also supported are callbacks via hooks,
2561 recording and playback via diversions, and dynamic, chainable filters. The
2562 system is highly configurable via command line options and embedded
2563 commands.")
2564 (license license:lgpl2.1+)))
2565
2566 (define-public python2-empy
2567 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2568 (package/inherit base
2569 (arguments `(,@(package-arguments base)
2570 #:tests? #t)))))
2571
2572 (define-public python2-element-tree
2573 (package
2574 (name "python2-element-tree")
2575 (version "1.2.6")
2576 (source (origin
2577 (method url-fetch)
2578 (uri (string-append
2579 "http://effbot.org/media/downloads/elementtree-"
2580 version "-20050316.tar.gz"))
2581 (sha256
2582 (base32
2583 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2584 (build-system python-build-system)
2585 (arguments
2586 `(#:python ,python-2 ; seems to be part of Python 3
2587 #:tests? #f)) ; no 'test' sub-command
2588 (synopsis "Toolkit for XML processing in Python")
2589 (description
2590 "ElementTree is a Python library supporting lightweight XML processing.")
2591 (home-page "https://effbot.org/zone/element-index.htm")
2592 (license (license:x11-style
2593 "http://docs.python.org/2/license.html"
2594 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2595
2596 (define-public python2-pybugz
2597 (package
2598 (name "python2-pybugz")
2599 (version "0.6.11")
2600 (source (origin
2601 (method url-fetch)
2602 (uri (string-append
2603 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2604 version ".tar.gz"))
2605 (sha256
2606 (base32
2607 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2608 (patches (search-patches "pybugz-stty.patch"
2609 "pybugz-encode-error.patch"))))
2610 (build-system python-build-system)
2611 (arguments
2612 `(#:python ,python-2 ; SyntaxError with Python 3
2613 #:tests? #f)) ; no 'test' sub-command
2614 (propagated-inputs
2615 `(("element-tree" ,python2-element-tree)))
2616 (synopsis "Python and command-line interface to Bugzilla")
2617 (description
2618 "PyBugz is a Python library and command-line tool to query the Bugzilla
2619 bug tracking system. It is meant as an aid to speed up interaction with the
2620 bug tracker.")
2621 (home-page "http://www.liquidx.net/pybugz/")
2622 (license license:gpl2)))
2623
2624 (define-public python2-enum
2625 (package
2626 (name "python2-enum")
2627 (version "0.4.6")
2628 (source (origin
2629 (method url-fetch)
2630 (uri (pypi-uri "enum" version))
2631 (sha256
2632 (base32
2633 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2634 (build-system python-build-system)
2635 (arguments
2636 `(#:python ,python-2))
2637 (home-page "https://pypi.org/project/enum/")
2638 (synopsis "Robust enumerated type support in Python")
2639 (description
2640 "This provides a module for robust enumerations in Python. It has
2641 been superseded by the Python standard library and is provided only for
2642 compatibility.")
2643 ;; Choice of either license.
2644 (license (list license:gpl3+ license:psfl))))
2645
2646 (define-public python-enum34
2647 (package
2648 (name "python-enum34")
2649 (version "1.1.6")
2650 (source
2651 (origin
2652 (method url-fetch)
2653 (uri (pypi-uri "enum34" version))
2654 (sha256
2655 (base32
2656 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2657 (build-system python-build-system)
2658 (home-page "https://pypi.org/project/enum34/")
2659 (synopsis "Backported Python 3.4 Enum")
2660 (description
2661 "Enum34 is the new Python stdlib enum module available in Python 3.4
2662 backported for previous versions of Python from 2.4 to 3.3.")
2663 (license license:bsd-3)))
2664
2665 (define-public python2-enum34
2666 (package-with-python2 python-enum34))
2667
2668 (define-public python-parse-type
2669 (package
2670 (name "python-parse-type")
2671 (version "0.4.2")
2672 (source
2673 (origin
2674 (method url-fetch)
2675 (uri (pypi-uri "parse_type" version))
2676 (sha256
2677 (base32
2678 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2679 (build-system python-build-system)
2680 (propagated-inputs
2681 `(("python-six" ,python-six)
2682 ("python-parse" ,python-parse)))
2683 (native-inputs
2684 `(("python-pytest" ,python-pytest)
2685 ("python-pytest-runner" ,python-pytest-runner)))
2686 (home-page "https://github.com/jenisys/parse_type")
2687 (synopsis "Extended parse module")
2688 (description
2689 "Parse_type extends the python parse module.")
2690 (properties
2691 `((python2-variant . ,(delay python2-parse-type))))
2692 (license license:bsd-3)))
2693
2694 (define-public python2-parse-type
2695 (let ((base (package-with-python2
2696 (strip-python2-variant python-parse-type))))
2697 (package/inherit base
2698 (propagated-inputs
2699 `(("python2-enum34" ,python2-enum34)
2700 ,@(package-propagated-inputs base))))))
2701
2702 (define-public python-parse
2703 (package
2704 (name "python-parse")
2705 (version "1.18.0")
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (pypi-uri "parse" version))
2710 (sha256
2711 (base32
2712 "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
2713 (build-system python-build-system)
2714 (arguments
2715 `(#:phases
2716 (modify-phases %standard-phases
2717 (replace 'check
2718 (lambda _ (invoke "python" "test_parse.py"))))))
2719 (home-page "https://github.com/r1chardj0n3s/parse")
2720 (synopsis "Parse strings")
2721 (description
2722 "Parse strings using a specification based on the Python @code{format()}
2723 syntax.")
2724 (license license:x11)))
2725
2726 (define-public python-polib
2727 (package
2728 (name "python-polib")
2729 (version "1.1.0")
2730 (source (origin
2731 (method url-fetch)
2732 (uri (pypi-uri "polib" version))
2733 (sha256
2734 (base32
2735 "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
2736 (build-system python-build-system)
2737 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2738 (synopsis "Manipulate, create and modify gettext files")
2739 (description "Polib can manipulate any gettext format (po, pot and mo)
2740 files. It can be used to create po files from scratch or to modify
2741 existing ones.")
2742 (license license:expat)))
2743
2744 (define-public python2-polib
2745 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2746 (package/inherit base
2747 (arguments `(,@(package-arguments base)
2748 ;; Tests don't work with python2.
2749 #:tests? #f)))))
2750
2751 (define-public python-poyo
2752 (package
2753 (name "python-poyo")
2754 (version "0.5.0")
2755 (source
2756 (origin
2757 (method url-fetch)
2758 (uri (pypi-uri "poyo" version))
2759 (sha256
2760 (base32
2761 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2762 (build-system python-build-system)
2763 (home-page "https://github.com/hackebrot/poyo")
2764 (synopsis "Lightweight YAML Parser for Python")
2765 (description
2766 "This package provides a lightweight YAML Parser for Python. It supports
2767 only a chosen subset of the YAML format that is required to parse cookiecutter
2768 user configuration files. It does not have support for serializing into YAML
2769 and is not compatible with JSON.")
2770 (license license:expat)))
2771
2772 (define-public scons
2773 (package
2774 (name "scons")
2775 (version "3.0.4")
2776 (source (origin
2777 (method git-fetch)
2778 (uri (git-reference
2779 (url "https://github.com/SCons/scons")
2780 (commit version)))
2781 (file-name (git-file-name name version))
2782 (sha256
2783 (base32
2784 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2785 (build-system python-build-system)
2786 (arguments
2787 `(#:use-setuptools? #f ; still relies on distutils
2788 #:tests? #f ; no 'python setup.py test' command
2789 #:phases
2790 (modify-phases %standard-phases
2791 (add-before 'build 'bootstrap
2792 (lambda _
2793 (substitute* "src/engine/SCons/compat/__init__.py"
2794 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2795 "sys.modules[new] = __import__(old)"))
2796 (substitute* "src/engine/SCons/Platform/__init__.py"
2797 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2798 "mod = __import__(full_name)"))
2799 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2800 (chdir "build/scons")
2801 #t)))))
2802 (home-page "https://scons.org/")
2803 (synopsis "Software construction tool written in Python")
2804 (description
2805 "SCons is a software construction tool. Think of SCons as an improved,
2806 cross-platform substitute for the classic Make utility with integrated
2807 functionality similar to autoconf/automake and compiler caches such as ccache.
2808 In short, SCons is an easier, more reliable and faster way to build
2809 software.")
2810 (license license:x11)))
2811
2812 (define-public scons-python2
2813 (package
2814 (inherit (package-with-python2 scons))
2815 (name "scons-python2")))
2816
2817 (define-public python-extension-helpers
2818 (package
2819 (name "python-extension-helpers")
2820 (version "0.1")
2821 (source
2822 (origin
2823 (method url-fetch)
2824 (uri (pypi-uri "extension-helpers" version))
2825 (sha256
2826 (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
2827 (build-system python-build-system)
2828 (native-inputs
2829 `(("coverage" ,python-coverage)
2830 ("pytest" ,python-pytest-astropy)
2831 ("pytest-cov" ,python-pytest-cov)
2832 ("setuptools-scm" ,python-setuptools-scm)))
2833 (home-page "https://github.com/astropy/astropy-helpers")
2834 (synopsis
2835 "Utilities for building and installing packages in the Astropy ecosystem")
2836 (description
2837 "The extension-helpers package includes many build, installation, and
2838 documentation-related tools used by the Astropy project.")
2839 (license license:bsd-3)))
2840
2841 (define-public python-extras
2842 (package
2843 (name "python-extras")
2844 (version "1.0.0")
2845 (source
2846 (origin
2847 (method url-fetch)
2848 (uri (pypi-uri "extras" version))
2849 (sha256
2850 (base32
2851 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2852 (build-system python-build-system)
2853 (arguments
2854 ;; FIXME: Circular dependency on testtools.
2855 '(#:tests? #f))
2856 (home-page "https://github.com/testing-cabal/extras")
2857 (synopsis "Useful extensions to the Python standard library")
2858 (description
2859 "Extras is a set of extensions to the Python standard library.")
2860 (license license:expat)))
2861
2862 (define-public python2-extras
2863 (package-with-python2 python-extras))
2864
2865 (define-public python-mimeparse
2866 (package
2867 (name "python-mimeparse")
2868 (version "1.6.0")
2869 (source
2870 (origin
2871 (method url-fetch)
2872 (uri (pypi-uri "python-mimeparse" version))
2873 (sha256
2874 (base32
2875 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2876 (build-system python-build-system)
2877 (arguments
2878 '(#:phases
2879 (modify-phases %standard-phases
2880 (replace 'check
2881 (lambda _
2882 (invoke "./mimeparse_test.py"))))))
2883 (home-page
2884 "https://github.com/dbtsai/python-mimeparse")
2885 (synopsis "Python library for parsing MIME types")
2886 (description
2887 "Mimeparse provides basic functions for parsing MIME type names and
2888 matching them against a list of media-ranges.")
2889 (license license:expat)))
2890
2891 (define-public python2-mimeparse
2892 (package-with-python2 python-mimeparse))
2893
2894 (define-public python-miniboa
2895 (package
2896 (name "python-miniboa")
2897 (version "1.0.8")
2898 (source
2899 (origin
2900 (method url-fetch)
2901 (uri (pypi-uri "miniboa" version))
2902 (sha256
2903 (base32
2904 "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
2905 (build-system python-build-system)
2906 (home-page "https://github.com/shmup/miniboa")
2907 (synopsis "Simple, single-threaded Telnet server")
2908 (description
2909 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2910 server.")
2911 (license license:asl2.0)))
2912
2913 (define-public python2-miniboa
2914 (package-with-python2 python-miniboa))
2915
2916 (define-public python-pafy
2917 (package
2918 (name "python-pafy")
2919 (version "0.5.3.1")
2920 (source
2921 (origin
2922 (method url-fetch)
2923 (uri (pypi-uri "pafy" version))
2924 (sha256
2925 (base32
2926 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2927 (build-system python-build-system)
2928 (arguments
2929 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2930 (propagated-inputs
2931 ;; Youtube-dl is a python package which is imported in the file
2932 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2933 `(("youtube-dl" ,youtube-dl)))
2934 (home-page "https://np1.github.io/pafy/")
2935 (synopsis "Retrieve YouTube content and metadata")
2936 (description
2937 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2938 (license license:lgpl3+)))
2939
2940 (define-public python2-funcsigs
2941 (package
2942 (name "python2-funcsigs")
2943 (version "1.0.2")
2944 (source (origin
2945 (method url-fetch)
2946 (uri (pypi-uri "funcsigs" version))
2947 (sha256
2948 (base32
2949 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2950 (build-system python-build-system)
2951 (arguments
2952 `(#:python ,python-2))
2953 (native-inputs
2954 `(("python2-unittest2" ,python2-unittest2)))
2955 (home-page "http://funcsigs.readthedocs.org")
2956 (synopsis "Python function signatures from PEP362")
2957 (description
2958 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2959 (license license:asl2.0)))
2960
2961 (define-public python2-funcsigs-bootstrap
2962 (package
2963 (inherit python2-funcsigs)
2964 (name "python2-funcsigs-bootstrap")
2965 (native-inputs `())
2966 (arguments
2967 `(#:tests? #f
2968 ,@(package-arguments python2-funcsigs)))))
2969
2970 (define-public python-py
2971 (package
2972 (name "python-py")
2973 (version "1.8.1")
2974 (source
2975 (origin
2976 (method url-fetch)
2977 (uri (pypi-uri "py" version))
2978 (sha256
2979 (base32
2980 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2981 (build-system python-build-system)
2982 (arguments
2983 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2984 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2985 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2986 ;; Is this module globally installed?"
2987 '(#:tests? #f))
2988 (native-inputs
2989 `(("python-setuptools-scm" ,python-setuptools-scm)))
2990 (home-page "https://github.com/pytest-dev/py")
2991 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2992 (description
2993 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2994 code introspection, and logging.")
2995 (license license:expat)))
2996
2997 (define-public python-py-next
2998 (package
2999 (inherit python-py)
3000 (version "1.9.0")
3001 (source
3002 (origin
3003 (method url-fetch)
3004 (uri (pypi-uri "py" version))
3005 (sha256
3006 (base32
3007 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
3008
3009 (define-public python2-py
3010 (package-with-python2 python-py))
3011
3012 ;; Recent versions of python-fixtures and python-testrepository need
3013 ;; python-pbr for packaging, which itself needs these two packages for
3014 ;; testing.
3015 ;; To fix this circular dependency, we use a build of python-pbr, based on the
3016 ;; same source, just without any test dependencies and with tests disabled.
3017 ;; python-pbr-minmal is then used to package python-fixtures and
3018 ;; python-testrepository.
3019 ;; Strictly speaking we currently could remove the test-requirements from the
3020 ;; normal python-pbr package (and save this package) since test are disabled
3021 ;; there anyway. But this may change in future.
3022 (define-public python-pbr-minimal
3023 (package
3024 (name "python-pbr-minimal")
3025 (version "3.0.1")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "pbr" version))
3030 (sha256
3031 (base32
3032 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
3033 (build-system python-build-system)
3034 (arguments
3035 `(#:tests? #f))
3036 (home-page "https://docs.openstack.org/pbr/latest/")
3037 (synopsis "Minimal build of python-pbr used for bootstrapping")
3038 (description
3039 "Used only for bootstrapping python2-pbr, you should not need this.")
3040 (license license:asl2.0)))
3041
3042 (define-public python-pbr
3043 (package
3044 (inherit python-pbr-minimal)
3045 (name "python-pbr")
3046 (arguments
3047 `(#:tests? #f)) ;; Most tests seem to use the Internet.
3048 (propagated-inputs
3049 `(("git" ,git))) ;; pbr actually uses the "git" binary.
3050 (native-inputs
3051 `(("python-fixtures" ,python-fixtures-bootstrap)
3052 ;; discover, coverage, hacking, subunit
3053 ("python-mock" ,python-mock)
3054 ("python-six" ,python-six)
3055 ("python-sphinx" ,python-sphinx)
3056 ("python-testrepository" ,python-testrepository-bootstrap)
3057 ("python-testresources" ,python-testresources-bootstrap)
3058 ("python-testscenarios" ,python-testscenarios-bootstrap)
3059 ("python-testtools" ,python-testtools-bootstrap)
3060 ("python-virtualenv" ,python-virtualenv)))
3061 (synopsis "Enhance the default behavior of Python’s setuptools")
3062 (description
3063 "Python Build Reasonableness (PBR) is a library that injects some useful
3064 and sensible default behaviors into your setuptools run. It will set
3065 versions, process requirements files and generate AUTHORS and ChangeLog file
3066 from git information.
3067 ")))
3068
3069 (define-public python-pyrsistent
3070 (package
3071 (name "python-pyrsistent")
3072 (version "0.16.0")
3073 (home-page "https://github.com/tobgu/pyrsistent")
3074 (source (origin
3075 (method url-fetch)
3076 (uri (pypi-uri "pyrsistent" version))
3077 (sha256
3078 (base32
3079 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
3080 (build-system python-build-system)
3081 (arguments
3082 '(#:phases (modify-phases %standard-phases
3083 ;; The package works fine with newer Pytest and Hypothesis, but
3084 ;; has pinned older versions to stay compatible with Python 2.
3085 (add-before 'check 'loosen-pytest-requirement
3086 (lambda _
3087 (substitute* "setup.py"
3088 (("pytest<5") "pytest")
3089 (("hypothesis<5") "hypothesis"))
3090 #t)))))
3091 (native-inputs
3092 `(("python-hypothesis" ,python-hypothesis)
3093 ("python-pytest" ,python-pytest)
3094 ("python-pytest-runner" ,python-pytest-runner)))
3095 (propagated-inputs
3096 `(("python-six" ,python-six)))
3097 (synopsis "Persistent data structures for Python")
3098 (description
3099 "Pyrsistent is a number of persistent collections (by some referred to as
3100 functional data structures). Persistent in the sense that they are immutable.
3101
3102 All methods on a data structure that would normally mutate it instead return a
3103 new copy of the structure containing the requested updates. The original
3104 structure is left untouched.")
3105 (license license:expat)))
3106
3107 (define-public python2-pyrsistent
3108 (package-with-python2 python-pyrsistent))
3109
3110 (define-public python-exif-read
3111 (package
3112 (name "python-exif-read")
3113 (version "2.1.2")
3114 (source (origin
3115 (method url-fetch)
3116 (uri (pypi-uri "ExifRead" version))
3117 (sha256
3118 (base32
3119 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
3120 (build-system python-build-system)
3121 (arguments `(#:tests? #f)) ; no tests
3122 (home-page "https://github.com/ianare/exif-py")
3123 (synopsis "Python library to extract EXIF data from image files")
3124 (description
3125 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
3126 files.")
3127 (license license:bsd-3)))
3128
3129 (define-public python2-exif-read
3130 (package-with-python2 python-exif-read))
3131
3132 (define-public python-pyld
3133 (package
3134 (name "python-pyld")
3135 (version "1.0.5")
3136 (source (origin
3137 (method url-fetch)
3138 (uri (pypi-uri "PyLD" version))
3139 (sha256
3140 (base32
3141 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
3142 (build-system python-build-system)
3143 (home-page "https://github.com/digitalbazaar/pyld")
3144 (synopsis "Python implementation of the JSON-LD specification")
3145 (description
3146 "PyLD is an implementation of the JSON-LD specification.")
3147 (license license:bsd-3)))
3148
3149 (define-public python2-pyld
3150 (package-with-python2 python-pyld))
3151
3152 (define-public python-cli-helpers
3153 (package
3154 (name "python-cli-helpers")
3155 (version "2.0.1")
3156 (source
3157 (origin
3158 ;; There's no source tarball on PyPI.
3159 (method git-fetch)
3160 (uri (git-reference
3161 (url "https://github.com/dbcli/cli_helpers")
3162 (commit (string-append "v" version))))
3163 (file-name (git-file-name name version))
3164 (sha256
3165 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
3166 (build-system python-build-system)
3167 (native-inputs
3168 `(("python-pytest" ,python-pytest)))
3169 (propagated-inputs
3170 `(("python-wcwidth" ,python-wcwidth)
3171 ("python-configobj" ,python-configobj)
3172 ("python-tabulate" ,python-tabulate)
3173 ("python-terminaltables" ,python-terminaltables)))
3174 (home-page "https://github.com/dbcli/cli_helpers")
3175 (synopsis "Helpers for building command-line apps")
3176 (description
3177 "CLI Helpers is a Python package that makes it easy to perform common
3178 tasks when building command-line apps. It's a helper library for command-line
3179 interfaces.")
3180 (license license:bsd-3)))
3181
3182 (define-public python-click
3183 (package
3184 (name "python-click")
3185 (version "7.1.2")
3186 (source
3187 (origin
3188 (method url-fetch)
3189 (uri (pypi-uri "click" version))
3190 (sha256
3191 (base32
3192 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
3193 (build-system python-build-system)
3194 (arguments
3195 `(#:phases
3196 (modify-phases %standard-phases
3197 (add-after 'unpack 'fix-paths
3198 (lambda* (#:key inputs #:allow-other-keys)
3199 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
3200 "cross-libc" "libc"))))
3201 (substitute* "src/click/_unicodefun.py"
3202 (("'locale'")
3203 (string-append "'" glibc "/bin/locale'"))))
3204 #t))
3205 (replace 'check
3206 (lambda _
3207 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
3208 (invoke "python" "-m" "pytest"))))))
3209 (native-inputs
3210 `(("python-pytest" ,python-pytest)))
3211 (home-page "https://palletsprojects.com/p/click/")
3212 (synopsis "Command line library for Python")
3213 (description
3214 "Click is a Python package for creating command line interfaces in a
3215 composable way with as little code as necessary. Its name stands for
3216 \"Command Line Interface Creation Kit\". It's highly configurable but comes
3217 with sensible defaults out of the box.")
3218 (license license:bsd-3)))
3219
3220 (define-public python2-click
3221 (package-with-python2 python-click))
3222
3223 (define-public python-click-5
3224 (package (inherit python-click)
3225 (name "python-click")
3226 (version "5.1")
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (pypi-uri "click" version))
3231 (sha256
3232 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
3233 (arguments `())))
3234
3235 (define-public python-vcversioner
3236 (package
3237 (name "python-vcversioner")
3238 (version "2.16.0.0")
3239 (source
3240 (origin
3241 (method url-fetch)
3242 (uri (pypi-uri "vcversioner" version))
3243 (sha256
3244 (base32
3245 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
3246 (build-system python-build-system)
3247 (synopsis "Python library for version number discovery")
3248 (description "Vcversioner is a Python library that inspects tagging
3249 information in a variety of version control systems in order to discover
3250 version numbers.")
3251 (home-page "https://github.com/habnabit/vcversioner")
3252 (license license:isc)))
3253
3254 (define-public python2-vcversioner
3255 (package-with-python2 python-vcversioner))
3256
3257 (define-public python-jdcal
3258 (package
3259 (name "python-jdcal")
3260 (version "1.4")
3261 (source
3262 (origin
3263 (method url-fetch)
3264 (uri (pypi-uri "jdcal" version))
3265 (sha256
3266 (base32
3267 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
3268 (build-system python-build-system)
3269 (arguments
3270 `(#:phases (modify-phases %standard-phases
3271 (replace 'check
3272 (lambda _
3273 (invoke "pytest"))))))
3274 (native-inputs
3275 `(("python-pytest" ,python-pytest)))
3276 (home-page "https://github.com/phn/jdcal")
3277 (synopsis "Functions to convert between Julian dates Gregorian dates")
3278 (description "This Python library provides functions for converting
3279 between Julian dates and Gregorian dates.")
3280 (license license:bsd-2)))
3281
3282 (define-public python2-jdcal
3283 (package-with-python2 python-jdcal))
3284
3285 (define-public python-jsondiff
3286 (package
3287 (name "python-jsondiff")
3288 (version "1.2.0")
3289 (source
3290 (origin
3291 (method url-fetch)
3292 (uri (pypi-uri "jsondiff" version))
3293 (sha256
3294 (base32
3295 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
3296 (build-system python-build-system)
3297 (native-inputs
3298 `(("python-nose" ,python-nose)
3299 ("python-nose-random" ,python-nose-random)))
3300 (home-page
3301 "https://github.com/fzumstein/jsondiff")
3302 (synopsis "Compare JSON and JSON-like structures in Python")
3303 (description "@code{jsondiff} is a Python library which lets you
3304 compare, diff, and patch JSON and JSON-like structures in Python.")
3305 (license license:expat)))
3306
3307 (define-public python-jsonschema
3308 (package
3309 (name "python-jsonschema")
3310 (version "3.2.0")
3311 (source (origin
3312 (method url-fetch)
3313 (uri (pypi-uri "jsonschema" version))
3314 (sha256
3315 (base32
3316 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
3317 (build-system python-build-system)
3318 (arguments
3319 '(#:phases
3320 (modify-phases %standard-phases
3321 (replace 'check
3322 (lambda* (#:key inputs outputs #:allow-other-keys)
3323 (add-installed-pythonpath inputs outputs)
3324 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
3325 (invoke "trial" "jsonschema"))))))
3326 (native-inputs
3327 `(("python-setuptools_scm" ,python-setuptools-scm)
3328 ("python-twisted" ,python-twisted)))
3329 (propagated-inputs
3330 `(("python-attrs" ,python-attrs)
3331 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
3332 ("python-pyrsistent" ,python-pyrsistent)
3333 ("python-six" ,python-six)))
3334 (home-page "https://github.com/Julian/jsonschema")
3335 (synopsis "Implementation of JSON Schema for Python")
3336 (description
3337 "Jsonschema is an implementation of JSON Schema for Python.")
3338 (license license:expat)
3339 (properties `((python2-variant . ,(delay python2-jsonschema))))))
3340
3341 (define-public python2-jsonschema
3342 (let ((jsonschema (package-with-python2
3343 (strip-python2-variant python-jsonschema))))
3344 (package/inherit jsonschema
3345 (propagated-inputs
3346 `(("python2-functools32" ,python2-functools32)
3347 ,@(package-propagated-inputs jsonschema))))))
3348
3349 (define-public python-schema
3350 (package
3351 (name "python-schema")
3352 (version "0.6.6")
3353 (source
3354 (origin
3355 (method url-fetch)
3356 (uri (pypi-uri "schema" version))
3357 (sha256
3358 (base32
3359 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
3360 (build-system python-build-system)
3361 (native-inputs
3362 `(("python-pytest" ,python-pytest)))
3363 (home-page "https://github.com/keleshev/schema")
3364 (synopsis "Simple data validation library")
3365 (description
3366 "@code{python-schema} is a library for validating Python data
3367 structures, such as those obtained from config-files, forms, external
3368 services or command-line parsing, converted from JSON/YAML (or
3369 something else) to Python data-types.")
3370 (license license:psfl)))
3371
3372 (define-public python2-schema
3373 (package-with-python2 python-schema))
3374
3375 (define-public python-schema-0.5
3376 (package (inherit python-schema)
3377 (version "0.5.0")
3378 (source
3379 (origin
3380 (method url-fetch)
3381 (uri (pypi-uri "schema" version))
3382 (sha256
3383 (base32
3384 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
3385
3386 (define-public python2-schema-0.5
3387 (package-with-python2 python-schema-0.5))
3388
3389 (define-public python-kitchen
3390 (package
3391 (name "python-kitchen")
3392 (version "1.2.5")
3393 (source
3394 (origin
3395 (method url-fetch)
3396 (uri (pypi-uri "kitchen" version))
3397 (sha256
3398 (base32
3399 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
3400 (build-system python-build-system)
3401 (propagated-inputs
3402 `(("python-chardet" ,python-chardet)))
3403 (home-page "https://github.com/fedora-infra/kitchen")
3404 (synopsis "Python API for snippets")
3405 (description "@code{kitchen} module provides a python API for all sorts of
3406 little useful snippets of code that everybody ends up writing for their projects
3407 but never seem big enough to build an independent release. Use kitchen and stop
3408 cutting and pasting that code over and over.")
3409 (license (list license:lgpl2.1+
3410 ;; subprocess.py, test_subprocess.py,
3411 ;; kitchen/pycompat25/defaultdict.py:
3412 license:psfl))))
3413
3414 (define-public python2-kitchen
3415 (package-with-python2 python-kitchen))
3416
3417 (define-public python-roman
3418 (package
3419 (name "python-roman")
3420 (version "3.3")
3421 (source
3422 (origin
3423 (method url-fetch)
3424 (uri (pypi-uri "roman" version))
3425 (sha256
3426 (base32
3427 "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
3428 (build-system python-build-system)
3429 (home-page "https://github.com/zopefoundation/roman")
3430 (synopsis "Integer to Roman numerals converter")
3431 (description
3432 "This package provides a small helper library to convert Arabic Numbers
3433 to Roman Numerals.")
3434 (license license:psfl)))
3435
3436 (define-public python-unidecode
3437 (package
3438 (name "python-unidecode")
3439 (version "1.1.1")
3440 (source (origin
3441 (method url-fetch)
3442 (uri (pypi-uri "Unidecode" version))
3443 (sha256
3444 (base32
3445 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
3446 (build-system python-build-system)
3447 (home-page "https://pypi.org/project/Unidecode/")
3448 (synopsis "ASCII transliterations of Unicode text")
3449 (description
3450 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
3451 useful when integrating with legacy code that doesn't support Unicode, or for
3452 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
3453 machine identifiers from human-readable Unicode strings that should still be
3454 somewhat intelligible.")
3455 (license license:gpl2+)))
3456
3457 (define-public python2-unidecode
3458 (package-with-python2 python-unidecode))
3459
3460 (define-public python-text-unidecode
3461 (package
3462 (name "python-text-unidecode")
3463 (version "1.3")
3464 (source (origin
3465 (method url-fetch)
3466 (uri (pypi-uri "text-unidecode" version))
3467 (sha256
3468 (base32
3469 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
3470 (build-system python-build-system)
3471 (arguments
3472 '(#:phases (modify-phases %standard-phases
3473 (replace 'check
3474 (lambda _
3475 (setenv "PYTHONPATH"
3476 (string-append "./build/lib:"
3477 (getenv "PYTHONPATH")))
3478 (invoke "pytest" "-vv"))))))
3479 (native-inputs
3480 `(("python-pytest" ,python-pytest)))
3481 (home-page "https://github.com/kmike/text-unidecode/")
3482 (synopsis "Decode Unicode data")
3483 (description
3484 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
3485 Perl library. It can create ASCII representations of Unicode data. In general
3486 users should prefer the @code{python-unidecode} package which offers better
3487 memory usage and transliteration quality.")
3488 ;; The user can choose either license.
3489 (license (list license:clarified-artistic license:gpl2+))))
3490
3491 (define-public python2-text-unidecode
3492 (package-with-python2 python-text-unidecode))
3493
3494 (define-public python-pyjwt
3495 (package
3496 (name "python-pyjwt")
3497 (version "1.7.1")
3498 (source
3499 (origin
3500 (method url-fetch)
3501 (uri (pypi-uri "PyJWT" version))
3502 (sha256
3503 (base32
3504 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
3505 (modules '((guix build utils)))
3506 (snippet
3507 '(begin
3508 (for-each delete-file-recursively
3509 (find-files "." "\\.pyc$"))
3510 #t))))
3511 (build-system python-build-system)
3512 (arguments
3513 '(#:phases (modify-phases %standard-phases
3514 (replace 'check
3515 (lambda _
3516 ;; Mimic upstream commit 3a20892442b34c7 to get
3517 ;; rid of dependency on pytest-runner < 5.0.
3518 ;; Remove substitution for PyJWT > 1.7.1.
3519 (substitute* "setup.py"
3520 ((".*pytest-runner.*")
3521 ""))
3522 (invoke "pytest" "-vv"))))))
3523 (native-inputs
3524 `(("python-pytest" ,python-pytest)
3525 ("python-pytest-cov" ,python-pytest-cov)))
3526 (home-page "https://github.com/progrium/pyjwt")
3527 (synopsis "JSON Web Token implementation in Python")
3528 (description
3529 "PyJWT is a JSON Web Token implementation written in Python.")
3530 (license license:expat)))
3531
3532 (define-public python2-pyjwt
3533 (package-with-python2 python-pyjwt))
3534
3535 (define-public python-pymsgbox
3536 (package
3537 (name "python-pymsgbox")
3538 (version "1.0.6")
3539 (source
3540 (origin
3541 (method git-fetch)
3542 (uri (git-reference
3543 ;; LICENSE.txt is not present on pypi
3544 (url "https://github.com/asweigart/PyMsgBox")
3545 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3546 (file-name (git-file-name name version))
3547 (sha256
3548 (base32
3549 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3550 (arguments
3551 ;; Circular dependency to run tests:
3552 ;; Tests need pyautogui, which depends on pymsgbox.
3553 '(#:tests? #f))
3554 (build-system python-build-system)
3555 (home-page "https://github.com/asweigart/PyMsgBox")
3556 (synopsis "Python module for JavaScript-like message boxes")
3557 (description
3558 "PyMsgBox is a simple, cross-platform, pure Python module for
3559 JavaScript-like message boxes. Types of dialog boxes include:
3560 @enumerate
3561 @item alert
3562 @item confirm
3563 @item prompt
3564 @item password
3565 @end enumerate
3566 ")
3567 (license license:bsd-3)))
3568
3569 (define-public python-pympler
3570 (package
3571 (name "python-pympler")
3572 (home-page "https://pythonhosted.org/Pympler/")
3573 (version "0.8")
3574 (source (origin
3575 (method url-fetch)
3576 (uri (pypi-uri "Pympler" version))
3577 (sha256
3578 (base32
3579 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3580 (build-system python-build-system)
3581 (arguments
3582 `(#:phases (modify-phases %standard-phases
3583 (delete 'check)
3584 (add-after 'install 'check
3585 (lambda* (#:key inputs outputs #:allow-other-keys)
3586 (add-installed-pythonpath inputs outputs)
3587 (invoke "python" "setup.py" "test"))))))
3588 (synopsis "Measure, monitor and analyze memory behavior")
3589 (description
3590 "Pympler is a development tool to measure, monitor and analyze
3591 the memory behavior of Python objects in a running Python application.
3592
3593 By pympling a Python application, detailed insight in the size and the
3594 lifetime of Python objects can be obtained. Undesirable or unexpected
3595 runtime behavior like memory bloat and other @samp{pymples} can easily
3596 be identified.
3597
3598 A web profiling frontend exposes process statistics, garbage
3599 visualisation and class tracker statistics.")
3600 (license license:asl2.0)))
3601
3602 (define-public python2-pympler
3603 (package-with-python2 python-pympler))
3604
3605 (define-public python-itsdangerous
3606 (package
3607 (name "python-itsdangerous")
3608 (version "1.1.0")
3609 (source
3610 (origin
3611 (method url-fetch)
3612 (uri (pypi-uri "itsdangerous" version))
3613 (sha256
3614 (base32
3615 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3616 (build-system python-build-system)
3617 (home-page "https://palletsprojects.com/p/itsdangerous/")
3618 (synopsis "Python library for passing data to/from untrusted environments")
3619 (description
3620 "Itsdangerous provides various helpers to pass trusted data to untrusted
3621 environments and back.")
3622 (license license:bsd-3)))
3623
3624 (define-public python2-itsdangerous
3625 (package-with-python2 python-itsdangerous))
3626
3627 (define-public python-pyyaml
3628 (package
3629 (name "python-pyyaml")
3630 (version "5.4.1")
3631 (source
3632 (origin
3633 (method url-fetch)
3634 (uri (pypi-uri "PyYAML" version))
3635 (sha256
3636 (base32
3637 "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
3638 (build-system python-build-system)
3639 (inputs
3640 `(("libyaml" ,libyaml)))
3641 (home-page "https://pyyaml.org")
3642 (synopsis "YAML parser and emitter for Python")
3643 (description
3644 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3645 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3646 API, and sensible error messages. PyYAML supports standard YAML tags and
3647 provides Python-specific tags that represent an arbitrary Python object.")
3648 (license license:expat)))
3649
3650 (define-public python2-pyyaml
3651 (package-with-python2 python-pyyaml))
3652
3653 (define-public python-vine
3654 (package
3655 (name "python-vine")
3656 (version "1.1.4")
3657 (source
3658 (origin
3659 (method url-fetch)
3660 (uri (pypi-uri "vine" version))
3661 (sha256
3662 (base32
3663 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3664 (build-system python-build-system)
3665 (native-inputs
3666 `(("python-pytest" ,python-pytest)
3667 ("python-case" ,python-case)))
3668 (home-page "https://github.com/celery/vine")
3669 (synopsis "Promises for Python")
3670 (description
3671 "@code{vine} provides a special implementation of promises in that it can
3672 be used both for \"promise of a value\" and lazy evaluation. The biggest
3673 upside for this is that everything in a promise can also be a promise,
3674 e.g. filters, callbacks and errbacks can all be promises.")
3675 (license license:bsd-3)))
3676
3677 (define-public python-virtualenv
3678 (package
3679 (name "python-virtualenv")
3680 (version "20.2.1")
3681 (source
3682 (origin
3683 (method url-fetch)
3684 (uri (pypi-uri "virtualenv" version))
3685 (sha256
3686 (base32
3687 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
3688 (build-system python-build-system)
3689 (native-inputs
3690 `(("python-mock" ,python-mock)
3691 ("python-pytest" ,python-pytest)
3692 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3693 ;; be an input at all". However, removing the input makes the build error:
3694 ;; File "setup.py", line 4, in <module>
3695 ;; raise RuntimeError("setuptools >= 41 required to build")
3696 ("python-setuptools" ,python-setuptools)
3697 ("python-setuptools-scm" ,python-setuptools-scm)))
3698 (propagated-inputs
3699 `(("python-appdirs" ,python-appdirs)
3700 ("python-distlib" ,python-distlib/next)
3701 ("python-filelock" ,python-filelock)
3702 ("python-six" ,python-six)
3703 ("python-importlib-metadata" ,python-importlib-metadata)))
3704 (home-page "https://virtualenv.pypa.io/")
3705 (synopsis "Virtual Python environment builder")
3706 (description
3707 "Virtualenv is a tool to create isolated Python environments.")
3708 (license license:expat)))
3709
3710 (define-public python-markupsafe
3711 (package
3712 (name "python-markupsafe")
3713 (version "1.1.1")
3714 (source
3715 (origin
3716 (method url-fetch)
3717 (uri (pypi-uri "MarkupSafe" version))
3718 (sha256
3719 (base32
3720 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3721 (build-system python-build-system)
3722 (arguments
3723 `(#:modules ((ice-9 ftw)
3724 (srfi srfi-1)
3725 (srfi srfi-26)
3726 (guix build utils)
3727 (guix build python-build-system))
3728 #:phases (modify-phases %standard-phases
3729 (replace 'check
3730 (lambda _
3731 (let ((cwd (getcwd))
3732 (libdir (find (cut string-prefix? "lib." <>)
3733 (scandir "build"))))
3734 (setenv "PYTHONPATH"
3735 (string-append cwd "/build/" libdir ":"
3736 (getenv "PYTHONPATH")))
3737 (invoke "pytest" "-vv")))))))
3738 (native-inputs
3739 `(("python-pytest" ,python-pytest)))
3740 (home-page "https://github.com/mitsuhiko/markupsafe")
3741 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3742 (description
3743 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3744 for Python.")
3745 (license license:bsd-3)))
3746
3747 (define-public python2-markupsafe
3748 (package-with-python2 python-markupsafe))
3749
3750 (define-public python-jinja2
3751 (package
3752 (name "python-jinja2")
3753 (version "2.11.2")
3754 (source
3755 (origin
3756 (method url-fetch)
3757 (uri (pypi-uri "Jinja2" version))
3758 (sha256
3759 (base32
3760 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3761 (build-system python-build-system)
3762 (arguments
3763 '(#:phases (modify-phases %standard-phases
3764 (replace 'check
3765 (lambda* (#:key tests? #:allow-other-keys)
3766 (if tests?
3767 (begin
3768 (setenv "PYTHONPATH"
3769 (string-append "./build/lib:"
3770 (getenv "PYTHONPATH")))
3771 (invoke "pytest" "-vv"))
3772 (format #t "test suite not run~%"))
3773 #t)))))
3774 (native-inputs
3775 `(("python-pytest" ,python-pytest)))
3776 (propagated-inputs
3777 `(("python-markupsafe" ,python-markupsafe)))
3778 (home-page "http://jinja.pocoo.org/")
3779 (synopsis "Python template engine")
3780 (description
3781 "Jinja2 is a small but fast and easy to use stand-alone template engine
3782 written in pure Python.")
3783 (license license:bsd-3)))
3784
3785 (define-public python2-jinja2
3786 (package-with-python2 python-jinja2))
3787
3788 (define-public python-jinja2-time
3789 (package
3790 (name "python-jinja2-time")
3791 (version "0.2.0")
3792 (source
3793 (origin
3794 (method url-fetch)
3795 (uri (pypi-uri "jinja2-time" version))
3796 (sha256
3797 (base32
3798 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3799 (build-system python-build-system)
3800 (propagated-inputs
3801 `(("python-arrow" ,python-arrow)
3802 ("python-jinja2" ,python-jinja2)))
3803 (home-page
3804 "https://github.com/hackebrot/jinja2-time")
3805 (synopsis "Jinja2 Extension for Dates and Times")
3806 (description
3807 "This package provides an extension for the template engine Jinja2. It
3808 adds a 'now' tag providing a convenient access to the arrow.now() API from
3809 templates. A format string can be provided to control the output.")
3810 (license license:expat)))
3811
3812 (define-public python-pystache
3813 (package
3814 (name "python-pystache")
3815 (version "0.5.4")
3816 (source (origin
3817 (method url-fetch)
3818 (uri (pypi-uri "pystache" version))
3819 (sha256
3820 (base32
3821 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3822 (build-system python-build-system)
3823 (arguments
3824 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3825 (home-page "http://defunkt.io/pystache/")
3826 (synopsis "Python logic-less template engine")
3827 (description
3828 "Pystache is a Python implementation of the framework agnostic,
3829 logic-free templating system Mustache.")
3830 (license license:expat)
3831 (properties `((python2-variant . ,(delay python2-pystache))))))
3832
3833 (define-public python2-pystache
3834 (let ((base (package-with-python2
3835 (strip-python2-variant python-pystache))))
3836 (package/inherit base
3837 (arguments
3838 `(#:python ,python-2
3839 #:phases
3840 (modify-phases %standard-phases
3841 (replace 'check
3842 (lambda _
3843 (invoke "python" "test_pystache.py")))))))))
3844
3845 (define-public python-joblib
3846 (package
3847 (name "python-joblib")
3848 (version "0.14.1")
3849 (source (origin
3850 (method url-fetch)
3851 (uri (pypi-uri "joblib" version))
3852 (sha256
3853 (base32
3854 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3855 (build-system python-build-system)
3856 (arguments
3857 `(#:phases
3858 (modify-phases %standard-phases
3859 (replace 'check
3860 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3861 (native-inputs
3862 `(("python-pytest" ,python-pytest)))
3863 (home-page "https://joblib.readthedocs.io/")
3864 (synopsis "Using Python functions as pipeline jobs")
3865 (description
3866 "Joblib is a set of tools to provide lightweight pipelining in Python.
3867 In particular, joblib offers: transparent disk-caching of the output values
3868 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3869 logging and tracing of the execution.")
3870 (license license:bsd-3)))
3871
3872 (define-public python2-joblib
3873 (package-with-python2 python-joblib))
3874
3875 (define-public python-daemon
3876 (package
3877 (name "python-daemon")
3878 (version "2.2.3")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "python-daemon" version))
3883 (sha256
3884 (base32
3885 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3886 (build-system python-build-system)
3887 (arguments
3888 `(#:phases
3889 (modify-phases %standard-phases
3890 (add-before 'check 'disable-tests
3891 (lambda _
3892 ;; FIXME: Determine why test fails
3893 (substitute* "test/test_daemon.py"
3894 (("test_detaches_process_context")
3895 "skip_test_detaches_process_context"))
3896 #t)))))
3897 (propagated-inputs
3898 `(("python-lockfile" ,python-lockfile)))
3899 (native-inputs
3900 `(("python-unittest2" ,python-unittest2)
3901 ("python-testtools" ,python-testtools)
3902 ("python-testscenarios" ,python-testscenarios)
3903 ("python-mock" ,python-mock)
3904 ("python-docutils" ,python-docutils)))
3905 (home-page "https://pagure.io/python-daemon/")
3906 (synopsis "Python library for making a Unix daemon process")
3907 (description "Python-daemon is a library that assists a Python program to
3908 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3909
3910 This library provides a @code{DaemonContext} class that manages the following
3911 important tasks for becoming a daemon process:
3912 @enumerate
3913 @item Detach the process into its own process group.
3914 @item Set process environment appropriate for running inside a chroot.
3915 @item Renounce suid and sgid privileges.
3916 @item Close all open file descriptors.
3917 @item Change the working directory, uid, gid, and umask.
3918 @item Set appropriate signal handlers.
3919 @item Open new file descriptors for stdin, stdout, and stderr.
3920 @item Manage a specified PID lock file.
3921 @item Register cleanup functions for at-exit processing.
3922 @end enumerate")
3923 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3924 (license (list license:asl2.0 license:gpl3+))))
3925
3926 (define-public python-anytree
3927 (package
3928 (name "python-anytree")
3929 (version "2.8.0")
3930 (source (origin
3931 (method url-fetch)
3932 (uri (pypi-uri "anytree" version))
3933 (sha256
3934 (base32
3935 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3936 (build-system python-build-system)
3937 (propagated-inputs
3938 `(("python-six" ,python-six)))
3939 (native-inputs
3940 `(;; For tests.
3941 ("graphviz" ,graphviz) ;for 'dot'
3942 ("python-nose" ,python-nose)))
3943 (home-page "https://github.com/c0fec0de/anytree")
3944 (synopsis "Lightweight tree data library")
3945 (description
3946 "@code{anytree} is a simple, lightweight, and extensible tree data
3947 structure for Python.")
3948 (license license:asl2.0)))
3949
3950 (define-public python-docutils
3951 (package
3952 (name "python-docutils")
3953 (version "0.16")
3954 (source
3955 (origin
3956 (method url-fetch)
3957 (uri (pypi-uri "docutils" version))
3958 (sha256
3959 (base32
3960 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3961 (build-system python-build-system)
3962 (arguments
3963 '(#:phases (modify-phases %standard-phases
3964 (replace 'check
3965 (lambda* (#:key tests? #:allow-other-keys)
3966 (if tests?
3967 (invoke "python" "test/alltests.py")
3968 (format #t "test suite not run~%"))
3969 #t)))))
3970 (home-page "http://docutils.sourceforge.net/")
3971 (synopsis "Python Documentation Utilities")
3972 (description
3973 "Docutils is a modular system for processing documentation into useful
3974 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3975 easy to use markup language, for input.
3976
3977 This package provides tools for converting @file{.rst} files to other formats
3978 via commands such as @command{rst2man}, as well as supporting Python code.")
3979 ;; Most of the source code is public domain, but some source files are
3980 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3981 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3982
3983 (define-public python2-docutils
3984 (package-with-python2 python-docutils))
3985
3986 ;; python2-sphinx fails its test suite with newer versions.
3987 (define-public python2-docutils-0.14
3988 (package
3989 (inherit python2-docutils)
3990 (version "0.14")
3991 (source (origin
3992 (method url-fetch)
3993 (uri (pypi-uri "docutils" version))
3994 (sha256
3995 (base32
3996 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3997
3998 (define-public python-restructuredtext-lint
3999 (package
4000 (name "python-restructuredtext-lint")
4001 (version "1.3.0")
4002 (source
4003 (origin
4004 (method url-fetch)
4005 (uri (pypi-uri "restructuredtext-lint" version))
4006 (sha256
4007 (base32
4008 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
4009 (build-system python-build-system)
4010 (arguments
4011 `(#:phases
4012 (modify-phases %standard-phases
4013 (delete 'check)
4014 (add-after 'install 'check
4015 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4016 (when tests?
4017 (add-installed-pythonpath inputs outputs)
4018 (invoke "nosetests" "-v"))
4019 #t)))))
4020 (propagated-inputs
4021 `(("python-docutils" ,python-docutils)))
4022 (native-inputs
4023 `(("python-nose" ,python-nose)))
4024 (home-page "https://github.com/twolfson/restructuredtext-lint")
4025 (synopsis "reStructuredText linter")
4026 (description "This package provides a linter for the reStructuredText
4027 format.")
4028 (license license:unlicense)))
4029
4030 (define-public python-doc8
4031 (package
4032 (name "python-doc8")
4033 (version "0.8.0")
4034 (source
4035 (origin
4036 (method url-fetch)
4037 (uri (pypi-uri "doc8" version))
4038 (sha256
4039 (base32
4040 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
4041 (build-system python-build-system)
4042 (arguments
4043 `(#:phases
4044 (modify-phases %standard-phases
4045 (delete 'check)
4046 (add-after 'install 'check
4047 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4048 (when tests?
4049 (add-installed-pythonpath inputs outputs)
4050 (invoke "pytest" "-v"))
4051 #t)))))
4052 (propagated-inputs
4053 `(("python-chardet" ,python-chardet)
4054 ("python-docutils" ,python-docutils)
4055 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
4056 ("python-six" ,python-six)
4057 ("python-stevedore" ,python-stevedore)))
4058 (native-inputs
4059 `(("python-testtools" ,python-testtools)
4060 ("python-pytest" ,python-pytest)))
4061 (home-page "https://launchpad.net/doc8")
4062 (synopsis
4063 "Style checker for Sphinx (or other) RST documentation")
4064 (description
4065 "Doc8 is an opinionated style checker for reStructured Text and plain
4066 text styles of documentation.")
4067 (license license:asl2.0)))
4068
4069 (define-public python-pygments
4070 (package
4071 (name "python-pygments")
4072 (version "2.7.3")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "Pygments" version))
4077 (sha256
4078 (base32
4079 "05mps9r966r3dpqw6zrs1nlwjdf5y4960hl9m7abwb3qyfnarwyc"))))
4080 (replacement python-pygments/fixed)
4081 (build-system python-build-system)
4082 (arguments
4083 ;; FIXME: Tests require sphinx, which depends on this.
4084 '(#:tests? #f))
4085 (home-page "https://pygments.org/")
4086 (synopsis "Syntax highlighting")
4087 (description
4088 "Pygments is a syntax highlighting package written in Python.")
4089 (license license:bsd-2)
4090 (properties `((python2-variant . ,(delay python2-pygments))))))
4091
4092 (define python-pygments/fixed
4093 (package
4094 (inherit python-pygments)
4095 (version "2.7.4")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "Pygments" version))
4100 (sha256
4101 (base32
4102 "0dy35ry5qa8dpklk4fkj9kfpw2qb4mh5ha9866kw30wf96dx0jfz"))))))
4103
4104 ;; Pygments 2.6 and later does not support Python 2.
4105 (define-public python2-pygments
4106 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
4107 (package
4108 (inherit base)
4109 (version "2.5.2")
4110 (source (origin
4111 (method url-fetch)
4112 (uri (pypi-uri "Pygments" version))
4113 (sha256
4114 (base32
4115 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
4116
4117 (define-public python-pygments-github-lexers
4118 (package
4119 (name "python-pygments-github-lexers")
4120 (version "0.0.5")
4121 (source
4122 (origin
4123 (method url-fetch)
4124 (uri (pypi-uri "pygments-github-lexers" version))
4125 (sha256
4126 (base32
4127 "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
4128 (build-system python-build-system)
4129 (propagated-inputs
4130 `(("python-pygments" ,python-pygments)))
4131 (home-page "https://github.com/liluo/pygments-github-lexers")
4132 (synopsis "Pygments Github custom lexers")
4133 (description "This package installs Github custom lexers to Pygments.")
4134 (license license:bsd-3)))
4135
4136 (define-public python-bump2version
4137 (package
4138 (name "python-bump2version")
4139 (version "1.0.1")
4140 (source
4141 (origin
4142 (method url-fetch)
4143 (uri (pypi-uri "bump2version" version))
4144 (sha256
4145 (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
4146 (build-system python-build-system)
4147 (arguments
4148 ;; XXX: Tests fail with "bumpversion: error: the following arguments are
4149 ;; required: --new-version".
4150 `(#:tests? #false))
4151 (home-page "https://github.com/c4urself/bump2version")
4152 (synopsis "Version-bump your software with a single command!")
4153 (description
4154 "This package provides a small command line tool to simplify releasing
4155 software by updating all version strings in your source code by the correct
4156 increment. It also creates commits and tags.")
4157 (license license:expat)))
4158
4159 (define-public python-bumpversion
4160 (package
4161 (name "python-bumpversion")
4162 (version "0.5.3")
4163 (source
4164 (origin
4165 (method url-fetch)
4166 (uri (pypi-uri "bumpversion" version))
4167 (sha256
4168 (base32
4169 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
4170 (build-system python-build-system)
4171 (home-page "https://github.com/peritus/bumpversion")
4172 (synopsis "Tool to bump software version")
4173 (description "This tool provides a command-line interface (CLI) to bump a
4174 software version simply.")
4175 (license license:expat)))
4176
4177 (define-public python-deprecated
4178 (package
4179 (name "python-deprecated")
4180 (version "1.2.5")
4181 (source
4182 (origin
4183 (method git-fetch)
4184 (uri (git-reference
4185 (url "https://github.com/tantale/deprecated")
4186 (commit (string-append "v" version))))
4187 (file-name (git-file-name name version))
4188 (sha256
4189 (base32
4190 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
4191 (build-system python-build-system)
4192 (arguments
4193 `(#:phases (modify-phases %standard-phases
4194 (replace 'check
4195 (lambda _
4196 (invoke "pytest"))))))
4197 (propagated-inputs
4198 `(("python-wrapt" ,python-wrapt)))
4199 (native-inputs
4200 `(("python-bumpversion" ,python-bumpversion)
4201 ("python-pytest" ,python-pytest)
4202 ("python-pytest-cov" ,python-pytest-cov)
4203 ("python-sphinx" ,python-sphinx)
4204 ("python-tox" ,python-tox)))
4205 (home-page "https://github.com/tantale/deprecated")
4206 (synopsis "Python decorator to deprecate classes, functions or methods")
4207 (description "The @code{deprecated} decorator provides a convenient way to deprecate
4208 to deprecate classes, functions or methods.")
4209 (license license:expat)))
4210
4211 (define-public python-pygithub
4212 (package
4213 (name "python-pygithub")
4214 (version "1.54.1")
4215 (source
4216 ;; We fetch from the Git repo because there are no tests in the PyPI
4217 ;; archive.
4218 (origin
4219 (method git-fetch)
4220 (uri (git-reference
4221 (url "https://github.com/PyGithub/PyGithub")
4222 (commit (string-append "v" version))))
4223 (file-name (git-file-name name version))
4224 (sha256
4225 (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
4226 (build-system python-build-system)
4227 (arguments
4228 `(#:phases
4229 (modify-phases %standard-phases
4230 (replace 'check
4231 (lambda* (#:key tests? #:allow-other-keys)
4232 (when tests?
4233 (invoke "pytest"))
4234 #t)))))
4235 (propagated-inputs
4236 `(("python-cryptography" ,python-cryptography)
4237 ("python-deprecated" ,python-deprecated)
4238 ("python-pyjwt" ,python-pyjwt)
4239 ("python-requests" ,python-requests)))
4240 (native-inputs
4241 `(("python-httpretty" ,python-httpretty)
4242 ("python-pytest" ,python-pytest)))
4243 (home-page "https://pygithub.readthedocs.io/en/latest/")
4244 (synopsis "Python library for the GitHub API")
4245 (description "This library allows managing GitHub resources such as
4246 repositories, user profiles, and organizations in your Python applications,
4247 using version 3 of the GitHub application programming interface (API).")
4248 (license license:lgpl3+)))
4249
4250 (define-public python-rellu
4251 (package
4252 (name "python-rellu")
4253 (version "0.7")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (pypi-uri "rellu" version))
4258 (sha256
4259 (base32
4260 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
4261 (build-system python-build-system)
4262 (propagated-inputs
4263 `(("python-invoke" ,python-invoke)
4264 ("python-pygithub" ,python-pygithub)))
4265 (home-page "https://github.com/robotframework/rellu")
4266 (synopsis "Utilities to create PyPI releases")
4267 (description "This collection of utilities contains tooling and templates
4268 to assist in creating releases on GitHub and publishing them on PyPI. It is
4269 designed to be used by Robot Framework and tools and libraries in its
4270 ecosystem, but can naturally be used also by other projects.")
4271 (license license:asl2.0)))
4272
4273 (define-public python-robotframework
4274 (package
4275 (name "python-robotframework")
4276 (version "3.2.2")
4277 ;; There are no tests in the PyPI archive.
4278 (source
4279 (origin
4280 (method git-fetch)
4281 (uri (git-reference
4282 (url "https://github.com/robotframework/robotframework")
4283 (commit (string-append "v" version))))
4284 (file-name (git-file-name name version))
4285 (sha256
4286 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
4287 (patches (search-patches
4288 "python-robotframework-source-date-epoch.patch"))))
4289 (build-system python-build-system)
4290 (arguments
4291 `(#:phases (modify-phases %standard-phases
4292 (add-before 'build 'build-and-install-doc
4293 (lambda* (#:key outputs #:allow-other-keys)
4294 (let* ((doc-output (assoc-ref outputs "doc"))
4295 (doc (string-append doc-output "/share/"
4296 ,name "-" ,version "/")))
4297 (invoke "invoke" "library-docs" "all")
4298 (mkdir-p doc)
4299 (copy-recursively "doc/libraries"
4300 (string-append doc "/libraries"))
4301 #t)))
4302 (replace 'check
4303 (lambda* (#:key inputs #:allow-other-keys)
4304 ;; Some tests require timezone data. Otherwise, they
4305 ;; look up /etc/localtime, which doesn't exist, and fail
4306 ;; with:
4307 ;;
4308 ;; OverflowError: mktime argument out of range
4309 (setenv "TZDIR"
4310 (string-append (assoc-ref inputs "tzdata")
4311 "/share/zoneinfo"))
4312 (setenv "TZ" "Europe/Paris")
4313
4314 (invoke "python" "utest/run.py"))))))
4315 (native-inputs
4316 `(("python-invoke" ,python-invoke)
4317 ("python-rellu" ,python-rellu)
4318 ("python:tk" ,python "tk") ;used when building the HTML doc
4319 ("tzdata" ,tzdata-for-tests)))
4320 (outputs '("out" "doc"))
4321 (home-page "https://robotframework.org")
4322 (synopsis "Generic automation framework")
4323 (description "Robot Framework is a generic automation framework for
4324 acceptance testing, acceptance test driven development (ATDD), and robotic
4325 process automation (RPA).")
4326 (license license:asl2.0)))
4327
4328 (define-public python-robotframework-lint
4329 ;; There is no properly tagged release; the commit below seems to correspond
4330 ;; to the 0.9 stable release available from PyPI. The tests are not
4331 ;; included in the PyPI archive, so we fetch the sources from the upstream
4332 ;; Git repo.
4333 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
4334 (revision "0"))
4335 (package
4336 (name "python-robotframework-lint")
4337 (version (git-version "1.1" ;version taken from 'rflint/version.py'
4338 revision commit))
4339 (source
4340 (origin
4341 (method git-fetch)
4342 (uri (git-reference
4343 (url "https://github.com/boakley/robotframework-lint")
4344 (commit commit)))
4345 (file-name (git-file-name name version))
4346 (sha256
4347 (base32
4348 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
4349 (build-system python-build-system)
4350 (arguments
4351 `(#:phases
4352 (modify-phases %standard-phases
4353 (replace 'check
4354 (lambda _
4355 (invoke "python" "-m" "robot" "-A"
4356 "tests/conf/default.args" "tests"))))))
4357 (propagated-inputs
4358 `(("python-robotframework" ,python-robotframework)))
4359 (home-page "https://github.com/boakley/robotframework-lint/")
4360 (synopsis "Static analysis tool (linter) for Robot Framework")
4361 (description "This package provides the @code{rflint} command-line
4362 utility, a static analysis tool (linter) for Robot Framework source files.")
4363 (license license:asl2.0))))
4364
4365 (define-public python-robotframework-sshlibrary
4366 (package
4367 (name "python-robotframework-sshlibrary")
4368 (version "3.3.0")
4369 ;; There are no tests in the PyPI archive.
4370 (source
4371 (origin
4372 (method git-fetch)
4373 (uri (git-reference
4374 (url "https://github.com/robotframework/SSHLibrary")
4375 (commit (string-append "v" version))))
4376 (file-name (git-file-name name version))
4377 (sha256
4378 (base32
4379 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
4380 (build-system python-build-system)
4381 (arguments
4382 `(#:phases
4383 (modify-phases %standard-phases
4384 (add-before 'build 'build-and-install-doc
4385 (lambda* (#:key outputs #:allow-other-keys)
4386 (let* ((doc-output (assoc-ref outputs "doc"))
4387 (doc (string-append doc-output "/share/"
4388 ,name "-" ,version "/")))
4389 (invoke "chmod" "-R" "+w" "docs")
4390 (invoke "invoke" "kw-docs" "project-docs")
4391 (mkdir-p doc)
4392 (for-each delete-file (find-files "docs" "\\.rst"))
4393 (copy-recursively "docs" doc)
4394 #t)))
4395 (replace 'check
4396 (lambda _
4397 ;; Some tests require an SSH server; we remove them.
4398 (delete-file "utest/test_client_api.py")
4399 (delete-file "utest/test_scp.py")
4400 (invoke "python" "utest/run.py"))))))
4401 (propagated-inputs
4402 `(("python-robotframework" ,python-robotframework)
4403 ("python-paramiko" ,python-paramiko)
4404 ("python-scp" ,python-scp)))
4405 (native-inputs
4406 `(("openssh" ,openssh)
4407 ("which" ,which)
4408 ;; To generate the documentation
4409 ("python-docutils" ,python-docutils)
4410 ("python-invoke" ,python-invoke)
4411 ("python-pygments" ,python-pygments)
4412 ("python-rellu" ,python-rellu)))
4413 (outputs '("out" "doc"))
4414 (home-page "https://github.com/robotframework/SSHLibrary")
4415 (synopsis "Robot Framework library for SSH and SFTP")
4416 (description "SSHLibrary is a Robot Framework library providing support
4417 for SSH and SFTP. It has the following main usages:
4418 @itemize @bullet
4419 @item Executing commands on the remote machine, either blocking or non-blocking.
4420 @item Writing and reading in an interactive shell.
4421 @item Transferring files and directories over SFTP.
4422 @item Ensuring that files and directories exist on the remote machine.
4423 @end itemize")
4424 (license license:asl2.0)))
4425
4426 (define-public python-rstr
4427 (package
4428 (name "python-rstr")
4429 (version "2.2.6")
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (pypi-uri "rstr" version))
4434 (sha256
4435 (base32
4436 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
4437 (build-system python-build-system)
4438 (home-page "https://github.com/leapfrogonline/rstr")
4439 (synopsis "Generate random strings in Python")
4440 (description "This package provides a python module for generating
4441 random strings of various types. It could be useful for fuzz testing,
4442 generating dummy data, or other applications. It has no dependencies
4443 outside the standard library.")
4444 (license license:bsd-3)))
4445
4446 (define-public python-scp
4447 (package
4448 (name "python-scp")
4449 (version "0.13.3")
4450 (source
4451 (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "scp" version))
4454 (sha256
4455 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
4456 (build-system python-build-system)
4457 (arguments
4458 '(#:tests? #f)) ;tests require an SSH server
4459 (propagated-inputs
4460 `(("python-paramiko" ,python-paramiko)))
4461 (home-page "https://github.com/jbardin/scp.py")
4462 (synopsis "SCP protocol module for Python and Paramiko")
4463 (description "The scp module extends the Paramiko library to send and
4464 receive files via the SCP1 protocol, as implemented by the OpenSSH
4465 @command{scp} program.")
4466 (license license:gpl2+)))
4467
4468 (define-public python-rst.linker
4469 (package
4470 (name "python-rst.linker")
4471 (version "1.11")
4472 (source
4473 (origin
4474 (method url-fetch)
4475 (uri (pypi-uri "rst.linker" version))
4476 (sha256
4477 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
4478 (build-system python-build-system)
4479 (propagated-inputs
4480 `(("python-dateutil" ,python-dateutil)
4481 ("python-six" ,python-six)))
4482 (native-inputs
4483 `(("python-setuptools-scm" ,python-setuptools-scm)))
4484 ;; Test would require path.py, which would introduce a cyclic dependence.
4485 (arguments `(#:tests? #f))
4486 ;; Note: As of version 1.7 the documentation is not worth building.
4487 (home-page "https://github.com/jaraco/rst.linker")
4488 (synopsis "Sphinx plugin to add links and timestamps")
4489 (description "rst.linker automatically replaces text by a
4490 reStructuredText external reference or timestamps. It's primary purpose is to
4491 augment the changelog, but it can be used for other documents, too.")
4492 (license license:expat)))
4493
4494 (define-public python2-rst.linker
4495 (package-with-python2 python-rst.linker))
4496
4497 (define-public python-sshpubkeys
4498 (package
4499 (name "python-sshpubkeys")
4500 (version "3.1.0")
4501 (home-page "https://github.com/ojarva/python-sshpubkeys")
4502 (source (origin
4503 (method git-fetch)
4504 (uri (git-reference
4505 (url home-page)
4506 (commit (string-append "v" version))))
4507 (file-name (git-file-name name version))
4508 (sha256
4509 (base32
4510 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4511 (build-system python-build-system)
4512 (propagated-inputs
4513 `(("python-cryptography" ,python-cryptography)
4514 ("python-ecdsa" ,python-ecdsa)))
4515 (synopsis "OpenSSH public key parser")
4516 (description
4517 "This package provides a library for parsing and validating OpenSSH
4518 public key files.")
4519 (license license:bsd-3)))
4520
4521 (define-public python-feedgenerator
4522 (package
4523 (name "python-feedgenerator")
4524 (version "1.9")
4525 (source
4526 (origin
4527 (method url-fetch)
4528 (uri (pypi-uri "feedgenerator" version))
4529 (sha256
4530 (base32
4531 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4532 (modules '((guix build utils)))
4533 (snippet
4534 '(begin
4535 ;; Remove pre-compiled .pyc files from source.
4536 (for-each delete-file-recursively
4537 (find-files "." "__pycache__" #:directories? #t))
4538 (for-each delete-file (find-files "." "\\.pyc$"))
4539 #t))))
4540 (build-system python-build-system)
4541 (propagated-inputs
4542 `(("python-pytz" ,python-pytz)
4543 ("python-six" ,python-six)))
4544 (home-page "https://github.com/getpelican/feedgenerator")
4545 (synopsis
4546 "Standalone version of Django's Atom/RSS feed generator")
4547 (description
4548 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4549 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4550 (license license:bsd-3)))
4551
4552 (define-public python2-feedgenerator
4553 (package-with-python2 python-feedgenerator))
4554
4555 (define-public python-jsonrpc-server
4556 (package
4557 (name "python-jsonrpc-server")
4558 (version "0.4.0")
4559 (source
4560 (origin
4561 (method url-fetch)
4562 (uri (pypi-uri "python-jsonrpc-server" version))
4563 (sha256
4564 (base32
4565 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4566 (build-system python-build-system)
4567 (propagated-inputs
4568 `(("python-mock" ,python-mock)
4569 ("python-pytest" ,python-pytest)
4570 ("python-ujson" ,python-ujson)))
4571 (home-page
4572 "https://github.com/palantir/python-jsonrpc-server")
4573 (synopsis "JSON RPC 2.0 server library")
4574 (description
4575 "This package provides a JSON RPC 2.0 server library for Python.")
4576 (license license:expat)))
4577
4578 (define-public python-pydantic
4579 (package
4580 (name "python-pydantic")
4581 (version "1.8.2")
4582 (source
4583 (origin
4584 (method git-fetch)
4585 (uri (git-reference
4586 (url "https://github.com/samuelcolvin/pydantic")
4587 (commit (string-append "v" version))))
4588 (file-name (git-file-name name version))
4589 (sha256
4590 (base32 "06162dss6mvi7wiy2lzxwvzajwxgy8b2fyym7qipaj7zibcqalq2"))))
4591 (build-system python-build-system)
4592 (arguments
4593 '(#:phases
4594 (modify-phases %standard-phases
4595 (add-before 'check 'disable-test
4596 (lambda _
4597 ;; Reported upstream:
4598 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4599 ;; Disable the faulty test as the fix is unclear.
4600 (substitute* "tests/test_validators.py"
4601 (("test_assert_raises_validation_error")
4602 "_test_assert_raises_validation_error"))
4603
4604 ;; These fail because of <https://bugs.python.org/issue40398>.
4605 ;; Remove after Python has been upgraded to >= 3.9.
4606 (substitute* "tests/test_generics.py"
4607 (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
4608 ""))
4609 (substitute* "tests/test_schema.py"
4610 (("test_unenforced_constraints_schema")
4611 "_test_unenforced_constraints_schema"))
4612
4613 ;; Disable tests for the Hypothesis plugin because it is tricky
4614 ;; to configure in the build container.
4615 (delete-file "tests/test_hypothesis_plugin.py")))
4616 (replace 'check
4617 (lambda _ (invoke "pytest" "-vv"))))))
4618 (native-inputs
4619 `(("python-pytest" ,python-pytest)
4620 ("python-pytest-mock" ,python-pytest-mock)))
4621 (propagated-inputs
4622 `(("python-typing-extensions" ,python-typing-extensions)))
4623 (home-page "https://github.com/samuelcolvin/pydantic")
4624 (synopsis "Python data validation and settings management")
4625 (description
4626 "Pydantic enforces type hints at runtime, and provides user friendly
4627 errors when data is invalid.")
4628 (license license:expat)))
4629
4630 (define-public python-pydocstyle
4631 (package
4632 (name "python-pydocstyle")
4633 (version "3.0.0")
4634 (source
4635 (origin
4636 (method url-fetch)
4637 (uri (pypi-uri "pydocstyle" version))
4638 (sha256
4639 (base32
4640 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4641 (build-system python-build-system)
4642 (propagated-inputs
4643 `(("python-six" ,python-six)
4644 ("python-snowballstemmer" ,python-snowballstemmer)))
4645 (home-page
4646 "https://github.com/PyCQA/pydocstyle/")
4647 (synopsis "Python docstring style checker")
4648 (description
4649 "This package provides a style checker for the Python Language
4650 Server (PLS).")
4651 (license license:expat)))
4652
4653 (define-public python-language-server
4654 (package
4655 (name "python-language-server")
4656 (version "0.36.2")
4657 (source
4658 (origin
4659 (method url-fetch)
4660 (uri (pypi-uri "python-language-server" version))
4661 (sha256
4662 (base32
4663 "1c0pnk2aibfhfaanrs0a5gkabkvz81gj20z7r0152b7fcx5ci14r"))))
4664 (build-system python-build-system)
4665 (arguments
4666 `(#:phases
4667 (modify-phases %standard-phases
4668 (add-after 'unpack 'relax-deps
4669 (lambda _
4670 (substitute* "setup.py" (("pycodestyle>=2.6.0,<2.7.0")
4671 "pycodestyle"))
4672 (substitute* "setup.py" (("pyflakes>=2.2.0,<2.3.0") "pyflakes"))
4673 #t))
4674 (add-before 'check 'set-HOME
4675 (lambda _ (setenv "HOME" "/tmp") #t))
4676 (replace 'check
4677 (lambda _
4678 ;; Disable failing test.
4679 (invoke "python" "-m" "pytest" "-k"
4680 "not test_pyqt_completion"))))))
4681 (propagated-inputs
4682 `(("python-autopep8" ,python-autopep8)
4683 ("python-configparser" ,python-configparser)
4684 ("python-pydocstyle" ,python-pydocstyle)
4685 ("python-flake8" ,python-flake8)
4686 ("python-future" ,python-future)
4687 ("python-jedi" ,python-jedi)
4688 ("python-jsonrpc-server" ,python-jsonrpc-server)
4689 ("python-pluggy" ,python-pluggy)
4690 ("python-pycodestyle" ,python-pycodestyle)
4691 ("python-pyflakes" ,python-pyflakes)
4692 ("python-rope" ,python-rope)
4693 ("python-ujson" ,python-ujson)
4694 ("python-yapf" ,python-yapf)))
4695 (native-inputs
4696 `(("python-coverage" ,python-coverage)
4697 ("python-flaky" ,python-flaky)
4698 ("python-matplotlib" ,python-matplotlib)
4699 ("python-mock" ,python-mock)
4700 ("python-numpy" ,python-numpy)
4701 ("python-pandas" ,python-pandas)
4702 ("python-pylint" ,python-pylint)
4703 ("python-pytest" ,python-pytest)
4704 ("python-pytest-cov" ,python-pytest-cov)
4705 ("python-versioneer" ,python-versioneer)))
4706 (home-page "https://github.com/palantir/python-language-server")
4707 (synopsis "Python implementation of the Language Server Protocol")
4708 (description
4709 "The Python Language Server (pyls) is an implementation of the Python 3
4710 language specification for the Language Server Protocol (LSP). This tool is
4711 used in text editing environments to provide a complete and integrated
4712 feature-set for programming Python effectively.")
4713 (license license:expat)))
4714
4715 (define-public python-pathspec
4716 (package
4717 (name "python-pathspec")
4718 (version "0.7.0")
4719 (source
4720 (origin
4721 (method url-fetch)
4722 (uri (pypi-uri "pathspec" version))
4723 (sha256
4724 (base32
4725 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4726 (build-system python-build-system)
4727 (home-page "https://github.com/cpburnz/python-path-specification")
4728 (synopsis "Utility library for gitignore style pattern matching of file paths")
4729 (description
4730 "This package provides a utility library for gitignore style pattern
4731 matching of file paths.")
4732 (license license:mpl2.0)))
4733
4734 (define-public python-black
4735 (package
4736 (name "python-black")
4737 (version "20.8b1")
4738 (source
4739 (origin
4740 (method url-fetch)
4741 (uri (pypi-uri "black" version))
4742 (sha256
4743 (base32
4744 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4745 (build-system python-build-system)
4746 (arguments
4747 `(#:phases
4748 (modify-phases %standard-phases
4749 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4750 (lambda _
4751 (let ((python3 (which "python3")))
4752 (substitute* '("tests/data/fmtonoff.py"
4753 "tests/data/string_prefixes.py"
4754 "tests/data/function.py"
4755 "tests/data/python37.py")
4756 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4757 (string-append "#!" python3 (if (string? minor-version)
4758 minor-version
4759 "")))))
4760 #t))
4761 (add-after 'unpack 'disable-broken-tests
4762 (lambda* (#:key outputs inputs #:allow-other-keys)
4763 ;; Make installed package available for running the tests
4764 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4765 ":" (getenv "PATH")))
4766
4767 ;; These tests are supposed to be skipped when the blackd
4768 ;; dependencies are missing, but this doesn't quite work.
4769 (substitute* "tests/test_black.py"
4770 (("( *)class BlackDTestCase.*" match indent)
4771 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4772 indent "class BlackDTestCase(unittest.TestCase):\n"))
4773 (("web.Application") "False")
4774 (("@unittest_run_loop") ""))
4775
4776 ;; Patching the above file breaks the self test
4777 (substitute* "tests/test_black.py"
4778 (("( *)def test_self" match indent)
4779 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4780
4781 (substitute* "tests/test_black.py"
4782 (("( *)def test_python38" match indent)
4783 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4784 #t)))))
4785 (propagated-inputs
4786 `(("python-click" ,python-click)
4787 ("python-attrs" ,python-attrs)
4788 ("python-appdirs" ,python-appdirs)
4789 ("python-pathspec" ,python-pathspec)
4790 ("python-mypy-extensions" ,python-mypy-extensions)
4791 ("python-regex" ,python-regex)
4792 ("python-toml" ,python-toml)
4793 ("python-typed-ast" ,python-typed-ast)
4794 ("python-typing-extensions" ,python-typing-extensions)))
4795 (native-inputs
4796 `(("python-setuptools-scm" ,python-setuptools-scm)))
4797 (home-page "https://github.com/ambv/black")
4798 (synopsis "The uncompromising code formatter")
4799 (description "Black is the uncompromising Python code formatter.")
4800 (license license:expat)))
4801
4802 (define-public python-black-macchiato
4803 (package
4804 (name "python-black-macchiato")
4805 (version "1.3.0")
4806 (source
4807 (origin
4808 (method url-fetch)
4809 (uri (pypi-uri "black-macchiato" version))
4810 (sha256
4811 (base32
4812 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4813 (build-system python-build-system)
4814 (propagated-inputs
4815 `(("python-black" ,python-black)))
4816 (home-page "https://github.com/wbolster/black-macchiato")
4817 (synopsis "Partial @code{python-black} formatting")
4818 (description
4819 "This package is built on top the @{python-black} code formatter to
4820 enable formatting of partial files.")
4821 (license license:bsd-3)))
4822
4823 (define-public python-blinker
4824 (package
4825 (name "python-blinker")
4826 (version "1.4")
4827 (source
4828 (origin
4829 (method url-fetch)
4830 (uri (pypi-uri "blinker" version))
4831 (sha256
4832 (base32
4833 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4834 (build-system python-build-system)
4835 (home-page "https://pythonhosted.org/blinker/")
4836 (synopsis "Fast, simple object-to-object and broadcast signaling")
4837 (description
4838 "Blinker provides a fast dispatching system that allows any number of
4839 interested parties to subscribe to events, or \"signals\".")
4840 (license license:expat)))
4841
4842 (define-public python2-blinker
4843 (package-with-python2 python-blinker))
4844
4845 (define-public pelican
4846 (package
4847 (name "pelican")
4848 (version "4.2.0")
4849 (source
4850 (origin
4851 (method url-fetch)
4852 (uri (pypi-uri "pelican" version))
4853 (sha256
4854 (base32
4855 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4856 (build-system python-build-system)
4857 (propagated-inputs
4858 `(("python-blinker" ,python-blinker)
4859 ("python-dateutil" ,python-dateutil)
4860 ("python-docutils" ,python-docutils)
4861 ("python-feedgenerator" ,python-feedgenerator)
4862 ("python-jinja2" ,python-jinja2)
4863 ("python-markdown" ,python-markdown)
4864 ("python-pygments" ,python-pygments)
4865 ("python-pytz" ,python-pytz)
4866 ("python-six" ,python-six)
4867 ("python-unidecode" ,python-unidecode)))
4868 (home-page "https://getpelican.com/")
4869 (arguments
4870 `(;; XXX Requires a lot more packages to do unit tests :P
4871 #:tests? #f))
4872 (synopsis "Python-based static site publishing system")
4873 (description
4874 "Pelican is a tool to generate a static blog from reStructuredText,
4875 Markdown input files, and more. Pelican uses Jinja2 for templating
4876 and is very extensible.")
4877 (license license:agpl3+)))
4878
4879 (define-public mallard-ducktype
4880 (package
4881 (name "mallard-ducktype")
4882 (version "1.0.2")
4883 (source
4884 (origin
4885 (method git-fetch)
4886 ;; git-reference because tests are not included in pypi source tarball
4887 ;; https://issues.guix.gnu.org/issue/36755#2
4888 (uri (git-reference
4889 (url "https://github.com/projectmallard/mallard-ducktype")
4890 (commit version)))
4891 (file-name (git-file-name name version))
4892 (sha256
4893 (base32
4894 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4895 (build-system python-build-system)
4896 (arguments
4897 '(#:phases
4898 (modify-phases %standard-phases
4899 (replace 'check
4900 (lambda _
4901 (with-directory-excursion "tests"
4902 (invoke "sh" "runtests")))))))
4903 (home-page "http://projectmallard.org")
4904 (synopsis "Convert Ducktype to Mallard documentation markup")
4905 (description
4906 "Ducktype is a lightweight syntax that can represent all the semantics
4907 of the Mallard XML documentation system. Ducktype files can be converted to
4908 Mallard using the @command{ducktype} tool. The yelp-tools package
4909 provides additional functionality on the produced Mallard documents.")
4910 (license license:expat)))
4911
4912 (define-public python-cython
4913 (package
4914 (name "python-cython")
4915 (version "0.29.22")
4916 (source
4917 (origin
4918 (method url-fetch)
4919 (uri (pypi-uri "Cython" version))
4920 (sha256
4921 (base32 "01jl3544qwsi8lp6anbl55566xqkjd53x452i7m6gnfilv3q6syz"))))
4922 (build-system python-build-system)
4923 ;; we need the full python package and not just the python-wrapper
4924 ;; because we need libpython3.3m.so
4925 (inputs
4926 `(("python" ,python)))
4927 (arguments
4928 `(#:phases
4929 (modify-phases %standard-phases
4930 (add-before 'check 'set-HOME
4931 ;; some tests require access to "$HOME/.cython"
4932 (lambda _ (setenv "HOME" "/tmp") #t))
4933 (replace 'check
4934 (lambda _
4935 ;; Disable compiler optimizations to greatly reduce the running
4936 ;; time of the test suite.
4937 (setenv "CFLAGS" "-O0")
4938
4939 (invoke "python" "runtests.py" "-vv"
4940 "-j" (number->string (parallel-job-count))
4941 ;; XXX: On 32-bit architectures, running the parallel tests
4942 ;; fails on many-core systems, see
4943 ;; <https://github.com/cython/cython/issues/2807>.
4944 ,@(if (not (target-64bit?))
4945 '("-x" "run.parallel")
4946 '())))))))
4947 (home-page "https://cython.org/")
4948 (synopsis "C extensions for Python")
4949 (description "Cython is an optimising static compiler for both the Python
4950 programming language and the extended Cython programming language. It makes
4951 writing C extensions for Python as easy as Python itself.")
4952 (license license:asl2.0)
4953 (properties `((python2-variant . ,(delay python2-cython))))))
4954
4955 (define-public python2-cython
4956 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4957 (package/inherit base
4958 (name "python2-cython")
4959 (inputs
4960 `(("python-2" ,python-2))) ;this is not automatically changed
4961 (arguments
4962 (substitute-keyword-arguments (package-arguments base)
4963 ((#:phases phases)
4964 `(modify-phases ,phases
4965 (add-before 'check 'adjust-test_embed
4966 (lambda _
4967 (substitute* "runtests.py"
4968 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4969 ;; so it can give the right -L flag to GCC when embedding static
4970 ;; builds of Python. It is unaware that the Python "config"
4971 ;; directory (where the static library lives) was renamed in
4972 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4973 ;; which works fine, because that is where the shared library is.
4974 ;;
4975 ;; It also appears to be unaware that the Makefile in Demos/embed
4976 ;; already unconditionally pass the static library location to GCC,
4977 ;; after checking sysconfig.get_config_var('LIBPL).
4978 ;;
4979 ;; The effect is that the linker is unable to resolve libexpat
4980 ;; symbols when building for Python 2, because neither the Python 2
4981 ;; shared library nor Expat is available. To fix it, we can either
4982 ;; add Expat as an input and make it visible to the linker, or just
4983 ;; prevent it from overriding the Python shared library location.
4984 ;; The end result is identical, so we take the easy route.
4985 ((" or libname not in os\\.listdir\\(libdir\\)")
4986 ""))
4987 #t)))))))))
4988
4989 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4990 ;; python-scipy still build, as these three packages are often used together.
4991 (define-public python-numpy
4992 (package
4993 (name "python-numpy")
4994 (version "1.17.3")
4995 (source
4996 (origin
4997 (method url-fetch)
4998 (uri (string-append
4999 "https://github.com/numpy/numpy/releases/download/v"
5000 version "/numpy-" version ".tar.gz"))
5001 (sha256
5002 (base32
5003 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
5004 (build-system python-build-system)
5005 (inputs
5006 `(("openblas" ,openblas)))
5007 (native-inputs
5008 `(("python-cython" ,python-cython)
5009 ("python-pytest" ,python-pytest)
5010 ("gfortran" ,gfortran)))
5011 (arguments
5012 `(#:phases
5013 (modify-phases %standard-phases
5014 (add-before 'build 'configure-blas-lapack
5015 (lambda* (#:key inputs #:allow-other-keys)
5016 (call-with-output-file "site.cfg"
5017 (lambda (port)
5018 (format port
5019 "[openblas]
5020 libraries = openblas
5021 library_dirs = ~a/lib
5022 include_dirs = ~a/include
5023
5024 # backslash-n to make emacs happy
5025 \n[lapack]
5026 lapack_libs = lapack
5027 library_dirs = ~a/lib
5028 include_dirs = ~a/include
5029 "
5030 (assoc-ref inputs "openblas")
5031 (assoc-ref inputs "openblas")
5032 (assoc-ref inputs "lapack")
5033 (assoc-ref inputs "lapack"))))
5034 #t))
5035 (add-before 'build 'fix-executable-paths
5036 (lambda* (#:key inputs #:allow-other-keys)
5037 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
5038 ;; instead of /bin/sh.
5039 (substitute* "numpy/distutils/exec_command.py"
5040 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
5041 (string-append match-start (assoc-ref inputs "bash") match-end)))
5042 ;; Use "gcc" executable, not "cc".
5043 (substitute* "numpy/distutils/system_info.py"
5044 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
5045 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
5046 #t))
5047 ;; Tests can only be run after the library has been installed and not
5048 ;; within the source directory.
5049 (delete 'check)
5050 (add-after 'install 'check
5051 (lambda* (#:key outputs inputs #:allow-other-keys)
5052 ;; Make installed package available for running the tests
5053 (add-installed-pythonpath inputs outputs)
5054 ;; Make sure "f2py" etc is found.
5055 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
5056 ":" (getenv "PATH")))
5057 (with-directory-excursion "/tmp"
5058 (invoke "python" "-c"
5059 "import numpy; numpy.test(verbose=2)")))))))
5060 (home-page "https://numpy.org")
5061 (synopsis "Fundamental package for scientific computing with Python")
5062 (description "NumPy is the fundamental package for scientific computing
5063 with Python. It contains among other things: a powerful N-dimensional array
5064 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5065 and Fortran code, useful linear algebra, Fourier transform, and random number
5066 capabilities.")
5067 (properties `((python2-variant . ,(delay python2-numpy))))
5068 (license license:bsd-3)))
5069
5070 ;; Numpy 1.16.x are the last versions that support Python 2.
5071 (define-public python2-numpy
5072 (let ((numpy (package-with-python2
5073 (strip-python2-variant python-numpy))))
5074 (package
5075 (inherit numpy)
5076 (version "1.16.5")
5077 (source (origin
5078 (method url-fetch)
5079 (uri (string-append
5080 "https://github.com/numpy/numpy/releases/download/v"
5081 version "/numpy-" version ".tar.gz"))
5082 (sha256
5083 (base32
5084 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
5085
5086 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
5087 ;; interest only for legacy code going back to NumPy's predecessor
5088 ;; Numeric.
5089 (define-public python2-numpy-1.8
5090 (package (inherit python2-numpy)
5091 (version "1.8.2")
5092 (source
5093 (origin
5094 (method git-fetch)
5095 (uri (git-reference
5096 (url "https://github.com/numpy/numpy")
5097 (commit (string-append "v" version))))
5098 (file-name (git-file-name "numpy" version))
5099 (sha256
5100 (base32
5101 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
5102 (arguments
5103 (substitute-keyword-arguments (package-arguments python2-numpy)
5104 ((#:phases phases)
5105 `(modify-phases ,phases
5106 (replace 'configure-blas-lapack
5107 (lambda* (#:key inputs #:allow-other-keys)
5108 (call-with-output-file "site.cfg"
5109 (lambda (port)
5110 (format port
5111 "[openblas]
5112 libraries = openblas,lapack
5113 library_dirs = ~a/lib:~a/lib
5114 include_dirs = ~a/include:~a/include
5115 "
5116 (assoc-ref inputs "openblas")
5117 (assoc-ref inputs "lapack")
5118 (assoc-ref inputs "openblas")
5119 (assoc-ref inputs "lapack"))))
5120 #t))))))
5121 (native-inputs
5122 `(("python2-nose" ,python2-nose)))
5123 (description "NumPy is the fundamental package for scientific computing
5124 with Python. It contains among other things: a powerful N-dimensional array
5125 object, sophisticated (broadcasting) functions, tools for integrating C/C++
5126 and Fortran code, useful linear algebra, Fourier transform, and random number
5127 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
5128 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
5129 Numeric.")
5130 (license license:bsd-3)))
5131
5132 (define-public python-munch
5133 (package
5134 (name "python-munch")
5135 (version "2.0.4")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (pypi-uri "munch" version))
5140 (sha256
5141 (base32
5142 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
5143 (build-system python-build-system)
5144 (home-page "https://github.com/Infinidat/munch")
5145 (synopsis "Dot-accessible dictionary")
5146 (description "Munch is a dot-accessible dictionary similar to JavaScript
5147 objects.")
5148 (license license:expat)))
5149
5150 (define-public python2-munch
5151 (package-with-python2 python-munch))
5152
5153 (define-public python-colormath
5154 (package
5155 (name "python-colormath")
5156 (version "3.0.0")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (pypi-uri "colormath" version))
5161 (sha256
5162 (base32
5163 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
5164 (build-system python-build-system)
5165 (propagated-inputs
5166 `(("python-networkx" ,python-networkx)
5167 ("python-numpy" ,python-numpy)))
5168 (home-page "https://github.com/gtaylor/python-colormath")
5169 (synopsis "Color math and conversion library")
5170 (description
5171 "This is a Python library for color math and conversions.")
5172 (license license:bsd-3)))
5173
5174 (define-public python2-colormath
5175 (package-with-python2 python-colormath))
5176
5177 (define-public python-sparse
5178 (package
5179 (name "python-sparse")
5180 (version "0.12.0")
5181 (source
5182 (origin
5183 (method url-fetch)
5184 (uri (pypi-uri "sparse" version))
5185 (sha256
5186 (base32
5187 "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
5188 (build-system python-build-system)
5189 (arguments
5190 `(#:phases
5191 (modify-phases %standard-phases
5192 (replace 'check
5193 (lambda* (#:key tests? #:allow-other-keys)
5194 (when tests?
5195 (invoke "python" "-m" "pytest" "-v")))))))
5196 (propagated-inputs
5197 `(("python-numba" ,python-numba)
5198 ("python-numpy" ,python-numpy)
5199 ("python-scipy" ,python-scipy)))
5200 (native-inputs
5201 `(("python-dask" ,python-dask)
5202 ("python-pytest" ,python-pytest)
5203 ("python-pytest-black" ,python-pytest-black)
5204 ("python-pytest-cov" ,python-pytest-cov)))
5205 (home-page "https://github.com/pydata/sparse/")
5206 (synopsis "Library for multi-dimensional sparse arrays")
5207 (description
5208 "This package implements sparse arrays of arbitrary dimension on top of
5209 @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
5210 of the elements are zero. @code{python-sparse} generalizes the
5211 @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
5212 extends beyond just rows and columns to an arbitrary number of dimensions.
5213 Additionally, this project maintains compatibility with the
5214 @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
5215 used in @code{scipy.sparse}. These differences make this project useful in
5216 certain situations where @code{scipy.sparse} matrices are not well suited, but
5217 it should not be considered a full replacement. It lacks layouts that are not
5218 easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
5219 depends on @code{scipy.sparse} for some computations.")
5220 (license license:bsd-3)))
5221
5222 (define-public python-spectra
5223 (package
5224 (name "python-spectra")
5225 (version "0.0.11")
5226 (source
5227 (origin
5228 (method url-fetch)
5229 (uri (pypi-uri "spectra" version))
5230 (sha256
5231 (base32
5232 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
5233 (build-system python-build-system)
5234 (arguments
5235 `(#:phases
5236 (modify-phases %standard-phases
5237 (replace 'check
5238 (lambda _ (invoke "nosetests" "-v"))))))
5239 (propagated-inputs
5240 `(("python-colormath" ,python-colormath)))
5241 (native-inputs
5242 `(("python-nose" ,python-nose)))
5243 (home-page "https://github.com/jsvine/spectra")
5244 (synopsis "Color scales and color conversion")
5245 (description
5246 "This package provides a Python library intended to make color math,
5247 color scales, and color space conversion easy. It has support for:
5248
5249 @enumerate
5250 @item Color scales
5251 @item Color ranges
5252 @item Color blending
5253 @item Brightening/darkening colors
5254 @item Saturating/desaturating colors
5255 @item Conversion to/from multiple color spaces.
5256 @end enumerate\n")
5257 (license license:expat)))
5258
5259 (define-public python2-spectra
5260 (package-with-python2 python-spectra))
5261
5262 (define-public python-numpy-documentation
5263 (package
5264 (name "python-numpy-documentation")
5265 (version (package-version python-numpy))
5266 (source (package-source python-numpy))
5267 (build-system python-build-system)
5268 (native-inputs
5269 `(("python-matplotlib" ,python-matplotlib)
5270 ("python-numpy" ,python-numpy)
5271 ("pkg-config" ,pkg-config)
5272 ("python-sphinx" ,python-sphinx)
5273 ("python-numpydoc" ,python-numpydoc)
5274 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
5275 texlive-fonts-ec
5276 texlive-generic-ifxetex
5277 texlive-generic-pdftex
5278 texlive-amsfonts/patched
5279 texlive-latex-capt-of
5280 texlive-latex-cmap
5281 texlive-latex-environ
5282 texlive-latex-eqparbox
5283 texlive-latex-etoolbox
5284 texlive-latex-expdlist
5285 texlive-latex-fancyhdr
5286 texlive-latex-fancyvrb
5287 texlive-latex-fncychap
5288 texlive-latex-float
5289 texlive-latex-framed
5290 texlive-latex-geometry
5291 texlive-latex-graphics
5292 texlive-latex-hyperref
5293 texlive-latex-mdwtools
5294 texlive-latex-multirow
5295 texlive-latex-needspace
5296 texlive-latex-oberdiek
5297 texlive-latex-parskip
5298 texlive-latex-preview
5299 texlive-latex-tabulary
5300 texlive-latex-threeparttable
5301 texlive-latex-titlesec
5302 texlive-latex-trimspaces
5303 texlive-latex-ucs
5304 texlive-latex-upquote
5305 texlive-latex-url
5306 texlive-latex-varwidth
5307 texlive-latex-wrapfig)))
5308 ("texinfo" ,texinfo)
5309 ("perl" ,perl)
5310 ("scipy-sphinx-theme"
5311 ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
5312 (origin ;the build script expects scipy-sphinx-theme as a git submodule
5313 (method git-fetch)
5314 (uri (git-reference
5315 (url "https://github.com/scipy/scipy-sphinx-theme")
5316 (commit commit)))
5317 (file-name (git-file-name "python-scipy-sphinx-theme"
5318 (string-take commit 7)))
5319 (sha256
5320 (base32
5321 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
5322 ,@(package-native-inputs python-numpy)))
5323 (arguments
5324 `(#:tests? #f ; we're only generating the documentation
5325 #:phases
5326 (modify-phases %standard-phases
5327 (delete 'build)
5328 (replace 'install
5329 (lambda* (#:key inputs outputs #:allow-other-keys)
5330 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5331 (doc (string-append
5332 data "/doc/" ,name "-"
5333 ,(package-version python-numpy)))
5334 (info-reader (string-append data "/info"))
5335 (html (string-append doc "/html"))
5336 (scipy-sphinx-theme "scipy-sphinx-theme")
5337 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
5338 (pyver ,(string-append "PYVER=")))
5339
5340 ;; FIXME: this is needed to for texlive-union to generate
5341 ;; fonts, which are not found.
5342 (setenv "HOME" "/tmp")
5343
5344 (with-directory-excursion "doc"
5345 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
5346 (mkdir-p html)
5347 (invoke "make" "html" pyver)
5348 (invoke "make" "latex" "PAPER=a4" pyver)
5349 (invoke "make" "-C" "build/latex"
5350 "all-pdf" "PAPER=a4" pyver)
5351 ;; FIXME: Generation of the info file fails.
5352 ;; (invoke "make" "info" pyver)
5353 ;; (mkdir-p info)
5354 ;; (copy-file "build/texinfo/numpy.info"
5355 ;; (string-append info "/numpy.info"))
5356 (for-each (lambda (file)
5357 (copy-file (string-append "build/latex" file)
5358 (string-append doc file)))
5359 '("/numpy-ref.pdf" "/numpy-user.pdf"))
5360 (with-directory-excursion "build/html"
5361 (for-each (lambda (file)
5362 (let* ((dir (dirname file))
5363 (tgt-dir (string-append html "/" dir)))
5364 (unless (equal? "." dir)
5365 (mkdir-p tgt-dir))
5366 (install-file file html)))
5367 (find-files "." ".*")))))
5368 #t)))))
5369 (home-page (package-home-page python-numpy))
5370 (synopsis "Documentation for the python-numpy package")
5371 (description (package-description python-numpy))
5372 (license (package-license python-numpy))))
5373
5374 (define-public python-pygit2
5375 (package
5376 (name "python-pygit2")
5377 (version "1.6.0")
5378 (source
5379 (origin
5380 (method url-fetch)
5381 (uri (pypi-uri "pygit2" version))
5382 (sha256
5383 (base32 "0qjd5aqpmla64da4pb47vdnrmnqdbn7248a4fzs7f5q1ax7fmb3s"))))
5384 (build-system python-build-system)
5385 (arguments
5386 '(#:tests? #f)) ; tests don't run correctly in our environment
5387 (propagated-inputs
5388 `(("python-cached-property" ,python-cached-property)
5389 ("python-cffi" ,python-cffi)
5390 ("libgit2" ,libgit2)))
5391 (native-inputs
5392 `(("python-pytest" ,python-pytest)))
5393 (home-page "https://github.com/libgit2/pygit2")
5394 (synopsis "Python bindings for libgit2")
5395 (description "Pygit2 is a set of Python bindings to the libgit2 shared
5396 library, libgit2 implements Git plumbing.")
5397 ;; GPL2.0 only, with linking exception.
5398 (license license:gpl2)))
5399
5400 (define-public python-patiencediff
5401 (package
5402 (name "python-patiencediff")
5403 (version "0.2.0")
5404 (source
5405 (origin
5406 (method url-fetch)
5407 (uri (pypi-uri "patiencediff" version))
5408 (sha256
5409 (base32
5410 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
5411 (build-system python-build-system)
5412 (home-page "https://www.breezy-vcs.org/")
5413 (synopsis "Python implementation of the patiencediff algorithm")
5414 (description
5415 "This package contains a Python implementation of the @code{patiencediff}
5416 algorithm. Patiencediff provides a good balance of performance, nice output for
5417 humans, and implementation simplicity.")
5418 (license license:gpl2)))
5419
5420 (define-public python-pdftotext
5421 (package
5422 (name "python-pdftotext")
5423 (version "2.1.6")
5424 (source
5425 (origin
5426 (method url-fetch)
5427 (uri (pypi-uri "pdftotext" version))
5428 (sha256
5429 (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
5430 (build-system python-build-system)
5431 (inputs
5432 `(("poppler" ,poppler)))
5433 (home-page "https://github.com/jalan/pdftotext")
5434 (synopsis "Simple PDF text extraction")
5435 (description "Pdftotext is a Python library of PDF text extraction.")
5436 (license license:expat)))
5437
5438 (define-public python-pyparsing
5439 (package
5440 (name "python-pyparsing")
5441 (version "2.4.6")
5442 (source
5443 (origin
5444 (method url-fetch)
5445 (uri (pypi-uri "pyparsing" version))
5446 (sha256
5447 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
5448 (build-system python-build-system)
5449 (outputs '("out" "doc"))
5450 (arguments
5451 `(#:tests? #f ; no test target
5452 #:phases
5453 (modify-phases %standard-phases
5454 (add-after 'install 'install-doc
5455 (lambda* (#:key outputs #:allow-other-keys)
5456 (let* ((doc (string-append (assoc-ref outputs "doc")
5457 "/share/doc/" ,name "-" ,version))
5458 (html-doc (string-append doc "/html"))
5459 (examples (string-append doc "/examples")))
5460 (mkdir-p html-doc)
5461 (mkdir-p examples)
5462 (for-each
5463 (lambda (dir tgt)
5464 (map (lambda (file)
5465 (install-file file tgt))
5466 (find-files dir ".*")))
5467 (list "docs" "htmldoc" "examples")
5468 (list doc html-doc examples))
5469 #t))))))
5470 (home-page "https://github.com/pyparsing/pyparsing")
5471 (synopsis "Python parsing class library")
5472 (description
5473 "The pyparsing module is an alternative approach to creating and
5474 executing simple grammars, vs. the traditional lex/yacc approach, or the use
5475 of regular expressions. The pyparsing module provides a library of classes
5476 that client code uses to construct the grammar directly in Python code.")
5477 (license license:expat)))
5478
5479 (define-public python2-pyparsing
5480 (package-with-python2 python-pyparsing))
5481
5482 (define-public python-pyparsing-2.4.7
5483 (package
5484 (inherit python-pyparsing)
5485 (version "2.4.7")
5486 (source
5487 (origin
5488 (method url-fetch)
5489 (uri (pypi-uri "pyparsing" version))
5490 (sha256
5491 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
5492
5493 (define-public python-numpydoc
5494 (package
5495 (name "python-numpydoc")
5496 (version "0.8.0")
5497 (source
5498 (origin
5499 (method url-fetch)
5500 (uri (pypi-uri "numpydoc" version))
5501 (sha256
5502 (base32
5503 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
5504 (build-system python-build-system)
5505 (propagated-inputs
5506 `(("python-sphinx" ,python-sphinx)))
5507 (native-inputs
5508 `(("python-nose" ,python-nose)))
5509 (home-page "https://pypi.org/project/numpydoc/")
5510 (synopsis
5511 "Numpy's Sphinx extensions")
5512 (description
5513 "Sphinx extension to support docstrings in Numpy format.")
5514 (license license:bsd-2)
5515 (properties `((python2-variant . ,(delay python2-numpydoc))))))
5516
5517 (define-public python2-numpydoc
5518 (let ((base (package-with-python2
5519 (strip-python2-variant python-numpydoc))))
5520 (package/inherit base
5521 (propagated-inputs
5522 `(("python2-jinja2" ,python2-jinja2)
5523 ,@(package-propagated-inputs base))))))
5524
5525 (define-public python-numexpr
5526 (package
5527 (name "python-numexpr")
5528 (version "2.6.5")
5529 (source
5530 (origin
5531 (method url-fetch)
5532 (uri (pypi-uri "numexpr" version))
5533 (sha256
5534 (base32
5535 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
5536 (build-system python-build-system)
5537 (arguments `(#:tests? #f)) ; no tests included
5538 (propagated-inputs
5539 `(("python-numpy" ,python-numpy)))
5540 (home-page "https://github.com/pydata/numexpr")
5541 (synopsis "Fast numerical expression evaluator for NumPy")
5542 (description
5543 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
5544 expressions that operate on arrays are accelerated and use less memory than
5545 doing the same calculation in Python. In addition, its multi-threaded
5546 capabilities can make use of all your cores, which may accelerate
5547 computations, most specially if they are not memory-bounded (e.g. those using
5548 transcendental functions).")
5549 (license license:expat)))
5550
5551 (define-public python2-numexpr
5552 (package-with-python2 python-numexpr))
5553
5554 (define-public python-cycler
5555 (package
5556 (name "python-cycler")
5557 (version "0.10.0")
5558 (source (origin
5559 (method url-fetch)
5560 (uri (pypi-uri "cycler" version))
5561 (sha256
5562 (base32
5563 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5564 (build-system python-build-system)
5565 (arguments
5566 ;; XXX: The current version requires 'coveralls' which we don't have.
5567 ;; Enable this for the next release which uses 'python-pytest'.
5568 '(#:tests? #f))
5569 (propagated-inputs
5570 `(("python-six" ,python-six)))
5571 (home-page "https://matplotlib.org/cycler/")
5572 (synopsis "Composable keyword argument iterator")
5573 (description
5574 "When using @code{matplotlib} and plotting more than one line, it is
5575 common to want to be able to want to be able to cycle over one or more artist
5576 styles; but the plotting logic can quickly become involved.
5577 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5578 @code{Cycler} class was developed.")
5579 (license license:bsd-3)))
5580
5581 (define-public python2-cycler
5582 (package-with-python2 python-cycler))
5583
5584 (define-public python-colorspacious
5585 (package
5586 (name "python-colorspacious")
5587 (version "1.1.2")
5588 (source
5589 (origin
5590 (method git-fetch)
5591 (uri (git-reference
5592 (url "https://github.com/njsmith/colorspacious")
5593 (commit (string-append "v" version))))
5594 (file-name (git-file-name name version))
5595 (sha256
5596 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5597 (build-system python-build-system)
5598 (propagated-inputs
5599 `(("python-numpy" ,python-numpy)))
5600 (native-inputs
5601 `(("python-nose" ,python-nose)))
5602 (arguments
5603 `(#:phases
5604 (modify-phases %standard-phases
5605 (replace 'check
5606 (lambda _
5607 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5608 (home-page "https://github.com/njsmith/colorspacious")
5609 (synopsis "Python library for colorspace conversions")
5610 (description "@code{colorspacious} is a Python library that lets you
5611 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5612 (license license:expat)))
5613
5614 (define-public python2-colorspacious
5615 (package-with-python2 python-colorspacious))
5616
5617 (define-public python-matplotlib
5618 (package
5619 (name "python-matplotlib")
5620 (version "3.1.2")
5621 (source
5622 (origin
5623 (method url-fetch)
5624 (uri (pypi-uri "matplotlib" version))
5625 (sha256
5626 (base32 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))
5627 (patches
5628 (search-patches "python-matplotlib-run-under-wayland-gtk3.patch"))))
5629 (build-system python-build-system)
5630 (propagated-inputs ; the following packages are all needed at run time
5631 `(("python-cycler" ,python-cycler)
5632 ("python-kiwisolver" ,python-kiwisolver)
5633 ("python-pyparsing" ,python-pyparsing)
5634 ("python-pygobject" ,python-pygobject)
5635 ("gobject-introspection" ,gobject-introspection)
5636 ("python-tkinter" ,python "tk")
5637 ("python-dateutil" ,python-dateutil)
5638 ("python-numpy" ,python-numpy)
5639 ("python-pillow" ,python-pillow)
5640 ("python-pytz" ,python-pytz)
5641 ("python-six" ,python-six)
5642 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5643 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5644 ;; object. For this reason we need to import both libraries.
5645 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5646 ("python-pycairo" ,python-pycairo)
5647 ("python-cairocffi" ,python-cairocffi)))
5648 (inputs
5649 `(("libpng" ,libpng)
5650 ("freetype" ,freetype)
5651 ("cairo" ,cairo)
5652 ("glib" ,glib)
5653 ;; FIXME: Add backends when available.
5654 ;("python-wxpython" ,python-wxpython)
5655 ("tcl" ,tcl)
5656 ("tk" ,tk)))
5657 (native-inputs
5658 `(("pkg-config" ,pkg-config)
5659 ("python-pytest" ,python-pytest)
5660 ("python-mock" ,python-mock)
5661 ("unzip" ,unzip)
5662 ("jquery-ui"
5663 ,(origin
5664 (method url-fetch)
5665 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5666 (sha256
5667 (base32
5668 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5669 (arguments
5670 `(#:phases
5671 (modify-phases %standard-phases
5672 ;; XXX We disable all image comparison tests because we're using a
5673 ;; newer version of FreeType than matplotlib expects. This leads to
5674 ;; minor differences throughout the tests.
5675 (add-after 'unpack 'fix-and-disable-failing-tests
5676 (lambda _
5677 (substitute* (append (find-files "lib/matplotlib/tests/"
5678 "test_.*\\.py$")
5679 (find-files "lib/mpl_toolkits/tests"
5680 "test_.*\\.py$"))
5681 (("^from matplotlib" match)
5682 (string-append "import pytest\n" match))
5683 (("( *)@image_comparison" match indent)
5684 (string-append indent
5685 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5686 match)))
5687 (substitute* "lib/matplotlib/tests/test_animation.py"
5688 (("/bin/sh") (which "sh")))
5689 (for-each delete-file
5690 ;; test_normal_axes, test_get_tightbbox_polar
5691 '("lib/matplotlib/tests/test_axes.py"
5692 ;; We don't use the webagg backend and this test forces it.
5693 "lib/matplotlib/tests/test_backend_webagg.py"
5694 ;; test_outward_ticks
5695 "lib/matplotlib/tests/test_tightlayout.py"
5696 ;; test_hidden_axes fails with minor extent
5697 ;; differences, possibly due to the use of a
5698 ;; different version of FreeType.
5699 "lib/matplotlib/tests/test_constrainedlayout.py"
5700 ;; Fontconfig returns no fonts.
5701 "lib/matplotlib/tests/test_font_manager.py"))
5702 #t))
5703 (add-before 'install 'install-jquery-ui
5704 (lambda* (#:key outputs inputs #:allow-other-keys)
5705 (let* ((python-version (python-version
5706 (assoc-ref inputs "python")))
5707 (dir (string-append (assoc-ref outputs "out")
5708 "/lib/python" python-version "/site-packages"
5709 "/matplotlib/backends/web_backend/")))
5710 (mkdir-p dir)
5711 (invoke "unzip"
5712 (assoc-ref inputs "jquery-ui")
5713 "-d" dir))
5714 #t))
5715 (replace 'check
5716 (lambda* (#:key outputs inputs #:allow-other-keys)
5717 (add-installed-pythonpath inputs outputs)
5718 (invoke "python" "tests.py" "-v"
5719 "-m" "not network and not webagg")))
5720 (add-before 'build 'configure-environment
5721 (lambda* (#:key outputs inputs #:allow-other-keys)
5722 (let ((cairo (assoc-ref inputs "cairo")))
5723 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5724 ;; has not effect.
5725 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5726 (setenv "HOME" (getcwd))
5727 ;; Fix rounding errors when using the x87 FPU.
5728 (when (string-prefix? "i686" ,(%current-system))
5729 (setenv "CFLAGS" "-ffloat-store"))
5730 (call-with-output-file "setup.cfg"
5731 (lambda (port)
5732 (format port "[directories]~%
5733 basedirlist = ~a,~a~%
5734 [packages]~%
5735 tests = True~%"
5736 (assoc-ref inputs "tcl")
5737 (assoc-ref inputs "tk")))))
5738 #t)))))
5739 (home-page "https://matplotlib.org/")
5740 (synopsis "2D plotting library for Python")
5741 (description
5742 "Matplotlib is a Python 2D plotting library which produces publication
5743 quality figures in a variety of hardcopy formats and interactive environments
5744 across platforms. Matplotlib can be used in Python scripts, the python and
5745 ipython shell, web application servers, and six graphical user interface
5746 toolkits.")
5747 (license license:psfl)
5748 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5749
5750 (define-public python2-matplotlib
5751 (let ((matplotlib (package-with-python2
5752 (strip-python2-variant python-matplotlib))))
5753 (package (inherit matplotlib)
5754 (version "2.2.4")
5755 (source
5756 (origin
5757 (method url-fetch)
5758 (uri (pypi-uri "matplotlib" version))
5759 (sha256
5760 (base32
5761 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5762 (arguments
5763 (substitute-keyword-arguments (package-arguments matplotlib)
5764 ((#:phases phases)
5765 `(modify-phases ,phases
5766 (replace 'install-jquery-ui
5767 (lambda* (#:key outputs inputs #:allow-other-keys)
5768 (let ((dir (string-append (assoc-ref outputs "out")
5769 "/lib/python2.7/site-packages/"
5770 "matplotlib/backends/web_backend/")))
5771 (mkdir-p dir)
5772 (invoke "unzip"
5773 (assoc-ref inputs "jquery-ui")
5774 "-d" dir))
5775 #t))
5776 (delete 'fix-and-disable-failing-tests)
5777 (delete 'check))))) ; These tests weren't run the the past.
5778 ;; Make sure to use special packages for Python 2 instead
5779 ;; of those automatically rewritten by package-with-python2.
5780 (propagated-inputs
5781 `(("python2-pycairo" ,python2-pycairo)
5782 ("python2-backports-functools-lru-cache"
5783 ,python2-backports-functools-lru-cache)
5784 ("python2-functools32" ,python2-functools32)
5785 ("python2-pygobject-2" ,python2-pygobject-2)
5786 ("python2-subprocess32" ,python2-subprocess32)
5787 ("python2-tkinter" ,python-2 "tk")
5788 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5789 '("python-cairocffi"
5790 "python-pycairo"
5791 "python-pygobject"
5792 "python-tkinter")))))))
5793
5794 (define-public python-matplotlib-documentation
5795 (package
5796 (name "python-matplotlib-documentation")
5797 (version (package-version python-matplotlib))
5798 (source (package-source python-matplotlib))
5799 (build-system python-build-system)
5800 (native-inputs
5801 `(("python-matplotlib" ,python-matplotlib)
5802 ("python-colorspacious" ,python-colorspacious)
5803 ("python-sphinx" ,python-sphinx)
5804 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5805 ("python-sphinx-gallery" ,python-sphinx-gallery)
5806 ("python-numpydoc" ,python-numpydoc)
5807 ("python-ipython" ,python-ipython)
5808 ("python-ipykernel" ,python-ipykernel)
5809 ("python-mock" ,python-mock)
5810 ("graphviz" ,graphviz)
5811 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
5812 texlive-latex-amsmath
5813 texlive-latex-enumitem
5814 texlive-latex-expdlist
5815 texlive-latex-geometry
5816 texlive-latex-preview
5817 texlive-latex-type1cm
5818 texlive-latex-ucs
5819
5820 texlive-generic-pdftex
5821
5822 texlive-fonts-ec
5823 texlive-fonts-adobe-times
5824 texlive-fonts-txfonts)))
5825 ("texinfo" ,texinfo)
5826 ,@(package-native-inputs python-matplotlib)))
5827 (arguments
5828 `(#:tests? #f ; we're only generating documentation
5829 #:phases
5830 (modify-phases %standard-phases
5831 ;; The tests in python-matplotlib are run after the install phase, so
5832 ;; we need to delete the extra phase here.
5833 (delete 'check)
5834 (replace 'build
5835 (lambda _
5836 (chdir "doc")
5837 (setenv "PYTHONPATH"
5838 (string-append (getenv "PYTHONPATH")
5839 ":" (getcwd) "/../examples/units"))
5840 (substitute* "conf.py"
5841 ;; Don't use git.
5842 (("^SHA = check_output.*")
5843 (string-append "SHA = \"" ,version "\"\n"))
5844 ;; Don't fetch intersphinx files from the Internet
5845 (("^explicit_order_folders" m)
5846 (string-append "intersphinx_mapping = {}\n" m))
5847 (("'sphinx.ext.intersphinx',") "")
5848 ;; Disable URL embedding which requires internet access.
5849 (("'https://docs.scipy.org/doc/numpy'") "None")
5850 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5851 (invoke "make"
5852 "SPHINXBUILD=sphinx-build"
5853 "SPHINXOPTS=" ; don't abort on warnings
5854 "html" "texinfo")))
5855 (replace 'install
5856 (lambda* (#:key inputs outputs #:allow-other-keys)
5857 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5858 (doc (string-append data "/doc/python-matplotlib-" ,version))
5859 (info (string-append data "/info"))
5860 (html (string-append doc "/html")))
5861 (mkdir-p html)
5862 (mkdir-p info)
5863 (copy-recursively "build/html" html)
5864 (symlink (string-append html "/_images")
5865 (string-append info "/matplotlib-figures"))
5866 (with-directory-excursion "build/texinfo"
5867 (substitute* "matplotlib.texi"
5868 (("@image\\{([^,]*)" all file)
5869 (string-append "@image{matplotlib-figures/" file)))
5870 (symlink (string-append html "/_images")
5871 "./matplotlib-figures")
5872 (invoke "makeinfo" "--no-split"
5873 "-o" "matplotlib.info" "matplotlib.texi"))
5874 (install-file "build/texinfo/matplotlib.info" info))
5875 #t)))))
5876 (home-page (package-home-page python-matplotlib))
5877 (synopsis "Documentation for the python-matplotlib package")
5878 (description (package-description python-matplotlib))
5879 (license (package-license python-matplotlib))))
5880
5881 (define-public python-matplotlib-venn
5882 (package
5883 (name "python-matplotlib-venn")
5884 (version "0.11.5")
5885 (source
5886 (origin
5887 (method url-fetch)
5888 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5889 (sha256
5890 (base32
5891 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5892 (build-system python-build-system)
5893 (arguments '(#:tests? #f)) ; tests are not included
5894 (propagated-inputs
5895 `(("python-matplotlib" ,python-matplotlib)
5896 ("python-numpy" ,python-numpy)
5897 ("python-scipy" ,python-scipy)))
5898 (native-inputs
5899 `(("unzip" ,unzip)))
5900 (home-page "https://github.com/konstantint/matplotlib-venn")
5901 (synopsis "Plot area-proportional Venn diagrams")
5902 (description
5903 "This package provides tools for plotting area-proportional two- and
5904 three-way Venn diagrams in @code{matplotlib}.")
5905 (license license:expat)))
5906
5907 (define-public python-pysnptools
5908 (package
5909 (name "python-pysnptools")
5910 (version "0.4.11")
5911 (source
5912 (origin
5913 (method url-fetch)
5914 (uri (pypi-uri "pysnptools" version))
5915 (sha256
5916 (base32
5917 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5918 (build-system python-build-system)
5919 (arguments
5920 `(#:tests? #f ; no test data are included
5921 #:phases
5922 (modify-phases %standard-phases
5923 (replace 'check
5924 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5925 (if tests?
5926 (begin
5927 (add-installed-pythonpath inputs outputs)
5928 (invoke "python3" "pysnptools/test.py"))
5929 #t))))))
5930 (propagated-inputs
5931 `(("python-dill" ,python-dill)
5932 ("python-h5py" ,python-h5py)
5933 ("python-numpy" ,python-numpy)
5934 ("python-pandas" ,python-pandas)
5935 ("python-psutil" ,python-psutil)
5936 ("python-scipy" ,python-scipy)))
5937 (native-inputs
5938 `(("python-cython" ,python-cython)))
5939 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5940 (synopsis "Library for reading and manipulating genetic data")
5941 (description
5942 "PySnpTools is a library for reading and manipulating genetic data. It
5943 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5944 those files. It can also efficiently manipulate ranges of integers using set
5945 operators such as union, intersection, and difference.")
5946 (license license:asl2.0)))
5947
5948 (define-public python2-pysnptools
5949 (package-with-python2 python-pysnptools))
5950
5951 (define-public python-pykdtree
5952 (package
5953 (name "python-pykdtree")
5954 (version "1.3.4")
5955 (source
5956 (origin
5957 (method url-fetch)
5958 (uri (pypi-uri "pykdtree" version))
5959 (sha256
5960 (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
5961 (build-system python-build-system)
5962 (native-inputs
5963 `(("python-nose" ,python-nose)))
5964 (propagated-inputs
5965 `(("python-numpy" ,python-numpy)))
5966 (home-page "https://github.com/storpipfugl/pykdtree")
5967 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
5968 (description
5969 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
5970 search in Python.")
5971 (license license:lgpl3+)))
5972
5973 (define-public python-wurlitzer
5974 (package
5975 (name "python-wurlitzer")
5976 (version "2.0.1")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (pypi-uri "wurlitzer" version))
5981 (sha256
5982 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5983 (build-system python-build-system)
5984 (arguments
5985 '(#:phases
5986 (modify-phases %standard-phases
5987 (replace 'check
5988 (lambda _
5989 (invoke "pytest" "-vv" "test.py"))))))
5990 (native-inputs
5991 `(("python-mock" ,python-mock)
5992 ("python-pytest" ,python-pytest)))
5993 (home-page "https://github.com/minrk/wurlitzer")
5994 (synopsis "Capture C-level output in context managers")
5995 (description
5996 "This library helps to redirect @code{sys.stdout} to a stream or a file
5997 while executing some piece of code, including C code running within a Python
5998 process.")
5999 (license license:expat)))
6000
6001 (define-public python-socksipy-branch
6002 (package
6003 (name "python-socksipy-branch")
6004 (version "1.01")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (pypi-uri "SocksiPy-branch" version))
6009 (sha256
6010 (base32
6011 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
6012 (build-system python-build-system)
6013 (arguments
6014 `(#:tests? #f)) ; There are no tests
6015 (home-page "https://code.google.com/archive/p/socksipy-branch/")
6016 (synopsis "Python SOCKS module")
6017 (description
6018 "SocksiPy - A Python SOCKS client module. It provides a
6019 socket-like interface that supports connections to any TCP
6020 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
6021 The original version was developed by Dan Haim, this is a
6022 branch created by Mario Vilas to address some open issues,
6023 as the original project seems to have been abandoned circa 2007.")
6024 (license license:bsd-3)))
6025
6026 (define-public python2-socksipy-branch
6027 (package-with-python2 python-socksipy-branch))
6028
6029 (define-public python-socksipychain
6030 (package
6031 (name "python-socksipychain")
6032 (version "2.1.2")
6033 (source
6034 (origin
6035 (method git-fetch)
6036 (uri (git-reference
6037 (url "https://github.com/pagekite/PySocksipyChain")
6038 (commit (string-append "v" version))))
6039 (file-name (git-file-name name version))
6040 (sha256
6041 (base32
6042 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
6043 (build-system python-build-system)
6044 (arguments
6045 `(#:tests? #f)) ; Tests try to access the network.
6046 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
6047 (synopsis "Python SOCKS module with chained proxies support")
6048 (description
6049 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
6050 adds support for arbitrary chaining of proxy servers and various modes of
6051 TLS/SSL encryption. It was developed for use in PageKite, and also includes
6052 a simple netcat replacement with chaining support.")
6053 (license license:bsd-3)))
6054
6055 (define-public python-pycodestyle
6056 (package
6057 (name "python-pycodestyle")
6058 (version "2.7.0")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (pypi-uri "pycodestyle" version))
6063 (sha256
6064 (base32
6065 "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
6066 (build-system python-build-system)
6067 (arguments
6068 `(#:phases
6069 (modify-phases %standard-phases
6070 (replace 'check
6071 (lambda _
6072 (invoke "pytest" "-vv"))))))
6073 (native-inputs
6074 `(("python-pytest" ,python-pytest)))
6075 (home-page "https://pycodestyle.readthedocs.io/")
6076 (synopsis "Python style guide checker")
6077 (description "@code{pycodestyle} (formerly pep8) is a tool to check
6078 Python code against some of the style conventions in
6079 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
6080 (license license:expat)))
6081
6082 (define-public python2-pycodestyle
6083 (package-with-python2 python-pycodestyle))
6084
6085 (define-public python-pycodestyle-2.6
6086 (package
6087 (inherit python-pycodestyle)
6088 (version "2.6.0")
6089 (source (origin
6090 (method url-fetch)
6091 (uri (pypi-uri "pycodestyle" version))
6092 (sha256
6093 (base32
6094 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
6095
6096 (define-public python-multidict
6097 (package
6098 (name "python-multidict")
6099 (version "4.7.5")
6100 (source
6101 (origin
6102 (method url-fetch)
6103 (uri (pypi-uri "multidict" version))
6104 (sha256
6105 (base32
6106 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
6107 (build-system python-build-system)
6108 (arguments
6109 '(#:modules ((ice-9 ftw)
6110 (srfi srfi-1)
6111 (srfi srfi-26)
6112 (guix build utils)
6113 (guix build python-build-system))
6114 #:phases (modify-phases %standard-phases
6115 (replace 'check
6116 (lambda* (#:key tests? #:allow-other-keys)
6117 (if tests?
6118 (begin
6119 (let ((libdir (find (cut string-prefix? "lib." <>)
6120 (scandir "build"))))
6121 (setenv "PYTHONPATH"
6122 (string-append "./build/" libdir ":"
6123 (getenv "PYTHONPATH")))
6124 (invoke "pytest" "-vv")))
6125 (format #t "test suite not run~%"))
6126 #t)))))
6127 (native-inputs
6128 `(("python-pytest" ,python-pytest)
6129 ("python-pytest-cov" ,python-pytest-cov)))
6130 (home-page "https://github.com/aio-libs/multidict/")
6131 (synopsis "Multidict implementation")
6132 (description "Multidict is dict-like collection of key-value pairs
6133 where key might be occurred more than once in the container.")
6134 (license license:asl2.0)))
6135
6136 (define-public python-orderedmultidict
6137 (package
6138 (name "python-orderedmultidict")
6139 (version "1.0")
6140 (source
6141 (origin
6142 (method url-fetch)
6143 (uri (pypi-uri "orderedmultidict" version))
6144 (sha256
6145 (base32
6146 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
6147 (build-system python-build-system)
6148 (arguments
6149 `(#:phases
6150 (modify-phases %standard-phases
6151 (add-after 'unpack 'fix-tests
6152 (lambda _
6153 ;; The package uses nosetest for running the tests.
6154 ;; Adding this initfile allows to run the test suite
6155 ;; without requiring nosetest.
6156 (with-output-to-file "tests/__init__.py" newline)
6157 #t)))))
6158 (propagated-inputs
6159 `(("python-six" ,python-six)))
6160 (native-inputs
6161 `(("python-pycodestyle" ,python-pycodestyle)))
6162 (home-page "https://github.com/gruns/orderedmultidict")
6163 (synopsis "Python Ordered Multivalue Dictionary - omdict")
6164 (description "This package contains a library for ordered multivalue
6165 dictionaries. A multivalue dictionary is a dictionary that can store
6166 multiple values for the same key. An ordered multivalue dictionary is a
6167 multivalue dictionary that retains the order of insertions and deletions.")
6168 (license license:unlicense)))
6169
6170 (define-public python2-orderedmultidict
6171 (package-with-python2 python-orderedmultidict))
6172
6173 (define-public python-autopep8
6174 (package
6175 (name "python-autopep8")
6176 (version "1.5.3")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "autopep8" version))
6181 (sha256
6182 (base32
6183 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
6184 (build-system python-build-system)
6185 (propagated-inputs
6186 `(("python-pycodestyle" ,python-pycodestyle)
6187 ("python-toml" ,python-toml)))
6188 (home-page "https://github.com/hhatto/autopep8")
6189 (synopsis "Format Python code according to the PEP 8 style guide")
6190 (description
6191 "@code{autopep8} automatically formats Python code to conform to
6192 the PEP 8 style guide. It uses the pycodestyle utility to determine
6193 what parts of the code needs to be formatted. @code{autopep8} is
6194 capable of fixing most of the formatting issues that can be reported
6195 by pycodestyle.")
6196 (license (license:non-copyleft
6197 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
6198
6199 (define-public python2-autopep8
6200 (package-with-python2 python-autopep8))
6201
6202 (define-public python-distlib
6203 (package
6204 (name "python-distlib")
6205 (version "0.3.0")
6206 (source
6207 (origin
6208 (method url-fetch)
6209 (uri (pypi-uri "distlib" version ".zip"))
6210 (sha256
6211 (base32
6212 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
6213 (build-system python-build-system)
6214 (arguments
6215 `(#:phases
6216 (modify-phases %standard-phases
6217 (add-before 'build 'no-/bin/sh
6218 (lambda _
6219 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
6220 (("/bin/sh") (which "sh")))
6221 #t))
6222 (add-before 'check 'prepare-test-env
6223 (lambda _
6224 (setenv "HOME" "/tmp")
6225 ;; NOTE: Any value works, the variable just has to be present.
6226 (setenv "SKIP_ONLINE" "1")
6227 #t)))))
6228 (native-inputs `(("unzip" ,unzip)))
6229 (home-page "https://bitbucket.org/pypa/distlib")
6230 (synopsis "Distribution utilities")
6231 (description "Distlib is a library which implements low-level functions that
6232 relate to packaging and distribution of Python software. It is intended to be
6233 used as the basis for third-party packaging tools.")
6234 (license license:psfl)))
6235
6236 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
6237 (define-public python-distlib/next
6238 (package
6239 (inherit python-distlib)
6240 (version "0.3.1")
6241 (source
6242 (origin
6243 (method url-fetch)
6244 (uri (pypi-uri "distlib" version ".zip"))
6245 (sha256
6246 (base32
6247 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
6248
6249 (define-public python-distutils-extra
6250 (package
6251 (name "python-distutils-extra")
6252 (version "2.38")
6253 (source
6254 (origin
6255 (method url-fetch)
6256 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
6257 version "/+download/python-distutils-extra-"
6258 version ".tar.gz"))
6259 (sha256
6260 (base32
6261 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
6262 (build-system python-build-system)
6263 (home-page "https://launchpad.net/python-distutils-extra/")
6264 (synopsis "Enhancements to Python's distutils")
6265 (description
6266 "The python-distutils-extra module enables you to easily integrate
6267 gettext support, themed icons, and scrollkeeper-based documentation into
6268 Python's distutils.")
6269 (license license:gpl2)))
6270
6271 (define-public python2-distutils-extra
6272 (package-with-python2 python-distutils-extra))
6273
6274 (define-public python2-elib.intl
6275 (package
6276 (name "python2-elib.intl")
6277 (version "0.0.3")
6278 (source
6279 (origin
6280 ;; This project doesn't tag releases or publish tarballs, so we take
6281 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
6282 (method git-fetch)
6283 (uri (git-reference
6284 (url "https://github.com/dieterv/elib.intl")
6285 (commit "d09997cfef")))
6286 (file-name (string-append name "-" version "-checkout"))
6287 (sha256
6288 (base32
6289 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
6290 (build-system python-build-system)
6291 (arguments
6292 ;; incompatible with Python 3 (exception syntax)
6293 `(#:python ,python-2
6294 #:tests? #f))
6295 (home-page "https://github.com/dieterv/elib.intl")
6296 (synopsis "Enhanced internationalization for Python")
6297 (description
6298 "The elib.intl module provides enhanced internationalization (I18N)
6299 services for your Python modules and applications.")
6300 (license license:lgpl3+)))
6301
6302 (define-public python-olefile
6303 (package
6304 (name "python-olefile")
6305 (version "0.46")
6306 (source
6307 (origin
6308 (method url-fetch)
6309 (uri (string-append "https://github.com/decalage2/olefile/releases/"
6310 "download/v" version "/olefile-" version ".tar.gz"))
6311 (file-name (string-append name "-" version ".tar.gz"))
6312 (sha256
6313 (base32
6314 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
6315 (build-system python-build-system)
6316 (home-page "https://www.decalage.info/python/olefileio")
6317 (synopsis "Read and write Microsoft OLE2 files.")
6318 (description
6319 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
6320 Storage or Compound Document, Microsoft Office). It is an improved version of
6321 the OleFileIO module from PIL, the Python Image Library.")
6322 (license license:bsd-3)))
6323
6324 (define-public python2-olefile
6325 (package-with-python2 python-olefile))
6326
6327 (define-public python-pikepdf
6328 (package
6329 (name "python-pikepdf")
6330 (version "2.13.0")
6331 (source
6332 (origin
6333 (method url-fetch)
6334 (uri (pypi-uri "pikepdf" version))
6335 (sha256
6336 (base32 "1di5bbh2mr8m1aydky8ix12pkybrd0cvs8xqf5s2y1xa349r514l"))))
6337 (build-system python-build-system)
6338 (arguments
6339 `(#:tests? #false)) ;require python-xmp-toolkit
6340 (native-inputs
6341 `(("pybind11" ,pybind11)
6342 ("python-setuptools" ,python-setuptools)
6343 ("python-setuptools-scm" ,python-setuptools-scm/next)
6344 ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)
6345 ("python-toml" ,python-toml)
6346 ("python-wheel" ,python-wheel)))
6347 (inputs
6348 `(("qpdf" ,qpdf)))
6349 (propagated-inputs
6350 `(("python-lxml" ,python-lxml)
6351 ("python-pillow" ,python-pillow)))
6352 (home-page "https://github.com/pikepdf/pikepdf")
6353 (synopsis "Read and write PDFs with Python")
6354 (description
6355 "pikepdf is a Python library for reading and writing PDF files.")
6356 (license license:mpl2.0)))
6357
6358 (define-public python-pillow
6359 (package
6360 (name "python-pillow")
6361 (version "8.1.1")
6362 (source
6363 (origin
6364 (method url-fetch)
6365 (uri (pypi-uri "Pillow" version))
6366 (sha256
6367 (base32
6368 "086g7nhv52wclrwnzbzs2x3nvyzs2hfq1bvgivsrp5f7r7wiiz7n"))))
6369 (build-system python-build-system)
6370 (native-inputs
6371 `(("python-pytest" ,python-pytest)))
6372 (inputs
6373 `(("freetype" ,freetype)
6374 ("lcms" ,lcms)
6375 ("libjpeg" ,libjpeg-turbo)
6376 ("libtiff" ,libtiff)
6377 ("libwebp" ,libwebp)
6378 ("openjpeg" ,openjpeg)
6379 ("zlib" ,zlib)))
6380 (propagated-inputs
6381 `(("python-olefile" ,python-olefile)))
6382 (arguments
6383 `(#:phases
6384 (modify-phases %standard-phases
6385 (add-after 'unpack 'patch-ldconfig
6386 (lambda _
6387 (substitute* "setup.py"
6388 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
6389 (replace 'check
6390 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6391 (if tests?
6392 (begin
6393 (setenv "HOME" (getcwd))
6394 ;; Make installed package available for running the tests.
6395 (add-installed-pythonpath inputs outputs)
6396 (invoke "python" "selftest.py" "--installed")
6397 (invoke "python" "-m" "pytest" "-vv"))
6398 #t))))))
6399 (home-page "https://python-pillow.org")
6400 (synopsis "Fork of the Python Imaging Library")
6401 (description
6402 "The Python Imaging Library adds image processing capabilities to your
6403 Python interpreter. This library provides extensive file format support, an
6404 efficient internal representation, and fairly powerful image processing
6405 capabilities. The core image library is designed for fast access to data
6406 stored in a few basic pixel formats. It should provide a solid foundation for
6407 a general image processing tool.")
6408 (properties `((python2-variant . ,(delay python2-pillow))))
6409 (license (license:x11-style
6410 "http://www.pythonware.com/products/pil/license.htm"
6411 "The PIL Software License"))))
6412
6413 (define-public python2-pillow
6414 (package-with-python2
6415 (package
6416 (inherit (strip-python2-variant python-pillow))
6417 ;; Version 6 is the last series with Python 2 support.
6418 (version "6.2.2")
6419 (source
6420 (origin
6421 (method url-fetch)
6422 (uri (pypi-uri "Pillow" version))
6423 (sha256
6424 (base32
6425 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
6426
6427 (define-public python-pillow-2.9
6428 (package
6429 (inherit python-pillow)
6430 (version "2.9.0")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "Pillow" version))
6435 (sha256
6436 (base32
6437 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
6438 (arguments
6439 (substitute-keyword-arguments (package-arguments python-pillow)
6440 ((#:tests? _ #f) #f)))
6441 (properties '((hidden? #t)))))
6442
6443 (define-public python-pillow-simd
6444 (package
6445 (inherit python-pillow)
6446 (name "python-pillow-simd")
6447 (version "7.1.2")
6448 ;; The PyPI tarball does not include test files.
6449 (source
6450 (origin
6451 (method git-fetch)
6452 (uri (git-reference
6453 (url "https://github.com/uploadcare/pillow-simd")
6454 (commit version)))
6455 (file-name (git-file-name name version))
6456 (sha256
6457 (base32 "0w11np4cybamry3jsg70x747c79zwjzfq0xiprfp6c186rd6nzp9"))))
6458 (arguments
6459 (substitute-keyword-arguments
6460 (package-arguments python-pillow)
6461 ((#:phases phases)
6462 `(modify-phases ,phases
6463 (add-after 'unpack 'make-tests-writable
6464 (lambda _
6465 (for-each make-file-writable (find-files "Tests"))
6466 #t))))))
6467 (inputs
6468 `(("libraqm" ,libraqm)
6469 ("libimagequant" ,libimagequant)
6470 ,@(package-inputs python-pillow)))
6471 (home-page "https://github.com/uploadcare/pillow-simd")
6472 (synopsis "Fork of the Python Imaging Library (Pillow)")
6473 (description "This package is a fork of Pillow which adds support for SIMD
6474 parallelism.")))
6475
6476 (define-public python-imagecodecs
6477 (package
6478 (name "python-imagecodecs")
6479 (version "2021.3.31")
6480 (source
6481 (origin
6482 (method url-fetch)
6483 (uri (pypi-uri "imagecodecs" version))
6484 (sha256
6485 (base32
6486 "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
6487 (modules '((guix build utils)))
6488 (snippet
6489 '(begin
6490 ;; Unbundle 3rd party modules.
6491 (delete-file-recursively "3rdparty")
6492 ;; Delete pre-generated Cython files.
6493 (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
6494 #t))))
6495 (build-system python-build-system)
6496 (arguments
6497 `(#:tests? #f ; Tests are disabled, because dependencies are missing.
6498 #:phases
6499 (modify-phases %standard-phases
6500 (add-after 'unpack 'create-configuration
6501 (lambda* (#:key inputs #:allow-other-keys)
6502 ;; By default everything is enabled. We can selectively disable
6503 ;; extensions (and thus dependencies) by deleting them from the
6504 ;; EXTENSIONS dictionary. This is upstream’s preferred way.
6505 (call-with-output-file "imagecodecs_distributor_setup.py"
6506 (lambda (port)
6507 (format port "\
6508 def customize_build(EXTENSIONS, OPTIONS):
6509 del EXTENSIONS['aec']
6510 del EXTENSIONS['avif']
6511 del EXTENSIONS['bitshuffle']
6512 del EXTENSIONS['deflate']
6513 del EXTENSIONS['jpeg2k']
6514 del EXTENSIONS['jpeg12']
6515 del EXTENSIONS['jpegls']
6516 del EXTENSIONS['jpegxl']
6517 del EXTENSIONS['jpegxr']
6518 del EXTENSIONS['lerc']
6519 del EXTENSIONS['ljpeg']
6520 del EXTENSIONS['lzf']
6521 del EXTENSIONS['zfp']
6522 del EXTENSIONS['zopfli']
6523 OPTIONS['cythonize']
6524 ")))
6525 #t)))))
6526 (inputs
6527 `(("c-blosc" ,c-blosc)
6528 ("giflib" ,giflib)
6529 ("google-brotli" ,google-brotli)
6530 ("libjpeg-turbo" ,libjpeg-turbo)
6531 ("libpng" ,libpng)
6532 ("libtiff" ,libtiff)
6533 ("libwebp" ,libwebp)
6534 ("lz4" ,lz4)
6535 ("snappy" ,snappy)
6536 ("xz" ,xz)
6537 ("zlib" ,zlib)
6538 ("zstd" ,zstd "lib")))
6539 (propagated-inputs
6540 `(("python-numpy" ,python-numpy)))
6541 (native-inputs
6542 ;; For building.
6543 `(("python-cython" ,python-cython)
6544 ;; For testing. Incomplete.
6545 ;("python-numcodecs" ,python-numcodecs)
6546 ;("python-zarr" ,python-zarr)
6547 ;("python-pytest" ,python-pytest)
6548 ))
6549 (home-page "https://www.lfd.uci.edu/~gohlke/")
6550 (synopsis
6551 "Image transformation, compression, and decompression codecs")
6552 (description
6553 "Imagecodecs is a Python library that provides block-oriented, in-memory
6554 buffer transformation, compression, and decompression functions for use in the
6555 tifffile, czifile, and other scientific image input/output modules.")
6556 (license license:bsd-3)))
6557
6558 (define-public python-roifile
6559 (package
6560 (name "python-roifile")
6561 (version "2020.11.28")
6562 (source
6563 (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "roifile" version))
6566 (sha256
6567 (base32
6568 "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
6569 (build-system python-build-system)
6570 (arguments `(#:tests? #f)) ; there are none
6571 (propagated-inputs
6572 `(("python-numpy" ,python-numpy)))
6573 (home-page "https://www.lfd.uci.edu/~gohlke/")
6574 (synopsis "Read and write ImageJ ROI format")
6575 (description "Roifile is a Python library to read, write, create, and plot
6576 ImageJ ROIs, an undocumented and ImageJ application specific format to store
6577 regions of interest, geometric shapes, paths, text, etc for image overlays.")
6578 (license license:bsd-3)))
6579
6580 (define-public python-tifffile
6581 (package
6582 (name "python-tifffile")
6583 (version "2021.4.8")
6584 (source
6585 (origin
6586 (method url-fetch)
6587 (uri (pypi-uri "tifffile" version))
6588 (sha256
6589 (base32
6590 "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
6591 (build-system python-build-system)
6592 ;; Tests require lfdfiles, which depends on tifffile
6593 (arguments `(#:tests? #f))
6594 (propagated-inputs
6595 `(("python-numpy" ,python-numpy)
6596 ("python-imagecodecs" ,python-imagecodecs)))
6597 (home-page "https://www.lfd.uci.edu/~gohlke/")
6598 (synopsis "Read and write TIFF(r) files")
6599 (description "This package lets you read image and metadata from many
6600 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
6601 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
6602 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
6603 (license license:bsd-3)))
6604
6605 (define-public python-lfdfiles
6606 (package
6607 (name "python-lfdfiles")
6608 (version "2021.2.22")
6609 (source
6610 (origin
6611 (method url-fetch)
6612 (uri (pypi-uri "lfdfiles" version))
6613 (sha256
6614 (base32
6615 "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
6616 (modules '((guix build utils)))
6617 (snippet
6618 '(begin
6619 ;; Delete pre-generated Cython files.
6620 (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
6621 #t))))
6622 (build-system python-build-system)
6623 (arguments
6624 `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
6625 (propagated-inputs
6626 `(("python-click" ,python-click)
6627 ("python-numpy" ,python-numpy)
6628 ("python-tifffile" ,python-tifffile)))
6629 (native-inputs `(("python-cython" ,python-cython)))
6630 (home-page "https://www.lfd.uci.edu/~gohlke/")
6631 (synopsis "Work with LFD data files")
6632 (description
6633 "Lfdfiles is a Python library and console script for reading, writing,
6634 converting, and viewing many of the proprietary file formats used to store
6635 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
6636 (license license:bsd-3)))
6637
6638 (define-public python-imageio
6639 (package
6640 (name "python-imageio")
6641 (version "2.8.0")
6642 (source
6643 (origin
6644 (method url-fetch)
6645 (uri (pypi-uri "imageio" version))
6646 (sha256
6647 (base32
6648 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
6649 (build-system python-build-system)
6650 (arguments
6651 `(#:tests? #f ; many tests require online data
6652 #:phases
6653 (modify-phases %standard-phases
6654 (replace 'check
6655 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
6656 (if tests?
6657 (begin
6658 ;; Make installed package available for running the tests.
6659 (add-installed-pythonpath inputs outputs)
6660 (invoke "pytest" "-vv"))
6661 #t))))))
6662 (propagated-inputs
6663 `(("python-numpy" ,python-numpy)
6664 ("python-pillow" ,python-pillow)
6665 ("python-psutil" ,python-psutil)))
6666 (native-inputs
6667 `(("python-pytest" ,python-pytest)))
6668 (home-page "https://imageio.github.io/")
6669 (synopsis "Library for reading and writing a wide range of image data")
6670 (description
6671 "Imageio is a Python library that provides an easy interface to read and
6672 write a wide range of image data, including animated images, video, volumetric
6673 data, and scientific formats.")
6674 (license license:bsd-2)))
6675
6676 (define-public python-pycparser
6677 (package
6678 (name "python-pycparser")
6679 (version "2.20")
6680 (source
6681 (origin
6682 (method url-fetch)
6683 (uri (pypi-uri "pycparser" version))
6684 (sha256
6685 (base32
6686 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
6687 (outputs '("out" "doc"))
6688 (build-system python-build-system)
6689 (native-inputs
6690 `(("pkg-config" ,pkg-config)))
6691 (arguments
6692 `(#:phases
6693 (modify-phases %standard-phases
6694 (replace 'check
6695 (lambda _
6696 (with-directory-excursion "tests"
6697 (invoke "python" "all_tests.py"))
6698 #t))
6699 (add-after 'install 'install-doc
6700 (lambda* (#:key outputs #:allow-other-keys)
6701 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6702 (doc (string-append data "/doc/" ,name "-" ,version))
6703 (examples (string-append doc "/examples")))
6704 (mkdir-p examples)
6705 (for-each (lambda (file)
6706 (copy-file (string-append "." file)
6707 (string-append doc file)))
6708 '("/README.rst" "/CHANGES" "/LICENSE"))
6709 (copy-recursively "examples" examples)
6710 #t))))))
6711 (home-page "https://github.com/eliben/pycparser")
6712 (synopsis "C parser in Python")
6713 (description
6714 "Pycparser is a complete parser of the C language, written in pure Python
6715 using the PLY parsing library. It parses C code into an AST and can serve as
6716 a front-end for C compilers or analysis tools.")
6717 (license license:bsd-3)))
6718
6719 (define-public python2-pycparser
6720 (package-with-python2 python-pycparser))
6721
6722 (define-public python-xlsxwriter
6723 (package
6724 (name "python-xlsxwriter")
6725 (version "1.3.9")
6726 (source
6727 (origin
6728 ;; There are no tests in the PyPI tarball.
6729 (method git-fetch)
6730 (uri (git-reference
6731 (url "https://github.com/jmcnamara/XlsxWriter")
6732 (commit (string-append "RELEASE_" version))))
6733 (file-name (git-file-name name version))
6734 (sha256
6735 (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
6736 (build-system python-build-system)
6737 (home-page "https://github.com/jmcnamara/XlsxWriter")
6738 (synopsis "Python module for creating Excel XLSX files")
6739 (description
6740 "XlsxWriter is a Python module that can be used to write text, numbers,
6741 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
6742 (license license:bsd-2)))
6743
6744 (define-public python-pywavelets
6745 (package
6746 (name "python-pywavelets")
6747 (version "1.1.1")
6748 (home-page "https://github.com/PyWavelets/pywt")
6749 (source (origin
6750 (method url-fetch)
6751 (uri (pypi-uri "PyWavelets" version))
6752 (sha256
6753 (base32
6754 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6755 (build-system python-build-system)
6756 (arguments
6757 '(#:modules ((ice-9 ftw)
6758 (srfi srfi-1)
6759 (srfi srfi-26)
6760 (guix build utils)
6761 (guix build python-build-system))
6762 #:phases
6763 (modify-phases %standard-phases
6764 (replace 'check
6765 (lambda _
6766 (let ((cwd (getcwd))
6767 (libdir (find (cut string-prefix? "lib." <>)
6768 (scandir "build"))))
6769 (with-directory-excursion (string-append cwd "/build/" libdir)
6770 (invoke "pytest" "-vv"))))))))
6771 (native-inputs
6772 `(("python-matplotlib" ,python-matplotlib) ;for tests
6773 ("python-pytest" ,python-pytest)))
6774 (propagated-inputs
6775 `(("python-numpy" ,python-numpy)))
6776 (synopsis "Wavelet transforms in Python")
6777 (description
6778 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6779 mathematical basis functions that are localized in both time and frequency.
6780 Wavelet transforms are time-frequency transforms employing wavelets. They are
6781 similar to Fourier transforms, the difference being that Fourier transforms are
6782 localized only in frequency instead of in time and frequency.")
6783 (license license:expat)))
6784
6785 (define-public python-pywal
6786 (package
6787 (name "python-pywal")
6788 (version "3.3.0")
6789 (source
6790 (origin
6791 (method git-fetch)
6792 (uri (git-reference
6793 (url "https://github.com/dylanaraps/pywal")
6794 (commit version)))
6795 (file-name (git-file-name name version))
6796 (sha256
6797 (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
6798 (build-system python-build-system)
6799 (arguments
6800 `(#:phases
6801 (modify-phases %standard-phases
6802 (add-before 'check 'fix-home-directory
6803 (lambda _
6804 ;; Tests fail with "Permission denied: '/homeless-shelter'".
6805 (setenv "HOME" "/tmp")
6806 #t)))))
6807 (inputs
6808 `(("imagemagick" ,imagemagick)))
6809 (home-page "https://github.com/dylanaraps/pywal")
6810 (synopsis "Color palette generator and applicator")
6811 (description
6812 "Pywal is a tool that generates a color palette from the dominant colors
6813 in an image. It then applies the colors system-wide and on-the-fly in all of
6814 your favourite programs.")
6815 (license license:expat)))
6816
6817 (define-public python-pywinrm
6818 (package
6819 (name "python-pywinrm")
6820 (version "0.4.1")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "pywinrm" version))
6825 (sha256
6826 (base32
6827 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6828 (build-system python-build-system)
6829 (propagated-inputs
6830 `(("python-six" ,python-six)
6831 ("python-requests_ntlm" ,python-requests_ntlm)
6832 ("python-xmltodict" ,python-xmltodict)
6833 ("python-kerberos" ,python-kerberos)))
6834 (native-inputs
6835 `(("python-mock" ,python-mock)
6836 ("python-pytest" ,python-pytest)))
6837 (home-page "https://github.com/diyan/pywinrm/")
6838 (synopsis
6839 "Python library for Windows Remote Management (WinRM)")
6840 (description
6841 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6842 service. It allows you to invoke commands on target Windows machines from
6843 any machine that can run Python.")
6844 (license license:expat)))
6845
6846 (define-public python-xcffib
6847 (package
6848 (name "python-xcffib")
6849 (version "0.6.0")
6850 (source
6851 (origin
6852 (method url-fetch)
6853 (uri (pypi-uri "xcffib" version))
6854 (sha256
6855 (base32
6856 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6857 (build-system python-build-system)
6858 (inputs
6859 `(("libxcb" ,libxcb)))
6860 (propagated-inputs
6861 `(("python-cffi" ,python-cffi) ; used at run time
6862 ("python-six" ,python-six)))
6863 (arguments
6864 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6865 #:tests? #f
6866 #:phases
6867 (modify-phases %standard-phases
6868 (add-after 'unpack 'fix-libxcb-path
6869 (lambda* (#:key inputs #:allow-other-keys)
6870 (let ((libxcb (assoc-ref inputs "libxcb")))
6871 (substitute* '("xcffib/__init__.py")
6872 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6873 #t)))
6874 (add-after 'install 'install-doc
6875 (lambda* (#:key outputs #:allow-other-keys)
6876 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6877 "/doc/" ,name "-" ,version)))
6878 (mkdir-p doc)
6879 (copy-file "README.md"
6880 (string-append doc "/README.md"))
6881 #t))))))
6882 (home-page "https://github.com/tych0/xcffib")
6883 (synopsis "XCB Python bindings")
6884 (description
6885 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6886 support for Python 3 and PyPy. It is based on cffi.")
6887 (license license:expat)))
6888
6889 (define-public python2-xcffib
6890 (package-with-python2 python-xcffib))
6891
6892 (define-public python-cairocffi
6893 (package
6894 (name "python-cairocffi")
6895 (version "1.2.0")
6896 (source
6897 (origin
6898 ;; The PyPI archive does not include the documentation, so use Git.
6899 (method git-fetch)
6900 (uri (git-reference
6901 (url "https://github.com/Kozea/cairocffi")
6902 (commit (string-append "v" version))))
6903 (file-name (git-file-name name version))
6904 (sha256
6905 (base32
6906 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6907 (build-system python-build-system)
6908 (outputs '("out" "doc"))
6909 (inputs
6910 `(("glib" ,glib)
6911 ("gtk+" ,gtk+)
6912 ("gdk-pixbuf" ,gdk-pixbuf)
6913 ("cairo" ,cairo)))
6914 (native-inputs
6915 `(("python-numpy" ,python-numpy)
6916 ("python-pytest" ,python-pytest)
6917 ("python-pytest-cov" ,python-pytest-cov)
6918 ("python-pytest-runner" ,python-pytest-runner)
6919 ("python-sphinx" ,python-sphinx)
6920 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6921 (propagated-inputs
6922 `(("python-xcffib" ,python-xcffib))) ; used at run time
6923 (arguments
6924 `(#:phases
6925 (modify-phases %standard-phases
6926 (add-after 'unpack 'patch-paths
6927 (lambda* (#:key inputs #:allow-other-keys)
6928 (substitute* "cairocffi/__init__.py"
6929 ;; Hack the dynamic library loading mechanism.
6930 (("find_library\\(library_name\\)")
6931 "\"found\"")
6932 (("filenames = \\(library_filename,\\) \\+ filenames")
6933 "pass")
6934 (("libcairo.so.2")
6935 (string-append (assoc-ref inputs "cairo")
6936 "/lib/libcairo.so.2")))
6937 (substitute* "cairocffi/pixbuf.py"
6938 (("libgdk_pixbuf-2.0.so.0")
6939 (string-append (assoc-ref inputs "gdk-pixbuf")
6940 "/lib/libgdk_pixbuf-2.0.so.0"))
6941 (("libgobject-2.0.so.0")
6942 (string-append (assoc-ref inputs "glib")
6943 "/lib/libgobject-2.0.so.0"))
6944 (("libglib-2.0.so.0")
6945 (string-append (assoc-ref inputs "glib")
6946 "/lib/libglib-2.0.so.0"))
6947 (("libgdk-3.so.0")
6948 (string-append (assoc-ref inputs "gtk+")
6949 "/lib/libgdk-3.so.0")))
6950 #t))
6951 (add-after 'unpack 'disable-linters
6952 ;; Their check fails; none of our business.
6953 (lambda _
6954 (substitute* "setup.cfg"
6955 ((".*pytest-flake8.*") "")
6956 ((".*pytest-isort.*") "")
6957 (("--flake8") "")
6958 (("--isort") ""))
6959 #t))
6960 (add-after 'install 'install-doc
6961 (lambda* (#:key inputs outputs #:allow-other-keys)
6962 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6963 (doc (string-append data "/doc/" ,name "-" ,version))
6964 (html (string-append doc "/html")))
6965 (setenv "LD_LIBRARY_PATH"
6966 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6967 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6968 (setenv "LANG" "en_US.UTF-8")
6969 (mkdir-p html)
6970 (for-each (lambda (file)
6971 (copy-file (string-append "." file)
6972 (string-append doc file)))
6973 '("/README.rst" "/NEWS.rst"))
6974 (system* "python" "setup.py" "build_sphinx")
6975 (copy-recursively "docs/_build/html" html)
6976 #t))))))
6977 (home-page "https://github.com/Kozea/cairocffi")
6978 (synopsis "Python bindings and object-oriented API for Cairo")
6979 (description
6980 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6981 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6982 graphics library with support for multiple backends including image buffers,
6983 PNG, PostScript, PDF, and SVG file output.")
6984 (license license:bsd-3)))
6985
6986 (define-public python-decorator
6987 (package
6988 (name "python-decorator")
6989 (version "4.3.0")
6990 (source
6991 (origin
6992 (method url-fetch)
6993 (uri (pypi-uri "decorator" version))
6994 (sha256
6995 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6996 (build-system python-build-system)
6997 (home-page "https://pypi.org/project/decorator/")
6998 (synopsis "Python module to simplify usage of decorators")
6999 (description
7000 "The aim of the decorator module is to simplify the usage of decorators
7001 for the average programmer, and to popularize decorators usage giving examples
7002 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
7003 etc. The core of this module is a decorator factory.")
7004 (license license:expat)))
7005
7006 (define-public python2-decorator
7007 (package-with-python2 python-decorator))
7008
7009 (define-public python-drmaa
7010 (package
7011 (name "python-drmaa")
7012 (version "0.7.7")
7013 (source
7014 (origin
7015 (method url-fetch)
7016 (uri (pypi-uri "drmaa" version))
7017 (sha256
7018 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
7019 (build-system python-build-system)
7020 ;; The test suite requires libdrmaa which is provided by the cluster
7021 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
7022 ;; should be set to the path of the libdrmaa library.
7023 (arguments '(#:tests? #f))
7024 (native-inputs
7025 `(("python-nose" ,python-nose)))
7026 (home-page "https://pypi.org/project/drmaa/")
7027 (synopsis "Python bindings for the DRMAA library")
7028 (description
7029 "A Python package for Distributed Resource Management (DRM) job
7030 submission and control. This package is an implementation of the DRMAA 1.0
7031 Python language binding specification.")
7032 (license license:bsd-3)))
7033
7034 (define-public python2-drmaa
7035 (package-with-python2 python-drmaa))
7036
7037 (define-public python-grako
7038 (package
7039 (name "python-grako")
7040 (version "3.99.9")
7041 (source
7042 (origin
7043 (method url-fetch)
7044 (uri
7045 (pypi-uri "grako" version ".zip"))
7046 (sha256
7047 (base32
7048 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
7049 (build-system python-build-system)
7050 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
7051 (native-inputs
7052 `(("unzip" ,unzip)
7053 ("python-pytest" ,python-pytest)
7054 ("python-pytest-runner" ,python-pytest-runner)))
7055 (home-page "https://bitbucket.org/neogeny/grako")
7056 (synopsis "EBNF parser generator")
7057 (description
7058 "Grako takes a grammar in a variation of EBNF as input, and outputs a
7059 memoizing PEG/Packrat parser in Python.")
7060 (license license:bsd-3)))
7061
7062 (define-public python2-grako
7063 (package-with-python2 python-grako))
7064
7065 (define-public python-grandalf
7066 (package
7067 (name "python-grandalf")
7068 (version "0.7")
7069 (source
7070 (origin
7071 ;; There's no source tarball on PyPI.
7072 (method git-fetch)
7073 (uri (git-reference
7074 (url "https://github.com/bdcht/grandalf")
7075 (commit (string-append "v" version))))
7076 (file-name (git-file-name name version))
7077 (sha256
7078 (base32
7079 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
7080 (build-system python-build-system)
7081 (arguments
7082 '(#:phases
7083 (modify-phases %standard-phases
7084 (replace 'check
7085 (lambda _
7086 (invoke "python" "setup.py" "pytest"))))))
7087 (native-inputs
7088 `(("python-pytest" ,python-pytest)
7089 ("python-pytest-runner" ,python-pytest-runner)))
7090 (propagated-inputs
7091 `(("python-numpy" ,python-numpy)
7092 ("python-ply" ,python-ply)))
7093 (home-page "https://github.com/bdcht/grandalf")
7094 (synopsis "Graph and drawing algorithms framework")
7095 (description
7096 "Grandalf is a Python package made for experimentations with graphs
7097 drawing algorithms. It is written in pure Python, and currently implements
7098 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
7099 minimization approach. While not as fast or featured as graphviz or other
7100 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
7101 than thousands of nodes, while keeping the source code simple enough to tweak
7102 and hack any part of it for experimental purpose. With a total of about 1500
7103 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
7104 in less than 600 lines. The energy minimization approach is comprised of only
7105 250 lines!
7106
7107 Grandalf does only 2 not-so-simple things:
7108 @itemize
7109 @item computing the nodes (x,y) coordinates (based on provided nodes
7110 dimensions, and a chosen layout)
7111 @item routing the edges with lines or nurbs
7112 @end itemize
7113
7114 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
7115 will help you find where to draw things like nodes and edges, but it’s up to
7116 you to actually draw things with your favorite toolkit.")
7117 ;; The user can choose either license.
7118 (license (list license:gpl2 license:epl1.0))))
7119
7120 (define-public python-gridmap
7121 (package
7122 (name "python-gridmap")
7123 (version "0.14.0")
7124 (source
7125 (origin
7126 (method git-fetch)
7127 (uri (git-reference
7128 (url "https://github.com/pygridtools/gridmap")
7129 (commit (string-append "v" version))))
7130 (file-name (git-file-name name version))
7131 (sha256
7132 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
7133 (build-system python-build-system)
7134 (arguments
7135 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
7136 (propagated-inputs
7137 `(("python-psutil" ,python-psutil)
7138 ("python-drmaa" ,python-drmaa)
7139 ("python-pyzmq" ,python-pyzmq)))
7140 (home-page "https://github.com/pygridtools/gridmap")
7141 (synopsis "Create jobs on a cluster directly from Python")
7142 (description
7143 "Gridmap is a Python package to allow you to easily create jobs on the
7144 cluster directly from Python. You can directly map Python functions onto the
7145 cluster without needing to write any wrapper code yourself.")
7146 (license license:gpl3+)))
7147
7148 (define-public python-honcho
7149 (package
7150 (name "python-honcho")
7151 (version "1.0.1")
7152 (source
7153 (origin
7154 (method git-fetch)
7155 (uri (git-reference
7156 (url "https://github.com/nickstenning/honcho")
7157 (commit (string-append "v" version))))
7158 (file-name (git-file-name name version))
7159 (sha256
7160 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
7161 (build-system python-build-system)
7162 (native-inputs
7163 `(("python-pytest" ,python-pytest)
7164 ("python-mock" ,python-mock)
7165 ("python-tox" ,python-tox)
7166 ("which" ,which))) ;for tests
7167 (propagated-inputs
7168 `(("python-jinja2" ,python-jinja2)))
7169 (arguments
7170 `(#:phases
7171 (modify-phases %standard-phases
7172 (delete 'check)
7173 (add-after 'install 'check
7174 (lambda* (#:key outputs inputs #:allow-other-keys)
7175 ;; fix honcho path in testsuite
7176 (substitute* "tests/conftest.py"
7177 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
7178 "/bin/honcho" "'")))
7179 ;; It's easier to run tests after install.
7180 ;; Make installed package available for running the tests
7181 (add-installed-pythonpath inputs outputs)
7182 (invoke "py.test" "-v"))))))
7183 (home-page "https://github.com/nickstenning/honcho")
7184 (synopsis "Manage Procfile-based applications")
7185 (description
7186 "A Procfile is a file which describes how to run an application
7187 consisting of several processes. honcho starts all listed processes.
7188 The output of all running processes is collected by honcho and
7189 displayed.")
7190 (license license:expat)))
7191
7192 (define-public python-pexpect
7193 (package
7194 (name "python-pexpect")
7195 (version "4.8.0")
7196 (source
7197 (origin
7198 (method url-fetch)
7199 (uri (pypi-uri "pexpect" version))
7200 (sha256
7201 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
7202 (build-system python-build-system)
7203 (arguments
7204 `(#:phases
7205 (modify-phases %standard-phases
7206 (add-before 'check 'prepare-tests
7207 (lambda _
7208 (substitute* (find-files "tests")
7209 (("/bin/ls") (which "ls"))
7210 (("/bin/echo") (which "echo"))
7211 (("/bin/which") (which "which"))
7212 ;; Many tests try to use the /bin directory which
7213 ;; is not present in the build environment.
7214 ;; Use one that's non-empty and unlikely to change.
7215 (("/bin'") "/dev'")
7216 ;; Disable failing test. See upstream bug report
7217 ;; https://github.com/pexpect/pexpect/issues/568
7218 (("def test_bash") "def _test_bash"))
7219 ;; XXX: Socket connection test gets "Connection reset by peer".
7220 ;; Why does it not work? Delete for now.
7221 (delete-file "tests/test_socket.py")
7222 #t))
7223 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
7224 (native-inputs
7225 `(("python-nose" ,python-nose)
7226 ("python-pytest" ,python-pytest)
7227 ("man-db" ,man-db)
7228 ("which" ,which)
7229 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
7230 (propagated-inputs
7231 `(("python-ptyprocess" ,python-ptyprocess)))
7232 (home-page "http://pexpect.readthedocs.org/")
7233 (synopsis "Controlling interactive console applications")
7234 (description
7235 "Pexpect is a pure Python module for spawning child applications;
7236 controlling them; and responding to expected patterns in their output.
7237 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
7238 child application and control it as if a human were typing commands.")
7239 (license license:isc)))
7240
7241 (define-public python2-pexpect
7242 (package-with-python2 python-pexpect))
7243
7244 (define-public python-setuptools-scm
7245 (package
7246 (name "python-setuptools-scm")
7247 (version "3.4.3")
7248 (source (origin
7249 (method url-fetch)
7250 (uri (pypi-uri "setuptools_scm" version))
7251 (sha256
7252 (base32
7253 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
7254 (build-system python-build-system)
7255 (home-page "https://github.com/pypa/setuptools_scm/")
7256 (synopsis "Manage Python package versions in SCM metadata")
7257 (description
7258 "Setuptools_scm handles managing your Python package versions in
7259 @dfn{software configuration management} (SCM) metadata instead of declaring
7260 them as the version argument or in a SCM managed file.")
7261 (license license:expat)))
7262
7263 ;; TODO: Merge with 'python-setuptools-scm' on the next rebuild cycle.
7264 (define-public python-setuptools-scm/next
7265 (package
7266 (inherit python-setuptools-scm)
7267 (version "5.0.1")
7268 (source
7269 (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "setuptools_scm" version))
7272 (sha256
7273 (base32 "0ahlrxxkx2xhmxskx57gc96w3bdndflxx30304ihvm7ds136nny8"))))))
7274
7275 (define-public python2-setuptools-scm
7276 (package-with-python2 python-setuptools-scm))
7277
7278 (define-public python-sexpdata
7279 (package
7280 (name "python-sexpdata")
7281 (version "0.0.3")
7282 (source
7283 (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "sexpdata" version))
7286 (sha256
7287 (base32
7288 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
7289 (build-system python-build-system)
7290 (home-page "https://github.com/jd-boyd/sexpdata")
7291 (synopsis "S-expression parser for Python")
7292 (description
7293 "Sexpdata is an S-expression parser/serializer. It has load and dump
7294 functions like pickle, json or PyYAML module.")
7295 (license license:bsd-3)))
7296
7297 (define-public python-pathlib2
7298 (package
7299 (name "python-pathlib2")
7300 (version "2.3.3")
7301 (source
7302 (origin
7303 (method url-fetch)
7304 (uri (pypi-uri "pathlib2" version))
7305 (sha256
7306 (base32
7307 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
7308 (build-system python-build-system)
7309 (propagated-inputs
7310 `(("python-scandir" ,python-scandir)
7311 ("python-six" ,python-six)))
7312 (home-page "https://pypi.org/project/pathlib2/")
7313 (synopsis "Object-oriented file system paths")
7314 (description "The goal of pathlib2 is to provide a backport of the
7315 standard @code{pathlib} module which tracks the standard library module, so
7316 all the newest features of the standard @code{pathlib} can be used also on
7317 older Python versions.")
7318 (license license:expat)))
7319
7320 (define-public python-importlib-resources
7321 (package
7322 (name "python-importlib-resources")
7323 (version "3.0.0")
7324 (source
7325 (origin
7326 (method url-fetch)
7327 (uri (pypi-uri "importlib_resources" version))
7328 (sha256
7329 (base32
7330 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
7331 (build-system python-build-system)
7332 (native-inputs
7333 `(("python-setuptools-scm" ,python-setuptools-scm)
7334 ("python-toml" ,python-toml)))
7335 (home-page "http://importlib-resources.readthedocs.io/")
7336 (synopsis "Read resources from Python packages")
7337 (description
7338 "@code{importlib_resources} is a backport of Python 3's standard library
7339 @code{importlib.resources} module for Python 2.7, and Python 3.")
7340 (properties `((python2-variant . ,(delay python2-importlib-resources))))
7341 (license license:asl2.0)))
7342
7343 (define-public python2-importlib-resources
7344 (package
7345 (name "python2-importlib-resources")
7346 (version "1.0.2")
7347 (source (origin
7348 (method url-fetch)
7349 (uri (pypi-uri "importlib_resources" version))
7350 (sha256
7351 (base32
7352 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
7353 (build-system python-build-system)
7354 (arguments
7355 `(#:python ,python-2
7356 #:phases (modify-phases %standard-phases
7357 ;; The build system tests for python-wheel, but it is
7358 ;; not required for Guix nor the test suite. Just drop
7359 ;; it to make bootstrapping pytest easier.
7360 (add-after 'unpack 'drop-wheel-dependency
7361 (lambda _
7362 (substitute* "setup.cfg"
7363 (("^[[:blank:]]+wheel")
7364 ""))
7365 #t)))))
7366 (propagated-inputs
7367 `(("python-pathlib2" ,python2-pathlib2)
7368 ("python-typing" ,python2-typing)))
7369 (home-page "https://gitlab.com/python-devs/importlib_resources")
7370 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
7371 (description
7372 "This package provides an implementation of @code{importlib.resources}
7373 for older versions of Python.")
7374 (license license:asl2.0)))
7375
7376 ;; For importlib-metadata-bootstrap below.
7377 (define-public python2-importlib-resources-bootstrap
7378 (hidden-package
7379 (package/inherit
7380 python2-importlib-resources
7381 (name "python2-importlib-resources-bootstrap")
7382 (propagated-inputs
7383 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
7384 ("python-typing" ,python2-typing))))))
7385
7386 (define-public python-importlib-metadata
7387 (package
7388 (name "python-importlib-metadata")
7389 (version "1.5.0")
7390 (source
7391 (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "importlib_metadata" version))
7394 (sha256
7395 (base32
7396 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
7397 (build-system python-build-system)
7398 (propagated-inputs
7399 `(("python-zipp" ,python-zipp)))
7400 (native-inputs
7401 `(("python-setuptools-scm" ,python-setuptools-scm)
7402 ("python-pyfakefs" ,python-pyfakefs)
7403 ("python-packaging" ,python-packaging)))
7404 (home-page "https://importlib-metadata.readthedocs.io/")
7405 (synopsis "Read metadata from Python packages")
7406 (description
7407 "@code{importlib_metadata} is a library which provides an API for
7408 accessing an installed Python package's metadata, such as its entry points or
7409 its top-level name. This functionality intends to replace most uses of
7410 @code{pkg_resources} entry point API and metadata API. Along with
7411 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
7412 need to use the older and less efficient @code{pkg_resources} package.")
7413 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
7414 (license license:asl2.0)))
7415
7416 (define-public python2-importlib-metadata
7417 (let ((base (package-with-python2 (strip-python2-variant
7418 python-importlib-metadata))))
7419 (package/inherit
7420 base
7421 (name "python2-importlib-metadata")
7422 (native-inputs
7423 `(("python-setuptools-scm" ,python2-setuptools-scm)
7424 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
7425 ("python-packaging" ,python2-packaging-bootstrap)))
7426 (propagated-inputs
7427 `(("python-configparser" ,python2-configparser)
7428 ("python-contextlib2" ,python2-contextlib2)
7429 ("python-importlib-resources" ,python2-importlib-resources)
7430 ("python-pathlib2" ,python2-pathlib2)
7431 ,@(package-propagated-inputs base))))))
7432
7433 ;; This package is used by python2-pytest, and thus must not depend on it.
7434 (define-public python2-importlib-metadata-bootstrap
7435 (hidden-package
7436 (package/inherit
7437 python2-importlib-metadata
7438 (name "python2-importlib-metadata-bootstrap")
7439 (arguments
7440 `(#:tests? #f
7441 ,@(package-arguments python2-importlib-metadata)))
7442 (propagated-inputs
7443 `(("python-zipp" ,python2-zipp-bootstrap)
7444 ("python-pathlib2" ,python2-pathlib2-bootstrap)
7445 ("python-configparser" ,python2-configparser)
7446 ("python-contextlib2" ,python2-contextlib2-bootstrap)
7447 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
7448
7449 (define-public python-importmagic
7450 (package
7451 (name "python-importmagic")
7452 (version "0.1.7")
7453 (source
7454 (origin
7455 (method url-fetch)
7456 (uri (pypi-uri "importmagic" version))
7457 (sha256
7458 (base32
7459 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
7460 (build-system python-build-system)
7461 (home-page "https://github.com/alecthomas/importmagic")
7462 (synopsis "Library for adding, removing and managing Python imports")
7463 (description
7464 "Importmagic is a Python library for automatically managing imports by
7465 finding unresolved symbols in Python code and their corresponding imports.")
7466 (license license:bsd-3)))
7467
7468 (define-public python-inotify-simple
7469 (package
7470 (name "python-inotify-simple")
7471 (version "1.3.5")
7472 (source
7473 (origin
7474 (method git-fetch)
7475 (uri (git-reference
7476 (url "https://github.com/chrisjbillington/inotify_simple")
7477 (commit version)))
7478 (file-name (git-file-name name version))
7479 (sha256
7480 (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
7481 (build-system python-build-system)
7482 (home-page
7483 "https://github.com/chrisjbillington/inotify_simple")
7484 (synopsis "Simple wrapper around inotify library")
7485 (description
7486 "@code{inotify-simple} is a simple wrapper around inotify library.")
7487 (license license:bsd-3)))
7488
7489 (define-public python-jaraco-packaging
7490 (package
7491 (name "python-jaraco-packaging")
7492 (version "6.1")
7493 (source
7494 (origin
7495 (method url-fetch)
7496 (uri (pypi-uri "jaraco.packaging" version))
7497 (sha256
7498 (base32
7499 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
7500 (build-system python-build-system)
7501 (propagated-inputs
7502 `(("python-pytest" ,python-pytest)
7503 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
7504 ("python-pytest-flake8" ,python-pytest-flake8)
7505 ("python-rst.linker" ,python-rst.linker)
7506 ("python-setuptools" ,python-setuptools)
7507 ("python-setuptools-scm" ,python-setuptools-scm)
7508 ("python-six" ,python-six)
7509 ("python-sphinx" ,python-sphinx)))
7510 (home-page "https://github.com/jaraco/jaraco.packaging")
7511 (synopsis "Tools to supplement packaging Python releases")
7512 (description
7513 "This package provides various tools to supplement packaging Python
7514 releases.")
7515 (license license:expat)))
7516
7517 (define-public python-pathpy
7518 (package
7519 (name "python-pathpy")
7520 (version "11.5.1")
7521 (source
7522 (origin
7523 (method url-fetch)
7524 (uri (pypi-uri "path.py" version))
7525 (sha256
7526 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
7527 (outputs '("out" "doc"))
7528 (build-system python-build-system)
7529 (propagated-inputs
7530 `(("python-appdirs" ,python-appdirs)
7531 ("python-importlib-metadata" ,python-importlib-metadata)))
7532 (native-inputs
7533 `(("python-setuptools-scm" ,python-setuptools-scm)
7534 ("python-sphinx" ,python-sphinx)
7535 ("python-rst.linker" ,python-rst.linker)
7536 ("python-pytest" ,python-pytest)
7537 ("python-pytest-runner" ,python-pytest-runner)
7538 ("python-jaraco-packaging" ,python-jaraco-packaging)))
7539 (arguments
7540 `(#:phases
7541 (modify-phases %standard-phases
7542 (add-after 'build 'build-doc
7543 (lambda _
7544 (setenv "LANG" "en_US.UTF-8")
7545 (invoke "python" "setup.py" "build_sphinx")))
7546 (add-after 'install 'install-doc
7547 (lambda* (#:key outputs #:allow-other-keys)
7548 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
7549 (doc (string-append data "/doc/" ,name "-" ,version))
7550 (html (string-append doc "/html")))
7551 (mkdir-p html)
7552 (for-each (lambda (file)
7553 (copy-file file (string-append doc "/" file)))
7554 '("README.rst" "CHANGES.rst"))
7555 (copy-recursively "build/sphinx/html" html)
7556 #t)))
7557 (replace 'check
7558 (lambda _
7559 ;; The import time test aborts if an import takes longer than
7560 ;; 100ms. It may very well take a little longer than that.
7561 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
7562 (home-page "https://github.com/jaraco/path.py")
7563 (synopsis "Python module wrapper for built-in os.path")
7564 (description
7565 "@code{path.py} implements path objects as first-class entities, allowing
7566 common operations on files to be invoked on those path objects directly.")
7567 (license license:expat)))
7568
7569 (define-public python-simplegeneric
7570 (package
7571 (name "python-simplegeneric")
7572 (version "0.8.1")
7573 (source
7574 (origin
7575 (method url-fetch)
7576 (uri (pypi-uri "simplegeneric" version ".zip"))
7577 (sha256
7578 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
7579 (build-system python-build-system)
7580 (native-inputs
7581 `(("unzip" ,unzip)))
7582 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
7583 (synopsis "Python module for simple generic functions")
7584 (description
7585 "The simplegeneric module lets you define simple single-dispatch generic
7586 functions, akin to Python’s built-in generic functions like @code{len()},
7587 @code{iter()} and so on. However, instead of using specially-named methods,
7588 these generic functions use simple lookup tables, akin to those used by
7589 e.g. @code{pickle.dump()} and other generic functions found in the Python
7590 standard library.")
7591 (license license:zpl2.1)))
7592
7593 (define-public python2-simplegeneric
7594 (package-with-python2 python-simplegeneric))
7595
7596 (define-public python-ipython-genutils
7597 ;; TODO: This package is retired, check if can be removed, see description.
7598 (package
7599 (name "python-ipython-genutils")
7600 (version "0.1.0")
7601 (source
7602 (origin
7603 (method url-fetch)
7604 (uri (pypi-uri "ipython_genutils" version))
7605 (sha256
7606 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
7607 (build-system python-build-system)
7608 (arguments `(#:tests? #f)) ; no tests
7609 (home-page "https://ipython.org")
7610 (synopsis "Vestigial utilities from IPython")
7611 (description
7612 "This package provides retired utilities from IPython. No packages
7613 outside IPython/Jupyter should depend on it.
7614
7615 This package shouldn't exist. It contains some common utilities shared by
7616 Jupyter and IPython projects during The Big Split. As soon as possible, those
7617 packages will remove their dependency on this, and this package will go
7618 away.")
7619 (license license:bsd-3)))
7620
7621 (define-public python2-ipython-genutils
7622 (package-with-python2 python-ipython-genutils))
7623
7624 (define-public python-ipyparallel
7625 (package
7626 (name "python-ipyparallel")
7627 (version "6.2.4")
7628 (source
7629 (origin
7630 (method url-fetch)
7631 (uri (pypi-uri "ipyparallel" version))
7632 (sha256
7633 (base32
7634 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
7635 (build-system python-build-system)
7636 (arguments
7637 `(#:tests? #f ; RuntimeError: IO Loop failed to start
7638 #:phases
7639 (modify-phases %standard-phases
7640 (add-before 'check 'prepare-for-tests
7641 (lambda _
7642 (setenv "HOME" (getcwd))
7643 #t)))))
7644 (propagated-inputs
7645 `(("python-dateutil" ,python-dateutil)
7646 ("python-decorator" ,python-decorator)
7647 ("python-ipykernel" ,python-ipykernel)
7648 ("python-ipython" ,python-ipython)
7649 ("python-ipython-genutils" ,python-ipython-genutils)
7650 ("python-jupyter-client" ,python-jupyter-client)
7651 ("python-pyzmq" ,python-pyzmq)
7652 ("python-tornado" ,python-tornado)
7653 ("python-traitlets" ,python-traitlets)))
7654 (native-inputs
7655 `(("python-ipython" ,python-ipython)
7656 ("python-mock" ,python-mock)
7657 ("python-nose" ,python-nose)
7658 ("python-pytest" ,python-pytest)
7659 ("python-pytest-cov" ,python-pytest-cov)
7660 ("python-testpath" ,python-testpath)))
7661 (home-page "https://ipython.org/")
7662 (synopsis "Interactive Parallel Computing with IPython")
7663 (description
7664 "@code{ipyparallel} is a Python package and collection of CLI scripts for
7665 controlling clusters for Jupyter. @code{ipyparallel} contains the following
7666 CLI scripts:
7667 @enumerate
7668 @item ipcluster - start/stop a cluster
7669 @item ipcontroller - start a scheduler
7670 @item ipengine - start an engine
7671 @end enumerate")
7672 (license license:bsd-3)))
7673
7674 (define-public python-ipython-cluster-helper
7675 (package
7676 (name "python-ipython-cluster-helper")
7677 (version "0.6.4")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "ipython-cluster-helper" version))
7682 (sha256
7683 (base32
7684 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
7685 (modules '((guix build utils)))
7686 (snippet
7687 '(begin (substitute* "requirements.txt"
7688 (("ipython.*") "ipython\n"))
7689 #t))))
7690 (build-system python-build-system)
7691 (arguments
7692 `(#:tests? #f ; Test suite can't find IPython.
7693 #:phases
7694 (modify-phases %standard-phases
7695 (replace 'check
7696 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7697 (if tests?
7698 (begin
7699 (setenv "HOME" (getcwd))
7700 (add-installed-pythonpath inputs outputs)
7701 (invoke "python" "example/example.py" "--local"))
7702 #t))))))
7703 (propagated-inputs
7704 `(("python-ipyparallel" ,python-ipyparallel)
7705 ("python-ipython" ,python-ipython)
7706 ("python-netifaces" ,python-netifaces)
7707 ("python-pyzmq" ,python-pyzmq)
7708 ("python-setuptools" ,python-setuptools)
7709 ("python-six" ,python-six)))
7710 (home-page "https://github.com/roryk/ipython-cluster-helper")
7711 (synopsis
7712 "Simplify IPython cluster start up and use for multiple schedulers")
7713 (description
7714 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
7715 profile, launches a cluster and returns a view. On program exit it shuts the
7716 cluster down and deletes the throwaway profile.")
7717 (license license:expat)))
7718
7719 (define-public python-traitlets
7720 (package
7721 (name "python-traitlets")
7722 (version "4.3.3")
7723 (source
7724 (origin
7725 (method url-fetch)
7726 (uri (pypi-uri "traitlets" version))
7727 (sha256
7728 (base32
7729 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
7730 (build-system python-build-system)
7731 (arguments
7732 `(#:phases
7733 (modify-phases %standard-phases
7734 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
7735 (propagated-inputs
7736 `(("python-ipython-genutils" ,python-ipython-genutils)
7737 ("python-decorator" ,python-decorator)
7738 ("python-six" ,python-six)))
7739 (native-inputs
7740 `(("python-pytest" ,python-pytest)))
7741 (properties `((python2-variant . ,(delay python2-traitlets))))
7742 (home-page "https://ipython.org")
7743 (synopsis "Configuration system for Python applications")
7744 (description
7745 "Traitlets is a framework that lets Python classes have attributes with
7746 type checking, dynamically calculated default values, and ‘on change’
7747 callbacks. The package also includes a mechanism to use traitlets for
7748 configuration, loading values from files or from command line arguments. This
7749 is a distinct layer on top of traitlets, so you can use traitlets in your code
7750 without using the configuration machinery.")
7751 (license license:bsd-3)))
7752
7753 (define-public python2-traitlets
7754 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
7755 (package/inherit traitlets
7756 (propagated-inputs
7757 `(("python2-enum34" ,python2-enum34)
7758 ,@(package-propagated-inputs traitlets))))))
7759
7760 (define-public python-jupyter-core
7761 (package
7762 (name "python-jupyter-core")
7763 (version "4.7.1")
7764 (source
7765 (origin
7766 (method url-fetch)
7767 (uri (string-append (pypi-uri "jupyter_core" version)))
7768 (sha256
7769 (base32
7770 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
7771 (build-system python-build-system)
7772 (arguments
7773 `(#:phases
7774 (modify-phases %standard-phases
7775 (replace 'check
7776 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7777 (when tests?
7778 ; Some tests write to $HOME.
7779 (setenv "HOME" "/tmp")
7780 ; Some tests load the installed package.
7781 (add-installed-pythonpath inputs outputs)
7782 (invoke "pytest" "-vv"))))
7783 (add-after 'unpack 'patch-testsuite
7784 (lambda _
7785 ;; test_not_on_path() and test_path_priority() try to run a test
7786 ;; that loads jupyter_core, so we need PYTHONPATH
7787 (substitute* "jupyter_core/tests/test_command.py"
7788 (("env = \\{'PATH': ''\\}")
7789 "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}")
7790 (("env = \\{'PATH': str\\(b\\)\\}")
7791 "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}"))
7792 #t))
7793 ;; Migration is running whenever etc/jupyter exists, but the
7794 ;; Guix-managed directory will never contain any migratable IPython
7795 ;; config files and cannot be written to anyway, so just pretend we
7796 ;; already did that.
7797 (add-after 'install 'disable-migration
7798 (lambda* (#:key outputs #:allow-other-keys)
7799 (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
7800 (invoke "touch"
7801 (string-append
7802 (assoc-ref outputs "out")
7803 "/etc/jupyter/migrated")))))))
7804 (propagated-inputs
7805 `(("python-traitlets" ,python-traitlets)))
7806 (native-inputs
7807 `(("python-six" ,python-six)
7808 ("python-pytest" ,python-pytest)))
7809 ;; This package provides the `jupyter` binary and thus also exports the
7810 ;; search paths.
7811 (native-search-paths
7812 (list (search-path-specification
7813 (variable "JUPYTER_CONFIG_DIR")
7814 (files '("etc/jupyter")))
7815 (search-path-specification
7816 (variable "JUPYTER_PATH")
7817 (files '("share/jupyter")))))
7818 (home-page "https://jupyter.org/")
7819 (synopsis "Jupyter base package")
7820 (description
7821 "Jupyter core is the base package on which Jupyter projects rely.")
7822 (license license:bsd-3)))
7823
7824 (define-public python-jupyter-client
7825 (package
7826 (name "python-jupyter-client")
7827 (version "6.1.12")
7828 (source
7829 (origin
7830 (method url-fetch)
7831 (uri (pypi-uri "jupyter_client" version))
7832 (sha256
7833 (base32
7834 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
7835 (build-system python-build-system)
7836 (arguments
7837 `(#:phases
7838 (modify-phases %standard-phases
7839 (add-after 'unpack 'set-tool-file-names
7840 (lambda* (#:key inputs #:allow-other-keys)
7841 (let ((iproute (assoc-ref inputs "iproute")))
7842 (substitute* "jupyter_client/localinterfaces.py"
7843 (("'ip'")
7844 (string-append "'" iproute "/sbin/ip'")))
7845 #t)))
7846 (replace 'check
7847 (lambda* (#:key tests? #:allow-other-keys)
7848 (when tests?
7849 ;; Some tests try to write to $HOME.
7850 (setenv "HOME" "/tmp")
7851 (invoke "pytest" "-vv")))))))
7852 (inputs
7853 `(("iproute" ,iproute)))
7854 (propagated-inputs
7855 `(("python-dateutil" ,python-dateutil)
7856 ("python-jupyter-core" ,python-jupyter-core)
7857 ("python-pyzmq" ,python-pyzmq)
7858 ("python-tornado" ,python-tornado-6)
7859 ("python-traitlets" ,python-traitlets)))
7860 (native-inputs
7861 `(("python-pytest" ,python-pytest)
7862 ("python-pytest-asyncio" ,python-pytest-asyncio)
7863 ("python-pytest-timeout" ,python-pytest-timeout)
7864 ("python-async-generator" ,python-async-generator)
7865 ("python-mock" ,python-mock)
7866 ("python-msgpack" ,python-msgpack)
7867 ("python-ipython" ,python-ipython)
7868 ("python-ipykernel" ,python-ipykernel-bootstrap)))
7869 (home-page "https://jupyter.org/")
7870 (synopsis "Jupyter protocol implementation and client libraries")
7871 (description
7872 "The @code{jupyter_client} package contains the reference implementation
7873 of the Jupyter protocol. It also provides client and kernel management APIs
7874 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7875 installing @code{kernelspec}s for use with Jupyter frontends.")
7876 (license license:bsd-3)))
7877
7878 ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
7879 ;; and jupyter-client by removing the former from its native-inputs and
7880 ;; disabling tests.
7881 (define-public python-jupyter-client-bootstrap
7882 (let ((base python-jupyter-client))
7883 (hidden-package
7884 (package
7885 (inherit base)
7886 (name "python-jupyter-client-bootstrap")
7887 (arguments
7888 `(#:tests? #f
7889 ,@(package-arguments base)))
7890 (native-inputs `())))))
7891
7892 (define-public python-ipykernel
7893 (package
7894 (name "python-ipykernel")
7895 (version "5.5.3")
7896 (source
7897 (origin
7898 (method url-fetch)
7899 (uri (pypi-uri "ipykernel" version))
7900 (sha256
7901 (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
7902 (build-system python-build-system)
7903 (arguments
7904 `(#:phases
7905 (modify-phases %standard-phases
7906 (replace 'check
7907 (lambda _
7908 (setenv "HOME" "/tmp")
7909 (invoke "pytest" "-v")
7910 #t))
7911 (add-after 'install 'set-python-file-name
7912 (lambda* (#:key outputs #:allow-other-keys)
7913 ;; Record the absolute file name of the 'python' executable in
7914 ;; 'kernel.json'.
7915 (let ((out (assoc-ref outputs "out")))
7916 (substitute* (string-append out "/share/jupyter"
7917 "/kernels/python3/kernel.json")
7918 (("\"python\"")
7919 (string-append "\"" (which "python") "\"")))
7920 #t))))))
7921 (propagated-inputs
7922 `(("python-ipython" ,python-ipython)
7923 ("python-tornado" ,python-tornado-6)
7924 ("python-traitlets" ,python-traitlets)
7925 ;; imported at runtime during connect
7926 ("python-jupyter-client" ,python-jupyter-client)))
7927 (native-inputs
7928 `(("python-flaky" ,python-flaky)
7929 ("python-nose" ,python-nose)
7930 ("python-pytest" ,python-pytest)))
7931 (home-page "https://ipython.org")
7932 (synopsis "IPython Kernel for Jupyter")
7933 (description
7934 "This package provides the IPython kernel for Jupyter.")
7935 (license license:bsd-3)))
7936
7937 ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
7938 ;; break the cycle between ipykernel and jupyter-client.
7939 (define-public python-ipykernel-bootstrap
7940 (let ((parent python-ipykernel))
7941 (hidden-package
7942 (package
7943 (inherit parent)
7944 (name "python-ipykernel-bootstrap")
7945 (propagated-inputs
7946 `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
7947 ,@(fold alist-delete (package-propagated-inputs parent)
7948 '("python-jupyter-client"))))))))
7949
7950 (define-public python-pari-jupyter
7951 (package
7952 (name "python-pari-jupyter")
7953 (version "1.3.2")
7954 (source
7955 (origin
7956 (method url-fetch)
7957 (uri (pypi-uri "pari_jupyter" version))
7958 (sha256
7959 (base32
7960 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7961 (build-system python-build-system)
7962 (propagated-inputs
7963 `(("python-ipykernel" ,python-ipykernel)))
7964 (inputs
7965 `(("pari-gp" ,pari-gp)
7966 ("readline" ,readline)))
7967 (arguments
7968 `(#:tests? #f)) ; no test suite
7969 (home-page
7970 "https://github.com/jdemeyer/pari_jupyter")
7971 (synopsis "A Jupyter kernel for PARI/GP")
7972 (description "The package provides a PARI/GP kernel for Jupyter.")
7973 (license license:gpl3+)))
7974
7975 (define-public python-backcall
7976 (package
7977 (name "python-backcall")
7978 (version "0.2.0")
7979 (source
7980 (origin
7981 (method url-fetch)
7982 (uri (pypi-uri "backcall" version))
7983 (sha256
7984 (base32
7985 "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
7986 (build-system python-build-system)
7987 (home-page "https://github.com/takluyver/backcall/")
7988 (synopsis "Specifications for callback functions passed in to an API")
7989 (description
7990 "If your code lets other people supply callback functions, it's important
7991 to specify the function signature you expect, and check that functions support
7992 that. Adding extra parameters later would break other peoples code unless
7993 you're careful. The @code{backcall} package provides a way of specifying the
7994 callback signature using a prototype function.")
7995 (license license:bsd-3)))
7996
7997 (define-public python-ipython
7998 (package
7999 (name "python-ipython")
8000 (version "7.9.0")
8001 (source
8002 (origin
8003 (method url-fetch)
8004 (uri (pypi-uri "ipython" version ".tar.gz"))
8005 (sha256
8006 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
8007 (build-system python-build-system)
8008 (propagated-inputs
8009 `(("python-backcall" ,python-backcall)
8010 ("python-pyzmq" ,python-pyzmq)
8011 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
8012 ("python-terminado" ,python-terminado)
8013 ("python-matplotlib" ,python-matplotlib)
8014 ("python-numpy" ,python-numpy)
8015 ("python-numpydoc" ,python-numpydoc)
8016 ("python-jedi" ,python-jedi)
8017 ("python-jinja2" ,python-jinja2)
8018 ("python-mistune" ,python-mistune)
8019 ("python-pexpect" ,python-pexpect)
8020 ("python-pickleshare" ,python-pickleshare)
8021 ("python-simplegeneric" ,python-simplegeneric)
8022 ("python-jsonschema" ,python-jsonschema)
8023 ("python-traitlets" ,python-traitlets)
8024 ("python-nbformat" ,python-nbformat)
8025 ("python-pygments" ,python-pygments)))
8026 (inputs
8027 `(("readline" ,readline)
8028 ("which" ,which)))
8029 (native-inputs
8030 `(("graphviz" ,graphviz)
8031 ("pkg-config" ,pkg-config)
8032 ("python-requests" ,python-requests) ;; for tests
8033 ("python-testpath" ,python-testpath)
8034 ("python-nose" ,python-nose)))
8035 (arguments
8036 `(#:phases
8037 (modify-phases %standard-phases
8038 (add-after 'unpack 'make-docs-reproducible
8039 (lambda _
8040 (substitute* "IPython/sphinxext/ipython_directive.py"
8041 ((".*import datetime") "")
8042 ((".*datetime.datetime.now\\(\\)") "")
8043 (("%timeit") "# %timeit"))
8044 #t))
8045 ;; Tests can only be run after the library has been installed and not
8046 ;; within the source directory.
8047 (delete 'check)
8048 (add-after 'install 'check
8049 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
8050 (if tests?
8051 (begin
8052 ;; Make installed package available for running the tests
8053 (add-installed-pythonpath inputs outputs)
8054 (setenv "HOME" "/tmp/") ;; required by a test
8055 ;; We only test the core because one of the other tests
8056 ;; tries to import ipykernel.
8057 (invoke "python" "IPython/testing/iptest.py"
8058 "-v" "IPython/core/tests"))
8059 #t)))
8060 (add-before 'check 'fix-tests
8061 (lambda* (#:key inputs #:allow-other-keys)
8062 (substitute* "./IPython/utils/_process_posix.py"
8063 (("/usr/bin/env', 'which") (which "which")))
8064 (substitute* "./IPython/core/tests/test_inputtransformer.py"
8065 (("#!/usr/bin/env python")
8066 (string-append "#!" (which "python"))))
8067 ;; This test introduces a circular dependency on ipykernel
8068 ;; (which depends on ipython).
8069 (delete-file "IPython/core/tests/test_display.py")
8070 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
8071 (delete-file "IPython/core/tests/test_interactiveshell.py")
8072 #t)))))
8073 (home-page "https://ipython.org")
8074 (synopsis "IPython is a tool for interactive computing in Python")
8075 (description
8076 "IPython provides a rich architecture for interactive computing with:
8077 Powerful interactive shells, a browser-based notebook, support for interactive
8078 data visualization, embeddable interpreters and tools for parallel
8079 computing.")
8080 (license license:bsd-3)))
8081
8082 (define-public python-ipython-documentation
8083 (package
8084 (inherit python-ipython)
8085 (name "python-ipython-documentation")
8086 (version (package-version python-ipython))
8087 (arguments
8088 `(#:phases
8089 (modify-phases %standard-phases
8090 (delete 'build)
8091 (delete 'check)
8092 (replace 'install
8093 (lambda* (#:key outputs #:allow-other-keys)
8094 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
8095 (doc (string-append data "/doc/" ,name "-" ,version))
8096 (html (string-append doc "/html"))
8097 (man1 (string-append data "/man/man1"))
8098 (info (string-append data "/info"))
8099 (examples (string-append doc "/examples"))
8100 (python-arg (string-append "PYTHON=" (which "python"))))
8101 (setenv "LANG" "en_US.utf8")
8102 (with-directory-excursion "docs"
8103 ;; FIXME: pdf fails to build
8104 ;;(system* "make" "pdf" "PAPER=a4")
8105 (system* "make" python-arg "html")
8106 ;; FIXME: the generated texi file contains ^@^@, which trips
8107 ;; up the parser.
8108 ;; (system* "make" python-arg "info")
8109 )
8110 (copy-recursively "docs/man" man1)
8111 (copy-recursively "examples" examples)
8112 (copy-recursively "docs/build/html" html)
8113 ;; (copy-file "docs/build/latex/ipython.pdf"
8114 ;; (string-append doc "/ipython.pdf"))
8115 (mkdir-p info)
8116 ;; (copy-file "docs/build/texinfo/ipython.info"
8117 ;; (string-append info "/ipython.info"))
8118 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
8119 #t)))))
8120 (inputs
8121 `(("python-ipython" ,python-ipython)
8122 ("python-ipykernel" ,python-ipykernel)))
8123 (native-inputs
8124 `(("python-sphinx" ,python-sphinx)
8125 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
8126 ;; FIXME: It's possible that a smaller union would work just as well.
8127 ("texlive" ,(texlive-union (list texlive-amsfonts/patched
8128 texlive-fonts-ec
8129 texlive-generic-ifxetex
8130 texlive-generic-pdftex
8131 texlive-latex-capt-of
8132 texlive-latex-cmap
8133 texlive-latex-environ
8134 texlive-latex-eqparbox
8135 texlive-latex-etoolbox
8136 texlive-latex-expdlist
8137 texlive-latex-fancyhdr
8138 texlive-latex-fancyvrb
8139 texlive-latex-fncychap
8140 texlive-latex-float
8141 texlive-latex-framed
8142 texlive-latex-geometry
8143 texlive-latex-graphics
8144 texlive-latex-hyperref
8145 texlive-latex-mdwtools
8146 texlive-latex-multirow
8147 texlive-latex-needspace
8148 texlive-latex-oberdiek
8149 texlive-latex-parskip
8150 texlive-latex-preview
8151 texlive-latex-tabulary
8152 texlive-latex-threeparttable
8153 texlive-latex-titlesec
8154 texlive-latex-trimspaces
8155 texlive-latex-ucs
8156 texlive-latex-upquote
8157 texlive-latex-url
8158 texlive-latex-varwidth
8159 texlive-latex-wrapfig)))
8160 ("texinfo" ,texinfo)))))
8161
8162 (define-public python-urwid
8163 (package
8164 (name "python-urwid")
8165 (version "2.1.2")
8166 (source
8167 (origin
8168 (method url-fetch)
8169 (uri (pypi-uri "urwid" version))
8170 (sha256
8171 (base32
8172 "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
8173 (build-system python-build-system)
8174 (home-page "http://urwid.org")
8175 (synopsis "Console user interface library for Python")
8176 (description
8177 "Urwid is a curses-based UI/widget library for Python. It includes many
8178 features useful for text console applications.")
8179 (properties `((python2-variant . ,(delay python2-urwid))))
8180 (license license:lgpl2.1+)))
8181
8182 (define-public python2-urwid
8183 (let ((base (package-with-python2
8184 (strip-python2-variant python-urwid))))
8185 (package
8186 (inherit base)
8187 (version "2.1.0")
8188 (source
8189 (origin
8190 (method url-fetch)
8191 (uri (pypi-uri "urwid" version))
8192 (sha256
8193 (base32
8194 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
8195
8196 (define-public python-urwid-readline
8197 (package
8198 (name "python-urwid-readline")
8199 (version "0.12")
8200 (source
8201 (origin
8202 (method git-fetch)
8203 (uri (git-reference
8204 (url "https://github.com/rr-/urwid_readline")
8205 (commit version)))
8206 (file-name (git-file-name name version))
8207 (sha256
8208 (base32
8209 "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
8210 (build-system python-build-system)
8211 (arguments
8212 `(#:phases
8213 (modify-phases %standard-phases
8214 (replace 'check
8215 (lambda* (#:key tests? #:allow-other-keys)
8216 (when tests?
8217 (invoke "python" "-m" "pytest"))
8218 #t)))))
8219 (propagated-inputs
8220 `(("python-urwid" ,python-urwid)))
8221 (native-inputs
8222 `(("python-pytest" ,python-pytest)))
8223 (home-page "https://github.com/rr-/urwid_readline")
8224 (synopsis "Text input widget for urwid that supports readline shortcuts")
8225 (description
8226 "This package provides a textbox edit widget for @code{python-urwid} that
8227 supports @code{readline} shortcuts.")
8228 (license license:expat)))
8229
8230 (define-public python-textdistance
8231 (package
8232 (name "python-textdistance")
8233 (version "4.2.1")
8234 (source
8235 (origin
8236 ;; There are no tests in the PyPI tarball.
8237 (method git-fetch)
8238 (uri (git-reference
8239 (url "https://github.com/life4/textdistance")
8240 (commit (string-append "v." version))))
8241 (file-name (git-file-name name version))
8242 (sha256
8243 (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
8244 (build-system python-build-system)
8245 (arguments
8246 `(#:test-target "pytest"
8247 #:phases
8248 (modify-phases %standard-phases
8249 (add-after 'unpack 'delete-external-test
8250 (lambda _
8251 ;; All tests in this file require external libraries.
8252 (delete-file "tests/test_external.py")
8253 #t)))))
8254 (native-inputs
8255 `(("python-hypothesis" ,python-hypothesis)
8256 ("python-isort" ,python-isort)
8257 ("python-numpy" ,python-numpy)
8258 ("python-pytest" ,python-pytest)
8259 ("python-pytest-runner" ,python-pytest-runner)
8260 ("python-tabulate" ,python-tabulate)))
8261 (home-page "https://github.com/life4/textdistance")
8262 (synopsis "Compute distance between the two texts")
8263 (description "@code{textdistance} is a pure Python library for comparing
8264 distance between two or more sequences by many algorithms.")
8265 (license license:expat)))
8266
8267 (define-public python-urwidtrees
8268 (package
8269 (name "python-urwidtrees")
8270 (version "1.0.2")
8271 (source
8272 (origin
8273 (method git-fetch)
8274 ;; package author intends on distributing via github rather than pypi:
8275 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
8276 (uri (git-reference
8277 (url "https://github.com/pazz/urwidtrees")
8278 (commit version)))
8279 (file-name (git-file-name name version))
8280 (sha256
8281 (base32
8282 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
8283 (build-system python-build-system)
8284 (arguments
8285 '(#:use-setuptools? #f
8286 #:tests? #f)) ; no tests
8287 (propagated-inputs `(("python-urwid" ,python-urwid)))
8288 (home-page "https://github.com/pazz/urwidtrees")
8289 (synopsis "Tree widgets for urwid")
8290 (description "Urwidtrees is a Widget Container API for the @code{urwid}
8291 toolkit. Use it to build trees of widgets.")
8292 (license license:gpl3+)))
8293
8294 (define-public python2-urwidtrees
8295 (package-with-python2 python-urwidtrees))
8296
8297 (define-public python-ua-parser
8298 (package
8299 (name "python-ua-parser")
8300 (version "0.8.0")
8301 (source
8302 (origin
8303 (method url-fetch)
8304 (uri (pypi-uri "ua-parser" version))
8305 (sha256
8306 (base32
8307 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
8308 (build-system python-build-system)
8309 (arguments
8310 `(#:tests? #f)) ;no test suite in release
8311 (native-inputs
8312 `(("python-pyyaml" ,python-pyyaml)))
8313 (home-page "https://github.com/ua-parser/uap-python")
8314 (synopsis "User agent parser")
8315 (description
8316 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
8317 (license license:asl2.0)))
8318
8319 (define-public python2-ua-parser
8320 (package-with-python2 python-ua-parser))
8321
8322 (define-public python-user-agents
8323 (package
8324 (name "python-user-agents")
8325 (version "1.1.0")
8326 (source
8327 (origin
8328 (method url-fetch)
8329 (uri (pypi-uri "user-agents" version))
8330 (sha256
8331 (base32
8332 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
8333 (build-system python-build-system)
8334 (arguments
8335 `(#:tests? #f)) ;missing devices.json test file in release
8336 (propagated-inputs
8337 `(("python-ua-parser" ,python-ua-parser)))
8338 (home-page "https://github.com/selwin/python-user-agents")
8339 (synopsis "User Agent strings parsing library")
8340 (description
8341 "A library to identify devices (phones, tablets) and their capabilities by
8342 parsing (browser/HTTP) user agent strings.")
8343 (license license:expat)))
8344
8345 (define-public python2-user-agents
8346 (package-with-python2 python-user-agents))
8347
8348 (define-public python-dbus
8349 (package
8350 (name "python-dbus")
8351 (version "1.2.16")
8352 (source
8353 (origin
8354 (method url-fetch)
8355 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
8356 "dbus-python-" version ".tar.gz"))
8357 (sha256
8358 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
8359 (build-system gnu-build-system)
8360 (native-inputs
8361 `(("pkg-config" ,pkg-config)))
8362 (inputs
8363 `(("python" ,python-wrapper)
8364 ("dbus-glib" ,dbus-glib)))
8365 (synopsis "Python bindings for D-bus")
8366 (description "python-dbus provides bindings for libdbus, the reference
8367 implementation of D-Bus.")
8368 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
8369 (license license:expat)))
8370
8371 (define-public python2-dbus
8372 (package/inherit python-dbus
8373 (name "python2-dbus")
8374 (inputs `(("python" ,python-2)
8375 ,@(alist-delete "python"
8376 (package-inputs python-dbus)
8377 equal?)))))
8378
8379 (define-public python-notify2
8380 (package
8381 (name "python-notify2")
8382 (version "0.3.1")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "notify2" version))
8387 (sha256
8388 (base32
8389 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
8390 (build-system python-build-system)
8391 (arguments `(#:tests? #f)) ; tests depend on system state
8392 (native-inputs
8393 `(("python-dbus" ,python-dbus)))
8394 (home-page "https://bitbucket.org/takluyver/pynotify2")
8395 (synopsis "Python interface to D-Bus notifications")
8396 (description
8397 "Pynotify2 provides a Python interface for sending D-Bus notifications.
8398 It is a reimplementation of pynotify in pure Python, and an alternative to
8399 the GObject Introspection bindings to libnotify for non-GTK applications.")
8400 (license (list license:bsd-2
8401 license:lgpl2.1+))))
8402
8403 (define-public python2-notify2
8404 (package-with-python2 python-notify2))
8405
8406 ;; beautifulsoup4 has a totally different namespace than 3.x,
8407 ;; and pypi seems to put it under its own name, so I guess we should too
8408 (define-public python-beautifulsoup4
8409 (package
8410 (name "python-beautifulsoup4")
8411 (version "4.9.3")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "beautifulsoup4" version))
8416 (sha256
8417 (base32
8418 "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
8419 (build-system python-build-system)
8420 (arguments
8421 `(#:phases
8422 (modify-phases %standard-phases
8423 ;; The Python 2 source is the definitive source of beautifulsoup4. We
8424 ;; must use this conversion script when building with Python 3. The
8425 ;; conversion script also runs the tests.
8426 ;; For more information, see the file 'convert-py3k' in the source
8427 ;; distribution.
8428 (replace 'check
8429 (lambda _ (invoke "./convert-py3k"))))))
8430 (propagated-inputs
8431 `(("python-soupsieve" ,python-soupsieve)))
8432 (home-page
8433 "https://www.crummy.com/software/BeautifulSoup/bs4/")
8434 (synopsis
8435 "Python screen-scraping library")
8436 (description
8437 "Beautiful Soup is a Python library designed for rapidly setting up
8438 screen-scraping projects. It offers Pythonic idioms for navigating,
8439 searching, and modifying a parse tree, providing a toolkit for
8440 dissecting a document and extracting what you need. It automatically
8441 converts incoming documents to Unicode and outgoing documents to UTF-8.")
8442 (license license:expat)
8443 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
8444
8445 (define-public python2-beautifulsoup4
8446 (let ((base (package-with-python2
8447 (strip-python2-variant python-beautifulsoup4))))
8448 (package/inherit base
8449 (arguments `(#:python ,python-2)))))
8450
8451 (define-public python-soupsieve
8452 (package
8453 (name "python-soupsieve")
8454 (version "2.2.1")
8455 (source
8456 (origin
8457 (method url-fetch)
8458 (uri (pypi-uri "soupsieve" version))
8459 (sha256
8460 (base32
8461 "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
8462 (build-system python-build-system)
8463 (arguments `(#:tests? #f))
8464 ;;XXX: 2 tests fail currently despite claming they were to be
8465 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
8466 ;;don't want to create a circular dependency.
8467 (home-page "https://github.com/facelessuser/soupsieve")
8468 (synopsis "CSS selector library")
8469 (description
8470 "Soup Sieve is a CSS selector library designed to be used with Beautiful
8471 Soup 4. It aims to provide selecting, matching, and filtering using modern
8472 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
8473 specifications up through the latest CSS level 4 drafts and beyond (though
8474 some are not yet implemented).")
8475 (properties `((python2-variant . ,(delay python2-soupsieve))))
8476 (license license:expat)))
8477
8478 ;; This is the last version that supports python-2
8479 (define-public python2-soupsieve
8480 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
8481 (package
8482 (inherit base)
8483 (version "1.9.6")
8484 (source
8485 (origin
8486 (method url-fetch)
8487 (uri (pypi-uri "soupsieve" version))
8488 (sha256
8489 (base32
8490 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
8491 (propagated-inputs
8492 `(("python2-backports-functools-lru-cache"
8493 ,python2-backports-functools-lru-cache)
8494 ,@(package-propagated-inputs base))))))
8495
8496 (define-public python-netifaces
8497 (package
8498 (name "python-netifaces")
8499 (version "0.10.9")
8500 (source
8501 (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "netifaces" version))
8504 (sha256
8505 (base32
8506 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
8507 (build-system python-build-system)
8508 (home-page "https://github.com/al45tair/netifaces")
8509 (synopsis
8510 "Python module for portable network interface information")
8511 (description
8512 "Netifaces is a Python module providing information on network
8513 interfaces in an easy and portable manner.")
8514 (license license:expat)))
8515
8516 (define-public python2-netifaces
8517 (package-with-python2 python-netifaces))
8518
8519 (define-public python-networkx
8520 (package
8521 (name "python-networkx")
8522 (version "2.5.1")
8523 (source
8524 (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "networkx" version))
8527 (sha256
8528 (base32 "0ni3pdisdr8vfp5m9sw8jzr7jwzgqqmc9hq327vrf4n4ra2xb70h"))))
8529 (build-system python-build-system)
8530 (arguments
8531 '(#:phases (modify-phases %standard-phases
8532 (replace 'check
8533 (lambda* (#:key tests? #:allow-other-keys)
8534 (if tests?
8535 (invoke "pytest" "-vv" "--pyargs" "networkx")
8536 (format #t "test suite not run~%"))
8537 #t)))))
8538 ;; python-decorator is needed at runtime.
8539 (propagated-inputs
8540 `(("python-decorator" ,python-decorator)))
8541 (native-inputs
8542 `(("python-pytest" ,python-pytest)))
8543 (home-page "https://networkx.github.io/")
8544 (synopsis "Python module for creating and manipulating graphs and networks")
8545 (description
8546 "NetworkX is a Python package for the creation, manipulation, and study
8547 of the structure, dynamics, and functions of complex networks.")
8548 (properties `((python2-variant . ,(delay python2-networkx))))
8549 (license license:bsd-3)))
8550
8551 ;; NetworkX 2.2 is the last version with support for Python 2.
8552 (define-public python2-networkx
8553 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
8554 (package
8555 (inherit base)
8556 (version "2.2")
8557 (source (origin
8558 (method url-fetch)
8559 (uri (pypi-uri "networkx" version ".zip"))
8560 (sha256
8561 (base32
8562 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
8563 (arguments
8564 `(#:python ,python-2))
8565 (native-inputs
8566 `(("python-nose" ,python2-nose)
8567 ("unzip" ,unzip))))))
8568
8569 (define-public python-datrie
8570 (package
8571 (name "python-datrie")
8572 (version "0.8.2")
8573 (source
8574 (origin
8575 (method url-fetch)
8576 (uri (pypi-uri "datrie" version))
8577 (sha256
8578 (base32
8579 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
8580 (build-system python-build-system)
8581 (native-inputs
8582 `(("python-cython" ,python-cython)
8583 ("python-hypothesis" ,python-hypothesis)
8584 ("python-pytest" ,python-pytest)
8585 ("python-pytest-runner" ,python-pytest-runner)))
8586 (home-page "https://github.com/kmike/datrie")
8587 (synopsis "Fast, efficiently stored trie for Python")
8588 (description
8589 "This package provides a fast, efficiently stored trie implementation for
8590 Python.")
8591 (license license:lgpl2.1+)))
8592
8593 (define-public python-amply
8594 (package
8595 (name "python-amply")
8596 (version "0.1.4")
8597 (source
8598 (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "amply" version))
8601 (sha256
8602 (base32
8603 "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
8604 (build-system python-build-system)
8605 (propagated-inputs
8606 `(("python-docutils" ,python-docutils)
8607 ("python-pyparsing" ,python-pyparsing)))
8608 (native-inputs
8609 `(("python-setuptools-scm" ,python-setuptools-scm)))
8610 (home-page "https://github.com/willu47/amply")
8611 (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
8612 (description
8613 "Amply allows you to load and manipulate AMPL/GLPK data as Python data
8614 structures.")
8615 (license license:epl1.0)))
8616
8617 (define-public python-pulp
8618 (package
8619 (name "python-pulp")
8620 (version "2.4")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "PuLP" version))
8625 (sha256
8626 (base32
8627 "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
8628 (build-system python-build-system)
8629 (propagated-inputs
8630 `(("python-amply" ,python-amply)))
8631 (home-page "https://github.com/coin-or/pulp")
8632 (synopsis "Linear Programming modeler")
8633 (description
8634 "PuLP is a Linear Programming modeler written in Python. PuLP can
8635 generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
8636 solve linear problems.")
8637 (license license:expat)))
8638
8639 (define-public python-toposort
8640 (package
8641 (name "python-toposort")
8642 (version "1.6")
8643 (source
8644 (origin
8645 (method url-fetch)
8646 (uri (pypi-uri "toposort" version))
8647 (sha256
8648 (base32
8649 "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
8650 (build-system python-build-system)
8651 (home-page "https://gitlab.com/ericvsmith/toposort")
8652 (synopsis "Topological sort algorithm")
8653 (description
8654 "This package provides an implementation of a topological sort
8655 algorithm.")
8656 (license license:asl2.0)))
8657
8658 (define-public python-three-merge
8659 (package
8660 (name "python-three-merge")
8661 (version "0.1.1")
8662 (source
8663 (origin
8664 ;; There are no tests in the PyPI tarball.
8665 (method git-fetch)
8666 (uri (git-reference
8667 (url "https://github.com/spyder-ide/three-merge")
8668 (commit (string-append "v" version))))
8669 (file-name (git-file-name name version))
8670 (sha256
8671 (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
8672 (build-system python-build-system)
8673 (arguments
8674 `(#:test-target "pytest"))
8675 (propagated-inputs
8676 `(("python-diff-match-patch" ,python-diff-match-patch)))
8677 (native-inputs
8678 `(("python-flaky" ,python-flaky)
8679 ("python-pytest" ,python-pytest)
8680 ("python-pytest-cov" ,python-pytest-cov)
8681 ("python-pytest-runner" ,python-pytest-runner)
8682 ("python-pytest-timeout" ,python-pytest-timeout)))
8683 (home-page "https://github.com/spyder-ide/three-merge")
8684 (synopsis "Library for merging two strings with respect to a base one")
8685 (description
8686 "This package provides a Python library to perform a 3-way merge between
8687 strings, based on @code{diff-match-patch}. This library performs merges at a
8688 character level, as opposed to most VCS systems, which opt for a line-based
8689 approach.")
8690 (license license:expat)))
8691
8692 (define-public snakemake
8693 (package
8694 (name "snakemake")
8695 (version "5.32.2")
8696 (source
8697 (origin
8698 (method url-fetch)
8699 (uri (pypi-uri "snakemake" version))
8700 (sha256
8701 (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
8702 (build-system python-build-system)
8703 (arguments
8704 ;; TODO: Package missing test dependencies.
8705 '(#:tests? #f
8706 #:phases
8707 (modify-phases %standard-phases
8708 ;; For cluster execution Snakemake will call Python. Since there is
8709 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
8710 ;; this by calling the snakemake wrapper instead.
8711 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
8712 (lambda* (#:key outputs #:allow-other-keys)
8713 (substitute* "snakemake/executors/__init__.py"
8714 (("\\{sys.executable\\} -m snakemake")
8715 (string-append (assoc-ref outputs "out")
8716 "/bin/snakemake")))
8717 #t)))))
8718 (propagated-inputs
8719 `(("python-appdirs" ,python-appdirs)
8720 ("python-configargparse" ,python-configargparse)
8721 ("python-datrie" ,python-datrie)
8722 ("python-docutils" ,python-docutils)
8723 ("python-gitpython" ,python-gitpython)
8724 ("python-jinja2" ,python-jinja2)
8725 ("python-jsonschema" ,python-jsonschema)
8726 ("python-nbformat" ,python-nbformat)
8727 ("python-networkx" ,python-networkx)
8728 ("python-psutil" ,python-psutil)
8729 ("python-pulp" ,python-pulp)
8730 ("python-pyyaml" ,python-pyyaml)
8731 ("python-ratelimiter" ,python-ratelimiter)
8732 ("python-requests" ,python-requests)
8733 ("python-toposort" ,python-toposort)
8734 ("python-wrapt" ,python-wrapt)))
8735 (home-page "https://snakemake.readthedocs.io")
8736 (synopsis "Python-based execution environment for make-like workflows")
8737 (description
8738 "Snakemake aims to reduce the complexity of creating workflows by
8739 providing a clean and modern domain specific specification language (DSL) in
8740 Python style, together with a fast and comfortable execution environment.")
8741 (license license:expat)))
8742
8743 (define-public python-pyqrcode
8744 (package
8745 (name "python-pyqrcode")
8746 (version "1.2.1")
8747 (source
8748 (origin
8749 (method url-fetch)
8750 (uri (pypi-uri "PyQRCode" version))
8751 (sha256
8752 (base32
8753 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
8754 (build-system python-build-system)
8755 (home-page
8756 "https://github.com/mnooner256/pyqrcode")
8757 (synopsis "QR code generator")
8758 (description
8759 "Pyqrcode is a QR code generator written purely in Python with
8760 SVG, EPS, PNG and terminal output.")
8761 (license license:bsd-3)))
8762
8763 (define-public python-seaborn
8764 (package
8765 (name "python-seaborn")
8766 (version "0.10.0")
8767 (source
8768 (origin
8769 (method url-fetch)
8770 (uri (pypi-uri "seaborn" version))
8771 (sha256
8772 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
8773 (build-system python-build-system)
8774 (arguments
8775 `(#:phases
8776 (modify-phases %standard-phases
8777 (add-before 'check 'start-xserver
8778 (lambda* (#:key inputs #:allow-other-keys)
8779 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8780 ;; There must be a running X server and make check doesn't
8781 ;; start one. Therefore we must do it.
8782 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8783 (setenv "DISPLAY" ":1")
8784 #t)))
8785 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
8786 (propagated-inputs
8787 `(("python-pandas" ,python-pandas)
8788 ("python-matplotlib" ,python-matplotlib)
8789 ("python-numpy" ,python-numpy)
8790 ("python-scipy" ,python-scipy)))
8791 (native-inputs
8792 `(("python-pytest" ,python-pytest)
8793 ("xorg-server" ,xorg-server-for-tests)))
8794 (home-page "https://seaborn.pydata.org/")
8795 (synopsis "Statistical data visualization")
8796 (description
8797 "Seaborn is a library for making attractive and informative statistical
8798 graphics in Python. It is built on top of matplotlib and tightly integrated
8799 with the PyData stack, including support for numpy and pandas data structures
8800 and statistical routines from scipy and statsmodels.")
8801 (properties `((python2-variant . ,(delay python2-seaborn))))
8802 (license license:bsd-3)))
8803
8804 ;; 0.9.1 is the last release with support for Python 2.
8805 (define-public python2-seaborn
8806 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
8807 (package
8808 (inherit base)
8809 (version "0.9.1")
8810 (source (origin
8811 (method url-fetch)
8812 (uri (pypi-uri "seaborn" version))
8813 (sha256
8814 (base32
8815 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
8816
8817 (define-public python-mpmath
8818 (package
8819 (name "python-mpmath")
8820 (version "1.1.0")
8821 (source (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "mpmath" version))
8824 (file-name (git-file-name name version))
8825 (sha256
8826 (base32
8827 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
8828 (build-system python-build-system)
8829 (native-inputs
8830 `(("python-pytest" ,python-pytest)))
8831 (arguments
8832 '(#:phases
8833 (modify-phases %standard-phases
8834 (replace 'check
8835 (lambda _
8836 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
8837 (home-page "https://mpmath.org")
8838 (synopsis "Arbitrary-precision floating-point arithmetic in python")
8839 (description
8840 "@code{mpmath} can be used as an arbitrary-precision substitute for
8841 Python's float/complex types and math/cmath modules, but also does much
8842 more advanced mathematics.")
8843 (license license:bsd-3)))
8844
8845 (define-public python2-mpmath
8846 (package-with-python2 python-mpmath))
8847
8848 (define-public python-bigfloat
8849 (package
8850 (name "python-bigfloat")
8851 (version "0.3.0")
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (pypi-uri "bigfloat" version))
8856 (sha256
8857 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
8858 (build-system python-build-system)
8859 (inputs
8860 `(("mpfr" ,mpfr)))
8861 (home-page "https://github.com/mdickinson/bigfloat")
8862 (synopsis "Arbitrary precision floating-point arithmetic for Python")
8863 (description
8864 "This package provides a Python interface to the MPFR library for
8865 multiprecision arithmetic.")
8866 (license license:lgpl3+)))
8867
8868 (define-public python-sympy
8869 (package
8870 (name "python-sympy")
8871 (version "1.7.1")
8872 (source
8873 (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "sympy" version))
8876 (sha256
8877 (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
8878 (build-system python-build-system)
8879 (arguments
8880 `(#:phases
8881 (modify-phases %standard-phases
8882 (replace 'check
8883 (lambda* (#:key outputs #:allow-other-keys)
8884 (invoke
8885 (or (which "python3") (which "python"))
8886 "-c" "import sympy; sympy.test(\"/core\")"))))))
8887 (propagated-inputs
8888 `(("python-mpmath" ,python-mpmath)))
8889 (home-page "https://www.sympy.org/")
8890 (synopsis "Python library for symbolic mathematics")
8891 (description
8892 "SymPy is a Python library for symbolic mathematics. It aims to become a
8893 full-featured computer algebra system (CAS) while keeping the code as simple
8894 as possible in order to be comprehensible and easily extensible.")
8895 (license license:bsd-3)))
8896
8897 (define-public python2-sympy
8898 (package
8899 (inherit (package-with-python2 python-sympy))
8900 (version "1.5.1") ; last release for python2
8901 (source
8902 (origin
8903 (method url-fetch)
8904 (uri (pypi-uri "sympy" version))
8905 (sha256
8906 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
8907
8908 (define-public python-q
8909 (package
8910 (name "python-q")
8911 (version "2.6")
8912 (source
8913 (origin
8914 (method url-fetch)
8915 (uri (pypi-uri "q" version))
8916 (sha256
8917 (base32
8918 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
8919 (build-system python-build-system)
8920 (home-page "https://github.com/zestyping/q")
8921 (synopsis "Quick-and-dirty debugging output for tired programmers")
8922 (description
8923 "q is a Python module for \"print\" style of debugging Python code. It
8924 provides convenient short API for print out of values, tracebacks, and
8925 falling into the Python interpreter.")
8926 (license license:asl2.0)))
8927
8928 (define-public python2-q
8929 (package-with-python2 python-q))
8930
8931 (define-public python-xlib
8932 (package
8933 (name "python-xlib")
8934 (version "0.29")
8935 (source
8936 (origin
8937 (method git-fetch)
8938 (uri (git-reference
8939 (url "https://github.com/python-xlib/python-xlib")
8940 (commit version)))
8941 (file-name (git-file-name name version))
8942 (sha256
8943 (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
8944 (build-system python-build-system)
8945 (arguments
8946 `(#:phases
8947 (modify-phases %standard-phases
8948 (add-before 'check 'start-xserver
8949 (lambda* (#:key inputs #:allow-other-keys)
8950 (let ((xorg-server (assoc-ref inputs "xorg-server")))
8951 ;; There must be a running X server and make check doesn't
8952 ;; start one. Therefore we must do it.
8953 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8954 (setenv "DISPLAY" ":1")
8955 #t))))))
8956 (native-inputs
8957 `(("python-mock" ,python-mock)
8958 ("python-setuptools-scm" ,python-setuptools-scm)
8959 ("xorg-server" ,xorg-server)))
8960 (propagated-inputs
8961 `(("python-six" ,python-six)))
8962 (home-page "https://github.com/python-xlib/python-xlib")
8963 (synopsis "Python X11 client library")
8964 (description
8965 "The Python X Library is intended to be a fully functional
8966 X client library for Python programs. It is useful to implement
8967 low-level X clients. It is written entirely in Python.")
8968 (license license:gpl2+)))
8969
8970 (define-public python2-xlib
8971 (package-with-python2 python-xlib))
8972
8973 (define-public python-singledispatch
8974 (package
8975 (name "python-singledispatch")
8976 (version "3.4.0.3")
8977 (source
8978 (origin
8979 (method url-fetch)
8980 (uri (pypi-uri "singledispatch" version))
8981 (sha256
8982 (base32
8983 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8984 (build-system python-build-system)
8985 (native-inputs
8986 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8987 (home-page
8988 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8989 (synopsis "Backport of singledispatch feature from Python 3.4")
8990 (description
8991 "This library brings functools.singledispatch from Python 3.4 to Python
8992 2.6-3.3.")
8993 (license license:expat)))
8994
8995 (define-public python2-singledispatch
8996 (package-with-python2 python-singledispatch))
8997
8998 ;; the python- version can be removed with python-3.5
8999 (define-public python-backports-abc
9000 (package
9001 (name "python-backports-abc")
9002 (version "0.5")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "backports_abc" version))
9007 (sha256
9008 (base32
9009 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
9010 (build-system python-build-system)
9011 (home-page "https://github.com/cython/backports_abc")
9012 (synopsis "Backport of additions to the 'collections.abc' module")
9013 (description
9014 "Python-backports-abc provides a backport of additions to the
9015 @code{collections.abc} module in Python-3.5.")
9016 (license license:psfl)))
9017
9018 (define-public python2-backports-abc
9019 (package-with-python2 python-backports-abc))
9020
9021 (define-public python-backports-csv
9022 (package
9023 (name "python-backports-csv")
9024 (version "1.0.7")
9025 (source
9026 (origin
9027 (method url-fetch)
9028 (uri (pypi-uri "backports.csv" version))
9029 (sha256
9030 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
9031 (build-system python-build-system)
9032 (home-page "https://github.com/ryanhiebert/backports.csv")
9033 (synopsis "Backport of Python 3's csv module for Python 2")
9034 (description
9035 "Provides a backport of Python 3's @code{csv} module for parsing
9036 comma separated values. The API of the @code{csv} module in Python 2
9037 is drastically different from the @code{csv} module in Python 3.
9038 This is due, for the most part, to the difference between str in
9039 Python 2 and Python 3.")
9040 (license license:psfl)))
9041
9042 (define-public python2-backports-csv
9043 (package-with-python2 python-backports-csv))
9044
9045 (define-public python2-backports-shutil-get-terminal-size
9046 (package
9047 (name "python2-backports-shutil-get-terminal-size")
9048 (version "1.0.0")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
9053 (sha256
9054 (base32
9055 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
9056 (build-system python-build-system)
9057 (arguments
9058 `(#:python ,python-2
9059 #:phases
9060 (modify-phases %standard-phases
9061 (replace 'check
9062 (lambda _
9063 (setenv "PYTHONPATH" (string-append "./build/lib:"
9064 (getenv "PYTHONPATH")))
9065 (invoke "py.test" "-v"))))))
9066 (native-inputs
9067 `(("python2-pytest" ,python2-pytest)))
9068 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
9069 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
9070 (description
9071 "This package provides a backport of the @code{get_terminal_size
9072 function} from Python 3.3's @code{shutil}.
9073 Unlike the original version it is written in pure Python rather than C,
9074 so it might be a tiny bit slower.")
9075 (license license:expat)))
9076
9077 (define-public python-waf
9078 (package
9079 (name "python-waf")
9080 (version "2.0.19")
9081 (source (origin
9082 (method url-fetch)
9083 (uri (string-append "https://waf.io/"
9084 "waf-" version ".tar.bz2"))
9085 (sha256
9086 (base32
9087 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
9088 (build-system python-build-system)
9089 (arguments
9090 '(#:phases
9091 (modify-phases %standard-phases
9092 (replace 'build
9093 (lambda _
9094 ;; XXX: Find a way to add all extra tools.
9095 (let ((tools '("gccdeps"
9096 "clang_compilation_database")))
9097 (invoke "python" "waf-light" "configure" "build"
9098 (string-append "--tools="
9099 (string-join tools ","))))))
9100 (replace 'check
9101 (lambda _
9102 (invoke "python" "waf" "--version")))
9103 (replace 'install
9104 (lambda* (#:key outputs #:allow-other-keys)
9105 (let ((out (assoc-ref outputs "out")))
9106 (install-file "waf" (string-append out "/bin")))
9107 #t))
9108 ;; waf breaks when it is wrapped.
9109 (delete 'wrap))))
9110 (home-page "https://waf.io/")
9111 (synopsis "Python-based build system")
9112 (description
9113 "Waf is a Python-based framework for configuring, compiling and installing
9114 applications.")
9115 (license license:bsd-3)))
9116
9117 (define-public python2-waf
9118 (package-with-python2 python-waf))
9119
9120 (define-public python-pyzmq
9121 (package
9122 (name "python-pyzmq")
9123 (version "22.1.0")
9124 (source
9125 (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "pyzmq" version))
9128 (sha256
9129 (base32 "0pa1y97z75xqyca9xfp9zrzksydbgzsxf8yh0hwp0rgahpfxch3h"))))
9130 (build-system python-build-system)
9131 (arguments
9132 `(#:configure-flags
9133 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
9134 #:phases
9135 (modify-phases %standard-phases
9136 (add-before 'check 'build-extensions
9137 (lambda _
9138 ;; Cython extensions have to be built before running the tests.
9139 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
9140 (inputs
9141 `(("zeromq" ,zeromq)))
9142 (native-inputs
9143 `(("pkg-config" ,pkg-config)
9144 ("python-cython" ,python-cython)
9145 ("python-pytest" ,python-pytest)))
9146 (home-page "https://github.com/zeromq/pyzmq")
9147 (synopsis "Python bindings for 0MQ")
9148 (description
9149 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
9150 (license license:bsd-4)))
9151
9152 (define-public python2-pyzmq
9153 (package-with-python2 python-pyzmq))
9154
9155 (define-public python-pep8
9156 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
9157 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
9158 ;; some dependents' test suites, and nothing more.
9159 (package
9160 (name "python-pep8")
9161 (version "1.7.0")
9162 (source
9163 (origin
9164 (method url-fetch)
9165 (uri (pypi-uri "pep8" version))
9166 (sha256
9167 (base32
9168 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
9169 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
9170 (build-system python-build-system)
9171 (home-page "https://pep8.readthedocs.org/")
9172 (synopsis "Python style guide checker")
9173 (description
9174 "This tools checks Python code against some of the style conventions in
9175 PEP 8.")
9176 (license license:expat)))
9177
9178 (define-public python2-pep8
9179 (package-with-python2 python-pep8))
9180
9181 (define-public python-pep517
9182 (package
9183 (inherit python-pep517-bootstrap)
9184 (name "python-pep517")
9185 (arguments
9186 '(#:phases
9187 (modify-phases %standard-phases
9188 (replace 'check
9189 (lambda* (#:key tests? #:allow-other-keys)
9190 (delete-file "pytest.ini")
9191 ;; This test tries to connect to the internet
9192 (delete-file "tests/test_meta.py")
9193 (if tests?
9194 (invoke "pytest")
9195 #t))))))
9196 (native-inputs
9197 `(("python-mock" ,python-mock)
9198 ("python-pytest" ,python-pytest)
9199 ("python-testpath" ,python-testpath)))
9200 (properties `((python2-variant . ,(delay python2-pep517))))))
9201
9202 ;; Skip the tests so we don't create a cyclical dependency with pytest.
9203 (define-public python2-pep517
9204 (let ((base (package-with-python2
9205 (strip-python2-variant python-pep517))))
9206 (package/inherit base
9207 (name "python2-pep517")
9208 (arguments
9209 `(#:tests? #f
9210 ,@(package-arguments base)))
9211 (native-inputs `()))))
9212
9213 (define-public python-pyflakes
9214 (package
9215 (name "python-pyflakes")
9216 (version "2.3.1")
9217 (source
9218 (origin
9219 (method url-fetch)
9220 (uri (pypi-uri "pyflakes" version))
9221 (sha256
9222 (base32
9223 "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
9224 (build-system python-build-system)
9225 (home-page
9226 "https://github.com/pyflakes/pyflakes")
9227 (synopsis "Passive checker of Python programs")
9228 (description
9229 "Pyflakes statically checks Python source code for common errors.")
9230 (license license:expat)))
9231
9232 (define-public python2-pyflakes
9233 (package-with-python2 python-pyflakes))
9234
9235 (define-public python-pyflakes-2.2
9236 (package
9237 (inherit python-pyflakes)
9238 (version "2.2.0")
9239 (source (origin
9240 (method url-fetch)
9241 (uri (pypi-uri "pyflakes" version))
9242 (sha256
9243 (base32
9244 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))))
9245
9246 (define-public python-mccabe
9247 (package
9248 (name "python-mccabe")
9249 (version "0.6.1")
9250 (source
9251 (origin
9252 (method url-fetch)
9253 (uri (pypi-uri "mccabe" version))
9254 (sha256
9255 (base32
9256 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
9257 (build-system python-build-system)
9258 (native-inputs
9259 `(("python-pytest" ,python-pytest-bootstrap)
9260 ("python-pytest-runner" ,python-pytest-runner)))
9261 (home-page "https://github.com/flintwork/mccabe")
9262 (synopsis "McCabe checker, plugin for flake8")
9263 (description
9264 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
9265 complexity of Python source code.")
9266 (license license:expat)))
9267
9268 (define-public python2-mccabe
9269 (package-with-python2 python-mccabe))
9270
9271 (define-public python-flake8
9272 (package
9273 (name "python-flake8")
9274 (version "3.9.1")
9275 (source (origin
9276 (method url-fetch)
9277 (uri (pypi-uri "flake8" version))
9278 (sha256
9279 (base32
9280 "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
9281 (build-system python-build-system)
9282 (arguments
9283 `(#:phases
9284 (modify-phases %standard-phases
9285 (replace 'check
9286 (lambda* (#:key inputs outputs #:allow-other-keys)
9287 (add-installed-pythonpath inputs outputs)
9288 (invoke "pytest" "-v"))))))
9289 (propagated-inputs
9290 `(("python-pycodestyle" ,python-pycodestyle)
9291 ("python-entrypoints" ,python-entrypoints)
9292 ("python-pyflakes" ,python-pyflakes)
9293 ("python-mccabe" ,python-mccabe)))
9294 (native-inputs
9295 `(("python-mock" ,python-mock)
9296 ("python-pytest" ,python-pytest)))
9297 (home-page "https://gitlab.com/pycqa/flake8")
9298 (synopsis
9299 "The modular source code checker: pep8, pyflakes and co")
9300 (description
9301 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
9302 (properties `((python2-variant . ,(delay python2-flake8))))
9303 (license license:expat)))
9304
9305 (define-public python2-flake8
9306 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
9307 (package/inherit base
9308 (propagated-inputs
9309 `(("python2-configparser" ,python2-configparser)
9310 ("python2-enum34" ,python2-enum34)
9311 ("python2-functools32" ,python2-functools32)
9312 ("python2-typing" ,python2-typing)
9313 ,@(package-propagated-inputs base))))))
9314
9315 (define-public python-flake8-3.8
9316 (package
9317 (inherit python-flake8)
9318 (version "3.8.4")
9319 (source (origin
9320 (method url-fetch)
9321 (uri (pypi-uri "flake8" version))
9322 (sha256
9323 (base32
9324 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
9325 (propagated-inputs
9326 `(("python-pycodestyle" ,python-pycodestyle-2.6)
9327 ("python-entrypoints" ,python-entrypoints)
9328 ("python-pyflakes" ,python-pyflakes-2.2)
9329 ("python-mccabe" ,python-mccabe)))))
9330
9331 (define-public python-flake8-bugbear
9332 (package
9333 (name "python-flake8-bugbear")
9334 (version "20.1.4")
9335 (source
9336 (origin
9337 (method url-fetch)
9338 (uri (pypi-uri "flake8-bugbear" version))
9339 (sha256
9340 (base32
9341 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
9342 (build-system python-build-system)
9343 (arguments
9344 '(#:phases
9345 (modify-phases %standard-phases
9346 (add-before 'check 'disable-test
9347 (lambda _
9348 ;; This test fails on slow computers.
9349 (substitute* "tests/test_bugbear.py"
9350 (("def test_does_not_crash_on_any_valid_code")
9351 "def _test_does_not_crash_on_any_valid_code")))))))
9352 (native-inputs
9353 `(("python-hypothesis" ,python-hypothesis)
9354 ("python-hypothesmith" ,python-hypothesmith)))
9355 (propagated-inputs
9356 `(("python-attrs" ,python-attrs)
9357 ("python-flake8" ,python-flake8)))
9358 (home-page "https://github.com/PyCQA/flake8-bugbear")
9359 (synopsis
9360 "Flake8 plugin for finding likely bugs and design problems in your program")
9361 (description
9362 "This package contains a plugin for Flake8 finding likely bugs and
9363 design problems in your program. It contains warnings that don't belong
9364 in pyflakes and pycodestyle.")
9365 (license license:expat)))
9366
9367 (define-public python-flake8-continuation
9368 (package
9369 (name "python-flake8-continuation")
9370 (version "1.0.5")
9371 (source
9372 (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "flake8-continuation" version))
9375 (sha256
9376 (base32
9377 "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
9378 (build-system python-build-system)
9379 (propagated-inputs
9380 `(("python-flake8" ,python-flake8)
9381 ("python-pycodestyle" ,python-pycodestyle)
9382 ("python-six" ,python-six)))
9383 (home-page "https://github.com/planetlabs/flake8-continuation")
9384 (synopsis "Flake8 Line Continuation Plugin")
9385 (description "A Flake8 plugin that checks for the line continuation
9386 style to be in the preferred method according to PEP-8, specifically:
9387 @quotation
9388 The preferred way of wrapping long lines is by using Python's implied
9389 line continuation inside parentheses, brackets and braces. Long lines
9390 can be broken over multiple lines by wrapping expressions in parentheses.
9391 These should be used in preference to using a backslash for line continuation.
9392 @end quotation")
9393 (license license:asl2.0)))
9394
9395 (define-public python-flake8-implicit-str-concat
9396 (package
9397 (name "python-flake8-implicit-str-concat")
9398 (version "0.2.0")
9399 (source
9400 (origin
9401 (method url-fetch)
9402 (uri (pypi-uri "flake8_implicit_str_concat" version))
9403 (sha256
9404 (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
9405 (build-system python-build-system)
9406 (propagated-inputs
9407 `(("python-attrs" ,python-attrs)
9408 ("python-more-itertools" ,python-more-itertools)))
9409 (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
9410 (synopsis "Flake8 plugin to encourage correct string literal concatenation")
9411 (description
9412 "This is a plugin for the Python code checking tool Flake8 to encourage
9413 correct string literal concatenation.
9414
9415 It looks for style problems like implicitly concatenated string literals on
9416 the same line (which can be introduced by the code formatting tool Black), or
9417 unnecessary plus operators for explicit string literal concatenation.")
9418 (license license:expat)))
9419
9420 (define-public python-flake8-polyfill
9421 (package
9422 (name "python-flake8-polyfill")
9423 (version "1.0.2")
9424 (source
9425 (origin
9426 (method url-fetch)
9427 (uri (pypi-uri "flake8-polyfill" version))
9428 (sha256
9429 (base32
9430 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
9431 (build-system python-build-system)
9432 (arguments
9433 '(#:phases
9434 (modify-phases %standard-phases
9435 (replace 'check
9436 (lambda _
9437 ;; Be compatible with Pytest 4:
9438 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
9439 (substitute* "setup.cfg"
9440 (("\\[pytest\\]")
9441 "[tool:pytest]"))
9442
9443 (setenv "PYTHONPATH"
9444 (string-append (getcwd) "/build/lib:"
9445 (getenv "PYTHONPATH")))
9446 (invoke "py.test" "-v"))))))
9447 (native-inputs
9448 `(("python-flake8" ,python-flake8)
9449 ("python-mock" ,python-mock)
9450 ("python-pep8" ,python-pep8)
9451 ("python-pycodestyle" ,python-pycodestyle)
9452 ("python-pytest" ,python-pytest)))
9453 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
9454 (synopsis "Polyfill package for Flake8 plugins")
9455 (description
9456 "This package that provides some compatibility helpers for Flake8
9457 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
9458 (license license:expat)))
9459
9460 (define-public python2-flake8-polyfill
9461 (package-with-python2 python-flake8-polyfill))
9462
9463 (define-public python-flake8-print
9464 (package
9465 (name "python-flake8-print")
9466 (version "4.0.0")
9467 (source
9468 (origin
9469 (method url-fetch)
9470 (uri (pypi-uri "flake8-print" version))
9471 (sha256
9472 (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
9473 (build-system python-build-system)
9474 (propagated-inputs
9475 `(("python-flake8" ,python-flake8)
9476 ("python-pycodestyle" ,python-pycodestyle)
9477 ("python-six" ,python-six)))
9478 (home-page "https://github.com/jbkahn/flake8-print")
9479 (synopsis "Print statement checker plugin for Flake8")
9480 (description
9481 "This plugin for Flake8 checks for @code{print} statements in Python
9482 files.")
9483 (license license:expat)))
9484
9485 (define-public python-flake8-pyi
9486 (package
9487 (name "python-flake8-pyi")
9488 (version "20.5.0")
9489 (source
9490 (origin
9491 (method url-fetch)
9492 (uri (pypi-uri "flake8-pyi" version))
9493 (sha256
9494 (base32
9495 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
9496 (build-system python-build-system)
9497 (propagated-inputs
9498 `(("python-attrs" ,python-attrs)
9499 ("python-flake8" ,python-flake8)
9500 ("python-pyflakes" ,python-pyflakes)))
9501 (home-page "https://github.com/ambv/flake8-pyi")
9502 (synopsis
9503 "Flake8 plugin that provides specializations for type hinting stub files")
9504 (description
9505 "This package contains a plugin that provides specializations for
9506 type hinting stub files, especially interesting for linting typeshed. It
9507 adds the @file{.pyi} extension to the default value of the @code{--filename}
9508 command-line argument to Flake8. This means stubs are linted by default with
9509 this plugin enabled, without needing to explicitly list every file. It
9510 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
9511 expressions after the entire file has been read. This enables support for
9512 first-class forward references that stub files use.")
9513 (license license:expat)))
9514
9515 (define-public python-flake8-pie
9516 (package
9517 (name "python-flake8-pie")
9518 (version "0.5.0")
9519 (source
9520 (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "flake8-pie" version))
9523 (sha256
9524 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
9525 (build-system python-build-system)
9526 (home-page "https://github.com/sbdchd/flake8-pie")
9527 (synopsis "Flake8 extension that implements lints")
9528 (description
9529 "This package provides a flake8 extension that implements miscellaneous
9530 lints.")
9531 (license license:bsd-2)))
9532
9533 (define-public python-flake8-quotes
9534 (package
9535 (name "python-flake8-quotes")
9536 (version "3.2.0")
9537 (source
9538 (origin
9539 (method url-fetch)
9540 (uri (pypi-uri "flake8-quotes" version))
9541 (sha256
9542 (base32
9543 "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
9544 (build-system python-build-system)
9545 (propagated-inputs
9546 `(("python-flake8" ,python-flake8)))
9547 (home-page "https://github.com/zheller/flake8-quotes/")
9548 (synopsis "Flake8 lint for quotes")
9549 (description "This package provides a Flake8 lint for quotes.")
9550 (license license:expat)))
9551
9552 (define-public python-autoflake
9553 (package
9554 (name "python-autoflake")
9555 (version "1.3.1")
9556 (source
9557 (origin
9558 (method url-fetch)
9559 (uri (pypi-uri "autoflake" version))
9560 (sha256
9561 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
9562 (build-system python-build-system)
9563 (propagated-inputs
9564 `(("python-pyflakes" ,python-pyflakes)))
9565 (home-page "https://github.com/myint/autoflake")
9566 (synopsis "Removes unused imports and unused variables")
9567 (description
9568 "@code{autoflake} removes unused imports and unused variables from Python
9569 code as reported by @code{pyflakes}.
9570
9571 By default, it only removes unused imports for modules that are part of the
9572 standard library. Removal of unused variables is also disabled by default.
9573 It also removes useless @code{pass} statements.")
9574 (license license:expat)))
9575
9576 (define-public python-mistune
9577 (package
9578 (name "python-mistune")
9579 (version "0.8.4")
9580 (source
9581 (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "mistune" version))
9584 (sha256
9585 (base32
9586 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
9587 (build-system python-build-system)
9588 (native-inputs
9589 `(("python-nose" ,python-nose)
9590 ("python-cython" ,python-cython)))
9591 (home-page "https://github.com/lepture/mistune")
9592 (synopsis "Markdown parser in pure Python")
9593 (description "This package provides a fast markdown parser in pure
9594 Python.")
9595 (license license:bsd-3)))
9596
9597 (define-public python2-mistune
9598 (package-with-python2 python-mistune))
9599
9600 (define-public python-markdown
9601 (package
9602 (name "python-markdown")
9603 (version "3.3.4")
9604 (source
9605 (origin
9606 (method url-fetch)
9607 (uri (pypi-uri "Markdown" version))
9608 (sha256
9609 (base32
9610 "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
9611 (build-system python-build-system)
9612 (native-inputs
9613 `(("python-nose" ,python-nose)
9614 ("python-pyyaml" ,python-pyyaml)))
9615 (home-page "https://python-markdown.github.io/")
9616 (synopsis "Python implementation of Markdown")
9617 (description
9618 "This package provides a Python implementation of John Gruber's
9619 Markdown. The library features international input, various Markdown
9620 extensions, and several HTML output formats. A command line wrapper
9621 markdown_py is also provided to convert Markdown files to HTML.")
9622 (properties `((python2-variant . ,(delay python2-markdown))))
9623 (license license:bsd-3)))
9624
9625 ;; Markdown 3.2 dropped support for Python 2.
9626 (define-public python2-markdown
9627 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
9628 (package
9629 (inherit base)
9630 (version "3.1.1")
9631 (source (origin
9632 (method url-fetch)
9633 (uri (pypi-uri "Markdown" version))
9634 (sha256
9635 (base32
9636 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
9637
9638 (define-public python-ptyprocess
9639 (package
9640 (name "python-ptyprocess")
9641 (version "0.5.2")
9642 (source
9643 (origin
9644 (method url-fetch)
9645 (uri (pypi-uri "ptyprocess" version))
9646 (sha256
9647 (base32
9648 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
9649 (build-system python-build-system)
9650 (native-inputs
9651 `(("python-nose" ,python-nose)))
9652 (arguments
9653 `(#:phases
9654 (modify-phases %standard-phases
9655 (replace 'check
9656 (lambda _ (invoke "nosetests"))))))
9657 (home-page "https://github.com/pexpect/ptyprocess")
9658 (synopsis "Run a subprocess in a pseudo terminal")
9659 (description
9660 "This package provides a Python library used to launch a subprocess in a
9661 pseudo terminal (pty), and interact with both the process and its pty.")
9662 (license license:isc)))
9663
9664 (define-public python2-ptyprocess
9665 (package-with-python2 python-ptyprocess))
9666
9667 (define-public python-cram
9668 (package
9669 (name "python-cram")
9670 (version "0.7")
9671 (home-page "https://bitheap.org/cram/")
9672 (source (origin
9673 (method url-fetch)
9674 (uri (list (string-append home-page "cram-"
9675 version ".tar.gz")
9676 (pypi-uri "cram" version)))
9677 (sha256
9678 (base32
9679 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
9680 (arguments
9681 '(#:phases
9682 (modify-phases %standard-phases
9683 (add-after 'unpack 'patch-source
9684 (lambda _
9685 (substitute* (find-files "cram" ".*\\.py$")
9686 ;; Replace default shell path.
9687 (("/bin/sh") (which "sh")))
9688 (substitute* (find-files "tests" ".*\\.t$")
9689 (("md5") "md5sum")
9690 (("/bin/bash") (which "bash"))
9691 (("/bin/sh") (which "sh")))
9692 (substitute* "cram/_test.py"
9693 ;; This hack works around a bug triggered by substituting
9694 ;; the /bin/sh paths. "tests/usage.t" compares the output of
9695 ;; "cram -h", which breaks the output at 80 characters. This
9696 ;; causes the line showing the default shell to break into two
9697 ;; lines, but the test expects a single line...
9698 (("env\\['COLUMNS'\\] = '80'")
9699 "env['COLUMNS'] = '160'"))
9700
9701 (substitute* "Makefile"
9702 ;; Recent versions of python-coverage have caused the test
9703 ;; coverage to decrease (as of version 0.7). Allow that.
9704 (("--fail-under=100")
9705 "--fail-under=90"))
9706
9707 #t))
9708 (replace 'check
9709 ;; The test phase uses the built library and executable.
9710 (lambda* (#:key inputs outputs #:allow-other-keys)
9711 (add-installed-pythonpath inputs outputs)
9712 (setenv "PATH" (string-append (getenv "PATH") ":"
9713 (assoc-ref outputs "out") "/bin"))
9714 (invoke "make" "test"))))))
9715 (build-system python-build-system)
9716 (native-inputs
9717 `(("python-coverage" ,python-coverage)
9718 ("which" ,which)))
9719 (synopsis "Simple testing framework for command line applications")
9720 (description
9721 "Cram is a functional testing framework for command line applications.
9722 Cram tests look like snippets of interactive shell sessions. Cram runs each
9723 command and compares the command output in the test with the command’s actual
9724 output.")
9725 (license license:gpl2+)))
9726
9727 (define-public python2-cram
9728 (package-with-python2 python-cram))
9729
9730 (define-public python-crashtest
9731 (package
9732 (name "python-crashtest")
9733 (version "0.3.1")
9734 (source
9735 (origin
9736 (method url-fetch)
9737 (uri (pypi-uri "crashtest" version))
9738 (sha256
9739 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
9740 (build-system python-build-system)
9741 (home-page "https://github.com/sdispater/crashtest")
9742 (synopsis "Manage Python errors with ease")
9743 (description
9744 "Python library that makes exceptions handling and inspection easier.")
9745 (license license:expat)))
9746
9747 (define-public python-stdlib-list
9748 (package
9749 (name "python-stdlib-list")
9750 (version "0.8.0")
9751 (source (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "stdlib-list" version))
9754 (sha256
9755 (base32
9756 "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
9757 (build-system python-build-system)
9758 (arguments
9759 `(#:tests? #f)) ; Tests require more dependencies.
9760 (native-inputs
9761 `(("python-sphinx" ,python-sphinx)))
9762 (home-page "https://github.com/jackmaney/python-stdlib-list")
9763 (synopsis "Python Standard Libraries")
9764 (description "This package contains a list of Python Standard Libraries.")
9765 (license license:expat)))
9766
9767 (define-public python-straight-plugin
9768 (package
9769 (name "python-straight-plugin")
9770 (version "1.4.1")
9771 (source
9772 (origin
9773 (method url-fetch)
9774 (uri (pypi-uri "straight.plugin" version))
9775 (sha256
9776 (base32
9777 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
9778 (build-system python-build-system)
9779 (home-page "https://github.com/ironfroggy/straight.plugin")
9780 (synopsis "Simple namespaced plugin facility")
9781 (description "Straight Plugin provides a type of plugin you can create from
9782 almost any existing Python modules, and an easy way for outside developers to
9783 add functionality and customization to your projects with their own plugins.")
9784 (license license:expat)))
9785
9786 (define-public python2-straight-plugin
9787 (package-with-python2 python-straight-plugin))
9788
9789 (define-public python-fonttools
9790 (package
9791 (name "python-fonttools")
9792 (version "4.6.0")
9793 (source (origin
9794 (method url-fetch)
9795 (uri (pypi-uri "fonttools" version ".zip"))
9796 (sha256
9797 (base32
9798 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
9799 (build-system python-build-system)
9800 (native-inputs
9801 `(("unzip" ,unzip)
9802 ("python-pytest" ,python-pytest)
9803 ("python-pytest-runner" ,python-pytest-runner)))
9804 (home-page "https://github.com/fonttools/fonttools")
9805 (synopsis "Tools to manipulate font files")
9806 (description
9807 "FontTools/TTX is a library to manipulate font files from Python. It
9808 supports reading and writing of TrueType/OpenType fonts, reading and writing
9809 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
9810 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
9811 from an XML-based format.")
9812 (license license:expat)))
9813
9814 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
9815 (define-public python2-fonttools
9816 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
9817 (package
9818 (inherit base)
9819 (version "3.44.0")
9820 (source (origin
9821 (method url-fetch)
9822 (uri (pypi-uri "fonttools" version ".zip"))
9823 (sha256
9824 (base32
9825 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
9826
9827 (define-public python-ly
9828 (package
9829 (name "python-ly")
9830 (version "0.9.5")
9831 (source
9832 (origin
9833 (method url-fetch)
9834 (uri (pypi-uri name version))
9835 (sha256
9836 (base32
9837 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
9838 (build-system python-build-system)
9839 (arguments
9840 ;; FIXME: Some tests need network access.
9841 '(#:tests? #f))
9842 (synopsis "Tool and library for manipulating LilyPond files")
9843 (description "This package provides a Python library to parse, manipulate
9844 or create documents in LilyPond format. A command line program ly is also
9845 provided that can be used to do various manipulations with LilyPond files.")
9846 (home-page "https://pypi.org/project/python-ly/")
9847 (license license:gpl2+)))
9848
9849 (define-public python-appdirs
9850 (package
9851 (name "python-appdirs")
9852 (version "1.4.3")
9853 (source
9854 (origin
9855 (method url-fetch)
9856 (uri (pypi-uri "appdirs" version))
9857 (sha256
9858 (base32
9859 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
9860 (build-system python-build-system)
9861 (home-page "https://github.com/ActiveState/appdirs")
9862 (synopsis
9863 "Determine platform-specific dirs, e.g. a \"user data dir\"")
9864 (description
9865 "This module provides a portable way of finding out where user data
9866 should be stored on various operating systems.")
9867 (license license:expat)))
9868
9869 (define-public python2-appdirs
9870 (package-with-python2 python-appdirs))
9871
9872 (define-public python-gorilla
9873 (package
9874 (name "python-gorilla")
9875 (version "0.3.0")
9876 (source (origin
9877 (method url-fetch)
9878 (uri (pypi-uri "gorilla" version))
9879 (sha256
9880 (base32
9881 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
9882 (build-system python-build-system)
9883 (home-page "https://github.com/christophercrouzet/gorilla")
9884 (synopsis "Convenient monkey patching with Python")
9885 (description
9886 "Gorilla is a Python library that provides a convenient approach to
9887 monkey patching. Monkey patching is the process of modifying module and
9888 class attributes at runtime with the purpose of replacing or extending
9889 third-party code.")
9890 (license license:expat)))
9891
9892 (define-public python-llfuse
9893 (package
9894 (name "python-llfuse")
9895 (version "1.3.8")
9896 (source (origin
9897 (method url-fetch)
9898 (uri (pypi-uri "llfuse" version))
9899 (sha256
9900 (base32
9901 "1g2cdhdqrb6m7655qp61pn61pwj1ql61cdzhr2jvl3w4i8877ddr"))))
9902 (build-system python-build-system)
9903 (inputs
9904 `(("fuse" ,fuse)
9905 ("attr" ,attr)))
9906 (native-inputs
9907 `(("pkg-config" ,pkg-config)))
9908 (synopsis "Python bindings for FUSE")
9909 (description
9910 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
9911 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
9912 (license license:lgpl2.0+)
9913 (properties `((python2-variant . ,(delay python2-llfuse))))))
9914
9915 (define-public python2-llfuse
9916 (let ((base (package-with-python2
9917 (strip-python2-variant python-llfuse))))
9918 (package/inherit base
9919 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
9920
9921 (define-public python-msgpack
9922 (package
9923 (name "python-msgpack")
9924 (version "1.0.0")
9925 (source (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "msgpack" version))
9928 (sha256
9929 (base32
9930 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
9931 (build-system python-build-system)
9932 (arguments
9933 `(#:modules ((guix build utils)
9934 (guix build python-build-system)
9935 (ice-9 ftw)
9936 (srfi srfi-1)
9937 (srfi srfi-26))
9938 #:phases
9939 (modify-phases %standard-phases
9940 (replace 'check
9941 (lambda _
9942 (let ((cwd (getcwd)))
9943 (setenv "PYTHONPATH"
9944 (string-append cwd "/build/"
9945 (find (cut string-prefix? "lib" <>)
9946 (scandir (string-append cwd "/build")))
9947 ":"
9948 (getenv "PYTHONPATH")))
9949 (invoke "pytest" "-v" "test")))))))
9950 (native-inputs
9951 `(("python-pytest" ,python-pytest)))
9952 (synopsis "MessagePack (de)serializer")
9953 (description "MessagePack is a fast, compact binary serialization format,
9954 suitable for similar data to JSON. This package provides CPython bindings for
9955 reading and writing MessagePack data.")
9956 (home-page "https://pypi.org/project/msgpack/")
9957 (license license:asl2.0)))
9958
9959 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
9960 ;; release 0.5. Some packages like borg still call it by the old name for now.
9961 ;; <https://bugs.gnu.org/30662>
9962 (define-public python-msgpack-transitional
9963 (package
9964 (inherit python-msgpack)
9965 (name "python-msgpack-transitional")
9966 (version "0.5.6")
9967 (source (origin
9968 (method url-fetch)
9969 (uri (pypi-uri "msgpack" version))
9970 (sha256
9971 (base32
9972 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
9973 (arguments
9974 (substitute-keyword-arguments (package-arguments python-msgpack)
9975 ((#:phases phases)
9976 `(modify-phases ,phases
9977 (add-after 'unpack 'configure-transitional
9978 (lambda _
9979 ;; Keep using the old name.
9980 (substitute* "setup.py"
9981 (("TRANSITIONAL = False")
9982 "TRANSITIONAL = 1"))
9983 #t))))))))
9984
9985 (define-public python2-msgpack
9986 (package-with-python2 python-msgpack))
9987
9988 (define-public python-netaddr
9989 (package
9990 (name "python-netaddr")
9991 (version "0.8.0")
9992 (source
9993 (origin
9994 (method url-fetch)
9995 (uri (pypi-uri "netaddr" version))
9996 (sha256
9997 (base32
9998 "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
9999 (build-system python-build-system)
10000 (arguments `(#:tests? #f)) ;; No tests.
10001 (home-page "https://github.com/drkjam/netaddr/")
10002 (synopsis "Pythonic manipulation of network addresses")
10003 (description
10004 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
10005 and MAC network addresses.")
10006 (license license:bsd-3)))
10007
10008 (define-public python2-netaddr
10009 (package-with-python2 python-netaddr))
10010
10011 (define-public python2-pyroute2
10012 (package
10013 (name "python2-pyroute2")
10014 (version "0.5.6")
10015 (source
10016 (origin
10017 (method url-fetch)
10018 (uri (pypi-uri "pyroute2" version))
10019 (sha256
10020 (base32
10021 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
10022 (build-system python-build-system)
10023 (arguments
10024 `(#:python ,python-2)) ;Python 3.x is not supported
10025 (home-page "https://github.com/svinota/pyroute2")
10026 (synopsis "Python netlink library")
10027 (description
10028 "Pyroute2 is a pure Python netlink library with minimal dependencies.
10029 Supported netlink families and protocols include:
10030 @itemize
10031 @item rtnl, network settings - addresses, routes, traffic controls
10032 @item nfnetlink - netfilter API: ipset, nftables, ...
10033 @item ipq - simplest userspace packet filtering, iptables QUEUE target
10034 @item devlink - manage and monitor devlink-enabled hardware
10035 @item generic - generic netlink families
10036 @itemize
10037 @item nl80211 - wireless functions API (basic support)
10038 @item taskstats - extended process statistics
10039 @item acpi_events - ACPI events monitoring
10040 @item thermal_events - thermal events monitoring
10041 @item VFS_DQUOT - disk quota events monitoring
10042 @end itemize
10043 @end itemize")
10044 (license license:gpl2+)))
10045
10046 (define-public python-wrapt
10047 (package
10048 (name "python-wrapt")
10049 (version "1.11.2")
10050 (source
10051 (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "wrapt" version))
10054 (sha256
10055 (base32
10056 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
10057 (build-system python-build-system)
10058 (arguments
10059 ;; Tests are not included in the tarball, they are only available in the
10060 ;; git repository.
10061 `(#:tests? #f))
10062 (home-page "https://github.com/GrahamDumpleton/wrapt")
10063 (synopsis "Module for decorators, wrappers and monkey patching")
10064 (description
10065 "The aim of the wrapt module is to provide a transparent object proxy for
10066 Python, which can be used as the basis for the construction of function
10067 wrappers and decorator functions.")
10068 (license license:bsd-2)))
10069
10070 (define-public python2-wrapt
10071 (package-with-python2 python-wrapt))
10072
10073 (define-public python-commonmark
10074 (package
10075 (name "python-commonmark")
10076 (version "0.9.1")
10077 (source
10078 (origin
10079 (method url-fetch)
10080 (uri (pypi-uri "commonmark" version))
10081 (sha256
10082 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
10083 (build-system python-build-system)
10084 (arguments
10085 `(#:phases
10086 (modify-phases %standard-phases
10087 (replace 'check
10088 (lambda* (#:key inputs outputs #:allow-other-keys)
10089 (add-installed-pythonpath inputs outputs)
10090 (invoke "python" "setup.py" "test"))))))
10091 (home-page "https://github.com/readthedocs/commonmark.py")
10092 (synopsis "Python parser for the CommonMark Markdown spec")
10093 (description
10094 "This module is a pure Python port of jgm's @code{commonmark.js}, a
10095 Markdown parser and renderer for the CommonMark specification, using only
10096 native modules.")
10097 (license license:bsd-3)))
10098
10099 (define-public python-xlrd
10100 (package
10101 (name "python-xlrd")
10102 (version "1.2.0")
10103 (source (origin
10104 (method url-fetch)
10105 (uri (pypi-uri "xlrd" version))
10106 (sha256
10107 (base32
10108 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
10109 (build-system python-build-system)
10110 (arguments
10111 `(#:phases
10112 (modify-phases %standard-phases
10113 ;; Some tests depend on writing a temporary file to the user's home
10114 ;; directory.
10115 (add-after 'unpack 'fix-tests
10116 (lambda _
10117 (delete-file "tests/test_open_workbook.py")
10118 #t)))))
10119 (home-page "http://www.python-excel.org/")
10120 (synopsis "Library for extracting data from Excel files")
10121 (description "This package provides a library to extract data from
10122 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
10123 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
10124 Unicode-aware. It is not intended as an end-user tool.")
10125 (license license:bsd-3)))
10126
10127 (define-public python2-xlrd
10128 (package-with-python2 python-xlrd))
10129
10130 (define-public python-immutables
10131 (package
10132 (name "python-immutables")
10133 (version "0.14")
10134 (source
10135 (origin
10136 (method url-fetch)
10137 (uri (pypi-uri "immutables" version))
10138 (sha256
10139 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
10140 (build-system python-build-system)
10141 (home-page "https://github.com/MagicStack/immutables")
10142 (synopsis "High-performance immutable mapping type for Python")
10143 (description
10144 "An immutable mapping type for Python. The underlying datastructure is a
10145 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
10146 functional languages.")
10147 (license license:asl2.0)))
10148
10149 (define-public python-prettytable
10150 (package
10151 (name "python-prettytable")
10152 (version "0.7.2")
10153 (source
10154 (origin
10155 (method url-fetch)
10156 (uri (pypi-uri "prettytable" version ".tar.bz2"))
10157 (sha256
10158 (base32
10159 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
10160 (build-system python-build-system)
10161 (home-page "https://code.google.com/archive/p/prettytable/")
10162 (synopsis "Display tabular data in an ASCII table format")
10163 (description
10164 "A library designed to represent tabular data in visually appealing ASCII
10165 tables. PrettyTable allows for selection of which columns are to be printed,
10166 independent alignment of columns (left or right justified or centred) and
10167 printing of sub-tables by specifying a row range.")
10168 (license license:bsd-3)))
10169
10170 (define-public python2-prettytable
10171 (package-with-python2 python-prettytable))
10172
10173 (define-public python-curio
10174 (package
10175 (name "python-curio")
10176 (version "1.2")
10177 (source
10178 (origin
10179 (method url-fetch)
10180 (uri (pypi-uri "curio" version))
10181 (sha256
10182 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
10183 (build-system python-build-system)
10184 (arguments
10185 `(#:phases
10186 (modify-phases %standard-phases
10187 (replace 'check
10188 (lambda* (#:key inputs outputs #:allow-other-keys)
10189 (add-installed-pythonpath inputs outputs)
10190 (invoke "pytest" "-vv" "-k"
10191 ;; Tries to open an outgoing connection.
10192 "not test_ssl_outgoing"))))))
10193 (native-inputs
10194 `(("python-pytest" ,python-pytest)))
10195 (home-page "https://github.com/dabeaz/curio")
10196 (synopsis "Coroutine-based library for concurrent Python")
10197 (description
10198 "Curio is a coroutine-based library for concurrent Python systems
10199 programming. It provides standard programming abstractions such as as
10200 tasks, sockets, files, locks, and queues.")
10201 (license license:bsd-3)))
10202
10203 (define-public python-tables
10204 (package
10205 (name "python-tables")
10206 (version "3.6.1")
10207 (source
10208 (origin
10209 (method url-fetch)
10210 (uri (pypi-uri "tables" version))
10211 (sha256
10212 (base32
10213 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
10214 (modules '((guix build utils)))
10215 (snippet
10216 '(begin
10217 ;; Remove pre-compiled .pyc files from source.
10218 (for-each delete-file-recursively
10219 (find-files "." "__pycache__" #:directories? #t))
10220 (for-each delete-file (find-files "." "\\.pyc$"))
10221 #t))))
10222 (build-system python-build-system)
10223 (arguments
10224 `(;; FIXME: python-build-system does not pass configure-flags to "build"
10225 ;; or "check", so we must override the build and check phases.
10226 #:phases
10227 (modify-phases %standard-phases
10228 (add-after 'unpack 'use-gcc
10229 (lambda _
10230 (substitute* "setup.py"
10231 (("^( +)compiler = new_compiler\\(\\)" line indent)
10232 (string-append line
10233 "\n"
10234 indent
10235 "compiler.set_executables(compiler='gcc',"
10236 "compiler_so='gcc',"
10237 "linker_exe='gcc',"
10238 "linker_so='gcc -shared')")))
10239 #t))
10240 (add-after 'unpack 'disable-tuning
10241 (lambda _
10242 (substitute* "setup.py"
10243 (("cpu_flags = .*")
10244 "cpu_flags = ['sse2']\n"))
10245 #t))
10246 (replace 'build
10247 (lambda* (#:key inputs #:allow-other-keys)
10248 (invoke "python" "setup.py" "build"
10249 (string-append "--hdf5="
10250 (assoc-ref inputs "hdf5")))))
10251 (replace 'check
10252 (lambda* (#:key inputs #:allow-other-keys)
10253 (invoke "python" "setup.py" "check"
10254 (string-append "--hdf5="
10255 (assoc-ref inputs "hdf5"))))))))
10256 (propagated-inputs
10257 `(("python-numexpr" ,python-numexpr)
10258 ("python-numpy" ,python-numpy)))
10259 (native-inputs
10260 `(("python-cython" ,python-cython)
10261 ("pkg-config" ,pkg-config)))
10262 (inputs
10263 `(("hdf5" ,hdf5-1.10)
10264 ("bzip2" ,bzip2)
10265 ("zlib" ,zlib)))
10266 (home-page "https://www.pytables.org/")
10267 (synopsis "Hierarchical datasets for Python")
10268 (description "PyTables is a package for managing hierarchical datasets and
10269 designed to efficiently cope with extremely large amounts of data.")
10270 (license license:bsd-3)))
10271
10272 (define-public python-sniffio
10273 (package
10274 (name "python-sniffio")
10275 (version "1.2.0")
10276 (source
10277 (origin
10278 (method url-fetch)
10279 (uri (pypi-uri "sniffio" version))
10280 (sha256
10281 (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
10282 (build-system python-build-system)
10283 (arguments
10284 `(#:phases
10285 (modify-phases %standard-phases
10286 (replace 'check
10287 (lambda _
10288 (invoke "pytest" "-vv"))))))
10289 (native-inputs
10290 `(("python-curio" ,python-curio)
10291 ("python-pytest" ,python-pytest)
10292 ("python-pytest-cov" ,python-pytest-cov)))
10293 (home-page "https://github.com/python-trio/sniffio")
10294 (synopsis "Detect which async library a program is running under")
10295 (description "This package detects which async library a program is
10296 running under. It supports multiple async I/O packages, like Trio, and
10297 asyncio.")
10298 ;; Either license applies.
10299 (license (list license:expat license:asl2.0))))
10300
10301 (define-public python-pytest-black
10302 (package
10303 (name "python-pytest-black")
10304 (version "0.3.8")
10305 (source
10306 (origin
10307 (method url-fetch)
10308 (uri (pypi-uri "pytest-black" version))
10309 (sha256
10310 (base32
10311 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
10312 (build-system python-build-system)
10313 (propagated-inputs
10314 `(("python-pytest" ,python-pytest)
10315 ("python-black" ,python-black)
10316 ("python-toml" ,python-toml)))
10317 (native-inputs
10318 `(("python-setuptools-scm" ,python-setuptools-scm)))
10319 (home-page "https://github.com/shopkeep/pytest-black")
10320 (synopsis "Pytest plugin to enable format checking with black")
10321 (description
10322 "This package provides a pytest plugin to enable format checking with the
10323 Python code formatter \"black\".")
10324 (license license:expat)))
10325
10326 (define-public python-get-version
10327 (package
10328 (name "python-get-version")
10329 (version "2.1")
10330 (source
10331 (origin
10332 (method url-fetch)
10333 (uri (pypi-uri "get_version" version))
10334 (sha256
10335 (base32
10336 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
10337 (build-system python-build-system)
10338 (propagated-inputs
10339 `(("python-pygments" ,python-pygments)
10340 ("python-pytest" ,python-pytest)
10341 ("python-pytest-black" ,python-pytest-black)
10342 ("python-pytest-cov" ,python-pytest-cov)
10343 ("python-setuptools" ,python-setuptools)
10344 ("python-testpath" ,python-testpath)))
10345 (home-page "https://github.com/flying-sheep/get_version")
10346 (synopsis "Version helper in the spirit of versioneer")
10347 (description
10348 "This package provides a version helper that lets you automatically use
10349 the latest @code{vX.X.X} Git tag as the version in your Python package. It
10350 also supports getting the version from Python source distributions or, once
10351 your package is installed, via @code{pkg_resources} (part of
10352 @code{setuptools}).")
10353 (license license:gpl3+)))
10354
10355 (define-public python-legacy-api-wrap
10356 (package
10357 (name "python-legacy-api-wrap")
10358 (version "1.2")
10359 (source
10360 (origin
10361 (method url-fetch)
10362 (uri (pypi-uri "legacy-api-wrap" version))
10363 (sha256
10364 (base32
10365 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
10366 (build-system python-build-system)
10367 (propagated-inputs
10368 `(("python-get-version" ,python-get-version)
10369 ("python-pytest" ,python-pytest)
10370 ("python-pytest-black" ,python-pytest-black)
10371 ("python-pytest-cov" ,python-pytest-cov)
10372 ("python-setuptools" ,python-setuptools)))
10373 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
10374 (synopsis "Legacy API wrapper")
10375 (description "This module defines a decorator to wrap legacy APIs. The
10376 primary use case is APIs defined before keyword-only parameters existed.")
10377 (license license:gpl3+)))
10378
10379 (define-public python-pyasn1
10380 (package
10381 (name "python-pyasn1")
10382 (version "0.4.8")
10383 (source
10384 (origin
10385 (method url-fetch)
10386 (uri (pypi-uri "pyasn1" version))
10387 (sha256
10388 (base32
10389 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
10390 (build-system python-build-system)
10391 (home-page "http://pyasn1.sourceforge.net/")
10392 (synopsis "ASN.1 types and codecs")
10393 (description
10394 "This is an implementation of ASN.1 types and codecs in Python. It is
10395 suitable for a wide range of protocols based on the ASN.1 specification.")
10396 (license license:bsd-2)))
10397
10398 (define-public python2-pyasn1
10399 (package-with-python2 python-pyasn1))
10400
10401 (define-public python-pyasn1-modules
10402 (package
10403 (name "python-pyasn1-modules")
10404 (version "0.2.2")
10405 (source
10406 (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "pyasn1-modules" version))
10409 (sha256
10410 (base32
10411 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
10412 (build-system python-build-system)
10413 (propagated-inputs
10414 `(("python-pyasn1" ,python-pyasn1)))
10415 (home-page "https://sourceforge.net/projects/pyasn1/")
10416 (synopsis "ASN.1 codec implementations")
10417 (description
10418 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
10419 implementations of ASN.1-based codecs and protocols.")
10420 (license license:bsd-3)))
10421
10422 (define-public python2-pyasn1-modules
10423 (package-with-python2 python-pyasn1-modules))
10424
10425 (define-public python2-ipaddress
10426 (package
10427 (name "python2-ipaddress")
10428 (version "1.0.23")
10429 (source (origin
10430 (method url-fetch)
10431 (uri (pypi-uri "ipaddress" version))
10432 (sha256
10433 (base32
10434 "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
10435 (build-system python-build-system)
10436 (arguments
10437 `(#:python ,python-2))
10438 (home-page "https://github.com/phihag/ipaddress")
10439 (synopsis "IP address manipulation library")
10440 (description
10441 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
10442 in Python. This library is used to create, poke at, and manipulate IPv4 and
10443 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
10444 module to older versions of Python.")
10445 (license license:psfl)))
10446
10447 (define-public python-asn1tools
10448 (package
10449 (name "python-asn1tools")
10450 (version "0.158.0")
10451 (source
10452 (origin
10453 (method url-fetch)
10454 (uri (pypi-uri "asn1tools" version))
10455 (sha256
10456 (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
10457 (build-system python-build-system)
10458 (propagated-inputs
10459 `(("python-bitstruct" ,python-bitstruct)
10460 ("python-diskcache" ,python-diskcache)
10461 ("python-prompt-toolkit" ,python-prompt-toolkit)
10462 ("python-pyparsing" ,python-pyparsing)))
10463 (home-page "https://github.com/eerimoq/asn1tools")
10464 (synopsis "ASN.1 parsing, encoding and decoding")
10465 (description "This package provides ASN.1 parsing, encoding and decoding
10466 for Python, including constraints checking. It supports several
10467 codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
10468 for OER and UPER.")
10469 (license license:expat)))
10470
10471 (define-public python2-ipaddr
10472 (package
10473 (name "python2-ipaddr")
10474 (version "2.1.11")
10475 (source
10476 (origin
10477 (method url-fetch)
10478 (uri (pypi-uri "ipaddr" version))
10479 (sha256
10480 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
10481 (build-system python-build-system)
10482 (arguments
10483 `(#:python ,python-2 ;version 2 only
10484 #:phases
10485 (modify-phases %standard-phases
10486 (replace 'check
10487 (lambda _ (invoke "python" "ipaddr_test.py"))))))
10488 (home-page "https://github.com/google/ipaddr-py")
10489 (synopsis "IP address manipulation library")
10490 (description
10491 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
10492 IPv6 addresses and networks.
10493
10494 For new implementations you may prefer to use the standard module
10495 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
10496 versions of Python.")
10497 (license license:asl2.0)))
10498
10499 (define-public python-idna
10500 (package
10501 (name "python-idna")
10502 (version "2.10")
10503 (source
10504 (origin
10505 (method url-fetch)
10506 (uri (pypi-uri "idna" version))
10507 (sha256
10508 (base32
10509 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
10510 (build-system python-build-system)
10511 (home-page "https://github.com/kjd/idna")
10512 (synopsis "Internationalized domain names in applications")
10513 (description
10514 "This is a library to support the Internationalised Domain Names in
10515 Applications (IDNA) protocol as specified in RFC 5891. This version of the
10516 protocol is often referred to as “IDNA2008” and can produce different results
10517 from the earlier standard from 2003. The library is also intended to act as a
10518 suitable drop-in replacement for the “encodings.idna” module that comes with
10519 the Python standard library but currently only supports the older 2003
10520 specification.")
10521 (license license:bsd-4)))
10522
10523 (define-public python-idna-2.7
10524 (package (inherit python-idna)
10525 (version "2.7")
10526 (source (origin
10527 (method url-fetch)
10528 (uri (pypi-uri "idna" version))
10529 (sha256
10530 (base32
10531 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
10532
10533
10534 (define-public python2-idna
10535 (package-with-python2 python-idna))
10536
10537 (define-public python-libsass
10538 (package
10539 (name "python-libsass")
10540 (version "0.20.1")
10541 (source
10542 (origin
10543 ;; PyPI tarball is missing some test files.
10544 (method git-fetch)
10545 (uri (git-reference
10546 (url "https://github.com/sass/libsass-python")
10547 (commit version)))
10548 (file-name (git-file-name name version))
10549 (sha256
10550 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
10551 (build-system python-build-system)
10552 (arguments
10553 `(#:phases
10554 (modify-phases %standard-phases
10555 ;; Use Guix package of libsass instead of compiling from a checkout.
10556 (add-before 'build 'set-libsass
10557 (lambda _
10558 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
10559 #t))
10560 (replace 'check
10561 (lambda* (#:key inputs outputs #:allow-other-keys)
10562 (add-installed-pythonpath inputs outputs)
10563 (invoke "pytest" "sasstests.py"))))))
10564 (native-inputs
10565 `(("python-pytest" ,python-pytest)
10566 ("python-werkzeug" ,python-werkzeug)))
10567 (inputs
10568 `(("libsass" ,libsass)))
10569 (propagated-inputs
10570 `(("python-six" ,python-six)))
10571 (home-page "https://sass.github.io/libsass-python/")
10572 (synopsis "Straightforward binding of libsass for Python")
10573 (description
10574 "This package provides a simple Python extension module @code{sass} which
10575 is binding LibSass.")
10576 (license license:expat)))
10577
10578 (define-public python-idna-ssl
10579 (package
10580 (name "python-idna-ssl")
10581 (version "1.0.1")
10582 (source
10583 (origin
10584 (method url-fetch)
10585 (uri (pypi-uri "idna-ssl" version))
10586 (sha256
10587 (base32
10588 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
10589 (build-system python-build-system)
10590 (arguments
10591 `(#:tests? #f)) ;circular dependency with python-aiohttp
10592 (home-page "https://github.com/aio-libs/idna-ssl")
10593 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
10594 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
10595 domains support.")
10596 (license license:expat)))
10597
10598 (define-public python-pretend
10599 (package
10600 (name "python-pretend")
10601 (version "1.0.9")
10602 (source
10603 (origin
10604 (method url-fetch)
10605 (uri (pypi-uri "pretend" version))
10606 (sha256
10607 (base32
10608 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
10609 (build-system python-build-system)
10610 (home-page "https://github.com/alex/pretend")
10611 (synopsis "Library for stubbing in Python")
10612 (description
10613 "Pretend is a library to make stubbing with Python easier. Stubbing is a
10614 technique for writing tests. You may hear the term mixed up with mocks,
10615 fakes, or doubles. Basically, a stub is an object that returns pre-canned
10616 responses, rather than doing any computation.")
10617 (license license:bsd-3)))
10618
10619 (define-public python2-pretend
10620 (package-with-python2 python-pretend))
10621
10622 (define-public python-pip
10623 (package
10624 (name "python-pip")
10625 (version "20.2.4")
10626 (source
10627 (origin
10628 (method url-fetch)
10629 (uri (pypi-uri "pip" version))
10630 (sha256
10631 (base32
10632 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
10633 (build-system python-build-system)
10634 (arguments
10635 '(#:tests? #f)) ; there are no tests in the pypi archive.
10636 (home-page "https://pip.pypa.io/")
10637 (synopsis "Package manager for Python software")
10638 (description
10639 "Pip is a package manager for Python software, that finds packages on the
10640 Python Package Index (PyPI).")
10641 (license license:expat)))
10642
10643 (define-public python2-pip
10644 (package-with-python2 python-pip))
10645
10646 (define-public python-tlsh
10647 (package
10648 (name "python-tlsh")
10649 (version "3.4.5")
10650 (home-page "https://github.com/trendmicro/tlsh")
10651 (source
10652 (origin
10653 (method git-fetch)
10654 (uri (git-reference
10655 (url "https://github.com/trendmicro/tlsh")
10656 (commit (string-append "v" version))))
10657 (file-name (git-file-name name version))
10658 (sha256
10659 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
10660 (build-system cmake-build-system)
10661 (arguments
10662 '(#:out-of-source? #f
10663 #:phases (modify-phases %standard-phases
10664 (replace
10665 'install
10666 (lambda* (#:key outputs #:allow-other-keys)
10667 ;; Build and install the Python bindings. The underlying
10668 ;; C++ library is apparently not meant to be installed.
10669 (let ((out (assoc-ref outputs "out")))
10670 (with-directory-excursion "py_ext"
10671 (and (system* "python" "setup.py" "build")
10672 (system* "python" "setup.py" "install"
10673 (string-append "--prefix=" out))))))))))
10674 (inputs `(("python" ,python-wrapper))) ;for the bindings
10675 (synopsis "Fuzzy matching library for Python")
10676 (description
10677 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
10678 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
10679 value which can be used for similarity comparisons. Similar objects have
10680 similar hash values, which allows for the detection of similar objects by
10681 comparing their hash values. The byte stream should have a sufficient amount
10682 of complexity; for example, a byte stream of identical bytes will not generate
10683 a hash value.")
10684 (license license:asl2.0)))
10685
10686 (define-public python2-tlsh
10687 (package/inherit python-tlsh
10688 (name "python2-tlsh")
10689 (inputs `(("python" ,python-2)))))
10690
10691 (define-public python-termcolor
10692 (package
10693 (name "python-termcolor")
10694 (version "1.1.0")
10695 (source
10696 (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "termcolor" version))
10699 (sha256
10700 (base32
10701 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
10702 (build-system python-build-system)
10703 (arguments
10704 ;; There are no tests.
10705 `(#:tests? #f))
10706 (home-page "https://pypi.org/project/termcolor/")
10707 (synopsis "ANSII Color formatting for terminal output")
10708 (description
10709 "This package provides ANSII Color formatting for output in terminals.")
10710 (license license:expat)))
10711
10712 (define-public python2-termcolor
10713 (package-with-python2 python-termcolor))
10714
10715 (define-public python-terminaltables
10716 (package
10717 (name "python-terminaltables")
10718 (version "3.1.0")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "terminaltables" version))
10723 (sha256
10724 (base32
10725 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
10726 (build-system python-build-system)
10727 (home-page "https://github.com/Robpol86/terminaltables")
10728 (synopsis
10729 "Generate simple tables in terminals from a nested list of strings")
10730 (description
10731 "This package makes it easy to draw tables in terminal/console
10732 applications from a list of lists of strings. It supports multi-line rows.")
10733 (license license:expat)))
10734
10735 (define-public python-libarchive-c
10736 (package
10737 (name "python-libarchive-c")
10738 (version "2.9")
10739 (source (origin
10740 (method url-fetch)
10741 (uri (pypi-uri "libarchive-c" version))
10742 (sha256
10743 (base32
10744 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
10745 (build-system python-build-system)
10746 (arguments
10747 '(#:phases (modify-phases %standard-phases
10748 (add-before
10749 'build 'reference-libarchive
10750 (lambda* (#:key inputs #:allow-other-keys)
10751 ;; Retain the absolute file name of libarchive.so.
10752 (let ((libarchive (assoc-ref inputs "libarchive")))
10753 (substitute* "libarchive/ffi.py"
10754 (("find_library\\('archive'\\)")
10755 (string-append "'" libarchive
10756 "/lib/libarchive.so'"))))))
10757 (replace 'check
10758 (lambda _ (invoke "pytest" "-vv"))))))
10759 (native-inputs
10760 `(("python-mock" ,python-mock)
10761 ("python-pytest" ,python-pytest)))
10762 (inputs
10763 `(("libarchive" ,libarchive)))
10764 (home-page "https://github.com/Changaco/python-libarchive-c")
10765 (synopsis "Python interface to libarchive")
10766 (description
10767 "This package provides Python bindings to libarchive, a C library to
10768 access possibly compressed archives in many different formats. It uses
10769 Python's @code{ctypes} foreign function interface (FFI).")
10770 (license license:lgpl2.0+)))
10771
10772 (define-public python2-libarchive-c
10773 (package-with-python2 python-libarchive-c))
10774
10775 (define-public python-file
10776 (package/inherit file
10777 (name "python-file")
10778 (build-system python-build-system)
10779 (arguments
10780 '(#:tests? #f ;no tests
10781 #:configure-flags '("--single-version-externally-managed" "--root=/")
10782 #:phases (modify-phases %standard-phases
10783 (add-before 'build 'change-directory
10784 (lambda _
10785 (chdir "python")
10786 #t))
10787 (add-before 'build 'set-library-file-name
10788 (lambda* (#:key inputs #:allow-other-keys)
10789 (let ((file (assoc-ref inputs "file")))
10790 (substitute* "magic.py"
10791 (("find_library\\('magic'\\)")
10792 (string-append "'" file "/lib/libmagic.so'")))
10793 #t))))))
10794 (inputs `(("file" ,file)))
10795 (native-inputs (if (%current-target-system)
10796 `(("self" ,this-package))
10797 '()))
10798 (synopsis "Python bindings to the libmagic file type guesser")
10799 (description "This package provides Python bindings to the libmagic file
10800 type guesser.
10801
10802 Note that this module and the @code{python-magic} module both provide a
10803 @file{magic.py} file; these two modules, which are different and were
10804 developed separately, both serve the same purpose: provide Python bindings for
10805 libmagic.")))
10806
10807 (define-public python2-file
10808 (package-with-python2 python-file))
10809
10810 (define-public python-debian
10811 (package
10812 (name "python-debian")
10813 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
10814 (version "0.1.36")
10815 (source
10816 (origin
10817 ;; Use git-fetch, as pypi doesn't include test suite.
10818 (method git-fetch)
10819 (uri (git-reference
10820 (url home-page)
10821 (commit version)))
10822 (file-name (git-file-name name version))
10823 (sha256
10824 (base32
10825 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
10826 (build-system python-build-system)
10827 (arguments
10828 `(#:phases (modify-phases %standard-phases
10829 (add-after 'unpack 'remove-debian-specific-tests
10830 ;; python-apt, apt and dpkg are not yet available in guix,
10831 ;; and these tests heavily depend on them.
10832 (lambda _
10833 (delete-file "lib/debian/tests/test_deb822.py")
10834 (delete-file "lib/debian/tests/test_debfile.py")
10835 #t)))))
10836 (propagated-inputs
10837 `(("python-six" ,python-six)
10838 ("python-chardet" ,python-chardet)))
10839 (synopsis "Debian package related modules")
10840 (description
10841 ;; XXX: Use @enumerate instead of @itemize to work around
10842 ;; <http://bugs.gnu.org/21772>.
10843 "This package provides Python modules that abstract many formats of
10844 Debian-related files, such as:
10845
10846 @enumerate
10847 @item Debtags information;
10848 @item @file{debian/changelog} files;
10849 @item packages files, pdiffs;
10850 @item control files of single or multiple RFC822-style paragraphs---e.g.
10851 @file{debian/control}, @file{.changes}, @file{.dsc};
10852 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
10853 contained files and meta-information.
10854 @end enumerate\n")
10855
10856 ;; Modules are either GPLv2+ or GPLv3+.
10857 (license license:gpl3+)))
10858
10859 (define-public python-json-spec
10860 (package
10861 (name "python-json-spec")
10862 (version "0.10.1")
10863 (source
10864 (origin
10865 (method url-fetch)
10866 (uri (pypi-uri "json-spec" version))
10867 (sha256
10868 (base32
10869 "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
10870 (build-system python-build-system)
10871 (propagated-inputs
10872 `(("python-pathlib" ,python-pathlib)
10873 ("python-six" ,python-six)))
10874 (native-inputs
10875 `(("python-pytest" ,python-pytest)))
10876 (home-page "http://py.errorist.io/json-spec")
10877 (synopsis
10878 "JSON Schema, JSON Pointer and JSON Reference for Python")
10879 (description
10880 "This Python library implements several JSON specs, like JSON Schema,
10881 JSON Reference and JSON Pointer.")
10882 (license license:bsd-3)))
10883
10884 (define-public python-fastjsonschema
10885 (package
10886 (name "python-fastjsonschema")
10887 (version "2.15.1")
10888 (source
10889 (origin
10890 (method url-fetch)
10891 (uri (pypi-uri "fastjsonschema" version))
10892 (sha256
10893 (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
10894 (build-system python-build-system)
10895 (arguments
10896 `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
10897 #:phases
10898 (modify-phases %standard-phases
10899 (replace 'check
10900 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10901 (when tests?
10902 (invoke "pytest" "-vv" "-m" "not benchmark")))))))
10903 (native-inputs
10904 `(("python-colorama" ,python-colorama)
10905 ("python-json-spec" ,python-json-spec)
10906 ("python-jsonschema" ,python-jsonschema)
10907 ("python-pylint" ,python-pylint)
10908 ("python-pytest" ,python-pytest-6)
10909 ("python-pytest-benchmark"
10910 ,python-pytest-benchmark)
10911 ("python-pytest-cache" ,python-pytest-cache)
10912 ("python-validictory" ,python-validictory)))
10913 (home-page
10914 "https://github.com/horejsek/python-fastjsonschema")
10915 (synopsis
10916 "Fast Python implementation of JSON schema")
10917 (description
10918 "This library implements validation of JSON documents by JSON schema for
10919 drafts 04, 06 and 07.")
10920 (license license:bsd-3)))
10921
10922 (define-public python-nbformat
10923 (package
10924 (name "python-nbformat")
10925 (version "5.1.3")
10926 ;; The PyPi release tarball lacks some test cases and test data.
10927 (source (origin
10928 (method git-fetch)
10929 (uri (git-reference
10930 (url "https://github.com/jupyter/nbformat.git")
10931 (commit version)))
10932 (sha256
10933 (base32
10934 "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
10935 (file-name (git-file-name name version))))
10936 (build-system python-build-system)
10937 (arguments
10938 `(#:phases
10939 (modify-phases %standard-phases
10940 (replace 'check
10941 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
10942 (when tests?
10943 (invoke "pytest" "-vv")))))))
10944 (propagated-inputs
10945 `(("python-ipython-genutils" ,python-ipython-genutils)
10946 ("python-jsonschema" ,python-jsonschema)
10947 ("python-jupyter-core" ,python-jupyter-core)
10948 ("python-traitlets" ,python-traitlets)))
10949 (native-inputs
10950 `(("python-pytest" ,python-pytest)
10951 ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active
10952 ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
10953 ; testing only.
10954 ("python-testpath" ,python-testpath)))
10955 (home-page "https://jupyter.org")
10956 (synopsis "Jupyter Notebook format")
10957 (description "This package provides the reference implementation of the
10958 Jupyter Notebook format and Python APIs for working with notebooks.")
10959 (properties `((python2-variant . ,(delay python2-nbformat))))
10960 (license license:bsd-3)))
10961
10962 (define-public python2-nbformat
10963 (let ((parent (package-with-python2
10964 (strip-python2-variant python-nbformat))))
10965 (package
10966 (inherit parent)
10967 (version "4.4.0")
10968 (source
10969 (origin
10970 (method url-fetch)
10971 (uri (pypi-uri "nbformat" version))
10972 (sha256
10973 (base32
10974 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp")))))))
10975
10976 (define-public python-bleach
10977 (package
10978 (name "python-bleach")
10979 (version "3.1.5")
10980 (source
10981 (origin
10982 (method url-fetch)
10983 (uri (pypi-uri "bleach" version))
10984 (sha256
10985 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
10986 (build-system python-build-system)
10987 (propagated-inputs
10988 `(("python-webencodings" ,python-webencodings)
10989 ("python-six" ,python-six)))
10990 (native-inputs
10991 `(("python-datrie" ,python-datrie)
10992 ("python-genshi" ,python-genshi)
10993 ("python-lxml" ,python-lxml)
10994 ("python-pytest" ,python-pytest)))
10995 (home-page "https://github.com/mozilla/bleach")
10996 (synopsis "Whitelist-based HTML-sanitizing tool")
10997 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
10998 (license license:asl2.0)))
10999
11000 (define-public python2-bleach
11001 (package-with-python2 python-bleach))
11002
11003 (define-public python-entrypoints
11004 (package
11005 (name "python-entrypoints")
11006 (version "0.3")
11007 (source
11008 (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "entrypoints" version))
11011 (sha256
11012 (base32
11013 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
11014 (build-system python-build-system)
11015 ;; The package does not come with a setup.py file, so we have to generate
11016 ;; one ourselves.
11017 (arguments
11018 `(#:tests? #f
11019 #:phases
11020 (modify-phases %standard-phases
11021 (add-after 'unpack 'create-setup.py
11022 (lambda _
11023 (call-with-output-file "setup.py"
11024 (lambda (port)
11025 (format port "\
11026 from setuptools import setup
11027 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
11028 " ,version))))))))
11029 (home-page "https://github.com/takluyver/entrypoints")
11030 (synopsis "Discover and load entry points from installed Python packages")
11031 (description "Entry points are a way for Python packages to advertise
11032 objects with some common interface. The most common examples are
11033 @code{console_scripts} entry points, which define shell commands by
11034 identifying a Python function to run. The @code{entrypoints} module contains
11035 functions to find and load entry points.")
11036 (license license:expat)))
11037
11038 (define-public python2-entrypoints
11039 (package-with-python2 python-entrypoints))
11040
11041 (define-public python-epc
11042 (package
11043 (name "python-epc")
11044 (version "0.0.5")
11045 (source
11046 (origin
11047 (method url-fetch)
11048 (uri (pypi-uri "epc" version))
11049 (sha256
11050 (base32
11051 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
11052 (build-system python-build-system)
11053 (propagated-inputs
11054 `(("python-sexpdata" ,python-sexpdata)))
11055 (native-inputs
11056 `(("python-nose" ,python-nose)))
11057 (home-page "https://github.com/tkf/python-epc")
11058 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
11059 (description
11060 "Python-EPC can call elisp functions from Python and Python functions
11061 from elisp.")
11062 (license license:gpl3)))
11063
11064 (define-public python-forex-python
11065 (package
11066 (name "python-forex-python")
11067 (version "1.5")
11068 (source
11069 (origin
11070 (method url-fetch)
11071 (uri (pypi-uri "forex-python" version))
11072 (sha256
11073 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
11074 (build-system python-build-system)
11075 (arguments
11076 ;; Tests are not included in the PyPI tarball. Also, the tests in the
11077 ;; repository require online data.
11078 `(#:tests? #f))
11079 (propagated-inputs
11080 `(("python-requests" ,python-requests)
11081 ("python-simplejson" ,python-simplejson)))
11082 (home-page "https://github.com/MicroPyramid/forex-python")
11083 (synopsis "Foreign exchange rates and currency conversion")
11084 (description
11085 "@code{python-forex-python} can be used to manipulate foreign
11086 exchange rates and to operate currency conversions.
11087
11088 Features:
11089 @itemize
11090 @item List all currency rates.
11091 @item BitCoin price for all currencies.
11092 @item Converting amount to BitCoins.
11093 @item Get historical rates for any day since 1999.
11094 @item Conversion rate for one currency(ex; USD to INR).
11095 @item Convert amount from one currency to other.('USD 10$' to INR).
11096 @item Currency symbols.
11097 @item Currency names.
11098 @end itemize")
11099 (license license:expat)))
11100
11101 (define-public python-simpleeval
11102 (package
11103 (name "python-simpleeval")
11104 (version "0.9.10")
11105 (source
11106 (origin
11107 (method url-fetch)
11108 (uri (pypi-uri "simpleeval" version))
11109 (sha256
11110 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
11111 (build-system python-build-system)
11112 (home-page "https://github.com/danthedeckie/simpleeval")
11113 (synopsis "Simple, safe single expression evaluator library")
11114 (description
11115 "This package provides a quick single file library for easily adding
11116 evaluatable expressions into python projects. Say you want to allow a user
11117 to set an alarm volume, which could depend on the time of day, alarm level,
11118 how many previous alarms had gone off, and if there is music playing at the
11119 time.")
11120 (license license:expat)))
11121
11122 (define-public python-nbconvert
11123 (package
11124 (name "python-nbconvert")
11125 (version "6.0.7")
11126 (source
11127 (origin
11128 (method url-fetch)
11129 (uri (pypi-uri "nbconvert" version))
11130 (sha256
11131 (base32
11132 "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
11133 (build-system python-build-system)
11134 (arguments
11135 `(#:phases
11136 (modify-phases %standard-phases
11137 (add-after 'unpack 'fix-paths-and-tests
11138 (lambda _
11139 ;; Use pandoc binary from input.
11140 (substitute* "nbconvert/utils/pandoc.py"
11141 (("'pandoc'") (string-append "'" (which "pandoc") "'")))
11142 ;; Same for LaTeX.
11143 (substitute* "nbconvert/exporters/pdf.py"
11144 (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
11145 (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
11146 ;; Make sure tests are not skipped.
11147 (substitute* (find-files "." "test_.+\\.py$")
11148 (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
11149 ;; Pandoc is never missing, disable test.
11150 (substitute* "nbconvert/utils/tests/test_pandoc.py"
11151 (("import os" all) (string-append all "\nimport pytest"))
11152 (("(.+)(def test_pandoc_available)" all indent def)
11153 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11154 indent def)))
11155 ;; Not installing pyppeteer, delete test.
11156 (delete-file "nbconvert/exporters/tests/test_webpdf.py")
11157 (substitute* "nbconvert/tests/test_nbconvertapp.py"
11158 (("(.+)(def test_webpdf_with_chromium)" all indent def)
11159 (string-append indent "@pytest.mark.skip('disabled by guix')\n"
11160 indent def)))))
11161 (replace 'check
11162 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11163 (when tests?
11164 ;; Some tests invoke the installed nbconvert binary.
11165 (add-installed-pythonpath inputs outputs)
11166 ;; Tries to write to this path.
11167 (unsetenv "JUPYTER_CONFIG_DIR")
11168 ;; Tests depend on templates installed to output.
11169 (setenv "JUPYTER_PATH"
11170 (string-append
11171 (assoc-ref outputs "out")
11172 "/share/jupyter:"
11173 (getenv "JUPYTER_PATH")))
11174 ;; Some tests need HOME
11175 (setenv "HOME" "/tmp")
11176 (invoke "pytest" "-vv")))))))
11177 (inputs
11178 `(("pandoc" ,pandoc)
11179 ;; XXX: Disabled, needs substitute*.
11180 ;;("inkscape" ,inkscape)
11181 ))
11182 (native-inputs
11183 `(("python-ipykernel" ,python-ipykernel)
11184 ;; XXX: Disabled, not in guix.
11185 ;;("python-pyppeteer" ,python-pyppeteer)
11186 ("python-pytest" ,python-pytest)
11187 ("python-pytest-cov" ,python-pytest-cov)
11188 ("python-pytest-dependency" ,python-pytest-dependency)
11189 ("texlive" ,(texlive-union (list texlive-adjustbox
11190 texlive-amsfonts/patched
11191 texlive-booktabs
11192 texlive-caption
11193 texlive-eurosym
11194 texlive-fonts-rsfs
11195 texlive-generic-ulem
11196 texlive-iftex
11197 texlive-jknappen
11198 texlive-latex-amsmath
11199 texlive-latex-enumitem
11200 texlive-latex-fancyvrb
11201 texlive-latex-float
11202 texlive-latex-fontspec
11203 texlive-latex-geometry
11204 texlive-latex-hyperref
11205 texlive-latex-jknapltx
11206 texlive-latex-ms
11207 texlive-latex-oberdiek
11208 texlive-latex-parskip
11209 texlive-latex-trimspaces
11210 texlive-latex-upquote
11211 texlive-latex-ucs
11212 texlive-lm
11213 texlive-mathpazo
11214 texlive-tcolorbox
11215 texlive-titling
11216 texlive-tools
11217 texlive-xcolor
11218 texlive-zapfding)))))
11219 (propagated-inputs
11220 `(("python-bleach" ,python-bleach)
11221 ("python-defusedxml" ,python-defusedxml)
11222 ("python-entrypoints" ,python-entrypoints)
11223 ("python-jinja2" ,python-jinja2)
11224 ("python-jupyter-core" ,python-jupyter-core)
11225 ("python-mistune" ,python-mistune)
11226 ("python-nbclient" ,python-nbclient)
11227 ("python-nbformat" ,python-nbformat)
11228 ("python-pandocfilters" ,python-pandocfilters)
11229 ("python-pygments" ,python-pygments)
11230 ("python-jupyterlab-pygments" ,python-jupyterlab-pygments)
11231 ("python-testpath" ,python-testpath)
11232 ("python-traitlets" ,python-traitlets)
11233 ;; Required, even if [serve] is not used.
11234 ("python-tornado" ,python-tornado-6)))
11235 (home-page "https://jupyter.org")
11236 (synopsis "Converting Jupyter Notebooks")
11237 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
11238 notebooks to various other formats via Jinja templates. It allows you to
11239 convert an @code{.ipynb} notebook file into various static formats including:
11240
11241 @enumerate
11242 @item HTML
11243 @item LaTeX
11244 @item PDF
11245 @item Reveal JS
11246 @item Markdown (md)
11247 @item ReStructured Text (rst)
11248 @item executable script
11249 @end enumerate\n")
11250 (license license:bsd-3)))
11251
11252 (define-public python-notebook
11253 (package
11254 (name "python-notebook")
11255 (version "6.3.0")
11256 (source (origin
11257 (method url-fetch)
11258 (uri (pypi-uri "notebook" version))
11259 (sha256
11260 (base32
11261 "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
11262 (build-system python-build-system)
11263 (arguments
11264 `(#:phases
11265 (modify-phases %standard-phases
11266 (replace 'check
11267 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11268 ;; These tests require a browser
11269 (delete-file-recursively "notebook/tests/selenium")
11270 (when tests?
11271 (add-installed-pythonpath inputs outputs)
11272 ;; Some tests do not expect all files to be installed in the
11273 ;; same directory, but JUPYTER_PATH contains multiple entries.
11274 (unsetenv "JUPYTER_PATH")
11275 ;; Some tests need HOME
11276 (setenv "HOME" "/tmp")
11277 (with-directory-excursion "/tmp"
11278 (invoke "pytest" "-vv"
11279 ;; TODO: This tests fails because nbconvert does not
11280 ;; list "python" as a format.
11281 "-k" "not test_list_formats"))))))))
11282 (propagated-inputs
11283 `(("python-argon2-cffi" ,python-argon2-cffi)
11284 ("python-ipykernel" ,python-ipykernel)
11285 ("python-ipython-genutils" ,python-ipython-genutils)
11286 ("python-jinja2" ,python-jinja2)
11287 ("python-jupyter-client" ,python-jupyter-client)
11288 ("python-jupyter-core" ,python-jupyter-core)
11289 ("python-nbconvert" ,python-nbconvert)
11290 ("python-nbformat" ,python-nbformat)
11291 ("python-prometheus-client" ,python-prometheus-client)
11292 ("python-pyzmq" ,python-pyzmq)
11293 ("python-send2trash" ,python-send2trash)
11294 ("python-terminado" ,python-terminado)
11295 ("python-tornado" ,python-tornado-6)
11296 ("python-traitlets" ,python-traitlets)))
11297 (native-inputs
11298 `(("python-coverage" ,python-coverage)
11299 ("python-nbval" ,python-nbval)
11300 ("python-pytest" ,python-pytest)
11301 ("python-pytest-cov" ,python-pytest-cov)
11302 ("python-requests" ,python-requests)
11303 ("python-requests-unixsocket" ,python-requests-unixsocket)))
11304 (home-page "https://jupyter.org/")
11305 (synopsis "Web-based notebook environment for interactive computing")
11306 (description
11307 "The Jupyter HTML notebook is a web-based notebook environment for
11308 interactive computing.")
11309 (license license:bsd-3)))
11310
11311 (define-public python-widgetsnbextension
11312 (package
11313 (name "python-widgetsnbextension")
11314 (version "3.5.1")
11315 (source
11316 (origin
11317 (method url-fetch)
11318 (uri (pypi-uri "widgetsnbextension" version))
11319 (sha256
11320 (base32
11321 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
11322 (build-system python-build-system)
11323 (propagated-inputs
11324 `(("python-notebook" ,python-notebook)))
11325 (home-page "https://ipython.org")
11326 (synopsis "IPython HTML widgets for Jupyter")
11327 (description "This package provides interactive HTML widgets for Jupyter
11328 notebooks.")
11329 (license license:bsd-3)))
11330
11331 (define-public python-ipywidgets
11332 (package
11333 (name "python-ipywidgets")
11334 (version "7.6.3")
11335 (source
11336 (origin
11337 (method url-fetch)
11338 (uri (pypi-uri "ipywidgets" version))
11339 (sha256
11340 (base32
11341 "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
11342 (build-system python-build-system)
11343 (propagated-inputs
11344 `(("python-ipykernel" ,python-ipykernel)
11345 ("python-ipython" ,python-ipython)
11346 ("python-jupyterlab-widgets" ,python-jupyterlab-widgets)
11347 ("python-nbformat" ,python-nbformat)
11348 ("python-traitlets" ,python-traitlets)
11349 ("python-widgetsnbextension" ,python-widgetsnbextension)))
11350 (native-inputs
11351 `(("python-mock" ,python-mock)
11352 ("python-pytest" ,python-pytest)
11353 ("python-pytest-cov" ,python-pytest-cov)))
11354 (home-page "https://ipython.org")
11355 (synopsis "IPython HTML widgets for Jupyter")
11356 (description "Ipywidgets are interactive HTML widgets for Jupyter
11357 notebooks and the IPython kernel. Notebooks come alive when interactive
11358 widgets are used. Users gain control of their data and can visualize changes
11359 in the data.")
11360 (license license:bsd-3)))
11361
11362 (define-public python-jupyter-console
11363 (package
11364 (name "python-jupyter-console")
11365 (version "6.1.0")
11366 (source
11367 (origin
11368 (method url-fetch)
11369 (uri (pypi-uri "jupyter_console" version))
11370 (sha256
11371 (base32
11372 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
11373 (build-system python-build-system)
11374 (propagated-inputs
11375 `(("python-ipykernel" ,python-ipykernel)
11376 ("python-jupyter-client" ,python-jupyter-client)
11377 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
11378 ("python-pygments" ,python-pygments)))
11379 (native-inputs
11380 `(("python-nose" ,python-nose)))
11381 (home-page "https://jupyter.org")
11382 (synopsis "Jupyter terminal console")
11383 (description "This package provides a terminal-based console frontend for
11384 Jupyter kernels. It also allows for console-based interaction with non-Python
11385 Jupyter kernels such as IJulia and IRKernel.")
11386 (license license:bsd-3)))
11387
11388 ;; The python-ipython and python-jupyter-console require each other. To get
11389 ;; the functionality in both packages working, strip down the
11390 ;; python-jupyter-console package when using it as an input to python-ipython.
11391 (define python-jupyter-console-minimal
11392 (package/inherit python-jupyter-console
11393 (name "python-jupyter-console-minimal")
11394 (arguments
11395 (substitute-keyword-arguments
11396 (package-arguments python-jupyter-console)
11397 ((#:phases phases)
11398 `(modify-phases ,phases
11399 (add-after 'install 'delete-bin
11400 (lambda* (#:key outputs #:allow-other-keys)
11401 ;; Delete the bin files, to avoid conflicts in profiles
11402 ;; where python-ipython and python-jupyter-console are
11403 ;; both present.
11404 (delete-file-recursively
11405 (string-append
11406 (assoc-ref outputs "out") "/bin"))))))))
11407 ;; Remove the python-ipython propagated input, to avoid the cycle
11408 (propagated-inputs
11409 (alist-delete
11410 "python-ipython"
11411 (package-propagated-inputs python-jupyter-console)))))
11412
11413 (define-public python-qtconsole
11414 (package
11415 (name "python-qtconsole")
11416 (version "4.4.3")
11417 (source
11418 (origin
11419 (method url-fetch)
11420 (uri (pypi-uri "qtconsole" version))
11421 (sha256
11422 (base32
11423 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
11424 (build-system python-build-system)
11425 (arguments
11426 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
11427 ;; but we only have the LTS version 5.x. This means that there might be
11428 ;; runtime errors, but since this is a dependency of the Jupyter package,
11429 ;; and Jupyter can be used without the qtconsole we can overlook this for
11430 ;; now.
11431 `(#:tests? #f
11432 #:phases
11433 (modify-phases %standard-phases
11434 (add-before 'check 'pre-check
11435 (lambda _
11436 (setenv "QT_QPA_PLATFORM" "offscreen")
11437 #t)))))
11438 (propagated-inputs
11439 `(("python-ipykernel" ,python-ipykernel)
11440 ("python-ipython" ,python-ipython)))
11441 (native-inputs
11442 `(("python-pytest" ,python-pytest)))
11443 (home-page "https://jupyter.org")
11444 (synopsis "Jupyter Qt console")
11445 (description "This package provides a Qt-based console for Jupyter with
11446 support for rich media output.")
11447 (license license:bsd-3)))
11448
11449 (define-public python-jsbeautifier
11450 (package
11451 (name "python-jsbeautifier")
11452 (version "1.10.2")
11453 (home-page "https://github.com/beautify-web/js-beautify")
11454 (source (origin
11455 (method git-fetch)
11456 (uri (git-reference
11457 (url home-page)
11458 (commit (string-append "v" version))))
11459 (file-name (git-file-name name version))
11460 (sha256
11461 (base32
11462 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
11463 (build-system python-build-system)
11464 (arguments
11465 `(#:phases (modify-phases %standard-phases
11466 (add-after 'unpack 'chdir
11467 (lambda _
11468 ;; The upstream Git repository contains all the code,
11469 ;; but this package only builds the python code.
11470 (chdir "python")
11471 #t))
11472 (add-after 'unpack 'patch-python-six-requirements
11473 (lambda _
11474 (substitute* "python/setup.py"
11475 (("six>=1.12.0")
11476 "six>=1.11.0"))
11477 #t)))))
11478 (propagated-inputs
11479 `(("python-editorconfig" ,python-editorconfig)
11480 ("python-six" ,python-six)))
11481 (native-inputs
11482 `(("python-pytest" ,python-pytest)))
11483 (synopsis "JavaScript unobfuscator and beautifier")
11484 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
11485 popular online obfuscators.")
11486 (license license:expat)))
11487
11488 (define-public jupyter
11489 (package
11490 (name "jupyter")
11491 (version "1.0.0")
11492 (source
11493 (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "jupyter" version))
11496 (sha256
11497 (base32
11498 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
11499 (build-system python-build-system)
11500 (arguments '(#:tests? #f)) ; there are none.
11501 (propagated-inputs
11502 `(("python-ipykernel" ,python-ipykernel)
11503 ("python-ipywidgets" ,python-ipywidgets)
11504 ("python-jupyter-console" ,python-jupyter-console)
11505 ("python-nbconvert" ,python-nbconvert)
11506 ("python-notebook" ,python-notebook)
11507 ("python-qtconsole" ,python-qtconsole)))
11508 (home-page "https://jupyter.org")
11509 (synopsis "Web application for interactive documents")
11510 (description
11511 "The Jupyter Notebook is a web application that allows you to create and
11512 share documents that contain live code, equations, visualizations and
11513 explanatory text. Uses include: data cleaning and transformation, numerical
11514 simulation, statistical modeling, machine learning and much more.")
11515 (license license:bsd-3)))
11516
11517 (define-public python-chardet
11518 (package
11519 (name "python-chardet")
11520 (version "3.0.4")
11521 (source
11522 (origin
11523 (method url-fetch)
11524 (uri (pypi-uri "chardet" version))
11525 (sha256
11526 (base32
11527 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
11528 (native-inputs
11529 `(("python-hypothesis" ,python-hypothesis)
11530 ("python-pytest" ,python-pytest)
11531 ("python-pytest-runner" ,python-pytest-runner)))
11532 (build-system python-build-system)
11533 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
11534 (arguments `(#:tests? #f))
11535 (home-page "https://github.com/chardet/chardet")
11536 (synopsis "Universal encoding detector for Python 2 and 3")
11537 (description
11538 "This package provides @code{chardet}, a Python module that can
11539 automatically detect a wide range of file encodings.")
11540 (license license:lgpl2.1+)))
11541
11542 (define-public python2-chardet
11543 (package-with-python2 python-chardet))
11544
11545 (define-public python-docopt
11546 (package
11547 (name "python-docopt")
11548 (version "0.6.2")
11549 (source
11550 (origin
11551 (method git-fetch)
11552 ;; The release on PyPI does not include tests.
11553 (uri (git-reference
11554 (url "https://github.com/docopt/docopt")
11555 (commit version)))
11556 (file-name (git-file-name name version))
11557 (sha256
11558 (base32
11559 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
11560 (build-system python-build-system)
11561 (native-inputs
11562 `(("python-pytest" ,python-pytest)))
11563 (arguments
11564 `(#:phases
11565 (modify-phases %standard-phases
11566 (replace 'check
11567 (lambda _ (invoke "py.test"))))))
11568 (home-page "http://docopt.org")
11569 (synopsis "Command-line interface description language for Python")
11570 (description "This library allows the user to define a command-line
11571 interface from a program's help message rather than specifying it
11572 programmatically with command-line parsers like @code{getopt} and
11573 @code{argparse}.")
11574 (license license:expat)))
11575
11576 (define-public python2-docopt
11577 (package-with-python2 python-docopt))
11578
11579 (define-public python-pythondialog
11580 (package
11581 (name "python-pythondialog")
11582 (version "3.4.0")
11583 (source
11584 (origin
11585 (method url-fetch)
11586 (uri (pypi-uri "pythondialog" version))
11587 (sha256
11588 (base32
11589 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
11590 (build-system python-build-system)
11591 (arguments
11592 `(#:phases
11593 (modify-phases %standard-phases
11594 (add-after 'unpack 'patch-path
11595 (lambda* (#:key inputs #:allow-other-keys)
11596 (let* ((dialog (assoc-ref inputs "dialog")))
11597 ;; Since this library really wants to grovel the search path, we
11598 ;; must hardcode dialog's store path into it.
11599 (substitute* "dialog.py"
11600 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
11601 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
11602 #t))))
11603 #:tests? #f)) ; no test suite
11604 (propagated-inputs
11605 `(("dialog" ,dialog)))
11606 (home-page "http://pythondialog.sourceforge.net/")
11607 (synopsis "Python interface to the UNIX dialog utility")
11608 (description "A Python wrapper for the dialog utility. Its purpose is to
11609 provide an easy to use, pythonic and comprehensive Python interface to dialog.
11610 This allows one to make simple text-mode user interfaces on Unix-like systems")
11611 (license license:lgpl2.1)
11612 (properties `((python2-variant . ,(delay python2-pythondialog))))))
11613
11614 (define-public python2-pythondialog
11615 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
11616 (package
11617 (inherit base)
11618 (version (package-version python-pythondialog))
11619 (source (origin
11620 (method url-fetch)
11621 (uri (pypi-uri "python2-pythondialog" version))
11622 (sha256
11623 (base32
11624 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
11625
11626 (define-public python-configobj
11627 (package
11628 (name "python-configobj")
11629 (version "5.0.6")
11630 (source (origin
11631 (method url-fetch)
11632 (uri (pypi-uri "configobj" version))
11633 (sha256
11634 (base32
11635 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
11636 ;; Patch setup.py so it looks for python-setuptools, which is
11637 ;; required to parse the keyword 'install_requires' in setup.py.
11638 (patches (search-patches "python-configobj-setuptools.patch"))))
11639 (build-system python-build-system)
11640 (propagated-inputs
11641 `(("python-six" ,python-six)))
11642 (synopsis "Config file reading, writing and validation")
11643 (description "ConfigObj is a simple but powerful config file reader and
11644 writer: an ini file round tripper. Its main feature is that it is very easy to
11645 use, with a straightforward programmer’s interface and a simple syntax for
11646 config files.")
11647 (home-page "https://github.com/DiffSK/configobj")
11648 (license license:bsd-3)))
11649
11650 (define-public python2-configobj
11651 (package-with-python2 python-configobj))
11652
11653 (define-public python-configargparse
11654 (package
11655 (name "python-configargparse")
11656 (version "1.2.3")
11657 (source (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "ConfigArgParse" version))
11660 (sha256
11661 (base32
11662 "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
11663 (build-system python-build-system)
11664 (native-inputs
11665 `(("python-pyyaml" ,python-pyyaml)))
11666 (arguments
11667 `(#:phases
11668 (modify-phases %standard-phases
11669 (replace 'check
11670 (lambda _
11671 ;; Bypass setuptools-shim because one test relies on "setup.py"
11672 ;; being the first argument passed to the python call.
11673 ;;
11674 ;; NOTE: Many tests do not run because they rely on Python's
11675 ;; built-in test.test_argparse, but we remove the unit tests from
11676 ;; our Python installation.
11677 (invoke "python" "setup.py" "test"))))))
11678 (synopsis "Replacement for argparse")
11679 (description "A drop-in replacement for argparse that allows options to also
11680 be set via config files and/or environment variables.")
11681 (home-page "https://github.com/bw2/ConfigArgParse")
11682 (license license:expat)))
11683
11684 (define-public python-argparse-manpage
11685 (package
11686 (name "python-argparse-manpage")
11687 (version "1.1")
11688 (source
11689 (origin
11690 (method url-fetch)
11691 (uri (pypi-uri "argparse-manpage" version))
11692 (sha256
11693 (base32
11694 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
11695 (build-system python-build-system)
11696 (home-page "https://github.com/praiskup/argparse-manpage")
11697 (synopsis "Build manual page from Python's ArgumentParser object")
11698 (description
11699 "This package provides tools to build manual pages from Python's
11700 @code{ArgumentParser} object.")
11701 (license license:asl2.0)))
11702
11703 (define-public python-contextlib2
11704 (package
11705 (name "python-contextlib2")
11706 (version "0.6.0.post1")
11707 (source
11708 (origin
11709 (method url-fetch)
11710 (uri (pypi-uri "contextlib2" version))
11711 (sha256
11712 (base32
11713 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
11714 (build-system python-build-system)
11715 (home-page "https://contextlib2.readthedocs.org/")
11716 (synopsis "Tools for decorators and context managers")
11717 (description "This module is primarily a backport of the Python
11718 3.2 contextlib to earlier Python versions. Like contextlib, it
11719 provides utilities for common tasks involving decorators and context
11720 managers. It also contains additional features that are not part of
11721 the standard library.")
11722 (properties `((python2-variant . ,(delay python2-contextlib2))))
11723 (license license:psfl)))
11724
11725 (define-public python2-contextlib2
11726 (let ((base (package-with-python2
11727 (strip-python2-variant python-contextlib2))))
11728 (package/inherit base
11729 (arguments
11730 (substitute-keyword-arguments (package-arguments base)
11731 ((#:phases phases)
11732 `(modify-phases ,phases
11733 (replace 'check
11734 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
11735 (native-inputs
11736 `(("python2-unittest2" ,python2-unittest2))))))
11737
11738 ;; This package is used by python2-pytest via python2-importlib-metadata,
11739 ;; and thus can not depend on python-unittest2 (which depends on pytest).
11740 (define-public python2-contextlib2-bootstrap
11741 (hidden-package
11742 (package/inherit
11743 python2-contextlib2
11744 (name "python2-contextlib2-bootstrap")
11745 (arguments
11746 `(#:tests? #f
11747 ,@(package-arguments python2-contextlib2)))
11748 (native-inputs '()))))
11749
11750 (define-public python-texttable
11751 (package
11752 (name "python-texttable")
11753 (version "1.6.2")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "texttable" version))
11758 (sha256
11759 (base32
11760 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
11761 (build-system python-build-system)
11762 (arguments
11763 `(#:phases
11764 (modify-phases %standard-phases
11765 (replace 'check
11766 (lambda _ (invoke "pytest" "tests.py"))))))
11767 (native-inputs
11768 `(("python-pytest" ,python-pytest)))
11769 (home-page "https://github.com/foutaise/texttable/")
11770 (synopsis "Python module for creating simple ASCII tables")
11771 (description "Texttable is a Python module for creating simple ASCII
11772 tables.")
11773 (license license:expat)))
11774
11775 (define-public python2-texttable
11776 (package-with-python2 python-texttable))
11777
11778 (define-public python-atomicwrites
11779 (package
11780 (name "python-atomicwrites")
11781 (version "1.3.0")
11782 (source (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "atomicwrites" version))
11785 (sha256
11786 (base32
11787 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
11788 (build-system python-build-system)
11789 (synopsis "Atomic file writes in Python")
11790 (description "Library for atomic file writes using platform dependent tools
11791 for atomic file system operations.")
11792 (home-page "https://github.com/untitaker/python-atomicwrites")
11793 (license license:expat)))
11794
11795 (define-public python2-atomicwrites
11796 (package-with-python2 python-atomicwrites))
11797
11798 (define-public python-qstylizer
11799 (package
11800 (name "python-qstylizer")
11801 (version "0.1.10")
11802 (source
11803 (origin
11804 (method git-fetch)
11805 (uri (git-reference
11806 (url "https://github.com/blambright/qstylizer")
11807 (commit version)))
11808 (file-name (git-file-name name version))
11809 (sha256
11810 (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
11811 (build-system python-build-system)
11812 (arguments
11813 `(#:test-target "pytest"
11814 #:phases
11815 (modify-phases %standard-phases
11816 (add-before 'build 'set-pbr-version
11817 (lambda _
11818 (setenv "PBR_VERSION" "3.0.1"))))))
11819 (native-inputs
11820 `(("python-pbr" ,python-pbr)
11821 ("python-pytest" ,python-pytest)
11822 ("python-pytest-catchlog" ,python-pytest-catchlog)
11823 ("python-pytest-cov" ,python-pytest-cov)
11824 ("python-pytest-mock" ,python-pytest-mock)
11825 ("python-pytest-runner" ,python-pytest-runner)
11826 ("python-pytest-xdist" ,python-pytest-xdist)))
11827 (propagated-inputs
11828 `(("python-inflection" ,python-inflection)
11829 ("python-tinycss" ,python-tinycss)))
11830 (home-page "https://github.com/blambright/qstylizer")
11831 (synopsis "Qt stylesheet generation utility for PyQt/PySide")
11832 (description "@code{qstylizer} is a Python package designed to help with
11833 the construction of PyQt/PySide stylesheets.")
11834 (license license:expat)))
11835
11836 (define-public python-click-threading
11837 (package
11838 (name "python-click-threading")
11839 (version "0.4.4")
11840 (source (origin
11841 (method url-fetch)
11842 (uri (pypi-uri "click-threading" version))
11843 (sha256
11844 (base32
11845 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
11846 (build-system python-build-system)
11847 (propagated-inputs
11848 `(("python-click" ,python-click)))
11849 (synopsis "Utilities for multithreading in Click")
11850 (description "This package provides utilities for multithreading in Click
11851 applications.")
11852 (home-page "https://github.com/click-contrib/click-threading")
11853 (license license:expat)))
11854
11855 (define-public python-click-log
11856 (package
11857 (name "python-click-log")
11858 (version "0.3.2")
11859 (source (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "click-log" version))
11862 (sha256
11863 (base32
11864 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
11865 (build-system python-build-system)
11866 (propagated-inputs
11867 `(("python-click" ,python-click)))
11868 (synopsis "Logging for click applications")
11869 (description "This package provides a Python library for logging Click
11870 applications.")
11871 (home-page "https://github.com/click-contrib/click-log")
11872 (license license:expat)))
11873
11874 (define-public python-click-default-group
11875 (package
11876 (name "python-click-default-group")
11877 (version "1.2.2")
11878 (source (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "click-default-group" version))
11881 (sha256
11882 (base32
11883 "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
11884 (build-system python-build-system)
11885 (arguments
11886 `(#:tests? #f)) ; no target
11887 (propagated-inputs
11888 `(("python-click" ,python-click)))
11889 (synopsis "Extends click.Group")
11890 (description "This package extends click.Group to invoke a command without
11891 explicit subcommand name.")
11892 (home-page "https://github.com/click-contrib/click-default-group")
11893 (license license:bsd-3)))
11894
11895 (define-public python-structlog
11896 (package
11897 (name "python-structlog")
11898 (version "20.2.0")
11899 (source
11900 (origin
11901 (method url-fetch)
11902 (uri (pypi-uri "structlog" version))
11903 (sha256
11904 (base32
11905 "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
11906 (build-system python-build-system)
11907 (arguments
11908 `(#:phases
11909 (modify-phases %standard-phases
11910 (replace 'check
11911 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
11912 (when tests?
11913 (add-installed-pythonpath inputs outputs)
11914 (invoke "pytest"))
11915 #t)))))
11916 (native-inputs
11917 `(("python-coverage" ,python-coverage)
11918 ("python-freezegun" ,python-freezegun)
11919 ("python-pretend" ,python-pretend)
11920 ("python-pytest" ,python-pytest)
11921 ("python-pytest-asyncio" ,python-pytest-asyncio)
11922 ("python-simplejson" ,python-simplejson)
11923 ("python-twisted" ,python-twisted)))
11924 (home-page "https://www.structlog.org/")
11925 (synopsis "Structured Logging for Python")
11926 (description "@code{structlog} changes logging in Python by adding structure
11927 to your log entries.")
11928 (license (list license:asl2.0 license:expat))))
11929
11930 (define-public python-apipkg
11931 (package
11932 (name "python-apipkg")
11933 (version "1.5")
11934 (source (origin
11935 (method url-fetch)
11936 (uri (pypi-uri "apipkg" version))
11937 (sha256
11938 (base32
11939 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
11940 (build-system python-build-system)
11941 (native-inputs
11942 `(("python-pytest" ,python-pytest)
11943 ("python-setuptools-scm" ,python-setuptools-scm)))
11944 (synopsis "Namespace control and lazy-import mechanism")
11945 (description "With apipkg you can control the exported namespace of a Python
11946 package and greatly reduce the number of imports for your users. It is a small
11947 pure Python module that works on virtually all Python versions.")
11948 (home-page "https://github.com/pytest-dev/apipkg")
11949 (license license:expat)))
11950
11951 (define-public python-execnet
11952 (package
11953 (name "python-execnet")
11954 (version "1.4.1")
11955 (source (origin
11956 (method url-fetch)
11957 (uri (pypi-uri "execnet" version))
11958 (sha256
11959 (base32
11960 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
11961 (build-system python-build-system)
11962 (arguments
11963 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
11964 ;; The two test failures are caused by the lack of an `ssh` executable.
11965 ;; The test suite can be run with pytest after the 'install' phase.
11966 #:tests? #f))
11967 (native-inputs
11968 `(("python-pytest" ,python-pytest)
11969 ("python-setuptools-scm" ,python-setuptools-scm)))
11970 (propagated-inputs
11971 `(("python-apipkg" ,python-apipkg)))
11972 (synopsis "Rapid multi-Python deployment")
11973 (description "Execnet provides a share-nothing model with
11974 channel-send/receive communication for distributing execution across many
11975 Python interpreters across version, platform and network barriers. It has a
11976 minimal and fast API targeting the following uses:
11977 @enumerate
11978 @item distribute tasks to (many) local or remote CPUs
11979 @item write and deploy hybrid multi-process applications
11980 @item write scripts to administer multiple environments
11981 @end enumerate")
11982 (home-page "https://codespeak.net/execnet/")
11983 (license license:expat)))
11984
11985 (define-public python2-execnet
11986 (package-with-python2 python-execnet))
11987
11988 (define-public python-icalendar
11989 (package
11990 (name "python-icalendar")
11991 (version "4.0.7")
11992 (source (origin
11993 (method url-fetch)
11994 (uri (pypi-uri "icalendar" version))
11995 (sha256
11996 (base32
11997 "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
11998 (build-system python-build-system)
11999 (propagated-inputs
12000 `(("python-dateutil" ,python-dateutil)
12001 ("python-pytz" ,python-pytz)))
12002 (synopsis "Python library for parsing iCalendar files")
12003 (description "The icalendar package is a parser/generator of iCalendar
12004 files for use with Python.")
12005 (home-page "https://github.com/collective/icalendar")
12006 (license license:bsd-2)))
12007
12008 (define-public python-args
12009 (package
12010 (name "python-args")
12011 (version "0.1.0")
12012 (source (origin
12013 (method url-fetch)
12014 (uri (pypi-uri "args" version))
12015 (sha256
12016 (base32
12017 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
12018 (build-system python-build-system)
12019 (home-page "https://github.com/kennethreitz/args")
12020 (synopsis "Command-line argument parser")
12021 (description
12022 "This library provides a Python module to parse command-line arguments.")
12023 (license license:bsd-3)))
12024
12025 (define-public python2-args
12026 (package-with-python2 python-args))
12027
12028 (define-public python-clint
12029 (package
12030 (name "python-clint")
12031 (version "0.5.1")
12032 (source (origin
12033 (method url-fetch)
12034 (uri (pypi-uri "clint" version))
12035 (sha256
12036 (base32
12037 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
12038 (build-system python-build-system)
12039 (arguments
12040 '(#:phases
12041 (modify-phases %standard-phases
12042 (replace 'check
12043 (lambda _ (invoke "py.test" "-v"))))))
12044 (native-inputs
12045 `(("python-pytest" ,python-pytest)))
12046 (propagated-inputs
12047 `(("python-args" ,python-args)))
12048 (home-page "https://github.com/kennethreitz/clint")
12049 (synopsis "Command-line interface tools")
12050 (description
12051 "Clint is a Python module filled with a set of tools for developing
12052 command-line applications, including tools for colored and indented
12053 output, progress bar display, and pipes.")
12054 (license license:isc)))
12055
12056 (define-public python2-clint
12057 (package-with-python2 python-clint))
12058
12059 (define-public python-rply
12060 (package
12061 (name "python-rply")
12062 (version "0.7.8")
12063 (source (origin
12064 (method url-fetch)
12065 (uri (pypi-uri "rply" version))
12066 (sha256
12067 (base32
12068 "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
12069 (build-system python-build-system)
12070 (propagated-inputs
12071 `(("python-appdirs" ,python-appdirs)))
12072 (home-page "https://github.com/alex/rply")
12073 (synopsis "Parser generator for Python")
12074 (description
12075 "This package provides a pure Python based parser generator, that also
12076 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
12077 with a new public API, and RPython support.")
12078 (license license:bsd-3)))
12079
12080 (define-public python2-rply
12081 (package-with-python2 python-rply))
12082
12083 (define-public python-hy
12084 (package
12085 (name "python-hy")
12086 (version "0.18.0")
12087 (source (origin
12088 (method url-fetch)
12089 (uri (pypi-uri "hy" version))
12090 (sha256
12091 (base32
12092 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
12093 (build-system python-build-system)
12094 (arguments
12095 '(#:phases
12096 (modify-phases %standard-phases
12097 (add-before 'install 'set-HOME
12098 (lambda _
12099 (setenv "HOME" "/tmp") #t))
12100 (replace 'check
12101 (lambda _
12102 ;; Tests require write access to HOME.
12103 (setenv "HOME" "/tmp")
12104 (invoke "nosetests"))))))
12105 (native-inputs
12106 `(("python-coverage" ,python-coverage)
12107 ("python-nose" ,python-nose)))
12108 (propagated-inputs
12109 `(("python-astor" ,python-astor)
12110 ("python-colorama" ,python-colorama)
12111 ("python-rply" ,python-rply)
12112 ("python-funcparserlib"
12113 ,python-funcparserlib)))
12114 (home-page "http://hylang.org/")
12115 (synopsis "Lisp frontend to Python")
12116 (description
12117 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
12118 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
12119 Python at your fingertips, in Lisp form.")
12120 (license license:expat)))
12121
12122 (define-public python-hissp
12123 (package
12124 (name "python-hissp")
12125 (version "0.2.0")
12126 (source
12127 (origin
12128 (method url-fetch)
12129 (uri (pypi-uri "hissp" version))
12130 (sha256
12131 (base32
12132 "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
12133 (build-system python-build-system)
12134 (home-page "https://github.com/gilch/hissp")
12135 (synopsis "It's Python with a Lissp")
12136 (description "Hissp is a modular Lisp implementation that compiles to a
12137 functional subset of Python—Syntactic macro metaprogramming with full access
12138 to the Python ecosystem.")
12139 (license license:asl2.0)))
12140
12141 (define-public python2-functools32
12142 (package
12143 (name "python2-functools32")
12144 (version "3.2.3-2")
12145 (source
12146 (origin
12147 (method url-fetch)
12148 (uri (pypi-uri "functools32" version))
12149 (sha256
12150 (base32
12151 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
12152 (build-system python-build-system)
12153 (arguments
12154 `(#:python ,python-2
12155 #:tests? #f)) ; no test target
12156 (home-page "https://github.com/MiCHiLU/python-functools32")
12157 (synopsis
12158 "Backport of the functools module from Python 3.2.3")
12159 (description
12160 "This package is a backport of the @code{functools} module from Python
12161 3.2.3 for use with older versions of Python and PyPy.")
12162 (license license:expat)))
12163
12164 (define-public python2-subprocess32
12165 (package
12166 (name "python2-subprocess32")
12167 (version "3.2.7")
12168 (source (origin
12169 (method url-fetch)
12170 (uri (pypi-uri "subprocess32" version))
12171 (sha256
12172 (base32
12173 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
12174 (patches
12175 (search-patches "python2-subprocess32-disable-input-test.patch"))))
12176 (build-system python-build-system)
12177 (arguments
12178 `(#:python ,python-2
12179 ;; The test suite fails with Python > 2.7.13:
12180 ;; import test.support
12181 ;; ImportError: No module named support
12182 #:tests? #f
12183 #:phases
12184 (modify-phases %standard-phases
12185 (add-after 'unpack 'patch-/bin/sh
12186 (lambda _
12187 (substitute* '("subprocess32.py"
12188 "test_subprocess32.py")
12189 (("/bin/sh") (which "sh")))
12190 #t)))))
12191 (home-page "https://github.com/google/python-subprocess32")
12192 (synopsis "Backport of the subprocess module from Python 3.2")
12193 (description
12194 "This is a backport of the @code{subprocess} standard library module
12195 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
12196 new features. On POSIX systems it is guaranteed to be reliable when used
12197 in threaded applications. It includes timeout support from Python 3.3 but
12198 otherwise matches 3.2’s API.")
12199 (license license:psfl)))
12200
12201 (define-public python2-futures
12202 (package
12203 (name "python2-futures")
12204 (version "3.2.0")
12205 (source
12206 (origin
12207 (method url-fetch)
12208 (uri (pypi-uri "futures" version))
12209 (sha256
12210 (base32
12211 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
12212 (build-system python-build-system)
12213 (arguments
12214 `(#:python ,python-2
12215 #:phases
12216 (modify-phases %standard-phases
12217 (replace 'check
12218 (lambda _
12219 (invoke "python" "test_futures.py")
12220 #t)))))
12221 (home-page "https://github.com/agronholm/pythonfutures")
12222 (synopsis
12223 "Backport of the concurrent.futures package from Python 3.2")
12224 (description
12225 "The concurrent.futures module provides a high-level interface for
12226 asynchronously executing callables. This package backports the
12227 concurrent.futures package from Python 3.2")
12228 (license license:bsd-3)))
12229
12230 (define-public python-promise
12231 (package
12232 (name "python-promise")
12233 (version "0.4.2")
12234 (source
12235 (origin
12236 (method url-fetch)
12237 (uri (pypi-uri "promise" version))
12238 (sha256
12239 (base32
12240 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
12241 (build-system python-build-system)
12242 ;; Tests wants python-futures, which is a python2 only program, and
12243 ;; can't be found by python-promise at test time.
12244 (arguments `(#:tests? #f))
12245 (home-page "https://github.com/syrusakbary/promise")
12246 (synopsis "Promises/A+ implementation for Python")
12247 (description
12248 "Promises/A+ implementation for Python")
12249 (properties `((python2-variant . ,(delay python2-promise))))
12250 (license license:expat)))
12251
12252 (define-public python2-promise
12253 (let ((promise (package-with-python2
12254 (strip-python2-variant python-promise))))
12255 (package/inherit promise
12256 (arguments (substitute-keyword-arguments (package-arguments promise)
12257 ((#:tests? _) #t)))
12258 (native-inputs
12259 `(("python2-futures" ,python2-futures)
12260 ("python2-pytest" ,python2-pytest)
12261 ,@(package-native-inputs promise))))))
12262
12263 (define-public python-progressbar2
12264 (package
12265 (name "python-progressbar2")
12266 (version "3.51.3")
12267 (source
12268 (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "progressbar2" version))
12271 (sha256
12272 (base32
12273 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
12274 (build-system python-build-system)
12275 (propagated-inputs
12276 `(("python-six" ,python-six)
12277 ("python-utils" ,python-utils)))
12278 (native-inputs
12279 `(("python-flake8" ,python-flake8)
12280 ("python-freezegun" ,python-freezegun)
12281 ("python-pycodestyle" ,python-pycodestyle)
12282 ("python-pytest" ,python-pytest)
12283 ("python-pytest-cache" ,python-pytest-cache)
12284 ("python-pytest-cov" ,python-pytest-cov)
12285 ("python-pytest-flakes" ,python-pytest-flakes)
12286 ("python-pytest-pep8" ,python-pytest-pep8)
12287 ("python-sphinx" ,python-sphinx)))
12288 (home-page "https://github.com/WoLpH/python-progressbar")
12289 (synopsis "Text progress bar library for Python")
12290 (description
12291 "This package provides a Python progressbar library to provide
12292 visual (yet text based) progress to long running operations.")
12293 (license license:bsd-3)))
12294
12295 (define-public python-progressbar33
12296 (package
12297 (name "python-progressbar33")
12298 (version "2.4")
12299 (source
12300 (origin
12301 (method url-fetch)
12302 (uri (pypi-uri "progressbar33" version))
12303 (sha256
12304 (base32
12305 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
12306 (build-system python-build-system)
12307 (home-page "https://github.com/germangh/python-progressbar")
12308 (synopsis "Text progress bar library for Python")
12309 (description
12310 "This package provides a text progress bar library for Python. This
12311 version only differs from the original @code{progressbar} package in that it
12312 uses relative package imports instead of absolute imports, which is necessary
12313 for the module to work under Python 3.3.")
12314 ;; Either or both of these licenses may be selected.
12315 (license (list license:lgpl2.1+ license:bsd-3))))
12316
12317 (define-public python-colorama
12318 (package
12319 (name "python-colorama")
12320 (version "0.4.4")
12321 (source
12322 (origin
12323 (method url-fetch)
12324 (uri (pypi-uri "colorama" version))
12325 (sha256
12326 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
12327 (build-system python-build-system)
12328 (synopsis "Colored terminal text rendering for Python")
12329 (description "Colorama is a Python library for rendering colored terminal
12330 text.")
12331 (home-page "https://pypi.org/project/colorama/")
12332 (license license:bsd-3)))
12333
12334 (define-public python2-colorama
12335 (package-with-python2 python-colorama))
12336
12337 (define-public python-moto
12338 (package
12339 (name "python-moto")
12340 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
12341 (version "1.3.16.dev134")
12342 (source (origin
12343 (method url-fetch)
12344 (uri (pypi-uri "moto" version))
12345 (sha256
12346 (base32
12347 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
12348 (build-system python-build-system)
12349 (arguments
12350 `(#:phases (modify-phases %standard-phases
12351 (add-after 'unpack 'patch-hardcoded-executable-names
12352 (lambda _
12353 (substitute* "moto/batch/models.py"
12354 (("/bin/sh")
12355 (which "sh")))
12356 (substitute* (find-files "tests" "\\.py$")
12357 (("#!/bin/bash")
12358 (string-append "#!" (which "bash"))))
12359 #t))
12360 (replace 'check
12361 (lambda _
12362 (setenv "PYTHONPATH" (string-append "./build/lib:"
12363 (getenv "PYTHONPATH")))
12364 (invoke "pytest" "-vv" "-m" "not network"
12365 ;; These tests require Docker.
12366 "-k" "not test_terminate_job \
12367 and not test_invoke_function_from_sqs_exception"))))))
12368 (native-inputs
12369 `(("python-flask" ,python-flask)
12370 ("python-flask-cors" ,python-flask-cors)
12371 ("python-freezegun" ,python-freezegun)
12372 ("python-parameterized" ,python-parameterized)
12373 ("python-pytest" ,python-pytest)
12374 ("python-sure" ,python-sure)))
12375 (propagated-inputs
12376 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
12377 ("python-boto" ,python-boto)
12378 ("python-boto3" ,python-boto3)
12379 ("python-botocore" ,python-botocore)
12380 ("python-cfn-lint" ,python-cfn-lint)
12381 ("python-cryptography" ,python-cryptography)
12382 ("python-dateutil" ,python-dateutil)
12383 ("python-docker" ,python-docker)
12384 ("python-idna" ,python-idna)
12385 ("python-jinja2" ,python-jinja2)
12386 ("python-jose" ,python-jose)
12387 ("python-jsondiff" ,python-jsondiff)
12388 ("python-mock" ,python-mock)
12389 ("python-pytz" ,python-pytz)
12390 ("python-pyyaml" ,python-pyyaml)
12391 ("python-requests" ,python-requests)
12392 ("python-responses" ,python-responses)
12393 ("python-six" ,python-six)
12394 ("python-sshpubkeys" ,python-sshpubkeys)
12395 ("python-werkzeug" ,python-werkzeug)
12396 ("python-xmltodict" ,python-xmltodict)))
12397 (home-page "https://github.com/spulec/moto")
12398 (synopsis "Mock out the boto library")
12399 (description
12400 "@code{moto} is a library designed to easily mock out the
12401 @code{boto} library.")
12402 (license license:asl2.0)))
12403
12404 (define-public python-rsa
12405 (package
12406 (name "python-rsa")
12407 (version "3.4.2")
12408 (source
12409 (origin
12410 (method url-fetch)
12411 (uri (pypi-uri "rsa" version))
12412 (sha256
12413 (base32
12414 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
12415 (build-system python-build-system)
12416 (propagated-inputs
12417 `(("python-pyasn1" ,python-pyasn1)))
12418 (synopsis "Pure-Python RSA implementation")
12419 (description "Python-RSA is a pure-Python RSA implementation. It supports
12420 encryption and decryption, signing and verifying signatures, and key
12421 generation according to PKCS#1 version 1.5. It can be used as a Python
12422 library as well as on the command line.")
12423 (home-page "https://stuvel.eu/rsa")
12424 (license license:asl2.0)))
12425
12426 (define-public python2-rsa
12427 (package-with-python2 python-rsa))
12428
12429 (define-public python-pluggy
12430 (package
12431 (name "python-pluggy")
12432 (version "0.13.1")
12433 (source
12434 (origin
12435 (method url-fetch)
12436 (uri (pypi-uri "pluggy" version))
12437 (sha256
12438 (base32
12439 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
12440 (build-system python-build-system)
12441 (native-inputs
12442 `(("python-setuptools-scm" ,python-setuptools-scm)))
12443 (synopsis "Plugin and hook calling mechanism for Python")
12444 (description "Pluggy is an extraction of the plugin manager as used by
12445 Pytest but stripped of Pytest specific details.")
12446 (home-page "https://pypi.org/project/pluggy/")
12447 (properties `((python2-variant . ,(delay python2-pluggy))))
12448 (license license:expat)))
12449
12450 (define-public python2-pluggy
12451 (let ((base (package-with-python2 (strip-python2-variant
12452 python-pluggy))))
12453 (package/inherit
12454 base
12455 (propagated-inputs
12456 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
12457
12458 ;; This package requires python2-importlib-metadata, but that package
12459 ;; ends up needing python2-pluggy via python2-pytest, so we need this
12460 ;; variant to solve the circular dependency.
12461 (define-public python2-pluggy-bootstrap
12462 (hidden-package
12463 (package/inherit
12464 python2-pluggy
12465 (name "python2-pluggy-bootstrap")
12466 (arguments
12467 `(#:tests? #f
12468 ,@(package-arguments python2-pluggy)))
12469 (propagated-inputs
12470 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
12471
12472 (define-public python-plumbum
12473 (package
12474 (name "python-plumbum")
12475 (version "1.7.0")
12476 (source
12477 (origin
12478 (method url-fetch)
12479 (uri (pypi-uri "plumbum" version))
12480 (sha256
12481 (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
12482 (build-system python-build-system)
12483 (arguments
12484 `(#:tests? #f)) ;no tests
12485 (native-inputs
12486 ;; XXX: Not actually used since there are no tests but required for
12487 ;; build.
12488 `(("python-pytest" ,python-pytest)))
12489 (home-page "https://plumbum.readthedocs.io")
12490 (synopsis "Python shell combinators library")
12491 (description
12492 "Plumbum is a library of tools for replacing shell scripts with Python
12493 code.")
12494 (license license:expat)))
12495
12496 (define-public python-deprecation
12497 (package
12498 (name "python-deprecation")
12499 (version "2.1.0")
12500 (source
12501 (origin
12502 (method url-fetch)
12503 (uri (pypi-uri "deprecation" version))
12504 (sha256
12505 (base32
12506 "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
12507 (build-system python-build-system)
12508 (propagated-inputs
12509 `(("python-packaging" ,python-packaging)))
12510 (native-inputs
12511 `(("python-unittest2" ,python-unittest2)))
12512 (home-page "https://deprecation.readthedocs.io/")
12513 (synopsis "Python library to handle automated deprecations")
12514 (description
12515 "This is a library that enables automated deprecations. It offers the
12516 @code{deprecated()} decorator to wrap functions, providing proper warnings
12517 both in documentation and via Python’s warnings system, as well as the
12518 @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
12519 that deprecated code is eventually removed.")
12520 (license license:asl2.0)))
12521
12522 (define-public python-tox
12523 (package
12524 (name "python-tox")
12525 (version "3.20.0")
12526 (source
12527 (origin
12528 (method url-fetch)
12529 (uri (pypi-uri "tox" version))
12530 (sha256
12531 (base32
12532 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
12533 (build-system python-build-system)
12534 (arguments
12535 ;; FIXME: Tests require pytest-timeout, which itself requires
12536 ;; pytest>=2.8.0 for installation.
12537 '(#:tests? #f))
12538 (propagated-inputs
12539 `(("python-filelock" ,python-filelock)
12540 ("python-packaging" ,python-packaging)
12541 ("python-pluggy" ,python-pluggy)
12542 ("python-py" ,python-py)
12543 ("python-six" ,python-six)
12544 ("python-toml" ,python-toml)
12545 ("python-virtualenv" ,python-virtualenv)))
12546 (native-inputs
12547 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
12548 ("python-pytest" ,python-pytest) ; >= 2.3.5
12549 ("python-setuptools-scm" ,python-setuptools-scm)))
12550 (home-page "https://tox.readthedocs.io")
12551 (synopsis "Virtualenv-based automation of test activities")
12552 (description "Tox is a generic virtualenv management and test command line
12553 tool. It can be used to check that a package installs correctly with
12554 different Python versions and interpreters, or run tests in each type of
12555 supported environment, or act as a frontend to continuous integration
12556 servers.")
12557 (license license:expat)))
12558
12559 (define-public python-jmespath
12560 (package
12561 (name "python-jmespath")
12562 (version "0.9.4")
12563 (source
12564 (origin
12565 (method url-fetch)
12566 (uri (pypi-uri "jmespath" version))
12567 (sha256
12568 (base32
12569 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
12570 (build-system python-build-system)
12571 (native-inputs
12572 `(("python-nose" ,python-nose)))
12573 (synopsis "JSON Matching Expressions")
12574 (description "JMESPath (pronounced “james path”) is a Python library that
12575 allows one to declaratively specify how to extract elements from a JSON
12576 document.")
12577 (home-page "https://github.com/jmespath/jmespath.py")
12578 (license license:expat)))
12579
12580 (define-public python2-jmespath
12581 (package-with-python2 python-jmespath))
12582
12583 (define-public python-symengine
12584 (package
12585 (name "python-symengine")
12586 (version "0.6.1")
12587 (source
12588 (origin
12589 (method url-fetch)
12590 (uri (pypi-uri "symengine" version))
12591 (sha256
12592 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
12593 (build-system python-build-system)
12594 (native-inputs
12595 `(("cmake" ,cmake)
12596 ("python-cython" ,python-cython)))
12597 (inputs
12598 `(("symengine" ,symengine)))
12599 (home-page "https://github.com/symengine/symengine.py")
12600 (synopsis "Python library providing wrappers to SymEngine")
12601 (description
12602 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
12603 manipulation library.")
12604 (license license:expat)))
12605
12606 (define-public python-uncertainties
12607 (package
12608 (name "python-uncertainties")
12609 (version "3.1.5")
12610 (source
12611 (origin
12612 (method url-fetch)
12613 (uri (pypi-uri "uncertainties" version))
12614 (sha256
12615 (base32
12616 "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
12617 (build-system python-build-system)
12618 ;; While there are test files, there is no "tests" directory, so the tests
12619 ;; fail.
12620 (arguments '(#:tests? #false))
12621 (propagated-inputs
12622 `(("python-future" ,python-future)))
12623 (native-inputs
12624 `(("python-nose" ,python-nose)
12625 ("python-numpy" ,python-numpy)))
12626 (home-page "https://uncertainties-python-package.readthedocs.io/")
12627 (synopsis "Calculations with uncertainties")
12628 (description
12629 "The uncertainties package transparently handles calculations with
12630 numbers with uncertainties. It can also yield the derivatives of any
12631 expression.")
12632 (license license:bsd-3)))
12633
12634 (define-public python-asteval
12635 (package
12636 (name "python-asteval")
12637 (version "0.9.23")
12638 (source
12639 (origin
12640 (method url-fetch)
12641 (uri (pypi-uri "asteval" version))
12642 (sha256
12643 (base32
12644 "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
12645 (build-system python-build-system)
12646 (native-inputs
12647 `(("python-pytest" ,python-pytest)))
12648 (home-page "https://github.com/newville/asteval")
12649 (synopsis "Minimalistic evaluator of Python expressions")
12650 (description
12651 "This package provides a minimalistic evaluator of Python expression
12652 using the @code{ast} module")
12653 (license license:expat)))
12654
12655 (define-public python-lmfit
12656 (package
12657 (name "python-lmfit")
12658 (version "1.0.2")
12659 (source
12660 (origin
12661 (method url-fetch)
12662 (uri (pypi-uri "lmfit" version))
12663 (sha256
12664 (base32
12665 "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
12666 (build-system python-build-system)
12667 (propagated-inputs
12668 `(("python-asteval" ,python-asteval)
12669 ("python-numpy" ,python-numpy)
12670 ("python-scipy" ,python-scipy)
12671 ("python-uncertainties" ,python-uncertainties)))
12672 (native-inputs
12673 `(("python-pytest" ,python-pytest)))
12674 (home-page "https://lmfit.github.io/lmfit-py/")
12675 (synopsis "Least-Squares minimization with bounds and constraints")
12676 (description
12677 "Lmfit provides a high-level interface to non-linear optimization and
12678 curve fitting problems for Python. It builds on and extends many of the
12679 optimization methods of @code{scipy.optimize}. Initially inspired by (and
12680 named for) extending the Levenberg-Marquardt method from
12681 @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
12682 enhancements to optimization and data fitting problems.")
12683 (license license:bsd-3)))
12684
12685 (define-public python-boto
12686 (package
12687 (name "python-boto")
12688 (version "2.49.0")
12689 (source (origin
12690 (method url-fetch)
12691 (uri (pypi-uri "boto" version))
12692 (sha256
12693 (base32
12694 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
12695 (build-system python-build-system)
12696 (arguments
12697 ;; XXX: This package is unmaintained and has problems with newer versions
12698 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
12699 ;; subset of this library, so keep it around for now, but disable tests.
12700 '(#:tests? #f))
12701 (propagated-inputs
12702 `(("python-paramiko" ,python-paramiko)
12703 ("python-requests" ,python-requests)))
12704 (home-page "https://github.com/boto/boto")
12705 (synopsis "Python interfaces for Amazon Web Services")
12706 (description
12707 "This package provides various facilities for interacting with Amazon
12708 Web Services through Python.
12709
12710 This software is unmaintained, and new projects should use @code{boto3} instead.")
12711 (license license:expat)))
12712
12713 (define-public python-botocore
12714 ;; Note: When updating botocore, also make sure that boto3 and awscli
12715 ;; are compatible.
12716 (package
12717 (name "python-botocore")
12718 (version "1.19.22")
12719 (source
12720 (origin
12721 (method url-fetch)
12722 (uri (pypi-uri "botocore" version))
12723 (sha256
12724 (base32
12725 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
12726 (build-system python-build-system)
12727 (arguments
12728 ;; FIXME: Many tests are failing.
12729 '(#:tests? #f))
12730 (propagated-inputs
12731 `(("python-dateutil" ,python-dateutil)
12732 ("python-jmespath" ,python-jmespath)
12733 ("python-urllib3" ,python-urllib3)))
12734 (home-page "https://github.com/boto/botocore")
12735 (synopsis "Low-level interface to AWS")
12736 (description "Botocore is a Python library that provides a low-level
12737 interface to the Amazon Web Services (AWS) API.")
12738 (license license:asl2.0)))
12739
12740 (define-public python2-botocore
12741 (package-with-python2 python-botocore))
12742
12743 (define-public python-boto3
12744 (package
12745 (name "python-boto3")
12746 (version "1.16.22")
12747 (home-page "https://github.com/boto/boto3")
12748 (source (origin
12749 (method git-fetch)
12750 (uri (git-reference (url home-page) (commit version)))
12751 (file-name (git-file-name name version))
12752 (sha256
12753 (base32
12754 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
12755 (arguments
12756 `(#:phases
12757 (modify-phases %standard-phases
12758 (add-after 'unpack 'delete-network-tests
12759 ;; Deleting integration tests because they are trying to connect to AWS.
12760 (lambda _
12761 (delete-file-recursively "tests/integration")
12762 #t)))))
12763 (build-system python-build-system)
12764 (native-inputs
12765 `(("python-nose" ,python-nose)
12766 ("python-mock" ,python-mock)))
12767 (propagated-inputs
12768 `(("python-botocore" ,python-botocore)
12769 ("python-jmespath" ,python-jmespath)
12770 ("python-s3transfer" ,python-s3transfer)))
12771 (synopsis "AWS SDK for Python")
12772 (description
12773 "Boto3 is a Python library for writing programs that interact with
12774 @acronym{AWS,Amazon Web Services}.")
12775 (license license:asl2.0)))
12776
12777 (define-public python-pyfiglet
12778 (package
12779 (name "python-pyfiglet")
12780 (version "0.8.post1")
12781 (source
12782 (origin
12783 (method url-fetch)
12784 (uri (pypi-uri "pyfiglet" version))
12785 (sha256
12786 (base32
12787 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
12788 (build-system python-build-system)
12789 (home-page "https://github.com/pwaller/pyfiglet")
12790 (synopsis "Draw ASCII art big letters in Python")
12791 (description "This module lets you draw large letter from ordinary characters
12792 in pure Python.")
12793 (license license:expat)))
12794
12795 (define-public python-xdo
12796 (package
12797 (name "python-xdo")
12798 (version "0.3")
12799 (source (origin
12800 (method url-fetch)
12801 (uri (string-append
12802 "http://http.debian.net/debian/pool/main/p/python-xdo/"
12803 "python-xdo_" version ".orig.tar.gz"))
12804 (sha256
12805 (base32
12806 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
12807 (build-system python-build-system)
12808 (arguments
12809 '(#:phases
12810 (modify-phases %standard-phases
12811 (add-before 'install 'patch-libxdo-path
12812 ;; Hardcode the path of dynamically loaded libxdo library.
12813 (lambda* (#:key inputs #:allow-other-keys)
12814 (let ((libxdo (string-append
12815 (assoc-ref inputs "xdotool")
12816 "/lib/libxdo.so")))
12817 (substitute* "xdo/_xdo.py"
12818 (("find_library\\(\"xdo\"\\)")
12819 (simple-format #f "\"~a\"" libxdo)))
12820 #t))))
12821 #:tests? #f)) ; no tests provided
12822 (propagated-inputs
12823 `(("python-six" ,python-six)))
12824 (inputs
12825 `(("xdotool" ,xdotool)
12826 ("libX11" ,libx11)))
12827 (home-page "https://tracker.debian.org/pkg/python-xdo")
12828 (synopsis "Python library for simulating X11 keyboard/mouse input")
12829 (description "Provides bindings to libxdo for manipulating X11 via simulated
12830 input. (Note that this is mostly a legacy library; you may wish to look at
12831 python-xdo for newer bindings.)")
12832 (license license:bsd-3)))
12833
12834 (define-public python2-xdo
12835 (package-with-python2 python-xdo))
12836
12837 (define-public python-mako
12838 (package
12839 (name "python-mako")
12840 (version "1.1.3")
12841 (source
12842 (origin
12843 (method url-fetch)
12844 (uri (pypi-uri "Mako" version))
12845 (sha256
12846 (base32
12847 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
12848 (build-system python-build-system)
12849 (arguments
12850 `(#:phases (modify-phases %standard-phases
12851 (replace 'check
12852 (lambda* (#:key tests? #:allow-other-keys)
12853 (if tests?
12854 (invoke "nosetests" "-v")
12855 (format #t "test suite not run~%"))
12856 #t)))))
12857 (propagated-inputs
12858 `(("python-markupsafe" ,python-markupsafe)))
12859 (native-inputs
12860 `(("python-mock" ,python-mock)
12861 ("python-nose" ,python-nose)))
12862 (home-page "https://www.makotemplates.org/")
12863 (synopsis "Templating language for Python")
12864 (description "Mako is a templating language for Python that compiles
12865 templates into Python modules.")
12866 (license license:expat)))
12867
12868 (define-public python2-mako
12869 (package-with-python2 python-mako))
12870
12871 (define-public python-waitress
12872 (package
12873 (name "python-waitress")
12874 (version "1.1.0")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "waitress" version))
12879 (patches (search-patches "python-waitress-fix-tests.patch"))
12880 (sha256
12881 (base32
12882 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
12883 (build-system python-build-system)
12884 (home-page "https://github.com/Pylons/waitress")
12885 (synopsis "Waitress WSGI server")
12886 (description "Waitress is meant to be a production-quality pure-Python WSGI
12887 server with very acceptable performance.")
12888 (license license:zpl2.1)))
12889
12890 (define-public python2-waitress
12891 (package-with-python2 python-waitress))
12892
12893 (define-public python-whichcraft
12894 (package
12895 (name "python-whichcraft")
12896 (version "0.6.1")
12897 (source
12898 (origin
12899 (method url-fetch)
12900 (uri (pypi-uri "whichcraft" version))
12901 (sha256
12902 (base32
12903 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
12904 (build-system python-build-system)
12905 (native-inputs
12906 `(("python-pytest" ,python-pytest)))
12907 (home-page "https://github.com/pydanny/whichcraft")
12908 (synopsis "Cross-platform cross-python shutil.which functionality")
12909 (description
12910 "This package provides a shim of the shutil.which function that's
12911 designed to work across multiple versions of Python.")
12912 (license license:bsd-3)))
12913
12914 (define-public python-cookiecutter
12915 (package
12916 (name "python-cookiecutter")
12917 (version "1.7.3")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "cookiecutter" version))
12922 (sha256
12923 (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
12924 (build-system python-build-system)
12925 (native-inputs
12926 `(("python-freezegun" ,python-freezegun)
12927 ("python-pytest" ,python-pytest)
12928 ("python-pytest-catchlog" ,python-pytest-catchlog)
12929 ("python-pytest-cov" ,python-pytest-cov)
12930 ("python-pytest-mock" ,python-pytest-mock)))
12931 (propagated-inputs
12932 `(("python-binaryornot" ,python-binaryornot)
12933 ("python-click" ,python-click)
12934 ("python-future" ,python-future)
12935 ("python-jinja2" ,python-jinja2)
12936 ("python-jinja2-time" ,python-jinja2-time)
12937 ("python-poyo" ,python-poyo)
12938 ("python-requests" ,python-requests)
12939 ("python-slugify" ,python-slugify)
12940 ("python-text-unidecode" ,python-text-unidecode)
12941 ("python-whichcraft" ,python-whichcraft)))
12942 (home-page "https://github.com/cookiecutter/cookiecutter")
12943 (synopsis
12944 "Command-line utility that creates projects from project templates")
12945 (description
12946 "This package provides a command-line utility that creates projects from
12947 project templates, e.g. creating a Python package project from a Python package
12948 project template.")
12949 (license license:bsd-3)))
12950
12951 (define-public python-pyquery
12952 (package
12953 (name "python-pyquery")
12954 (version "1.2.17")
12955 (source
12956 (origin
12957 (method url-fetch)
12958 (uri (pypi-uri "pyquery" version))
12959 (sha256
12960 (base32
12961 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
12962 (build-system python-build-system)
12963 (native-inputs
12964 `(("python-webob" ,python-webob)
12965 ("python-webtest" ,python-webtest)))
12966 (propagated-inputs
12967 `(("python-lxml" ,python-lxml)
12968 ("python-cssselect" ,python-cssselect)))
12969 (home-page "https://github.com/gawel/pyquery")
12970 (synopsis "Make jQuery-like queries on xml documents")
12971 (description "pyquery allows you to make jQuery queries on xml documents.
12972 The API is as much as possible the similar to jQuery. pyquery uses lxml for
12973 fast xml and html manipulation.")
12974 (license license:bsd-3)))
12975
12976 (define-public python-anyjson
12977 (package
12978 (name "python-anyjson")
12979 (version "0.3.3")
12980 (source
12981 (origin
12982 (method url-fetch)
12983 (uri (pypi-uri "anyjson" version))
12984 (sha256
12985 (base32
12986 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
12987 (build-system python-build-system)
12988 (arguments
12989 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
12990 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
12991 ;; whatever) so this transformation needs to be done before the tests
12992 ;; can be run. Maybe we could add a build step to transform beforehand
12993 ;; but it could be annoying/difficult.
12994 ;; We can enable tests for the Python 2 version, though, and do below.
12995 #:tests? #f))
12996 (home-page "https://bitbucket.org/runeh/anyjson/")
12997 (synopsis
12998 "Wraps best available JSON implementation in a common interface")
12999 (description
13000 "Anyjson loads whichever is the fastest JSON module installed
13001 and provides a uniform API regardless of which JSON implementation is used.")
13002 (license license:bsd-3)
13003 (properties `((python2-variant . ,(delay python2-anyjson))))))
13004
13005 (define-public python2-anyjson
13006 (let ((anyjson (package-with-python2
13007 (strip-python2-variant python-anyjson))))
13008 (package/inherit anyjson
13009 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
13010 #:tests? #t
13011 ,@(package-arguments anyjson)))
13012 (native-inputs `(("python2-nose" ,python2-nose))))))
13013
13014 (define-public python-amqp
13015 (package
13016 (name "python-amqp")
13017 (version "2.3.2")
13018 (source
13019 (origin
13020 (method url-fetch)
13021 (uri (pypi-uri "amqp" version))
13022 (sha256
13023 (base32
13024 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
13025 (build-system python-build-system)
13026 (native-inputs
13027 `(("python-case" ,python-case)
13028 ("python-pytest-sugar" ,python-pytest-sugar)
13029 ("python-mock" ,python-mock)))
13030 (propagated-inputs
13031 `(("python-vine" ,python-vine)))
13032 (home-page "https://github.com/celery/py-amqp")
13033 (synopsis
13034 "Low-level AMQP client for Python (fork of amqplib)")
13035 (description
13036 "This is a fork of amqplib which was originally written by Barry Pederson.
13037 It is maintained by the Celery project, and used by kombu as a pure python
13038 alternative when librabbitmq is not available.")
13039 (license license:lgpl2.1+)
13040 (properties `((python2-variant . ,(delay python2-amqp))))))
13041
13042 (define-public python2-amqp
13043 (let ((amqp (package-with-python2
13044 (strip-python2-variant python-amqp))))
13045 (package/inherit amqp
13046 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
13047 ;; unmaintained. Weirdly, does not do this on the python 3
13048 ;; version?
13049 #:tests? #f
13050 ,@(package-arguments amqp))))))
13051
13052 (define-public python-txamqp
13053 (package
13054 (name "python-txamqp")
13055 (version "0.8.2")
13056 (source
13057 (origin
13058 (method url-fetch)
13059 (uri (pypi-uri "txAMQP" version))
13060 (sha256
13061 (base32
13062 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
13063 (build-system python-build-system)
13064 (propagated-inputs
13065 `(("python-six" ,python-six)
13066 ("python-twisted" ,python-twisted)))
13067 (home-page "https://github.com/txamqp/txamqp")
13068 (synopsis "Communicate with AMQP peers and brokers using Twisted")
13069 (description
13070 "This package provides a Python library for communicating with AMQP peers
13071 and brokers using the asynchronous networking framework Twisted. It contains
13072 all the necessary code to connect, send and receive messages to/from an
13073 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
13074 also includes support for using Thrift RPC over AMQP in Twisted
13075 applications.")
13076 (license license:asl2.0)))
13077
13078 (define-public python2-txamqp
13079 (package-with-python2 python-txamqp))
13080
13081 (define-public python-kombu
13082 (package
13083 (name "python-kombu")
13084 (version "4.2.2")
13085 (source
13086 (origin
13087 (method url-fetch)
13088 (uri (pypi-uri "kombu" version))
13089 (sha256
13090 (base32
13091 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
13092 (build-system python-build-system)
13093 (native-inputs
13094 `(("python-mock" ,python-mock)
13095 ("python-case" ,python-case)
13096 ("python-pyro4" ,python-pyro4)
13097 ("python-pytest-sugar" ,python-pytest-sugar)
13098 ("python-pytz" ,python-pytz)))
13099 (propagated-inputs
13100 `(("python-anyjson" ,python-anyjson)
13101 ("python-amqp" ,python-amqp)
13102 ("python-redis" ,python-redis)))
13103 (home-page "https://kombu.readthedocs.io")
13104 (synopsis "Message passing library for Python")
13105 (description "The aim of Kombu is to make messaging in Python as easy as
13106 possible by providing an idiomatic high-level interface for the AMQ protocol,
13107 and also provide proven and tested solutions to common messaging problems.
13108 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
13109 message orientation, queuing, routing, reliability and security, for which the
13110 RabbitMQ messaging server is the most popular implementation.")
13111 (license license:bsd-3)
13112 (properties `((python2-variant . ,(delay python2-kombu))))))
13113
13114 (define-public python2-kombu
13115 (let ((kombu (package-with-python2
13116 (strip-python2-variant python-kombu))))
13117 (package/inherit kombu
13118 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
13119 ;; It works fine on the python3 variant.
13120 #:tests? #f
13121 ,@(package-arguments kombu)))
13122 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13123 ,@(package-native-inputs kombu))))))
13124
13125 (define-public python-billiard
13126 (package
13127 (name "python-billiard")
13128 (version "3.5.0.5")
13129 (source
13130 (origin
13131 (method url-fetch)
13132 (uri (pypi-uri "billiard" version))
13133 (sha256
13134 (base32
13135 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
13136 (build-system python-build-system)
13137 (native-inputs
13138 `(("python-case" ,python-case)
13139 ("python-pytest" ,python-pytest)))
13140 (home-page "https://github.com/celery/billiard")
13141 (synopsis
13142 "Python multiprocessing fork with improvements and bugfixes")
13143 (description
13144 "Billiard is a fork of the Python 2.7 multiprocessing package. The
13145 multiprocessing package itself is a renamed and updated version of R Oudkerk's
13146 pyprocessing package. This standalone variant is intended to be compatible with
13147 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
13148 (license license:bsd-3)
13149 (properties `((python2-variant . ,(delay python2-billiard))))))
13150
13151 (define-public python2-billiard
13152 (let ((billiard (package-with-python2
13153 (strip-python2-variant python-billiard))))
13154 (package/inherit billiard
13155 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13156 ("python2-mock" ,python2-mock)
13157 ,@(package-native-inputs billiard))))))
13158
13159 (define-public python-celery
13160 (package
13161 (name "python-celery")
13162 (version "4.2.1")
13163 (source
13164 (origin
13165 (method url-fetch)
13166 (uri (pypi-uri "celery" version))
13167 (sha256
13168 (base32
13169 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
13170 (build-system python-build-system)
13171 (arguments
13172 '(;; TODO The tests fail with Python 3.7
13173 ;; https://github.com/celery/celery/issues/4849
13174 #:tests? #f
13175 #:phases
13176 (modify-phases %standard-phases
13177 (add-after 'unpack 'patch-requirements
13178 (lambda _
13179 (substitute* "requirements/test.txt"
13180 (("pytest>=3\\.0,<3\\.3")
13181 "pytest>=3.0"))
13182 #t)))))
13183 (native-inputs
13184 `(("python-case" ,python-case)
13185 ("python-pytest" ,python-pytest)))
13186 (propagated-inputs
13187 `(("python-pytz" ,python-pytz)
13188 ("python-billiard" ,python-billiard)
13189 ("python-kombu" ,python-kombu)))
13190 (home-page "https://celeryproject.org")
13191 (synopsis "Distributed Task Queue")
13192 (description "Celery is an asynchronous task queue/job queue based on
13193 distributed message passing. It is focused on real-time operation, but
13194 supports scheduling as well. The execution units, called tasks, are executed
13195 concurrently on a single or more worker servers using multiprocessing,
13196 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
13197 synchronously (wait until ready).")
13198 (license license:bsd-3)
13199 (properties `((python2-variant . ,(delay python2-celery))))))
13200
13201 (define-public python2-celery
13202 (let ((celery (package-with-python2
13203 (strip-python2-variant python-celery))))
13204 (package/inherit celery
13205 (native-inputs `(("python2-unittest2" ,python2-unittest2)
13206 ("python2-mock" ,python2-mock)
13207 ,@(package-native-inputs celery))))))
13208
13209 (define-public python-translitcodec
13210 (package
13211 (name "python-translitcodec")
13212 (version "0.4.0")
13213 (source
13214 (origin
13215 (method url-fetch)
13216 (uri (pypi-uri "translitcodec" version))
13217 (sha256
13218 (base32
13219 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
13220 (build-system python-build-system)
13221 (arguments
13222 `(#:tests? #f)) ; no tests provided
13223 (home-page
13224 "https://github.com/claudep/translitcodec")
13225 (synopsis
13226 "Unicode to 8-bit charset transliteration codec")
13227 (description
13228 "This package contains codecs for transliterating ISO 10646 texts into
13229 best-effort representations using smaller coded character sets (ASCII,
13230 ISO 8859, etc.).")
13231 (license license:expat)))
13232
13233 (define-public python2-translitcodec
13234 (package-with-python2 python-translitcodec))
13235
13236 (define-public python-anyqt
13237 (package
13238 (name "python-anyqt")
13239 (version "0.0.11")
13240 (source
13241 (origin
13242 (method url-fetch)
13243 (uri (pypi-uri "AnyQt" version))
13244 (sha256
13245 (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4"))))
13246 (build-system python-build-system)
13247 (arguments
13248 `(#:tests? #f ;there are no tests
13249 #:phases
13250 (modify-phases %standard-phases
13251 (add-after 'unpack 'delete-files
13252 ;; Delete files related to other operating systems.
13253 (lambda _
13254 (delete-file "AnyQt/QtMacExtras.py")
13255 (delete-file "AnyQt/QtWinExtras.py")
13256 #t)))))
13257 (home-page "https://github.com/ales-erjavec/anyqt")
13258 (synopsis "PyQt4/PyQt5 compatibility layer")
13259 (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
13260 (license license:gpl3)))
13261
13262 (define-public python-pyqtgraph
13263 (package
13264 (name "python-pyqtgraph")
13265 (version "0.12.1")
13266 (source
13267 (origin
13268 (method url-fetch)
13269 (uri (pypi-uri "pyqtgraph" version))
13270 (sha256
13271 (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
13272 (build-system python-build-system)
13273 (arguments
13274 `(#:phases
13275 (modify-phases %standard-phases
13276 (add-before 'check 'set-home-and-qpa
13277 (lambda _
13278 (setenv "HOME" "/tmp")
13279 (setenv "QT_QPA_PLATFORM" "offscreen")
13280 #t))
13281 (replace 'check
13282 (lambda* (#:key inputs outputs #:allow-other-keys)
13283 (add-installed-pythonpath inputs outputs)
13284 (invoke "pytest" "-vv" "-k"
13285 ;; These tests try to download online data.
13286 (string-append "not test_PolyLineROI"
13287 " and not test_getArrayRegion_axisorder"
13288 " and not test_getArrayRegion"
13289 " and not test_PlotCurveItem"
13290 " and not test_NonUniformImage_colormap"
13291 " and not test_NonUniformImage_lut"
13292 " and not test_ImageItem_axisorder"
13293 " and not test_ImageItem")))))))
13294 (native-inputs
13295 `(("python-pytest" ,python-pytest)
13296 ("python-pytest-cov" ,python-pytest-cov)
13297 ("python-pytest-xdist" ,python-pytest-xdist)))
13298 (inputs
13299 `(("qtbase" ,qtbase-5)))
13300 (propagated-inputs
13301 `(("python-h5py" ,python-h5py)
13302 ("python-numpy" ,python-numpy)
13303 ("python-pyopengl" ,python-pyopengl)
13304 ("python-scipy" ,python-scipy)
13305 ("python-pyqt" ,python-pyqt)))
13306 (home-page "http://www.pyqtgraph.org")
13307 (synopsis "Scientific graphics and GUI library for Python")
13308 (description
13309 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
13310 and PySide6. It is intended for use in mathematics, scientific or engineering
13311 applications.")
13312 (license license:expat)))
13313
13314 (define-public python-qasync
13315 (package
13316 (name "python-qasync")
13317 (version "0.15.0")
13318 (source
13319 (origin
13320 ;; There are no tests in the PyPI tarball.
13321 (method git-fetch)
13322 (uri (git-reference
13323 (url "https://github.com/CabbageDevelopment/qasync/")
13324 (commit (string-append "v" version))))
13325 (file-name (git-file-name name version))
13326 (sha256
13327 (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l"))))
13328 (build-system python-build-system)
13329 (arguments
13330 `(#:test-target "pytest"
13331 #:phases
13332 (modify-phases %standard-phases
13333 (add-before 'check 'set-qpa
13334 (lambda _
13335 (setenv "QT_QPA_PLATFORM" "offscreen")
13336 #t)))))
13337 (native-inputs
13338 `(("python-pytest" ,python-pytest)
13339 ("python-pytest-runner" ,python-pytest-runner)))
13340 (propagated-inputs
13341 `(("python-pyqt" ,python-pyqt)))
13342 (home-page "https://github.com/CabbageDevelopment/qasync")
13343 (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
13344 (description
13345 "@code{qasync} allows coroutines to be used in PyQt/PySide applications
13346 by providing an implementation of the PEP 3156 event-loop.")
13347 (license license:bsd-2)))
13348
13349 (define-public python-editor
13350 (package
13351 (name "python-editor")
13352 (version "1.0.4")
13353 (source
13354 (origin
13355 (method url-fetch)
13356 (uri (pypi-uri "python-editor" version))
13357 (sha256
13358 (base32
13359 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
13360 (build-system python-build-system)
13361 (arguments
13362 '(#:tests? #f)) ;XXX: needs a TTY and an editor
13363 (home-page "https://github.com/fmoo/python-editor")
13364 (synopsis "Programmatically open an editor, capture the result")
13365 (description
13366 "python-editor is a library that provides the editor module for
13367 programmatically interfacing with your system's $EDITOR.")
13368 (license license:asl2.0)))
13369
13370 (define-public python2-editor
13371 (package-with-python2 python-editor))
13372
13373 (define-public python-multiprocessing-logging
13374 (package
13375 (name "python-multiprocessing-logging")
13376 (version "0.3.1")
13377 (home-page "https://github.com/jruere/multiprocessing-logging")
13378 (source (origin
13379 (method git-fetch)
13380 (uri (git-reference
13381 (url home-page)
13382 (commit (string-append "v" version))))
13383 (file-name (git-file-name name version))
13384 (sha256
13385 (base32
13386 "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
13387 (build-system python-build-system)
13388 (synopsis "Manage logs from multiple processes")
13389 (description
13390 "This Python module implements a multiprocessing-aware @code{Handler}
13391 that, when set on the root @code{Logger}, will tunnel log records to the
13392 main process so that they are handled correctly.")
13393 (license license:lgpl3+)))
13394
13395 (define-public python-vobject
13396 (package
13397 (name "python-vobject")
13398 (version "0.9.6.1")
13399 (source (origin
13400 (method url-fetch)
13401 (uri (pypi-uri "vobject" version))
13402 (sha256
13403 (base32
13404 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
13405 (build-system python-build-system)
13406 (arguments
13407 '(;; The test suite relies on some non-portable Windows interfaces.
13408 #:tests? #f))
13409 (propagated-inputs
13410 `(("python-dateutil" ,python-dateutil)
13411 ("python-pyicu" ,python-pyicu)))
13412 (synopsis "Parse and generate vCard and vCalendar files")
13413 (description "Vobject is intended to be a full featured Python package for
13414 parsing and generating vCard and vCalendar files. Currently, iCalendar files
13415 are supported and well tested. vCard 3.0 files are supported, and all data
13416 should be imported, but only a few components are understood in a sophisticated
13417 way.")
13418 (home-page "https://eventable.github.io/vobject/")
13419 (license license:asl2.0)))
13420
13421 (define-public python2-vobject
13422 (package-with-python2 python-vobject))
13423
13424 (define-public python-munkres
13425 (package
13426 (name "python-munkres")
13427 (version "1.0.8")
13428 (source (origin
13429 (method url-fetch)
13430 (uri (pypi-uri "munkres" version))
13431 (sha256
13432 (base32
13433 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
13434 (build-system python-build-system)
13435 (arguments
13436 '(#:tests? #f)) ; no test suite
13437 (home-page "https://software.clapper.org/munkres/")
13438 (synopsis "Implementation of the Munkres algorithm")
13439 (description "The Munkres module provides an implementation of the Munkres
13440 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
13441 useful for solving the Assignment Problem.")
13442 (license license:bsd-3)))
13443
13444 (define-public python2-munkres
13445 (package-with-python2 python-munkres))
13446
13447 (define-public python-whoosh
13448 (package
13449 (name "python-whoosh")
13450 (version "2.7.4")
13451 (source
13452 (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "Whoosh" version))
13455 (sha256
13456 (base32
13457 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
13458 (build-system python-build-system)
13459 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
13460 (native-inputs
13461 `(("python-pytest" ,python-pytest)))
13462 (home-page "https://bitbucket.org/mchaput/whoosh")
13463 (synopsis "Full text indexing, search, and spell checking library")
13464 (description
13465 "Whoosh is a fast, pure-Python full text indexing, search, and spell
13466 checking library.")
13467 (license license:bsd-2)))
13468
13469 (define-public python2-whoosh
13470 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
13471 (package/inherit whoosh
13472 (propagated-inputs
13473 `(("python2-backport-ssl-match-hostname"
13474 ,python2-backport-ssl-match-hostname)
13475 ,@(package-propagated-inputs whoosh))))))
13476
13477 (define-public python-pathlib
13478 (package
13479 (name "python-pathlib")
13480 (version "1.0.1")
13481 (source (origin
13482 (method url-fetch)
13483 (uri (pypi-uri "pathlib" version))
13484 (sha256
13485 (base32
13486 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
13487 (build-system python-build-system)
13488 ;; The tests depend on the internal "test" module, which does not provide
13489 ;; a stable interface.
13490 (arguments `(#:tests? #f))
13491 (home-page "https://pathlib.readthedocs.org/")
13492 (synopsis "Object-oriented file system paths")
13493 (description "Pathlib offers a set of classes to handle file system paths.
13494 It offers the following advantages over using string objects:
13495
13496 @enumerate
13497 @item No more cumbersome use of os and os.path functions. Everything can
13498 be done easily through operators, attribute accesses, and method calls.
13499 @item Embodies the semantics of different path types. For example,
13500 comparing Windows paths ignores casing.
13501 @item Well-defined semantics, eliminating any inconsistencies or
13502 ambiguities (forward vs. backward slashes, etc.).
13503 @end enumerate
13504
13505 Note: In Python 3.4, pathlib is now part of the standard library. For other
13506 Python versions please consider python-pathlib2 instead, which tracks the
13507 standard library module. This module (python-pathlib) isn't maintained
13508 anymore.")
13509 (license license:expat)))
13510
13511 (define-public python2-pathlib
13512 (package-with-python2 python-pathlib))
13513
13514 (define-public python2-pathlib2
13515 (package
13516 (name "python2-pathlib2")
13517 (version "2.3.5")
13518 (source (origin
13519 (method url-fetch)
13520 (uri (pypi-uri "pathlib2" version))
13521 (sha256
13522 (base32
13523 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
13524 (build-system python-build-system)
13525 ;; We only need the the Python 2 variant, since for Python 3 our minimum
13526 ;; version is 3.4 which already includes this package as part of the
13527 ;; standard library.
13528 (arguments
13529 `(#:python ,python-2))
13530 (propagated-inputs
13531 `(("python2-scandir" ,python2-scandir)
13532 ("python2-six" ,python2-six)))
13533 (home-page "https://pypi.org/project/pathlib2/")
13534 (synopsis "Object-oriented file system paths - backport of standard
13535 pathlib module")
13536 (description "The goal of pathlib2 is to provide a backport of standard
13537 pathlib module which tracks the standard library module, so all the newest
13538 features of the standard pathlib can be used also on older Python versions.
13539
13540 Pathlib offers a set of classes to handle file system paths. It offers the
13541 following advantages over using string objects:
13542
13543 @enumerate
13544 @item No more cumbersome use of os and os.path functions. Everything can
13545 be done easily through operators, attribute accesses, and method calls.
13546 @item Embodies the semantics of different path types. For example,
13547 comparing Windows paths ignores casing.
13548 @item Well-defined semantics, eliminating any inconsistencies or
13549 ambiguities (forward vs. backward slashes, etc.).
13550 @end enumerate")
13551 (license license:expat)))
13552
13553 (define-public python2-pathlib2-bootstrap
13554 (hidden-package
13555 (package
13556 (inherit python2-pathlib2)
13557 (name "python2-pathlib2-bootstrap")
13558 (propagated-inputs
13559 `(("python2-scandir" ,python2-scandir)
13560 ("python2-six" ,python2-six-bootstrap))))))
13561
13562 (define-public python-jellyfish
13563 (package
13564 (name "python-jellyfish")
13565 (version "0.5.6")
13566 (source (origin
13567 (method url-fetch)
13568 (uri (pypi-uri "jellyfish" version))
13569 (sha256
13570 (base32
13571 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
13572 (build-system python-build-system)
13573 (native-inputs
13574 `(("python-pytest" ,python-pytest)))
13575 (home-page "https://github.com/jamesturk/jellyfish")
13576 (synopsis "Approximate and phonetic matching of strings")
13577 (description "Jellyfish uses a variety of string comparison and phonetic
13578 encoding algorithms to do fuzzy string matching.")
13579 (license license:bsd-2)
13580 (properties `((python2-variant . ,(delay python2-jellyfish))))))
13581
13582 (define-public python2-jellyfish
13583 (let ((jellyfish (package-with-python2
13584 (strip-python2-variant python-jellyfish))))
13585 (package/inherit jellyfish
13586 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
13587 ,@(package-native-inputs jellyfish))))))
13588
13589 (define-public python2-unicodecsv
13590 (package
13591 (name "python2-unicodecsv")
13592 (version "0.14.1")
13593 (source (origin
13594 (method git-fetch)
13595 ;; The test suite is not included in the PyPi release.
13596 ;; https://github.com/jdunck/python-unicodecsv/issues/19
13597 (uri (git-reference
13598 (url "https://github.com/jdunck/python-unicodecsv")
13599 (commit version)))
13600 (file-name (git-file-name name version))
13601 (sha256
13602 (base32
13603 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
13604 (build-system python-build-system)
13605 (arguments
13606 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
13607 #:python ,python-2))
13608 (native-inputs
13609 `(("python2-unittest2" ,python2-unittest2)))
13610 (home-page "https://github.com/jdunck/python-unicodecsv")
13611 (synopsis "Unicode CSV module for Python 2")
13612 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
13613 module, adding support for Unicode strings.")
13614 (license license:bsd-2)))
13615
13616 (define-public python-pdfminer-six
13617 (package
13618 (name "python-pdfminer-six")
13619 (version "20201018")
13620 ;; There are no tests in the PyPI tarball.
13621 (source
13622 (origin
13623 (method git-fetch)
13624 (uri (git-reference
13625 (url "https://github.com/pdfminer/pdfminer.six")
13626 (commit version)))
13627 (file-name (git-file-name name version))
13628 (sha256
13629 (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
13630 (build-system python-build-system)
13631 (arguments
13632 `(#:phases
13633 (modify-phases %standard-phases
13634 ;; Tests write to the source tree.
13635 (add-after 'unpack 'make-git-checkout-writable
13636 (lambda _
13637 (for-each make-file-writable (find-files "."))
13638 #t))
13639 (replace 'check
13640 (lambda _
13641 (invoke "make" "test")))
13642 (add-before 'reset-gzip-timestamps 'make-files-writable
13643 (lambda* (#:key outputs #:allow-other-keys)
13644 (let ((out (assoc-ref outputs "out")))
13645 (for-each make-file-writable
13646 (find-files out "\\.gz$"))
13647 #t))))))
13648 (propagated-inputs
13649 `(("python-chardet" ,python-chardet)
13650 ("python-cryptography" ,python-cryptography)
13651 ("python-sortedcontainers" ,python-sortedcontainers)))
13652 (native-inputs
13653 `(("python-nose" ,python-nose)
13654 ("python-tox" ,python-tox)))
13655 (home-page "https://github.com/pdfminer/pdfminer.six")
13656 (synopsis "PDF parser and analyzer")
13657 (description "@code{pdfminer.six} is a community maintained fork of
13658 the original PDFMiner. It is a tool for extracting information from PDF
13659 documents. It focuses on getting and analyzing text data. Pdfminer.six
13660 extracts the text from a page directly from the sourcecode of the PDF. It
13661 can also be used to get the exact location, font or color of the text.")
13662 (license license:expat)))
13663
13664 (define-public python-rarfile
13665 (package
13666 (name "python-rarfile")
13667 (version "2.8")
13668 (source (origin
13669 (method url-fetch)
13670 (uri (pypi-uri "rarfile" version))
13671 (sha256
13672 (base32
13673 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
13674 (build-system python-build-system)
13675 (arguments
13676 '(#:phases
13677 (modify-phases %standard-phases
13678 (replace 'check
13679 ;; Many tests fail, but the installation proceeds.
13680 (lambda _ (invoke "make" "-C" "test" "test"))))))
13681 (native-inputs
13682 `(("which" ,which))) ; required for tests
13683 (propagated-inputs
13684 `(("libarchive" ,libarchive)))
13685 (home-page "https://github.com/markokr/rarfile")
13686 (synopsis "RAR archive reader for Python")
13687 (description "This is Python module for RAR archive reading. The interface
13688 is made as zipfile like as possible.")
13689 (license license:isc)))
13690
13691 (define-public python2-rarfile
13692 (package-with-python2 python-rarfile))
13693
13694 (define-public python-rich
13695 (package
13696 (name "python-rich")
13697 (version "10.2.2")
13698 (source (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "rich" version))
13701 (sha256
13702 (base32
13703 "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
13704 (build-system python-build-system)
13705 (arguments
13706 `(#:phases
13707 (modify-phases %standard-phases
13708 (replace 'check
13709 (lambda* (#:key inputs tests? #:allow-other-keys)
13710 (when tests?
13711 (copy-recursively (string-append
13712 (assoc-ref inputs "tests") "/tests")
13713 "tests")
13714 (invoke "python" "-m" "pytest" "-vv")))))))
13715 (propagated-inputs
13716 `(("python-attrs" ,python-attrs)
13717 ("python-colorama" ,python-colorama)
13718 ("python-commonmark" ,python-commonmark)
13719 ("python-ipywidgets" ,python-ipywidgets)
13720 ("python-pygments" ,python-pygments)
13721 ("python-typing-extensions" ,python-typing-extensions)))
13722 (native-inputs
13723 `(("python-pytest" ,python-pytest)
13724 ("tests"
13725 ;; The release on pypi comes without tests. We can't build from this
13726 ;; checkout, though, because installation requires an invocation of
13727 ;; poetry.
13728 ,(origin
13729 (method git-fetch)
13730 (uri (git-reference
13731 (url "https://github.com/willmcgugan/rich")
13732 (commit (string-append "v" version))))
13733 (file-name (git-file-name name version))
13734 (sha256
13735 (base32
13736 "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
13737 (home-page "https://github.com/willmcgugan/rich")
13738 (synopsis "Render rich text and more to the terminal")
13739 (description
13740 "This is a Python package for rendering rich text, tables, progress bars,
13741 syntax highlighting, markdown and more to the terminal.")
13742 (license license:expat)))
13743
13744 (define-public python-magic
13745 (package
13746 (name "python-magic")
13747 (version "0.4.15")
13748 (source
13749 (origin
13750 (method url-fetch)
13751 (uri (pypi-uri "python-magic" version))
13752 (sha256
13753 (base32
13754 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
13755 (file-name (string-append name "-" version "-checkout"))))
13756 (build-system python-build-system)
13757 (arguments
13758 ;; The tests are unreliable, so don't run them. The tests fail
13759 ;; under Python3 because they were written for Python2 and
13760 ;; contain import statements that do not work in Python3. One of
13761 ;; the tests fails under Python2 because its assertions are
13762 ;; overly stringent; it relies on comparing output strings which
13763 ;; are brittle and can change depending on the version of
13764 ;; libmagic being used and the system on which the test is
13765 ;; running. In my case, under GuixSD 0.10.0, only one test
13766 ;; failed, and it seems to have failed only because the version
13767 ;; of libmagic that is packaged in Guix outputs a slightly
13768 ;; different (but not wrong) string than the one that the test
13769 ;; expected.
13770 '(#:tests? #f
13771 #:phases (modify-phases %standard-phases
13772 ;; Replace a specific method call with a hard-coded
13773 ;; path to the necessary libmagic.so file in the
13774 ;; store. If we don't do this, then the method call
13775 ;; will fail to find the libmagic.so file, which in
13776 ;; turn will cause any application using
13777 ;; python-magic to fail.
13778 (add-before 'build 'hard-code-path-to-libmagic
13779 (lambda* (#:key inputs #:allow-other-keys)
13780 (let ((file (assoc-ref inputs "file")))
13781 (substitute* "magic.py"
13782 (("ctypes.util.find_library\\('magic'\\)")
13783 (string-append "'" file "/lib/libmagic.so'")))
13784 #t)))
13785 (add-before 'install 'disable-egg-compression
13786 (lambda _
13787 (let ((port (open-file "setup.cfg" "a")))
13788 (display "\n[easy_install]\nzip_ok = 0\n"
13789 port)
13790 (close-port port)
13791 #t))))))
13792 (inputs
13793 ;; python-magic needs to be able to find libmagic.so.
13794 `(("file" ,file)))
13795 (home-page
13796 "https://github.com/ahupp/python-magic")
13797 (synopsis
13798 "File type identification using libmagic")
13799 (description
13800 "This module uses ctypes to access the libmagic file type
13801 identification library. It makes use of the local magic database and
13802 supports both textual and MIME-type output. Note that this module and
13803 the python-file module both provide a \"magic.py\" file; these two
13804 modules, which are different and were developed separately, both serve
13805 the same purpose: to provide Python bindings for libmagic.")
13806 (license license:expat)))
13807
13808 (define-public python2-magic
13809 (package-with-python2 python-magic))
13810
13811 (define-public python2-s3cmd
13812 (package
13813 (name "python2-s3cmd")
13814 (version "1.6.1")
13815 (source
13816 (origin
13817 (method url-fetch)
13818 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
13819 "s3cmd-" version ".tar.gz"))
13820 (sha256
13821 (base32
13822 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
13823 (build-system python-build-system)
13824 (arguments
13825 ;; s3cmd is written for python2 only and contains no tests.
13826 `(#:python ,python-2
13827 #:tests? #f))
13828 (propagated-inputs
13829 `(("python2-dateutil" ,python2-dateutil)
13830 ;; The python-file package also provides a magic.py module.
13831 ;; This is an unfortunate state of affairs; however, s3cmd
13832 ;; fails to install if it cannot find specifically the
13833 ;; python-magic package. Thus we include it, instead of using
13834 ;; python-file. Ironically, s3cmd sometimes works better
13835 ;; without libmagic bindings at all:
13836 ;; https://github.com/s3tools/s3cmd/issues/198
13837 ("python2-magic" ,python2-magic)))
13838 (home-page "https://s3tools.org/s3cmd")
13839 (synopsis "Command line tool for S3-compatible storage services")
13840 (description
13841 "S3cmd is a command line tool for uploading, retrieving and managing data
13842 in storage services that are compatible with the Amazon Simple Storage
13843 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
13844 GnuPG encryption, and more. It also supports management of Amazon's
13845 CloudFront content delivery network.")
13846 (license license:gpl2+)))
13847
13848 (define-public python-pkgconfig
13849 (package
13850 (name "python-pkgconfig")
13851 (version "1.3.1")
13852 (source
13853 (origin
13854 (method url-fetch)
13855 (uri (pypi-uri "pkgconfig" version))
13856 (sha256
13857 (base32
13858 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
13859 (build-system python-build-system)
13860 (native-inputs
13861 `(("python-nose" ,python-nose)))
13862 (inputs
13863 `(("pkg-config" ,pkg-config)))
13864 (arguments
13865 `(#:phases
13866 (modify-phases %standard-phases
13867 (add-before 'build 'patch
13868 ;; Hard-code the path to pkg-config.
13869 (lambda _
13870 (substitute* "pkgconfig/pkgconfig.py"
13871 (("cmd = 'pkg-config")
13872 (string-append "cmd = '" (which "pkg-config"))))
13873 #t))
13874 (replace 'check
13875 (lambda _
13876 (invoke "nosetests" "test.py"))))))
13877 (home-page "https://github.com/matze/pkgconfig")
13878 (synopsis "Python interface for pkg-config")
13879 (description "This module provides a Python interface to pkg-config. It
13880 can be used to find all pkg-config packages, check if a package exists,
13881 check if a package meets certain version requirements, query CFLAGS and
13882 LDFLAGS and parse the output to build extensions with setup.py.")
13883 (license license:expat)))
13884
13885 (define-public python2-pkgconfig
13886 (package-with-python2 python-pkgconfig))
13887
13888 (define-public python-bz2file
13889 (package
13890 (name "python-bz2file")
13891 (version "0.98")
13892 (source
13893 (origin
13894 (method url-fetch)
13895 (uri (pypi-uri "bz2file" version))
13896 (sha256
13897 (base32
13898 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
13899 (build-system python-build-system)
13900 (arguments
13901 `(#:tests? #f)) ; Tests use deprecated python modules.
13902 (home-page "https://github.com/nvawda/bz2file")
13903 (synopsis "Read and write bzip2-compressed files")
13904 (description
13905 "Bz2file is a Python library for reading and writing bzip2-compressed
13906 files. It contains a drop-in replacement for the I/O interface in the
13907 standard library's @code{bz2} module, including features from the latest
13908 development version of CPython that are not available in older releases.")
13909 (license license:asl2.0)))
13910
13911 (define-public python2-bz2file
13912 (package-with-python2 python-bz2file))
13913
13914 (define-public python-future
13915 (package
13916 (name "python-future")
13917 (version "0.17.1")
13918 (source
13919 (origin
13920 (method url-fetch)
13921 (uri (pypi-uri "future" version))
13922 (sha256
13923 (base32
13924 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
13925 (build-system python-build-system)
13926 ;; Many tests connect to the network or are otherwise flawed.
13927 ;; https://github.com/PythonCharmers/python-future/issues/210
13928 (arguments
13929 `(#:tests? #f))
13930 (home-page "https://python-future.org")
13931 (synopsis "Single-source support for Python 3 and 2")
13932 (description
13933 "@code{python-future} is the missing compatibility layer between Python 2 and
13934 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
13935 to support both Python 2 and Python 3 with minimal overhead.")
13936 (license license:expat)))
13937
13938 (define-public python2-future
13939 (package-with-python2 python-future))
13940
13941 (define-public python-cysignals
13942 (package
13943 (name "python-cysignals")
13944 (version "1.9.0")
13945 (source
13946 (origin
13947 (method url-fetch)
13948 (uri (pypi-uri "cysignals" version))
13949 (sha256
13950 (base32
13951 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
13952 (build-system python-build-system)
13953 (native-inputs
13954 `(("python-cython" ,python-cython)
13955 ("python-sphinx" ,python-sphinx)))
13956 (inputs
13957 `(("pari-gp" ,pari-gp)))
13958 (arguments
13959 `(#:modules ((guix build python-build-system)
13960 ((guix build gnu-build-system) #:prefix gnu:)
13961 (guix build utils))
13962 ;; FIXME: Tests are executed after installation and currently fail
13963 ;; when not installing into standard locations; the author is working
13964 ;; on a fix.
13965 #:tests? #f
13966 #:phases
13967 (modify-phases %standard-phases
13968 (add-before
13969 'build 'configure
13970 (assoc-ref gnu:%standard-phases 'configure)))))
13971 (home-page
13972 "https://github.com/sagemath/cysignals")
13973 (synopsis
13974 "Handling of interrupts and signals for Cython")
13975 (description
13976 "The cysignals package provides mechanisms to handle interrupts (and
13977 other signals and errors) in Cython code, using two related approaches,
13978 for mixed Cython/Python code or external C libraries and pure Cython code,
13979 respectively.")
13980 (license license:lgpl3+)))
13981
13982 (define-public python2-cysignals
13983 (package-with-python2 python-cysignals))
13984
13985 (define-public python2-shedskin
13986 (package
13987 (name "python2-shedskin")
13988 (version "0.9.4")
13989 (source
13990 (origin
13991 (method url-fetch)
13992 (uri (string-append "https://github.com/shedskin/shedskin/"
13993 "releases/download/v" version
13994 "/shedskin-" version ".tgz"))
13995 (sha256
13996 (base32
13997 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
13998 (build-system python-build-system)
13999 (arguments
14000 `(#:python ,python-2
14001 #:phases (modify-phases %standard-phases
14002 (add-after 'unpack 'fix-resulting-include-libs
14003 (lambda* (#:key inputs #:allow-other-keys)
14004 (let ((libgc (assoc-ref inputs "libgc"))
14005 (pcre (assoc-ref inputs "pcre")))
14006 (substitute* "shedskin/makefile.py"
14007 (("variable == 'CCFLAGS':[ ]*")
14008 (string-append "variable == 'CCFLAGS':\n"
14009 " line += ' -I " pcre "/include"
14010 " -I " libgc "/include'"))
14011 (("variable == 'LFLAGS':[ ]*")
14012 (string-append "variable == 'LFLAGS':\n"
14013 " line += ' -L" pcre "/lib"
14014 " -L " libgc "/lib'")))
14015 #t))))))
14016 (inputs `(("pcre" ,pcre)
14017 ("libgc" ,libgc)))
14018 (home-page "https://shedskin.github.io/")
14019 (synopsis "Experimental Python-2 to C++ Compiler")
14020 (description (string-append "This is an experimental compiler for a subset of
14021 Python. It generates C++ code and a Makefile."))
14022 (license (list license:gpl3 license:bsd-3 license:expat))))
14023
14024 (define-public python2-rope
14025 (package
14026 (name "python2-rope")
14027 (version "0.11.0")
14028 (source
14029 (origin
14030 (method url-fetch)
14031 (uri (pypi-uri "rope" version))
14032 (sha256
14033 (base32
14034 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
14035 (arguments
14036 ;; Rope has only partial python3 support, see `python-rope'
14037 `(#:python ,python-2))
14038 (build-system python-build-system)
14039 (native-inputs
14040 `(("python2-unittest2" ,python2-unittest2)))
14041 (home-page "https://github.com/python-rope/rope")
14042 (synopsis "Refactoring library for Python")
14043 (description "Rope is a refactoring library for Python. It facilitates
14044 the renaming, moving and extracting of attributes, functions, modules, fields
14045 and parameters in Python 2 source code. These refactorings can also be applied
14046 to occurrences in strings and comments.")
14047 (license license:gpl2)))
14048
14049 (define-public python-rope
14050 (package/inherit python2-rope
14051 (name "python-rope")
14052 (arguments `(#:python ,python-wrapper
14053 ;; XXX: Only partial python3 support, results in some failing
14054 ;; tests: <https://github.com/python-rope/rope/issues/247>.
14055 #:tests? #f))
14056 (properties `((python2-variant . ,(delay python2-rope))))))
14057
14058 (define-public python-py3status
14059 (package
14060 (name "python-py3status")
14061 (version "3.21")
14062 (source
14063 (origin
14064 (method url-fetch)
14065 (uri (pypi-uri "py3status" version))
14066 (sha256
14067 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
14068 (build-system python-build-system)
14069 (inputs
14070 `(("file" ,file)))
14071 (arguments
14072 '(#:phases
14073 (modify-phases %standard-phases
14074 ;; 'file' is used for detection of configuration file encoding
14075 ;; let's make link the dependency to particular input
14076 (add-before 'build 'patch-file-path
14077 (lambda* (#:key inputs #:allow-other-keys)
14078 (let ((file-path (assoc-ref inputs "file")))
14079 (substitute* "py3status/parse_config.py"
14080 (("\\[\"file\", \"-b\"")
14081 (string-append "['" file-path "/bin/file', '-b'")))
14082 #t))))
14083 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
14084 (home-page "https://github.com/ultrabug/py3status")
14085 (synopsis "Extensible i3status wrapper written in Python")
14086 (description "py3status is an i3status wrapper which extends i3status
14087 functionality in a modular way, allowing you to extend your panel with your
14088 own code, responding to click events and updating clock every second.")
14089 (license license:bsd-3)))
14090
14091 (define-public python2-selectors2
14092 (package
14093 (name "python2-selectors2")
14094 (version "2.0.1")
14095 (source (origin
14096 (method url-fetch)
14097 (uri (pypi-uri "selectors2" version))
14098 (sha256
14099 (base32
14100 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
14101 (build-system python-build-system)
14102 (arguments
14103 `(#:python ,python-2))
14104 (native-inputs
14105 `(("python2-mock" ,python2-mock)
14106 ("python2-psutil" ,python2-psutil)))
14107 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
14108 (synopsis "Backport of the selectors module from Python 3.5+")
14109 (description
14110 "This package provides a drop-in replacement for the @code{selectors}
14111 module in Python 3.5 and later.")
14112 (license license:expat)))
14113
14114 (define-public python-tblib
14115 (package
14116 (name "python-tblib")
14117 (version "1.6.0")
14118 (source (origin
14119 (method url-fetch)
14120 (uri (pypi-uri "tblib" version))
14121 (sha256
14122 (base32
14123 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
14124 (build-system python-build-system)
14125 (arguments
14126 `(#:phases
14127 (modify-phases %standard-phases
14128 (replace 'check
14129 (lambda _
14130 ;; Upstream runs tests after installation and the package itself
14131 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
14132 ;; found.
14133 (setenv "PYTHONPATH"
14134 (string-append (getcwd) "/build/lib:"
14135 (getenv "PYTHONPATH")))
14136 (invoke "py.test" "-vv" "tests" "README.rst"))))))
14137 (native-inputs
14138 `(("python-pytest" ,python-pytest)
14139 ("python-six" ,python-six)))
14140 (home-page "https://github.com/ionelmc/python-tblib")
14141 (synopsis "Traceback serialization library")
14142 (description
14143 "Traceback serialization allows you to:
14144
14145 @enumerate
14146 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
14147 different processes. This allows better error handling when running code over
14148 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
14149
14150 @item Parse traceback strings and raise with the parsed tracebacks.
14151 @end enumerate\n")
14152 (license license:bsd-3)))
14153
14154 (define-public python2-tblib
14155 (package-with-python2 python-tblib))
14156
14157 (define-public python-greenlet
14158 (package
14159 (name "python-greenlet")
14160 (version "1.0.0")
14161 (source (origin
14162 (method url-fetch)
14163 (uri (pypi-uri "greenlet" version))
14164 (sha256
14165 (base32
14166 "1y6wbg9yhm9dw6m768n4yslp56h85pnxkk3drz6icn15g6f1d7ki"))))
14167 (build-system python-build-system)
14168 (home-page "https://greenlet.readthedocs.io/")
14169 (synopsis "Lightweight in-process concurrent programming")
14170 (description
14171 "Greenlet package is a spin-off of Stackless, a version of CPython
14172 that supports micro-threads called \"tasklets\". Tasklets run
14173 pseudo-concurrently (typically in a single or a few OS-level threads) and
14174 are synchronized with data exchanges on \"channels\".")
14175 (license (list license:psfl license:expat))))
14176
14177 (define-public python-objgraph
14178 (package
14179 (name "python-objgraph")
14180 (version "3.4.1")
14181 (source
14182 (origin
14183 (method url-fetch)
14184 (uri (pypi-uri "objgraph" version))
14185 (sha256
14186 (base32
14187 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
14188 (build-system python-build-system)
14189 (propagated-inputs
14190 `(("python-graphviz" ,python-graphviz)))
14191 (native-inputs
14192 `(("python-mock" ,python-mock)
14193 ("graphviz" ,graphviz)))
14194 (home-page "https://mg.pov.lt/objgraph/")
14195 (synopsis "Draw Python object reference graphs with graphviz")
14196 (description
14197 "This package provides tools to draw Python object reference graphs with
14198 graphviz.")
14199 (license license:expat)))
14200
14201 (define-public python2-objgraph
14202 (package-with-python2 python-objgraph))
14203
14204 (define-public python-gevent
14205 (package
14206 (name "python-gevent")
14207 (version "21.1.2")
14208 (source (origin
14209 (method url-fetch)
14210 (uri (pypi-uri "gevent" version))
14211 (sha256
14212 (base32
14213 "10f9y899y9nmq51pv4r1zb51b4w5yxx00sz5whvg9vm956hc432j"))
14214 (modules '((guix build utils)))
14215 (snippet
14216 '(begin
14217 ;; unbunding libev and c-ares
14218 (delete-file-recursively "deps")))))
14219 (build-system python-build-system)
14220 (arguments
14221 `(#:modules ((ice-9 ftw)
14222 (ice-9 match)
14223 (srfi srfi-26)
14224 (guix build utils)
14225 (guix build python-build-system))
14226 #:phases (modify-phases %standard-phases
14227 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
14228 (lambda _
14229 (substitute* "src/gevent/subprocess.py"
14230 (("/bin/sh") (which "sh")))
14231 (for-each (lambda (file)
14232 (substitute* file
14233 (("/bin/sh") (which "sh"))
14234 (("/bin/true") (which "true"))))
14235 (find-files "src/greentest" "\\.py$"))))
14236 (add-before 'build 'do-not-use-bundled-sources
14237 (lambda _
14238 (setenv "GEVENTSETUP_EMBED" "0")
14239
14240 ;; Prevent building bundled libev.
14241 (substitute* "setup.py"
14242 (("run_make=_BUILDING")
14243 "run_make=False"))))
14244 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
14245 (lambda* (#:key inputs #:allow-other-keys)
14246 (let ((greenlet (string-append
14247 (assoc-ref inputs "python-greenlet")
14248 "/include")))
14249 (match (scandir greenlet
14250 (lambda (item)
14251 (string-prefix? "python" item)))
14252 ((python)
14253 (setenv "C_INCLUDE_PATH"
14254 (string-append greenlet "/" python ":"
14255 (or (getenv "C_INCLUDE_PATH")
14256 ""))))))))
14257 (add-before 'check 'pretend-to-be-CI
14258 (lambda _
14259 ;; A few tests are skipped due to network constraints or
14260 ;; get longer timeouts when running in a CI environment.
14261 ;; Piggy-back on that, as we need the same adjustments.
14262 (setenv "TRAVIS" "1")
14263 (setenv "APPVEYOR" "1")))
14264 (add-before 'check 'adjust-tests
14265 (lambda _
14266 (let ((disabled-tests
14267 '(;; These tests relies on networking which is
14268 ;; not available in the build container.
14269 "test__getaddrinfo_import.py"
14270 "test__server_pywsgi.py"
14271 ;; XXX: These tests borrow functionality from the
14272 ;; Python builtin 'test' module, but it is not
14273 ;; installed with the Guix Python distribution.
14274 "test_smtpd.py"
14275 "test_wsgiref.py"
14276 "test_urllib2.py"
14277 "test_thread.py"
14278 "test_threading.py"
14279 "test__threading_2.py"
14280 ;; These tests rely on KeyboardInterrupts which do not
14281 ;; work inside the build container for some reason
14282 ;; (lack of controlling terminal?).
14283 "test_subprocess.py"
14284 "test__issues461_471.py"
14285 ;; TODO: Patch out the tests that use getprotobyname, etc
14286 ;; instead of disabling all the tests from these files.
14287 "test__resolver_dnspython.py"
14288 "test__doctests.py"
14289 "test__all__.py"
14290 "test___config.py"
14291 "test__execmodules.py")))
14292 (call-with-output-file "skipped_tests.txt"
14293 (lambda (port)
14294 (format port "~a~%"
14295 (string-join disabled-tests "\n")))))))
14296 (replace 'check
14297 (lambda _
14298 ;; Make sure the build directory is on PYTHONPATH.
14299 (setenv "PYTHONPATH"
14300 (string-append
14301 (getenv "PYTHONPATH") ":"
14302 (getcwd) "/build/"
14303 (car (scandir "build" (cut string-prefix? "lib." <>)))))
14304
14305 ;; Use the build daemons configured number of workers.
14306 (setenv "NWORKERS" (number->string (parallel-job-count)))
14307
14308 (invoke "python" "-m" "gevent.tests" "-unone" "--config"
14309 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
14310 (propagated-inputs
14311 `(("python-greenlet" ,python-greenlet)
14312 ("python-objgraph" ,python-objgraph)
14313 ("python-zope.event" ,python-zope-event)
14314 ("python-zope.interface" ,python-zope-interface)))
14315 (native-inputs
14316 `(("python-six" ,python-six)
14317
14318 ;; For tests.
14319 ("python-dnspython" ,python-dnspython)
14320 ("python-psutil" ,python-psutil)))
14321 (inputs
14322 `(("c-ares" ,c-ares)
14323 ("libev" ,libev)))
14324 (home-page "https://www.gevent.org/")
14325 (synopsis "Coroutine-based network library")
14326 (description
14327 "@code{gevent} is a coroutine-based Python networking library that uses
14328 @code{greenlet} to provide a high-level synchronous API on top of the
14329 @code{libev} event loop.")
14330 (license license:expat)))
14331
14332 (define-public python-fastimport
14333 (package
14334 (name "python-fastimport")
14335 (version "0.9.9")
14336 (source
14337 (origin
14338 (method url-fetch)
14339 (uri (pypi-uri "fastimport" version))
14340 (sha256
14341 (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
14342 (build-system python-build-system)
14343 (home-page "https://github.com/jelmer/python-fastimport")
14344 (synopsis "VCS fastimport parser and generator in Python")
14345 (description "This package provides a parser for and generator of the Git
14346 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
14347 format.")
14348 (license license:gpl2+)))
14349
14350 (define-public python-twisted
14351 (package
14352 (name "python-twisted")
14353 (version "19.7.0")
14354 (source (origin
14355 (method url-fetch)
14356 (uri (pypi-uri "Twisted" version ".tar.bz2"))
14357 (sha256
14358 (base32
14359 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
14360 (build-system python-build-system)
14361 (arguments
14362 '(#:tests? #f)) ; FIXME: some tests fail
14363 (propagated-inputs
14364 `(("python-zope-interface" ,python-zope-interface)
14365 ("python-pyhamcrest" ,python-pyhamcrest)
14366 ("python-incremental" ,python-incremental)
14367 ("python-hyperlink" ,python-hyperlink)
14368 ("python-constantly" ,python-constantly)
14369 ("python-automat" ,python-automat)))
14370 (home-page "https://twistedmatrix.com/")
14371 (synopsis "Asynchronous networking framework written in Python")
14372 (description
14373 "Twisted is an extensible framework for Python programming, with special
14374 focus on event-based network programming and multiprotocol integration.")
14375 (license license:expat)))
14376
14377 (define-public python2-twisted
14378 (package-with-python2 python-twisted))
14379
14380 (define-public python-pika
14381 (package
14382 (name "python-pika")
14383 (version "1.2.0")
14384 (source
14385 (origin
14386 (method git-fetch)
14387 (uri (git-reference
14388 (url "https://github.com/pika/pika")
14389 (commit version)))
14390 (file-name (git-file-name name version))
14391 (sha256
14392 (base32
14393 "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
14394 (build-system python-build-system)
14395 (arguments
14396 '(#:phases (modify-phases %standard-phases
14397 (add-before 'check 'disable-live-tests
14398 (lambda _
14399 ;; Disable tests that require RabbitMQ, which is not
14400 ;; yet available in Guix.
14401 (substitute* "setup.cfg"
14402 (("tests/unit,tests/acceptance")
14403 "tests/unit"))
14404 (with-directory-excursion "tests"
14405 (for-each delete-file
14406 '("unit/base_connection_tests.py"
14407 "unit/threaded_test_wrapper_test.py")))))
14408 (replace 'check
14409 (lambda _
14410 (invoke "nosetests"))))))
14411 (native-inputs
14412 `(("python-mock" ,python-mock)
14413 ("python-nose" ,python-nose)
14414
14415 ;; These are optional at runtime, and provided here for tests.
14416 ("python-gevent" ,python-gevent)
14417 ("python-tornado" ,python-tornado)
14418 ("python-twisted" ,python-twisted)))
14419 (home-page "https://pika.readthedocs.org")
14420 (synopsis "Pure Python AMQP Client Library")
14421 (description
14422 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
14423 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
14424 network support library.")
14425 (license license:bsd-3)))
14426
14427 (define-public python-ply
14428 (package
14429 (name "python-ply")
14430 (version "3.11")
14431 (source
14432 (origin
14433 (method url-fetch)
14434 (uri (pypi-uri "ply" version))
14435 (sha256
14436 (base32
14437 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
14438 (build-system python-build-system)
14439 (home-page "http://www.dabeaz.com/ply/")
14440 (synopsis "Python Lex & Yacc")
14441 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
14442 It uses LR parsing and does extensive error checking.")
14443 (license license:bsd-3)))
14444
14445 (define-public python-tabulate
14446 (package
14447 (name "python-tabulate")
14448 (version "0.8.9")
14449 (source (origin
14450 (method url-fetch)
14451 (uri (pypi-uri "tabulate" version))
14452 (sha256
14453 (base32
14454 "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
14455 (build-system python-build-system)
14456 (arguments
14457 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
14458 ;; and the latest release is not tagged in the upstream repository.
14459 '(#:tests? #f))
14460 (home-page "https://bitbucket.org/astanin/python-tabulate")
14461 (synopsis "Pretty-print tabular data")
14462 (description
14463 "Tabulate is a library and command-line utility to pretty-print tabular
14464 data in Python.")
14465 (license license:expat)))
14466
14467 (define-public python2-tabulate
14468 (package-with-python2 python-tabulate))
14469
14470 (define-public python-kazoo
14471 (package
14472 (name "python-kazoo")
14473 (version "2.4.0")
14474 (source
14475 (origin
14476 (method url-fetch)
14477 (uri (pypi-uri "kazoo" version))
14478 (sha256
14479 (base32
14480 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
14481 (build-system python-build-system)
14482 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
14483 (propagated-inputs
14484 `(("python-six" ,python-six)))
14485 (home-page "https://kazoo.readthedocs.org")
14486 (synopsis "High-level Zookeeper client library")
14487 (description
14488 "Kazoo is a Python client library for the Apache Zookeeper distributed
14489 application service. It is designed to be easy to use and to avoid common
14490 programming errors.")
14491 (license license:asl2.0)))
14492
14493 (define-public python2-kazoo
14494 (package-with-python2 python-kazoo))
14495
14496 (define-public python-pykafka
14497 (package
14498 (name "python-pykafka")
14499 (version "2.4.0")
14500 (source (origin
14501 (method url-fetch)
14502 (uri (pypi-uri "pykafka" version))
14503 (sha256
14504 (base32
14505 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
14506 (build-system python-build-system)
14507 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
14508 (propagated-inputs
14509 `(("python-gevent" ,python-gevent)
14510 ("python-kazoo" ,python-kazoo)
14511 ("python-tabulate" ,python-tabulate)))
14512 (inputs
14513 `(("librdkafka" ,librdkafka)))
14514 (home-page "https://pykafka.readthedocs.io/")
14515 (synopsis "Apache Kafka client for Python")
14516 (description
14517 "PyKafka is a client for the Apache Kafka distributed messaging system.
14518 It includes Python implementations of Kafka producers and consumers, which
14519 are optionally backed by a C extension built on librdkafka.")
14520 (license license:asl2.0)))
14521
14522 (define-public python-wcwidth
14523 (package
14524 (name "python-wcwidth")
14525 (version "0.1.8")
14526 (source (origin
14527 (method url-fetch)
14528 (uri (pypi-uri "wcwidth" version))
14529 (sha256
14530 (base32
14531 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
14532 (build-system python-build-system)
14533 (home-page "https://github.com/jquast/wcwidth")
14534 (synopsis "Measure number of terminal column cells of wide-character codes")
14535 (description "Wcwidth measures the number of terminal column cells of
14536 wide-character codes. It is useful for those implementing a terminal emulator,
14537 or programs that carefully produce output to be interpreted by one. It is a
14538 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
14539 specified in POSIX.1-2001 and POSIX.1-2008.")
14540 (license license:expat)))
14541
14542 (define-public python2-wcwidth
14543 (package-with-python2 python-wcwidth))
14544
14545 (define-public python2-jsonrpclib
14546 (package
14547 (name "python2-jsonrpclib")
14548 (version "0.1.7")
14549 (source (origin
14550 (method url-fetch)
14551 (uri (pypi-uri "jsonrpclib" version))
14552 (sha256
14553 (base32
14554 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
14555 (build-system python-build-system)
14556 (arguments
14557 `(#:tests? #f
14558 #:python ,python-2))
14559 (home-page "https://github.com/joshmarshall/jsonrpclib/")
14560 (synopsis "Implementation of JSON-RPC specification for Python")
14561 (description
14562 "This library is an implementation of the JSON-RPC specification.
14563 It supports both the original 1.0 specification, as well as the
14564 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
14565 etc.")
14566 (license license:asl2.0)))
14567
14568 (define-public python-chai
14569 (package
14570 (name "python-chai")
14571 (version "1.1.2")
14572 (source (origin
14573 (method url-fetch)
14574 (uri (pypi-uri "chai" version))
14575 (sha256
14576 (base32
14577 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
14578 (build-system python-build-system)
14579 (home-page "https://github.com/agoragames/chai")
14580 (synopsis "Mocking framework for Python")
14581 (description
14582 "Chai provides an api for mocking, stubbing and spying your python
14583 objects, patterned after the Mocha library for Ruby.")
14584 (license license:bsd-3)))
14585
14586 (define-public python2-chai
14587 (package-with-python2 python-chai))
14588
14589 (define-public python-inflection
14590 (package
14591 (name "python-inflection")
14592 (version "0.3.1")
14593 (source
14594 (origin (method url-fetch)
14595 (uri (pypi-uri "inflection" version))
14596 (sha256
14597 (base32
14598 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
14599 (build-system python-build-system)
14600 (native-inputs
14601 `(("python-pytest" ,python-pytest)))
14602 (home-page "https://github.com/jpvanhal/inflection")
14603 (synopsis "Python string transformation library")
14604 (description
14605 "Inflection is a string transformation library. It singularizes
14606 and pluralizes English words, and transforms strings from CamelCase to
14607 underscored string.")
14608 (license license:expat)))
14609
14610 (define-public python2-inflection
14611 (package-with-python2 python-inflection))
14612
14613 (define-public python-pylev
14614 (package
14615 (name "python-pylev")
14616 (version "1.3.0")
14617 (source (origin
14618 (method url-fetch)
14619 (uri (pypi-uri "pylev" version))
14620 (sha256
14621 (base32
14622 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
14623 (build-system python-build-system)
14624 (home-page "https://github.com/toastdriven/pylev")
14625 (synopsis "Levenshtein distance implementation in Python")
14626 (description "Pure Python Levenshtein implementation, based off the
14627 Wikipedia code samples at
14628 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
14629 (license license:bsd-3)))
14630
14631 (define-public python2-pylev
14632 (package-with-python2 python-pylev))
14633
14634 (define-public python-cleo
14635 (package
14636 (name "python-cleo")
14637 (version "0.8.1")
14638 (source (origin
14639 (method url-fetch)
14640 (uri (pypi-uri "cleo" version))
14641 (sha256
14642 (base32
14643 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
14644 (build-system python-build-system)
14645 (native-inputs
14646 `( ;; For testing
14647 ("python-mock" ,python-mock)
14648 ("python-pytest-mock" ,python-pytest-mock)
14649 ("python-pytest" ,python-pytest)))
14650 (propagated-inputs
14651 `(("python-backpack" ,python-backpack)
14652 ("python-clikit" ,python-clikit)
14653 ("python-pastel" ,python-pastel)
14654 ("python-pylev" ,python-pylev)))
14655 (home-page "https://github.com/sdispater/cleo")
14656 (synopsis "Command-line arguments library for Python")
14657 (description
14658 "Cleo allows you to create command-line commands with signature in
14659 docstring and colored output.")
14660 (license license:expat)))
14661
14662 (define-public python2-cleo
14663 (package-with-python2 python-cleo))
14664
14665 (define-public python-tomlkit
14666 (package
14667 (name "python-tomlkit")
14668 (version "0.7.0")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (pypi-uri "tomlkit" version))
14673 (sha256
14674 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
14675 (build-system python-build-system)
14676 (native-inputs
14677 `(("python-pytest" ,python-pytest)
14678 ("python-pyyaml" ,python-pyyaml)))
14679 (home-page "https://github.com/sdispater/tomlkit")
14680 (synopsis "Style-preserving TOML library")
14681 (description
14682 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
14683 preserves all comments, indentations, whitespace and internal element ordering,
14684 and makes them accessible and editable via an intuitive API. It can also
14685 create new TOML documents from scratch using the provided helpers. Part of the
14686 implementation has been adapted, improved, and fixed from Molten.")
14687 (license license:expat)))
14688
14689 (define-public python-shellingham
14690 (package
14691 (name "python-shellingham")
14692 (version "1.3.2")
14693 (source
14694 (origin
14695 (method url-fetch)
14696 (uri (pypi-uri "shellingham" version))
14697 (sha256
14698 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
14699 (build-system python-build-system)
14700 (arguments
14701 `(#:phases
14702 (modify-phases %standard-phases
14703 (add-after 'unpack 'restore-setup.py
14704 ;; setup.py will return in the next release.
14705 ;; <https://github.com/sarugaku/shellingham/issues/33>
14706 (lambda _
14707 (with-output-to-file "setup.py"
14708 (lambda _
14709 (display "from setuptools import setup\nsetup()\n")))
14710 #t)))))
14711 (home-page "https://github.com/sarugaku/shellingham")
14712 (synopsis "Tool to detect surrounding shell")
14713 (description
14714 "Shellingham detects what shell the current Python executable is
14715 running in.")
14716 (license license:isc)))
14717
14718 (define-public python-memcached
14719 (package
14720 (name "python-memcached")
14721 (version "1.59")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "python-memcached" version))
14726 (sha256
14727 (base32
14728 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
14729 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
14730 (build-system python-build-system)
14731 (propagated-inputs `(("python-six" ,python-six)))
14732 (home-page
14733 "https://github.com/linsomniac/python-memcached")
14734 (synopsis "Pure python memcached client")
14735 (description
14736 "This software is a pure Python interface to the memcached memory cache
14737 daemon. It is the client side software which allows storing values in one or
14738 more, possibly remote, memcached servers.")
14739 (license license:psfl)))
14740
14741 (define-public python-clikit
14742 (package
14743 (name "python-clikit")
14744 (version "0.6.2")
14745 (source
14746 (origin
14747 (method url-fetch)
14748 (uri (pypi-uri "clikit" version))
14749 (sha256
14750 (base32
14751 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
14752 (build-system python-build-system)
14753 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
14754 (propagated-inputs
14755 `(("python-crashtest" ,python-crashtest)
14756 ("python-pastel" ,python-pastel)
14757 ("python-pylev" ,python-pylev)))
14758 (home-page "https://github.com/sdispater/clikit")
14759 (synopsis "Group of utilities to build command line interfaces")
14760 (description
14761 "CliKit is a group of utilities to build testable command line
14762 interfaces.")
14763 (properties `((python2-variant . ,(delay python2-clikit))))
14764 (license license:expat)))
14765
14766 (define-public python2-clikit
14767 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
14768 (package/inherit
14769 base
14770 (propagated-inputs
14771 `(("python-enum34" ,python2-enum34)
14772 ("python-typing" ,python2-typing)
14773 ,@(package-propagated-inputs base))))))
14774
14775 (define-public python-msgpack-python
14776 (package
14777 (name "python-msgpack-python")
14778 (version "0.5.6")
14779 (source
14780 (origin
14781 (method url-fetch)
14782 (uri (pypi-uri "msgpack-python" version))
14783 (sha256
14784 (base32
14785 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
14786 (build-system python-build-system)
14787 (home-page "https://msgpack.org/")
14788 (synopsis "Package to deserialize messages in MessagePack binary format")
14789 (description
14790 "MessagePack is an efficient binary serialization format. It lets you
14791 exchange data among multiple languages like JSON. But it's faster and
14792 smaller. Small integers are encoded into a single byte, and typical short
14793 strings require only one extra byte in addition to the strings themselves.")
14794 (license license:asl2.0)))
14795
14796 (define-public python-cachy
14797 (package
14798 (name "python-cachy")
14799 (version "0.3.0")
14800 (source
14801 (origin
14802 (method url-fetch)
14803 (uri (pypi-uri "cachy" version))
14804 (sha256
14805 (base32
14806 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
14807 (build-system python-build-system)
14808 (arguments
14809 '(#:phases
14810 (modify-phases %standard-phases
14811 (replace 'check
14812 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
14813 "pytest"))))))
14814 (native-inputs
14815 `(("memcached" ,memcached)
14816 ("python-fakeredis" ,python-fakeredis)
14817 ("python-flexmock" ,python-flexmock)
14818 ("python-pifpaf" ,python-pifpaf)
14819 ("python-pytest" ,python-pytest)))
14820 (propagated-inputs
14821 `(("python-memcached" ,python-memcached)
14822 ("python-msgpack-python" ,python-msgpack-python)
14823 ("python-redis" ,python-redis)))
14824 (home-page "https://github.com/sdispater/cachy")
14825 (synopsis "Simple yet effective caching library")
14826 (description
14827 "Cachy provides a simple yet effective caching library. A simple but
14828 powerful API: thread-safety; decorator syntax; support for memcached, redis,
14829 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
14830 (license license:expat)))
14831
14832 (define-public poetry
14833 (package
14834 (name "poetry")
14835 (version "1.1.5")
14836 ;; Poetry can only be built from source with Poetry.
14837 (source
14838 (origin
14839 (method url-fetch)
14840 (uri (pypi-uri "poetry" version))
14841 (sha256
14842 (base32
14843 "1dvx08ksv5wnsj45db23921rj136akmcnxa0kmlsddf3wbh6wcka"))))
14844 (build-system python-build-system)
14845 (arguments
14846 `(#:tests? #f ;; Pypi does not have tests.
14847 #:phases
14848 (modify-phases %standard-phases
14849 (add-before 'build 'patch-setup-py
14850 (lambda _
14851 (substitute* "setup.py"
14852 ;; Allow newer versions of python-keyring.
14853 (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
14854 ;; TODO: remove after the next release cycle,
14855 ;; when packaging has been updated.
14856 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
14857 #t)))))
14858 (propagated-inputs
14859 `(("python-cachecontrol" ,python-cachecontrol)
14860 ("python-cachy" ,python-cachy)
14861 ("python-cleo" ,python-cleo)
14862 ("python-clikit" ,python-clikit)
14863 ("python-html5lib" ,python-html5lib)
14864 ("python-keyring" ,python-keyring)
14865 ("python-msgpack-transitional" ,python-msgpack-transitional)
14866 ("python-packaging" ,python-packaging)
14867 ("python-pexpect" ,python-pexpect)
14868 ("python-pip" ,python-pip)
14869 ("python-pkginfo" ,python-pkginfo)
14870 ("python-poetry-core" ,python-poetry-core)
14871 ("python-requests" ,python-requests)
14872 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
14873 ("python-shellingham" ,python-shellingham)
14874 ("python-tomlkit" ,python-tomlkit)
14875 ("python-virtualenv" ,python-virtualenv)))
14876 (home-page "https://python-poetry.org")
14877 (synopsis "Python dependency management and packaging made easy")
14878 (description "Poetry is a tool for dependency management and packaging
14879 in Python. It allows you to declare the libraries your project depends on and
14880 it will manage (install/update) them for you.")
14881 (license license:expat)))
14882
14883 (define-public python-lark-parser
14884 (package
14885 (name "python-lark-parser")
14886 (version "0.9.0")
14887 (source (origin
14888 (method url-fetch)
14889 (uri (pypi-uri "lark-parser" version))
14890 (sha256
14891 (base32
14892 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
14893 (build-system python-build-system)
14894 (home-page "https://github.com/lark-parser/lark")
14895 (synopsis "Multi-language parser for Python")
14896 (description
14897 "Lark is a parser built with a focus on ergonomics, performance and
14898 resilience. Lark can parse all context-free languages. That means it is
14899 capable of parsing almost any programming language out there, and to
14900 some degree most natural languages too.")
14901 (license license:expat)))
14902
14903 (define-public python-libcst
14904 (package
14905 (name "python-libcst")
14906 (version "0.3.8")
14907 (source (origin
14908 (method url-fetch)
14909 (uri (pypi-uri "libcst" version))
14910 (sha256
14911 (base32
14912 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
14913 (build-system python-build-system)
14914 (arguments
14915 `(#:phases
14916 (modify-phases %standard-phases
14917 (add-after 'unpack 'remove-failing-tests
14918 (lambda _
14919 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
14920 (delete-file "libcst/tests/test_fuzz.py")
14921 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
14922 (delete-file "libcst/tests/test_pyre_integration.py")
14923 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
14924 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
14925 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
14926 #t))
14927 (add-before 'check 'generate-test-data
14928 (lambda _
14929 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14930 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
14931 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
14932 (replace 'check
14933 (lambda _
14934 (invoke "python" "-m" "unittest")
14935 #t)))))
14936 (native-inputs
14937 `(("python-black" ,python-black)
14938 ("python-isort" ,python-isort)))
14939 (propagated-inputs
14940 `(("python-typing-extensions" ,python-typing-extensions)
14941 ("python-typing-inspect" ,python-typing-inspect)
14942 ("python-pyyaml" ,python-pyyaml)))
14943 (home-page "https://github.com/Instagram/LibCST")
14944 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
14945 (description
14946 "LibCST parses Python source code as a CST tree that keeps all
14947 formatting details (comments, whitespaces, parentheses, etc). It's useful
14948 for building automated refactoring (codemod) applications and linters.
14949 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
14950 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
14951 naming node types and fields, LibCST creates a lossless CST that looks and
14952 feels like an AST.")
14953 (license (list license:expat
14954 ;; Some files unde libcst/_parser/ are under Python Software
14955 ;; Foundation license (see LICENSE file for details)
14956 license:psfl
14957 ;; libcst/_add_slots.py
14958 license:asl2.0))))
14959
14960 (define-public python-typing-inspect
14961 (package
14962 (name "python-typing-inspect")
14963 (version "0.6.0")
14964 (source (origin
14965 (method url-fetch)
14966 (uri (pypi-uri "typing_inspect" version))
14967 (sha256
14968 (base32
14969 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
14970 (build-system python-build-system)
14971 (propagated-inputs
14972 `(("python-mypy-extensions" ,python-mypy-extensions)
14973 ("python-typing-extensions" ,python-typing-extensions)))
14974 (home-page "https://github.com/ilevkivskyi/typing_inspect")
14975 (synopsis "API for inspection of types in the Python @code{typing} module")
14976 (description
14977 "The @code{typing_inspect} module defines experimental API for runtime
14978 inspection of types defined in the Python standard typing module.")
14979 (license license:expat)))
14980
14981 (define-public python-lazy-object-proxy
14982 (package
14983 (name "python-lazy-object-proxy")
14984 (version "1.5.1")
14985 (source (origin
14986 (method url-fetch)
14987 (uri (pypi-uri "lazy-object-proxy" version))
14988 (sha256
14989 (base32
14990 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
14991 (native-inputs
14992 `(("python-setuptools-scm" ,python-setuptools-scm)))
14993 (build-system python-build-system)
14994 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
14995 (synopsis "Lazy object proxy for python")
14996 (description
14997 "Lazy object proxy is an object that wraps a callable but defers the call
14998 until the object is actually required, and caches the result of said call.")
14999 (license license:bsd-2)))
15000
15001 (define-public python2-lazy-object-proxy
15002 (package-with-python2 python-lazy-object-proxy))
15003
15004 (define-public python-dnspython
15005 (package
15006 (name "python-dnspython")
15007 (version "2.1.0")
15008 (source (origin
15009 (method url-fetch)
15010 (uri (pypi-uri "dnspython" version ".zip"))
15011 (sha256
15012 (base32
15013 "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
15014 (build-system python-build-system)
15015 (native-inputs `(("unzip" ,unzip)))
15016 (arguments '(#:tests? #f)) ; XXX: requires internet access
15017 (home-page "https://www.dnspython.org")
15018 (synopsis "DNS toolkit for Python")
15019 (description
15020 "dnspython is a DNS toolkit for Python. It supports almost all record
15021 types. It can be used for queries, zone transfers, and dynamic updates.
15022 It supports TSIG authenticated messages and EDNS0.")
15023 (license license:expat)))
15024
15025 (define-public python-dnspython-1.16
15026 (package
15027 (inherit python-dnspython)
15028 (version "1.16.0")
15029 (source (origin
15030 (method url-fetch)
15031 (uri (string-append "http://www.dnspython.org/kits/"
15032 version "/dnspython-" version ".tar.gz"))
15033 (sha256
15034 (base32
15035 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
15036 (native-inputs '())))
15037
15038 (define-public python2-dnspython-1.16
15039 (package-with-python2 python-dnspython-1.16))
15040
15041 (define-public python-py3dns
15042 (package
15043 (name "python-py3dns")
15044 (version "3.2.1")
15045 (source
15046 (origin
15047 (method url-fetch)
15048 (uri (pypi-uri "py3dns" version))
15049 (sha256
15050 (base32
15051 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
15052 (build-system python-build-system)
15053 ;; This package wants to read /etc/resolv.conf. We can't patch it without
15054 ;; removing functionality so we copy from Nix and "just don't build it".
15055 (arguments
15056 `(#:phases
15057 (modify-phases %standard-phases
15058 (add-after 'unpack 'patch-source
15059 (lambda _
15060 (substitute* "setup.py"
15061 (("import DNS") "")
15062 (("DNS.__version__") (string-append "\"" ,version "\"")))
15063 #t)))
15064 #:tests? #f)) ; Also skip the tests.
15065 (home-page "https://launchpad.net/py3dns")
15066 (synopsis "Python 3 DNS library")
15067 (description "This Python 3 module provides a DNS API for looking up DNS
15068 entries from within Python 3 modules and applications. This module is a
15069 simple, lightweight implementation.")
15070 (license license:psfl)))
15071
15072 (define-public python-email-validator
15073 (package
15074 (name "python-email-validator")
15075 (version "1.0.2")
15076 (source
15077 (origin (method url-fetch)
15078 (uri (pypi-uri "email_validator" version))
15079 (sha256
15080 (base32
15081 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
15082 (build-system python-build-system)
15083 (arguments
15084 '(#:phases
15085 (modify-phases %standard-phases
15086 (add-before 'build 'use-dnspython
15087 (lambda _
15088 (substitute* "setup.py"
15089 (("dnspython3") "dnspython"))
15090 #t)))))
15091 (propagated-inputs
15092 `(("python-dnspython" ,python-dnspython)
15093 ("python-idna" ,python-idna)))
15094 (home-page "https://github.com/JoshData/python-email-validator")
15095 (synopsis "Email address validation library for Python")
15096 (description
15097 "This library validates email address syntax and deliverability.")
15098 (license license:cc0)))
15099
15100 (define-public python2-email-validator
15101 (package-with-python2 python-email-validator))
15102
15103 (define-public python-ukpostcodeparser
15104 (package
15105 (name "python-ukpostcodeparser")
15106 (version "1.0.3")
15107 (source (origin
15108 (method url-fetch)
15109 (uri (pypi-uri "UkPostcodeParser" version))
15110 (sha256
15111 (base32
15112 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
15113 (build-system python-build-system)
15114 (home-page "https://github.com/hamstah/ukpostcodeparser")
15115 (synopsis "UK Postcode parser for Python")
15116 (description
15117 "This library provides the @code{parse_uk_postcode} function for
15118 parsing UK postcodes.")
15119 (license license:expat)))
15120
15121 (define-public python2-ukpostcodeparser
15122 (package-with-python2 python-ukpostcodeparser))
15123
15124 (define-public python-faker
15125 (package
15126 (name "python-faker")
15127 (version "4.0.2")
15128 (source (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "Faker" version))
15131 (sha256
15132 (base32
15133 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
15134 (build-system python-build-system)
15135 (arguments
15136 '(#:phases
15137 (modify-phases %standard-phases
15138 (replace 'check
15139 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
15140 (native-inputs
15141 `(;; For testing
15142 ("python-freezegun" ,python-freezegun)
15143 ("python-pytest" ,python-pytest)
15144 ("python-random2" ,python-random2)
15145 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
15146 ("python-validators" ,python-validators)))
15147 (propagated-inputs
15148 `(("python-dateutil" ,python-dateutil)
15149 ("python-text-unidecode" ,python-text-unidecode)))
15150 (home-page "https://github.com/joke2k/faker")
15151 (synopsis "Python package that generates fake data")
15152 (description
15153 "Faker is a Python package that generates fake data such as names,
15154 addresses, and phone numbers.")
15155 (license license:expat)
15156 (properties `((python2-variant . ,(delay python2-faker))))))
15157
15158 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
15159 (define-public python2-faker
15160 (let ((base (package-with-python2 (strip-python2-variant
15161 python-faker))))
15162 (package
15163 (inherit base)
15164 (version "3.0.1")
15165 (source (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "Faker" version))
15168 (sha256
15169 (base32
15170 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
15171 (native-inputs
15172 `(("python-mock" ,python2-mock)
15173 ,@(package-native-inputs base)))
15174 (propagated-inputs
15175 `(("python2-ipaddress" ,python2-ipaddress)
15176 ("python2-six" ,python2-six)
15177 ,@(package-propagated-inputs base))))))
15178
15179 (define-public python-pyaml
15180 (package
15181 (name "python-pyaml")
15182 (version "18.11.0")
15183 (source (origin
15184 (method url-fetch)
15185 (uri (pypi-uri "pyaml" version))
15186 (sha256
15187 (base32
15188 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
15189 (build-system python-build-system)
15190 (native-inputs
15191 `(("python-unidecode" ,python-unidecode)))
15192 (propagated-inputs
15193 `(("python-pyyaml" ,python-pyyaml)))
15194 (home-page "https://github.com/mk-fg/pretty-yaml")
15195 (synopsis "YAML pretty-print library for Python")
15196 (description
15197 "pyaml is a PyYAML based python module to produce pretty and readable
15198 YAML-serialized data.")
15199 (license license:wtfpl2)))
15200
15201 (define-public python2-pyaml
15202 (package-with-python2 python-pyaml))
15203
15204 (define-public python-backpack
15205 (package
15206 (name "python-backpack")
15207 (version "0.1")
15208 (source
15209 (origin
15210 (method url-fetch)
15211 (uri (pypi-uri "backpack" version))
15212 (sha256
15213 (base32
15214 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
15215 (build-system python-build-system)
15216 (native-inputs
15217 `(("python-pytest" ,python-pytest)
15218 ("python-nose" ,python-nose)))
15219 (propagated-inputs
15220 `(("python-simplejson" ,python-simplejson)))
15221 (home-page "https://github.com/sdispater/backpack")
15222 (synopsis "Utilities for working with Python collections")
15223 (description "Backpack provides some useful utilities for working with
15224 collections of data.")
15225 (license license:expat)))
15226
15227 (define-public python2-backpack
15228 (package-with-python2 python-backpack))
15229
15230 (define-public python-prompt-toolkit
15231 (package
15232 (name "python-prompt-toolkit")
15233 (version "3.0.18")
15234 (source
15235 (origin
15236 (method url-fetch)
15237 (uri (pypi-uri "prompt_toolkit" version))
15238 (sha256
15239 (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
15240 (build-system python-build-system)
15241 (arguments
15242 `(#:phases
15243 (modify-phases %standard-phases
15244 (delete 'check)
15245 (add-after 'install 'post-install-check
15246 (lambda* (#:key inputs outputs #:allow-other-keys)
15247 ;; HOME is needed for the test
15248 ;; "test_pathcompleter_can_expanduser".
15249 (setenv "HOME" "/tmp")
15250 (add-installed-pythonpath inputs outputs)
15251 (invoke "py.test"))))))
15252 (propagated-inputs
15253 `(("python-wcwidth" ,python-wcwidth)))
15254 (native-inputs
15255 `(("python-pytest" ,python-pytest)))
15256 (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
15257 (synopsis "Library for building command line interfaces in Python")
15258 (description
15259 "Prompt-Toolkit is a library for building interactive command line
15260 interfaces in Python. It's like GNU Readline but it also features syntax
15261 highlighting while typing, out-of-the-box multi-line input editing, advanced
15262 code completion, incremental search, support for Chinese double-width
15263 characters, mouse support, and auto suggestions.")
15264 (license license:bsd-3)
15265 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
15266
15267 (define-public python-prompt-toolkit-2
15268 (package (inherit python-prompt-toolkit)
15269 (name "python-prompt-toolkit")
15270 (version "2.0.7")
15271 (source
15272 (origin
15273 (method url-fetch)
15274 (uri (pypi-uri "prompt_toolkit" version))
15275 (sha256
15276 (base32
15277 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
15278 (propagated-inputs
15279 `(("python-wcwidth" ,python-wcwidth)
15280 ("python-six" ,python-six)
15281 ("python-pygments" ,python-pygments)))
15282 (properties '())))
15283
15284 (define-public python2-prompt-toolkit
15285 (package-with-python2 python-prompt-toolkit-2))
15286
15287 (define-public python-prompt-toolkit-1
15288 (package (inherit python-prompt-toolkit-2)
15289 (version "1.0.15")
15290 (source
15291 (origin
15292 (method url-fetch)
15293 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
15294 (sha256
15295 (base32
15296 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
15297
15298 (define-public python2-prompt-toolkit-1
15299 (package-with-python2 python-prompt-toolkit-1))
15300
15301 (define-public python-jedi
15302 (package
15303 (name "python-jedi")
15304 (version "0.17.2")
15305 (source
15306 (origin
15307 (method url-fetch)
15308 (uri (pypi-uri "jedi" version))
15309 (sha256
15310 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
15311 (build-system python-build-system)
15312 (arguments
15313 `(#:phases
15314 (modify-phases %standard-phases
15315 (replace 'check
15316 (lambda* (#:key tests? #:allow-other-keys)
15317 (when tests?
15318 (setenv "HOME" "/tmp")
15319 (invoke "python" "-m" "pytest" "-vv"))
15320 #t)))))
15321 (native-inputs
15322 `(("python-pytest" ,python-pytest)
15323 ("python-docopt" ,python-docopt)))
15324 (propagated-inputs
15325 `(("python-parso" ,python-parso)))
15326 (home-page "https://github.com/davidhalter/jedi")
15327 (synopsis "Autocompletion and static analysis library for Python")
15328 (description
15329 "Jedi is a static analysis tool for Python that can be used in Integrated
15330 Development Environments (@dfn{IDE}s) and text editors. It understands Python
15331 on a deeper level than many other static analysis frameworks for Python.
15332
15333 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
15334 well.")
15335 (license license:expat)))
15336
15337 (define-public python2-jedi
15338 (package-with-python2 python-jedi))
15339
15340 (define-public ptpython
15341 (package
15342 (name "ptpython")
15343 (version "3.0.17")
15344 (source (origin
15345 (method url-fetch)
15346 (uri (pypi-uri "ptpython" version))
15347 (sha256
15348 (base32
15349 "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
15350 (build-system python-build-system)
15351 (arguments
15352 `(#:tests? #f)) ;there are no tests
15353 (propagated-inputs
15354 `(("python-appdirs" ,python-appdirs)
15355 ("python-black" ,python-black)
15356 ("python-jedi" ,python-jedi)
15357 ("python-prompt-toolkit" ,python-prompt-toolkit)
15358 ("python-pygments" ,python-pygments)))
15359 (home-page "https://github.com/jonathanslenders/ptpython")
15360 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
15361 (description
15362 "ptpython is a Python read-eval-print loop with IDE-like features.
15363 It supports syntax highlighting, multiline editing, autocompletion, mouse,
15364 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
15365 etc.")
15366 (license license:bsd-3)
15367 (properties `((python2-variant . ,(delay ptpython-2))))))
15368
15369 (define-public ptpython-2
15370 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
15371 (package/inherit base
15372 (name "ptpython2"))))
15373
15374 (define-public python-easyprocess
15375 (package
15376 (name "python-easyprocess")
15377 (version "0.3")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "EasyProcess" version))
15382 (sha256
15383 (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
15384 (build-system python-build-system)
15385 (arguments
15386 ;; Tests require pyvirtualdisplay, which requires this package.
15387 `(#:tests? #f))
15388 (home-page "https://github.com/ponty/easyprocess")
15389 (synopsis "Python subprocess interface")
15390 (description
15391 "@code{easyprocess} is an easy to use Python subprocess interface.")
15392 (license license:bsd-3)))
15393
15394 (define-public python-entrypoint2
15395 (package
15396 (name "python-entrypoint2")
15397 (version "0.2.4")
15398 (source
15399 (origin
15400 (method url-fetch)
15401 (uri (pypi-uri "entrypoint2" version))
15402 (sha256
15403 (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
15404 (build-system python-build-system)
15405 (arguments
15406 `(#:test-target "pytest"))
15407 (native-inputs
15408 `(("python-easyprocess" ,python-easyprocess)
15409 ("python-pytest" ,python-pytest)
15410 ("python-pytest-runner" ,python-pytest-runner)))
15411 (home-page "https://github.com/ponty/entrypoint2")
15412 (synopsis "Command-line interface for Python modules")
15413 (description
15414 "@code{entrypoint2} is an easy to use command-line interface for Python
15415 modules based on @code{argparse}. It translates function signature and
15416 documentation to argparse configuration.")
15417 (license license:bsd-3)))
15418
15419 (define-public python-pyvirtualdisplay
15420 (package
15421 (name "python-pyvirtualdisplay")
15422 (version "2.1")
15423 (source
15424 (origin
15425 (method url-fetch)
15426 (uri (pypi-uri "PyVirtualDisplay" version))
15427 (sha256
15428 (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
15429 (build-system python-build-system)
15430 (arguments
15431 ;; Tests fail with:
15432 ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
15433 `(#:tests? #f))
15434 (native-inputs
15435 `(("python-entrypoint2" ,python-entrypoint2)
15436 ("python-psutil" ,python-psutil)
15437 ("python-pytest" ,python-pytest)
15438 ("python-pytest-runner" ,python-pytest-runner)))
15439 (propagated-inputs
15440 `(("python-easyprocess" ,python-easyprocess)
15441 ("python-pillow" ,python-pillow)))
15442 (home-page "https://github.com/ponty/pyvirtualdisplay")
15443 (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
15444 (description
15445 "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
15446 (license license:bsd-3)))
15447
15448 (define-public python-stem
15449 (package
15450 (name "python-stem")
15451 (version "1.8.0")
15452 (source
15453 (origin
15454 (method url-fetch)
15455 (uri (pypi-uri "stem" version))
15456 (sha256
15457 (base32
15458 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
15459 (build-system python-build-system)
15460 (arguments
15461 `(#:phases
15462 (modify-phases %standard-phases
15463 (replace 'check
15464 (lambda _
15465 (invoke "./run_tests.py" "--unit")
15466 #t)))))
15467 (native-inputs
15468 `(("python-mock" ,python-mock)
15469 ("python-pycodestyle" ,python-pycodestyle)
15470 ("python-pyflakes" ,python-pyflakes)))
15471 (home-page "https://stem.torproject.org/")
15472 (synopsis
15473 "Python controller library that allows applications to interact with Tor")
15474 (description
15475 "Stem is a Python controller library for Tor. With it you can use Tor's
15476 control protocol to script against the Tor process and read descriptor data
15477 relays publish about themselves.")
15478 (license license:lgpl3)))
15479
15480 (define-public python-pyserial
15481 (package
15482 (name "python-pyserial")
15483 (version "3.5")
15484 (source
15485 (origin
15486 (method url-fetch)
15487 (uri (pypi-uri "pyserial" version))
15488 (sha256
15489 (base32
15490 "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
15491 (build-system python-build-system)
15492 (arguments
15493 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
15494 ;; #:phases
15495 ;; (modify-phases %standard-phases
15496 ;; (replace 'check
15497 ;; (lambda _
15498 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
15499 (home-page
15500 "https://github.com/pyserial/pyserial")
15501 (synopsis "Python Serial Port Bindings")
15502 (description "@code{pyserial} provide serial port bindings for Python. It
15503 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
15504 and/or Xon/Xoff. The port is accessed in RAW mode.")
15505 (license license:bsd-3)))
15506
15507 (define-public python2-pyserial
15508 (package-with-python2 python-pyserial))
15509
15510 (define-public python-kivy
15511 (package
15512 (name "python-kivy")
15513 (version "1.10.1")
15514 (source
15515 (origin
15516 (method url-fetch)
15517 (uri (pypi-uri "Kivy" version))
15518 (file-name (string-append name "-" version ".tar.gz"))
15519 (sha256
15520 (base32
15521 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
15522 (build-system python-build-system)
15523 (arguments
15524 `(#:tests? #f ; Tests require many optional packages
15525 #:phases
15526 (modify-phases %standard-phases
15527 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
15528 (lambda* (#:key inputs #:allow-other-keys)
15529 (setenv "KIVY_SDL2_PATH"
15530 (string-append (assoc-ref inputs "sdl-union")
15531 "/include/SDL2"))
15532 #t)))))
15533 (native-inputs
15534 `(("pkg-config" ,pkg-config)
15535 ("python-cython" ,python-cython)))
15536 (inputs
15537 `(("gstreamer" ,gstreamer)
15538 ("mesa" ,mesa)
15539 ("sdl-union"
15540 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
15541 (home-page "https://kivy.org")
15542 (synopsis
15543 "Multitouch application framework")
15544 (description
15545 "A software library for rapid development of
15546 hardware-accelerated multitouch applications.")
15547 (license license:expat)))
15548
15549 (define-public python2-kivy
15550 (package-with-python2 python-kivy))
15551
15552 (define-public python-binaryornot
15553 (package
15554 (name "python-binaryornot")
15555 (version "0.4.4")
15556 (source (origin
15557 (method url-fetch)
15558 (uri (pypi-uri "binaryornot" version))
15559 (sha256
15560 (base32
15561 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
15562 (build-system python-build-system)
15563 (arguments
15564 `(#:phases
15565 (modify-phases %standard-phases
15566 (add-after 'unpack 'patch-tests
15567 (lambda _
15568 ;; TypeError: binary() got an unexpected keyword argument
15569 ;; 'average_size'.
15570 (substitute* "tests/test_check.py"
15571 (("average_size=512") ""))
15572 #t)))))
15573 (propagated-inputs
15574 `(("python-chardet" ,python-chardet)
15575 ("python-hypothesis" ,python-hypothesis)))
15576 (home-page "https://github.com/audreyr/binaryornot")
15577 (synopsis "Package to check if a file is binary or text")
15578 (description "Ultra-lightweight pure Python package to check if a file is
15579 binary or text.")
15580 (license license:bsd-3)
15581 (properties `((python2-variant . ,(delay python2-binaryornot))))))
15582
15583 (define-public python2-binaryornot
15584 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
15585 (package/inherit base
15586 (propagated-inputs
15587 `(("python2-enum34" ,python2-enum34)
15588 ,@(package-propagated-inputs base))))))
15589
15590 (define-public python-binwalk
15591 (package
15592 (name "python-binwalk")
15593 (version "2.2.0")
15594 (source
15595 (origin
15596 (method git-fetch)
15597 (uri (git-reference
15598 (url "https://github.com/ReFirmLabs/binwalk")
15599 (commit (string-append "v" version))))
15600 (file-name (git-file-name name version))
15601 (sha256
15602 (base32
15603 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
15604 (build-system python-build-system)
15605 (arguments
15606 `(#:phases
15607 (modify-phases %standard-phases
15608 (add-before 'check 'set-pythonpath
15609 (lambda _
15610 (setenv "PYTHONPATH"
15611 (string-append
15612 (getcwd) "/src/"
15613 ":" (getenv "PYTHONPATH")))
15614 (setenv "HOME" "")
15615 #t)))))
15616 (native-inputs
15617 `(("python-coverage" ,python-coverage)
15618 ("python-nose" ,python-nose)))
15619 (home-page "https://github.com/ReFirmLabs/binwalk")
15620 (synopsis "Firmware analysis tool")
15621 (description "Binwalk is a tool for analyzing, reverse engineering, and
15622 extracting firmware images")
15623 (license license:expat)))
15624
15625 (define-public python-nltk
15626 (package
15627 (name "python-nltk")
15628 (version "3.6.2")
15629 (source (origin
15630 (method url-fetch)
15631 (uri (pypi-uri "nltk" version ".zip"))
15632 (sha256
15633 (base32
15634 "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
15635 (build-system python-build-system)
15636 (arguments
15637 '(;; The tests require some extra resources to be downloaded.
15638 ;; TODO Try packaging these resources.
15639 #:tests? #f))
15640 (propagated-inputs
15641 `(("python-click" ,python-click)
15642 ("python-joblib" ,python-joblib)
15643 ("python-regex" ,python-regex)
15644 ("python-tqdm" ,python-tqdm)))
15645 (native-inputs
15646 `(("unzip" ,unzip)))
15647 (home-page "http://nltk.org/")
15648 (synopsis "Natural Language Toolkit")
15649 (description "It provides interfaces to over 50 corpora and lexical
15650 resources such as WordNet, along with a suite of text processing libraries
15651 for classification, tokenization, stemming, tagging, parsing, and semantic
15652 reasoning, wrappers for natural language processing libraries.")
15653 (license license:asl2.0)))
15654
15655 ;; Versions >=3.5 breaks backward-compatibility,
15656 ;; so we keep version 3.4.x around for a while.
15657 (define-public python-nltk-3.4
15658 (package
15659 (inherit python-nltk)
15660 (version "3.4.5")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "nltk" version ".zip"))
15665 (sha256
15666 (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
15667 (propagated-inputs `(("python-six" ,python-six)))))
15668
15669 (define-public python2-nltk
15670 (package-with-python2 python-nltk))
15671
15672 (define-public python-pymongo
15673 (package
15674 (name "python-pymongo")
15675 (version "3.7.2")
15676 (source (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "pymongo" version))
15679 (sha256
15680 (base32
15681 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
15682 (build-system python-build-system)
15683 (propagated-inputs
15684 `(("python-certifi" ,python-certifi)))
15685 (home-page "https://github.com/mongodb/mongo-python-driver")
15686 (synopsis "Python driver for MongoDB")
15687 (description "Python driver for MongoDB.")
15688 (license license:asl2.0)))
15689
15690 (define-public python2-pymongo
15691 (package-with-python2 python-pymongo))
15692
15693 (define-public python-consul
15694 (package
15695 (name "python-consul")
15696 (version "0.6.1")
15697 (source
15698 (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "python-consul" version))
15701 (sha256
15702 (base32
15703 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
15704 (build-system python-build-system)
15705 (arguments
15706 '(#:tests? #f)) ; The tests are not distributed
15707 (propagated-inputs
15708 `(("python-requests" ,python-requests)
15709 ("python-six" ,python-six)))
15710 (home-page "https://github.com/cablehead/python-consul")
15711 (synopsis "Python client for Consul")
15712 (description
15713 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
15714 discovery, monitoring and configuration.")
15715 (license license:expat)))
15716
15717 (define-public python2-consul
15718 (package-with-python2 python-consul))
15719
15720 (define-public python-schematics
15721 (package
15722 (name "python-schematics")
15723 (version "1.1.1")
15724 (source
15725 (origin
15726 (method git-fetch)
15727 (uri (git-reference
15728 (url "https://github.com/schematics/schematics")
15729 (commit (string-append "v" version))))
15730 (file-name (git-file-name name version))
15731 (sha256
15732 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
15733 (build-system python-build-system)
15734 (propagated-inputs
15735 `(("python-six" ,python-six)))
15736 (arguments
15737 ;; The tests require a bunch of not very nice packages with fixed
15738 ;; version requirements (e.g. python-coveralls).
15739 `(#:tests? #f))
15740 (home-page "https://github.com/schematics/schematics")
15741 (synopsis "Python Data Structures for Humans")
15742 (description "Python Data Structures for Humans.")
15743 (license license:bsd-3)))
15744
15745 (define-public python2-schematics
15746 (package-with-python2 python-schematics))
15747
15748 (define-public python-odfpy
15749 (package
15750 (name "python-odfpy")
15751 (version "1.4.1")
15752 (source (origin
15753 (method url-fetch)
15754 (uri (pypi-uri "odfpy" version))
15755 (sha256
15756 (base32
15757 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
15758 (arguments
15759 `(#:phases
15760 (modify-phases %standard-phases
15761 (replace 'check
15762 (lambda _
15763 (setenv "PYTHONPATH" (string-append "./build/lib:"
15764 (getenv "PYTHONPATH")))
15765 (invoke "pytest" "-vv"))))))
15766 (build-system python-build-system)
15767 (native-inputs
15768 `(("python-pytest" ,python-pytest)))
15769 (propagated-inputs
15770 `(("python-defusedxml" ,python-defusedxml)))
15771 (home-page "https://github.com/eea/odfpy")
15772 (synopsis "Python API and tools to manipulate OpenDocument files")
15773 (description "Collection of libraries and utility programs written in
15774 Python to manipulate OpenDocument 1.2 files.")
15775 (license
15776 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
15777 ;; number of files with other licenses.
15778 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
15779
15780 (define-public python2-odfpy
15781 (package-with-python2 python-odfpy))
15782
15783 (define-public python-natsort
15784 (package
15785 (name "python-natsort")
15786 (version "7.0.1")
15787 (source (origin
15788 (method url-fetch)
15789 (uri (pypi-uri "natsort" version))
15790 (sha256
15791 (base32
15792 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
15793 (build-system python-build-system)
15794 (arguments
15795 `(#:modules ((guix build utils)
15796 (guix build python-build-system)
15797 (srfi srfi-1)
15798 (srfi srfi-26)
15799 (ice-9 ftw))
15800 #:phases
15801 (modify-phases %standard-phases
15802 (add-before 'check 'set-cachedir
15803 ;; Tests require write access to $HOME by default
15804 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
15805 (replace 'check
15806 (lambda _
15807 (let ((cwd (getcwd)))
15808 (setenv "PYTHONPATH"
15809 (string-append
15810 cwd "/build/"
15811 (find (cut string-prefix? "lib" <>)
15812 (scandir (string-append cwd "/build")))
15813 ":"
15814 (getenv "PYTHONPATH")))
15815 (invoke "pytest" "-v")))))))
15816 (native-inputs
15817 `(("python-hypothesis" ,python-hypothesis)
15818 ("python-pytest-cov" ,python-pytest-cov)
15819 ("python-pytest-mock" ,python-pytest-mock)
15820 ("python-pytest" ,python-pytest)))
15821 (propagated-inputs ; TODO: Add python-fastnumbers.
15822 `(("python-pyicu" ,python-pyicu)))
15823 (home-page "https://github.com/SethMMorton/natsort")
15824 (synopsis "Natural sorting for python and shell")
15825 (description
15826 "Natsort lets you apply natural sorting on lists instead of
15827 lexicographical. If you use the built-in @code{sorted} method in python
15828 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
15829 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
15830 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
15831 identifies numbers and sorts them separately from strings. It can also sort
15832 version numbers, real numbers, mixed types and more, and comes with a shell
15833 command @command{natsort} that exposes this functionality in the command line.")
15834 (license license:expat)
15835 (properties `((python2-variant . ,(delay python2-natsort))))))
15836
15837 ;; Natsort 6.x are the last versions with support for Python 2.
15838 (define-public python2-natsort
15839 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
15840 (package (inherit base)
15841 (version "6.2.1")
15842 (source (origin
15843 (method url-fetch)
15844 (uri (pypi-uri "natsort" version))
15845 (sha256
15846 (base32
15847 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
15848 (native-inputs
15849 `(("python2-pathlib" ,python2-pathlib)
15850 ,@(package-native-inputs base))))))
15851
15852 (define-public glances
15853 (package
15854 (name "glances")
15855 (version "3.1.7")
15856 (source
15857 (origin
15858 (method url-fetch)
15859 (uri (pypi-uri "Glances" version))
15860 (sha256
15861 (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
15862 (modules '((guix build utils)))
15863 (snippet
15864 '(begin
15865 ;; Glances phones PyPI for weekly update checks by default.
15866 ;; Disable these. The user can re-enable them if desired.
15867 (substitute* "glances/outdated.py"
15868 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
15869 (string-append indentation
15870 "self.args.disable_check_update = True\n"
15871 line)))
15872 #t))))
15873 (build-system python-build-system)
15874 (propagated-inputs
15875 `(("python-future" ,python-future)
15876 ("python-psutil" ,python-psutil)))
15877 (home-page "https://github.com/nicolargo/glances")
15878 (synopsis "Cross-platform curses-based monitoring tool")
15879 (description
15880 "Glances is a curses-based monitoring tool for a wide variety of platforms.
15881 Glances uses the PsUtil library to get information from your system. It
15882 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
15883 (license license:lgpl3+)))
15884
15885 (define-public python-glances
15886 (deprecated-package "python-glances" glances))
15887
15888 (define-public python-graphql-core
15889 (package
15890 (name "python-graphql-core")
15891 (version "3.1.2")
15892 (source
15893 (origin
15894 (method url-fetch)
15895 (uri (pypi-uri "graphql-core" version))
15896 (sha256
15897 (base32
15898 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
15899 (build-system python-build-system)
15900 (arguments
15901 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
15902 #:phases
15903 (modify-phases %standard-phases
15904 (add-after 'unpack 'patch-hardcoded-version
15905 (lambda _ (substitute*
15906 "setup.py"
15907 (("'gevent==1.1rc1'") "'gevent'"))
15908 #t)))))
15909 (native-inputs
15910 `(("python-gevent" ,python-gevent)
15911 ("python-mock" ,python-mock)
15912 ("python-pytest-mock" ,python-pytest-mock)))
15913 (propagated-inputs
15914 `(("python-promise" ,python-promise)
15915 ("python-six" ,python-six)))
15916 (home-page "https://github.com/graphql-python/graphql-core")
15917 (synopsis "GraphQL implementation for Python")
15918 (description
15919 "GraphQL implementation for Python. GraphQL is a data query language and
15920 runtime designed and used to request and deliver data to mobile and web apps.
15921 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
15922 to Python.")
15923 (license license:expat)))
15924
15925 (define-public python-graphql-relay
15926 (package
15927 (name "python-graphql-relay")
15928 (version "0.4.5")
15929 (source
15930 (origin
15931 (method url-fetch)
15932 (uri (pypi-uri "graphql-relay" version))
15933 (sha256
15934 (base32
15935 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
15936 (build-system python-build-system)
15937 (arguments
15938 '(#:tests? #f)) ; The tests are not distributed
15939 (propagated-inputs
15940 `(("python-graphql-core" ,python-graphql-core)
15941 ("python-promise" ,python-promise)
15942 ("python-six" ,python-six)))
15943 (home-page "https://github.com/graphql-python/graphql-relay-py")
15944 (synopsis "Relay implementation for Python")
15945 (description
15946 "This is a library to allow the easy creation of Relay-compliant servers
15947 using the GraphQL Python reference implementation of a GraphQL server. It
15948 should be noted that the code is a exact port of the original
15949 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
15950 from Facebook.")
15951 (license license:expat)))
15952
15953 (define-public python-graphene
15954 (package
15955 (name "python-graphene")
15956 (version "0.10.2")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "graphene" version))
15961 (sha256
15962 (base32
15963 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
15964 (build-system python-build-system)
15965 (propagated-inputs
15966 `(("python-graphql-core" ,python-graphql-core)
15967 ("python-graphql-relay" ,python-graphql-relay)
15968 ("python-iso8601" ,python-iso8601)
15969 ("python-promise" ,python-promise)
15970 ("python-six" ,python-six)))
15971 (arguments
15972 `(#:tests? #f)) ; no tests/ in the PyPI tarball
15973 (home-page "https://graphene-python.org/")
15974 (synopsis "GraphQL Framework for Python")
15975 (description
15976 "Graphene is a Python library for building GraphQL schemas/types.
15977 A GraphQL schema describes your data model, and provides a GraphQL server
15978 with an associated set of resolve methods that know how to fetch data.")
15979 (license license:expat)))
15980
15981 (define-public python-nautilus
15982 (package
15983 (name "python-nautilus")
15984 (version "0.4.9")
15985 (source
15986 (origin
15987 (method url-fetch)
15988 (uri (pypi-uri "nautilus" version))
15989 (sha256
15990 (base32
15991 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
15992 (build-system python-build-system)
15993 (arguments `(#:tests? #f)) ; fails to import test modules
15994 (propagated-inputs
15995 `(("python-bcrypt" ,python-bcrypt)
15996 ("python-click" ,python-click)
15997 ("python-consul" ,python-consul)
15998 ("python-graphene" ,python-graphene)
15999 ("python-jinja2" ,python-jinja2)
16000 ("python-peewee" ,python-peewee)
16001 ("python-pika" ,python-pika)
16002 ("python-tornado" ,python-tornado)
16003 ("python-wtforms" ,python-wtforms)))
16004 (native-inputs
16005 `(("python-nose2" ,python-nose2)))
16006 (home-page "https://github.com/AlecAivazis/nautilus")
16007 (synopsis "Library for creating microservice applications")
16008 (description
16009 "Nautilus is a framework for flux based microservices that looks to
16010 provide extendible implementations of common aspects of a cloud so that you can
16011 focus on building massively scalable web applications.")
16012 (license license:expat)))
16013
16014 (define-public python-random2
16015 (package
16016 (name "python-random2")
16017 (version "1.0.1")
16018 (source (origin
16019 (method url-fetch)
16020 (uri (pypi-uri "random2" version ".zip"))
16021 (sha256
16022 (base32
16023 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
16024 (build-system python-build-system)
16025 (native-inputs `(("unzip" ,unzip)))
16026 (home-page "http://pypi.python.org/pypi/random2")
16027 (synopsis "Python 3 version of the Python 2 @code{random} module")
16028 (description
16029 "This package provides a Python 3 ported version of Python 2.7’s
16030 @code{random} module. It has also been back-ported to work in Python 2.6.
16031
16032 In Python 3, the implementation of @code{randrange()} was changed, so that
16033 even with the same seed you get different sequences in Python 2 and 3.
16034
16035 This package closes that gap, allowing stable random number generation
16036 between the different Python versions.")
16037 (license license:psfl)))
16038
16039 (define-public python2-random2
16040 (package-with-python2 python-random2))
16041
16042 (define-public python-snowballstemmer
16043 (package
16044 (name "python-snowballstemmer")
16045 (version "2.0.0")
16046 (source (origin
16047 (method url-fetch)
16048 (uri (pypi-uri "snowballstemmer" version))
16049 (sha256
16050 (base32
16051 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
16052 (build-system python-build-system)
16053 (arguments
16054 `(;; No tests exist
16055 #:tests? #f))
16056 (home-page "https://github.com/shibukawa/snowball_py")
16057 (synopsis "Snowball stemming library collection for Python")
16058 (description "This package provides 16 word stemmer algorithms generated
16059 from Snowball algorithms. It includes the 15 original ones plus the Poerter
16060 English stemmer.")
16061 (license license:bsd-3)))
16062
16063 (define-public python2-snowballstemmer
16064 (package-with-python2 python-snowballstemmer))
16065
16066 (define-public python-setproctitle
16067 (package
16068 (name "python-setproctitle")
16069 (version "1.1.10")
16070 (source
16071 (origin
16072 (method url-fetch)
16073 (uri (pypi-uri "setproctitle" version))
16074 (sha256
16075 (base32
16076 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
16077 (build-system python-build-system)
16078 (arguments
16079 '(#:phases
16080 (modify-phases %standard-phases
16081 (add-before 'check 'patch-Makefile
16082 ;; Stricly this is only required for the python2 variant.
16083 ;; But adding a phase in an inherited package seems to be
16084 ;; cumbersum. So we patch even for python3.
16085 (lambda _
16086 (let ((nose (assoc-ref %build-inputs "python2-nose")))
16087 (when nose
16088 (substitute* "Makefile"
16089 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
16090 (string-append nose "/bin/nosetests "))))
16091 #t)))
16092 (replace 'check
16093 (lambda _
16094 (setenv "PYTHON" (or (which "python3") (which "python")))
16095 (setenv "PYCONFIG" (if (which "python3-config")
16096 "python3-config --embed"
16097 "python-config"))
16098 (setenv "CC" "gcc")
16099 ;; No need to extend PYTHONPATH to find the built package, since
16100 ;; the Makefile will build anyway
16101 (invoke "make" "check"))))))
16102 (native-inputs
16103 `(("procps" ,procps))) ; required for tests
16104 (home-page "https://github.com/dvarrazzo/py-setproctitle")
16105 (synopsis
16106 "Setproctitle implementation for Python to customize the process title")
16107 (description "The library allows a process to change its title (as displayed
16108 by system tools such as ps and top).
16109
16110 Changing the title is mostly useful in multi-process systems, for
16111 example when a master process is forked: changing the children's title
16112 allows identifying the task each process is busy with. The technique
16113 is used by PostgreSQL and the OpenSSH Server for example.")
16114 (license license:bsd-3)
16115 (properties `((python2-variant . ,(delay python2-setproctitle))))))
16116
16117 (define-public python2-setproctitle
16118 (let ((base (package-with-python2
16119 (strip-python2-variant python-setproctitle))))
16120 (package/inherit base
16121 (native-inputs `(("python2-nose" ,python2-nose)
16122 ,@(package-native-inputs base))))))
16123
16124 (define-public python-validictory
16125 (package
16126 (name "python-validictory")
16127 (version "1.0.1")
16128 (source
16129 (origin
16130 (method url-fetch)
16131 (uri (pypi-uri "validictory" version))
16132 (sha256
16133 (base32
16134 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
16135 (build-system python-build-system)
16136 (arguments
16137 '(#:phases
16138 (modify-phases %standard-phases
16139 (add-after 'unpack 'bootstrap
16140 ;; Move the tests out of the package directory to avoid
16141 ;; packaging them.
16142 (lambda* _
16143 (rename-file "validictory/tests" "tests")
16144 (delete-file "tests/__init__.py")))
16145 (replace 'check
16146 (lambda _
16147 ;; Extend PYTHONPATH so the built package will be found.
16148 (setenv "PYTHONPATH"
16149 (string-append (getcwd) "/build/lib:"
16150 (getenv "PYTHONPATH")))
16151 (invoke "py.test" "-vv" ))))))
16152 (native-inputs
16153 `(("python-pytest" ,python-pytest)))
16154 (home-page
16155 "https://github.com/jamesturk/validictory")
16156 (synopsis "General purpose Python data validator")
16157 (description "It allows validation of arbitrary Python data structures.
16158
16159 The schema format is based on the JSON Schema
16160 proposal (http://json-schema.org), so combined with json the library is also
16161 useful as a validator for JSON data.")
16162 (license license:expat)))
16163
16164 (define-public python2-validictory
16165 (package-with-python2 python-validictory))
16166
16167 (define-public python-pyelftools
16168 (package
16169 (name "python-pyelftools")
16170 (version "0.25")
16171 (source
16172 (origin
16173 (method url-fetch)
16174 (uri (pypi-uri "pyelftools" version))
16175 (sha256
16176 (base32
16177 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
16178 (build-system python-build-system)
16179 (arguments
16180 `(#:phases
16181 (modify-phases %standard-phases
16182 (add-before 'check 'set-pythonpath
16183 (lambda _
16184 (setenv "PYTHONPATH"
16185 (string-append
16186 (getcwd) "/test/"
16187 ":" (getenv "PYTHONPATH")))
16188 #t)))))
16189 (home-page
16190 "https://github.com/eliben/pyelftools")
16191 (synopsis
16192 "Analyze binary and library file information")
16193 (description "This Python library provides interfaces for parsing and
16194 analyzing two binary and library file formats; the Executable and Linking
16195 Format (ELF), and debugging information in the Debugging With Attributed
16196 Record Format (DWARF).")
16197 (license license:public-domain)))
16198
16199 (define-public python-pyev
16200 (package
16201 (name "python-pyev")
16202 (version "0.9.0")
16203 (source
16204 (origin
16205 (method url-fetch)
16206 (uri (pypi-uri "pyev" version))
16207 (sha256
16208 (base32
16209 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
16210 (build-system python-build-system)
16211 (arguments
16212 `(#:tests? #f ; no test suite
16213 #:phases
16214 (modify-phases %standard-phases
16215 (add-after 'unpack 'patch
16216 (lambda* (#:key inputs #:allow-other-keys)
16217 (let ((libev (string-append (assoc-ref inputs "libev")
16218 "/lib/libev.so.4")))
16219 (substitute* "setup.py"
16220 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
16221 (string-append "libev_dll_name = \"" libev "\"")))))))))
16222 (inputs
16223 `(("libev" ,libev)))
16224 (home-page "https://github.com/gabrielfalcao/pyev")
16225 (synopsis "Python libev interface")
16226 (description "Pyev provides a Python interface to libev.")
16227 (license license:gpl3)))
16228
16229 (define-public python2-pyev
16230 (package-with-python2 python-pyev))
16231
16232 (define-public python-imagesize
16233 (package
16234 (name "python-imagesize")
16235 (version "1.2.0")
16236 (source
16237 (origin
16238 (method url-fetch)
16239 (uri (pypi-uri "imagesize" version))
16240 (sha256
16241 (base32
16242 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
16243 (build-system python-build-system)
16244 (home-page "https://github.com/shibukawa/imagesize_py")
16245 (synopsis "Gets image size of files in various formats in Python")
16246 (description
16247 "This package allows determination of image size from
16248 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
16249 (license license:expat)))
16250
16251 (define-public python2-imagesize
16252 (package-with-python2 python-imagesize))
16253
16254 (define-public python-termstyle
16255 (package
16256 (name "python-termstyle")
16257 (version "0.1.11")
16258 (source
16259 (origin
16260 (method url-fetch)
16261 (uri (pypi-uri "termstyle" version))
16262 (sha256
16263 (base32
16264 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
16265 (build-system python-build-system)
16266 (arguments
16267 '(#:phases
16268 (modify-phases %standard-phases
16269 (replace 'check
16270 (lambda _
16271 (invoke "python" "test3.py"))))))
16272 (home-page "https://github.com/gfxmonk/termstyle")
16273 (synopsis "Console text coloring for Python")
16274 (description "This package provides console text coloring for Python.")
16275 (license license:bsd-3)))
16276
16277 (define-public python-argcomplete
16278 (package
16279 (name "python-argcomplete")
16280 (version "1.11.1")
16281 (source
16282 (origin
16283 (method url-fetch)
16284 (uri (pypi-uri "argcomplete" version))
16285 (sha256
16286 (base32
16287 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
16288 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
16289 (build-system python-build-system)
16290 (native-inputs
16291 `(("python-coverage" ,python-coverage)
16292 ("python-flake8" ,python-flake8)
16293 ("python-pexpect" ,python-pexpect)
16294 ("python-wheel" ,python-wheel)
16295 ("tcsh" ,tcsh)
16296 ("fish" ,fish)
16297 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
16298 (home-page "https://github.com/kislyuk/argcomplete")
16299 (synopsis "Shell tab completion for Python argparse")
16300 (description "argcomplete provides extensible command line tab completion
16301 of arguments and options for Python scripts using @code{argparse}. It's
16302 particularly useful for programs with many options or sub-parsers that can
16303 dynamically suggest completions; for example, when browsing resources over the
16304 network.")
16305 (license license:asl2.0)
16306 (properties `((python2-variant . ,(delay python2-argcomplete))))))
16307
16308 (define-public python2-argcomplete
16309 (let ((variant (package-with-python2
16310 (strip-python2-variant python-argcomplete))))
16311 (package/inherit variant
16312 (arguments
16313 (substitute-keyword-arguments (package-arguments variant)
16314 ((#:phases phases '%standard-phases)
16315 `(modify-phases ,phases
16316 (add-after 'unpack 'set-my-HOME
16317 (lambda _ (setenv "HOME" "/tmp")))))))
16318 (native-inputs
16319 `(("python2-importlib-metadata" ,python2-importlib-metadata)
16320 ,@(package-native-inputs variant))))))
16321
16322 (define-public python-csscompressor
16323 (package
16324 (name "python-csscompressor")
16325 (version "0.9.5")
16326 (source
16327 (origin
16328 (method url-fetch)
16329 (uri (pypi-uri "csscompressor" version))
16330 (sha256
16331 (base32
16332 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
16333 (build-system python-build-system)
16334 (arguments
16335 '(#:phases
16336 (modify-phases %standard-phases
16337 (replace 'check
16338 (lambda _
16339 (invoke "py.test"))))))
16340 (native-inputs
16341 `(("python-pytest" ,python-pytest)))
16342 (home-page "https://github.com/sprymix/csscompressor")
16343 (synopsis "Python port of YUI CSS Compressor")
16344 (description
16345 "This package provides a python port of YUI CSS Compressor.")
16346 (license license:bsd-3)))
16347
16348 (define-public python-rcssmin
16349 (package
16350 (name "python-rcssmin")
16351 (version "1.0.6")
16352 (source
16353 (origin
16354 (method url-fetch)
16355 (uri (pypi-uri "rcssmin" version))
16356 (sha256
16357 (base32
16358 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
16359 (build-system python-build-system)
16360 (arguments
16361 '(#:phases
16362 (modify-phases %standard-phases
16363 (replace 'check
16364 (lambda _
16365 (invoke "python" "run_tests.py" "tests"))))))
16366 (home-page "http://opensource.perlig.de/rcssmin/")
16367 (synopsis "CSS Minifier")
16368 (description "The minifier is based on the semantics of the YUI compressor,
16369 which itself is based on the rule list by Isaac Schlueter.")
16370 (license license:asl2.0)))
16371
16372 (define-public python-rjsmin
16373 (package
16374 (name "python-rjsmin")
16375 (version "1.1.0")
16376 (source
16377 (origin
16378 (method url-fetch)
16379 (uri (pypi-uri "rjsmin" version))
16380 (sha256
16381 (base32
16382 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
16383 (modules '((guix build utils)))
16384 (snippet
16385 '(begin
16386 (for-each delete-file (find-files "bench" "\\.js$"))
16387 #t))))
16388 (build-system python-build-system)
16389 (arguments
16390 '(#:tests? #f ; Not all test files included.
16391 #:phases
16392 (modify-phases %standard-phases
16393 (replace 'check
16394 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
16395 (add-installed-pythonpath inputs outputs)
16396 (if tests?
16397 (invoke "py.test" "-vv" "tests")
16398 #t))))))
16399 (native-inputs
16400 `(("python-pytest" ,python-pytest)))
16401 (home-page "http://opensource.perlig.de/rjsmin/")
16402 (synopsis "Javascript Minifier")
16403 (description "@code{rJSmin} is a javascript minifier written in Python. The
16404 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
16405 is a re-implementation aiming for speed, so it can be used at runtime (rather
16406 than during a preprocessing step).")
16407 (license license:asl2.0)))
16408
16409 (define-public python-xopen
16410 (package
16411 (name "python-xopen")
16412 (version "0.5.0")
16413 (source
16414 (origin
16415 (method url-fetch)
16416 (uri (pypi-uri "xopen" version))
16417 (sha256
16418 (base32
16419 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
16420 (build-system python-build-system)
16421 (propagated-inputs
16422 `(("python-setuptools-scm" ,python-setuptools-scm)))
16423 (home-page "https://github.com/marcelm/xopen/")
16424 (synopsis "Open compressed files transparently")
16425 (description "This module provides an @code{xopen} function that works like
16426 Python's built-in @code{open} function, but can also deal with compressed files.
16427 Supported compression formats are gzip, bzip2 and, xz, and are automatically
16428 recognized by their file extensions. The focus is on being as efficient as
16429 possible on all supported Python versions.")
16430 (license license:expat)))
16431
16432 (define-public python2-xopen
16433 (let ((base (package-with-python2
16434 (strip-python2-variant python-xopen))))
16435 (package/inherit base
16436 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
16437 ,@(package-propagated-inputs base))))))
16438
16439 (define-public python-cheetah
16440 (package
16441 (name "python-cheetah")
16442 (version "3.2.4")
16443 (source
16444 (origin
16445 (method url-fetch)
16446 (uri (pypi-uri "Cheetah3" version))
16447 (sha256
16448 (base32
16449 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
16450 (build-system python-build-system)
16451 (arguments
16452 `(#:modules ((guix build utils)
16453 (guix build python-build-system)
16454 (ice-9 ftw)
16455 (srfi srfi-1)
16456 (srfi srfi-26))
16457 #:phases (modify-phases %standard-phases
16458 (add-after 'unpack 'use-absolute-python
16459 (lambda _
16460 (substitute* "Cheetah/CheetahWrapper.py"
16461 (("#!/usr/bin/env python")
16462 (string-append "#!" (which "python"))))
16463 #t))
16464 (add-after 'unpack 'fix-tests
16465 (lambda _
16466 (substitute* "Cheetah/Tests/ImportHooks.py"
16467 (("os.path.dirname\\(__file__\\)")
16468 (string-append "'" (getcwd) "/Cheetah/Tests'")))
16469 #t))
16470 (replace 'check
16471 (lambda _
16472 (let ((cwd (getcwd)))
16473 (setenv "PYTHONPATH"
16474 (string-append
16475 cwd "/build/"
16476 (find (cut string-prefix? "lib" <>)
16477 (scandir (string-append cwd "/build")))
16478 ":" (getenv "PYTHONPATH")))
16479 (setenv "PATH"
16480 (string-append (getenv "PATH")
16481 ":" cwd "/bin"))
16482 (setenv "TMPDIR" "/tmp")
16483
16484 (substitute* "Cheetah/Tests/Test.py"
16485 (("unittest.TextTestRunner\\(\\)")
16486 "unittest.TextTestRunner(verbosity=2)"))
16487
16488 (invoke "python" "Cheetah/Tests/Test.py")))))))
16489 (propagated-inputs
16490 `(("python-markdown" ,python-markdown))) ;optional
16491 (home-page "https://cheetahtemplate.org/")
16492 (synopsis "Template engine")
16493 (description "Cheetah is a text-based template engine and Python code
16494 generator.
16495
16496 Cheetah can be used as a standalone templating utility or referenced as
16497 a library from other Python applications. It has many potential uses,
16498 but web developers looking for a viable alternative to ASP, JSP, PHP and
16499 PSP are expected to be its principle user group.
16500
16501 Features:
16502 @enumerate
16503 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
16504 text-based format.
16505 @item Cleanly separates content, graphic design, and program code.
16506 @item Blends the power and flexibility of Python with a simple template language
16507 that non-programmers can understand.
16508 @item Gives template writers full access to any Python data structure, module,
16509 function, object, or method in their templates.
16510 @item Makes code reuse easy by providing an object-orientated interface to
16511 templates that is accessible from Python code or other Cheetah templates.
16512 One template can subclass another and selectively reimplement sections of it.
16513 @item Provides a simple, yet powerful, caching mechanism that can dramatically
16514 improve the performance of a dynamic website.
16515 @item Compiles templates into optimized, yet readable, Python code.
16516 @end enumerate")
16517 (license (license:x11-style "file://LICENSE"))))
16518
16519 (define-public python2-cheetah
16520 (package-with-python2 python-cheetah))
16521
16522 (define-public python-dulwich
16523 (package
16524 (name "python-dulwich")
16525 (version "0.19.16")
16526 (source
16527 (origin
16528 (method url-fetch)
16529 (uri (list (string-append "https://www.dulwich.io/releases/"
16530 "dulwich-" version ".tar.gz")
16531 (pypi-uri "dulwich" version)))
16532 (sha256
16533 (base32
16534 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
16535 (build-system python-build-system)
16536 (arguments
16537 `(#:phases
16538 (modify-phases %standard-phases
16539 (add-before 'check 'fix-tests
16540 (lambda* (#:key inputs #:allow-other-keys)
16541 ;; The tests use Popen with a custom environment which doesn't
16542 ;; include PATH.
16543 (substitute* "dulwich/tests/compat/utils.py"
16544 (("'git'") (string-append "'"
16545 (which "git")
16546 "'")))
16547 (substitute* '("dulwich/tests/test_repository.py"
16548 "dulwich/tests/test_hooks.py")
16549 (("#!/bin/sh") (string-append "#!" (which "sh"))))
16550 (setenv "TEST_RUNNER" "unittest")
16551 (setenv "PYTHONHASHSEED" "random")
16552 #t)))))
16553 (propagated-inputs
16554 `(("python-fastimport" ,python-fastimport)
16555 ("python-urllib3" ,python-urllib3)))
16556 (native-inputs
16557 `(("python-mock" ,python-mock)
16558 ("python-geventhttpclient" ,python-geventhttpclient)
16559 ("git" ,git)))
16560 (home-page "https://www.dulwich.io/")
16561 (synopsis "Git implementation in Python")
16562 (description "Dulwich is an implementation of the Git file formats and
16563 protocols written in pure Python.")
16564 ;; Can be used with either license.
16565 (license (list license:asl2.0 license:gpl2+))))
16566
16567 (define-public python-pbkdf2
16568 (package
16569 (name "python-pbkdf2")
16570 (version "1.3")
16571 (source
16572 (origin
16573 (method url-fetch)
16574 (uri (pypi-uri "pbkdf2" version))
16575 (sha256
16576 (base32
16577 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
16578 (build-system python-build-system)
16579 (arguments
16580 '(#:phases
16581 (modify-phases %standard-phases
16582 (replace 'check
16583 (lambda _
16584 (setenv "PYTHONPATH"
16585 (string-append (getcwd) "/build/lib:"
16586 (getenv "PYTHONPATH")))
16587 (invoke "python" "test/test_pbkdf2.py"))))))
16588 (propagated-inputs
16589 `(("python-pycrypto" ,python-pycrypto))) ; optional
16590 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
16591 (synopsis "Password-based key derivation")
16592 (description "This module implements the password-based key derivation
16593 function, PBKDF2, specified in RSA PKCS#5 v2.0.
16594
16595 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
16596 is part of the RSA Public Key Cryptography Standards series. The provided
16597 implementation takes a password or a passphrase and a salt value (and
16598 optionally a iteration count, a digest module, and a MAC module) and provides
16599 a file-like object from which an arbitrarily-sized key can be read.")
16600 (license license:expat)))
16601
16602 (define-public python2-pbkdf2
16603 (package-with-python2 python-pbkdf2))
16604
16605 (define-public python-qrcode
16606 (package
16607 (name "python-qrcode")
16608 (version "6.1")
16609 (source
16610 (origin
16611 (method url-fetch)
16612 (uri (pypi-uri "qrcode" version))
16613 (sha256
16614 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
16615 (build-system python-build-system)
16616 (arguments
16617 ;; FIXME: Tests require packaging 'pymaging'.
16618 '(#:tests? #f))
16619 (propagated-inputs
16620 `(("python-lxml" ,python-lxml) ; for SVG output
16621 ("python-pillow" ,python-pillow) ; for PNG output
16622 ("python-six" ,python-six)))
16623 (home-page "https://github.com/lincolnloop/python-qrcode")
16624 (synopsis "QR Code image generator")
16625 (description "This package provides a pure Python QR Code generator
16626 module. It uses the Python Imaging Library (PIL) to allow for the generation
16627 of QR Codes.
16628
16629 In addition this package provides a command line tool to generate QR codes and
16630 either write these QR codes to a file or do the output as ascii art at the
16631 console.")
16632 (license license:bsd-3)))
16633
16634 (define-public python2-qrcode
16635 (package-with-python2 python-qrcode))
16636
16637 (define-public python-rst2ansi
16638 (package
16639 (name "python-rst2ansi")
16640 (version "0.1.5")
16641 (source
16642 (origin
16643 (method url-fetch)
16644 (uri (pypi-uri "rst2ansi" version))
16645 (sha256
16646 (base32
16647 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
16648 (build-system python-build-system)
16649 (propagated-inputs
16650 `(("python-docutils" ,python-docutils)))
16651 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
16652 (synopsis "Convert RST to ANSI-decorated console output")
16653 (description
16654 "Python module dedicated to rendering RST (reStructuredText) documents
16655 to ansi-escaped strings suitable for display in a terminal.")
16656 (license license:expat)))
16657
16658 (define-public python-ansi2html
16659 (package
16660 (name "python-ansi2html")
16661 (version "1.2.0")
16662 (source
16663 (origin
16664 (method url-fetch)
16665 (uri (pypi-uri "ansi2html" version))
16666 (sha256
16667 (base32
16668 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
16669 (build-system python-build-system)
16670 (native-inputs
16671 `(("python-mock" ,python-mock)
16672 ("python-nose" ,python-nose)))
16673 (propagated-inputs
16674 `(("python-six" ,python-six)))
16675 (home-page "https://github.com/ralphbean/ansi2html")
16676 (synopsis "Convert ANSI-decorated console output to HTML")
16677 (description
16678 "@command{ansi2html} is a Python library and command line utility for
16679 converting text with ANSI color codes to HTML or LaTeX.")
16680 (license license:gpl3+)))
16681
16682 (define-public python2-ansi2html
16683 (package-with-python2 python-ansi2html))
16684
16685 (define-public python-easy-ansi
16686 (package
16687 (name "python-easy-ansi")
16688 (version "0.3")
16689 (source
16690 (origin
16691 (method git-fetch)
16692 (uri (git-reference
16693 (url "https://gitlab.com/joeysbytes/easy-ansi")
16694 (commit (string-append "v" version))))
16695 (file-name (git-file-name name version))
16696 (sha256
16697 (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
16698 (build-system python-build-system)
16699 (home-page "https://gitlab.com/joeysbytes/easy-ansi")
16700 (synopsis "Terminal framework API")
16701 (description
16702 "Easy ANSI is a terminal framework API to give you an easy way to use
16703 colors, cursor control movements, and line/box drawing. It is not meant as a
16704 replacement to more full-featured frameworks (such as curses or urwid), but as
16705 a tool to quickly create nice-looking screens in your terminal window. You
16706 can even create animations with the cursor controls.")
16707 (license license:expat)))
16708
16709 (define-public python-ddt
16710 (package
16711 (name "python-ddt")
16712 (version "1.4.2")
16713 (source
16714 (origin
16715 (method url-fetch)
16716 (uri (pypi-uri "ddt" version))
16717 (sha256
16718 (base32
16719 "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
16720 (build-system python-build-system)
16721 (native-inputs
16722 `(("python-pytest" ,python-pytest)))
16723 (propagated-inputs
16724 `(("python-pyyaml" ,python-pyyaml)))
16725 (home-page "https://github.com/datadriventests/ddt")
16726 (synopsis "Data-Driven Tests")
16727 (description
16728 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
16729 running it with different test data, and make it appear as multiple test
16730 cases.")
16731 (license license:expat)))
16732
16733 (define-public python-pycountry
16734 (package
16735 (name "python-pycountry")
16736 (version "18.5.26")
16737 (source
16738 (origin
16739 (method url-fetch)
16740 (uri (pypi-uri "pycountry" version))
16741 (sha256
16742 (base32
16743 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
16744 (build-system python-build-system)
16745 (home-page "https://bitbucket.org/flyingcircus/pycountry")
16746 (synopsis "ISO databases for languages, countries, currencies, etc.")
16747 (description
16748 "@code{pycountry} provides the ISO databases for the standards:
16749 @enumerate
16750 @item 639-3 (Languages)
16751 @item 3166 (Countries)
16752 @item 3166-3 (Deleted Countries)
16753 @item 3166-2 (Subdivisions of countries)
16754 @item 4217 (Currencies)
16755 @item 15924 (Scripts)
16756 @end enumerate
16757 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
16758 through a Python API.")
16759 (license license:lgpl2.1+)))
16760
16761 (define-public python2-pycountry
16762 (package-with-python2 python-pycountry))
16763
16764 (define-public python-pycosat
16765 (package
16766 (name "python-pycosat")
16767 (version "0.6.3")
16768 (source
16769 (origin
16770 (method url-fetch)
16771 (uri (pypi-uri "pycosat" version ".zip"))
16772 (sha256
16773 (base32
16774 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
16775 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
16776 (build-system python-build-system)
16777 (native-inputs
16778 `(("unzip" ,unzip)))
16779 (home-page "https://github.com/ContinuumIO/pycosat")
16780 (synopsis "Bindings to picosat (a SAT solver)")
16781 (description
16782 "This package provides efficient Python bindings to @code{picosat} on
16783 the C level. When importing pycosat, the @code{picosat} solver becomes part
16784 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
16785 Problem} (SAT) solver.")
16786 (license license:expat)))
16787
16788 (define-public python2-pycosat
16789 (package-with-python2 python-pycosat))
16790
16791 (define-public python2-ruamel.ordereddict
16792 (package
16793 (name "python2-ruamel.ordereddict")
16794 (version "0.4.9")
16795 (source
16796 (origin
16797 (method url-fetch)
16798 (uri (pypi-uri "ruamel.ordereddict" version))
16799 (sha256
16800 (base32
16801 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
16802 (build-system python-build-system)
16803 (arguments
16804 `(#:python ,python-2
16805 #:phases
16806 (modify-phases %standard-phases
16807 (delete 'check)
16808 (add-after 'install 'check
16809 (lambda* (#:key inputs outputs #:allow-other-keys)
16810 (add-installed-pythonpath inputs outputs)
16811 (invoke "python" "test/testordereddict.py"))))))
16812 (home-page "https://bitbucket.org/ruamel/ordereddict")
16813 (synopsis "Version of dict that keeps keys in insertion order")
16814 (description
16815 "This is an implementation of an ordered dictionary with @dfn{Key
16816 Insertion Order} (KIO: updates of values do not affect the position of the
16817 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
16818 removed and put at the back). The standard library module @code{OrderedDict},
16819 implemented later, implements a subset of @code{ordereddict} functionality.
16820 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
16821 Order} (KSO, no sorting function can be specified, but a transform can be
16822 specified to apply on the key before comparison (e.g. @code{string.lower})).")
16823 (license license:expat)))
16824
16825 (define-public python-pypeg2
16826 (package
16827 (name "python-pypeg2")
16828 (version "2.15.2")
16829 (source
16830 (origin
16831 (method url-fetch)
16832 (uri (pypi-uri "pyPEG2" version))
16833 (sha256
16834 (base32
16835 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
16836 (build-system python-build-system)
16837 (propagated-inputs `(("python-lxml" ,python-lxml)))
16838 (arguments
16839 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
16840 '(#:tests? #f))
16841 (home-page "https://fdik.org/pyPEG/")
16842 (synopsis "Parsing Expression Grammars in Python")
16843 (description "PyPEG is an intrinsic parser interpreter framework for
16844 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
16845 parse many formal languages.")
16846 (license license:gpl2)))
16847
16848 (define-public python-incremental
16849 (package
16850 (name "python-incremental")
16851 (version "17.5.0")
16852 (source
16853 (origin
16854 (method url-fetch)
16855 (uri (pypi-uri "incremental" version))
16856 (sha256
16857 (base32
16858 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
16859 (build-system python-build-system)
16860 (home-page "https://github.com/hawkowl/incremental")
16861 (synopsis "Library for versioning Python projects")
16862 (description "Incremental is a small library that versions your Python
16863 projects.")
16864 (license license:expat)))
16865
16866 (define-public python2-incremental
16867 (package-with-python2 python-incremental))
16868
16869 (define-public python-invoke
16870 (package
16871 (name "python-invoke")
16872 (home-page "https://www.pyinvoke.org/")
16873 (version "1.5.0")
16874 (source (origin
16875 (method url-fetch)
16876 (uri (pypi-uri "invoke" version))
16877 (sha256
16878 (base32
16879 "0l16v7zcbgi36z6pvmdrs5q4ks8lalcafi5d9nhrpcjzbc3n1igh"))))
16880 (build-system python-build-system)
16881 (arguments
16882 ;; XXX: Requires many dependencies that are not yet in Guix.
16883 `(#:tests? #f
16884 #:phases
16885 (modify-phases %standard-phases
16886 (add-after 'unpack 'fix-bash-path
16887 (lambda* (#:key inputs #:allow-other-keys)
16888 (let ((bash (assoc-ref inputs "bash")))
16889 (substitute* "invoke/config.py"
16890 (("shell = \"/bin/bash\"")
16891 (string-append "shell = \"" bash "/bin/bash\""))
16892 )
16893 #t))))))
16894 (inputs
16895 `(("bash" ,bash-minimal)))
16896 (synopsis "Pythonic task execution")
16897 (description
16898 "Invoke is a Python task execution tool and library, drawing inspiration
16899 from various sources to arrive at a powerful and clean feature set. It is
16900 evolved from the Fabric project, but focuses on local and abstract concerns
16901 instead of servers and network commands.")
16902 (license license:bsd-3)))
16903
16904 (define-public python2-invoke
16905 (package-with-python2 python-invoke))
16906
16907 (define-public python-automat
16908 (package
16909 (name "python-automat")
16910 (version "20.2.0")
16911 (source (origin
16912 (method url-fetch)
16913 (uri (pypi-uri "Automat" version))
16914 (sha256
16915 (base32
16916 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
16917 (build-system python-build-system)
16918 ;; We disable the tests because they require python-twisted, while
16919 ;; python-twisted depends on python-automat. Twisted is optional, but the
16920 ;; tests fail if it is not available. Also see
16921 ;; <https://github.com/glyph/automat/issues/71>.
16922 (arguments '(#:tests? #f))
16923 (native-inputs
16924 `(("python-m2r" ,python-m2r)
16925 ("python-setuptools-scm" ,python-setuptools-scm)
16926 ("python-graphviz" ,python-graphviz)))
16927 (propagated-inputs
16928 `(("python-six" ,python-six)
16929 ("python-attrs" ,python-attrs)))
16930 (home-page "https://github.com/glyph/Automat")
16931 (synopsis "Self-service finite-state machines")
16932 (description "Automat is a library for concise, idiomatic Python
16933 expression of finite-state automata (particularly deterministic finite-state
16934 transducers).")
16935 (license license:expat)))
16936
16937 (define-public python2-automat
16938 (package-with-python2 python-automat))
16939
16940 (define-public python-m2r
16941 (package
16942 (name "python-m2r")
16943 (version "0.2.1")
16944 (source (origin
16945 (method url-fetch)
16946 (uri (pypi-uri "m2r" version))
16947 (sha256
16948 (base32
16949 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
16950 (build-system python-build-system)
16951 (propagated-inputs
16952 `(("python-docutils" ,python-docutils)
16953 ("python-mistune" ,python-mistune)))
16954 (native-inputs
16955 `(("python-pygments" ,python-pygments)
16956 ("python-mock" ,python-mock)))
16957 (home-page "https://github.com/miyakogi/m2r")
16958 (synopsis "Markdown to reStructuredText converter")
16959 (description "M2R converts a markdown file including reST markups to valid
16960 reST format.")
16961 (license license:expat)))
16962
16963 (define-public python2-m2r
16964 (package-with-python2 python-m2r))
16965
16966 (define-public python-constantly
16967 (package
16968 (name "python-constantly")
16969 (version "15.1.0")
16970 (source (origin
16971 (method url-fetch)
16972 (uri (pypi-uri "constantly" version))
16973 (sha256
16974 (base32
16975 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
16976 (build-system python-build-system)
16977 (home-page "https://github.com/twisted/constantly")
16978 (synopsis "Symbolic constants in Python")
16979 (description "Constantly is a Python library that provides symbolic
16980 constant support. It includes collections and constants with text, numeric,
16981 and bit flag values.")
16982 (license license:expat)))
16983
16984 (define-public python2-constantly
16985 (package-with-python2 python-constantly))
16986
16987 (define-public python-attrs
16988 (package
16989 (name "python-attrs")
16990 (version "21.2.0")
16991 (source (origin
16992 (method url-fetch)
16993 (uri (pypi-uri "attrs" version))
16994 (sha256
16995 (base32
16996 "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
16997 (build-system python-build-system)
16998 (arguments
16999 `(#:modules ((guix build utils)
17000 (guix build python-build-system)
17001 (ice-9 ftw)
17002 (srfi srfi-1)
17003 (srfi srfi-26))
17004 #:phases
17005 (modify-phases %standard-phases
17006 (replace 'check
17007 (lambda* (#:key tests? #:allow-other-keys)
17008 (when tests?
17009 (let ((cwd (getcwd)))
17010 (setenv "PYTHONPATH"
17011 (string-append
17012 cwd "/build/"
17013 (find (cut string-prefix? "lib" <>)
17014 (scandir (string-append cwd "/build")))
17015 ":"
17016 (getenv "PYTHONPATH")))
17017 (invoke "python" "-m" "pytest"))))))))
17018 (native-inputs
17019 `(("python-coverage" ,python-coverage)
17020 ("python-hypothesis" ,python-hypothesis)
17021 ("python-pympler" ,python-pympler)
17022 ("python-pytest" ,python-pytest)
17023 ("python-six" ,python-six)
17024 ("python-sphinx" ,python-sphinx)
17025 ("python-zope-interface" ,python-zope-interface)))
17026 (home-page "https://github.com/python-attrs/attrs/")
17027 (synopsis "Attributes without boilerplate")
17028 (description "@code{attrs} is a Python package with class decorators that
17029 ease the chores of implementing the most common attribute-related object
17030 protocols.")
17031 (license license:expat)))
17032
17033 (define-public python2-attrs
17034 (package-with-python2 python-attrs))
17035
17036 (define-public python-attrs-bootstrap
17037 (package
17038 (inherit python-attrs)
17039 (name "python-attrs-bootstrap")
17040 (version "19.3.0")
17041 (source (origin
17042 (method url-fetch)
17043 (uri (pypi-uri "attrs" version))
17044 (sha256
17045 (base32
17046 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
17047 (native-inputs `())
17048 (arguments `(#:tests? #f))))
17049
17050 (define-public python2-attrs-bootstrap
17051 (package-with-python2 python-attrs-bootstrap))
17052
17053 (define-public python-cliapp
17054 (package
17055 (name "python-cliapp")
17056 (version "1.20180812.1")
17057 (source
17058 (origin
17059 (method url-fetch)
17060 (uri (string-append
17061 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
17062 version ".tar.gz"))
17063 (sha256
17064 (base32
17065 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
17066 (build-system python-build-system)
17067 (arguments
17068 `(;; XXX: The tests only do style and coverage checks, which
17069 ;; fails due to deprecation warnings, etc.
17070 #:tests? #f))
17071 (native-inputs
17072 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17073 ("python-pep8" ,python-pep8)))
17074 (propagated-inputs
17075 `(("python-pyaml" ,python-pyaml)))
17076 (home-page "https://liw.fi/cliapp/")
17077 (synopsis "Python framework for command line programs")
17078 (description "@code{cliapp} is a Python framework for command line
17079 programs. It contains the typical stuff such programs need to do, such
17080 as parsing the command line for options, and iterating over input files.")
17081 (license license:gpl2+)))
17082
17083 (define-public python2-cliapp
17084 (package-with-python2 python-cliapp))
17085
17086 (define-public python-ttystatus
17087 (package
17088 (name "python-ttystatus")
17089 (version "0.38")
17090 (source
17091 (origin
17092 (method git-fetch)
17093 (uri (git-reference
17094 (url "http://git.liw.fi/ttystatus")
17095 ;; There are no tags after ttystatus-0.36.
17096 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
17097 (sha256
17098 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
17099 (file-name (git-file-name name version))))
17100 (build-system python-build-system)
17101 (native-inputs
17102 `(("python-coverage-test-runner" ,python-coverage-test-runner)
17103 ("python-pep8" ,python-pep8)))
17104 (arguments
17105 `(#:phases
17106 (modify-phases %standard-phases
17107 ;; check phase needs to be run before the build phase. If not,
17108 ;; coverage-test-runner looks for tests for the built source files,
17109 ;; and fails.
17110 (delete 'check)
17111 (add-before 'build 'check
17112 (lambda _ (invoke "make" "check"))))))
17113 (home-page "https://liw.fi/ttystatus/")
17114 (synopsis "Python library for showing progress reporting and
17115 status updates on terminals")
17116 (description "@code{ttystatus} is a Python library for showing progress
17117 reporting and status updates on terminals, for command line programs.
17118 Output is automatically adapted to the width of the terminal: truncated
17119 if it does not fit, and resized if the terminal size changes.")
17120 (license license:gpl3+)))
17121
17122 (define-public python2-ttystatus
17123 (package-with-python2 python-ttystatus))
17124
17125 (define-public python2-tracing
17126 (package
17127 (name "python2-tracing")
17128 (version "0.10")
17129 (source
17130 (origin
17131 (method url-fetch)
17132 (uri (string-append
17133 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
17134 version ".tar.gz"))
17135 (sha256
17136 (base32
17137 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
17138 (build-system python-build-system)
17139 (arguments
17140 `(#:python ,python-2))
17141 (home-page "https://liw.fi/tracing/")
17142 (synopsis "Python debug logging helper")
17143 (description "@code{python2-tracing} is a python library for
17144 logging debug messages. It provides a way to turn debugging messages
17145 on and off, based on the filename they occur in. It is much faster
17146 than using @code{logging.Filter} to accomplish the same thing, which
17147 matters when code is run in production mode. The actual logging still
17148 happens using the @code{logging} library.")
17149 (license license:gpl3+)))
17150
17151 (define-public python-astroid
17152 (package
17153 (name "python-astroid")
17154 (version "2.4.2")
17155 (source
17156 (origin
17157 (method url-fetch)
17158 (uri (pypi-uri "astroid" version))
17159 (sha256
17160 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
17161 (modules '((guix build utils)))
17162 (snippet
17163 '(begin
17164 ;; Check to see if the version pinning has been removed.
17165 (substitute* "astroid/__pkginfo__.py"
17166 (("==1\\.4\\.\\*") ">=1.4.0"))
17167 #t))))
17168 (build-system python-build-system)
17169 (propagated-inputs
17170 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
17171 ("python-six" ,python-six)
17172 ("python-wrapt" ,python-wrapt)))
17173 (native-inputs
17174 `(("python-dateutil" ,python-dateutil)
17175 ("python-pytest" ,python-pytest)
17176 ("python-pytest-runner" ,python-pytest-runner)))
17177 (home-page "https://github.com/PyCQA/astroid")
17178 (synopsis "Common base representation of python source code for pylint and
17179 other projects")
17180 (description "@code{python-astroid} provides a common base representation
17181 of python source code for projects such as pychecker, pyreverse, pylint, etc.
17182
17183 It provides a compatible representation which comes from the _ast module. It
17184 rebuilds the tree generated by the builtin _ast module by recursively walking
17185 down the AST and building an extended ast. The new node classes have
17186 additional methods and attributes for different usages. They include some
17187 support for static inference and local name scopes. Furthermore, astroid
17188 builds partial trees by inspecting living objects.")
17189 (license license:lgpl2.1+)
17190 (properties `((python2-variant . ,(delay python2-astroid))))))
17191
17192 (define-public python2-astroid
17193 (let ((base (package-with-python2
17194 (strip-python2-variant python-astroid))))
17195 (package (inherit base)
17196 ;; Version 2.x removes python2 support.
17197 (version "1.6.5")
17198 (source
17199 (origin
17200 (method url-fetch)
17201 (uri (pypi-uri "astroid" version))
17202 (sha256
17203 (base32
17204 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
17205 (arguments
17206 (substitute-keyword-arguments (package-arguments base)
17207 ((#:phases phases)
17208 `(modify-phases ,phases
17209 (add-after 'unpack 'remove-spurious-test
17210 (lambda _
17211 ;; https://github.com/PyCQA/astroid/issues/276
17212 (delete-file "astroid/tests/unittest_brain.py")
17213 #t))
17214 (replace 'check
17215 (lambda _
17216 (invoke"python" "-m" "unittest" "discover"
17217 "-p" "unittest*.py")))))))
17218 (native-inputs `())
17219 (propagated-inputs
17220 `(("python2-backports-functools-lru-cache"
17221 ,python2-backports-functools-lru-cache)
17222 ("python2-enum34" ,python2-enum34)
17223 ("python2-singledispatch" ,python2-singledispatch)
17224 ,@(alist-delete "python-typed-ast"
17225 (package-propagated-inputs base)))))))
17226
17227 (define-public python-isbnlib
17228 (package
17229 (name "python-isbnlib")
17230 (version "3.10.4")
17231 (source
17232 (origin
17233 (method url-fetch)
17234 (uri (pypi-uri "isbnlib" version))
17235 (sha256
17236 (base32
17237 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
17238 (build-system python-build-system)
17239 (arguments '(#:tests? #f)) ; No test
17240 (home-page "https://github.com/xlcnd/isbnlib")
17241 (synopsis "Python library to work with ISBN strings")
17242 (description "@code{python-isbnlib} is a (pure) python library that provides
17243 several useful methods and functions to validate, clean, transform, hyphenate and
17244 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
17245 version, is suitable to be include as a dependency in other projects.")
17246 (license license:lgpl3+)))
17247
17248 (define-public python-isort
17249 (package
17250 (name "python-isort")
17251 (version "4.3.4")
17252 (source
17253 (origin
17254 (method git-fetch)
17255 (uri (git-reference
17256 ;; Tests pass only from the Github sources
17257 (url "https://github.com/timothycrosley/isort")
17258 (commit version)))
17259 (file-name (git-file-name name version))
17260 (sha256
17261 (base32
17262 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
17263 (build-system python-build-system)
17264 (native-inputs
17265 `(("python-mock" ,python-mock)
17266 ("python-pytest" ,python-pytest)))
17267 (home-page "https://github.com/timothycrosley/isort")
17268 (synopsis "Python utility/library to sort python imports")
17269 (description "@code{python-isort} is a python utility/library to sort
17270 imports alphabetically, and automatically separated into sections. It
17271 provides a command line utility, a python library and plugins for various
17272 editors.")
17273 (license license:expat)
17274 (properties `((python2-variant . ,(delay python2-isort))))))
17275
17276 (define-public python2-isort
17277 (let ((base (package-with-python2
17278 (strip-python2-variant python-isort))))
17279 (package/inherit base
17280 (native-inputs
17281 `(("python2-futures" ,python2-futures)
17282 ,@(package-native-inputs base))))))
17283
17284 (define-public python2-backports-functools-lru-cache
17285 (package
17286 (name "python2-backports-functools-lru-cache")
17287 (version "1.6.1")
17288 (source
17289 (origin
17290 (method url-fetch)
17291 ;; only the pypi tarballs contain the necessary metadata
17292 (uri (pypi-uri "backports.functools_lru_cache" version))
17293 (sha256
17294 (base32
17295 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
17296 (build-system python-build-system)
17297 (native-inputs
17298 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
17299 (arguments
17300 `(#:python ,python-2))
17301 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
17302 (synopsis "Backport of functools.lru_cache from Python 3.3")
17303 (description "@code{python2-backports-functools-lru-cache} is a backport
17304 of @code{functools.lru_cache} from python 3.3.")
17305 (license license:expat)))
17306
17307 (define-public python-configparser
17308 (package
17309 (name "python-configparser")
17310 (version "4.0.2")
17311 (source
17312 (origin
17313 (method url-fetch)
17314 (uri (pypi-uri "configparser" version))
17315 (sha256
17316 (base32
17317 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
17318 (native-inputs
17319 `(("python-setuptools_scm" ,python-setuptools-scm)))
17320 (build-system python-build-system)
17321 (home-page "https://github.com/jaraco/configparser/")
17322 (synopsis "Backport of configparser from python 3.5")
17323 (description "@code{python-configparser} is a backport of
17324 @code{configparser} from Python 3.5 so that it can be used directly
17325 in other versions.")
17326 (license license:expat)))
17327
17328 (define-public python2-configparser
17329 (package-with-python2 python-configparser))
17330
17331 (define-public python-iniconfig
17332 (package
17333 (name "python-iniconfig")
17334 (version "1.1.1")
17335 (source
17336 (origin
17337 (method url-fetch)
17338 (uri (pypi-uri "iniconfig" version))
17339 (sha256
17340 (base32
17341 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
17342 (build-system python-build-system)
17343 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
17344 (synopsis "Simple INI-file parser")
17345 (description "The @code{iniconfig} package provides a small and simple
17346 INI-file parser module having a unique set of features; @code{iniconfig}
17347 @itemize
17348 @item maintains the order of sections and entries;
17349 @item supports multi-line values with or without line-continuations;
17350 @item supports \"#\" comments everywhere;
17351 @item raises errors with proper line-numbers;
17352 @item raises an error when two sections have the same name.
17353 @end itemize")
17354 (license license:expat)))
17355
17356 (define-public python-mamba
17357 (package
17358 (name "python-mamba")
17359 (version "0.11.2")
17360 (source (origin
17361 (method url-fetch)
17362 (uri (pypi-uri "mamba" version))
17363 (sha256
17364 (base32
17365 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
17366 (build-system python-build-system)
17367 (arguments `(#:tests? #f)) ; No test
17368 (propagated-inputs
17369 `(("python-clint" ,python-clint)
17370 ("python-coverage" ,python-coverage)))
17371 (home-page "https://nestorsalceda.com/mamba/")
17372 (synopsis "Test runner for Python")
17373 (description
17374 "Mamba is a Behaviour-Driven Development tool for Python developers.
17375 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
17376 (license license:expat)))
17377
17378 (define-public python-mando
17379 (package
17380 (name "python-mando")
17381 (version "0.6.4")
17382 (source (origin
17383 (method url-fetch)
17384 (uri (pypi-uri "mando" version))
17385 (sha256
17386 (base32
17387 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
17388 (build-system python-build-system)
17389 (propagated-inputs
17390 `(("python-rst2ansi" ,python-rst2ansi)
17391 ("python-six" ,python-six)))
17392 (native-inputs
17393 `(("python-pytest" ,python-pytest)))
17394 (home-page "https://mando.readthedocs.org/")
17395 (synopsis
17396 "Wrapper around argparse, allowing creation of complete CLI applications")
17397 (description
17398 "This package is a wrapper around argparse, allowing you to write complete CLI
17399 applications in seconds while maintaining all the flexibility.")
17400 (license license:expat)))
17401
17402 (define-public python2-mando
17403 (package-with-python2 python-mando))
17404
17405 (define-public python2-argparse
17406 (package
17407 (name "python2-argparse")
17408 (version "1.4.0")
17409 (source
17410 (origin
17411 (method url-fetch)
17412 (uri (pypi-uri "argparse" version))
17413 (sha256
17414 (base32
17415 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
17416 (build-system python-build-system)
17417 (arguments
17418 `(#:python ,python-2))
17419 (home-page "https://github.com/ThomasWaldmann/argparse/")
17420 (synopsis "Python command-line parsing library")
17421 (description
17422 "This package is mostly for people who want to have @code{argparse} on
17423 older Pythons because it was not part of the standard library back then.")
17424 (license license:psfl)))
17425
17426 (define-public python-fudge
17427 (package
17428 (name "python-fudge")
17429 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
17430 ;; package, which is currently the only use of this package.
17431 (version "0.9.6")
17432 (source
17433 (origin
17434 (method url-fetch)
17435 (uri (pypi-uri "fudge" version))
17436 (sha256
17437 (base32
17438 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
17439 (build-system python-build-system)
17440 (arguments
17441 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
17442 (home-page "https://github.com/fudge-py/fudge")
17443 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
17444 (description
17445 "Fudge is a Python module for using fake objects (mocks and stubs) to
17446 test real ones.
17447
17448 In readable Python code, you declare the methods available on your fake object
17449 and how they should be called. Then you inject that into your application and
17450 start testing. This declarative approach means you don’t have to record and
17451 playback actions and you don’t have to inspect your fakes after running code.
17452 If the fake object was used incorrectly then you’ll see an informative
17453 exception message with a traceback that points to the culprit.")
17454 (license license:expat)))
17455
17456 (define-public python2-fudge
17457 (package-with-python2 python-fudge))
17458
17459 (define-public python-mwclient
17460 (package
17461 (name "python-mwclient")
17462 (version "0.10.1")
17463 (source
17464 (origin
17465 (method git-fetch)
17466 ;; The PyPI version wouldn't contain tests.
17467 (uri (git-reference
17468 (url "https://github.com/mwclient/mwclient")
17469 (commit (string-append "v" version))))
17470 (file-name (git-file-name name version))
17471 (sha256
17472 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
17473 (build-system python-build-system)
17474 (propagated-inputs
17475 `(("python-requests-oauthlib" ,python-requests-oauthlib)
17476 ("python-six" ,python-six)))
17477 (native-inputs
17478 `(("python-mock" ,python-mock)
17479 ("python-pytest" ,python-pytest)
17480 ("python-pytest-cov" ,python-pytest-cov)
17481 ("python-pytest-runner" ,python-pytest-runner)
17482 ("python-responses" ,python-responses)))
17483 (home-page "https://github.com/btongminh/mwclient")
17484 (synopsis "MediaWiki API client")
17485 (description "This package provides a MediaWiki API client.")
17486 (license license:expat)))
17487
17488 (define-public python-utils
17489 (package
17490 (name "python-utils")
17491 (version "2.4.0")
17492 (source (origin
17493 (method url-fetch)
17494 (uri (pypi-uri "python-utils" version))
17495 (sha256
17496 (base32
17497 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
17498 (build-system python-build-system)
17499 (arguments
17500 `(#:phases
17501 (modify-phases %standard-phases
17502 (replace 'check
17503 (lambda* (#:key inputs outputs #:allow-other-keys)
17504 (add-installed-pythonpath inputs outputs)
17505 (delete-file "pytest.ini")
17506 (invoke "pytest" "-vv"))))))
17507 (native-inputs
17508 `(("pytest-runner" ,python-pytest-runner)
17509 ("pytest" ,python-pytest)
17510 ("six" ,python-six)))
17511 (home-page "https://github.com/WoLpH/python-utils")
17512 (synopsis "Convenient utilities not included with the standard Python install")
17513 (description
17514 "Python Utils is a collection of small Python functions and classes which
17515 make common patterns shorter and easier.")
17516 (license license:bsd-2)))
17517
17518 (define-public python-diff-match-patch
17519 (package
17520 (name "python-diff-match-patch")
17521 (version "20121119")
17522 (source
17523 (origin
17524 (method url-fetch)
17525 (uri (pypi-uri "diff-match-patch" version))
17526 (sha256
17527 (base32
17528 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
17529 (build-system python-build-system)
17530 (home-page "https://code.google.com/p/google-diff-match-patch")
17531 (synopsis "Synchronize plain text")
17532 (description "Diff Match and Patch libraries offer robust algorithms to
17533 perform the operations required for synchronizing plain text.")
17534 (license license:asl2.0)))
17535
17536 (define-public python2-diff-match-patch
17537 (package-with-python2 python-diff-match-patch))
17538
17539 (define-public python-dirsync
17540 (package
17541 (name "python-dirsync")
17542 (version "2.2.5")
17543 (source
17544 (origin
17545 (method url-fetch)
17546 (uri (pypi-uri "dirsync" version))
17547 (sha256
17548 (base32
17549 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
17550 (build-system python-build-system)
17551 (propagated-inputs
17552 `(("six" ,python-six)))
17553 (home-page "https://github.com/tkhyn/dirsync")
17554 (synopsis "Advanced directory tree synchronisation tool")
17555 (description "Advanced directory tree synchronisation tool.")
17556 (license license:expat)))
17557
17558 (define-public python2-dirsync
17559 (package-with-python2 python-dirsync))
17560
17561 (define-public python-levenshtein
17562 (package
17563 (name "python-levenshtein")
17564 (version "0.12.0")
17565 (source
17566 (origin
17567 (method url-fetch)
17568 (uri (pypi-uri "python-Levenshtein" version))
17569 (sha256
17570 (base32
17571 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
17572 (build-system python-build-system)
17573 (home-page "https://github.com/ztane/python-Levenshtein")
17574 (synopsis "Fast computation of Levenshtein distance and string similarity")
17575 (description
17576 "The Levenshtein Python C extension module contains functions for fast computation of
17577 @enumerate
17578 @item Levenshtein (edit) distance, and edit operations
17579 @item string similarity
17580 @item approximate median strings, and generally string averaging
17581 @item string sequence and set similarity
17582 @end enumerate
17583 It supports both normal and Unicode strings.")
17584 (license license:gpl2+)))
17585
17586 (define-public python2-levenshtein
17587 (package-with-python2 python-levenshtein))
17588
17589 (define-public python-scandir
17590 (package
17591 (name "python-scandir")
17592 (version "1.10.0")
17593 (source
17594 (origin
17595 (method url-fetch)
17596 (uri (pypi-uri "scandir" version))
17597 (sha256
17598 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
17599 (build-system python-build-system)
17600 (arguments
17601 `(#:phases (modify-phases %standard-phases
17602 (replace 'check
17603 (lambda _
17604 (invoke "python" "test/run_tests.py"))))))
17605 (home-page "https://github.com/benhoyt/scandir")
17606 (synopsis "Directory iteration function")
17607 (description
17608 "Directory iteration function like os.listdir(), except that instead of
17609 returning a list of bare filenames, it yields DirEntry objects that include
17610 file type and stat information along with the name. Using scandir() increases
17611 the speed of os.walk() by 2-20 times (depending on the platform and file
17612 system) by avoiding unnecessary calls to os.stat() in most cases.
17613
17614 This package is part of the Python standard library since version 3.5.")
17615 (license license:bsd-3)))
17616
17617 (define-public python2-scandir
17618 (package-with-python2 python-scandir))
17619
17620 (define-public python2-stemming
17621 (package
17622 (name "python2-stemming")
17623 (version "1.0.1")
17624 (source
17625 (origin
17626 (method url-fetch)
17627 (uri (pypi-uri "stemming" version))
17628 (sha256
17629 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
17630 (build-system python-build-system)
17631 (arguments
17632 `(#:python ,python-2))
17633 (home-page "https://bitbucket.org/mchaput/stemming/overview")
17634 (synopsis "Python implementations of various stemming algorithms")
17635 (description
17636 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
17637 stemming algorithms for English. These implementations are straightforward and
17638 efficient, unlike some Python versions of the same algorithms available on the
17639 Web. This package is an extraction of the stemming code included in the Whoosh
17640 search engine.")
17641 (license license:public-domain)))
17642
17643 (define-public python-factory-boy
17644 (package
17645 (name "python-factory-boy")
17646 (version "2.8.1")
17647 (source
17648 (origin
17649 (method url-fetch)
17650 (uri (pypi-uri "factory_boy" version))
17651 (sha256
17652 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
17653 (build-system python-build-system)
17654 (arguments
17655 ;; Tests are not included in the tarball.
17656 `(#:tests? #f))
17657 (propagated-inputs
17658 `(("faker" ,python-faker)))
17659 (home-page "https://github.com/benhoyt/scandir")
17660 (synopsis "Versatile test fixtures replacement")
17661 (description
17662 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
17663
17664 As a fixtures replacement tool, it aims to replace static, hard to maintain
17665 fixtures with easy-to-use factories for complex object.
17666
17667 Instead of building an exhaustive test setup with every possible combination
17668 of corner cases, factory_boy allows you to use objects customized for the
17669 current test, while only declaring the test-specific fields")
17670 (license license:expat)))
17671
17672 (define-public python2-factory-boy
17673 (package-with-python2 python-factory-boy))
17674
17675 (define-public python-translate-toolkit
17676 (package
17677 (name "python-translate-toolkit")
17678 (version "2.1.0")
17679 (source
17680 (origin
17681 (method url-fetch)
17682 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
17683 (sha256
17684 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
17685 (build-system python-build-system)
17686 (native-inputs
17687 `(("python-pytest" ,python-pytest)
17688 ("python-sphinx" ,python-sphinx)))
17689 (propagated-inputs
17690 `(("python-babel" ,python-babel)
17691 ("python-beautifulsoup4" ,python-beautifulsoup4)
17692 ("python-chardet" ,python-chardet)
17693 ("python-diff-match-patch" ,python-diff-match-patch)
17694 ("python-levenshtein" ,python-levenshtein)
17695 ("python-lxml" ,python-lxml)
17696 ("python-six" ,python-six)
17697 ("python-vobject" ,python-vobject)
17698 ("python-pyyaml" ,python-pyyaml)))
17699 (arguments
17700 ;; TODO: tests are not run, because they end with
17701 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
17702 ;; 'parse_funcs'
17703 ;; during test setup.
17704 `(#:tests? #f))
17705 (home-page "https://toolkit.translatehouse.org")
17706 (synopsis "Tools and API for translation and localization engineering")
17707 (description
17708 "Tools and API for translation and localization engineering. It contains
17709 several utilities, as well as an API for building localization tools.")
17710 (license license:gpl2+)))
17711
17712 (define-public python2-translate-toolkit
17713 (package-with-python2 python-translate-toolkit))
17714
17715 (define-public python-packaging
17716 (package
17717 (name "python-packaging")
17718 (version "20.0")
17719 (source
17720 (origin
17721 (method url-fetch)
17722 (uri (pypi-uri "packaging" version))
17723 ;; XXX: The URL in the patch file is wrong, it should be
17724 ;; <https://github.com/pypa/packaging/pull/256>.
17725 (patches (search-patches "python-packaging-test-arch.patch"))
17726 (sha256
17727 (base32
17728 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
17729 (build-system python-build-system)
17730 (arguments
17731 `(#:phases (modify-phases %standard-phases
17732 (replace 'check
17733 (lambda* (#:key tests? #:allow-other-keys)
17734 (if tests?
17735 (invoke "py.test" "-vv")
17736 (format #t "test suite not run~%"))
17737 #t)))))
17738 (native-inputs
17739 `(("python-pretend" ,python-pretend)
17740 ("python-pytest" ,python-pytest)))
17741 (propagated-inputs
17742 `(("python-pyparsing" ,python-pyparsing)
17743 ("python-six" ,python-six)))
17744 (home-page "https://github.com/pypa/packaging")
17745 (synopsis "Core utilities for Python packages")
17746 (description "Packaging is a Python module for dealing with Python packages.
17747 It offers an interface for working with package versions, names, and dependency
17748 information.")
17749 ;; From 'LICENSE': This software is made available under the terms of
17750 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
17751 ;; Contributions to this software is made under the terms of *both* these
17752 ;; licenses.
17753 (license (list license:asl2.0 license:bsd-2))))
17754
17755 (define-public python2-packaging
17756 (package-with-python2 python-packaging))
17757
17758 ;; Variants with minimal dependencies, for bootstrapping Pytest.
17759 (define-public python-packaging-bootstrap
17760 (hidden-package
17761 (package/inherit
17762 python-packaging
17763 (name "python-packaging-bootstrap")
17764 (native-inputs '())
17765 (propagated-inputs
17766 `(("python-pyparsing" ,python-pyparsing)))
17767 (arguments '(#:tests? #f)))))
17768
17769 (define-public python2-packaging-bootstrap
17770 (hidden-package
17771 (package/inherit
17772 python2-packaging
17773 (name "python2-packaging-bootstrap")
17774 (native-inputs '())
17775 (propagated-inputs
17776 `(("python-pyparsing" ,python2-pyparsing)))
17777 (arguments
17778 `(#:tests? #f
17779 ,@(package-arguments python2-packaging))))))
17780
17781 (define-public python-relatorio
17782 (package
17783 (name "python-relatorio")
17784 (version "0.8.0")
17785 (source
17786 (origin
17787 (method url-fetch)
17788 (uri (pypi-uri "relatorio" version))
17789 (sha256
17790 (base32
17791 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
17792 (build-system python-build-system)
17793 (propagated-inputs
17794 `(("python-lxml" ,python-lxml)
17795 ("python-genshi" ,python-genshi)))
17796 (native-inputs
17797 `(("python-magic" ,python-magic)))
17798 (home-page "https://relatorio.tryton.org/")
17799 (synopsis "Templating library able to output ODT and PDF files")
17800 (description "Relatorio is a templating library which provides a way to
17801 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
17802 for more filetypes can be easily added by creating plugins for them.")
17803 (license license:gpl3+)))
17804
17805 (define-public python2-relatorio
17806 (package-with-python2 python-relatorio))
17807
17808 (define-public python-radon
17809 (package
17810 (name "python-radon")
17811 (version "4.1.0")
17812 (source
17813 (origin
17814 (method url-fetch)
17815 (uri (pypi-uri "radon" version))
17816 (sha256
17817 (base32
17818 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
17819 (build-system python-build-system)
17820 (arguments
17821 `(#:phases (modify-phases %standard-phases
17822 (replace 'check
17823 (lambda _
17824 (invoke "python" "radon/tests/run.py"))))))
17825 (propagated-inputs
17826 `(("python-colorama" ,python-colorama)
17827 ("python-flake8-polyfill" ,python-flake8-polyfill)
17828 ("python-mando" ,python-mando)))
17829 (native-inputs
17830 `(("python-pytest" ,python-pytest)
17831 ("python-pytest-mock" ,python-pytest-mock)))
17832 (home-page "https://radon.readthedocs.org/")
17833 (synopsis "Code Metrics in Python")
17834 (description "Radon is a Python tool which computes various code metrics.
17835 Supported metrics are:
17836 @itemize @bullet
17837 @item raw metrics: SLOC, comment lines, blank lines, &c.
17838 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
17839 @item Halstead metrics (all of them)
17840 @item the Maintainability Index (a Visual Studio metric)
17841 @end itemize")
17842 (properties `((python2-variant . ,(delay python2-radon))))
17843 (license license:expat)))
17844
17845 (define-public python2-radon
17846 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
17847 (package/inherit base
17848 (propagated-inputs
17849 `(("python-configparser" ,python2-configparser)
17850 ("python-future" ,python2-future)
17851 ,@(package-propagated-inputs base))))))
17852
17853 (define-public python-sure
17854 (package
17855 (name "python-sure")
17856 (version "1.4.11")
17857 (source
17858 (origin
17859 (method url-fetch)
17860 (uri (pypi-uri "sure" version))
17861 (sha256
17862 (base32
17863 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
17864 (build-system python-build-system)
17865 (propagated-inputs
17866 `(("python-mock" ,python-mock)
17867 ("python-six" ,python-six)))
17868 (native-inputs
17869 `(("python-nose" ,python-nose)))
17870 (home-page "https://github.com/gabrielfalcao/sure")
17871 (synopsis "Automated testing library in python for python")
17872 (description
17873 "Sure is a python library that leverages a DSL for writing assertions.
17874 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
17875 (license license:gpl3+)))
17876
17877 (define-public python2-sure
17878 (package-with-python2 python-sure))
17879
17880 (define-public python2-couleur
17881 ;; This package does not seem to support python3 at all, hence,
17882 ;; only the python2 variant definition is provided.
17883 (package
17884 (name "python2-couleur")
17885 (version "0.6.2")
17886 (source
17887 (origin
17888 (method url-fetch)
17889 (uri (pypi-uri "couleur" version))
17890 (sha256
17891 (base32
17892 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
17893 (build-system python-build-system)
17894 (arguments
17895 `(#:python ,python-2))
17896 (home-page "https://github.com/gabrielfalcao/couleur")
17897 (synopsis
17898 "ANSI terminal tool for python, colored shell and other handy fancy features")
17899 (description
17900 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
17901 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
17902 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
17903 ;; https://github.com/gabrielfalcao/couleur/issues/11
17904 (license license:lgpl3+)))
17905
17906 (define-public python-misaka
17907 (package
17908 (name "python-misaka")
17909 (version "2.1.1")
17910 (source
17911 (origin
17912 (method url-fetch)
17913 (uri (pypi-uri "misaka" version))
17914 (sha256
17915 (base32
17916 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
17917 (build-system python-build-system)
17918 (arguments
17919 `(;; Line 37 of setup.py calls self.run_command('develop')
17920 ;; in the 'check' phase. This command seems to be trying
17921 ;; to write to
17922 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
17923 ;; for which it does not have the permission to write.
17924 #:tests? #f))
17925 (propagated-inputs
17926 `(("python-cffi" ,python-cffi)))
17927 (home-page "https://github.com/FSX/misaka")
17928 (synopsis "Python binding for Hoedown")
17929 (description
17930 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
17931 library written in C. It features a fast HTML renderer and functionality to make custom
17932 renderers (e.g. man pages or LaTeX).")
17933 (license license:expat)))
17934
17935 (define-public python2-misaka
17936 (package-with-python2 python-misaka))
17937
17938 (define-public python2-steadymark
17939 ;; This is forced into being a python2 only variant
17940 ;; due to its dependence on couleur that has no support
17941 ;; for python3
17942 (package
17943 (name "python2-steadymark")
17944 (version "0.7.3")
17945 (source
17946 (origin
17947 (method url-fetch)
17948 (uri (pypi-uri "steadymark" version))
17949 (sha256
17950 (base32
17951 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
17952 (build-system python-build-system)
17953 (native-inputs
17954 `(("python-couleur" ,python2-couleur)
17955 ("python-sure" ,python2-sure)
17956 ("python-misaka" ,python2-misaka)))
17957 (arguments
17958 `(#:python ,python-2
17959 #:phases
17960 (modify-phases %standard-phases
17961 (add-before 'build 'patch-setup-py
17962 (lambda _
17963 ;; Update requirements from dependency==version
17964 ;; to dependency>=version
17965 (substitute* "setup.py"
17966 (("==") ">="))
17967 #t)))))
17968 (home-page "https://github.com/gabrielfalcao/steadymark")
17969 (synopsis "Markdown-based test runner for python")
17970 (description
17971 "@code{Steadymark} allows documentation to be written in github-flavoured
17972 markdown. The documentation may contain snippets of code surrounded by python
17973 code blocks and @code{Steadymark} will find these snippets and run them, making
17974 sure that there are no old malfunctional examples in the documentation examples.")
17975 (license license:expat)))
17976
17977 (define-public python-jsonpointer
17978 (package
17979 (name "python-jsonpointer")
17980 (version "1.10")
17981 (source
17982 (origin
17983 (method url-fetch)
17984 (uri (pypi-uri "jsonpointer" version))
17985 (sha256
17986 (base32
17987 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
17988 (build-system python-build-system)
17989 (home-page "https://github.com/stefankoegl/python-json-pointer")
17990 (synopsis "Identify specific nodes in a JSON document")
17991 (description "@code{jsonpointer} allows you to access specific nodes
17992 by path in a JSON document (see RFC 6901).")
17993 (license license:bsd-3)))
17994
17995 (define-public python2-jsonpointer
17996 (package-with-python2 python-jsonpointer))
17997
17998 (define-public python-jsonpatch
17999 (package
18000 (name "python-jsonpatch")
18001 (version "1.16")
18002 (source
18003 (origin
18004 (method git-fetch)
18005 ;; pypi version lacks tests.js
18006 (uri (git-reference
18007 (url "https://github.com/stefankoegl/python-json-patch")
18008 (commit (string-append "v" version))))
18009 (file-name (git-file-name name version))
18010 (sha256
18011 (base32
18012 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
18013 (build-system python-build-system)
18014 (propagated-inputs
18015 `(("python-jsonpointer" ,python-jsonpointer)))
18016 (home-page "https://github.com/stefankoegl/python-json-patch")
18017 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
18018 (description "@code{jsonpatch} is a library and program that allows
18019 applying JSON Patches according to RFC 6902.")
18020 (license license:bsd-3)))
18021
18022 (define-public python2-jsonpatch
18023 (package-with-python2 python-jsonpatch))
18024
18025 (define-public python-jsonpatch-0.4
18026 (package (inherit python-jsonpatch)
18027 (name "python-jsonpatch")
18028 (version "0.4")
18029 (source
18030 (origin
18031 (method git-fetch)
18032 (uri (git-reference
18033 (url "https://github.com/stefankoegl/python-json-patch")
18034 (commit (string-append "v" version))))
18035 (file-name (git-file-name name version))
18036 (sha256
18037 (base32
18038 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
18039
18040 (define-public python2-jsonpatch-0.4
18041 (package-with-python2 python-jsonpatch-0.4))
18042
18043 (define-public python-rfc3986
18044 (package
18045 (name "python-rfc3986")
18046 (version "1.4.0")
18047 (source (origin
18048 (method url-fetch)
18049 (uri (pypi-uri "rfc3986" version))
18050 (sha256
18051 (base32
18052 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
18053 (build-system python-build-system)
18054 (arguments
18055 `(#:modules ((guix build utils)
18056 (guix build python-build-system)
18057 (ice-9 ftw)
18058 (srfi srfi-1)
18059 (srfi srfi-26))
18060 #:phases
18061 (modify-phases %standard-phases
18062 (replace 'check
18063 (lambda _
18064 (let ((cwd (getcwd)))
18065 (setenv "PYTHONPATH"
18066 (string-append cwd "/build/"
18067 (find (cut string-prefix? "lib" <>)
18068 (scandir (string-append cwd "/build")))
18069 ":"
18070 (getenv "PYTHONPATH")))
18071 (invoke "pytest" "-v")))))))
18072 (native-inputs
18073 `(("python-pytest" ,python-pytest)))
18074 (home-page "https://rfc3986.readthedocs.io/")
18075 (synopsis "Parse and validate URI references")
18076 (description
18077 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
18078 validation and authority parsing. This module also supports RFC@tie{}6874
18079 which adds support for zone identifiers to IPv6 addresses.")
18080 (license license:asl2.0)))
18081
18082 (define-public python2-rfc3986
18083 (package-with-python2 python-rfc3986))
18084
18085 (define-public python-rfc3987
18086 (package
18087 (name "python-rfc3987")
18088 (version "1.3.7")
18089 (source
18090 (origin
18091 (method url-fetch)
18092 (uri (pypi-uri "rfc3987" version))
18093 (sha256
18094 (base32
18095 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
18096 (build-system python-build-system)
18097 (home-page "https://pypi.org/project/rfc3987/")
18098 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
18099 (description "@code{rfc3987} provides routines for parsing and
18100 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
18101 (license license:gpl3+)))
18102
18103 (define-public python2-rfc3987
18104 (package-with-python2 python-rfc3987))
18105
18106 ;; The latest commit contains fixes for building with both python3 and python2.
18107 (define-public python-rfc6555
18108 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
18109 (revision "1"))
18110 (package
18111 (name "python-rfc6555")
18112 (version (git-version "0.0.0" revision commit))
18113 (source (origin
18114 (method git-fetch)
18115 (uri (git-reference
18116 (url "https://github.com/sethmlarson/rfc6555")
18117 (commit commit)))
18118 (file-name (git-file-name name version))
18119 (sha256
18120 (base32
18121 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
18122 (build-system python-build-system)
18123 (arguments
18124 '(#:phases
18125 (modify-phases %standard-phases
18126 (replace 'check
18127 (lambda* (#:key tests? #:allow-other-keys)
18128 (if tests?
18129 ;; Other tests require network access.
18130 (invoke "pytest" "tests/test_ipv6.py")
18131 #t))))))
18132 (native-inputs
18133 `(("python-pytest" ,python-pytest)))
18134 (home-page "https://pypi.org/project/rfc6555/")
18135 (synopsis "Python implementation of RFC 6555")
18136 (description
18137 "Python implementation of the Happy Eyeballs Algorithm described in RFC
18138 6555. Provided with a single file and dead-simple API to allow easy vendoring
18139 and integration into other projects.")
18140 (properties `((python2-variant . ,(delay python2-rfc6555))))
18141 (license license:asl2.0))))
18142
18143 (define-public python2-rfc6555
18144 (let ((base (package-with-python2
18145 (strip-python2-variant python-rfc6555))))
18146 (package/inherit base
18147 (propagated-inputs
18148 `(("python2-selectors2" ,python2-selectors2))))))
18149
18150 (define-public python-bagit
18151 (package
18152 (name "python-bagit")
18153 (version "1.7.0")
18154 (source
18155 (origin
18156 (method url-fetch)
18157 (uri (pypi-uri "bagit" version))
18158 (sha256
18159 (base32
18160 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
18161 (build-system python-build-system)
18162 (native-inputs
18163 `(("python-setuptools-scm" ,python-setuptools-scm)
18164 ("python-coverage" ,python-coverage)
18165 ("python-mock" ,python-mock)))
18166 (home-page "https://libraryofcongress.github.io/bagit-python/")
18167 (synopsis "Create and validate BagIt packages")
18168 (description "Bagit is a Python library and command line utility for working
18169 with BagIt style packages. BagIt is a minimalist packaging format for digital
18170 preservation.")
18171 (license license:cc0)))
18172
18173 (define-public python-prov
18174 (package
18175 (name "python-prov")
18176 (version "2.0.0")
18177 (source
18178 (origin
18179 (method url-fetch)
18180 (uri (pypi-uri "prov" version))
18181 (sha256
18182 (base32
18183 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
18184 (build-system python-build-system)
18185 (propagated-inputs
18186 `(("python-dateutil" ,python-dateutil)
18187 ("python-lxml" ,python-lxml)
18188 ("python-networkx" ,python-networkx)
18189 ("python-rdflib" ,python-rdflib)))
18190 (native-inputs
18191 `(("graphviz" ,graphviz)
18192 ("python-pydot" ,python-pydot)))
18193 (home-page "https://github.com/trungdong/prov")
18194 (synopsis
18195 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
18196 (description
18197 "This package provides a library for W3C Provenance Data Model supporting
18198 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
18199 (license license:expat)))
18200
18201 (define-public python-arcp
18202 (package
18203 (name "python-arcp")
18204 (version "0.2.1")
18205 (source
18206 (origin
18207 (method url-fetch)
18208 (uri (pypi-uri "arcp" version))
18209 (sha256
18210 (base32
18211 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
18212 (build-system python-build-system)
18213 (native-inputs
18214 `(("python-pytest" ,python-pytest)))
18215 (home-page "http://arcp.readthedocs.io/")
18216 (synopsis
18217 "Archive and Package URI parser and generator")
18218 (description
18219 "@acronym{arcp, Archive and Package} provides functions for creating
18220 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
18221 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
18222 consume or reference hypermedia resources bundled inside a file archive or an
18223 application package, as well as to resolve URIs for archive resources within a
18224 programmatic framework. This URI scheme provides mechanisms to generate a
18225 unique base URI to represent the root of the archive, so that relative URI
18226 references in a bundled resource can be resolved within the archive without
18227 having to extract the archive content on the local file system. An arcp URI can
18228 be used for purposes of isolation (e.g. when consuming multiple archives),
18229 security constraints (avoiding \"climb out\" from the archive), or for
18230 externally identiyfing sub-resources referenced by hypermedia formats.")
18231 (license license:asl2.0)))
18232
18233 (define-public python-shellescape
18234 (package
18235 (name "python-shellescape")
18236 (version "3.8.1")
18237 (source
18238 (origin
18239 (method git-fetch)
18240 (uri (git-reference
18241 (url "https://github.com/chrissimpkins/shellescape")
18242 (commit (string-append "v" version))))
18243 (file-name (git-file-name name version))
18244 (sha256
18245 (base32
18246 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
18247 (build-system python-build-system)
18248 (arguments
18249 '(#:phases
18250 (modify-phases %standard-phases
18251 (replace 'check
18252 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
18253 (when tests?
18254 (add-installed-pythonpath inputs outputs)
18255 (invoke "python" "tests/test_shellescape.py"))
18256 #t)))))
18257 (native-inputs
18258 `(("python-pytest" ,python-pytest)))
18259 (home-page "https://github.com/chrissimpkins/shellescape")
18260 (synopsis
18261 "Shell escape a string to safely use it as a token in a shell command")
18262 (description
18263 "The shellescape Python module defines the @code{shellescape.quote()}
18264 function that returns a shell-escaped version of a Python string. This is a
18265 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
18266 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
18267 (license license:expat)))
18268
18269 (define-public python-validators
18270 (package
18271 (name "python-validators")
18272 (version "0.14.2")
18273 (source (origin
18274 (method url-fetch)
18275 (uri (pypi-uri "validators" version))
18276 (sha256
18277 (base32
18278 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
18279 (build-system python-build-system)
18280 (arguments
18281 '(#:phases (modify-phases %standard-phases
18282 (replace 'check
18283 (lambda _
18284 (invoke "pytest" "-vv"))))))
18285 (propagated-inputs
18286 `(("python-decorator" ,python-decorator)
18287 ("python-six" ,python-six)))
18288 (native-inputs
18289 `(("python-flake8" ,python-flake8)
18290 ("python-isort" ,python-isort)
18291 ("python-pytest" ,python-pytest)))
18292 (home-page "https://github.com/kvesteri/validators")
18293 (synopsis "Data validation library")
18294 (description
18295 "This package contains validators for different things such as email
18296 addresses, IP addresses, URLs, hashes and more. It has been designed to
18297 be easy to use and not require defining a schema or form just to validate
18298 some input.")
18299 (license license:expat)))
18300
18301 (define-public python2-validators
18302 (package-with-python2 python-validators))
18303
18304 (define-public python-validate-email
18305 (package
18306 (name "python-validate-email")
18307 (version "1.3")
18308 (source
18309 (origin
18310 (method url-fetch)
18311 (uri (pypi-uri "validate_email" version))
18312 (sha256
18313 (base32
18314 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
18315 (build-system python-build-system)
18316 (home-page "https://github.com/syrusakbary/validate_email")
18317 (synopsis "Verifies if an email address is valid and really exists")
18318 (description "@code{validate_email} can be used to verify if an email
18319 address is valid and really exists.")
18320 (license license:lgpl3+)))
18321
18322 (define-public python2-validate-email
18323 (package-with-python2 python-validate-email))
18324
18325 (define-public python-flex
18326 (package
18327 (name "python-flex")
18328 (version "6.10.0")
18329 (source
18330 (origin
18331 (method url-fetch)
18332 (uri (pypi-uri "flex" version))
18333 (sha256
18334 (base32
18335 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
18336 (build-system python-build-system)
18337 (propagated-inputs
18338 `(("python-click" ,python-click)
18339 ("python-iso8601" ,python-iso8601)
18340 ("python-jsonpointer" ,python-jsonpointer)
18341 ("python-pyyaml" ,python-pyyaml)
18342 ("python-requests" ,python-requests)
18343 ("python-rfc3987" ,python-rfc3987)
18344 ("python-six" ,python-six)
18345 ("python-validate-email" ,python-validate-email)))
18346 (home-page "https://github.com/pipermerriam/flex")
18347 (synopsis "Validates Swagger schemata")
18348 (description "@code{flex} can be used to validate Swagger schemata.")
18349 (license license:bsd-3)))
18350
18351 (define-public python2-flex
18352 (package-with-python2 python-flex))
18353
18354 (define-public python-marshmallow
18355 (package
18356 (name "python-marshmallow")
18357 (version "3.9.1")
18358 (source
18359 (origin
18360 (method url-fetch)
18361 (uri (pypi-uri "marshmallow" version))
18362 (sha256
18363 (base32
18364 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
18365 (build-system python-build-system)
18366 (propagated-inputs
18367 `(("python-dateutil" ,python-dateutil)
18368 ("python-simplejson" ,python-simplejson)))
18369 (native-inputs
18370 `(("python-pytest" ,python-pytest)
18371 ("python-pytz" ,python-pytz)))
18372 (home-page "https://github.com/marshmallow-code/marshmallow")
18373 (synopsis "Convert complex datatypes to and from native
18374 Python datatypes.")
18375 (description "@code{marshmallow} provides a library for converting
18376 complex datatypes to and from native Python datatypes.")
18377 (license license:expat)))
18378
18379 (define-public python-apispec
18380 (package
18381 (name "python-apispec")
18382 (version "4.0.0")
18383 (source
18384 (origin
18385 (method url-fetch)
18386 (uri (pypi-uri "apispec" version))
18387 (sha256
18388 (base32
18389 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
18390 (build-system python-build-system)
18391 (arguments
18392 '(#:phases (modify-phases %standard-phases
18393 (add-after 'unpack 'disable-prance-tests
18394 (lambda _
18395 ;; Disable validation tests since they require the
18396 ;; optional 'prance' library which is not yet in Guix.
18397 (substitute* "tests/test_ext_marshmallow_openapi.py"
18398 (("def test_openapi_tools_validate.*" all)
18399 (string-append "@pytest.mark.xfail\n" all)))))
18400 (replace 'check
18401 (lambda _
18402 (setenv "PYTHONPATH"
18403 (string-append "./build/lib:"
18404 (getenv "PYTHONPATH")))
18405 (invoke "pytest" "-vv"))))))
18406 (propagated-inputs
18407 `(("python-pyyaml" ,python-pyyaml)))
18408 (native-inputs
18409 `(("python-pytest" ,python-pytest)
18410 ("python-marshmallow" ,python-marshmallow)))
18411 (home-page "https://github.com/marshmallow-code/apispec")
18412 (synopsis "Swagger/OpenAPI specification generator")
18413 (description "@code{python-apispec} is a pluggable API specification
18414 generator. It currently supports the OpenAPI specification, formerly known
18415 as Swagger.")
18416 (license license:expat)))
18417
18418 (define-public python-flasgger
18419 (package
18420 (name "python-flasgger")
18421 (version "0.6.3")
18422 (source
18423 (origin
18424 (method git-fetch)
18425 (uri (git-reference
18426 (url "https://github.com/rochacbruno/flasgger")
18427 (commit version)))
18428 (file-name (git-file-name name version))
18429 (sha256
18430 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
18431 (build-system python-build-system)
18432 (arguments
18433 `(#:phases
18434 (modify-phases %standard-phases
18435 (replace 'check
18436 (lambda* (#:key inputs outputs #:allow-other-keys)
18437 (substitute* "Makefile"
18438 (("flake8 flasgger --ignore=F403")
18439 "flake8 flasgger --ignore=E731,F403"))
18440 (setenv "PYTHONPATH" (string-append (getcwd)
18441 ":"
18442 (getenv "PYTHONPATH")))
18443 (invoke "py.test"))))))
18444 (propagated-inputs
18445 `(("python-flask" ,python-flask)
18446 ("python-pyyaml" ,python-pyyaml)
18447 ("python-jsonschema" ,python-jsonschema)
18448 ("python-mistune" ,python-mistune)
18449 ("python-six" ,python-six)))
18450 (native-inputs
18451 `(("python-decorator" ,python-decorator)
18452 ("python-flake8" ,python-flake8)
18453 ("python-flask-restful" ,python-flask-restful)
18454 ("python-flex" ,python-flex)
18455 ("python-pytest" ,python-pytest)
18456 ("python-pytest-cov" ,python-pytest-cov)
18457 ("python-marshmallow" ,python-marshmallow)
18458 ("python-apispec" ,python-apispec)))
18459 (home-page "https://github.com/rochacbruno/flasgger/")
18460 (synopsis "Extract Swagger specs from your Flask project")
18461 (description "@code{python-flasgger} allows extracting Swagger specs
18462 from your Flask project. It is a fork of Flask-Swagger.")
18463 (license license:expat)))
18464
18465 (define-public python-swagger-spec-validator
18466 (package
18467 (name "python-swagger-spec-validator")
18468 (version "2.4.3")
18469 (source
18470 (origin
18471 (method url-fetch)
18472 (uri (pypi-uri "swagger-spec-validator" version))
18473 (sha256
18474 (base32
18475 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
18476 (build-system python-build-system)
18477 (propagated-inputs
18478 `(("python-jsonschema" ,python-jsonschema)
18479 ("python-pyyaml" ,python-pyyaml)
18480 ("python-six" ,python-six)))
18481 (home-page
18482 "https://github.com/Yelp/swagger_spec_validator")
18483 (synopsis "Validation of Swagger specifications")
18484 (description "@code{swagger_spec_validator} provides a library for
18485 validating Swagger API specifications.")
18486 (license license:asl2.0)))
18487
18488 (define-public python2-swagger-spec-validator
18489 (package-with-python2 python-swagger-spec-validator))
18490
18491 (define-public python-apache-libcloud
18492 (package
18493 (name "python-apache-libcloud")
18494 (version "3.1.0")
18495 (source
18496 (origin
18497 (method url-fetch)
18498 (uri (pypi-uri "apache-libcloud" version))
18499 (sha256
18500 (base32
18501 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
18502 (build-system python-build-system)
18503 (arguments
18504 `(#:phases
18505 (modify-phases %standard-phases
18506 (add-after 'unpack 'patch-ssh
18507 (lambda* (#:key inputs #:allow-other-keys)
18508 (substitute* "libcloud/compute/ssh.py"
18509 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
18510 "/bin/ssh" "'")))
18511 #t))
18512 (add-after 'unpack 'patch-tests
18513 (lambda _
18514 (substitute* "libcloud/test/compute/test_ssh_client.py"
18515 (("class ShellOutSSHClientTests")
18516 "@unittest.skip(\"Guix container doesn't have ssh service\")
18517 class ShellOutSSHClientTests"))
18518 #t))
18519 (add-before 'check 'copy-secret
18520 (lambda _
18521 (copy-file "libcloud/test/secrets.py-dist"
18522 "libcloud/test/secrets.py")
18523 #t)))))
18524 (inputs
18525 `(("openssh" ,openssh)))
18526 (propagated-inputs
18527 `(("python-paramiko" ,python-paramiko)
18528 ("python-requests" ,python-requests)))
18529 (native-inputs
18530 `(("python-lockfile" ,python-lockfile)
18531 ("python-mock" ,python-mock)
18532 ("python-pytest" ,python-pytest)
18533 ("python-pytest-runner" ,python-pytest-runner)
18534 ("python-requests-mock" ,python-requests-mock)))
18535 (home-page "https://libcloud.apache.org/")
18536 (synopsis "Unified Cloud API")
18537 (description "@code{libcloud} is a Python library for interacting with
18538 many of the popular cloud service providers using a unified API.")
18539 (license license:asl2.0)))
18540
18541 (define-public python-smmap
18542 (package
18543 (name "python-smmap")
18544 (version "3.0.1")
18545 (source
18546 (origin
18547 (method url-fetch)
18548 (uri (pypi-uri "smmap" version))
18549 (sha256
18550 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
18551 (build-system python-build-system)
18552 (native-inputs
18553 `(("python-nosexcover" ,python-nosexcover)))
18554 (home-page "https://github.com/Byron/smmap")
18555 (synopsis "Python sliding window memory map manager")
18556 (description "@code{smmap} is a pure Python implementation of a sliding
18557 window memory map manager.")
18558 (license license:bsd-3)))
18559
18560 (define-public python-smmap2
18561 (deprecated-package "python-smmap2" python-smmap))
18562
18563 (define-public python2-smmap
18564 (package-with-python2 python-smmap))
18565
18566 (define-public python2-smmap2
18567 (deprecated-package "python2-smmap2" python2-smmap))
18568
18569 (define-public python-regex
18570 (package
18571 (name "python-regex")
18572 (version "2020.6.8")
18573 (source (origin
18574 (method url-fetch)
18575 (uri (pypi-uri "regex" version))
18576 (sha256
18577 (base32
18578 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
18579 (build-system python-build-system)
18580 (arguments
18581 '(#:phases
18582 (modify-phases %standard-phases
18583 (replace 'check
18584 (lambda* (#:key inputs outputs #:allow-other-keys)
18585 (add-installed-pythonpath inputs outputs)
18586 (invoke "python" "-c"
18587 "from regex.test_regex import test_main; test_main()"))))))
18588 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
18589 (synopsis "Alternative regular expression module")
18590 (description "This regular expression implementation is backwards-
18591 compatible with the standard @code{re} module, but offers additional
18592 functionality like full case-folding for case-insensitive matches in Unicode.")
18593 (license license:psfl)))
18594
18595 (define-public python2-regex
18596 (package-with-python2 python-regex))
18597
18598 (define-public python-pyopengl
18599 (package
18600 (name "python-pyopengl")
18601 (version "3.1.5")
18602 (source
18603 (origin
18604 (method url-fetch)
18605 (uri (pypi-uri "PyOpenGL" version))
18606 (sha256
18607 (base32
18608 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
18609 (build-system python-build-system)
18610 (inputs
18611 `(("mesa" ,mesa)
18612 ("freeglut" ,freeglut)
18613 ("glu" ,glu)))
18614 (arguments
18615 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
18616 ;attribute 'OSMesa'
18617 #:phases
18618 (modify-phases %standard-phases
18619 (add-before 'build 'fix-paths
18620 (lambda* (#:key inputs outputs #:allow-other-keys)
18621 (substitute* '("OpenGL/platform/ctypesloader.py")
18622 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
18623 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
18624 (("'GL'")
18625 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
18626 (("'GLU'")
18627 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
18628 (("'glut',")
18629 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
18630 (("'GLESv1_CM'")
18631 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
18632 (("'GLESv2'")
18633 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
18634 ;; Not providing libgle. It seems to be very old.
18635 #t)))))
18636 (home-page "http://pyopengl.sourceforge.net")
18637 (synopsis "Standard OpenGL bindings for Python")
18638 (description
18639 "PyOpenGL is the most common cross platform Python binding to OpenGL and
18640 related APIs. The binding is created using the standard @code{ctypes}
18641 library.")
18642 (license license:bsd-3)))
18643
18644 (define-public python-pyopengl-accelerate
18645 (package
18646 (inherit python-pyopengl)
18647 (name "python-pyopengl-accelerate")
18648 (version "3.1.5")
18649 (source
18650 (origin
18651 (method url-fetch)
18652 (uri (pypi-uri "PyOpenGL-accelerate" version))
18653 (sha256
18654 (base32
18655 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
18656 (inputs
18657 `(("mesa" ,mesa)
18658 ("python-numpy" ,python-numpy))) ; for cython module
18659 ; numpy_formathandler, thus not propagated
18660 (arguments
18661 `(#:tests? #f
18662 #:phases
18663 (modify-phases %standard-phases
18664 (delete 'fix-paths))))
18665 (synopsis "Acceleration code for PyOpenGL")
18666 (description
18667 "This is the Cython-coded accelerator module for PyOpenGL.")))
18668
18669 (define-public python-rencode
18670 (package
18671 (name "python-rencode")
18672 (version "1.0.5")
18673 (source
18674 (origin
18675 (method url-fetch)
18676 (uri (pypi-uri "rencode" version))
18677 (sha256
18678 (base32
18679 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
18680 (build-system python-build-system)
18681 (arguments
18682 `(#:phases
18683 (modify-phases %standard-phases
18684 (add-before 'check 'delete-bogus-test
18685 ;; This test requires /home/aresch/Downloads, which is not provided by
18686 ;; the build environment.
18687 (lambda _
18688 (delete-file "rencode/t.py")
18689 #t)))))
18690 (native-inputs `(("pkg-config" ,pkg-config)
18691 ("python-cython" ,python-cython)))
18692 (home-page "https://github.com/aresch/rencode")
18693 (synopsis "Serialization of heterogeneous data structures")
18694 (description
18695 "The @code{rencode} module is a data structure serialization library,
18696 similar to @code{bencode} from the BitTorrent project. For complex,
18697 heterogeneous data structures with many small elements, r-encoding stake up
18698 significantly less space than b-encodings. This version of rencode is a
18699 complete rewrite in Cython to attempt to increase the performance over the
18700 pure Python module.")
18701 (license license:bsd-3)))
18702
18703 (define-public python2-rencode
18704 (package-with-python2 python-rencode))
18705
18706 (define-public python-xenon
18707 (package
18708 (name "python-xenon")
18709 (version "0.7.0")
18710 (source
18711 (origin
18712 (method url-fetch)
18713 (uri (pypi-uri "xenon" version))
18714 (sha256
18715 (base32
18716 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
18717 (build-system python-build-system)
18718 (native-inputs
18719 `(("python-pyyaml" ,python-pyyaml)
18720 ("python-radon" ,python-radon)
18721 ("python-requests" ,python-requests)
18722 ("python-flake8" ,python-flake8)
18723 ("python-tox" ,python-tox)))
18724 (arguments
18725 `(#:tests? #f ;test suite not shipped with the PyPI archive
18726 #:phases
18727 (modify-phases %standard-phases
18728 (add-before 'build 'patch-test-requirements
18729 (lambda _
18730 ;; Remove httpretty dependency for tests.
18731 (substitute* "setup.py"
18732 (("httpretty") ""))
18733 #t)))))
18734 (home-page "https://xenon.readthedocs.org/")
18735 (synopsis "Monitor code metrics for Python on your CI server")
18736 (description
18737 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
18738 Ideally, @code{xenon} is run every time code is committed. Through command
18739 line options, various thresholds can be set for the complexity of code. It
18740 will fail (i.e. it will exit with a non-zero exit code) when any of these
18741 requirements is not met.")
18742 (license license:expat)))
18743
18744 (define-public python-pysocks
18745 (package
18746 (name "python-pysocks")
18747 (version "1.7.1")
18748 (source
18749 (origin
18750 (method url-fetch)
18751 (uri (pypi-uri "PySocks" version))
18752 (sha256
18753 (base32
18754 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
18755 (build-system python-build-system)
18756 (arguments `(#:tests? #f))
18757 (home-page "https://github.com/Anorov/PySocks")
18758 (synopsis "SOCKS client module")
18759 (description "@code{pysocks} is an updated and semi-actively maintained
18760 version of @code{SocksiPy} with bug fixes and extra features.")
18761 (license license:bsd-3)))
18762
18763 (define-public python2-pysocks
18764 (package-with-python2 python-pysocks))
18765
18766 (define-public python-pydiff
18767 (package
18768 (name "python-pydiff")
18769 (version "0.2")
18770 (source
18771 (origin
18772 (method url-fetch)
18773 (uri (pypi-uri "pydiff" version))
18774 (sha256
18775 (base32
18776 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
18777 (build-system python-build-system)
18778 (home-page "https://github.com/myint/pydiff")
18779 (synopsis "Library to diff two Python files at the bytecode level")
18780 (description
18781 "@code{pydiff} makes it easy to look for actual code changes while
18782 ignoring formatting changes.")
18783 (license license:expat)))
18784
18785 (define-public python2-pydiff
18786 (package-with-python2 python-pydiff))
18787
18788 (define-public python-pydub
18789 (package
18790 (name "python-pydub")
18791 (version "0.24.1")
18792 (source
18793 (origin
18794 (method url-fetch)
18795 (uri (pypi-uri "pydub" version))
18796 (sha256
18797 (base32
18798 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
18799 (build-system python-build-system)
18800 (arguments
18801 `(#:phases
18802 (modify-phases %standard-phases
18803 (add-after 'unpack 'fix-ffmpeg-path
18804 (lambda* (#:key inputs #:allow-other-keys)
18805 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
18806 (substitute* '("pydub/utils.py")
18807 (("return \"ffmpeg\"")
18808 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
18809 (("return \"ffplay\"")
18810 (string-append "return \"" ffmpeg "/bin/ffplay\""))
18811 (("return \"ffprobe\"")
18812 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
18813 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
18814 #t))))))
18815 (home-page "https://pydub.com")
18816 (inputs
18817 `(("ffmpeg" ,ffmpeg)))
18818 (propagated-inputs
18819 `(("python-scipy" ,python-scipy)))
18820 (synopsis "Manipulate audio with a high level interface in Python")
18821 (description
18822 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
18823 @code{ffmpeg} to open various audio formats.")
18824 (license license:expat))) ; MIT license
18825
18826 (define-public python-tqdm
18827 (package
18828 (name "python-tqdm")
18829 (version "4.43.0")
18830 (source
18831 (origin
18832 (method url-fetch)
18833 (uri (pypi-uri "tqdm" version))
18834 (sha256
18835 (base32
18836 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
18837 (build-system python-build-system)
18838 (arguments
18839 '(#:phases (modify-phases %standard-phases
18840 (replace 'check
18841 (lambda* (#:key inputs outputs #:allow-other-keys)
18842 (add-installed-pythonpath inputs outputs)
18843 ;; This invokation is taken from tox.ini.
18844 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
18845 "-d" "-v" "tqdm/"))))))
18846 (native-inputs
18847 `(("python-nose" ,python-nose)))
18848 (home-page "https://github.com/tqdm/tqdm")
18849 (synopsis "Fast, extensible progress meter")
18850 (description
18851 "Make loops show a progress bar on the console by just wrapping any
18852 iterable with @code{|tqdm(iterable)|}. Offers many options to define
18853 design and layout.")
18854 (license (list license:mpl2.0 license:expat))))
18855
18856 (define-public python2-tqdm
18857 (package-with-python2 python-tqdm))
18858
18859 (define-public python-pkginfo
18860 (package
18861 (name "python-pkginfo")
18862 (version "1.7.0")
18863 (source
18864 (origin
18865 (method url-fetch)
18866 (uri (pypi-uri "pkginfo" version))
18867 (sha256
18868 (base32
18869 "1d1xn1xmfvz0jr3pj8irdwnwby3r13g0r2gwklr1q5y68p5p16h2"))))
18870 (build-system python-build-system)
18871 (arguments
18872 `(#:phases
18873 (modify-phases %standard-phases
18874 (add-before 'check 'patch-tests
18875 (lambda _
18876 (substitute* "pkginfo/tests/test_installed.py"
18877 (("test_ctor_w_package_no_PKG_INFO")
18878 "_test_ctor_w_package_no_PKG_INFO"))
18879 #t)))))
18880 (home-page
18881 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
18882 (synopsis
18883 "Query metadatdata from sdists, bdists, and installed packages")
18884 (description
18885 "API to query the distutils metadata written in @file{PKG-INFO} inside a
18886 source distriubtion (an sdist) or a binary distribution (e.g., created by
18887 running bdist_egg). It can also query the EGG-INFO directory of an installed
18888 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
18889 created by running @code{python setup.py develop}).")
18890 (license license:expat)))
18891
18892 (define-public python2-pkginfo
18893 (package-with-python2 python-pkginfo))
18894
18895 (define-public python-twine
18896 (package
18897 (name "python-twine")
18898 (version "1.15.0")
18899 (source
18900 (origin
18901 (method url-fetch)
18902 (uri (pypi-uri "twine" version))
18903 (sha256
18904 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
18905 (build-system python-build-system)
18906 (propagated-inputs
18907 `(("python-tqdm" ,python-tqdm)
18908 ("python-packaging" ,python-packaging)
18909 ("python-pkginfo" ,python-pkginfo)
18910 ("python-readme-renderer" ,python-readme-renderer)
18911 ("python-requests" ,python-requests)
18912 ("python-requests-toolbelt" ,python-requests-toolbelt)))
18913 (home-page "https://github.com/pypa/twine")
18914 (synopsis "Collection of utilities for interacting with PyPI")
18915 (description
18916 "@code{twine} currently supports registering projects and uploading
18917 distributions. It authenticates the user over HTTPS, allows them to pre-sign
18918 their files and supports any packaging format (including wheels).")
18919 (license license:asl2.0)))
18920
18921 (define-public python2-twine
18922 (package-with-python2 python-twine))
18923
18924 (define-public python-linecache2
18925 (package
18926 (name "python-linecache2")
18927 (version "1.0.0")
18928 (source
18929 (origin
18930 (method url-fetch)
18931 (uri (pypi-uri "linecache2" version))
18932 (sha256
18933 (base32
18934 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
18935 (build-system python-build-system)
18936 (arguments
18937 `(;; The tests depend on unittest2, and our version is a bit too old.
18938 #:tests? #f))
18939 (native-inputs
18940 `(("python-pbr" ,python-pbr-minimal)))
18941 (home-page
18942 "https://github.com/testing-cabal/linecache2")
18943 (synopsis "Backports of the linecache module")
18944 (description
18945 "The linecache module allows one to get any line from any file, while
18946 attempting to optimize internally, using a cache, the common case where many
18947 lines are read from a single file.")
18948 (license license:psfl)))
18949
18950 (define-public python2-linecache2
18951 (package-with-python2 python-linecache2))
18952
18953 (define-public python-traceback2
18954 (package
18955 (name "python-traceback2")
18956 (version "1.4.0")
18957 (source
18958 (origin
18959 (method url-fetch)
18960 (uri (pypi-uri "traceback2" version))
18961 (sha256
18962 (base32
18963 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
18964 (build-system python-build-system)
18965 (arguments
18966 `(;; python-traceback2 and python-unittest2 depend on one another.
18967 #:tests? #f))
18968 (native-inputs
18969 `(("python-pbr" ,python-pbr-minimal)))
18970 (propagated-inputs
18971 `(("python-linecache2" ,python-linecache2)))
18972 (home-page
18973 "https://github.com/testing-cabal/traceback2")
18974 (synopsis "Backports of the traceback module")
18975 (description
18976 "This module provides a standard interface to extract, format and print
18977 stack traces of Python programs. It exactly mimics the behavior of the Python
18978 interpreter when it prints a stack trace.")
18979 (license license:psfl)))
18980
18981 (define-public python2-traceback2
18982 (package-with-python2 python-traceback2))
18983
18984 (define-public python-ratelimiter
18985 (package
18986 (name "python-ratelimiter")
18987 (version "1.2.0")
18988 (source
18989 (origin
18990 (method url-fetch)
18991 (uri (pypi-uri "ratelimiter" version))
18992 (sha256
18993 (base32
18994 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
18995 (build-system python-build-system)
18996 (arguments
18997 '(#:tests? #f)) ; There are no tests in the pypi archive.
18998 (home-page "https://github.com/RazerM/ratelimiter")
18999 (synopsis "Simple rate limiting object")
19000 (description
19001 "The @code{ratelimiter} module ensures that an operation will not be
19002 executed more than a given number of times during a given period.")
19003 (license license:asl2.0)))
19004
19005 (define-public python2-ratelimiter
19006 (package-with-python2 python-ratelimiter))
19007
19008 (define-public python-dukpy
19009 (package
19010 (name "python-dukpy")
19011 (version "0.3")
19012 (source
19013 (origin
19014 (method git-fetch)
19015 (uri (git-reference
19016 (url "https://github.com/kovidgoyal/dukpy")
19017 (commit (string-append "v" version))))
19018 (file-name (git-file-name name version))
19019 (sha256
19020 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
19021 (build-system python-build-system)
19022 (home-page "https://github.com/kovidgoyal/dukpy")
19023 (synopsis "Run JavaScript in python")
19024 (description
19025 "dukpy is a JavaScript runtime environment for Python using the duktape
19026 embeddable JavaScript engine.")
19027 ;; Dukpy is licensed under MIT like the embedded duktape library,
19028 ;; with 'errors.c' as GPL3.
19029 (license (list license:expat license:gpl3))))
19030
19031 (define-public python2-dukpy
19032 (package-with-python2 python-dukpy))
19033
19034 (define-public python-jsonrpclib-pelix
19035 (package
19036 (name "python-jsonrpclib-pelix")
19037 (version "0.3.2")
19038 (source
19039 (origin
19040 (method url-fetch)
19041 (uri (pypi-uri "jsonrpclib-pelix" version))
19042 (sha256
19043 (base32
19044 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
19045 (build-system python-build-system)
19046 (arguments
19047 `(#:tests? #f)) ; no tests in PyPI tarball
19048 (home-page "https://github.com/tcalmant/jsonrpclib/")
19049 (synopsis "JSON-RPC 2.0 client library for Python")
19050 (description
19051 "This library implements the JSON-RPC v2.0
19052 specification (backwards-compatible) as a client library for Python. This
19053 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
19054 services.")
19055 (license license:asl2.0)))
19056
19057 (define-public python2-jsonrpclib-pelix
19058 (package-with-python2 python-jsonrpclib-pelix))
19059
19060 (define-public python-setuptools-scm-git-archive
19061 (package
19062 (name "python-setuptools-scm-git-archive")
19063 (version "1.0")
19064 (source
19065 (origin
19066 (method url-fetch)
19067 (uri (pypi-uri "setuptools_scm_git_archive" version))
19068 (sha256
19069 (base32
19070 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
19071 (build-system python-build-system)
19072 (native-inputs
19073 `(("python-pytest" ,python-pytest)))
19074 (propagated-inputs
19075 `(("python-setuptools-scm" ,python-setuptools-scm)))
19076 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
19077 (synopsis "Setuptools_scm plugin for git archives")
19078 (description
19079 "The setuptools_scm_git_archive package is a plugin to
19080 setuptools_scm, which supports obtaining versions from git archives that
19081 belong to tagged versions.")
19082 (license license:expat)))
19083
19084 (define-public python2-setuptools-scm-git-archive
19085 (package-with-python2 python-setuptools-scm-git-archive))
19086
19087 (define-public python-setuptools-git
19088 (package
19089 (name "python-setuptools-git")
19090 (version "1.2")
19091 (source
19092 (origin
19093 (method url-fetch)
19094 (uri (pypi-uri "setuptools-git" version))
19095 (sha256
19096 (base32
19097 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
19098 (build-system python-build-system)
19099 (arguments
19100 `(#:phases
19101 (modify-phases %standard-phases
19102 ;; This is needed for tests.
19103 (add-after 'unpack 'configure-git
19104 (lambda _
19105 (setenv "HOME" "/tmp")
19106 (invoke "git" "config" "--global" "user.email" "guix")
19107 (invoke "git" "config" "--global" "user.name" "guix")
19108 #t)))))
19109 (native-inputs
19110 `(("git" ,git-minimal)))
19111 (home-page "https://github.com/msabramo/setuptools-git")
19112 (synopsis "Setuptools revision control system plugin for Git")
19113 (description
19114 "This package provides a plugin for Setuptools for revision control with
19115 Git.")
19116 (license license:bsd-3)))
19117
19118 (define-public python-pyclipper
19119 (package
19120 (name "python-pyclipper")
19121 (version "1.1.0.post3")
19122 (source
19123 (origin
19124 (method url-fetch)
19125 (uri (pypi-uri "pyclipper" version ".zip"))
19126 (sha256
19127 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
19128 (modules '((guix build utils)))
19129 (snippet
19130 '(begin
19131 ;; This file is generated by Cython.
19132 (delete-file "pyclipper/pyclipper.cpp") #t))))
19133 (build-system python-build-system)
19134 (arguments
19135 `(#:phases
19136 (modify-phases %standard-phases
19137 (add-before 'build 'cythonize-sources
19138 (lambda _
19139 (with-directory-excursion "pyclipper"
19140 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
19141 (propagated-inputs
19142 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
19143 (native-inputs
19144 `(("python-cython" ,python-cython)
19145 ("python-pytest" ,python-pytest)
19146 ("python-pytest-runner" ,python-pytest-runner)
19147 ("python-unittest2" ,python-unittest2)
19148 ("unzip" ,unzip)))
19149 (home-page "https://github.com/greginvm/pyclipper")
19150 (synopsis "Wrapper for Angus Johnson's Clipper library")
19151 (description
19152 "Pyclipper is a Cython wrapper for the C++ translation of the
19153 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
19154 (license license:expat)))
19155
19156 (define-public python2-pyclipper
19157 (package-with-python2 python-pyclipper))
19158
19159 (define-public python2-booleanoperations
19160 (package
19161 (name "python2-booleanoperations")
19162 (version "0.7.1")
19163 (source
19164 (origin
19165 (method url-fetch)
19166 (uri (pypi-uri "booleanOperations" version ".zip"))
19167 (sha256
19168 (base32
19169 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
19170 (build-system python-build-system)
19171 (arguments
19172 `(#:python ,python-2))
19173 (native-inputs
19174 `(("unzip" ,unzip)
19175 ("python2-pytest" ,python2-pytest)
19176 ("python2-pytest-runner" ,python2-pytest-runner)))
19177 (propagated-inputs
19178 `(("python-fonttools" ,python2-fonttools)
19179 ("python-pyclipper" ,python2-pyclipper)
19180 ("python-ufolib" ,python2-ufolib)))
19181 (home-page "https://github.com/typemytype/booleanOperations")
19182 (synopsis "Boolean operations on paths")
19183 (description
19184 "BooleanOperations provides a Python library that enables
19185 boolean operations on paths.")
19186 (license license:expat)))
19187
19188 (define-public python-tempdir
19189 (package
19190 (name "python-tempdir")
19191 (version "0.7.1")
19192 (source
19193 (origin
19194 (method url-fetch)
19195 (uri (pypi-uri "tempdir" version))
19196 (sha256
19197 (base32
19198 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
19199 (build-system python-build-system)
19200 (home-page "https://pypi.org/project/tempdir/")
19201 (arguments
19202 ;; the package has no tests
19203 '(#:tests? #f))
19204 (synopsis "Python library for managing temporary directories")
19205 (description
19206 "This library manages temporary directories that are automatically
19207 deleted with all their contents when they are no longer needed. It is
19208 particularly convenient for use in tests.")
19209 (license license:expat)))
19210
19211 (define-public python2-tempdir
19212 (package-with-python2 python-tempdir))
19213
19214 (define-public python-activepapers
19215 (package
19216 (name "python-activepapers")
19217 (version "0.2.2")
19218 (source
19219 (origin
19220 (method url-fetch)
19221 (uri (pypi-uri "ActivePapers.Py" version))
19222 (sha256
19223 (base32
19224 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
19225 (build-system python-build-system)
19226 (arguments
19227 `(#:modules ((ice-9 ftw)
19228 (srfi srfi-1)
19229 (guix build utils)
19230 (guix build python-build-system))
19231
19232 #:phases
19233 (modify-phases %standard-phases
19234 (add-after 'unpack 'delete-python2-code
19235 (lambda _
19236 (for-each delete-file
19237 '("lib/activepapers/builtins2.py"
19238 "lib/activepapers/standardlib2.py"
19239 "lib/activepapers/utility2.py"))))
19240 (replace 'check
19241 (lambda _
19242 ;; Deactivate the test cases that download files
19243 (setenv "NO_NETWORK_ACCESS" "1")
19244 ;; For some strange reason, some tests fail if nosetests runs all
19245 ;; test modules in a single execution. They pass if each test
19246 ;; module is run individually.
19247 (for-each (lambda (filename)
19248 (invoke "nosetests"
19249 (string-append "tests/" filename)))
19250 (scandir "tests"
19251 (lambda (filename)
19252 (string-suffix? ".py" filename)))))))))
19253 (native-inputs
19254 `(("python-tempdir" ,python-tempdir)
19255 ("python-nose" ,python-nose)))
19256 (propagated-inputs
19257 `(("python-h5py" ,python-h5py)))
19258 (home-page "https://www.activepapers.org/")
19259 (synopsis "Executable papers for scientific computing")
19260 (description
19261 "ActivePapers is a tool for working with executable papers, which
19262 combine data, code, and documentation in single-file packages,
19263 suitable for publication as supplementary material or on repositories
19264 such as figshare or Zenodo.")
19265 (properties `((python2-variant . ,(delay python2-activepapers))))
19266 (license license:bsd-3)))
19267
19268 (define-public python2-activepapers
19269 (let ((base (package-with-python2
19270 (strip-python2-variant python-activepapers))))
19271 (package/inherit base
19272 (arguments
19273 (substitute-keyword-arguments (package-arguments base)
19274 ((#:phases phases)
19275 `(modify-phases ,phases
19276 (delete 'delete-python2-code)
19277 (add-after 'unpack 'delete-python3-code
19278 (lambda _
19279 (for-each delete-file
19280 '("lib/activepapers/builtins3.py"
19281 "lib/activepapers/standardlib3.py"
19282 "lib/activepapers/utility3.py")))))))))))
19283
19284 (define-public python-semver
19285 (package
19286 (name "python-semver")
19287 (version "2.9.0")
19288 (source
19289 (origin
19290 (method url-fetch)
19291 (uri (pypi-uri "semver" version))
19292 (sha256
19293 (base32
19294 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
19295 (build-system python-build-system)
19296 (arguments
19297 `(#:phases (modify-phases %standard-phases
19298 (replace 'check
19299 (lambda _
19300 (delete-file "setup.cfg")
19301 (invoke "py.test"))))))
19302 (native-inputs
19303 `(("python-pytest" ,python-pytest)))
19304 (home-page "https://github.com/k-bx/python-semver")
19305 (synopsis "Python helper for Semantic Versioning")
19306 (description "This package provides a Python library for
19307 @url{Semantic Versioning, http://semver.org/}.")
19308 (license license:bsd-3)))
19309
19310 (define-public python2-semver
19311 (package-with-python2 python-semver))
19312
19313 (define-public python-pyro4
19314 (package
19315 (name "python-pyro4")
19316 (version "4.77")
19317 (source
19318 (origin
19319 (method url-fetch)
19320 (uri (pypi-uri "Pyro4" version))
19321 (sha256
19322 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
19323 (build-system python-build-system)
19324 (arguments
19325 '(#:tests? #f)) ;FIXME: Some tests require network access.
19326 (native-inputs
19327 `(("python-cloudpickle" ,python-cloudpickle)
19328 ("python-dill" ,python-dill)
19329 ("python-msgpack" ,python-msgpack)))
19330 (propagated-inputs
19331 `(("python-serpent" ,python-serpent)))
19332 (home-page "https://pyro4.readthedocs.io")
19333 (synopsis "Distributed object middleware for Python")
19334 (description
19335 "Pyro enables you to build applications in which objects can talk to each
19336 other over the network. You can just use normal Python method calls to call
19337 objects on other machines, also known as remote procedure calls (RPC).")
19338 (license license:expat)))
19339
19340 (define-public python2-pyro
19341 (package
19342 (name "python2-pyro")
19343 (version "3.16")
19344 (source
19345 (origin
19346 (method url-fetch)
19347 (uri (pypi-uri "Pyro" version))
19348 (file-name (string-append "Pyro-" version ".tar.gz"))
19349 (sha256
19350 (base32
19351 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
19352 (build-system python-build-system)
19353 (arguments
19354 ;; Pyro is not compatible with Python 3
19355 `(#:python ,python-2
19356 ;; Pyro has no test cases for automatic execution
19357 #:tests? #f))
19358 (home-page "https://pythonhosted.org/Pyro/")
19359 (synopsis "Distributed object manager for Python")
19360 (description "Pyro is a Distributed Object Technology system
19361 written in Python that is designed to be easy to use. It resembles
19362 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
19363 which is a system and language independent Distributed Object Technology
19364 and has much more to offer than Pyro or RMI. Pyro 3.x is no
19365 longer maintained. New projects should use Pyro4 instead, which
19366 is the new Pyro version that is actively developed.")
19367 (license license:expat)))
19368
19369 (define-public python2-scientific
19370 (package
19371 (name "python2-scientific")
19372 (version "2.9.4")
19373 (source
19374 (origin
19375 (method git-fetch)
19376 (uri (git-reference
19377 (url "https://github.com/khinsen/ScientificPython")
19378 (commit (string-append "rel" version))))
19379 (file-name (git-file-name name version))
19380 (sha256
19381 (base32
19382 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
19383 (build-system python-build-system)
19384 (inputs
19385 `(("netcdf" ,netcdf)))
19386 (propagated-inputs
19387 `(("python-numpy" ,python2-numpy-1.8)
19388 ("python-pyro" ,python2-pyro)))
19389 (arguments
19390 ;; ScientificPython is not compatible with Python 3
19391 `(#:python ,python-2
19392 #:tests? #f ; No test suite
19393 #:phases
19394 (modify-phases %standard-phases
19395 (replace 'build
19396 (lambda* (#:key inputs #:allow-other-keys)
19397 (invoke "python" "setup.py" "build"
19398 (string-append "--netcdf_prefix="
19399 (assoc-ref inputs "netcdf"))))))))
19400 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
19401 (synopsis "Python modules for scientific computing")
19402 (description "ScientificPython is a collection of Python modules that are
19403 useful for scientific computing. Most modules are rather general (Geometry,
19404 physical units, automatic derivatives, ...) whereas others are more
19405 domain-specific (e.g. netCDF and PDB support). The library is currently
19406 not actively maintained and works only with Python 2 and NumPy < 1.9.")
19407 (license license:cecill-c)))
19408
19409 (define-public python2-mmtk
19410 (package
19411 (name "python2-mmtk")
19412 (version "2.7.12")
19413 (source
19414 (origin
19415 (method git-fetch)
19416 (uri (git-reference
19417 (url "https://github.com/khinsen/MMTK")
19418 (commit (string-append "rel" version))))
19419 (file-name (git-file-name name version))
19420 (sha256
19421 (base32
19422 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
19423 (build-system python-build-system)
19424 (native-inputs
19425 `(("netcdf" ,netcdf)))
19426 (propagated-inputs
19427 `(("python-scientific" ,python2-scientific)
19428 ("python-tkinter" ,python-2 "tk")))
19429 (arguments
19430 `(#:python ,python-2
19431 #:tests? #f
19432 #:phases
19433 (modify-phases %standard-phases
19434 (add-before 'build 'includes-from-scientific
19435 (lambda* (#:key inputs #:allow-other-keys)
19436 (mkdir-p "Include/Scientific")
19437 (copy-recursively
19438 (string-append
19439 (assoc-ref inputs "python-scientific")
19440 "/include/python2.7/Scientific")
19441 "Include/Scientific"))))))
19442 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
19443 (synopsis "Python library for molecular simulation")
19444 (description "MMTK is a library for molecular simulations with an emphasis
19445 on biomolecules. It provides widely used methods such as Molecular Dynamics
19446 and normal mode analysis, but also basic routines for implementing new methods
19447 for simulation and analysis. The library is currently not actively maintained
19448 and works only with Python 2 and NumPy < 1.9.")
19449 (license license:cecill-c)))
19450
19451 (define-public python-phonenumbers
19452 (package
19453 (name "python-phonenumbers")
19454 (version "8.9.1")
19455 (source
19456 (origin
19457 (method url-fetch)
19458 (uri (pypi-uri "phonenumbers" version))
19459 (sha256
19460 (base32
19461 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
19462 (build-system python-build-system)
19463 (home-page
19464 "https://github.com/daviddrysdale/python-phonenumbers")
19465 (synopsis
19466 "Python library for dealing with international phone numbers")
19467 (description
19468 "This package provides a Python port of Google's libphonenumber library.")
19469 (license license:asl2.0)))
19470
19471 (define-public python2-phonenumbers
19472 (package-with-python2 python-phonenumbers))
19473
19474 (define-public python-send2trash
19475 (package
19476 (name "python-send2trash")
19477 (version "1.5.0")
19478 (source
19479 (origin (method git-fetch)
19480 ;; Source tarball on PyPI doesn't include tests.
19481 (uri (git-reference
19482 (url "https://github.com/hsoft/send2trash")
19483 (commit version)))
19484 (file-name (git-file-name name version))
19485 (sha256
19486 (base32
19487 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
19488 (build-system python-build-system)
19489 (arguments
19490 '(#:phases
19491 (modify-phases %standard-phases
19492 (add-before 'check 'pre-check
19493 (lambda _
19494 (mkdir-p "/tmp/foo")
19495 (setenv "HOME" "/tmp/foo")
19496 #t)))))
19497 (home-page "https://github.com/hsoft/send2trash")
19498 (synopsis "Send files to the user's @file{~/Trash} directory")
19499 (description "This package provides a Python library to send files to the
19500 user's @file{~/Trash} directory.")
19501 (properties `((python2-variant . ,(delay python2-send2trash))))
19502 (license license:bsd-3)))
19503
19504 (define-public python2-send2trash
19505 (let ((base (package-with-python2
19506 (strip-python2-variant python-send2trash))))
19507 (package/inherit base
19508 (arguments
19509 (substitute-keyword-arguments (package-arguments python-send2trash)
19510 ((#:phases phases)
19511 `(modify-phases ,phases
19512 (add-before 'check 'setenv
19513 (lambda _
19514 (setenv "PYTHONPATH"
19515 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
19516 #t)))))))))
19517
19518 (define-public python-pyfavicon
19519 (package
19520 (name "python-pyfavicon")
19521 (version "0.1.1")
19522 (source
19523 (origin
19524 (method url-fetch)
19525 (uri (pypi-uri "pyfavicon" version))
19526 (sha256
19527 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
19528 (build-system python-build-system)
19529 (arguments
19530 ;; There are no tests in the PyPI tarball and the tests from the
19531 ;; repository require online data.
19532 '(#:tests? #f))
19533 (propagated-inputs
19534 `(("python-aiohttp" ,python-aiohttp)
19535 ("python-beautifulsoup4" ,python-beautifulsoup4)
19536 ("python-pillow" ,python-pillow)))
19537 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
19538 (synopsis "Async favicon fetcher")
19539 (description
19540 "@code{pyfavicon} is an async favicon fetcher.")
19541 (license license:expat)))
19542
19543 (define-public python-yamllint
19544 (package
19545 (name "python-yamllint")
19546 (version "1.26.1")
19547 (source
19548 (origin
19549 (method url-fetch)
19550 (uri (pypi-uri "yamllint" version))
19551 (sha256
19552 (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
19553 (build-system python-build-system)
19554 (propagated-inputs
19555 `(("python-pathspec" ,python-pathspec)
19556 ("python-pyyaml" ,python-pyyaml)
19557 ("python-setuptools" ,python-setuptools)))
19558 (home-page "https://github.com/adrienverge/yamllint")
19559 (synopsis "Linter for YAML files")
19560 (description
19561 "Yamllint is a linter for YAML files. yamllint does not only check for
19562 syntax validity, but for weirdnesses like key repetition and cosmetic problems
19563 such as lines length, trailing spaces, indentation, etc.")
19564 (license license:gpl3+)))
19565
19566 (define-public python-yapf
19567 (package
19568 (name "python-yapf")
19569 (version "0.29.0")
19570 (source
19571 (origin
19572 (method url-fetch)
19573 (uri (pypi-uri "yapf" version))
19574 (sha256
19575 (base32
19576 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
19577 (build-system python-build-system)
19578 (home-page "https://github.com/google/yapf")
19579 (synopsis "Formatter for Python code")
19580 (description "YAPF is a formatter for Python code. It's based off of
19581 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
19582 takes the code and reformats it to the best formatting that conforms to the
19583 style guide, even if the original code didn't violate the style guide.")
19584 (license license:asl2.0)))
19585
19586 (define-public python2-yapf
19587 (package-with-python2 python-yapf))
19588
19589 (define-public python-yq
19590 (package
19591 (name "python-yq")
19592 (version "2.11.1")
19593 (source
19594 (origin
19595 (method url-fetch)
19596 (uri (pypi-uri "yq" version))
19597 (sha256
19598 (base32
19599 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
19600 (build-system python-build-system)
19601 (arguments
19602 '(#:phases
19603 (modify-phases %standard-phases
19604 (add-after 'unpack 'patch
19605 (lambda* (#:key inputs #:allow-other-keys)
19606 (substitute* "yq/__init__.py"
19607 (("Popen\\(\\[\"jq")
19608 (string-append
19609 "Popen([\""
19610 (assoc-ref inputs "jq")
19611 "/bin/jq")))
19612 #t)))))
19613 (inputs
19614 `(("python-argcomplete" ,python-argcomplete)
19615 ("python-pyyaml" ,python-pyyaml)
19616 ("python-xmltodict" ,python-xmltodict)
19617 ("jq" ,jq)))
19618 (native-inputs
19619 `(("python-coverage" ,python-coverage)
19620 ("python-flake8" ,python-flake8)
19621 ("python-wheel" ,python-wheel)))
19622 (home-page "https://github.com/kislyuk/yq")
19623 (synopsis "Command-line YAML/XML processor")
19624 (description
19625 "This package provides @command{yq} and @command{xq} for processing YAML
19626 and XML respectively. The processing is done through @command{jq}, @command{jq}
19627 filters can be used to process the data as it passes through.")
19628 (license license:asl2.0)))
19629
19630 (define-public python-gyp
19631 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
19632 (revision "0"))
19633 (package
19634 (name "python-gyp")
19635 ;; Google does not release versions,
19636 ;; based on second most recent commit date.
19637 (version (git-version "0.0.0" revision commit))
19638 (source
19639 (origin
19640 ;; Google does not release tarballs,
19641 ;; git checkout is needed.
19642 (method git-fetch)
19643 (uri (git-reference
19644 (url "https://chromium.googlesource.com/external/gyp")
19645 (commit commit)))
19646 (file-name (git-file-name name version))
19647 (sha256
19648 (base32
19649 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
19650 (build-system python-build-system)
19651 (home-page "https://gyp.gsrc.io/")
19652 (synopsis "GYP is a Meta-Build system")
19653 (description
19654 "GYP builds build systems for large, cross platform applications.
19655 It can be used to generate XCode projects, Visual Studio projects, Ninja build
19656 files, and Makefiles.")
19657 (license license:bsd-3))))
19658
19659 (define-public python2-gyp
19660 (package-with-python2 python-gyp))
19661
19662 (define-public python-whatever
19663 (package
19664 (name "python-whatever")
19665 (version "0.6")
19666 (source
19667 (origin
19668 (method git-fetch)
19669 (uri (git-reference
19670 (url "https://github.com/Suor/whatever")
19671 (commit version)))
19672 (file-name (git-file-name name version))
19673 (sha256
19674 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
19675 (build-system python-build-system)
19676 (arguments
19677 `(#:phases
19678 (modify-phases %standard-phases
19679 (replace 'check
19680 (lambda _
19681 (invoke "py.test"))))))
19682 (native-inputs
19683 `(("python-pytest" ,python-pytest)))
19684 (home-page "https://github.com/Suor/whatever")
19685 (synopsis "Make anonymous functions by partial application of operators")
19686 (description "@code{whatever} provides an easy way to make anonymous
19687 functions by partial application of operators.")
19688 (license license:bsd-3)))
19689
19690 (define-public python2-whatever
19691 (package-with-python2 python-whatever))
19692
19693 (define-public python-funcy
19694 (package
19695 (name "python-funcy")
19696 (version "1.11")
19697 (source
19698 (origin
19699 (method git-fetch)
19700 (uri (git-reference
19701 (url "https://github.com/Suor/funcy")
19702 (commit version)))
19703 (sha256
19704 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
19705 (file-name (git-file-name name version))))
19706 (build-system python-build-system)
19707 (arguments
19708 `(#:phases
19709 (modify-phases %standard-phases
19710 (replace 'check
19711 (lambda _
19712 (invoke "py.test"))))))
19713 (native-inputs
19714 `(("python-pytest" ,python-pytest)
19715 ("python-whatever" ,python-whatever)))
19716 (home-page "https://github.com/Suor/funcy")
19717 (synopsis "Functional tools")
19718 (description "@code{funcy} is a library that provides functional tools.
19719 Examples are:
19720 @enumerate
19721 @item merge - Merges collections of the same type
19722 @item walk - Type-preserving map
19723 @item select - Selects a part of a collection
19724 @item take - Takes the first n items of a collection
19725 @item first - Takes the first item of a collection
19726 @item remove - Predicated-removes items of a collection
19727 @item concat - Concatenates two collections
19728 @item flatten - Flattens a collection with subcollections
19729 @item distinct - Returns only distinct items
19730 @item split - Predicated-splits a collection
19731 @item split_at - Splits a collection at a given item
19732 @item group_by - Groups items by group
19733 @item pairwise - Pairs off adjacent items
19734 @item partial - Partially-applies a function
19735 @item curry - Curries a function
19736 @item compose - Composes functions
19737 @item complement - Complements a predicate
19738 @item all_fn - \"all\" with predicate
19739 @end enumerate")
19740 (license license:bsd-3)))
19741
19742 (define-public python2-funcy
19743 (package-with-python2 python-funcy))
19744
19745 (define-public python-isoweek
19746 (package
19747 (name "python-isoweek")
19748 (version "1.3.3")
19749 (source
19750 (origin
19751 (method url-fetch)
19752 (uri (pypi-uri "isoweek" version))
19753 (sha256
19754 (base32
19755 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
19756 (build-system python-build-system)
19757 (home-page "https://github.com/gisle/isoweek")
19758 (synopsis "Objects representing a week")
19759 (description "The @code{isoweek} module provide the class Week that
19760 implements the week definition of ISO 8601. This standard also defines
19761 a notation for identifying weeks; yyyyWww (where the W is a literal).
19762 Week instances stringify to this form.")
19763 (license license:bsd-3)))
19764
19765 (define-public python2-isoweek
19766 (package-with-python2 python-isoweek))
19767
19768 (define-public python-pyzbar
19769 (package
19770 (name "python-pyzbar")
19771 (version "0.1.8")
19772 (source
19773 (origin
19774 ;; There's no source tarball on PyPI.
19775 (method git-fetch)
19776 (uri (git-reference
19777 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
19778 (commit (string-append "v" version))))
19779 (file-name (git-file-name name version))
19780 (sha256
19781 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
19782 (build-system python-build-system)
19783 (arguments
19784 `(#:phases
19785 (modify-phases %standard-phases
19786 (add-after 'unpack 'remove-failing-test
19787 (lambda _
19788 ;; This tests if find_library was called once, but we remove
19789 ;; the call in the stage below to make the library find libzbar.
19790 (delete-file "pyzbar/tests/test_zbar_library.py")
19791 #t))
19792 (add-before 'build 'set-library-file-name
19793 (lambda* (#:key inputs #:allow-other-keys)
19794 (let ((libzbar (assoc-ref inputs "zbar")))
19795 (substitute* "pyzbar/zbar_library.py"
19796 (("find_library\\('zbar'\\)")
19797 (string-append "'" libzbar "/lib/libzbar.so.0'")))
19798 #t))))))
19799 (native-inputs
19800 `(("pkg-config" ,pkg-config)
19801 ("python-numpy" ,python-numpy)
19802 ("python-pillow" ,python-pillow)))
19803 (inputs
19804 `(("zbar" ,zbar)))
19805 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
19806 (synopsis "Read one-dimensional barcodes and QR codes")
19807 (description
19808 "Read one-dimensional barcodes and QR codes using the zbar library.
19809
19810 Features:
19811
19812 @itemize
19813 @item Pure python
19814 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
19815 @item Decodes locations of barcodes
19816 @item No dependencies, other than the zbar library itself
19817 @end itemize")
19818 (license license:expat)))
19819
19820 (define-public python-tokenize-rt
19821 (package
19822 (name "python-tokenize-rt")
19823 (version "2.0.1")
19824 (source
19825 (origin
19826 (method url-fetch)
19827 (uri (pypi-uri "tokenize-rt" version))
19828 (sha256
19829 (base32
19830 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
19831 (build-system python-build-system)
19832 (home-page "https://github.com/asottile/tokenize-rt")
19833 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
19834 (description
19835 "This Python library is a wrapper around @code{tokenize} from the Python
19836 standard library. It provides two additional tokens @code{ESCAPED_NL} and
19837 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
19838 and @code{tokens_to_src} to roundtrip.")
19839 (license license:expat)))
19840
19841 (define-public python-future-fstrings
19842 (package
19843 (name "python-future-fstrings")
19844 (version "0.4.1")
19845 (source
19846 (origin
19847 (method url-fetch)
19848 (uri (pypi-uri "future_fstrings" version))
19849 (sha256
19850 (base32
19851 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
19852 (build-system python-build-system)
19853 (propagated-inputs
19854 `(("python-tokenize-rt" ,python-tokenize-rt)))
19855 (home-page "https://github.com/asottile/future-fstrings")
19856 (synopsis "Backport of fstrings to Python < 3.6")
19857 (description
19858 "This package provides a UTF-8 compatible encoding
19859 @code{future_fstrings}, which performs source manipulation. It decodes the
19860 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
19861 @code{f} strings.")
19862 (license license:expat)))
19863
19864 (define-public python-typed-ast
19865 (package
19866 (name "python-typed-ast")
19867 (version "1.4.0")
19868 (source
19869 (origin
19870 (method git-fetch)
19871 (uri (git-reference
19872 (url "https://github.com/python/typed_ast")
19873 (commit version)))
19874 (sha256
19875 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
19876 (file-name (git-file-name name version))))
19877 (build-system python-build-system)
19878 (arguments
19879 `(#:modules ((guix build utils)
19880 (guix build python-build-system)
19881 (ice-9 ftw)
19882 (srfi srfi-1)
19883 (srfi srfi-26))
19884 #:phases
19885 (modify-phases %standard-phases
19886 (replace 'check
19887 (lambda _
19888 (let ((cwd (getcwd)))
19889 (setenv "PYTHONPATH"
19890 (string-append cwd "/build/"
19891 (find (cut string-prefix? "lib" <>)
19892 (scandir (string-append cwd "/build")))
19893 ":"
19894 (getenv "PYTHONPATH"))))
19895 (invoke "pytest")
19896 #t)))))
19897 (native-inputs `(("python-pytest" ,python-pytest)))
19898 (home-page "https://github.com/python/typed_ast")
19899 (synopsis "Fork of Python @code{ast} modules with type comment support")
19900 (description "This package provides a parser similar to the standard
19901 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
19902 include PEP 484 type comments and are independent of the version of Python
19903 under which they are run. The @code{typed_ast} parsers produce the standard
19904 Python AST (plus type comments), and are both fast and correct, as they are
19905 based on the CPython 2.7 and 3.7 parsers.")
19906 ;; See the file "LICENSE" for the details.
19907 (license (list license:psfl
19908 license:asl2.0
19909 license:expat)))) ;ast27/Parser/spark.py
19910
19911 (define-public python-typer
19912 (package
19913 (name "python-typer")
19914 (version "0.3.2")
19915 (source
19916 (origin
19917 ;; Building `python-typer` from the git repository requires the `flit-core`
19918 ;; Python package that is not installed by `python-flit`.
19919 (method url-fetch)
19920 (uri (pypi-uri "typer" version))
19921 (sha256
19922 (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
19923 (build-system python-build-system)
19924 (arguments
19925 `(#:phases
19926 (modify-phases %standard-phases
19927 (add-before 'check 'disable-failing-tests
19928 (lambda _
19929 (substitute* "tests/test_completion/test_completion.py"
19930 (("def test_show_completion")
19931 "def _test_show_completion")
19932 (("def test_install_completion")
19933 "def _test_install_completion"))
19934 (substitute* "tests/test_completion/test_completion_install.py"
19935 (("def test_completion_install_bash")
19936 "def _test_completion_install_bash")
19937 (("def test_completion_install_zsh")
19938 "def _test_completion_install_zsh")
19939 (("def test_completion_install_fish")
19940 "def _test_completion_install_fish")
19941 (("def test_completion_install_powershell")
19942 "def _test_completion_install_powershell"))
19943 #t))
19944 (replace 'check
19945 (lambda _
19946 (setenv "PYTHONPATH"
19947 (string-append (getcwd) ":"
19948 (getenv "PYTHONPATH")))
19949 (invoke "python" "-m" "pytest" "tests/")
19950 #t)))))
19951 (propagated-inputs
19952 `(("python-click" ,python-click)))
19953 (native-inputs
19954 `(("python-coverage" ,python-coverage)
19955 ("python-pytest" ,python-pytest)
19956 ("python-shellingham" ,python-shellingham)))
19957 (home-page "https://github.com/tiangolo/typer")
19958 (synopsis
19959 "Typer builds CLI based on Python type hints")
19960 (description
19961 "Typer is a library for building CLI applications. It's based on
19962 Python 3.6+ type hints.")
19963 ;; MIT license
19964 (license license:expat)))
19965
19966 (define-public python-typing
19967 (package
19968 (name "python-typing")
19969 (version "3.7.4.3")
19970 (source
19971 (origin
19972 (method url-fetch)
19973 (uri (pypi-uri "typing" version))
19974 (sha256
19975 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
19976 (build-system python-build-system)
19977 (home-page "https://docs.python.org/3/library/typing.html")
19978 (synopsis "Type hints for Python")
19979 (description "This is a backport of the standard library @code{typing}
19980 module to Python versions older than 3.5. Typing defines a standard notation
19981 for Python function and variable type annotations. The notation can be used
19982 for documenting code in a concise, standard format, and it has been designed
19983 to also be used by static and runtime type checkers, static analyzers, IDEs
19984 and other tools.")
19985 (license license:psfl)))
19986
19987 (define-public python2-typing
19988 (package-with-python2 python-typing))
19989
19990 (define-public python-typing-extensions
19991 (package
19992 (name "python-typing-extensions")
19993 (version "3.7.4.3")
19994 (source
19995 (origin
19996 (method url-fetch)
19997 (uri (pypi-uri "typing_extensions" version))
19998 (sha256
19999 (base32
20000 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
20001 (build-system python-build-system)
20002 (home-page
20003 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
20004 (synopsis "Experimental type hints for Python")
20005 (description
20006 "The typing_extensions module contains additional @code{typing} hints not
20007 yet present in the of the @code{typing} standard library.
20008 Included are implementations of:
20009 @enumerate
20010 @item ClassVar
20011 @item ContextManager
20012 @item Counter
20013 @item DefaultDict
20014 @item Deque
20015 @item NewType
20016 @item NoReturn
20017 @item overload
20018 @item Protocol
20019 @item runtime
20020 @item Text
20021 @item Type
20022 @item TYPE_CHECKING
20023 @item AsyncGenerator
20024 @end enumerate\n")
20025 (license license:psfl)))
20026
20027 (define-public bpython
20028 (package
20029 (name "bpython")
20030 (version "0.20.1")
20031 (source
20032 (origin
20033 (method url-fetch)
20034 (uri (pypi-uri "bpython" version))
20035 (sha256
20036 (base32 "00vmkkc79mlnkyvwww1cr7bpwmf4p61704dhayz6kd0kc203hxvf"))))
20037 (build-system python-build-system)
20038 (arguments
20039 `(#:phases
20040 (modify-phases %standard-phases
20041 (add-after 'unpack 'remove-failing-test
20042 (lambda _
20043 ;; Remove failing test. FIXME: make it pass
20044 (delete-file "bpython/test/test_args.py")
20045 #t))
20046 (add-after 'wrap 'add-aliases
20047 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
20048 (lambda* (#:key outputs #:allow-other-keys)
20049 (let ((out (assoc-ref outputs "out")))
20050 (for-each
20051 (lambda (old new)
20052 (symlink old (string-append out "/bin/" new)))
20053 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
20054 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
20055 #t)))))
20056 (propagated-inputs
20057 `(("python-pygments" ,python-pygments)
20058 ("python-requests" ,python-requests)
20059 ("python-curtsies" ,python-curtsies)
20060 ("python-greenlet" ,python-greenlet)
20061 ("python-six" ,python-six)
20062 ("python-wcwidth" ,python-wcwidth)
20063 ;; optional dependencies
20064 ("python-urwid" ,python-urwid) ; for bpython-urwid only
20065 ("python-watchdog" ,python-watchdog)
20066 ("python-jedi" ,python-jedi)))
20067 (native-inputs
20068 `(("python-sphinx" ,python-sphinx)
20069 ("python-mock" ,python-mock)))
20070 (home-page "https://bpython-interpreter.org/")
20071 (synopsis "Fancy interface to the Python interpreter")
20072 (description "Bpython is a fancy interface to the Python
20073 interpreter. bpython's main features are
20074
20075 @enumerate
20076 @item in-line syntax highlighting,
20077 @item readline-like autocomplete with suggestions displayed as you type,
20078 @item expected parameter list for any Python function,
20079 @item \"rewind\" function to pop the last line of code from memory and
20080 re-evaluate,
20081 @item send the code you've entered off to a pastebin,
20082 @item save the code you've entered to a file, and
20083 @item auto-indentation.
20084 @end enumerate")
20085 (license license:expat)))
20086
20087 (define-public python-pyinotify
20088 (package
20089 (name "python-pyinotify")
20090 (version "0.9.6")
20091 (source (origin
20092 (method url-fetch)
20093 (uri (pypi-uri "pyinotify" version))
20094 (sha256
20095 (base32
20096 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
20097 (build-system python-build-system)
20098 (arguments `(#:tests? #f)) ;no tests
20099 (home-page "https://github.com/seb-m/pyinotify")
20100 (synopsis "Python library for monitoring inotify events")
20101 (description
20102 "@code{pyinotify} provides a Python interface for monitoring
20103 file system events on Linux.")
20104 (license license:expat)))
20105
20106 (define-public python2-pyinotify
20107 (package-with-python2 python-pyinotify))
20108
20109 ;; Ada parser uses this version.
20110 (define-public python2-quex-0.67.3
20111 (package
20112 (name "python2-quex")
20113 (version "0.67.3")
20114 (source
20115 (origin
20116 (method url-fetch)
20117 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
20118 (version-major+minor version)
20119 "/quex-" version ".zip"))
20120 (sha256
20121 (base32
20122 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
20123 (build-system python-build-system)
20124 (native-inputs
20125 `(("unzip" ,unzip)))
20126 (arguments
20127 `(#:python ,python-2
20128 #:tests? #f
20129 #:phases
20130 (modify-phases %standard-phases
20131 (delete 'configure)
20132 (delete 'build)
20133 (replace 'install
20134 (lambda* (#:key outputs #:allow-other-keys)
20135 (let* ((out (assoc-ref outputs "out"))
20136 (share/quex (string-append out "/share/quex"))
20137 (bin (string-append out "/bin")))
20138 (copy-recursively "." share/quex)
20139 (mkdir-p bin)
20140 (symlink (string-append share/quex "/quex-exe.py")
20141 (string-append bin "/quex"))
20142 #t))))))
20143 (native-search-paths
20144 (list (search-path-specification
20145 (variable "QUEX_PATH")
20146 (files '("share/quex")))))
20147 (home-page "http://quex.sourceforge.net/")
20148 (synopsis "Lexical analyzer generator in Python")
20149 (description "@code{quex} is a lexical analyzer generator in Python.")
20150 (license license:lgpl2.1+))) ; Non-military
20151
20152 (define-public python2-quex
20153 (package (inherit python2-quex-0.67.3)
20154 (name "python2-quex")
20155 (version "0.68.1")
20156 (source
20157 (origin
20158 (method url-fetch)
20159 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
20160 (sha256
20161 (base32
20162 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
20163 (file-name (string-append name "-" version ".tar.gz"))))))
20164
20165 (define-public python-more-itertools
20166 (package
20167 (name "python-more-itertools")
20168 (version "8.2.0")
20169 (source
20170 (origin
20171 (method url-fetch)
20172 (uri (pypi-uri "more-itertools" version))
20173 (sha256
20174 (base32
20175 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
20176 (build-system python-build-system)
20177 (home-page "https://github.com/erikrose/more-itertools")
20178 (synopsis "More routines for operating on iterables, beyond itertools")
20179 (description "Python's built-in @code{itertools} module implements a
20180 number of iterator building blocks inspired by constructs from APL, Haskell,
20181 and SML. @code{more-itertools} includes additional building blocks for
20182 working with iterables.")
20183 (properties `((python2-variant . ,(delay python2-more-itertools))))
20184 (license license:expat)))
20185
20186 ;; The 5.x series are the last versions supporting Python 2.7.
20187 (define-public python2-more-itertools
20188 (package
20189 (inherit python-more-itertools)
20190 (name "python2-more-itertools")
20191 (version "5.0.0")
20192 (source (origin
20193 (method url-fetch)
20194 (uri (pypi-uri "more-itertools" version))
20195 (sha256
20196 (base32
20197 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
20198 (arguments
20199 `(#:python ,python-2))
20200 (propagated-inputs
20201 `(("python2-six" ,python2-six-bootstrap)))))
20202
20203 (define-public python-latexcodec
20204 (package
20205 (name "python-latexcodec")
20206 (version "1.0.7")
20207 (source
20208 (origin
20209 (method url-fetch)
20210 (uri (pypi-uri "latexcodec" version))
20211 (sha256
20212 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
20213 (build-system python-build-system)
20214 (inputs
20215 `(("python-six" ,python-six)))
20216 (home-page "https://readthedocs.org/projects/latexcodec/")
20217 (synopsis "Work with LaTeX code in Python")
20218 (description "Lexer and codec to work with LaTeX code in Python.")
20219 (license license:expat)))
20220
20221 (define-public python-pybtex
20222 (package
20223 (name "python-pybtex")
20224 (version "0.22.2")
20225 (source
20226 (origin
20227 (method url-fetch)
20228 (uri (pypi-uri "pybtex" version))
20229 (sha256
20230 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
20231 (build-system python-build-system)
20232 (native-inputs
20233 `(("python-nose" ,python-nose)))
20234 (inputs
20235 `(("python-latexcodec" ,python-latexcodec)
20236 ("python-pyyaml" ,python-pyyaml)
20237 ("python-six" ,python-six)))
20238 (arguments
20239 `(#:test-target "nosetests"))
20240 (home-page "https://pybtex.org/")
20241 (synopsis "BibTeX-compatible bibliography processor")
20242 (description "Pybtex is a BibTeX-compatible bibliography processor written
20243 in Python. You can simply type pybtex instead of bibtex.")
20244 (license license:expat)))
20245
20246 (define-public python-onetimepass
20247 (package
20248 (name "python-onetimepass")
20249 (version "1.0.1")
20250 (source
20251 (origin
20252 (method url-fetch)
20253 (uri (pypi-uri "onetimepass" version))
20254 (sha256
20255 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
20256 (build-system python-build-system)
20257 (propagated-inputs `(("python-six" ,python-six)))
20258 (home-page "https://github.com/tadeck/onetimepass/")
20259 (synopsis "One-time password library")
20260 (description "Python one-time password library for HMAC-based (HOTP) and
20261 time-based (TOTP) passwords.")
20262 (license license:expat)))
20263
20264 (define-public python-parso
20265 (package
20266 (name "python-parso")
20267 (version "0.7.1")
20268 (source
20269 (origin
20270 (method url-fetch)
20271 (uri (pypi-uri "parso" version))
20272 (sha256
20273 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
20274 (native-inputs
20275 `(("python-pytest" ,python-pytest)))
20276 (build-system python-build-system)
20277 (arguments
20278 `(#:phases (modify-phases %standard-phases
20279 (replace 'check
20280 (lambda _ (invoke "pytest" "-vv"))))))
20281 (home-page "https://github.com/davidhalter/parso")
20282 (synopsis "Python Parser")
20283 (description "Parso is a Python parser that supports error recovery and
20284 round-trip parsing for different Python versions (in multiple Python versions).
20285 Parso is also able to list multiple syntax errors in your Python file.")
20286 (license license:expat)))
20287
20288 (define-public python2-parso
20289 (package-with-python2 python-parso))
20290
20291 (define-public python-async-generator
20292 (package
20293 (name "python-async-generator")
20294 (version "1.10")
20295 (source
20296 (origin
20297 (method url-fetch)
20298 (uri (pypi-uri "async_generator" version))
20299 (sha256
20300 (base32
20301 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
20302 (build-system python-build-system)
20303 (native-inputs
20304 `(("python-pytest" ,python-pytest)))
20305 (home-page "https://github.com/python-trio/async_generator")
20306 (synopsis "Async generators and context managers for Python 3.5+")
20307 (description "@code{async_generator} back-ports Python 3.6's native async
20308 generators and Python 3.7's context managers into Python 3.5.")
20309 ;; Dual licensed.
20310 (license (list license:expat license:asl2.0))))
20311
20312 (define-public python-async-timeout
20313 (package
20314 (name "python-async-timeout")
20315 (version "3.0.1")
20316 (source
20317 (origin
20318 (method url-fetch)
20319 (uri (pypi-uri "async-timeout" version))
20320 (sha256
20321 (base32
20322 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
20323 (build-system python-build-system)
20324 (home-page "https://github.com/aio-libs/async_timeout/")
20325 (synopsis "Timeout context manager for asyncio programs")
20326 (description "@code{async-timeout} provides a timeout timeout context
20327 manager compatible with @code{asyncio}.")
20328 (license license:asl2.0)))
20329
20330 (define-public python-glob2
20331 (package
20332 (name "python-glob2")
20333 (version "0.7")
20334 (source
20335 (origin
20336 (method git-fetch)
20337 (uri (git-reference
20338 (url "https://github.com/miracle2k/python-glob2")
20339 (commit (string-append "v" version))))
20340 (file-name (git-file-name name version))
20341 (sha256
20342 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
20343 (build-system python-build-system)
20344 (home-page "https://github.com/miracle2k/python-glob2/")
20345 (synopsis "Extended Version of the python buildin glob module")
20346 (description "This is an extended version of the Python
20347 @url{http://docs.python.org/library/glob.html, built-in glob module} which
20348 adds:
20349
20350 @itemize
20351 @item The ability to capture the text matched by glob patterns, and return
20352 those matches alongside the file names.
20353 @item A recursive @code{**} globbing syntax, akin for example to the
20354 @code{globstar} option of Bash.
20355 @item The ability to replace the file system functions used, in order to glob
20356 on virtual file systems.
20357 @item Compatible with Python 2 and Python 3 (tested with 3.3).
20358 @end itemize
20359
20360 Glob2 currently based on the glob code from Python 3.3.1.")
20361 (license license:bsd-2)))
20362
20363 (define-public python2-glob2
20364 (package-with-python2 python-glob2))
20365
20366 (define-public python-gipc
20367 (package
20368 (name "python-gipc")
20369 (version "0.6.0")
20370 (source
20371 (origin
20372 (method url-fetch)
20373 (uri (pypi-uri "gipc" version ".zip"))
20374 (sha256
20375 (base32
20376 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
20377 (build-system python-build-system)
20378 (native-inputs
20379 `(("unzip" ,unzip)))
20380 (propagated-inputs
20381 `(("python-gevent" ,python-gevent)))
20382 (home-page "https://gehrcke.de/gipc/")
20383 (synopsis "Child process management in the context of gevent")
20384 (description "Usage of Python's multiprocessing package in a
20385 gevent-powered application may raise problems. With @code{gipc},
20386 process-based child processes can safely be created anywhere within a
20387 gevent-powered application.")
20388 (license license:expat)))
20389
20390 (define-public python-beautifultable
20391 (package
20392 (name "python-beautifultable")
20393 (version "1.0.0")
20394 (source
20395 (origin
20396 (method url-fetch)
20397 (uri (pypi-uri "beautifultable" version))
20398 (sha256
20399 (base32
20400 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
20401 (build-system python-build-system)
20402 (propagated-inputs
20403 `(("python-wcwidth" ,python-wcwidth)))
20404 (arguments
20405 `(#:phases
20406 (modify-phases %standard-phases
20407 (add-after 'unpack 'patch-setup.py
20408 (lambda _
20409 (substitute* "setup.py"
20410 (("setup\\(")
20411 "setup(\n test_suite=\"test\",")))))))
20412 (home-page "https://github.com/pri22296/beautifultable")
20413 (synopsis "Print ASCII tables for terminals")
20414 (description "@code{python-beautifultable} provides a class for easily
20415 printing tabular data in a visually appealing ASCII format to a terminal.
20416
20417 Features include, but are not limited to:
20418 @itemize
20419 @item Full customization of the look and feel of the table
20420 @item Row and column accessors.
20421 @item Full support for colors using ANSI sequences or any library.
20422 @item Plenty of predefined styles and option to create custom ones.
20423 @item Support for Unicode characters.
20424 @item Supports streaming table when data is slow to retrieve.
20425 @end itemize")
20426 (license license:expat)))
20427
20428 (define-public python-globber
20429 (package
20430 (name "python-globber")
20431 (version "0.2.1")
20432 (source
20433 (origin
20434 (method git-fetch)
20435 (uri (git-reference
20436 (url "https://github.com/asharov/globber")
20437 (commit version)))
20438 (file-name (git-file-name name version))
20439 (sha256
20440 (base32
20441 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
20442 (build-system python-build-system)
20443 (home-page "https://github.com/asharov/globber")
20444 (synopsis "Library for string matching with glob patterns")
20445 (description
20446 "Globber is a Python library for matching file names against glob patterns.
20447 In contrast to other glob-matching libraries, it matches arbitrary strings and
20448 doesn't require the matched names to be existing files. In addition, it
20449 supports the globstar @code{**} operator to match an arbitrary number of
20450 path components.")
20451 (license license:asl2.0)))
20452
20453 (define-public python-git-hammer
20454 (package
20455 (name "python-git-hammer")
20456 (version "0.3.1")
20457 (source
20458 (origin
20459 (method git-fetch)
20460 (uri (git-reference
20461 (url "https://github.com/asharov/git-hammer")
20462 (commit version)))
20463 (file-name (git-file-name name version))
20464 (sha256
20465 (base32
20466 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
20467 (build-system python-build-system)
20468 (arguments
20469 `(#:phases
20470 (modify-phases %standard-phases
20471 (add-after 'unpack 'patch-setup.py
20472 (lambda _
20473 (substitute* "setup.py"
20474 (("setup\\(")
20475 "setup(\n test_suite=\"test\",")))))))
20476 (propagated-inputs
20477 `(("python-beautifultable" ,python-beautifultable)
20478 ("python-dateutil" ,python-dateutil)
20479 ("python-gitpython" ,python-gitpython)
20480 ("python-globber" ,python-globber)
20481 ("python-matplotlib" ,python-matplotlib)
20482 ("python-sqlalchemy" ,python-sqlalchemy)
20483 ("python-sqlalchemy-utils"
20484 ,python-sqlalchemy-utils)))
20485 (home-page "https://github.com/asharov/git-hammer")
20486 (synopsis "Provide statistics for git repositories")
20487 (description
20488 "Git Hammer is a statistics tool for projects in git repositories.
20489 Its major feature is tracking the number of lines authored by each person for every
20490 commit, but it also includes some other useful statistics.")
20491 (license license:asl2.0)))
20492
20493 (define-public python-fusepy
20494 (package
20495 (name "python-fusepy")
20496 (version "2.0.4")
20497 (source
20498 (origin
20499 (method url-fetch)
20500 (uri (pypi-uri "fusepy" version))
20501 (sha256
20502 (base32
20503 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
20504 (build-system python-build-system)
20505 (arguments
20506 `(#:phases
20507 (modify-phases %standard-phases
20508 (add-before 'build 'set-library-file-name
20509 (lambda* (#:key inputs #:allow-other-keys)
20510 (let ((fuse (assoc-ref inputs "fuse")))
20511 (substitute* "fuse.py"
20512 (("find_library\\('fuse'\\)")
20513 (string-append "'" fuse "/lib/libfuse.so'")))
20514 #t))))))
20515 (propagated-inputs
20516 `(("fuse" ,fuse)))
20517 (home-page "https://github.com/fusepy/fusepy")
20518 (synopsis "Simple ctypes bindings for FUSE")
20519 (description "Python module that provides a simple interface to FUSE and
20520 MacFUSE. The binding is created using the standard @code{ctypes} library.")
20521 (license license:isc)))
20522
20523 (define-public python2-fusepy
20524 (package-with-python2 python-fusepy))
20525
20526 (define-public python-fusepyng
20527 (package
20528 (name "python-fusepyng")
20529 (version "1.0.7")
20530 (source
20531 (origin
20532 (method url-fetch)
20533 (uri (pypi-uri "fusepyng" version))
20534 (sha256
20535 (base32
20536 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
20537 (build-system python-build-system)
20538 (arguments
20539 '(#:phases
20540 (modify-phases %standard-phases
20541 (add-after 'unpack 'set-libfuse-path
20542 (lambda* (#:key inputs #:allow-other-keys)
20543 (let ((fuse (assoc-ref inputs "fuse")))
20544 (substitute* "fusepyng.py"
20545 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
20546 (string-append "\"" fuse "/lib/libfuse.so\""))))
20547 #t)))))
20548 (inputs
20549 `(("fuse" ,fuse)))
20550 (propagated-inputs
20551 `(("python-paramiko" ,python-paramiko)))
20552 (home-page "https://github.com/rianhunter/fusepyng")
20553 (synopsis "Simple ctypes bindings for FUSE")
20554 (description "@code{fusepyng} is a Python module that provides a simple
20555 interface to FUSE on various operating systems. It's just one file and is
20556 implemented using @code{ctypes}.")
20557 (license license:isc)))
20558
20559 (define-public python-userspacefs
20560 (package
20561 (name "python-userspacefs")
20562 (version "2.0.3")
20563 (source
20564 (origin
20565 (method url-fetch)
20566 (uri (pypi-uri "userspacefs" version))
20567 (sha256
20568 (base32
20569 "1v6saf62ml3j63adalvlkj4iavxjbsbapl20b21mn73p7kvn4ayf"))))
20570 (build-system python-build-system)
20571 (propagated-inputs
20572 `(("python-fusepyng" ,python-fusepyng)))
20573 (home-page "https://github.com/rianhunter/userspacefs")
20574 (synopsis "User-space file systems for Python")
20575 (description
20576 "@code{userspacefs} is a library that allows you to easily write
20577 user-space file systems in Python.")
20578 (license license:gpl3+)))
20579
20580 (define-public python-stone
20581 (package
20582 (name "python-stone")
20583 (version "3.2.1")
20584 (source
20585 (origin
20586 (method url-fetch)
20587 (uri (pypi-uri "stone" version))
20588 (sha256
20589 (base32
20590 "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
20591 (build-system python-build-system)
20592 (arguments
20593 `(#:phases
20594 (modify-phases %standard-phases
20595 (add-after 'unpack 'change-version-requirements
20596 (lambda _
20597 ;; Match the requirement in test/requirements.txt
20598 (substitute* "setup.py"
20599 (("pytest < 5") "pytest < 7"))
20600 ;; We don't care about a coverage report.
20601 (substitute* "test/requirements.txt"
20602 (("coverage.*") "coverage\n"))
20603 #t))
20604 (replace 'check
20605 (lambda* (#:key tests? #:allow-other-keys)
20606 (when tests?
20607 ;; These tests don't import currectly.
20608 (delete-file "test/test_js_client.py")
20609 (delete-file "test/test_tsd_types.py")
20610 (delete-file "test/test_python_gen.py")
20611 (setenv "PYTHONPATH"
20612 (string-append (getcwd) ":"
20613 (getenv "PYTHONPATH")))
20614 (invoke "pytest"))
20615 #t)))))
20616 (propagated-inputs
20617 `(("python-ply" ,python-ply)
20618 ("python-six" ,python-six)))
20619 (native-inputs
20620 `(("python-coverage" ,python-coverage)
20621 ("python-mock" ,python-mock)
20622 ("python-pytest" ,python-pytest)
20623 ("python-pytest-runner" ,python-pytest-runner)))
20624 (home-page "https://github.com/dropbox/stone")
20625 (synopsis "Official Api Spec Language for Dropbox")
20626 (description
20627 "Stone is an interface description language (IDL) for APIs.")
20628 (license license:expat)))
20629
20630 (define-public pybind11
20631 (package
20632 (name "pybind11")
20633 (version "2.6.2")
20634 (source (origin
20635 (method git-fetch)
20636 (uri (git-reference
20637 (url "https://github.com/pybind/pybind11")
20638 (commit (string-append "v" version))))
20639 (sha256
20640 (base32
20641 "1lsacpawl2gb5qlh0cawj9swsyfbwhzhwiv6553a7lsigdbadqpy"))
20642 (file-name (git-file-name name version))))
20643 (build-system cmake-build-system)
20644 (native-inputs
20645 `(("python" ,python-wrapper)
20646
20647 ;; The following dependencies are used for tests.
20648 ("python-pytest" ,python-pytest)
20649 ("catch" ,catch-framework2-1)
20650 ("eigen" ,eigen)))
20651 (arguments
20652 `(#:configure-flags
20653 (list (string-append "-DCATCH_INCLUDE_DIR="
20654 (assoc-ref %build-inputs "catch")
20655 "/include/catch"))
20656
20657 #:phases (modify-phases %standard-phases
20658 (add-after 'install 'install-python
20659 (lambda* (#:key outputs #:allow-other-keys)
20660 (let ((out (assoc-ref outputs "out")))
20661 (with-directory-excursion "../source"
20662 (setenv "PYBIND11_USE_CMAKE" "yes")
20663 (invoke "python" "setup.py" "install"
20664 "--single-version-externally-managed"
20665 "--root=/"
20666 (string-append "--prefix=" out)))))))
20667
20668 #:test-target "check"))
20669 (home-page "https://github.com/pybind/pybind11/")
20670 (synopsis "Seamless operability between C++11 and Python")
20671 (description
20672 "@code{pybind11} is a lightweight header-only library that exposes C++
20673 types in Python and vice versa, mainly to create Python bindings of existing
20674 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
20675 library: to minimize boilerplate code in traditional extension modules by
20676 inferring type information using compile-time introspection.")
20677 (license license:bsd-3)))
20678
20679 (define-public python-pooch
20680 (package
20681 (name "python-pooch")
20682 (version "1.3.0")
20683 (source
20684 (origin
20685 (method url-fetch)
20686 (uri (pypi-uri "pooch" version))
20687 (sha256
20688 (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
20689 (build-system python-build-system)
20690 (arguments
20691 `(#:tests? #f)) ;requires online data
20692 (propagated-inputs
20693 `(("python-appdirs" ,python-appdirs)
20694 ("python-packaging" ,python-packaging)
20695 ("python-requests" ,python-requests)))
20696 (home-page "https://github.com/fatiando/pooch")
20697 (synopsis "Manage your Python library's sample data files")
20698 (description
20699 "Pooch manages your Python library's sample data files: it automatically
20700 downloads and stores them in a local directory, with support for versioning
20701 and corruption checks.")
20702 (license license:bsd-3)))
20703
20704 (define-public python-fasteners
20705 (package
20706 (name "python-fasteners")
20707 (version "0.15")
20708 (source
20709 (origin
20710 (method url-fetch)
20711 (uri (pypi-uri "fasteners" version))
20712 (sha256
20713 (base32
20714 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
20715 (build-system python-build-system)
20716 (propagated-inputs
20717 `(("python-monotonic" ,python-monotonic)
20718 ("python-six" ,python-six)))
20719 (native-inputs
20720 `(("python-testtools" ,python-testtools)))
20721 (home-page "https://github.com/harlowja/fasteners")
20722 (synopsis "Python package that provides useful locks")
20723 (description
20724 "This package provides a Python program that provides following locks:
20725
20726 @itemize
20727 @item Locking decorator
20728 @item Reader-writer locks
20729 @item Inter-process locks
20730 @item Generic helpers
20731 @end itemize\n")
20732 (license license:asl2.0)))
20733
20734 (define-public python-requests-file
20735 (package
20736 (name "python-requests-file")
20737 (version "1.4.3")
20738 (source
20739 (origin
20740 (method url-fetch)
20741 (uri (pypi-uri "requests-file" version))
20742 (sha256
20743 (base32
20744 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
20745 (build-system python-build-system)
20746 (propagated-inputs
20747 `(("python-requests" ,python-requests)
20748 ("python-six" ,python-six)))
20749 (home-page
20750 "https://github.com/dashea/requests-file")
20751 (synopsis "File transport adapter for Requests")
20752 (description
20753 "Requests-File is a transport adapter for use with the Requests Python
20754 library to allow local file system access via @code{file://} URLs.")
20755 (license license:asl2.0)))
20756
20757 (define-public python2-requests-file
20758 (package-with-python2 python-requests-file))
20759
20760 (define-public python-identify
20761 (package
20762 (name "python-identify")
20763 (version "1.4.25")
20764 (source
20765 (origin
20766 ;; There are no tests in the PyPI tarball.
20767 (method git-fetch)
20768 (uri (git-reference
20769 (url "https://github.com/chriskuehl/identify")
20770 (commit (string-append "v" version))))
20771 (file-name (git-file-name name version))
20772 (sha256
20773 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
20774 (build-system python-build-system)
20775 (arguments
20776 `(#:phases
20777 (modify-phases %standard-phases
20778 (replace 'check
20779 (lambda _
20780 (invoke "pytest" "-vv"))))))
20781 (native-inputs
20782 `(("python-coverage" ,python-coverage)
20783 ("python-pytest" ,python-pytest)))
20784 (propagated-inputs
20785 `(("python-editdistance" ,python-editdistance)))
20786 (home-page "https://github.com/chriskuehl/identify")
20787 (synopsis "File identification library for Python")
20788 (description
20789 "@code{identify} is a file identification library for Python. Given
20790 a file (or some information about a file), return a set of standardized tags
20791 identifying what the file is.")
20792 (license license:expat)))
20793
20794 (define-public python-tldextract
20795 (package
20796 (name "python-tldextract")
20797 (version "2.2.0")
20798 (source
20799 (origin
20800 (method url-fetch)
20801 (uri (pypi-uri "tldextract" version))
20802 (sha256
20803 (base32
20804 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
20805 (build-system python-build-system)
20806 (native-inputs
20807 `(("python-pytest" ,python-pytest)
20808 ("python-responses" ,python-responses)))
20809 (propagated-inputs
20810 `(("python-idna" ,python-idna)
20811 ("python-requests" ,python-requests)
20812 ("python-requests-file" ,python-requests-file)))
20813 (home-page
20814 "https://github.com/john-kurkowski/tldextract")
20815 (synopsis
20816 "Separate the TLD from the registered domain and subdomains of a URL")
20817 (description
20818 "TLDExtract accurately separates the TLD from the registered domain and
20819 subdomains of a URL, using the Public Suffix List. By default, this includes
20820 the public ICANN TLDs and their exceptions. It can optionally support the
20821 Public Suffix List's private domains as well.")
20822 (license license:bsd-3)))
20823
20824 (define-public python2-tldextract
20825 (package-with-python2 python-tldextract))
20826
20827 (define-public python-nodeenv
20828 (package
20829 (name "python-nodeenv")
20830 (version "1.4.0")
20831 (source
20832 (origin
20833 ;; There's no tarball in PyPI.
20834 (method git-fetch)
20835 (uri (git-reference
20836 (url "https://github.com/ekalinin/nodeenv")
20837 (commit version)))
20838 (file-name (git-file-name name version))
20839 (sha256
20840 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
20841 (build-system python-build-system)
20842 (arguments
20843 `(#:phases
20844 (modify-phases %standard-phases
20845 (replace 'check
20846 (lambda _
20847 ;; This test fails. It tries to open a network socket.
20848 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
20849 (native-inputs
20850 `(("python-coverage" ,python-coverage)
20851 ("python-mock" ,python-mock)
20852 ("python-pytest" ,python-pytest)))
20853 (home-page "https://ekalinin.github.io/nodeenv/")
20854 (synopsis "Create isolated node.js environments")
20855 (description
20856 "Nodeenv (node.js virtual environment) is a tool to create isolated
20857 node.js environments. It creates an environment that has its own installation
20858 directories, that doesn't share libraries with other node.js virtual
20859 environments.")
20860 (license license:bsd-3)))
20861
20862 (define-public python-pynamecheap
20863 (package
20864 (name "python-pynamecheap")
20865 (version "0.0.3")
20866 (source
20867 (origin
20868 (method url-fetch)
20869 (uri (pypi-uri "PyNamecheap" version))
20870 (sha256
20871 (base32
20872 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
20873 (build-system python-build-system)
20874 (propagated-inputs
20875 `(("python-requests" ,python-requests)))
20876 (home-page
20877 "https://github.com/Bemmu/PyNamecheap")
20878 (synopsis
20879 "Namecheap API client in Python")
20880 (description
20881 "PyNamecheap is a Namecheap API client in Python.")
20882 (license license:expat)))
20883
20884 (define-public python2-pynamecheap
20885 (package-with-python2 python-pynamecheap))
20886
20887 (define-public python-dns-lexicon
20888 (package
20889 (name "python-dns-lexicon")
20890 (version "2.4.0")
20891 (source
20892 (origin
20893 (method url-fetch)
20894 (uri (pypi-uri "dns-lexicon" version))
20895 (sha256
20896 (base32
20897 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
20898 (build-system python-build-system)
20899 (arguments
20900 `(#:tests? #f)) ;requires internet access
20901 (propagated-inputs
20902 `(("python-future" ,python-future)
20903 ("python-pynamecheap" ,python-pynamecheap)
20904 ("python-requests" ,python-requests)
20905 ("python-tldextract" ,python-tldextract)
20906 ("python-urllib3" ,python-urllib3)))
20907 (home-page "https://github.com/AnalogJ/lexicon")
20908 (synopsis
20909 "Manipulate DNS records on various DNS providers")
20910 (description
20911 "Lexicon provides a way to manipulate DNS records on multiple DNS
20912 providers in a standardized way. It has a CLI but it can also be used as a
20913 Python library. It was designed to be used in automation, specifically with
20914 Let's Encrypt.")
20915 (license license:expat)))
20916
20917 (define-public python2-dns-lexicon
20918 (package-with-python2 python-dns-lexicon))
20919
20920 (define-public python-cfgv
20921 (package
20922 (name "python-cfgv")
20923 (version "3.1.0")
20924 (source
20925 (origin
20926 ;; There are no tests in the PyPI tarball.
20927 (method git-fetch)
20928 (uri (git-reference
20929 (url "https://github.com/asottile/cfgv")
20930 (commit (string-append "v" version))))
20931 (file-name (git-file-name name version))
20932 (sha256
20933 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
20934 (build-system python-build-system)
20935 (arguments
20936 `(#:phases
20937 (modify-phases %standard-phases
20938 (replace 'check
20939 (lambda _
20940 (invoke "pytest" "-vv"))))))
20941 (native-inputs
20942 `(("python-covdefaults" ,python-covdefaults)
20943 ("python-coverage" ,python-coverage)
20944 ("python-pytest" ,python-pytest)))
20945 (home-page "https://github.com/asottile/cfgv")
20946 (synopsis "Configuration validation library")
20947 (description
20948 "This library helps to validate configuration files and produce human
20949 readable error messages.")
20950 (license license:expat)))
20951
20952 (define-public python-commandlines
20953 (package
20954 (name "python-commandlines")
20955 (version "0.4.1")
20956 (source
20957 (origin
20958 (method url-fetch)
20959 (uri (pypi-uri "commandlines" version))
20960 (sha256
20961 (base32
20962 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
20963 (build-system python-build-system)
20964 (home-page "https://github.com/chrissimpkins/commandlines")
20965 (synopsis "Command line argument to object parsing library")
20966 (description
20967 "@code{Commandlines} is a Python library for command line application
20968 development that supports command line argument parsing, command string
20969 validation testing and application logic.")
20970 (license license:expat)))
20971
20972 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
20973 ;; python-numba. They have a very unflexible relationship.
20974 (define-public python-numba
20975 (package
20976 (name "python-numba")
20977 (version "0.51.2")
20978 (source
20979 (origin
20980 (method url-fetch)
20981 (uri (pypi-uri "numba" version))
20982 (sha256
20983 (base32
20984 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
20985 (build-system python-build-system)
20986 (arguments
20987 `(#:phases
20988 (modify-phases %standard-phases
20989 (add-after 'unpack 'disable-proprietary-features
20990 (lambda _
20991 (setenv "NUMBA_DISABLE_HSA" "1")
20992 (setenv "NUMBA_DISABLE_CUDA" "1")
20993 #t))
20994 (replace 'check
20995 (lambda* (#:key inputs outputs #:allow-other-keys)
20996 (add-installed-pythonpath inputs outputs)
20997 ;; Something is wrong with the PYTHONPATH when running the
20998 ;; tests from the build directory, as it complains about not being
20999 ;; able to import certain modules.
21000 (with-directory-excursion "/tmp"
21001 (setenv "HOME" (getcwd))
21002 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
21003 (propagated-inputs
21004 `(("python-llvmlite" ,python-llvmlite)
21005 ("python-numpy" ,python-numpy)
21006 ("python-singledispatch" ,python-singledispatch)))
21007 (native-inputs ;for tests
21008 `(("python-jinja2" ,python-jinja2)
21009 ("python-pygments" ,python-pygments)))
21010 (home-page "https://numba.pydata.org")
21011 (synopsis "Compile Python code using LLVM")
21012 (description "Numba gives you the power to speed up your applications with
21013 high performance functions written directly in Python. With a few
21014 annotations, array-oriented and math-heavy Python code can be just-in-time
21015 compiled to native machine instructions, similar in performance to C, C++ and
21016 Fortran, without having to switch languages or Python interpreters.
21017
21018 Numba works by generating optimized machine code using the LLVM compiler
21019 infrastructure at import time, runtime, or statically (using the included pycc
21020 tool).")
21021 (license license:bsd-3)))
21022
21023 (define-public python-numcodecs
21024 (package
21025 (name "python-numcodecs")
21026 (version "0.6.4")
21027 (source
21028 (origin
21029 (method url-fetch)
21030 (uri (pypi-uri "numcodecs" version))
21031 (sha256
21032 (base32
21033 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
21034 (build-system python-build-system)
21035 (propagated-inputs
21036 `(("python-numpy" ,python-numpy)
21037 ("python-msgpack" ,python-msgpack)))
21038 (native-inputs
21039 `(("python-pytest" ,python-pytest)
21040 ("python-setuptools-scm" ,python-setuptools-scm)))
21041 (home-page "https://github.com/zarr-developers/numcodecs")
21042 (synopsis "Buffer compression and transformation codecs")
21043 (description
21044 "This Python package provides buffer compression and transformation
21045 codecs for use in data storage and communication applications.")
21046 (license license:expat)))
21047
21048 (define-public python-asciitree
21049 (package
21050 (name "python-asciitree")
21051 (version "0.3.3")
21052 (source
21053 (origin
21054 (method url-fetch)
21055 (uri (pypi-uri "asciitree" version))
21056 (sha256
21057 (base32
21058 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
21059 (build-system python-build-system)
21060 (home-page "https://github.com/mbr/asciitree")
21061 (synopsis "Draws ASCII trees")
21062 (description "This package draws tree structures using characters.")
21063 (license license:expat)))
21064
21065 (define-public python-zarr
21066 (package
21067 (name "python-zarr")
21068 (version "2.4.0")
21069 (source
21070 (origin
21071 (method url-fetch)
21072 (uri (pypi-uri "zarr" version))
21073 (sha256
21074 (base32
21075 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
21076 (build-system python-build-system)
21077 (arguments
21078 `(#:phases
21079 (modify-phases %standard-phases
21080 (add-after 'unpack 'disable-service-tests
21081 (lambda _
21082 (setenv "ZARR_TEST_ABS" "0")
21083 (setenv "ZARR_TEST_MONGO" "0")
21084 (setenv "ZARR_TEST_REDIS" "0")
21085 #t))
21086 (replace 'check
21087 (lambda _
21088 (invoke "pytest" "-vv" "-k" "not lmdb")
21089 #t)))))
21090 (propagated-inputs
21091 `(("python-asciitree" ,python-asciitree)
21092 ("python-fasteners" ,python-fasteners)
21093 ("python-numcodecs" ,python-numcodecs)
21094 ("python-numpy" ,python-numpy)))
21095 (native-inputs
21096 `(("python-pytest" ,python-pytest)
21097 ("python-setuptools-scm" ,python-setuptools-scm)))
21098 (home-page "https://github.com/zarr-developers/zarr-python")
21099 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
21100 (description
21101 "This package provides an implementation of chunked, compressed,
21102 N-dimensional arrays for Python.")
21103 (license license:expat)))
21104
21105 (define-public python-anndata
21106 (package
21107 (name "python-anndata")
21108 (version "0.7.6")
21109 (source
21110 (origin
21111 (method url-fetch)
21112 (uri (pypi-uri "anndata" version))
21113 (sha256
21114 (base32
21115 "1ch8yp0xmag6z0kl01pljm35lbbwax7lrimfhiclpkd4m6xngk53"))))
21116 (build-system python-build-system)
21117 (arguments
21118 `(#:tests? #f ; The tarball from PyPi doesn't include tests.
21119 #:phases
21120 (modify-phases %standard-phases
21121 (delete 'check)
21122 (add-before 'build 'relax-dependency-requirements
21123 (lambda _
21124 ;; We need to upgrade python-pandas to avoid
21125 ;; https://github.com/pandas-dev/pandas/issues/35446
21126 (substitute* "pyproject.toml"
21127 (("pandas>=1.1.1") "pandas>=1.0.5"))))
21128 (replace 'build
21129 (lambda _
21130 ;; ZIP does not support timestamps before 1980.
21131 (setenv "SOURCE_DATE_EPOCH" "315532800")
21132 (invoke "flit" "build")))
21133 (replace 'install
21134 (lambda* (#:key inputs outputs #:allow-other-keys)
21135 (add-installed-pythonpath inputs outputs)
21136 (let ((out (assoc-ref outputs "out")))
21137 (for-each (lambda (wheel)
21138 (format #true wheel)
21139 (invoke "python" "-m" "pip" "install"
21140 wheel (string-append "--prefix=" out)))
21141 (find-files "dist" "\\.whl$")))
21142 #t)))))
21143 (propagated-inputs
21144 `(("python-h5py" ,python-h5py)
21145 ("python-importlib-metadata" ,python-importlib-metadata)
21146 ("python-natsort" ,python-natsort)
21147 ("python-numcodecs" ,python-numcodecs)
21148 ("python-packaging" ,python-packaging)
21149 ("python-pandas" ,python-pandas)
21150 ("python-scipy" ,python-scipy)
21151 ("python-zarr" ,python-zarr)))
21152 (native-inputs
21153 `(("python-joblib" ,python-joblib)
21154 ("python-pytest" ,python-pytest)
21155 ("python-toml" ,python-toml)
21156 ("python-flit" ,python-flit)
21157 ("python-setuptools-scm" ,python-setuptools-scm)))
21158 (home-page "https://github.com/theislab/anndata")
21159 (synopsis "Annotated data for data analysis pipelines")
21160 (description "Anndata is a package for simple (functional) high-level APIs
21161 for data analysis pipelines. In this context, it provides an efficient,
21162 scalable way of keeping track of data together with learned annotations and
21163 reduces the code overhead typically encountered when using a mostly
21164 object-oriented library such as @code{scikit-learn}.")
21165 (license license:bsd-3)))
21166
21167 (define-public python-dill
21168 (package
21169 (name "python-dill")
21170 (version "0.3.1.1")
21171 (source
21172 (origin
21173 (method url-fetch)
21174 (uri (pypi-uri "dill" version))
21175 (sha256
21176 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
21177 (build-system python-build-system)
21178 (arguments
21179 `(#:phases
21180 (modify-phases %standard-phases
21181 (replace 'check
21182 (lambda _
21183 (with-directory-excursion "/tmp"
21184 (invoke "nosetests" "-v"))
21185 #t)))))
21186 (native-inputs
21187 `(("python-nose" ,python-nose)))
21188 (home-page "https://pypi.org/project/dill/")
21189 (synopsis "Serialize all of Python")
21190 (description "Dill extends Python's @code{pickle} module for serializing
21191 and de-serializing Python objects to the majority of the built-in Python
21192 types. Dill provides the user the same interface as the @code{pickle} module,
21193 and also includes some additional features. In addition to pickling Python
21194 objects, @code{dill} provides the ability to save the state of an interpreter
21195 session in a single command. Hence, it would be feasible to save a
21196 interpreter session, close the interpreter, ship the pickled file to another
21197 computer, open a new interpreter, unpickle the session and thus continue from
21198 the saved state of the original interpreter session.")
21199 (license license:bsd-3)))
21200
21201 (define-public python-multiprocess
21202 (package
21203 (name "python-multiprocess")
21204 (version "0.70.9")
21205 (source
21206 (origin
21207 (method url-fetch)
21208 (uri (pypi-uri "multiprocess" version))
21209 (sha256
21210 (base32
21211 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
21212 (build-system python-build-system)
21213 (arguments
21214 `(#:phases
21215 (modify-phases %standard-phases
21216 (add-after 'unpack 'disable-broken-tests
21217 (lambda _
21218 ;; This test is broken as there is no keyboard interrupt.
21219 (substitute* "py3.7/multiprocess/tests/__init__.py"
21220 (("^(.*)def test_wait_result"
21221 line indent)
21222 (string-append indent
21223 "@unittest.skip(\"Disabled by Guix\")\n"
21224 line)))
21225 #t))
21226 ;; Tests must be run after installation.
21227 (delete 'check)
21228 (add-after 'install 'check
21229 (lambda* (#:key inputs outputs #:allow-other-keys)
21230 (add-installed-pythonpath inputs outputs)
21231 (invoke "python" "-m" "multiprocess.tests")
21232 #t)))))
21233 (propagated-inputs
21234 `(("python-dill" ,python-dill)))
21235 (home-page "https://pypi.org/project/multiprocess/")
21236 (synopsis "Multiprocessing and multithreading in Python")
21237 (description
21238 "This package is a fork of the multiprocessing Python package, a package
21239 which supports the spawning of processes using the API of the standard
21240 library's @code{threading} module.")
21241 (license license:bsd-3)))
21242
21243 (define-public python-toolz
21244 (package
21245 (name "python-toolz")
21246 (version "0.11.1")
21247 (source
21248 (origin
21249 (method url-fetch)
21250 (uri (pypi-uri "toolz" version))
21251 (sha256
21252 (base32
21253 "1grz3zvw5ixwqqlbv0n7j11mlcxb66cirh5i9x9zw8kqy0hpk967"))))
21254 (build-system python-build-system)
21255 (arguments
21256 `(#:phases
21257 (modify-phases %standard-phases
21258 (replace 'check
21259 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
21260 (when tests?
21261 (add-installed-pythonpath inputs outputs)
21262 (invoke "python" "-m" "pytest" "--doctest-modules"
21263 "--pyargs" "toolz")))))))
21264 (native-inputs
21265 `(("python-pytest" ,python-pytest)))
21266 (home-page "https://github.com/pytoolz/toolz/")
21267 (synopsis "List processing tools and functional utilities")
21268 (description
21269 "This package provides a set of utility functions for iterators,
21270 functions, and dictionaries.")
21271 (license license:bsd-3)))
21272
21273 (define-public python2-toolz
21274 (package-with-python2 python-toolz))
21275
21276 (define-public python-cytoolz
21277 (package
21278 (name "python-cytoolz")
21279 (version "0.9.0.1")
21280 (source
21281 (origin
21282 (method url-fetch)
21283 (uri (pypi-uri "cytoolz" version))
21284 (sha256
21285 (base32
21286 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
21287 (build-system python-build-system)
21288 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
21289 ;; 'exceptions'"
21290 (arguments '(#:tests? #f))
21291 (propagated-inputs
21292 `(("python-toolz" ,python-toolz)))
21293 (native-inputs
21294 `(("python-cython" ,python-cython)))
21295 (home-page "https://github.com/pytoolz/cytoolz")
21296 (synopsis "High performance functional utilities")
21297 (description
21298 "The cytoolz package implements the same API as provided by toolz. The
21299 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
21300 that is accessible to other projects developed in Cython.")
21301 (license license:bsd-3)))
21302
21303 (define-public python-sortedcollections
21304 (package
21305 (name "python-sortedcollections")
21306 (version "2.1.0")
21307 (source
21308 (origin
21309 (method url-fetch)
21310 (uri (pypi-uri "sortedcollections" version))
21311 (sha256
21312 (base32
21313 "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
21314 (build-system python-build-system)
21315 (propagated-inputs
21316 `(("python-sortedcontainers" ,python-sortedcontainers)))
21317 (arguments '(#:tests? #f)) ; Tests not included in release tarball.
21318 (home-page "http://www.grantjenks.com/docs/sortedcollections/")
21319 (synopsis "Python Sorted Collections")
21320 (description "Sorted Collections is a Python sorted collections library.")
21321 (license license:asl2.0)))
21322
21323 (define-public python-sortedcontainers
21324 (package
21325 (name "python-sortedcontainers")
21326 (version "2.1.0")
21327 (source
21328 (origin
21329 (method url-fetch)
21330 (uri (pypi-uri "sortedcontainers" version))
21331 (sha256
21332 (base32
21333 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
21334 (build-system python-build-system)
21335 (arguments
21336 ;; FIXME: Tests require many extra dependencies, and would introduce
21337 ;; a circular dependency on hypothesis, which uses this package.
21338 '(#:tests? #f))
21339 (propagated-inputs
21340 `(("python-appdirs" ,python-appdirs)
21341 ("python-distlib" ,python-distlib)
21342 ("python-filelock" ,python-filelock)
21343 ("python-six" ,python-six-bootstrap)))
21344 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
21345 (synopsis "Sorted List, Sorted Dict, Sorted Set")
21346 (description
21347 "This package provides a sorted collections library, written in
21348 pure-Python.")
21349 (license license:asl2.0)))
21350
21351 (define-public python2-sortedcontainers
21352 (package-with-python2 python-sortedcontainers))
21353
21354 (define-public python-cloudpickle
21355 (package
21356 (name "python-cloudpickle")
21357 (version "1.3.0")
21358 (source
21359 (origin
21360 (method url-fetch)
21361 (uri (pypi-uri "cloudpickle" version))
21362 (sha256
21363 (base32
21364 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
21365 (build-system python-build-system)
21366 (arguments
21367 '(#:phases (modify-phases %standard-phases
21368 (add-before 'check 'do-not-override-PYTHONPATH
21369 (lambda _
21370 ;; Append to PYTHONPATH instead of overriding it so
21371 ;; that dependencies from Guix can be found.
21372 (substitute* "tests/testutils.py"
21373 (("env\\['PYTHONPATH'\\] = pythonpath")
21374 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
21375 #t))
21376 (replace 'check
21377 (lambda* (#:key tests? #:allow-other-keys)
21378 (if tests?
21379 (invoke "pytest" "-s" "-vv")
21380 (format #t "test suite not run~%"))
21381 #t)))))
21382 (native-inputs
21383 `(;; For tests.
21384 ("python-psutil" ,python-psutil)
21385 ("python-pytest" ,python-pytest)
21386 ("python-tornado" ,python-tornado)))
21387 (home-page "https://github.com/cloudpipe/cloudpickle")
21388 (synopsis "Extended pickling support for Python objects")
21389 (description
21390 "Cloudpickle makes it possible to serialize Python constructs not
21391 supported by the default pickle module from the Python standard library. It
21392 is especially useful for cluster computing where Python expressions are
21393 shipped over the network to execute on remote hosts, possibly close to the
21394 data.")
21395 (properties `((python2-variant . ,(delay python2-cloudpickle))))
21396 (license license:bsd-3)))
21397
21398 (define-public python2-cloudpickle
21399 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
21400 (package/inherit base
21401 (native-inputs
21402 `(("python-mock" ,python2-mock)
21403 ,@(package-native-inputs base)))
21404 (propagated-inputs
21405 `(("python-futures" ,python2-futures)
21406 ,@(package-propagated-inputs base))))))
21407
21408 (define-public python-locket
21409 (package
21410 (name "python-locket")
21411 (version "0.2.0")
21412 (source
21413 (origin
21414 (method url-fetch)
21415 (uri (pypi-uri "locket" version))
21416 (sha256
21417 (base32
21418 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
21419 (build-system python-build-system)
21420 (home-page "https://github.com/mwilliamson/locket.py")
21421 (synopsis "File-based locks for Python")
21422 (description
21423 "Locket implements a lock that can be used by multiple processes provided
21424 they use the same path.")
21425 (license license:bsd-2)))
21426
21427 (define-public python2-locket
21428 (package-with-python2 python-locket))
21429
21430 (define-public python-blosc
21431 (package
21432 (name "python-blosc")
21433 (version "1.5.1")
21434 (source
21435 (origin
21436 (method url-fetch)
21437 (uri (pypi-uri "blosc" version))
21438 (sha256
21439 (base32
21440 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
21441 (build-system python-build-system)
21442 ;; FIXME: all tests pass, but then this error is printed:
21443 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
21444 (arguments '(#:tests? #f))
21445 (propagated-inputs
21446 `(("python-numpy" ,python-numpy)))
21447 (home-page "https://github.com/blosc/python-blosc")
21448 (synopsis "Python wrapper for the Blosc data compressor library")
21449 (description "Blosc is a high performance compressor optimized for binary
21450 data. It has been designed to transmit data to the processor cache faster
21451 than the traditional, non-compressed, direct memory fetch approach via a
21452 @code{memcpy()} system call.
21453
21454 Blosc works well for compressing numerical arrays that contains data with
21455 relatively low entropy, like sparse data, time series, grids with
21456 regular-spaced values, etc.
21457
21458 This Python package wraps the Blosc library.")
21459 (license license:bsd-3)))
21460
21461 (define-public python2-blosc
21462 (package-with-python2 python-blosc))
21463
21464 (define-public python-partd
21465 (package
21466 (name "python-partd")
21467 (version "0.3.9")
21468 (source
21469 (origin
21470 (method url-fetch)
21471 (uri (pypi-uri "partd" version))
21472 (sha256
21473 (base32
21474 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
21475 (build-system python-build-system)
21476 (propagated-inputs
21477 `(("python-blosc" ,python-blosc)
21478 ("python-locket" ,python-locket)
21479 ("python-numpy" ,python-numpy)
21480 ("python-pandas" ,python-pandas)
21481 ("python-pyzmq" ,python-pyzmq)
21482 ("python-toolz" ,python-toolz)))
21483 (home-page "https://github.com/dask/partd/")
21484 (synopsis "Appendable key-value storage")
21485 (description "Partd stores key-value pairs. Values are raw bytes. We
21486 append on old values. Partd excels at shuffling operations.")
21487 (license license:bsd-3)))
21488
21489 (define-public python-fsspec
21490 (package
21491 (name "python-fsspec")
21492 (version "0.6.1")
21493 (source
21494 (origin
21495 (method url-fetch)
21496 (uri (pypi-uri "fsspec" version))
21497 (sha256
21498 (base32
21499 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
21500 (build-system python-build-system)
21501 (arguments '(#:tests? #f)) ; there are none
21502 (home-page "https://github.com/intake/filesystem_spec")
21503 (synopsis "File-system specification")
21504 (description "The purpose of this package is to produce a template or
21505 specification for a file-system interface, that specific implementations
21506 should follow, so that applications making use of them can rely on a common
21507 behavior and not have to worry about the specific internal implementation
21508 decisions with any given backend.")
21509 (license license:bsd-3)))
21510
21511 (define-public python-dask
21512 (package
21513 (name "python-dask")
21514 (version "2.14.0")
21515 (source
21516 (origin
21517 (method url-fetch)
21518 (uri (pypi-uri "dask" version))
21519 (sha256
21520 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
21521 (build-system python-build-system)
21522 (arguments
21523 `(#:phases
21524 (modify-phases %standard-phases
21525 (add-after 'unpack 'disable-broken-tests
21526 (lambda _
21527 ;; This test is marked as xfail when pytest-xdist is used.
21528 (substitute* "dask/tests/test_threaded.py"
21529 (("def test_interrupt\\(\\)" m)
21530 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21531 m)))
21532 ;; This one fails with a type error:
21533 ;; TypeError: Already tz-aware, use tz_convert to convert.
21534 (substitute* "dask/dataframe/tests/test_shuffle.py"
21535 (("def test_set_index_timestamp\\(\\)" m)
21536 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
21537 m)))
21538 #t))
21539 (replace 'check
21540 (lambda _ (invoke "pytest" "-vv"))))))
21541 (propagated-inputs
21542 `(("python-cloudpickle" ,python-cloudpickle)
21543 ("python-fsspec" ,python-fsspec)
21544 ("python-numpy" ,python-numpy)
21545 ("python-packaging" ,python-packaging)
21546 ("python-pandas" ,python-pandas)
21547 ("python-partd" ,python-partd)
21548 ("python-toolz" ,python-toolz)
21549 ("python-pyyaml" ,python-pyyaml)))
21550 (native-inputs
21551 `(("python-pytest" ,python-pytest)
21552 ("python-pytest-runner" ,python-pytest-runner)))
21553 (home-page "https://github.com/dask/dask/")
21554 (synopsis "Parallel computing with task scheduling")
21555 (description
21556 "Dask is a flexible parallel computing library for analytics. It
21557 consists of two components: dynamic task scheduling optimized for computation,
21558 and large data collections like parallel arrays, dataframes, and lists that
21559 extend common interfaces like NumPy, Pandas, or Python iterators to
21560 larger-than-memory or distributed environments. These parallel collections
21561 run on top of the dynamic task schedulers. ")
21562 (license license:bsd-3)))
21563
21564 (define-public python-ilinkedlist
21565 (package
21566 (name "python-ilinkedlist")
21567 (version "0.4.0")
21568 (source
21569 (origin
21570 (method url-fetch)
21571 (uri (pypi-uri "ilinkedlist" version))
21572 (sha256
21573 (base32
21574 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
21575 (build-system python-build-system)
21576 (native-inputs `(("python-pytest" ,python-pytest)))
21577 (inputs `(("python" ,python)))
21578 (home-page "https://github.com/luther9/ilinkedlist-py")
21579 (synopsis "Immutable linked list library")
21580 (description
21581 "This is a implementation of immutable linked lists for Python. It
21582 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
21583 Since a linked list is treated as immutable, it is hashable, and its length
21584 can be retrieved in constant time. Some of the terminology is inspired by
21585 LISP. It is possible to create an improper list by creating a @code{Pair}
21586 with a non-list @code{cdr}.")
21587 (license license:gpl3+)))
21588
21589 (define-public python-readlike
21590 (package
21591 (name "python-readlike")
21592 (version "0.1.3")
21593 (source
21594 (origin
21595 (method url-fetch)
21596 (uri (pypi-uri "readlike" version))
21597 (sha256
21598 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
21599 (build-system python-build-system)
21600 (home-page "https://github.com/jangler/readlike")
21601 (synopsis "GNU Readline-like line editing module")
21602 (description
21603 "This Python module provides line editing functions similar to the default
21604 Emacs-style ones of GNU Readline. Unlike the Python standard library's
21605 @code{readline} package, this one allows access to those capabilities in settings
21606 outside of a standard command-line interface. It is especially well-suited to
21607 interfacing with Urwid, due to a shared syntax for describing key inputs.
21608
21609 Currently, all stateless Readline commands are implemented. Yanking and history
21610 are not supported.")
21611 (license license:expat)))
21612
21613 (define-public python2-readlike
21614 (package-with-python2 python-readlike))
21615
21616 (define-public python-reparser
21617 (package
21618 (name "python-reparser")
21619 (version "1.4.3")
21620 (source
21621 (origin
21622 (method url-fetch)
21623 (uri (pypi-uri "ReParser" version))
21624 (sha256
21625 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
21626 (build-system python-build-system)
21627 (home-page "https://github.com/xmikos/reparser")
21628 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
21629 (description
21630 "This Python library provides a simple lexer/parser for inline markup based
21631 on regular expressions.")
21632 (license license:expat)))
21633
21634 (define-public python2-reparser
21635 (let ((reparser (package-with-python2
21636 (strip-python2-variant python-reparser))))
21637 (package/inherit reparser
21638 (propagated-inputs
21639 `(("python2-enum34" ,python2-enum34)
21640 ,@(package-propagated-inputs reparser))))))
21641
21642 (define-public python-retrying
21643 (package
21644 (name "python-retrying")
21645 (version "1.3.3")
21646 (source
21647 (origin
21648 (method git-fetch)
21649 (uri (git-reference
21650 (url "https://github.com/rholder/retrying")
21651 (commit (string-append "v" version))))
21652 (file-name (git-file-name name version))
21653 (sha256
21654 (base32
21655 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
21656 (build-system python-build-system)
21657 (propagated-inputs
21658 `(("python-six" ,python-six)))
21659 (home-page "https://github.com/rholder/retrying")
21660 (synopsis "Library for adding retry behavior")
21661 (description "Retrying is a general-purpose retrying library to simplify
21662 the task of adding retry behavior to just about anything.
21663
21664 Features:
21665
21666 @itemize
21667 @item Generic Decorator API.
21668 @item Specify stop condition (i.e. limit by number of attempts).
21669 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
21670 @item Customize retrying on Exceptions.
21671 @item Customize retrying on expected returned result.
21672 @end itemize")
21673 (license license:asl2.0)))
21674
21675 (define-public python-pre-commit
21676 (package
21677 (name "python-pre-commit")
21678 (version "2.10.0")
21679 (source
21680 (origin
21681 (method url-fetch)
21682 (uri (pypi-uri "pre_commit" version))
21683 (sha256
21684 (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
21685 (build-system python-build-system)
21686 (arguments
21687 ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
21688 ;; attribute 'empty_template_setup'".
21689 `(#:tests? #false))
21690 (propagated-inputs
21691 `(("python-cfgv" ,python-cfgv)
21692 ("python-identify" ,python-identify)
21693 ("python-importlib-metadata" ,python-importlib-metadata)
21694 ("python-importlib-resources" ,python-importlib-resources)
21695 ("python-nodeenv" ,python-nodeenv)
21696 ("python-pyyaml" ,python-pyyaml)
21697 ("python-toml" ,python-toml)
21698 ("python-virtualenv" ,python-virtualenv)))
21699 (home-page "https://github.com/pre-commit/pre-commit")
21700 (synopsis "Framework for managing multi-language pre-commit hooks")
21701 (description
21702 "This package provides a framework for managing and maintaining
21703 multi-language pre-commit hooks.")
21704 (license license:expat)))
21705
21706 (define-public python-precis-i18n
21707 (package
21708 (name "python-precis-i18n")
21709 (version "1.0.0")
21710 (source
21711 (origin
21712 (method url-fetch)
21713 (uri (pypi-uri "precis_i18n" version))
21714 (sha256
21715 (base32
21716 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
21717 (build-system python-build-system)
21718 (home-page "https://github.com/byllyfish/precis_i18n")
21719 (synopsis "Implementation of the PRECIS framework")
21720 (description
21721 "This module implements the PRECIS Framework as described in RFC 8264,
21722 RFC 8265 and RFC 8266.")
21723 (license license:expat)))
21724
21725 (define-public python-absl-py
21726 (package
21727 (name "python-absl-py")
21728 (version "0.6.1")
21729 (source
21730 (origin
21731 (method url-fetch)
21732 (uri (pypi-uri "absl-py" version))
21733 (sha256
21734 (base32
21735 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
21736 (build-system python-build-system)
21737 (propagated-inputs
21738 `(("python-six" ,python-six)))
21739 (home-page "https://github.com/abseil/abseil-py")
21740 (synopsis "Abseil Python common libraries")
21741 (description
21742 "This package provides the Abseil Python Common Libraries, a collection
21743 of Python libraries for building Python applications.")
21744 (license license:asl2.0)))
21745
21746 (define-public python-astor
21747 (package
21748 (name "python-astor")
21749 (version "0.8.1")
21750 (source
21751 (origin
21752 (method url-fetch)
21753 (uri (pypi-uri "astor" version))
21754 (sha256
21755 (base32
21756 "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
21757 (build-system python-build-system)
21758 ;; FIXME: There are two errors and two test failures.
21759 (arguments `(#:tests? #f))
21760 (home-page "https://github.com/berkerpeksag/astor")
21761 (synopsis "Read and write Python ASTs")
21762 (description "Astor is designed to allow easy manipulation of Python
21763 source via the Abstract Syntax Tree.")
21764 (license license:bsd-3)))
21765
21766 (define-public python2-astor
21767 (package-with-python2 python-astor))
21768
21769 (define-public python-astunparse
21770 (package
21771 (name "python-astunparse")
21772 (version "1.6.2")
21773 (source
21774 (origin
21775 (method url-fetch)
21776 (uri (pypi-uri "astunparse" version))
21777 (sha256
21778 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
21779 (build-system python-build-system)
21780 (arguments '(#:tests? #f)) ; there are none
21781 (propagated-inputs
21782 `(("python-six" ,python-six)
21783 ("python-wheel" ,python-wheel)))
21784 (home-page "https://github.com/simonpercivall/astunparse")
21785 (synopsis "AST unparser for Python")
21786 (description "This package provides an AST unparser for Python. It is a
21787 factored out version of @code{unparse} found in the Python source
21788 distribution.")
21789 (license license:bsd-3)))
21790
21791 (define-public python-gast
21792 (package
21793 (name "python-gast")
21794 (version "0.3.3")
21795 (source
21796 (origin
21797 (method url-fetch)
21798 (uri (pypi-uri "gast" version))
21799 (sha256
21800 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
21801 (build-system python-build-system)
21802 (propagated-inputs
21803 `(("python-astunparse" ,python-astunparse)))
21804 (home-page "https://pypi.org/project/gast/")
21805 (synopsis "Generic Python AST that abstracts the underlying Python version")
21806 (description
21807 "GAST provides a compatibility layer between the AST of various Python
21808 versions, as produced by @code{ast.parse} from the standard @code{ast}
21809 module.")
21810 (license license:bsd-3)))
21811
21812 (define-public python-wikidata
21813 (package
21814 (name "python-wikidata")
21815 (version "0.6.1")
21816 (source
21817 (origin
21818 (method url-fetch)
21819 (uri (pypi-uri "Wikidata" version))
21820 (sha256
21821 (base32
21822 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
21823 (build-system python-build-system)
21824 (propagated-inputs
21825 `(("python-babel" ,python-babel)))
21826 (home-page "https://github.com/dahlia/wikidata")
21827 (synopsis "Wikidata client library")
21828 (description
21829 "This package provides a Python interface to
21830 @url{https://www.wikidata.org/, Wikidata}.")
21831 (properties '((upstream-name . "Wikidata")))
21832 (license license:gpl3+)))
21833
21834 (define-public python-doctest-ignore-unicode
21835 (package
21836 (name "python-doctest-ignore-unicode")
21837 (version "0.1.2")
21838 (source
21839 (origin
21840 (method url-fetch)
21841 (uri (pypi-uri "doctest-ignore-unicode" version))
21842 (sha256
21843 (base32
21844 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
21845 (build-system python-build-system)
21846 (native-inputs
21847 `(("python-nose" ,python-nose)))
21848 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
21849 (synopsis "Ignore Unicode literal prefixes in doctests")
21850 (description
21851 "This package adds support for a flag to ignore Unicode literal prefixes
21852 in doctests.")
21853 (license license:asl2.0)))
21854
21855 (define-public python-attr
21856 (package
21857 (name "python-attr")
21858 (version "0.3.1")
21859 (source
21860 (origin
21861 (method url-fetch)
21862 (uri (pypi-uri "attr" version))
21863 (sha256
21864 (base32
21865 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
21866 (build-system python-build-system)
21867 (home-page "https://github.com/denis-ryzhkov/attr")
21868 (synopsis "Decorator for attributes of target function or class")
21869 (description "Simple decorator to set attributes of target function or
21870 class in a @acronym{DRY, Don't Repeat Yourself} way.")
21871 (license license:expat)))
21872
21873 (define-public python-construct
21874 (package
21875 (name "python-construct")
21876 (version "2.10.56")
21877 (source
21878 (origin
21879 (method url-fetch)
21880 (uri (pypi-uri "construct" version))
21881 (sha256
21882 (base32
21883 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
21884 (build-system python-build-system)
21885 (arguments
21886 `(#:tests? #f)) ; No tests exist.
21887 (propagated-inputs
21888 `(("python-extras" ,python-extras)
21889 ("python-arrow" ,python-arrow)
21890 ("python-numpy" ,python-numpy)
21891 ("python-ruamel.yaml" ,python-ruamel.yaml)))
21892 (home-page "https://construct.readthedocs.io")
21893 (synopsis "Declarative and symmetrical parser and builder for binary data")
21894 (description
21895 "This package provides both simple, atomic constructs (such as
21896 integers of various sizes), as well as composite ones which allow you
21897 form hierarchical and sequential structures of increasing complexity.
21898 It features bit and byte granularity, easy debugging and testing, an
21899 easy-to-extend subclass system, and lots of primitive constructs to
21900 make your work easier.")
21901 (license license:expat)))
21902
21903 (define-public python-outcome
21904 (package
21905 (name "python-outcome")
21906 (version "1.0.1")
21907 (source
21908 (origin
21909 (method url-fetch)
21910 (uri (pypi-uri "outcome" version))
21911 (sha256
21912 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
21913 (build-system python-build-system)
21914 (arguments
21915 `(#:phases
21916 (modify-phases %standard-phases
21917 (replace 'check
21918 (lambda* (#:key inputs outputs #:allow-other-keys)
21919 (add-installed-pythonpath inputs outputs)
21920 (invoke "pytest" "-vv"))))))
21921 (native-inputs
21922 `(("python-pytest" ,python-pytest)
21923 ("python-pytest-cov" ,python-pytest-cov)
21924 ("python-pytest-asyncio" ,python-pytest-asyncio)))
21925 (propagated-inputs
21926 `(("python-async-generator" ,python-async-generator)
21927 ("python-attrs" ,python-attrs)))
21928 (home-page "https://github.com/python-trio/outcome")
21929 (synopsis "Capture the outcome of Python function calls")
21930 (description
21931 "Capture the outcome of Python function calls. Extracted from the Trio
21932 project.")
21933 ;; Either license applies.
21934 (license (list license:expat license:asl2.0))))
21935
21936 (define-public python-trio
21937 (package
21938 (name "python-trio")
21939 (version "0.17.0")
21940 (source
21941 (origin
21942 (method url-fetch)
21943 (uri (pypi-uri "trio" version))
21944 (sha256
21945 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
21946 (build-system python-build-system)
21947 (arguments
21948 `(#:phases
21949 (modify-phases %standard-phases
21950 (add-before 'check 'change-home
21951 (lambda _
21952 ;; Tests require a writable home.
21953 (setenv "HOME" "/tmp")
21954 #t))
21955 (replace 'check
21956 (lambda _
21957 (invoke "pytest" "-vv" "-k"
21958 (string-append
21959 ;; This test times out.
21960 "not test_ki_protection_works"
21961 ;; Assertion errors.
21962 " and not test_guest_mode_ki"
21963 " and not test_run_in_trio_thread_ki"
21964 ;; These try to raise KeyboardInterrupt which does not work
21965 ;; in the build environment.
21966 " and not test_ki_self"
21967 " and not test_ki_wakes_us_up"
21968 ;; Failure in name resolution.
21969 " and not test_getnameinfo"
21970 " and not test_SocketType_resolve"
21971 ;; OSError: protocol not found.
21972 " and not test_getprotobyname")))))))
21973 (native-inputs
21974 `(("python-astor" ,python-astor)
21975 ("python-ipython" ,python-ipython)
21976 ("python-jedi" ,python-jedi)
21977 ("python-pylint" ,python-pylint)
21978 ("python-pyopenssl" ,python-pyopenssl)
21979 ("python-pytest" ,python-pytest)
21980 ("python-pytest-cov" ,python-pytest-cov)
21981 ("python-trustme" ,python-trustme)))
21982 (propagated-inputs
21983 `(("python-attrs" ,python-attrs)
21984 ("python-idna" ,python-idna)
21985 ("python-outcome" ,python-outcome)
21986 ("python-sniffio" ,python-sniffio)
21987 ("python-sortedcontainers"
21988 ,python-sortedcontainers)))
21989 (home-page "https://github.com/python-trio/trio")
21990 (synopsis "Friendly Python library for async concurrency and I/O")
21991 (description
21992 "Trio strives to be a production-quality, async/await-native I/O library
21993 for Python. Like all async libraries, its main purpose is to help you write
21994 programs that do multiple things at the same time with parallelized I/O.")
21995 ;; Either license applies.
21996 (license (list license:expat license:asl2.0))))
21997
21998 (define-public python-trio-typing
21999 (package
22000 (name "python-trio-typing")
22001 (version "0.5.0")
22002 (source
22003 (origin
22004 (method url-fetch)
22005 (uri (pypi-uri "trio-typing" version))
22006 (sha256
22007 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
22008 (build-system python-build-system)
22009 (arguments
22010 `(#:phases
22011 (modify-phases %standard-phases
22012 (replace 'check
22013 (lambda _
22014 (invoke "pytest" "-vv"))))))
22015 (native-inputs
22016 `(("python-attrs" ,python-attrs)
22017 ("python-pytest" ,python-pytest)))
22018 (propagated-inputs
22019 `(("python-mypy" ,python-mypy)
22020 ("python-mypy-extensions"
22021 ,python-mypy-extensions)
22022 ("python-trio" ,python-trio)
22023 ("python-typing-extensions"
22024 ,python-typing-extensions)))
22025 (home-page "https://github.com/python-trio/trio-typing")
22026 (synopsis "Static type checking support for Trio and related projects")
22027 (description
22028 "This package provides:
22029
22030 @itemize
22031 @item PEP 561 typing stubs packages for the Trio project packages:
22032
22033 @itemize
22034 @item trio (@code{trio-stubs})
22035 @item outcome (@code{outcome-stubs})
22036 @item async_generator (@code{async_generator-stubs})
22037 @end itemize
22038
22039 @item A package @code{trio_typing} containing types that Trio programs often
22040 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
22041 a mypy plugin that smooths over some limitations in the basic type hints.
22042 @end itemize")
22043 ;; Either license applies.
22044 (license (list license:expat license:asl2.0))))
22045
22046 (define-public python-humanize
22047 (package
22048 (name "python-humanize")
22049 (version "0.5.1")
22050 (source
22051 (origin
22052 (method url-fetch)
22053 (uri (pypi-uri "humanize" version))
22054 (sha256
22055 (base32
22056 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
22057 (arguments
22058 '(#:tests? #f)) ; tests not in pypi archive
22059 (build-system python-build-system)
22060 (home-page "https://github.com/jmoiron/humanize")
22061 (synopsis "Print numerical information in a human-readable form")
22062 (description "This package provides a Python module that displays numbers
22063 and dates in \"human readable\" forms. For example, it would display
22064 \"12345591313\" as \"12.3 billion\".")
22065 (license license:expat)))
22066
22067 (define-public python-txaio
22068 (package
22069 (name "python-txaio")
22070 (version "18.8.1")
22071 (source
22072 (origin
22073 (method url-fetch)
22074 (uri (pypi-uri "txaio" version))
22075 (sha256
22076 (base32
22077 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
22078 (build-system python-build-system)
22079 (propagated-inputs
22080 `(("python-twisted" ,python-twisted)
22081 ("python-six" ,python-six)))
22082 (home-page "https://github.com/crossbario/txaio")
22083 (synopsis "Compatibility layer between Python asyncio and Twisted")
22084 (description "Txaio provides a compatibility layer between the Python
22085 @code{asyncio} module and @code{Twisted}.")
22086 (license license:expat)))
22087
22088 (define-public python-toolshed
22089 (package
22090 (name "python-toolshed")
22091 (version "0.4.6")
22092 (source
22093 (origin
22094 (method url-fetch)
22095 (uri (pypi-uri "toolshed" version))
22096 (sha256
22097 (base32
22098 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
22099 (build-system python-build-system)
22100 (native-inputs
22101 `(("python-nose" ,python-nose)))
22102 (home-page "https://github.com/brentp/toolshed/")
22103 (synopsis "Collection of modules and functions for working with data")
22104 (description "This is a collection of well-tested, simple modules and
22105 functions that aim to reduce boilerplate when working with data.")
22106 (license license:bsd-2)))
22107
22108 (define-public python-annoy
22109 (package
22110 (name "python-annoy")
22111 (version "1.15.1")
22112 (source
22113 (origin
22114 (method url-fetch)
22115 (uri (pypi-uri "annoy" version))
22116 (sha256
22117 (base32
22118 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
22119 (build-system python-build-system)
22120 (native-inputs
22121 `(("python-nose" ,python-nose)))
22122 (home-page "https://github.com/spotify/annoy/")
22123 (synopsis "Approximate nearest neighbors library")
22124 (description
22125 "Annoy is a C++ library with Python bindings to search for points in
22126 space that are close to a given query point. It also creates large read-only
22127 file-based data structures that are @code{mmap}ped into memory so that many
22128 processes may share the same data.")
22129 (license license:asl2.0)))
22130
22131 (define-public python-croniter
22132 (package
22133 (name "python-croniter")
22134 (version "0.3.34")
22135 (source (origin
22136 (method url-fetch)
22137 (uri (pypi-uri "croniter" version))
22138 (sha256
22139 (base32
22140 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
22141 (build-system python-build-system)
22142 (propagated-inputs
22143 `(("python-dateutil" ,python-dateutil)
22144 ("python-natsort" ,python-natsort)))
22145 (home-page "https://github.com/kiorky/croniter")
22146 (synopsis "Iterate datetime objects with cron-like syntax")
22147 (description
22148 "@code{croniter} provides iteration for datetime object with cron-like
22149 format.")
22150 (license license:expat)))
22151
22152 (define-public python-pylzma
22153 (package
22154 (name "python-pylzma")
22155 (version "0.5.0")
22156 (source
22157 (origin
22158 (method url-fetch)
22159 (uri (pypi-uri "pylzma" version))
22160 (sha256
22161 (base32
22162 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
22163 (build-system python-build-system)
22164 (home-page "https://www.joachim-bauch.de/projects/pylzma/")
22165 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
22166 (description "This package provides Python bindings for the LZMA library
22167 by Igor Pavlov.")
22168 (license license:lgpl2.1+)))
22169
22170 (define-public python2-pylzma
22171 (package-with-python2 python-pylzma))
22172
22173 (define-public python-ifaddr
22174 (package
22175 (name "python-ifaddr")
22176 (version "0.1.7")
22177 (source
22178 (origin
22179 (method url-fetch)
22180 (uri (pypi-uri "ifaddr" version))
22181 (sha256
22182 (base32
22183 "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
22184 (build-system python-build-system)
22185 (arguments
22186 `(#:phases
22187 (modify-phases %standard-phases
22188 (replace 'check
22189 (lambda _ (invoke "nosetests"))))))
22190 (native-inputs
22191 `(("python-nose" ,python-nose)))
22192 (home-page "https://github.com/pydron/ifaddr")
22193 (synopsis "Network interface and IP address enumeration library")
22194 (description "This package provides a network interface and IP address
22195 enumeration library in Python.")
22196 (license license:expat)))
22197
22198 (define-public python-zeroconf
22199 (package
22200 (name "python-zeroconf")
22201 (version "0.28.8")
22202 (source
22203 (origin
22204 (method url-fetch)
22205 (uri (pypi-uri "zeroconf" version))
22206 (sha256
22207 (base32
22208 "0narq8haa3b375vfblbyil77n8bw0wxqnanl91pl0wwwm884mqjb"))))
22209 (build-system python-build-system)
22210 (native-inputs
22211 `(("python-nose" ,python-nose)))
22212 (propagated-inputs
22213 `(("python-ifaddr" ,python-ifaddr)))
22214 (arguments
22215 `(#:phases
22216 (modify-phases %standard-phases
22217 (replace 'check
22218 (lambda _ ;; Networking isn't available for these tests.
22219 (invoke "nosetests" "-v"
22220 "--exclude" "test_integration_with_listener_ipv6"
22221 "--exclude" "test_launch_and_close_v6_only"
22222 "--exclude" "test_launch_and_close_v4_v6"
22223 "--exclude" "test_launch_and_close"))))))
22224 (home-page "https://github.com/jstasiak/python-zeroconf")
22225 (synopsis "Pure Python mDNS service discovery")
22226 (description
22227 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22228 compatible).")
22229 (license license:lgpl2.1+)))
22230
22231 (define-public python2-zeroconf
22232 (package
22233 (name "python2-zeroconf")
22234
22235 ;; This is the last version that supports Python 2.x.
22236 (version "0.19.1")
22237 (source
22238 (origin
22239 (method url-fetch)
22240 (uri (pypi-uri "zeroconf" version))
22241 (sha256
22242 (base32
22243 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
22244 (build-system python-build-system)
22245 (arguments
22246 `(#:python ,python-2
22247 #:phases
22248 (modify-phases %standard-phases
22249 (add-after 'unpack 'patch-requires
22250 (lambda* (#:key inputs #:allow-other-keys)
22251 (substitute* "setup.py"
22252 (("enum-compat")
22253 "enum34"))
22254 #t)))))
22255 (native-inputs
22256 `(("python2-six" ,python2-six)
22257 ("python2-enum32" ,python2-enum34)
22258 ("python2-netifaces" ,python2-netifaces)
22259 ("python2-typing" ,python2-typing)))
22260 (home-page "https://github.com/jstasiak/python-zeroconf")
22261 (synopsis "Pure Python mDNS service discovery")
22262 (description
22263 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
22264 compatible).")
22265 (license license:lgpl2.1+)))
22266
22267 (define-public python-bsddb3
22268 (package
22269 (name "python-bsddb3")
22270 (version "6.2.6")
22271 (source
22272 (origin
22273 (method url-fetch)
22274 (uri (pypi-uri "bsddb3" version))
22275 (sha256
22276 (base32
22277 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
22278 (build-system python-build-system)
22279 (inputs
22280 `(("bdb" ,bdb)))
22281 (arguments
22282 '(#:phases
22283 (modify-phases %standard-phases
22284 (add-after 'unpack 'configure-locations
22285 (lambda* (#:key inputs #:allow-other-keys)
22286 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
22287 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
22288 #t))
22289 (replace 'check
22290 (lambda _
22291 (invoke "python3" "test3.py" "-v"))))))
22292 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
22293 (synopsis "Python bindings for Oracle Berkeley DB")
22294 (description
22295 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
22296 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
22297 Transaction objects, and each of these is exposed as a Python type in the
22298 bsddb3.db module. The database objects can use various access methods: btree,
22299 hash, recno, and queue. Complete support of Berkeley DB distributed
22300 transactions. Complete support for Berkeley DB Replication Manager.
22301 Complete support for Berkeley DB Base Replication. Support for RPC.")
22302 (license license:bsd-3)))
22303
22304 (define-public python-dbfread
22305 (package
22306 (name "python-dbfread")
22307 (version "2.0.7")
22308 (source (origin
22309 (method url-fetch)
22310 (uri (pypi-uri "dbfread" version))
22311 (sha256
22312 (base32
22313 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
22314 (build-system python-build-system)
22315 (native-inputs
22316 `(("python-pytest" ,python-pytest)))
22317 (home-page "https://dbfread.readthedocs.io")
22318 (synopsis "Read DBF Files with Python")
22319 (description
22320 "This library reads DBF files and returns the data as native Python data
22321 types for further processing. It is primarily intended for batch jobs and
22322 one-off scripts.")
22323 (license license:expat)))
22324
22325 (define-public python-cached-property
22326 (package
22327 (name "python-cached-property")
22328 (version "1.5.2")
22329 (source
22330 (origin
22331 (method url-fetch)
22332 (uri (pypi-uri "cached-property" version))
22333 (sha256
22334 (base32
22335 "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
22336 (build-system python-build-system)
22337 (arguments
22338 `(#:phases
22339 (modify-phases %standard-phases
22340 ;; https://github.com/pydanny/cached-property/issues/131
22341 ;; recent versions of freezegun break one test
22342 (add-after 'unpack 'disable-broken-test
22343 (lambda _
22344 (substitute* "tests/test_cached_property.py"
22345 (("def test_threads_ttl_expiry\\(self\\)" m)
22346 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
22347 " " m)))
22348 #t)))))
22349 (native-inputs
22350 `(("python-freezegun" ,python-freezegun)))
22351 (home-page
22352 "https://github.com/pydanny/cached-property")
22353 (synopsis
22354 "Decorator for caching properties in classes")
22355 (description
22356 "This package provides a decorator which makes caching
22357 time-or-computationally-expensive properties quick and easy and works in Python
22358 2 or 3.")
22359 (license license:bsd-3)))
22360
22361 (define-public python-folium
22362 (package
22363 (name "python-folium")
22364 (version "0.12.1")
22365 (source
22366 (origin
22367 ;; PyPI has a ".whl" file but not a proper source release.
22368 ;; Thus, fetch code from Git.
22369 (method git-fetch)
22370 (uri (git-reference
22371 (url "https://github.com/python-visualization/folium")
22372 (commit (string-append "v" version))))
22373 (file-name (git-file-name name version))
22374 (sha256
22375 (base32 "0yi5y9pfpbc4bc4ibr8cblif8ls1wf3k0zawyx86r2qwxxkkyd6k"))))
22376 (build-system python-build-system)
22377 (propagated-inputs
22378 `(("python-branca" ,python-branca)
22379 ("python-jinja2" ,python-jinja2)
22380 ("python-numpy" ,python-numpy)
22381 ("python-requests" ,python-requests)))
22382 (native-inputs
22383 `(("python-pytest" ,python-pytest)))
22384 (home-page "https://github.com/python-visualization/folium")
22385 (synopsis "Make beautiful maps with Leaflet.js & Python")
22386 (description "@code{folium} makes it easy to visualize data that’s been
22387 manipulated in Python on an interactive leaflet map. It enables both the
22388 binding of data to a map for @code{choropleth} visualizations as well as
22389 passing rich vector/raster/HTML visualizations as markers on the map.
22390
22391 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
22392 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
22393 supports Image, Video, GeoJSON and TopoJSON overlays.")
22394 (license license:expat)))
22395
22396 (define-public jube
22397 (package
22398 ;; This is a command-line tool, so no "python-" prefix.
22399 (name "jube")
22400 (version "2.2.2")
22401 (source (origin
22402 (method url-fetch)
22403 (uri (string-append
22404 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
22405 version))
22406 (sha256
22407 (base32
22408 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
22409 (file-name (string-append "jube-" version ".tar.gz"))))
22410 (build-system python-build-system)
22411 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
22412 (synopsis "Benchmarking environment")
22413 (description
22414 "JUBE helps perform and analyze benchmarks in a systematic way. For each
22415 benchmarked application, benchmark data is stored in a format that allows JUBE
22416 to deduct the desired information. This data can be parsed by automatic pre-
22417 and post-processing scripts that draw information and store it more densely
22418 for manual interpretation.")
22419 (license license:gpl3+)))
22420
22421 (define-public python-pyroutelib3
22422 (package
22423 (name "python-pyroutelib3")
22424 (version "1.3.post1")
22425 (source
22426 (origin
22427 (method url-fetch)
22428 (uri (pypi-uri "pyroutelib3" version))
22429 (sha256
22430 (base32
22431 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
22432 (build-system python-build-system)
22433 (propagated-inputs
22434 `(("python-dateutil" ,python-dateutil)))
22435 (home-page "https://github.com/MKuranowski/pyroutelib3")
22436 (synopsis "Library for simple routing on OSM data")
22437 (description "Library for simple routing on OSM data")
22438 (license license:gpl3+)))
22439
22440 (define-public python-bibtexparser
22441 (package
22442 (name "python-bibtexparser")
22443 (version "1.1.0")
22444 (source
22445 (origin
22446 (method url-fetch)
22447 (uri (pypi-uri "bibtexparser" version))
22448 (sha256
22449 (base32
22450 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
22451 (build-system python-build-system)
22452 (propagated-inputs
22453 `(("python-pyparsing" ,python-pyparsing)))
22454 (native-inputs
22455 `(("python-future" ,python-future)))
22456 (home-page "https://github.com/sciunto-org/python-bibtexparser")
22457 (synopsis "Python library to parse BibTeX files")
22458 (description "BibtexParser is a Python library to parse BibTeX files.")
22459 (license (list license:bsd-3 license:lgpl3))))
22460
22461 (define-public python-distro
22462 (package
22463 (name "python-distro")
22464 (version "1.4.0")
22465 (source
22466 (origin
22467 (method url-fetch)
22468 (uri (pypi-uri "distro" version))
22469 (sha256
22470 (base32
22471 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
22472 (build-system python-build-system)
22473 (native-inputs
22474 `(("python-pytest" ,python-pytest)))
22475 (home-page "https://github.com/nir0s/distro")
22476 (synopsis
22477 "OS platform information API")
22478 (description
22479 "@code{distro} provides information about the OS distribution it runs on,
22480 such as a reliable machine-readable ID, or version information.
22481
22482 It is the recommended replacement for Python's original
22483 `platform.linux_distribution` function (which will be removed in Python 3.8).
22484 @code{distro} also provides a command-line interface to output the platform
22485 information in various formats.")
22486 (license license:asl2.0)))
22487
22488 (define-public python-cairosvg
22489 (package
22490 (name "python-cairosvg")
22491 (version "2.5.0")
22492 (source
22493 (origin
22494 (method url-fetch)
22495 (uri (pypi-uri "CairoSVG" version))
22496 (sha256
22497 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
22498 (build-system python-build-system)
22499 (arguments
22500 `(#:phases
22501 (modify-phases %standard-phases
22502 (replace 'check
22503 (lambda _ (invoke "pytest"))))))
22504 (propagated-inputs
22505 `(("python-cairocffi" ,python-cairocffi)
22506 ("python-cssselect2" ,python-cssselect2)
22507 ("python-defusedxml" ,python-defusedxml)
22508 ("python-pillow" ,python-pillow)
22509 ("python-tinycss2" ,python-tinycss2)))
22510 (native-inputs
22511 `(("python-pytest-flake8" ,python-pytest-flake8)
22512 ("python-pytest-isort" ,python-pytest-isort)
22513 ("python-pytest-runner" ,python-pytest-runner)))
22514 (home-page "https://cairosvg.org/")
22515 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
22516 (description "CairoSVG is a SVG converter based on Cairo. It can export
22517 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
22518 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
22519 parsed, the result is drawn to a Cairo surface that can be exported to
22520 qvarious formats: PDF, PostScript, PNG and even SVG.")
22521 (license license:lgpl3+)))
22522
22523 (define-public python-pyphen
22524 (package
22525 (name "python-pyphen")
22526 (version "0.10.0")
22527 (source
22528 (origin
22529 (method url-fetch)
22530 (uri (pypi-uri "Pyphen" version))
22531 (sha256
22532 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
22533 (build-system python-build-system)
22534 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
22535 ;; embedded set provided by upstream - like Debian does.
22536 (home-page "https://github.com/Kozea/Pyphen")
22537 (synopsis "Pure Python module to hyphenate text")
22538 (description "Pyphen is a pure Python module to hyphenate text using
22539 existing Hunspell hyphenation dictionaries.")
22540 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
22541
22542 (define-public python-intelhex
22543 (package
22544 (name "python-intelhex")
22545 (version "2.2.1")
22546 (source
22547 (origin
22548 (method url-fetch)
22549 (uri (pypi-uri "intelhex" version))
22550 (sha256
22551 (base32
22552 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
22553 (build-system python-build-system)
22554 (arguments '(#:tests? #f)) ;issue with version
22555 (home-page "https://pypi.org/project/IntelHex/")
22556 (synopsis "Python library for Intel HEX files manipulations")
22557 (description "The Intel HEX file format is widely used in microprocessors
22558 and microcontrollers area (embedded systems etc.) as the de facto standard for
22559 representation of code to be programmed into microelectronic devices. This
22560 package provides an intelhex Python library to read, write, create from
22561 scratch and manipulate data from Intel HEX file format. It also includes
22562 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
22563 converters and more, those based on the library itself.")
22564 (license license:bsd-3)))
22565
22566 (define-public python-pykwalify
22567 (package
22568 (name "python-pykwalify")
22569 (version "1.7.0")
22570 (source
22571 (origin
22572 (method url-fetch)
22573 (uri (pypi-uri "pykwalify" version))
22574 (sha256
22575 (base32
22576 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
22577 (build-system python-build-system)
22578 (arguments '(#:tests? #f)) ;missing dependencies
22579 (propagated-inputs
22580 `(("python-dateutil" ,python-dateutil)
22581 ("python-docopt" ,python-docopt)
22582 ("python-pyyaml" ,python-pyyaml)))
22583 (home-page "https://github.com/grokzen/pykwalify")
22584 (synopsis
22585 "Python lib/cli for JSON/YAML schema validation")
22586 (description
22587 "This package provides a parser, schema validator, and data binding tool
22588 for YAML and JSON.")
22589 (license license:expat)))
22590
22591 (define-public python-dbusmock
22592 (package
22593 (name "python-dbusmock")
22594 (version "0.18.3")
22595 (source
22596 (origin
22597 (method url-fetch)
22598 (uri (pypi-uri "python-dbusmock" version))
22599 (sha256
22600 (base32
22601 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
22602 (build-system python-build-system)
22603 (arguments
22604 '(#:phases
22605 (modify-phases %standard-phases
22606 (add-after 'unpack 'patch-shell-path
22607 (lambda _
22608 (substitute* "tests/test_code.py"
22609 (("/bin/bash") (which "bash")))
22610 #t)))))
22611 (native-inputs
22612 `(;; For tests.
22613 ("dbus" ,dbus) ; for dbus-daemon
22614 ("python-nose" ,python-nose)
22615 ("which" ,which)))
22616 (propagated-inputs
22617 `(("python-dbus" ,python-dbus)
22618 ("python-pygobject" ,python-pygobject)))
22619 (home-page "https://github.com/martinpitt/python-dbusmock")
22620 (synopsis "Python library for mock D-Bus objects")
22621 (description "python-dbusmock allows for the easy creation of mock objects on
22622 D-Bus. This is useful for writing tests for software which talks to D-Bus
22623 services such as upower, systemd, logind, gnome-session or others, and it is
22624 hard (or impossible without root privileges) to set the state of the real
22625 services to what you expect in your tests.")
22626 (license license:lgpl3+)))
22627
22628 (define-public python-jsonplus
22629 (package
22630 (name "python-jsonplus")
22631 (version "0.8.0")
22632 (home-page "https://github.com/randomir/jsonplus")
22633 (source (origin
22634 (method url-fetch)
22635 (uri (pypi-uri "jsonplus" version))
22636 (sha256
22637 (base32
22638 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
22639 (build-system python-build-system)
22640 ;; XXX: No tests on PyPI, and the repository has no tags.
22641 (arguments '(#:tests? #f))
22642 (propagated-inputs
22643 `(("python-dateutil" ,python-dateutil)
22644 ("python-simplejson" ,python-simplejson)
22645 ("python-sortedcontainers" ,python-sortedcontainers)))
22646 (synopsis "Serialize Python types to/from JSON")
22647 (description
22648 "This package provides functionality to serialize arbitrary data types
22649 to and from JSON. Common data types are implemented and it is easy to
22650 register custom encoders and decoders.")
22651 (license license:expat)))
22652
22653 (define-public python-ujson
22654 (package
22655 (name "python-ujson")
22656 (version "4.0.2")
22657 (source
22658 (origin
22659 (method url-fetch)
22660 (uri (pypi-uri "ujson" version))
22661 (sha256
22662 (base32
22663 "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
22664 (modules '((guix build utils)))
22665 (snippet
22666 '(begin (delete-file-recursively "deps") #t))))
22667 (build-system python-build-system)
22668 (arguments
22669 `(#:phases
22670 (modify-phases %standard-phases
22671 (add-after 'unpack 'link-to-system-double-conversion
22672 (lambda* (#:key inputs #:allow-other-keys)
22673 (let ((d-c (assoc-ref inputs "double-conversion")))
22674 (substitute* "setup.py"
22675 (("./deps/double-conversion/double-conversion\"")
22676 (string-append d-c "/include/double-conversion\""))
22677 (("-lstdc++" stdc)
22678 (string-append "-L" d-c "/lib\","
22679 " \"-ldouble-conversion\","
22680 " \"" stdc)))
22681 #t)))
22682 (replace 'check
22683 (lambda* (#:key inputs outputs #:allow-other-keys)
22684 (add-installed-pythonpath inputs outputs)
22685 (invoke "pytest"))))))
22686 (native-inputs
22687 `(("double-conversion" ,double-conversion)
22688 ("python-setuptools-scm" ,python-setuptools-scm)
22689 ("python-pytest" ,python-pytest)))
22690 (home-page "https://github.com/ultrajson/ultrajson")
22691 (synopsis "Ultra fast JSON encoder and decoder for Python")
22692 (description
22693 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
22694 bindings for Python 3.")
22695 (license license:bsd-3)))
22696
22697 (define-public python-iocapture
22698 ;; The latest release is more than a year older than this commit.
22699 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
22700 (revision "1"))
22701 (package
22702 (name "python-iocapture")
22703 (version "0.1.2")
22704 (source
22705 (origin
22706 (method git-fetch)
22707 (uri (git-reference
22708 (url "https://github.com/oinume/iocapture")
22709 (commit commit)))
22710 (file-name (git-file-name name version))
22711 (sha256
22712 (base32
22713 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
22714 (build-system python-build-system)
22715 (arguments
22716 `(#:phases
22717 (modify-phases %standard-phases
22718 (delete 'check)
22719 (add-after 'install 'check
22720 (lambda* (#:key inputs outputs #:allow-other-keys)
22721 (add-installed-pythonpath inputs outputs)
22722 (invoke "py.test" "-v" "tests")
22723 #t)))))
22724 (propagated-inputs
22725 `(("python-flexmock" ,python-flexmock)
22726 ("python-pytest" ,python-pytest)
22727 ("python-pytest-cov" ,python-pytest-cov)
22728 ("python-six" ,python-six)))
22729 (home-page "https://github.com/oinume/iocapture")
22730 (synopsis "Python capturing tool for stdout and stderr")
22731 (description
22732 "This package helps you to capture the standard out (stdout) and the
22733 standard error channel (stderr) in your program.")
22734 (license license:expat))))
22735
22736 (define-public python-argh
22737 ;; There are 21 commits since the latest release containing important
22738 ;; improvements.
22739 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
22740 (revision "1"))
22741 (package
22742 (name "python-argh")
22743 (version (git-version "0.26.2" revision commit))
22744 (source
22745 (origin
22746 (method git-fetch)
22747 (uri (git-reference
22748 (url "https://github.com/neithere/argh")
22749 (commit commit)))
22750 (file-name (git-file-name name version))
22751 (sha256
22752 (base32
22753 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
22754 (build-system python-build-system)
22755 (propagated-inputs
22756 `(("python-iocapture" ,python-iocapture)
22757 ("python-mock" ,python-mock)
22758 ("python-pytest" ,python-pytest)
22759 ("python-pytest-cov" ,python-pytest-cov)
22760 ("python-pytest-xdist" ,python-pytest-xdist)))
22761 (home-page "https://github.com/neithere/argh/")
22762 (synopsis "Argparse wrapper with natural syntax")
22763 (description
22764 "python-argh is a small library that provides several layers of
22765 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
22766 always possible to declare a command with the highest possible (and least
22767 flexible) layer and then tune the behaviour with any of the lower layers
22768 including the native API of @code{python-argparse}.")
22769 (license license:lgpl3+))))
22770
22771 (define-public python-ppft
22772 (package
22773 (name "python-ppft")
22774 (version "1.6.6.1")
22775 (source
22776 (origin
22777 (method url-fetch)
22778 (uri (pypi-uri "ppft" version))
22779 (sha256
22780 (base32
22781 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
22782 (build-system python-build-system)
22783 (arguments '(#:tests? #f)) ; there are none
22784 (propagated-inputs
22785 `(("python-six" ,python-six)))
22786 (home-page "https://pypi.org/project/ppft/")
22787 (synopsis "Fork of Parallel Python")
22788 (description
22789 "This package is a fork of Parallel Python. The Parallel Python
22790 module (@code{pp}) provides an easy and efficient way to create
22791 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
22792 computers and clusters. It features cross-platform portability and dynamic
22793 load balancing.")
22794 (license license:bsd-3)))
22795
22796 (define-public python-pox
22797 (package
22798 (name "python-pox")
22799 (version "0.2.7")
22800 (source
22801 (origin
22802 (method url-fetch)
22803 (uri (pypi-uri "pox" version))
22804 (sha256
22805 (base32
22806 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
22807 (build-system python-build-system)
22808 (arguments
22809 `(#:phases
22810 (modify-phases %standard-phases
22811 (replace 'check
22812 (lambda _
22813 (mkdir-p "/tmp/guix")
22814 (setenv "SHELL" "bash")
22815 (setenv "USERNAME" "guix")
22816 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
22817 (invoke "py.test" "-vv")
22818 #t)))))
22819 (native-inputs
22820 `(("python-pytest" ,python-pytest)
22821 ("which" ,which)))
22822 (home-page "https://pypi.org/project/pox/")
22823 (synopsis "Python utilities for file system exploration and automated builds")
22824 (description
22825 "Pox provides a collection of utilities for navigating and manipulating
22826 file systems. This module is designed to facilitate some of the low-level
22827 operating system interactions that are useful when exploring a file system on a
22828 remote host. Pox provides Python equivalents of several shell commands such
22829 as @command{which} and @command{find}. These commands allow automated
22830 discovery of what has been installed on an operating system, and where the
22831 essential tools are located.")
22832 (license license:bsd-3)))
22833
22834 (define-public python-pathos
22835 (package
22836 (name "python-pathos")
22837 (version "0.2.5")
22838 (source
22839 (origin
22840 (method url-fetch)
22841 (uri (pypi-uri "pathos" version))
22842 (sha256
22843 (base32
22844 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
22845 (build-system python-build-system)
22846 (arguments
22847 '(#:phases
22848 (modify-phases %standard-phases
22849 (replace 'check
22850 (lambda _
22851 (setenv "PYTHONPATH"
22852 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
22853 (invoke "python" "./tests/__main__.py"))))))
22854 (propagated-inputs
22855 `(("python-dill" ,python-dill)
22856 ("python-multiprocess" ,python-multiprocess)
22857 ("python-pox" ,python-pox)
22858 ("python-ppft" ,python-ppft)))
22859 (native-inputs
22860 `(("python-pytest" ,python-pytest)))
22861 (home-page "https://pypi.org/project/pathos/")
22862 (synopsis
22863 "Parallel graph management and execution in heterogeneous computing")
22864 (description
22865 "Python-pathos is a framework for heterogeneous computing. It provides a
22866 consistent high-level interface for configuring and launching parallel
22867 computations across heterogeneous resources. Python-pathos provides configurable
22868 launchers for parallel and distributed computing, where each launcher contains
22869 the syntactic logic to configure and launch jobs in an execution environment.")
22870 (license license:bsd-3)))
22871
22872 (define-public python-flit
22873 (package
22874 (name "python-flit")
22875 (version "3.2.0")
22876 ;; We fetch the sources via git because on pypi the package is split into
22877 ;; two parts: flit and flit_core; flit_core cannot be built without flit.
22878 (source (origin
22879 (method git-fetch)
22880 (uri (git-reference
22881 (url "https://github.com/takluyver/flit")
22882 (commit version)))
22883 (file-name (git-file-name name version))
22884 (sha256
22885 (base32
22886 "0fpqxpz5bv2xpv1akmc0c8yfss6sj09wdzxrlf3qw1lp1jhbzpyc"))))
22887 (build-system python-build-system)
22888 (arguments
22889 `(#:phases
22890 (modify-phases %standard-phases
22891 (add-before 'build 'bootstrap
22892 (lambda* (#:key inputs #:allow-other-keys)
22893 (let ((home (string-append (getcwd) "/home")))
22894 (mkdir-p home)
22895 (setenv "HOME" home))
22896 (for-each make-file-writable (find-files "."))
22897 (copy-recursively (assoc-ref inputs "python-testpath")
22898 (string-append (getcwd) "/testpath"))
22899 (substitute* "pyproject.toml"
22900 (("\"testpath\",") ""))
22901 (invoke "python" "bootstrap_dev.py")))
22902 (replace 'build
22903 (lambda _
22904 ;; A ZIP archive should be generated, but it fails with "ZIP does
22905 ;; not support timestamps before 1980". Luckily,
22906 ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
22907 ;; 1980.
22908 (setenv "SOURCE_DATE_EPOCH" "315532800")
22909 (for-each (lambda (toml)
22910 (invoke "python3" "-m" "flit"
22911 "--debug" "--ini-file" toml
22912 "build"))
22913 '("testpath/pyproject.toml"
22914 "pyproject.toml"))
22915 (with-directory-excursion "flit_core"
22916 (invoke "python" "build_dists.py"))))
22917 (replace 'install
22918 (lambda* (#:key inputs outputs #:allow-other-keys)
22919 (add-installed-pythonpath inputs outputs)
22920 (let ((out (assoc-ref outputs "out")))
22921 (delete-file-recursively "./home")
22922 (for-each (lambda (wheel)
22923 (format #true wheel)
22924 (invoke "python" "-m" "pip" "install"
22925 wheel (string-append "--prefix=" out)))
22926 (append
22927 (find-files "flit_core/dist" "\\.whl$")
22928 (find-files "dist" "\\.whl$")))))))
22929 #:tests? #f)) ; XXX: Check requires network access.
22930 (propagated-inputs
22931 `(("python-pytoml" ,python-pytoml)
22932 ("python-toml" ,python-toml)))
22933 (native-inputs
22934 `(("python-docutils" ,python-docutils)
22935 ("python-responses" ,python-responses)
22936 ("python-pygments-github-lexers" ,python-pygments-github-lexers)
22937 ("python-pytest" ,python-pytest)
22938 ("python-pytest-cov" ,python-pytest-cov)
22939 ("python-sphinx" ,python-sphinx)
22940 ("python-sphinxcontrib-github-alt" ,python-sphinxcontrib-github-alt)
22941 ;; This package needs testpath, but testpath also needs flit...
22942 ("python-testpath"
22943 ,(let ((name "python-testpath")
22944 (version "0.4.4"))
22945 (origin
22946 (method git-fetch)
22947 (uri (git-reference
22948 (url "https://github.com/jupyter/testpath")
22949 (commit version)))
22950 (file-name (git-file-name name version))
22951 (sha256
22952 (base32
22953 "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk")))))))
22954 (home-page "https://flit.readthedocs.io/")
22955 (synopsis
22956 "Simple packaging tool for simple packages")
22957 (description
22958 "Flit is a simple way to put Python packages and modules on PyPI. Flit
22959 packages a single importable module or package at a time, using the import
22960 name as the name on PyPI. All subpackages and data files within a package
22961 are included automatically.")
22962 (license license:bsd-3)))
22963
22964 (define-public python-pathtools
22965 (package
22966 (name "python-pathtools")
22967 (version "0.1.2")
22968 (source
22969 (origin
22970 (method url-fetch)
22971 (uri (pypi-uri "pathtools" version))
22972 (sha256
22973 (base32
22974 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
22975 (build-system python-build-system)
22976 (home-page
22977 "https://github.com/gorakhargosh/pathtools")
22978 (synopsis "Path utilities for Python")
22979 (description "Pattern matching and various utilities for file systems
22980 paths.")
22981 (license license:expat)))
22982
22983 (define-public python-fastentrypoints
22984 (package
22985 (name "python-fastentrypoints")
22986 (version "0.12")
22987 (source
22988 (origin
22989 (method url-fetch)
22990 (uri (pypi-uri "fastentrypoints" version))
22991 (sha256
22992 (base32
22993 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
22994 (build-system python-build-system)
22995 (home-page
22996 "https://github.com/ninjaaron/fast-entry_points")
22997 (synopsis
22998 "Makes entry_points specified in setup.py load more quickly")
22999 (description
23000 "Using entry_points in your setup.py makes scripts that start really
23001 slowly because it imports pkg_resources. This package allows such setup
23002 scripts to load entry points more quickly.")
23003 (license license:bsd-3)))
23004
23005 (define-public python-funcparserlib
23006 (package
23007 (name "python-funcparserlib")
23008 (version "0.3.6")
23009 (source
23010 (origin
23011 (method url-fetch)
23012 (uri (pypi-uri "funcparserlib" version))
23013 (sha256
23014 (base32
23015 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
23016 (native-inputs
23017 `(("python-tox" ,python-tox)))
23018 (arguments
23019 `(#:phases
23020 (modify-phases %standard-phases
23021 (replace 'check
23022 (lambda _
23023 (invoke "tox"))))))
23024 (build-system python-build-system)
23025 (home-page
23026 "https://github.com/vlasovskikh/funcparserlib")
23027 (synopsis
23028 "Recursive descent parsing library based on functional combinators")
23029 (description
23030 "This package is a recursive descent parsing library for Python based on
23031 functional combinators. Parser combinators are just higher-order functions
23032 that take parsers as their arguments and return them as result values.")
23033 (license license:expat)))
23034
23035 (define-public python-speg
23036 (package
23037 (name "python-speg")
23038 (version "0.3")
23039 (source
23040 (origin
23041 (method url-fetch)
23042 (uri (pypi-uri "speg" version ".zip"))
23043 (sha256
23044 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
23045 (arguments
23046 `(#:tests? #f)) ;FIXME: tests fail, not sure why
23047 (native-inputs
23048 `(("unzip" ,unzip)))
23049 (build-system python-build-system)
23050 (home-page "https://github.com/avakar/speg")
23051 (synopsis "PEG-based parser interpreter with memoization")
23052 (description "This package is a PEG-based parser and interpreter with
23053 memoization.")
23054 (license license:expat)))
23055
23056 (define-public python-cson
23057 (package
23058 (name "python-cson")
23059 (version "0.8")
23060 (source
23061 (origin
23062 (method url-fetch)
23063 (uri (pypi-uri "cson" version))
23064 (sha256
23065 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
23066 (build-system python-build-system)
23067 (propagated-inputs
23068 `(("python-speg" ,python-speg)))
23069 (home-page "https://github.com/avakar/pycson")
23070 (synopsis "Parser for Coffeescript Object Notation (CSON)")
23071 (description "This package is a parser for Coffeescript Object
23072 Notation (CSON).")
23073 (license license:expat)))
23074
23075 (define-public python-asynctest
23076 (package
23077 (name "python-asynctest")
23078 (version "0.13.0")
23079 (source
23080 (origin
23081 (method url-fetch)
23082 (uri (pypi-uri "asynctest" version))
23083 (sha256
23084 (base32
23085 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
23086 (build-system python-build-system)
23087 (arguments
23088 '(#:phases
23089 (modify-phases %standard-phases
23090 (replace 'check
23091 (lambda _
23092 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
23093 (add-after 'unpack 'disable-tests
23094 (lambda* _
23095 ;; XXX: 7 tests fail out of 220. Disable them for now.
23096 (substitute* (list "test/test_selector.py"
23097 "test/test_mock.py")
23098 (("def test_events_watched_outside_test_are_ignored")
23099 "@unittest.skip('disabled by guix')
23100 def test_events_watched_outside_test_are_ignored")
23101 (("def test_awaited_from_autospec_mock.*" line)
23102 (string-append line " return True\n"))
23103 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
23104 (string-append line " return True\n"))
23105 (("def test_patch_coroutine_with_multiple_scopes.*" line)
23106 (string-append line " return True\n"))
23107 (("def test_multiple_patches_on_coroutine.*" line)
23108 (string-append line " return True\n"))
23109 (("def test_patch_coroutine_only_when_running.*" line)
23110 (string-append line " return True\n")))
23111 #t)))))
23112 (home-page "https://github.com/Martiusweb/asynctest")
23113 (synopsis "Extension of unittest for testing asyncio libraries")
23114 (description
23115 "The package asynctest is built on top of the standard unittest module
23116 and cuts down boilerplate code when testing libraries for asyncio.")
23117 (license license:asl2.0)))
23118
23119 (define-public python-aionotify
23120 (package
23121 (name "python-aionotify")
23122 (version "0.2.0")
23123 (source
23124 (origin
23125 ;; Source tarball on PyPi lacks tests
23126 (method git-fetch)
23127 (uri (git-reference
23128 (url "https://github.com/rbarrois/aionotify")
23129 (commit (string-append "v" version))))
23130 (file-name (git-file-name name version))
23131 (sha256
23132 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
23133 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
23134 (build-system python-build-system)
23135 (home-page "https://github.com/rbarrois/aionotify")
23136 (synopsis "Asyncio-powered inotify library")
23137 (description
23138 "@code{aionotify} is a simple, asyncio-based inotify library.")
23139 (license license:bsd-3)))
23140
23141 (define-public python-forbiddenfruit
23142 (package
23143 (name "python-forbiddenfruit")
23144 (version "0.1.3")
23145 (source
23146 (origin
23147 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
23148 (method git-fetch)
23149 (uri (git-reference
23150 (url "https://github.com/clarete/forbiddenfruit")
23151 (commit version)))
23152 (file-name (git-file-name name version))
23153 (sha256
23154 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
23155 (build-system python-build-system)
23156 (arguments
23157 '(#:phases
23158 (modify-phases %standard-phases
23159 (replace 'check
23160 (lambda _
23161 (invoke "make" "SKIP_DEPS=1"))))))
23162 (native-inputs
23163 `(("python-nose" ,python-nose)
23164 ("python-coverage" ,python-coverage)))
23165 (home-page "https://github.com/clarete/forbiddenfruit")
23166 (synopsis "Patch python built-in objects")
23167 (description "This project allows Python code to extend built-in types.")
23168 (license (list license:gpl3+ license:expat))))
23169
23170 (define-public python-k5test
23171 (package
23172 (name "python-k5test")
23173 (version "0.9.2")
23174 (source
23175 (origin
23176 (method url-fetch)
23177 (uri (pypi-uri "k5test" version))
23178 (sha256
23179 (base32
23180 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
23181 (build-system python-build-system)
23182 (propagated-inputs
23183 `(("python-six" ,python-six)
23184 ;; `which`, `kadmin.local` binaries called inside library
23185 ("which" ,which)
23186 ("mit-krb5" ,mit-krb5)))
23187 (native-inputs `(("mit-krb5" ,mit-krb5)))
23188 (arguments
23189 '(#:phases
23190 (modify-phases %standard-phases
23191 (add-after 'unpack 'apply-upstream-fixes
23192 (lambda* _
23193 (substitute* "k5test/realm.py"
23194 ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
23195 (("'kadmin_local'") "'kadmin.local'")
23196 ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
23197 (("\\.stop_daemon") "._stop_daemon")))))))
23198 (home-page "https://github.com/pythongssapi/k5test")
23199 (synopsis "Library for setting up self-contained Kerberos 5 environments")
23200 (description
23201 "@code{k5test} is a library for setting up self-contained Kerberos 5
23202 environments, and running Python unit tests inside those environments. It is
23203 based on the file of the same name found alongside the MIT Kerberos 5 unit
23204 tests.")
23205 (license license:isc)))
23206
23207 (define-public python-gssapi
23208 (package
23209 (name "python-gssapi")
23210 (version "1.6.12")
23211 (source
23212 (origin
23213 (method url-fetch)
23214 (uri (pypi-uri "gssapi" version))
23215 (sha256
23216 (base32
23217 "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
23218 (build-system python-build-system)
23219 (propagated-inputs
23220 `(("python-decorator" ,python-decorator)
23221 ("python-six" ,python-six)))
23222 (inputs
23223 `(("mit-krb5" ,mit-krb5)))
23224 ;; for tests
23225 (native-inputs
23226 `(("python-parameterized" ,python-parameterized)
23227 ("python-k5test" ,python-k5test)
23228 ("python-nose" ,python-nose)))
23229 (home-page "https://github.com/pythongssapi/python-gssapi")
23230 (synopsis "Python GSSAPI Wrapper")
23231 (description
23232 "Python-GSSAPI provides both low-level and high level wrappers around the
23233 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
23234 also be usable with other GSSAPI mechanisms.")
23235 (license license:isc)))
23236
23237 (define-public python-check-manifest
23238 (package
23239 (name "python-check-manifest")
23240 (version "0.37")
23241 (source
23242 (origin
23243 (method url-fetch)
23244 (uri (pypi-uri "check-manifest" version))
23245 (sha256
23246 (base32
23247 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
23248 (build-system python-build-system)
23249 (native-inputs
23250 `(("python-mock" ,python-mock)
23251 ("git" ,git)))
23252 (home-page "https://github.com/mgedmin/check-manifest")
23253 (synopsis "Check MANIFEST.in in a Python source package for completeness")
23254 (description "Python package can include a MANIFEST.in file to help with
23255 sending package files to the Python Package Index. This package checks that
23256 file to ensure it completely and accurately describes your project.")
23257 (license license:expat)))
23258
23259 (define-public python-android-stringslib
23260 (package
23261 (name "python-android-stringslib")
23262 (version "0.1.2")
23263 (source
23264 (origin
23265 (method git-fetch)
23266 (uri (git-reference
23267 (url "https://framagit.org/tyreunom/python-android-strings-lib")
23268 (commit (string-append "v" version))))
23269 (file-name (git-file-name name version))
23270 (sha256
23271 (base32
23272 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
23273 (build-system python-build-system)
23274 (arguments
23275 `(#:tests? #f))
23276 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
23277 (synopsis "Android strings.xml support")
23278 (description "Android Strings Lib provides support for android's strings.xml
23279 files. These files are used to translate strings in android apps.")
23280 (license license:expat)))
23281
23282 (define-public python-watchdog
23283 (package
23284 (name "python-watchdog")
23285 (version "0.9.0")
23286 (source
23287 (origin
23288 (method url-fetch)
23289 (uri (pypi-uri "watchdog" version))
23290 (sha256
23291 (base32
23292 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
23293 (build-system python-build-system)
23294 (arguments
23295 `(#:phases
23296 (modify-phases %standard-phases
23297 (add-before 'check 'remove-failing
23298 (lambda _
23299 (delete-file "tests/test_inotify_buffer.py")
23300 (delete-file "tests/test_snapshot_diff.py")
23301 #t)))))
23302 (propagated-inputs
23303 `(("python-argh" ,python-argh)
23304 ("python-pathtools" ,python-pathtools)
23305 ("python-pyyaml" ,python-pyyaml)))
23306 (native-inputs
23307 `(("python-pytest-cov" ,python-pytest-cov)
23308 ("python-pytest-timeout" ,python-pytest-timeout)))
23309 (home-page "https://github.com/gorakhargosh/watchdog")
23310 (synopsis "File system events monitoring")
23311 (description "This package provides a way to monitor file system events
23312 such as a file modification and trigger an action. This is similar to inotify,
23313 but portable.")
23314 (license license:asl2.0)))
23315
23316 (define-public python-watchgod
23317 (package
23318 (name "python-watchgod")
23319 (version "0.6")
23320 (source
23321 (origin
23322 ;; There are no tests in the PyPI tarball.
23323 (method git-fetch)
23324 (uri (git-reference
23325 (url "https://github.com/samuelcolvin/watchgod")
23326 (commit (string-append "v" version))))
23327 (file-name (git-file-name name version))
23328 (sha256
23329 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
23330 (build-system python-build-system)
23331 (arguments
23332 `(#:phases
23333 (modify-phases %standard-phases
23334 (replace 'check
23335 (lambda _
23336 (invoke "pytest" "-vv"))))))
23337 (native-inputs
23338 `(("python-coverage" ,python-coverage)
23339 ("python-docutils" ,python-docutils)
23340 ("python-flake8" ,python-flake8)
23341 ("python-isort" ,python-isort)
23342 ("python-pycodestyle" ,python-pycodestyle)
23343 ("python-pyflakes" ,python-pyflakes)
23344 ("python-pygments" ,python-pygments)
23345 ("python-pytest" ,python-pytest)
23346 ("python-pytest-cov" ,python-pytest-cov)
23347 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
23348 ("python-pytest-mock" ,python-pytest-mock)
23349 ("python-pytest-sugar" ,python-pytest-sugar)
23350 ("python-pytest-toolbox" ,python-pytest-toolbox)))
23351 (home-page "https://github.com/samuelcolvin/watchgod")
23352 (synopsis "Simple, modern file watching and code reload in Python")
23353 (description
23354 "Simple, modern file watching and code reload in Python inspired by
23355 @code{watchdog}. Among the differences are a unified approach for each
23356 operating systems and an elegant approach to concurrency using threading.")
23357 (license license:expat)))
23358
23359 (define-public python-wget
23360 (package
23361 (name "python-wget")
23362 (version "3.2")
23363 (source
23364 (origin
23365 (method url-fetch)
23366 (uri (pypi-uri "wget" version ".zip"))
23367 (sha256
23368 (base32
23369 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
23370 (build-system python-build-system)
23371 (native-inputs `(("unzip" ,unzip)))
23372 (home-page "https://bitbucket.org/techtonik/python-wget/")
23373 (synopsis "Pure Python download utility")
23374 (description "The python-wget library provides an API to download files
23375 with features similar to the @command{wget} utility.")
23376 (license license:unlicense)))
23377
23378 (define-public offlate
23379 (package
23380 (name "offlate")
23381 (version "0.5")
23382 (source
23383 (origin
23384 (method git-fetch)
23385 (uri (git-reference
23386 (url "https://framagit.org/tyreunom/offlate")
23387 (commit version)))
23388 (file-name (git-file-name name version))
23389 (sha256
23390 (base32
23391 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
23392 (build-system python-build-system)
23393 (arguments
23394 ;; No tests
23395 `(#:tests? #f))
23396 (propagated-inputs
23397 `(("python-android-stringslib" ,python-android-stringslib)
23398 ("python-dateutil" ,python-dateutil)
23399 ("python-gitlab" ,python-gitlab)
23400 ("python-lxml" ,python-lxml)
23401 ("python-polib" ,python-polib)
23402 ("python-pyenchant" ,python-pyenchant)
23403 ("python-pygit2" ,python-pygit2)
23404 ("python-pygithub" ,python-pygithub)
23405 ("python-pyqt" ,python-pyqt)
23406 ("python-requests" ,python-requests)
23407 ("python-ruamel.yaml" ,python-ruamel.yaml)
23408 ("python-translation-finder" ,python-translation-finder)
23409 ("python-watchdog" ,python-watchdog)))
23410 (native-inputs
23411 `(("qttools" ,qttools)))
23412 (home-page "https://framagit.org/tyreunom/offlate")
23413 (synopsis "Offline translation interface for online translation tools")
23414 (description "Offlate offers a unified interface for different translation
23415 file formats, as well as many different online translation platforms. You can
23416 use it to get work from online platforms, specialized such as the Translation
23417 Project, or not such a gitlab instance when your upstream doesn't use any
23418 dedicated platform. The tool proposes a unified interface for any format and
23419 an upload option to send your work back to the platform.")
23420 (license license:gpl3+)))
23421
23422 (define-public python-titlecase
23423 (package
23424 (name "python-titlecase")
23425 (version "0.12.0")
23426 (source
23427 (origin
23428 (method url-fetch)
23429 (uri (pypi-uri "titlecase" version))
23430 (sha256
23431 (base32
23432 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
23433 (build-system python-build-system)
23434 (native-inputs
23435 `(("python-nose" ,python-nose)))
23436 (home-page "https://github.com/ppannuto/python-titlecase")
23437 (synopsis "Capitalize strings similar to book titles")
23438 (description
23439 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
23440 It capitalizes (predominantly English) strings in a way that is similar to
23441 book titles, using the New York Times Manual of Style to leave certain words
23442 lowercase.")
23443 (license license:expat)))
23444
23445 (define-public python-pypng
23446 (package
23447 (name "python-pypng")
23448 (version "0.0.20")
23449 (source
23450 (origin
23451 (method url-fetch)
23452 (uri (pypi-uri "pypng" version))
23453 (sha256
23454 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
23455 (build-system python-build-system)
23456 (home-page "https://github.com/drj11/pypng")
23457 (synopsis "Pure Python PNG image encoder/decoder")
23458 (description
23459 "The PyPNG module implements support for PNG images. It reads and writes
23460 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
23461 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
23462 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
23463 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
23464 A number of optional chunks can be specified (when writing) and
23465 understood (when reading): tRNS, bKGD, gAMA.
23466
23467 PyPNG is not a high level toolkit for image processing (like PIL) and does not
23468 aim at being a replacement or competitor. Its strength lies in fine-grained
23469 extensive support of PNG features. It can also read and write Netpbm PAM
23470 files, with a focus on its use as an intermediate format for implementing
23471 custom PNG processing.")
23472 (license license:expat)))
23473
23474 (define-public python-fuzzywuzzy
23475 (package
23476 (name "python-fuzzywuzzy")
23477 (version "0.18.0")
23478 (source
23479 (origin
23480 (method url-fetch)
23481 (uri (pypi-uri "fuzzywuzzy" version))
23482 (sha256
23483 (base32
23484 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
23485 (build-system python-build-system)
23486 (native-inputs
23487 `(("python-hypothesis" ,python-hypothesis)
23488 ("python-pycodestyle" ,python-pycodestyle)
23489 ("python-pytest" ,python-pytest)))
23490 (propagated-inputs
23491 `(("python-levenshtein" ,python-levenshtein)))
23492 (home-page "https://github.com/seatgeek/fuzzywuzzy")
23493 (synopsis "Fuzzy string matching in Python")
23494 (description "Approximate string matching using
23495 @emph{Levenshtein Distance} to calculate the differences between
23496 sequences.")
23497 (license license:gpl2)))
23498
23499 (define-public python2-fuzzywuzzy
23500 (package-with-python2 python-fuzzywuzzy))
23501
23502 (define-public python-block-tracing
23503 (package
23504 (name "python-block-tracing")
23505 (version "1.0.1")
23506 (source
23507 (origin
23508 (method url-fetch)
23509 (uri (pypi-uri "block_tracing" version))
23510 (sha256
23511 (base32
23512 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
23513 (build-system python-build-system)
23514 (arguments '(#:tests? #f)) ; no tests
23515 (home-page "https://github.com/rianhunter/block_tracing")
23516 (synopsis "Protect process memory")
23517 (description
23518 "@code{block_tracing} is a tiny Python library that can be used to
23519 prevent debuggers and other applications from inspecting the memory within
23520 your process.")
23521 (license license:expat)))
23522
23523 (define-public python-gcovr
23524 (package
23525 (name "python-gcovr")
23526 (version "4.2")
23527 (source
23528 (origin
23529 (method url-fetch)
23530 (uri (pypi-uri "gcovr" version))
23531 (sha256
23532 (base32
23533 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
23534 (build-system python-build-system)
23535 (propagated-inputs
23536 `(("python-lxml" ,python-lxml)
23537 ("python-jinja2" ,python-jinja2)))
23538 (home-page "https://gcovr.com/")
23539 (synopsis "Utility for generating code coverage results")
23540 (description
23541 "Gcovr provides a utility for managing the use of the GNU gcov
23542 utility and generating summarized code coverage results. It is inspired
23543 by the Python coverage.py package, which provides a similar utility for
23544 Python.")
23545 (license license:bsd-3)))
23546
23547 (define-public python-owslib
23548 (package
23549 (name "python-owslib")
23550 (version "0.19.2")
23551 (source
23552 (origin
23553 (method url-fetch)
23554 (uri (pypi-uri "OWSLib" version))
23555 (sha256
23556 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
23557 (build-system python-build-system)
23558 (arguments
23559 '(#:tests? #f)) ; TODO: package dependencies required for tests.
23560 (synopsis "Interface for Open Geospatial Consortium web service")
23561 (description
23562 "OWSLib is a Python package for client programming with Open Geospatial
23563 Consortium (OGC) web service (hence OWS) interface standards, and their related
23564 content models.")
23565 (home-page "https://geopython.github.io/OWSLib/")
23566 (license license:bsd-3)))
23567
23568 (define-public python-docusign-esign
23569 (package
23570 (name "python-docusign-esign")
23571 (version "3.1.0")
23572 (source (origin
23573 (method url-fetch)
23574 (uri (pypi-uri "docusign_esign" version))
23575 (sha256
23576 (base32
23577 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
23578 (build-system python-build-system)
23579 ;; Testing requires undocumented setup changes, and so testing is disabled here.
23580 (arguments `(#:tests? #f))
23581 (propagated-inputs
23582 `(("python-certifi" ,python-certifi)
23583 ("python-six" ,python-six)
23584 ("python-dateutil" ,python-dateutil)
23585 ("python-urllib3" ,python-urllib3)
23586 ("python-pyjwt" ,python-pyjwt)
23587 ("python-cryptography" ,python-cryptography)
23588 ("python-nose" ,python-nose)))
23589 (synopsis "DocuSign Python Client")
23590 (description "The Official DocuSign Python Client Library used to interact
23591 with the eSign REST API. Send, sign, and approve documents using this client.")
23592 (home-page "https://www.docusign.com/devcenter")
23593 (license license:expat)))
23594
23595 (define-public python-xattr
23596 (package
23597 (name "python-xattr")
23598 (version "0.9.7")
23599 (source
23600 (origin
23601 (method url-fetch)
23602 (uri (pypi-uri "xattr" version))
23603 (sha256
23604 (base32
23605 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
23606 (build-system python-build-system)
23607 (propagated-inputs
23608 `(("python-cffi" ,python-cffi)))
23609 (home-page "https://github.com/xattr/xattr")
23610 (synopsis
23611 "Python wrapper for extended file system attributes")
23612 (description "This package provides a Python wrapper for using extended
23613 file system attributes. Extended attributes extend the basic attributes of files
23614 and directories in the file system. They are stored as name:data pairs
23615 associated with file system objects (files, directories, symlinks, etc).")
23616 (license license:expat)))
23617
23618 (define-public python-json-logger
23619 (package
23620 (name "python-json-logger")
23621 (version "0.1.11")
23622 (source
23623 (origin
23624 (method url-fetch)
23625 (uri (pypi-uri "python-json-logger" version))
23626 (sha256
23627 (base32
23628 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
23629 (build-system python-build-system)
23630 (home-page
23631 "https://github.com/madzak/python-json-logger")
23632 (synopsis "JSON log formatter in Python")
23633 (description "This library allows standard Python logging to output log data
23634 as JSON objects. With JSON we can make our logs more readable by machines and
23635 we can stop writing custom parsers for syslog-type records.")
23636 (license license:bsd-3)))
23637
23638 (define-public python-daiquiri
23639 (package
23640 (name "python-daiquiri")
23641 (version "2.1.1")
23642 (source
23643 (origin
23644 (method url-fetch)
23645 (uri (pypi-uri "daiquiri" version))
23646 (sha256
23647 (base32
23648 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
23649 (build-system python-build-system)
23650 (propagated-inputs
23651 `(("python-json-logger" ,python-json-logger)))
23652 (native-inputs
23653 `(("python-mock" ,python-mock)
23654 ("python-pytest" ,python-pytest)
23655 ("python-setuptools-scm" ,python-setuptools-scm)
23656 ("python-six" ,python-six)))
23657 (home-page "https://github.com/jd/daiquiri")
23658 (synopsis
23659 "Library to configure Python logging easily")
23660 (description "The daiquiri library provides an easy way to configure
23661 logging in Python. It also provides some custom formatters and handlers.")
23662 (license license:asl2.0)))
23663
23664 (define-public python-pifpaf
23665 (package
23666 (name "python-pifpaf")
23667 (version "2.5.0")
23668 (source
23669 (origin
23670 (method url-fetch)
23671 (uri (pypi-uri "pifpaf" version))
23672 (sha256
23673 (base32
23674 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
23675 (build-system python-build-system)
23676 (arguments
23677 '(#:phases
23678 (modify-phases %standard-phases
23679 (replace 'check
23680 (lambda _
23681 (invoke "python" "setup.py" "testr" "--slowest"
23682 "--testr-args=until-failure"))))))
23683 (propagated-inputs
23684 `(("python-click" ,python-click)
23685 ("python-daiquiri" ,python-daiquiri)
23686 ("python-fixtures" ,python-fixtures)
23687 ("python-jinja2" ,python-jinja2)
23688 ("python-pbr" ,python-pbr)
23689 ("python-psutil" ,python-psutil)
23690 ("python-six" ,python-six)
23691 ("python-xattr" ,python-xattr)))
23692 (native-inputs
23693 `(("python-mock" ,python-mock)
23694 ("python-os-testr" ,python-os-testr)
23695 ("python-requests" ,python-requests)
23696 ("python-testrepository" ,python-testrepository)
23697 ("python-testtools" ,python-testtools)))
23698 (home-page "https://github.com/jd/pifpaf")
23699 (synopsis "Tools and fixtures to manage daemons for testing in Python")
23700 (description "Pifpaf is a suite of fixtures and a command-line tool that
23701 starts and stops daemons for a quick throw-away usage. This is typically
23702 useful when needing these daemons to run integration testing. It originally
23703 evolved from its precursor @code{overtest}.")
23704 (license license:asl2.0)))
23705
23706 (define-public python-pytest-check-links
23707 (package
23708 (name "python-pytest-check-links")
23709 (version "0.3.0")
23710 (source
23711 (origin
23712 (method url-fetch)
23713 ;; URI uses underscores
23714 (uri (pypi-uri "pytest_check_links" version))
23715 (sha256
23716 (base32
23717 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
23718 (build-system python-build-system)
23719 (propagated-inputs
23720 `(("python-docutils" ,python-docutils)
23721 ("python-html5lib" ,python-html5lib)
23722 ("python-nbconvert" ,python-nbconvert)
23723 ("python-nbformat" ,python-nbformat)
23724 ("python-pytest" ,python-pytest)
23725 ("python-six" ,python-six)))
23726 (native-inputs
23727 `(("python-pbr-minimal" ,python-pbr-minimal)))
23728 (home-page "https://github.com/minrk/pytest-check-links")
23729 (synopsis "Check links in files")
23730 (description "This package provides a pytest plugin that checks URLs for
23731 HTML-containing files.")
23732 (license license:bsd-3)))
23733
23734 (define-public python-json5
23735 (package
23736 (name "python-json5")
23737 (version "0.8.5")
23738 (source
23739 (origin
23740 ;; sample.json5 is missing from PyPi source tarball
23741 (method git-fetch)
23742 (uri (git-reference
23743 (url "https://github.com/dpranke/pyjson5")
23744 (commit (string-append "v" version))))
23745 (file-name (git-file-name name version))
23746 (sha256
23747 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
23748 (build-system python-build-system)
23749 (home-page "https://github.com/dpranke/pyjson5")
23750 (synopsis
23751 "Python implementation of the JSON5 data format")
23752 (description
23753 "JSON5 extends the JSON data interchange format to make it slightly more
23754 usable as a configuration language. This Python package implements parsing and
23755 dumping of JSON5 data structures.")
23756 (license license:asl2.0)))
23757
23758 (define-public python-frozendict
23759 (package
23760 (name "python-frozendict")
23761 (version "1.2")
23762 (source
23763 (origin
23764 (method url-fetch)
23765 (uri (pypi-uri "frozendict" version))
23766 (sha256
23767 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
23768 (build-system python-build-system)
23769 (home-page "https://github.com/slezica/python-frozendict")
23770 (synopsis "Simple immutable mapping for Python")
23771 (description
23772 "@dfn{frozendict} is an immutable wrapper around dictionaries that
23773 implements the complete mapping interface. It can be used as a drop-in
23774 replacement for dictionaries where immutability is desired.")
23775 (license license:expat)))
23776
23777 (define-public python-unpaddedbase64
23778 (package
23779 (name "python-unpaddedbase64")
23780 (version "1.1.0")
23781 (source
23782 (origin
23783 (method git-fetch)
23784 (uri (git-reference
23785 (url "https://github.com/matrix-org/python-unpaddedbase64")
23786 (commit (string-append "v" version))))
23787 (file-name (git-file-name name version))
23788 (sha256
23789 (base32
23790 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
23791 (build-system python-build-system)
23792 (home-page "https://pypi.org/project/unpaddedbase64/")
23793 (synopsis "Encode and decode Base64 without “=” padding")
23794 (description
23795 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
23796 using “=” characters. However this conveys no benefit so many protocols
23797 choose to use Base64 without the “=” padding.")
23798 (license license:asl2.0)))
23799
23800 (define-public python-py-cpuinfo
23801 (package
23802 (name "python-py-cpuinfo")
23803 (version "5.0.0")
23804 (source
23805 (origin
23806 (method url-fetch)
23807 (uri (pypi-uri "py-cpuinfo" version))
23808 (sha256
23809 (base32
23810 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
23811 (build-system python-build-system)
23812 (home-page "https://github.com/workhorsy/py-cpuinfo")
23813 (synopsis "Get CPU info with Python")
23814 (description
23815 "This Python module returns the CPU info by using the best sources of
23816 information for your operating system.")
23817 (license license:expat)))
23818
23819 (define-public python-canonicaljson
23820 (package
23821 (name "python-canonicaljson")
23822 (version "1.4.0")
23823 (source
23824 (origin
23825 (method url-fetch)
23826 (uri (pypi-uri "canonicaljson" version))
23827 (sha256
23828 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
23829 (build-system python-build-system)
23830 (propagated-inputs
23831 `(("python-six" ,python-six)
23832 ("python-frozendict" ,python-frozendict)
23833 ("python-simplejson" ,python-simplejson)))
23834 (home-page "https://github.com/matrix-org/python-canonicaljson")
23835 (synopsis "Canonical JSON")
23836 (description
23837 "Deterministically encode JSON.
23838
23839 @itemize
23840 @item Encodes objects and arrays as RFC 7159 JSON.
23841 @item Sorts object keys so that you get the same result each time.
23842 @item Has no insignificant whitespace to make the output as small as possible.
23843 @item Escapes only the characters that must be escaped, U+0000 to
23844 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
23845 @item Uses the shortest escape sequence for each escaped character.
23846 @item Encodes the JSON as UTF-8.
23847 @item Can encode frozendict immutable dictionaries.
23848 @end itemize")
23849 (license license:asl2.0)))
23850
23851 (define-public python-signedjson
23852 (package
23853 (name "python-signedjson")
23854 (version "1.1.1")
23855 (source
23856 (origin
23857 (method url-fetch)
23858 (uri (pypi-uri "signedjson" version))
23859 (sha256
23860 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
23861 (build-system python-build-system)
23862 (propagated-inputs
23863 `(("python-canonicaljson" ,python-canonicaljson)
23864 ("python-importlib-metadata" ,python-importlib-metadata)
23865 ("python-pynacl" ,python-pynacl)
23866 ("python-typing-extensions" ,python-typing-extensions)
23867 ("python-unpaddedbase64" ,python-unpaddedbase64)))
23868 (native-inputs
23869 `(("python-setuptools-scm" ,python-setuptools-scm)))
23870 (home-page "https://github.com/matrix-org/python-signedjson")
23871 (synopsis "Sign JSON objects with ED25519 signatures")
23872 (description
23873 "Sign JSON objects with ED25519 signatures.
23874
23875 @itemize
23876 @item More than one entity can sign the same object.
23877 @item Each entity can sign the object with more than one key making it easier to
23878 rotate keys
23879 @item ED25519 can be replaced with a different algorithm.
23880 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
23881 key.
23882 @end itemize")
23883 (license license:asl2.0)))
23884
23885 (define-public python-daemonize
23886 (package
23887 (name "python-daemonize")
23888 (version "2.5.0")
23889 (source
23890 (origin
23891 (method url-fetch)
23892 (uri (pypi-uri "daemonize" version))
23893 (sha256
23894 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
23895 (build-system python-build-system)
23896 (home-page "https://github.com/thesharp/daemonize")
23897 (synopsis "Library for writing system daemons in Python")
23898 (description "Daemonize is a library for writing system daemons in Python.")
23899 (license license:expat)))
23900
23901 (define-public python-pymacaroons
23902 (package
23903 (name "python-pymacaroons")
23904 (version "0.13.0")
23905 (source
23906 (origin
23907 (method url-fetch)
23908 (uri (pypi-uri "pymacaroons" version))
23909 (sha256
23910 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
23911 (build-system python-build-system)
23912 (propagated-inputs
23913 `(("python-six" ,python-six)
23914 ("python-pynacl" ,python-pynacl)))
23915 (home-page "https://github.com/ecordell/pymacaroons")
23916 (synopsis "Python Macaroon Library")
23917 (description
23918 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
23919 tokens, macaroons embed caveats that define specific authorization
23920 requirements for the target service, the service that issued the root macaroon
23921 and which is capable of verifying the integrity of macaroons it receives.
23922
23923 Macaroons allow for delegation and attenuation of authorization. They are
23924 simple and fast to verify, and decouple authorization policy from the
23925 enforcement of that policy.")
23926 (license license:expat)))
23927
23928 (define-public python-ldap3
23929 (package
23930 (name "python-ldap3")
23931 (version "2.7")
23932 (home-page "https://github.com/cannatag/ldap3")
23933 (source
23934 (origin
23935 (method git-fetch)
23936 (uri (git-reference (url home-page)
23937 (commit (string-append "v" version))))
23938 (file-name (git-file-name name version))
23939 (sha256
23940 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
23941 (build-system python-build-system)
23942 (arguments
23943 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
23944 #:phases (modify-phases %standard-phases
23945 (replace 'check
23946 (lambda* (#:key tests? #:allow-other-keys)
23947 (when tests?
23948 (invoke "nosetests" "-s" "test"))
23949 #t)))))
23950 (native-inputs
23951 `(("python-nose" ,python-nose)))
23952 (propagated-inputs
23953 `(("python-gssapi" ,python-gssapi)
23954 ("python-pyasn1" ,python-pyasn1)))
23955 (synopsis "Python LDAP client")
23956 (description
23957 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
23958 library.")
23959 (license license:lgpl3+)))
23960
23961 (define-public python-boltons
23962 (package
23963 (name "python-boltons")
23964 (version "20.0.0")
23965 (source
23966 (origin
23967 (method url-fetch)
23968 (uri (pypi-uri "boltons" version))
23969 (sha256
23970 (base32
23971 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
23972 (build-system python-build-system)
23973 (home-page "https://github.com/mahmoud/boltons")
23974 (synopsis "Extensions to the Python standard library")
23975 (description
23976 "Boltons is a set of over 230 pure-Python utilities in the same spirit
23977 as — and yet conspicuously missing from — the standard library, including:
23978
23979 @itemize
23980 @item Atomic file saving, bolted on with fileutils
23981 @item A highly-optimized OrderedMultiDict, in dictutils
23982 @item Two types of PriorityQueue, in queueutils
23983 @item Chunked and windowed iteration, in iterutils
23984 @item Recursive data structure iteration and merging, with iterutils.remap
23985 @item Exponential backoff functionality, including jitter, through
23986 iterutils.backoff
23987 @item A full-featured TracebackInfo type, for representing stack traces, in
23988 tbutils
23989 @end itemize")
23990 (license license:bsd-3)))
23991
23992 (define-public python-eliot
23993 (package
23994 (name "python-eliot")
23995 (version "1.12.0")
23996 (source
23997 (origin
23998 (method url-fetch)
23999 (uri (pypi-uri "eliot" version))
24000 (sha256
24001 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
24002 (build-system python-build-system)
24003 (arguments
24004 `(#:phases
24005 (modify-phases %standard-phases
24006 (add-after 'unpack 'remove-journald-support
24007 (lambda _
24008 (for-each delete-file
24009 '("eliot/tests/test_journald.py"
24010 "eliot/journald.py"))
24011 #t))
24012 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
24013 ;; remove command-line tool's tests. TODO eliot-prettyprint should
24014 ;; be installed and these tests should pass.
24015 (lambda _
24016 (delete-file "eliot/tests/test_prettyprint.py")
24017 #t)))))
24018 (propagated-inputs
24019 `(("python-boltons" ,python-boltons)
24020 ("python-pyrsistent" ,python-pyrsistent)
24021 ("python-six" ,python-six)
24022 ("python-zope-interface" ,python-zope-interface)))
24023 (native-inputs
24024 `(("python-black" ,python-black)
24025 ("python-coverage" ,python-coverage)
24026 ("python-dask" ,python-dask)
24027 ("python-flake8" ,python-flake8)
24028 ("python-hypothesis" ,python-hypothesis)
24029 ("python-pytest" ,python-pytest)
24030 ("python-setuptools" ,python-setuptools)
24031 ("python-sphinx" ,python-sphinx)
24032 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24033 ("python-testtools" ,python-testtools)
24034 ("python-twine" ,python-twine)
24035 ("python-twisted" ,python-twisted)))
24036 (home-page "https://github.com/itamarst/eliot/")
24037 (synopsis "Eliot: the logging system that tells you why it happened")
24038 (description
24039 "@dfn{eliot} is a Python logging system that outputs causal chains of
24040 actions: actions can spawn other actions, and eventually they either succeed
24041 or fail. The resulting logs tell you the story of what your software did: what
24042 happened, and what caused it.")
24043 (license license:asl2.0)))
24044
24045 (define-public python-pem
24046 (package
24047 (name "python-pem")
24048 (version "20.1.0")
24049 (source
24050 (origin
24051 (method url-fetch)
24052 (uri (pypi-uri "pem" version))
24053 (sha256
24054 (base32
24055 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
24056 (build-system python-build-system)
24057 (native-inputs
24058 `(("python-certifi" ,python-certifi)
24059 ("python-coverage" ,python-coverage)
24060 ("python-pretend" ,python-pretend)
24061 ("python-pyopenssl" ,python-pyopenssl)
24062 ("python-pytest" ,python-pytest)
24063 ("python-sphinx" ,python-sphinx)
24064 ("python-twisted" ,python-twisted)))
24065 (home-page "https://pem.readthedocs.io/")
24066 (synopsis "Easy PEM file parsing in Python")
24067 (description
24068 "This package provides a Python module for parsing and splitting PEM files.")
24069 (license license:expat)))
24070
24071 (define-public python-txsni
24072 ;; We need a few commits on top of 0.1.9 for compatibility with newer
24073 ;; Python and OpenSSL.
24074 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
24075 (revision "0"))
24076 (package
24077 (name "python-txsni")
24078 (version (git-version "0.1.9" revision commit))
24079 (home-page "https://github.com/glyph/txsni")
24080 (source
24081 (origin
24082 (method git-fetch)
24083 (uri (git-reference (url home-page) (commit commit)))
24084 (file-name (git-file-name name version))
24085 (sha256
24086 (base32
24087 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
24088 (build-system python-build-system)
24089 (propagated-inputs
24090 `(("python-pyopenssl" ,python-pyopenssl)
24091 ("python-service-identity" ,python-service-identity)
24092 ("python-twisted" ,python-twisted)))
24093 (synopsis "Run TLS servers with Twisted")
24094 (description
24095 "This package provides an easy-to-use SNI endpoint for use
24096 with the Twisted web framework.")
24097 (license license:expat))))
24098
24099 (define-public python-txacme
24100 (package
24101 (name "python-txacme")
24102 (version "0.9.2")
24103 (source
24104 (origin
24105 (method url-fetch)
24106 (uri (pypi-uri "txacme" version))
24107 (sha256
24108 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
24109 (build-system python-build-system)
24110 (propagated-inputs
24111 `(("python-acme" ,python-acme)
24112 ("python-attrs" ,python-attrs)
24113 ("python-eliot" ,python-eliot)
24114 ("python-josepy" ,python-josepy)
24115 ("python-pem" ,python-pem)
24116 ("python-treq" ,python-treq)
24117 ("python-twisted" ,python-twisted)
24118 ("python-txsni" ,python-txsni)))
24119 (native-inputs
24120 `(("python-fixtures" ,python-fixtures)
24121 ("python-hypothesis" ,python-hypothesis)
24122 ("python-mock" ,python-mock)
24123 ("python-service-identity"
24124 ,python-service-identity)
24125 ("python-testrepository" ,python-testrepository)
24126 ("python-testscenarios" ,python-testscenarios)
24127 ("python-testtools" ,python-testtools)))
24128 (home-page "https://github.com/twisted/txacme")
24129 (synopsis "Twisted implexmentation of the ACME protocol")
24130 (description
24131 "ACME is Automatic Certificate Management Environment, a protocol that
24132 allows clients and certificate authorities to automate verification and
24133 certificate issuance. The ACME protocol is used by the free Let's Encrypt
24134 Certificate Authority.
24135
24136 txacme is an implementation of the protocol for Twisted, the event-driven
24137 networking engine for Python.")
24138 (license license:expat)))
24139
24140 (define-public python-pysaml2
24141 (package
24142 (name "python-pysaml2")
24143 (version "6.5.1")
24144 (source
24145 (origin
24146 (method url-fetch)
24147 (uri (pypi-uri "pysaml2" version))
24148 (sha256
24149 (base32
24150 "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
24151 (build-system python-build-system)
24152 (propagated-inputs
24153 `(("python-cryptography" ,python-cryptography)
24154 ("python-dateutil" ,python-dateutil)
24155 ("python-defusedxml" ,python-defusedxml)
24156 ("python-importlib-resources"
24157 ,python-importlib-resources)
24158 ("python-pyopenssl" ,python-pyopenssl)
24159 ("python-pytz" ,python-pytz)
24160 ("python-requests" ,python-requests)
24161 ("python-six" ,python-six)
24162 ("python-xmlschema" ,python-xmlschema)))
24163 (home-page "https://idpy.org")
24164 (synopsis "Python implementation of SAML Version 2 Standard")
24165 (description
24166 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
24167 It contains all necessary pieces for building a SAML2 service provider or
24168 an identity provider. The distribution contains examples of both.
24169
24170 This package was originally written to work in a WSGI environment, but
24171 there are extensions that allow you to use it with other frameworks.")
24172 (license license:asl2.0)))
24173
24174 (define-public python-click-plugins
24175 (package
24176 (name "python-click-plugins")
24177 (version "1.1.1")
24178 (source
24179 (origin
24180 (method url-fetch)
24181 (uri (pypi-uri "click-plugins" version))
24182 (sha256
24183 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
24184 (build-system python-build-system)
24185 (native-inputs
24186 `(("python-pytest" ,python-pytest)))
24187 (propagated-inputs
24188 `(("python-click" ,python-click)))
24189 (synopsis "Extension for Click to register external CLI commands")
24190 (description "This package provides n extension module for Click to
24191 register external CLI commands via setuptools entry-points.")
24192 (home-page "https://github.com/click-contrib/click-plugins")
24193 (license license:bsd-3)))
24194
24195 (define-public python-diceware
24196 (package
24197 (name "python-diceware")
24198 (version "0.9.6")
24199 (source
24200 (origin
24201 (method url-fetch)
24202 (uri (pypi-uri "diceware" version))
24203 (sha256
24204 (base32
24205 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
24206 (build-system python-build-system)
24207 (native-inputs
24208 `(("python-coverage" ,python-coverage)
24209 ("python-pytest" ,python-pytest)
24210 ("python-pytest-runner" ,python-pytest-runner)))
24211 (home-page "https://github.com/ulif/diceware/")
24212 (synopsis "Generates memorable passphrases")
24213 (description "This package generates passphrases by concatenating words
24214 randomly picked from wordlists. It supports several sources of
24215 randomness (including real life dice) and different wordlists (including
24216 cryptographically signed ones).")
24217 (license license:gpl3+)))
24218
24219 (define-public python-dictdiffer
24220 (package
24221 (name "python-dictdiffer")
24222 (version "0.8.1")
24223 (source (origin
24224 (method url-fetch)
24225 (uri (pypi-uri "dictdiffer" version))
24226 (sha256
24227 (base32
24228 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
24229 (build-system python-build-system)
24230 (native-inputs
24231 `(("python-check-manifest" ,python-check-manifest)
24232 ("python-coverage" ,python-coverage)
24233 ("python-isort" ,python-isort)
24234 ("python-mock" ,python-mock)
24235 ("python-pydoctstyle" ,python-pydocstyle)
24236 ("python-pytest-cache" ,python-pytest-cache)
24237 ("python-pytest-cov" ,python-pytest-cov)
24238 ("python-pytest-pep8" ,python-pytest-pep8)
24239 ("python-pytest-runner" ,python-pytest-runner)
24240 ("python-pytest" ,python-pytest)
24241 ("python-setuptools-scm" ,python-setuptools-scm)
24242 ("python-tox" ,python-tox)))
24243 (home-page "https://github.com/inveniosoftware/dictdiffer")
24244 (synopsis "Diff and patch Python dictionary objects")
24245 (description
24246 "Dictdiffer is a Python module that helps you to diff and patch
24247 dictionaries.")
24248 (license license:expat)))
24249
24250 (define-public pyzo
24251 (package
24252 (name "pyzo")
24253 (version "4.11.2")
24254 (source
24255 (origin
24256 (method url-fetch)
24257 (uri (pypi-uri "pyzo" version))
24258 (sha256
24259 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
24260 (build-system python-build-system)
24261 (arguments
24262 `(#:phases
24263 (modify-phases %standard-phases
24264 (add-before 'check 'fix-home-directory
24265 (lambda _
24266 ;; Tests fail with "Permission denied: '/homeless-shelter'".
24267 (setenv "HOME" "/tmp")
24268 #t)))
24269 ;; Tests fail with "Uncaught Python exception: python: undefined
24270 ;; symbol: objc_getClass".
24271 #:tests? #f))
24272 (propagated-inputs
24273 `(("python-pyqt" ,python-pyqt)))
24274 (home-page "https://pyzo.org")
24275 (synopsis
24276 "Python IDE for scientific computing")
24277 (description
24278 "Pyzo is a Python IDE focused on interactivity and introspection,
24279 which makes it very suitable for scientific computing. Its practical
24280 design is aimed at simplicity and efficiency.
24281
24282 It consists of two main components, the editor and the shell, and uses
24283 a set of pluggable tools to help the programmer in various ways. Some
24284 example tools are source structure, project manager, interactive help,
24285 workspace...")
24286 (license license:bsd-2)))
24287
24288 (define-public python-osc
24289 (package
24290 (name "python-osc")
24291 (version "1.7.4")
24292 (source
24293 (origin
24294 (method url-fetch)
24295 (uri (pypi-uri "python-osc" version))
24296 (sha256
24297 (base32
24298 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
24299 (build-system python-build-system)
24300 (home-page "https://github.com/attwad/python-osc")
24301 (synopsis "Open Sound Control server and client implementations")
24302 (description
24303 "@code{python-osc} is a pure Python library with no external
24304 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
24305 Open Sound Control 1.0} specification.")
24306 (license license:unlicense)))
24307
24308 (define-public python-voluptuous
24309 (package
24310 (name "python-voluptuous")
24311 (version "0.11.7")
24312 (source
24313 (origin
24314 (method url-fetch)
24315 (uri (pypi-uri "voluptuous" version))
24316 (sha256
24317 (base32
24318 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
24319 (build-system python-build-system)
24320 (native-inputs
24321 `(("python-nose" ,python-nose)))
24322 (home-page "https://github.com/alecthomas/voluptuous")
24323 (synopsis "Python data validation library")
24324 (description
24325 "Voluptuous is a Python data validation library. It is primarily
24326 intended for validating data coming into Python as JSON, YAML, etc.")
24327 (license license:bsd-3)))
24328
24329 (define-public python-cmd2
24330 (package
24331 (name "python-cmd2")
24332 (version "1.0.2")
24333 (source
24334 (origin
24335 (method url-fetch)
24336 (uri (pypi-uri "cmd2" version))
24337 (sha256
24338 (base32
24339 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
24340 (build-system python-build-system)
24341 (propagated-inputs
24342 `(("python-attrs" ,python-attrs)
24343 ("python-colorama" ,python-colorama)
24344 ("python-pyperclip" ,python-pyperclip)
24345 ("python-wcwidth" ,python-wcwidth)))
24346 (native-inputs
24347 `(("python-codecov" ,python-codecov)
24348 ("python-coverage" ,python-coverage)
24349 ("python-doc8" ,python-doc8)
24350 ("python-flake8" ,python-flake8)
24351 ("python-invoke" ,python-invoke)
24352 ("python-mock" ,python-mock)
24353 ("python-pytest" ,python-pytest)
24354 ("python-pytest-cov" ,python-pytest-cov)
24355 ("python-pytest-mock" ,python-pytest-mock)
24356 ("python-setuptools-scm" ,python-setuptools-scm)
24357 ("python-sphinx" ,python-sphinx)
24358 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
24359 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
24360 ("python-tox" ,python-tox)
24361 ("python-twine" ,python-twine)
24362 ("which" ,which)))
24363 (home-page "https://github.com/python-cmd2/cmd2")
24364 (synopsis "Tool for building interactive command line applications")
24365 (description
24366 "Cmd2 is a tool for building interactive command line applications in
24367 Python. Its goal is to make it quick and easy for developers to build
24368 feature-rich and user-friendly interactive command line applications. It
24369 provides a simple API which is an extension of Python's built-in @code{cmd}
24370 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
24371 make your life easier and eliminates much of the boilerplate code which would
24372 be necessary when using @code{cmd}.")
24373 (license license:expat)))
24374
24375 (define-public python-pytidylib
24376 (package
24377 (name "python-pytidylib")
24378 (version "0.3.2")
24379 (source (origin
24380 (method url-fetch)
24381 (uri (pypi-uri "pytidylib" version))
24382 (sha256
24383 (base32
24384 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
24385 (build-system python-build-system)
24386 (arguments
24387 '(#:phases
24388 (modify-phases %standard-phases
24389 (add-before 'build 'qualify-libtidy
24390 (lambda* (#:key inputs #:allow-other-keys)
24391 (let ((libtidy (string-append (assoc-ref inputs "tidy")
24392 "/lib/libtidy.so")))
24393 (substitute* "tidylib/tidy.py"
24394 (("ctypes\\.util\\.find_library\\('tidy'\\)")
24395 (format #f "'~a'" libtidy)))
24396 #t))))))
24397 (inputs `(("tidy" ,tidy)))
24398 (home-page "https://github.com/countergram/pytidylib")
24399 (synopsis "Python wrapper for HTML Tidy library")
24400 (description
24401 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
24402 allows you, from Python code, to “fix” invalid (X)HTML markup.")
24403 (license license:expat)))
24404
24405 (define-public python2-pytidylib
24406 (package-with-python2 python-pytidylib))
24407
24408 (define-public python-mujson
24409 (package
24410 (name "python-mujson")
24411 (version "1.4")
24412 (source
24413 (origin
24414 (method url-fetch)
24415 (uri (pypi-uri "mujson" version))
24416 (sha256
24417 (base32
24418 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
24419 (build-system python-build-system)
24420 (home-page "https://github.com/mattgiles/mujson")
24421 (synopsis "Use the fastest JSON functions available at import time")
24422 (description "This package selects the fastest JSON functions available
24423 at import time.")
24424 (license license:expat)))
24425
24426 (define-public python-bashlex
24427 (package
24428 (name "python-bashlex")
24429 (version "0.14")
24430 (source
24431 (origin
24432 (method url-fetch)
24433 (uri (pypi-uri "bashlex" version))
24434 (sha256
24435 (base32
24436 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
24437 (build-system python-build-system)
24438 (arguments
24439 `(#:phases
24440 (modify-phases %standard-phases
24441 (add-before 'build 'pregenerate-yacc-tables
24442 (lambda _
24443 ;; parser.py caches tables, which attempts to write to site lib
24444 ;; see https://github.com/idank/bashlex/issues/51
24445 (invoke "python" "-c" "import bashlex"))))))
24446 (home-page
24447 "https://github.com/idank/bashlex")
24448 (synopsis "Python parser for bash")
24449 (description "@code{bashlex} is a Python port of the parser used
24450 internally by GNU bash.
24451
24452 For the most part it's transliterated from C, the major differences are:
24453
24454 @itemize
24455 @item it does not execute anything
24456 @item it is reentrant
24457 @item it generates a complete AST
24458 @end itemize
24459 ")
24460 (license license:gpl3+)))
24461
24462 (define-public python-jinxed
24463 (package
24464 (name "python-jinxed")
24465 (version "1.0.0")
24466 (source
24467 (origin
24468 (method url-fetch)
24469 (uri (pypi-uri "jinxed" version))
24470 (sha256
24471 (base32
24472 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
24473 (build-system python-build-system)
24474 (arguments
24475 '(#:phases
24476 (modify-phases %standard-phases
24477 (add-before 'check 'set-environment-variables
24478 (lambda* (#:key inputs #:allow-other-keys)
24479 (let ((ncurses (assoc-ref inputs "ncurses")))
24480 (setenv "TERM" "LINUX")
24481 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
24482 #t))))
24483 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
24484 (native-inputs
24485 `(("ncurses" ,ncurses)))
24486 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
24487 (synopsis "Jinxed Terminal Library")
24488 (description
24489 "Jinxed is an implementation of a subset of the Python curses library.")
24490 (license license:mpl2.0)))
24491
24492 (define-public python-blessed
24493 (package
24494 (name "python-blessed")
24495 (version "1.17.8")
24496 (source
24497 (origin
24498 (method url-fetch)
24499 (uri (pypi-uri "blessed" version))
24500 (sha256
24501 (base32
24502 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
24503 (modules '((guix build utils)))
24504 (snippet
24505 '(begin
24506 ;; Don't get hung up on Windows test failures.
24507 (delete-file "blessed/win_terminal.py") #t))))
24508 (build-system python-build-system)
24509 (propagated-inputs
24510 `(("python-jinxed" ,python-jinxed)
24511 ("python-six" ,python-six)
24512 ("python-wcwidth" ,python-wcwidth)))
24513 (native-inputs
24514 `(("python-mock" ,python-mock)
24515 ("python-pytest" ,python-pytest)))
24516 (home-page "https://github.com/jquast/blessed")
24517 (synopsis "Wrapper around terminal capabilities")
24518 (description
24519 "Blessed is a thin, practical wrapper around terminal styling, screen
24520 positioning, and keyboard input.")
24521 (license license:expat)))
24522
24523 (define-public python-readme-renderer
24524 (package
24525 (name "python-readme-renderer")
24526 (version "26.0")
24527 (source
24528 (origin
24529 (method url-fetch)
24530 (uri (pypi-uri "readme_renderer" version))
24531 (sha256
24532 (base32
24533 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
24534 (build-system python-build-system)
24535 (propagated-inputs
24536 `(("python-bleach" ,python-bleach)
24537 ("python-docutils" ,python-docutils)
24538 ("python-pygments" ,python-pygments)
24539 ("python-six" ,python-six)))
24540 (native-inputs
24541 `(("python-mock" ,python-mock)
24542 ("python-pytest" ,python-pytest)))
24543 (home-page "https://github.com/pypa/readme_renderer")
24544 (synopsis "Render README files in Warehouse")
24545 (description
24546 "Readme Renderer is a library that will safely render arbitrary README
24547 files into HTML. It is designed to be used in Warehouse to render the
24548 @code{long_description} for packages. It can handle Markdown, reStructuredText,
24549 and plain text.")
24550 (license license:asl2.0)))
24551
24552 (define-public python-lazr-delegates
24553 (package
24554 (name "python-lazr-delegates")
24555 (version "2.0.4")
24556 (source
24557 (origin
24558 (method url-fetch)
24559 (uri (pypi-uri "lazr.delegates" version))
24560 (sha256
24561 (base32
24562 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
24563 (build-system python-build-system)
24564 (arguments
24565 '(#:phases
24566 (modify-phases %standard-phases
24567 (replace 'check
24568 (lambda _
24569 (invoke "python" "setup.py" "nosetests"))))))
24570 (native-inputs
24571 `(("python-nose" ,python-nose)))
24572 (propagated-inputs
24573 `(("python-zope-interface" ,python-zope-interface)))
24574 (home-page "https://launchpad.net/lazr.delegates")
24575 (synopsis "Easily write objects that delegate behavior")
24576 (description
24577 "The @code{lazr.delegates} package makes it easy to write objects that
24578 delegate behavior to another object. The new object adds some property or
24579 behavior on to the other object, while still providing the underlying interface,
24580 and delegating behavior.")
24581 (license license:lgpl3)))
24582
24583 (define-public python-lazr-config
24584 (package
24585 (name "python-lazr-config")
24586 (version "2.2.2")
24587 (source
24588 (origin
24589 (method url-fetch)
24590 (uri (pypi-uri "lazr.config" version))
24591 (sha256
24592 (base32
24593 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
24594 (build-system python-build-system)
24595 (arguments
24596 '(#:phases
24597 (modify-phases %standard-phases
24598 (replace 'check
24599 (lambda _
24600 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
24601 (native-inputs
24602 `(("python-nose" ,python-nose)))
24603 (propagated-inputs
24604 `(("python-lazr-delegates" ,python-lazr-delegates)
24605 ("python-zope-interface" ,python-zope-interface)))
24606 (home-page "https://launchpad.net/lazr.config")
24607 (synopsis "Create configuration schemas and process and validate configurations")
24608 (description
24609 "The LAZR config system is typically used to manage process configuration.
24610 Process configuration is for saying how things change when we run systems on
24611 different machines, or under different circumstances. This system uses ini-like
24612 file format of section, keys, and values. The config file supports inheritance
24613 to minimize duplication of information across files. The format supports schema
24614 validation.")
24615 (license license:lgpl3)))
24616
24617 (define-public python-flufl-bounce
24618 (package
24619 (name "python-flufl-bounce")
24620 (version "3.0.1")
24621 (source
24622 (origin
24623 (method url-fetch)
24624 (uri (pypi-uri "flufl.bounce" version))
24625 (sha256
24626 (base32
24627 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
24628 (build-system python-build-system)
24629 (propagated-inputs
24630 `(("python-atpublic" ,python-atpublic)
24631 ("python-zope-interface" ,python-zope-interface)))
24632 (native-inputs
24633 `(("python-nose2" ,python-nose2)))
24634 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
24635 (synopsis "Email bounce detectors")
24636 (description "The @code{flufl.bounce} library provides a set of heuristics
24637 and an API for detecting the original bouncing email addresses from a bounce
24638 message. Many formats found in the wild are supported, as are VERP and
24639 RFC 3464.")
24640 (license (list license:asl2.0
24641 license:lgpl3)))) ; only for setup_headers.py
24642
24643 (define-public python-flufl-i18n
24644 (package
24645 (name "python-flufl-i18n")
24646 (version "3.0")
24647 (source
24648 (origin
24649 (method url-fetch)
24650 (uri (pypi-uri "flufl.i18n" version))
24651 (sha256
24652 (base32
24653 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
24654 (build-system python-build-system)
24655 (propagated-inputs
24656 `(("python-atpublic" ,python-atpublic)))
24657 (home-page "https://flufli18n.readthedocs.io")
24658 (synopsis "API for Python internationalization")
24659 (description
24660 "This package provides a high-level, convenient API for managing
24661 internationalization/translation contexts in Python applications. There is a
24662 simple API for single-context applications, such as command line scripts which
24663 only need to translate into one language during the entire course of their
24664 execution. There is a more flexible, but still convenient API for multi-context
24665 applications, such as servers, which may need to switch language contexts for
24666 different tasks.")
24667 (license license:asl2.0)))
24668
24669 (define-public python-flufl-lock
24670 (package
24671 (name "python-flufl-lock")
24672 (version "4.0")
24673 (source
24674 (origin
24675 (method url-fetch)
24676 (uri (pypi-uri "flufl.lock" version))
24677 (sha256
24678 (base32
24679 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
24680 (build-system python-build-system)
24681 (propagated-inputs
24682 `(("python-atpublic" ,python-atpublic)
24683 ("python-psutil" ,python-psutil)))
24684 (home-page "https://flufllock.readthedocs.io")
24685 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
24686 (description
24687 "The @dfn{flufl.lock} package provides NFS-safe file locking with
24688 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
24689 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
24690 and have a maximum lifetime built-in.")
24691 (license (list license:asl2.0
24692 license:lgpl3)))) ; only for setup_helpers.py
24693
24694 (define-public python-flufl-testing
24695 (package
24696 (name "python-flufl-testing")
24697 (version "0.8")
24698 (source
24699 (origin
24700 (method url-fetch)
24701 (uri (pypi-uri "flufl.testing" version))
24702 (sha256
24703 (base32
24704 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
24705 (build-system python-build-system)
24706 (native-inputs
24707 `(("python-nose2" ,python-nose2)))
24708 (home-page "https://gitlab.com/warsaw/flufl.testing")
24709 (synopsis "Collection of test tool plugins")
24710 (description
24711 "This package contains a small collection of test tool plugins for
24712 @code{nose2} and @code{flake8}.")
24713 (license license:asl2.0)))
24714
24715 (define-public python-devtools
24716 (package
24717 (name "python-devtools")
24718 (version "0.6")
24719 (source
24720 (origin
24721 (method git-fetch)
24722 (uri (git-reference
24723 (url "https://github.com/samuelcolvin/python-devtools")
24724 (commit (string-append "v" version))))
24725 (file-name (git-file-name name version))
24726 (sha256
24727 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
24728 (build-system python-build-system)
24729 (native-inputs
24730 `(("python-pytest" ,python-pytest)
24731 ("python-pytest-mock" ,python-pytest-mock)))
24732 (propagated-inputs
24733 `(("python-pygments" ,python-pygments)))
24734 (arguments
24735 `(#:phases (modify-phases %standard-phases
24736 (replace 'check
24737 (lambda _
24738 (invoke "pytest")
24739 #t)))))
24740 (home-page "https://github.com/samuelcolvin/python-devtools")
24741 (synopsis "Debug command and development tools")
24742 (description
24743 "This package provides a debug print command and other development tools.
24744 It adds a simple and readable way to print stuff during development.")
24745 (license license:expat)))
24746
24747 (define-public python-dateparser
24748 (package
24749 (name "python-dateparser")
24750 (version "0.7.6")
24751 (source
24752 (origin
24753 (method url-fetch)
24754 (uri (pypi-uri "dateparser" version))
24755 (sha256
24756 (base32
24757 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
24758 (build-system python-build-system)
24759 (propagated-inputs
24760 `(("python-dateutil" ,python-dateutil)
24761 ("python-pytz" ,python-pytz)
24762 ("python-regex" ,python-regex)
24763 ("python-ruamel.yaml" ,python-ruamel.yaml)
24764 ("python-tzlocal" ,python-tzlocal)))
24765 (native-inputs
24766 `(("python-mock" ,python-mock)
24767 ("python-parameterized" ,python-parameterized)
24768 ("tzdata" ,tzdata-for-tests)))
24769 (arguments
24770 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
24771 #:tests? #f
24772 #:phases
24773 (modify-phases %standard-phases
24774 (add-before 'check 'set-check-environment
24775 (lambda* (#:key inputs #:allow-other-keys)
24776 (setenv "TZ" "UTC")
24777 (setenv "TZDIR"
24778 (string-append (assoc-ref inputs "tzdata")
24779 "/share/zoneinfo"))
24780 #t)))))
24781 (home-page "https://github.com/scrapinghub/dateparser")
24782 (synopsis
24783 "Date parsing library designed to parse dates from HTML pages")
24784 (description
24785 "@code{python-dateparser} provides modules to easily parse localized
24786 dates in almost any string formats commonly found on web pages.")
24787 (license license:bsd-3)))
24788
24789 (define-public python-dparse
24790 (package
24791 (name "python-dparse")
24792 (version "0.5.1")
24793 (source
24794 (origin
24795 (method url-fetch)
24796 (uri (pypi-uri "dparse" version))
24797 (sha256
24798 (base32
24799 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
24800 (build-system python-build-system)
24801 (native-inputs
24802 `(("python-pytest" ,python-pytest)))
24803 (propagated-inputs
24804 `(("python-packaging" ,python-packaging)
24805 ("python-pyyaml" ,python-pyyaml)
24806 ("python-toml" ,python-toml)))
24807 (home-page "https://github.com/pyupio/dparse")
24808 (synopsis "Parser for Python dependency files")
24809 (description "This package provides a parser for Python dependency files.")
24810 (license license:expat)))
24811
24812 (define-public python-dpath
24813 (package
24814 (name "python-dpath")
24815 (version "2.0.1")
24816 (source
24817 (origin
24818 (method url-fetch)
24819 (uri (pypi-uri "dpath" version))
24820 (sha256
24821 (base32
24822 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
24823 (build-system python-build-system)
24824 (native-inputs
24825 `(("python-hypothesis" ,python-hypothesis)
24826 ("python-mock" ,python-mock)
24827 ("python-nose" ,python-nose)))
24828 (arguments
24829 '(#:phases
24830 (modify-phases %standard-phases
24831 (replace 'check
24832 (lambda* (#:key inputs outputs #:allow-other-keys)
24833 (add-installed-pythonpath inputs outputs)
24834 ;; This invokation is taken from tox.ini.
24835 (invoke "nosetests" "-d" "-v" "tests/"))))))
24836 (home-page "https://github.com/akesterson/dpath-python")
24837 (synopsis "File-system-like pathing and searching for dictionaries")
24838 (description
24839 "@code{python-dpath} is a library for accessing and searching
24840 dictionaries via /slashed/paths ala xpath.
24841
24842 Basically it lets you glob over a dictionary as if it were a file system. It
24843 allows you to specify globs (ala the bash eglob syntax, through some advanced
24844 fnmatch.fnmatch magic) to access dictionary elements, and provides some
24845 facility for filtering those results.")
24846 (license license:expat)))
24847
24848 (define-public python-safety
24849 (package
24850 (name "python-safety")
24851 (version "1.9.0")
24852 (source
24853 (origin
24854 (method url-fetch)
24855 (uri (pypi-uri "safety" version))
24856 (sha256
24857 (base32
24858 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
24859 (build-system python-build-system)
24860 (arguments
24861 `(#:phases
24862 (modify-phases %standard-phases
24863 (add-after 'unpack 'disable-tests
24864 (lambda _
24865 (substitute* "tests/test_safety.py"
24866 ;; requires network
24867 (("def test_check_live") "def _test_check_live"))
24868 #t)))))
24869 (propagated-inputs
24870 `(("python-click" ,python-click)
24871 ("python-dparse" ,python-dparse)
24872 ("python-packaging" ,python-packaging)
24873 ("python-requests" ,python-requests)))
24874 (home-page "https://github.com/pyupio/safety")
24875 (synopsis "Check installed dependencies for known vulnerabilities")
24876 (description "Safety checks installed dependencies for known vulnerabilities.
24877 By default it uses the open Python vulnerability database Safety DB.")
24878 (license license:expat)))
24879
24880 (define-public python-pypandoc
24881 (package
24882 (name "python-pypandoc")
24883 (version "1.5")
24884 (source
24885 (origin
24886 (method url-fetch)
24887 (uri (pypi-uri "pypandoc" version))
24888 (sha256
24889 (base32
24890 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
24891 (build-system python-build-system)
24892 (inputs
24893 `(("pandoc" ,pandoc)
24894 ("pandoc-citeproc" ,pandoc-citeproc)))
24895 (propagated-inputs
24896 `(("wheel" ,python-wheel)))
24897 (native-inputs
24898 `(("texlive" ,(texlive-union (list texlive-amsfonts/patched
24899 texlive-fonts-ec
24900 texlive-latex-hyperref
24901 texlive-latex-oberdiek
24902 texlive-lm
24903 texlive-xcolor)))))
24904 (arguments
24905 `(#:phases
24906 (modify-phases %standard-phases
24907 (add-before 'check 'disable-tests
24908 (lambda _
24909 ;; Disable test requiring network access
24910 (substitute* "tests.py"
24911 (("test_basic_conversion_from_http_url")
24912 "skip_test_basic_conversion_from_http_url"))
24913 ;; Needed by texlive-union to generate fonts
24914 (setenv "HOME" "/tmp")
24915 #t)))))
24916 (home-page "https://github.com/bebraw/pypandoc")
24917 (synopsis "Python wrapper for pandoc")
24918 (description "pypandoc is a thin Python wrapper around pandoc
24919 and pandoc-citeproc.")
24920 (license license:expat)))
24921
24922 (define-public python-rnc2rng
24923 (package
24924 (name "python-rnc2rng")
24925 (version "2.6.4")
24926 (source
24927 (origin
24928 (method url-fetch)
24929 (uri (pypi-uri "rnc2rng" version))
24930 (sha256
24931 (base32
24932 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
24933 (build-system python-build-system)
24934 (propagated-inputs
24935 `(("python-rply" ,python-rply)))
24936 (arguments
24937 `(#:phases (modify-phases %standard-phases
24938 (replace 'check
24939 (lambda _
24940 (invoke "python" "test.py"))))))
24941 (home-page "https://github.com/djc/rnc2rng")
24942 (synopsis "Convert RELAX NG Compact to regular syntax")
24943 (description
24944 "This package provides the @command{rnc2rng} command-line tool as well as
24945 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
24946 equivalent schemata in the XML-based default RELAX NG syntax.")
24947 (license license:expat)))
24948
24949 (define-public python-telethon
24950 (package
24951 (name "python-telethon")
24952 (version "1.17.5")
24953 (source
24954 (origin
24955 (method git-fetch)
24956 (uri (git-reference
24957 (url "https://github.com/LonamiWebs/Telethon")
24958 (commit (string-append "v" version))))
24959 (file-name (git-file-name name version))
24960 (sha256
24961 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
24962 (build-system python-build-system)
24963 (arguments
24964 '(#:phases
24965 (modify-phases %standard-phases
24966 (replace 'check
24967 (lambda* (#:key tests? #:allow-other-keys)
24968 (when tests?
24969 (invoke "py.test" "-v"))
24970 #t)))))
24971 (propagated-inputs
24972 `(("python-rsa" ,python-rsa)
24973 ("python-pyaes" ,python-pyaes)))
24974 (native-inputs
24975 `(("python-pytest" ,python-pytest)
24976 ("python-pytest-asyncio" ,python-pytest-asyncio)
24977 ("python-pytest-trio" ,python-pytest-trio)))
24978 (home-page "https://docs.telethon.dev")
24979 (synopsis "Full-featured Telegram client library for Python 3")
24980 (description "This library is designed to make it easy to write Python
24981 programs that can interact with Telegram.")
24982 (license license:expat)))
24983
24984 (define-public python-citeproc-py
24985 (package
24986 (name "python-citeproc-py")
24987 (version "0.5.1")
24988 (source
24989 (origin
24990 (method url-fetch)
24991 (uri (pypi-uri "citeproc-py" version))
24992 (sha256
24993 (base32
24994 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
24995 (build-system python-build-system)
24996 (propagated-inputs
24997 `(("python-lxml" ,python-lxml)
24998 ("python-rnc2rng" ,python-rnc2rng)))
24999 (home-page
25000 "https://github.com/brechtm/citeproc-py")
25001 (synopsis "Citations and bibliography formatter")
25002 (description
25003 "Citeproc-py is a CSL processor for Python. It aims to implement the
25004 CSL 1.0.1 specification. citeproc-py can output styled citations and
25005 bibliographies in a number of different output formats. Currently supported
25006 are plain text, reStructuredText and HTML.")
25007 (license license:bsd-2)))
25008
25009 (define-public python-inform
25010 (package
25011 (name "python-inform")
25012 (version "1.23.0")
25013 (source
25014 (origin
25015 (method url-fetch)
25016 (uri (pypi-uri "inform" version))
25017 (sha256
25018 (base32
25019 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
25020 (build-system python-build-system)
25021 (arguments
25022 `(#:tests? #f)) ; PyPI tarball lacks tests
25023 (native-inputs
25024 `(("python-hypothesis" ,python-hypothesis)
25025 ("python-pytest-cov" ,python-pytest-cov)
25026 ("python-pytest-runner" ,python-pytest-runner)))
25027 (propagated-inputs
25028 `(("python-arrow" ,python-arrow)
25029 ("python-six" ,python-six)))
25030 (home-page "https://inform.readthedocs.io")
25031 (synopsis "Print & logging utilities for communicating with user")
25032 (description
25033 "Inform is designed to display messages from programs that are typically run from
25034 a console. It provides a collection of ‘print’ functions that allow you to simply and
25035 cleanly print different types of messages.")
25036 (license license:gpl3+)))
25037
25038 (define-public python-nestedtext
25039 (package
25040 (name "python-nestedtext")
25041 (version "1.0.0")
25042 (source
25043 (origin
25044 (method url-fetch)
25045 (uri (pypi-uri "nestedtext" version))
25046 (sha256
25047 (base32
25048 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
25049 (build-system python-build-system)
25050 (arguments
25051 `(#:tests? #f)) ; PyPI tarball lacks tests
25052 (propagated-inputs
25053 `(("python-inform" ,python-inform)))
25054 (home-page "https://nestedtext.org")
25055 (synopsis "Human readable and writable data interchange format")
25056 (description
25057 "NestedText is a file format for holding data that is to be entered, edited, or
25058 viewed by people. It allows data to be organized into a nested collection of
25059 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
25060 without the complexity and risk of YAML and without the syntactic clutter of JSON.
25061 NestedText is both simple and natural. Only a small number of concepts and rules must
25062 be kept in mind when creating it. It is easily created, modified, or viewed with
25063 a text editor and easily understood and used by both programmers and non-programmers.")
25064 (license license:expat))) ; MIT license
25065
25066 (define-public python-nest-asyncio
25067 (package
25068 (name "python-nest-asyncio")
25069 (version "1.5.1")
25070 (source
25071 (origin
25072 (method url-fetch)
25073 (uri (pypi-uri "nest_asyncio" version))
25074 (sha256
25075 (base32
25076 "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
25077 (build-system python-build-system)
25078 (home-page "https://github.com/erdewit/nest_asyncio")
25079 (synopsis "Patch asyncio to allow nested event loops")
25080 (description
25081 "By design @code{asyncio} does not allow its event loop to be nested.
25082 This presents a practical problem: when in an environment where the event loop
25083 is already running it's impossible to run tasks and wait for the result. This
25084 module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
25085 @code{loop.run_until_complete}.")
25086 (license license:bsd-3)))
25087
25088 (define-public python-simpervisor
25089 (package
25090 (name "python-simpervisor")
25091 (version "0.4")
25092 (source
25093 (origin
25094 ;; Tests not included in release.
25095 (method git-fetch)
25096 (uri (git-reference
25097 (url "https://github.com/yuvipanda/simpervisor")
25098 (commit (string-append "v" version))))
25099 (file-name (git-file-name name version))
25100 (sha256
25101 (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
25102 (build-system python-build-system)
25103 (arguments
25104 `(#:tests? #f ; Test suite can't find aiohttp.
25105 #:phases
25106 (modify-phases %standard-phases
25107 (replace 'check
25108 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25109 (when tests?
25110 (add-installed-pythonpath inputs outputs)
25111 (invoke "pytest" "--maxfail" "3" "--verbose"))
25112 #t)))))
25113 (native-inputs
25114 `(("python-aiohttp" ,python-aiohttp)
25115 ("python-pytest" ,python-pytest)
25116 ("python-pytest-asyncio" ,python-pytest-asyncio)))
25117 (home-page "https://github.com/yuvipanda/simpervisor")
25118 (synopsis "Simple async process supervisor")
25119 (description
25120 "This package provides a simple async process supervisor in Python.")
25121 (license license:bsd-3)))
25122
25123 (define-public python-parallel
25124 (package
25125 (name "python-parallel")
25126 (version "1.6.4.4")
25127 (source
25128 (origin
25129 (method url-fetch)
25130 (uri (string-append
25131 "https://www.parallelpython.com/downloads/pp/pp-"
25132 version ".zip"))
25133 (sha256
25134 (base32
25135 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
25136 (native-inputs
25137 `(("unzip" ,unzip)))
25138 (build-system python-build-system)
25139 (arguments '(#:tests? #f)) ; No test suite.
25140 (home-page "https://www.parallelpython.com")
25141 (synopsis "Parallel and distributed programming for Python")
25142 (description "Parallel Python module (PP) provides an easy and efficient
25143 way to create parallel-enabled applications for SMP computers and clusters.
25144 PP module features cross-platform portability and dynamic load balancing.
25145 Thus applications written with PP will parallelize efficiently even on
25146 heterogeneous and multi-platform clusters (including clusters running other
25147 applications with variable CPU loads).")
25148 (license license:bsd-3)))
25149
25150 (define-public python2-parallel
25151 (package-with-python2 python-parallel))
25152
25153 (define-public python-djvulibre
25154 (package
25155 (name "python-djvulibre")
25156 (version "0.8.6")
25157 (source
25158 (origin
25159 (method url-fetch)
25160 (uri (pypi-uri "python-djvulibre" version))
25161 (sha256
25162 (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
25163 (build-system python-build-system)
25164 (native-inputs
25165 `(("ghostscript" ,ghostscript)
25166 ("pkg-config" ,pkg-config)
25167 ("python-nose" ,python-nose)))
25168 (inputs
25169 `(("djvulibre" ,djvulibre)
25170 ("python-cython" ,python-cython)))
25171 (arguments
25172 `(#:phases
25173 (modify-phases %standard-phases
25174 (add-after 'unpack 'fix-tests
25175 (lambda _
25176 ;; Unit tests try to load the 'dllpath.py' and fail, because it
25177 ;; doesn't make sense on GNU/Linux.
25178 (delete-file "djvu/dllpath.py")
25179 #t)))))
25180 (synopsis "Python bindings for DjVuLibre")
25181 (description "This is a set of Python bindings for the DjVuLibre library.")
25182 (home-page "https://jwilk.net/software/python-djvulibre")
25183 (license license:gpl2)))
25184
25185 (define-public python2-djvulibre
25186 (package-with-python2 python-djvulibre))
25187
25188 (define-public python-versioneer
25189 (package
25190 (name "python-versioneer")
25191 (version "0.19")
25192 (source
25193 (origin
25194 (method url-fetch)
25195 (uri (pypi-uri "versioneer" version))
25196 (sha256
25197 (base32
25198 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
25199 (build-system python-build-system)
25200 (home-page
25201 "https://github.com/python-versioneer/python-versioneer")
25202 (synopsis
25203 "Version-string management for VCS-controlled trees")
25204 (description
25205 "@code{versioneer} is a tool for managing a recorded version number in
25206 distutils-based python projects. The goal is to remove the tedious and
25207 error-prone \"update the embedded version string\" step from your release
25208 process.")
25209 (license license:public-domain)))
25210
25211 (define-public python2-gamera
25212 (package
25213 (name "python2-gamera")
25214 (version "3.4.4")
25215 (source
25216 (origin
25217 (method url-fetch)
25218 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
25219 "gamera-" version ".tar.gz"))
25220 (sha256
25221 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
25222 (modules '((guix build utils)))
25223 (snippet
25224 '(begin
25225 ;; Remove bundled libraries.
25226 (for-each delete-file-recursively
25227 '("src/libpng-1.2.5"
25228 "src/libtiff"
25229 "src/zlib-1.2.8"))))))
25230 (build-system python-build-system)
25231 (inputs
25232 `(("libpng" ,libpng)
25233 ("libtiff" ,libtiff)
25234 ("python2-wxpython" ,python2-wxpython)
25235 ("zlib" ,zlib)))
25236 (arguments
25237 `(#:python ,python-2))
25238 (synopsis "Framework for building document analysis applications")
25239 (description
25240 "Gamera is a toolkit for building document image recognition systems.")
25241 (home-page "https://gamera.informatik.hsnr.de/")
25242 (license license:gpl2+)))
25243
25244 (define-public python-contextvars
25245 (package
25246 (name "python-contextvars")
25247 (version "2.4")
25248 (source
25249 (origin
25250 (method url-fetch)
25251 (uri (pypi-uri "contextvars" version))
25252 (sha256
25253 (base32
25254 "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
25255 (build-system python-build-system)
25256 (propagated-inputs
25257 `(("python-immutables" ,python-immutables)))
25258 (home-page
25259 "https://github.com/MagicStack/contextvars")
25260 (synopsis "PEP 567 Backport")
25261 (description "This package implements a backport of Python 3.7
25262 @code{contextvars} module (see PEP 567) for Python 3.6.")
25263 (license license:asl2.0)))
25264
25265 (define-public python-aiofiles
25266 (package
25267 (name "python-aiofiles")
25268 (version "0.6.0")
25269 (source
25270 (origin
25271 (method url-fetch)
25272 (uri (pypi-uri "aiofiles" version))
25273 (sha256
25274 (base32
25275 "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
25276 (build-system python-build-system)
25277 (home-page "https://github.com/Tinche/aiofiles")
25278 (synopsis "File support for @code{asyncio}")
25279 (description "@code{python-aiofiles} is a library for handling local
25280 disk files in asyncio applications.")
25281 (license license:asl2.0)))
25282
25283 (define-public python-pyre-extensions
25284 (package
25285 (name "python-pyre-extensions")
25286 (version "0.0.18")
25287 (source
25288 (origin
25289 (method url-fetch)
25290 (uri (pypi-uri "pyre-extensions" version))
25291 (sha256
25292 (base32
25293 "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
25294 (build-system python-build-system)
25295 (propagated-inputs
25296 `(("python-typing-extensions"
25297 ,python-typing-extensions)
25298 ("python-typing-inspect" ,python-typing-inspect)))
25299 (home-page "https://pyre-check.org")
25300 (synopsis
25301 "Type system extensions for use with @code{python-pyre}")
25302 (description
25303 "@code{python-pyre-extensions} defines extensions to the standard
25304 @code{typing} module that are supported by the Pyre typechecker.")
25305 (license license:expat)))
25306
25307 (define-public python-dataclasses
25308 (package
25309 (name "python-dataclasses")
25310 (version "0.8")
25311 (source
25312 (origin
25313 (method url-fetch)
25314 (uri (pypi-uri "dataclasses" version))
25315 (sha256
25316 (base32
25317 "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
25318 (build-system python-build-system)
25319 (home-page
25320 "https://github.com/ericvsmith/dataclasses")
25321 (synopsis
25322 "Backport of the @code{dataclasses} module for Python 3.6")
25323 (description
25324 "This is an implementation of PEP 557, Data Classes. It is a
25325 backport of the @code{dataclasses} module for Python 3.6.")
25326 (license license:asl2.0)))
25327
25328 (define-public python-pywatchman
25329 (package
25330 (name "python-pywatchman")
25331 (version "1.4.1")
25332 (source
25333 (origin
25334 (method url-fetch)
25335 (uri (pypi-uri "pywatchman" version))
25336 (sha256
25337 (base32
25338 "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
25339 (build-system python-build-system)
25340 (arguments
25341 `(#:tests? #f)) ;there are none
25342 (home-page
25343 "https://facebook.github.io/watchman/")
25344 (synopsis "Watchman client for python")
25345 (description "@code{python-pywatchman} is a library to connect and
25346 query Watchman to discover file changes.")
25347 (license license:bsd-3)))
25348
25349 (define-public python-helpdev
25350 (package
25351 (name "python-helpdev")
25352 (version "0.7.1")
25353 (source
25354 (origin
25355 (method url-fetch)
25356 (uri (pypi-uri "helpdev" version))
25357 (sha256
25358 (base32
25359 "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
25360 (build-system python-build-system)
25361 (arguments
25362 `(#:phases
25363 (modify-phases %standard-phases
25364 (replace 'check
25365 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
25366 (when tests?
25367 (add-installed-pythonpath inputs outputs)
25368 (invoke "pytest" "tests"))
25369 #t)))))
25370 (propagated-inputs
25371 `(("python-importlib-metadata" ,python-importlib-metadata)))
25372 (native-inputs
25373 `(("python-pytest" ,python-pytest)))
25374 (home-page "https://gitlab.com/dpizetta/helpdev")
25375 (synopsis
25376 "Extract information about the Python environment easily")
25377 (description
25378 "Helpdev is a library to easily extract information about the Python
25379 environment.")
25380 (license license:expat)))
25381
25382 (define-public python-logutils
25383 (package
25384 (name "python-logutils")
25385 (version "0.3.5")
25386 (source
25387 (origin
25388 (method url-fetch)
25389 (uri (pypi-uri "logutils" version))
25390 (sha256
25391 (base32
25392 "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
25393 (build-system python-build-system)
25394 (home-page "https://bitbucket.org/vinay.sajip/logutils/")
25395 (synopsis "Logging utilities")
25396 (description "This package provides a set of handlers for the Python
25397 standard library logging package. Some of these handlers are out-of-scope
25398 for the standard library, and so they are packaged here. Others are updated
25399 versions which have appeared in recent Python releases, but are usable with
25400 older versions of Python and so are packaged here.")
25401 (license license:bsd-3)))
25402
25403 (define-public python-helper
25404 (package
25405 (name "python-helper")
25406 (version "2.5.0")
25407 (source (origin
25408 (method url-fetch)
25409 (uri (pypi-uri "helper" version))
25410 (sha256
25411 (base32
25412 "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
25413 (build-system python-build-system)
25414 (native-inputs
25415 `(("python-mock" ,python-mock)))
25416 (propagated-inputs
25417 `(("python-logutils" ,python-logutils)
25418 ("python-pyyaml" ,python-pyyaml)))
25419 (home-page "https://github.com/gmr/helper")
25420 (synopsis "Library for writing configurable applications and daemons")
25421 (description
25422 "This package provides procedures for quickly writing configurable
25423 applications and daemons.")
25424 (license license:bsd-3)))
25425
25426 (define-public python-qtsass
25427 (package
25428 (name "python-qtsass")
25429 (version "0.3.0")
25430 (source
25431 (origin
25432 ;; There are no tests in the PyPI tarball.
25433 (method git-fetch)
25434 (uri (git-reference
25435 (url "https://github.com/spyder-ide/qtsass/")
25436 (commit (string-append "v" version))))
25437 (file-name (git-file-name name version))
25438 (sha256
25439 (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
25440 (build-system python-build-system)
25441 (arguments
25442 `(#:test-target "pytest"
25443 #:phases
25444 (modify-phases %standard-phases
25445 ;; Tests need to read and write files.
25446 (add-before 'check 'make-git-checkout-writable
25447 (lambda _
25448 (for-each make-file-writable (find-files "."))
25449 #t)))))
25450 (native-inputs
25451 `(("python-pytest" ,python-pytest)
25452 ("python-pytest-cov" ,python-pytest-cov)
25453 ("python-pytest-runner" ,python-pytest-runner)))
25454 (propagated-inputs
25455 `(("python-libsass" ,python-libsass)))
25456 (home-page "https://github.com/spyder-ide/qtsass")
25457 (synopsis "Compile SCSS files to valid Qt stylesheets")
25458 (description
25459 "Besides being used in web development, CSS is also the way to stylize
25460 Qt-based desktop applications. However, Qt's CSS has a few variations that
25461 prevent the direct use of SASS compiler.
25462
25463 The purpose of this tool is to fill the gap between SASS and Qt-CSS by
25464 handling those variations.")
25465 (license license:expat)))
25466
25467 (define-public python-qdarkstyle
25468 (package
25469 (name "python-qdarkstyle")
25470 (version "2.8.1")
25471 (source
25472 (origin
25473 (method url-fetch)
25474 (uri (pypi-uri "QDarkStyle" version))
25475 (sha256
25476 (base32
25477 "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
25478 (build-system python-build-system)
25479 (arguments
25480 `(;; Fails unable to detect valid Qt bindings even when
25481 ;; added as native-inputs.
25482 #:tests? #f))
25483 (propagated-inputs
25484 `(("python-helpdev" ,python-helpdev)
25485 ("python-qtpy" ,python-qtpy)))
25486 (home-page
25487 "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
25488 (synopsis
25489 "Complete dark stylesheet for Python and Qt applications")
25490 (description "QDarkStyle is the most complete dark stylesheet for Python and
25491 Qt applications.")
25492 (license license:expat)))
25493
25494 (define-public python-bitstring
25495 (package
25496 (name "python-bitstring")
25497 (version "3.1.7")
25498 (source
25499 (origin
25500 (method url-fetch)
25501 (uri (pypi-uri "bitstring" version))
25502 (sha256
25503 (base32
25504 "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
25505 (build-system python-build-system)
25506 (arguments
25507 `(#:phases
25508 (modify-phases %standard-phases
25509 (replace 'check
25510 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25511 (when tests?
25512 (add-installed-pythonpath inputs outputs)
25513 (with-directory-excursion "test"
25514 (invoke "pytest")))
25515 #t)))))
25516 (native-inputs
25517 `(("python-pytest" ,python-pytest)))
25518 (home-page "https://github.com/scott-griffiths/bitstring")
25519 (synopsis
25520 "Simple construction, analysis and modification of binary data")
25521 (description
25522 "Bitstring is a library for simple construction, analysis and modification
25523 of binary data.")
25524 (license license:expat)))
25525
25526 (define-public python-confuse
25527 (package
25528 (name "python-confuse")
25529 (version "1.4.0")
25530 (source
25531 (origin
25532 (method url-fetch)
25533 (uri (pypi-uri "confuse" version))
25534 (sha256
25535 (base32
25536 "0r74djc8r6lfx6ldsqnhpvfsn256gsfzbl33qcm77hp2qr8h9z4j"))))
25537 (build-system python-build-system)
25538 (propagated-inputs
25539 `(("python-pathlib" ,python-pathlib)
25540 ("python-pyyaml" ,python-pyyaml)))
25541 (home-page "https://github.com/beetbox/confuse")
25542 (synopsis "Painless YAML configuration.")
25543 (description "Confuse is a configuration library for Python that uses
25544 YAML. It takes care of defaults, overrides, type checking, command-line
25545 integration, human-readable errors, and standard OS-specific locations.")
25546 (license license:expat)))
25547
25548 (define-public python-reflink
25549 (package
25550 (name "python-reflink")
25551 (version "0.2.1")
25552 (source
25553 (origin
25554 (method url-fetch)
25555 (uri (pypi-uri "reflink" version))
25556 (sha256
25557 (base32
25558 "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
25559 (build-system python-build-system)
25560 (arguments
25561 `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
25562 (propagated-inputs
25563 `(("python-cffi" ,python-cffi)))
25564 (native-inputs
25565 `(("python-pytest" ,python-pytest)
25566 ("python-pytest-runner" ,python-pytest-runner)))
25567 (home-page "https://gitlab.com/rubdos/pyreflink")
25568 (synopsis "Python wrapper around reflink system call")
25569 (description
25570 "Python reflink wraps around platform specific @code{reflink}
25571 implementations.")
25572 (license license:expat)))
25573
25574 (define-public python-pivy
25575 (package
25576 (name "python-pivy")
25577 (version "0.6.5")
25578 (source
25579 (origin
25580 (method git-fetch)
25581 (uri (git-reference
25582 (url "https://github.com/coin3d/pivy")
25583 (commit version)))
25584 (file-name (git-file-name name version))
25585 (sha256
25586 (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
25587 (build-system python-build-system)
25588 (arguments
25589 `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
25590 #:tests? #f
25591 #:phases
25592 (modify-phases %standard-phases
25593 (add-after 'unpack 'patch-cmake-include-dirs
25594 (lambda _
25595 ;; Patch buildsystem to respect Coin3D include directory
25596 (substitute* "CMakeLists.txt"
25597 (("\\$\\{SoQt_INCLUDE_DIRS}")
25598 "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
25599 #t)))))
25600 (native-inputs
25601 `(("cmake" ,cmake)
25602 ("swig" ,swig)))
25603 (inputs
25604 `(("python-wrapper" ,python-wrapper)
25605 ("qtbase" ,qtbase-5)
25606 ("libxi" ,libxi)
25607 ("libice" ,libice)
25608 ("soqt" ,soqt)
25609 ("glew" ,glew)
25610 ("coin3D" ,coin3D-4)))
25611 (home-page "https://github.com/coin3d/pivy")
25612 (synopsis "Python bindings to Coin3D")
25613 (description
25614 "Pivy provides python bindings for Coin, a 3D graphics library with an
25615 Application Programming Interface based on the Open Inventor 2.1 API.")
25616 (license license:isc)))
25617
25618 (define-public python-crayons
25619 (package
25620 (name "python-crayons")
25621 (version "0.4.0")
25622 (source
25623 (origin
25624 (method url-fetch)
25625 (uri (pypi-uri "crayons" version))
25626 (sha256
25627 (base32
25628 "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
25629 (build-system python-build-system)
25630 (propagated-inputs
25631 `(("python-colorama" ,python-colorama)))
25632 (home-page "https://github.com/MasterOdin/crayons")
25633 (synopsis "TextUI colors for Python")
25634 (description "This package gives you colored strings for the terminal.
25635 Crayons automatically wraps a given string in the foreground color and
25636 restores the original state after the string is printed.")
25637 (license license:expat)))
25638
25639 (define-public python-sane
25640 (package
25641 (name "python-sane")
25642 (version "2.9.1")
25643 (source
25644 (origin
25645 (method url-fetch)
25646 (uri (pypi-uri name version))
25647 (sha256
25648 (base32
25649 "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
25650 (build-system python-build-system)
25651 (native-inputs
25652 `(("python-pytest" ,python-pytest)))
25653 (inputs
25654 `(("sane-backends" ,sane-backends)))
25655 (home-page "https://github.com/python-pillow/Sane")
25656 (synopsis "Python interface to the SANE scanner")
25657 (description "This package provides Python interface to the SANE scanner
25658 and frame grabber interface.")
25659 (license (license:non-copyleft
25660 ;; Yet another variant of the X/MIT license.
25661 "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
25662
25663 (define-public python-screenkey
25664 (package
25665 (name "python-screenkey")
25666 (version "1.4")
25667 (source
25668 (origin
25669 (method git-fetch)
25670 (uri (git-reference
25671 (url "https://gitlab.com/screenkey/screenkey")
25672 (commit (string-append "v" version))))
25673 (file-name (git-file-name name version))
25674 (sha256
25675 (base32
25676 "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
25677 (build-system python-build-system)
25678 (arguments
25679 `(#:phases
25680 (modify-phases %standard-phases
25681 (add-after 'unpack 'fix-dlopen-paths
25682 (lambda* (#:key inputs outputs #:allow-other-keys)
25683 (let* ((x11 (assoc-ref inputs "libx11"))
25684 (xtst (assoc-ref inputs "libxtst")))
25685 (substitute* "Screenkey/xlib.py"
25686 (("libX11.so.6")
25687 (string-append x11 "/lib/libX11.so.6")))
25688 (substitute* "Screenkey/xlib.py"
25689 (("libXtst.so.6")
25690 (string-append xtst "/lib/libXtst.so.6")))
25691 #t)))
25692 (add-after 'install 'wrap-screenkey
25693 (lambda* (#:key outputs #:allow-other-keys)
25694 (wrap-program
25695 (string-append (assoc-ref outputs "out") "/bin/screenkey")
25696 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
25697 `("GI_TYPELIB_PATH"
25698 ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
25699 #t)))))
25700 (inputs
25701 `(("python-distutils-extra" ,python-distutils-extra)
25702 ("python-tokenize-rt" ,python-tokenize-rt)
25703 ("libx11" ,libx11)
25704 ("libxtst" ,libxtst)
25705 ("gtk+" ,gtk+)
25706 ("python-pygobject" ,python-pygobject)
25707 ("python-pycairo" ,python-pycairo)
25708 ("python-setuptools-git" ,python-setuptools-git)
25709 ("python-babel" ,python-babel)))
25710 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
25711 (synopsis
25712 "Screencast tool to display pressed keys")
25713 (description
25714 "A screencast tool to display your keys inspired by Screenflick.")
25715 (license license:gpl3+)))
25716
25717 (define-public python-jinja2-cli
25718 (package
25719 (name "python-jinja2-cli")
25720 (version "0.7.0")
25721 (source
25722 (origin
25723 (method url-fetch)
25724 (uri (pypi-uri "jinja2-cli" version))
25725 (sha256
25726 (base32
25727 "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
25728 (build-system python-build-system)
25729 (propagated-inputs
25730 `(("python-jinja2" ,python-jinja2)))
25731 (native-inputs
25732 `(("python-flake8" ,python-flake8)
25733 ("python-jinja2" ,python-jinja2)
25734 ("python-pytest" ,python-pytest)))
25735 (home-page "https://github.com/mattrobenolt/jinja2-cli")
25736 (synopsis "Command-line interface to Jinja2")
25737 (description
25738 "This package provides a command-line interface (CLI) to the Jinja2
25739 template engine.")
25740 (license license:bsd-3)))
25741
25742 (define-public python-readability
25743 (package
25744 (name "python-readability")
25745 (version "0.3.1")
25746 (source
25747 (origin
25748 (method url-fetch)
25749 (uri (pypi-uri "readability" version))
25750 (sha256
25751 (base32
25752 "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
25753 (build-system python-build-system)
25754 (home-page
25755 "https://github.com/andreasvc/readability/")
25756 (synopsis
25757 "Measure the readability of a given text using surface
25758 characteristics")
25759 (description
25760 "This package provides a Python library that is an implementation of
25761 traditional readability measures based on simple surface
25762 characteristics. These measures are basically linear regressions based on the
25763 number of words, syllables, and sentences.")
25764 (license license:asl2.0)))
25765
25766 (define-public python-listparser
25767 (package
25768 (name "python-listparser")
25769 (version "0.18")
25770 (source
25771 (origin
25772 (method url-fetch)
25773 (uri (pypi-uri "listparser" version))
25774 (sha256
25775 (base32
25776 "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
25777 (build-system python-build-system)
25778 (home-page
25779 "https://github.com/kurtmckee/listparser")
25780 (synopsis
25781 "Parse subscription lists in Python")
25782 (description
25783 "This package provides a Python library that can parse OPML, FOAF, and
25784 iGoogle subscription lists.")
25785 (license license:expat)))
25786
25787 (define-public python-smartypants
25788 (package
25789 (name "python-smartypants")
25790 (version "2.0.1")
25791 (source
25792 (origin
25793 ;; There's no source tarball for 2.0.1 on PyPI.
25794 (method git-fetch)
25795 (uri (git-reference
25796 (url "https://github.com/leohemsted/smartypants.py")
25797 (commit (string-append "v" version))))
25798 (file-name (git-file-name name version))
25799 (sha256
25800 (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
25801 (build-system python-build-system)
25802 (arguments
25803 '(#:phases
25804 (modify-phases %standard-phases
25805 (replace 'check
25806 ;; Its `setup.py test` doesn't report failure with exit status, so
25807 ;; we use `nose` instead.
25808 (lambda _
25809 (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
25810 (native-inputs
25811 ;; For tests.
25812 `(("python-docutils" ,python-docutils)
25813 ("python-nose" ,python-nose)
25814 ("python-pygments" ,python-pygments)))
25815 (home-page "https://github.com/leohemsted/smartypants.py")
25816 (synopsis "Translate punctuation characters into smart quotes")
25817 (description
25818 "@command{smartpants} can perform the following transformations:
25819 @enumerate
25820 @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
25821 @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
25822 entities
25823 @item Dashes (-- and ---) into en- and em-dash entities
25824 @item Three consecutive dots (... or . . .) into an ellipsis entity
25825 @end enumerate")
25826 (license license:bsd-3)))
25827
25828 (define-public python-typogrify
25829 (package
25830 (name "python-typogrify")
25831 (version "2.0.7")
25832 (source (origin
25833 (method url-fetch)
25834 (uri (pypi-uri "typogrify" version))
25835 (sha256
25836 (base32
25837 "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
25838 (build-system python-build-system)
25839 (arguments
25840 '(#:phases
25841 (modify-phases %standard-phases
25842 (replace 'check
25843 (lambda _
25844 (invoke "nosetests" "-v"))))))
25845 (propagated-inputs
25846 `(("python-smartypants" ,python-smartypants)))
25847 (native-inputs
25848 ;; For tests.
25849 `(("python-nose" ,python-nose)))
25850 (home-page "https://github.com/mintchaos/typogrify")
25851 (synopsis "Filters to transform text into typographically-improved HTML")
25852 (description
25853 "@code{typogrify} provides a set of custom filters that automatically
25854 apply various transformations to plain text in order to yield
25855 typographically-improved HTML. While often used in conjunction with Jinja and
25856 Django template systems, the filters can be used in any environment.")
25857 (license license:bsd-3)))
25858
25859 (define-public python-ld
25860 (package
25861 (name "python-ld")
25862 (version "0.5.0")
25863 (source
25864 (origin
25865 (method url-fetch)
25866 (uri (pypi-uri "ld" version))
25867 (sha256
25868 (base32
25869 "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
25870 (build-system python-build-system)
25871 (propagated-inputs
25872 `(("python-six" ,python-six)))
25873 (home-page "https://github.com/nir0s/ld")
25874 (synopsis "OS platform information API")
25875 (description
25876 "The ld package provides information about the GNU/Linux distribution it
25877 runs on, such as a reliable machine-readable ID, or version information.")
25878 (license license:asl2.0)))
25879
25880 (define-public python-quicktions
25881 (package
25882 (name "python-quicktions")
25883 (version "1.11")
25884 (source
25885 (origin
25886 (method url-fetch)
25887 (uri (pypi-uri "quicktions" version))
25888 (sha256
25889 (base32
25890 "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
25891 (modules '((guix build utils)))
25892 (snippet
25893 '(begin
25894 ;; This file is generated by Cython.
25895 (delete-file "src/quicktions.c") #t))))
25896 (build-system python-build-system)
25897 (arguments
25898 `(#:phases
25899 (modify-phases %standard-phases
25900 (add-before 'build 'cythonize-sources
25901 (lambda _
25902 (with-directory-excursion "src"
25903 (invoke "cython" "quicktions.pyx"))))
25904 (replace 'check
25905 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
25906 (when tests?
25907 (add-installed-pythonpath inputs outputs)
25908 (invoke "pytest"))
25909 #t)))))
25910 (native-inputs
25911 `(("python-cython" ,python-cython)
25912 ("python-pytest" ,python-pytest)))
25913 (home-page "https://github.com/scoder/quicktions")
25914 (synopsis "Fast fractions data type for rational numbers")
25915 (description
25916 "This package provides fast fractions data type for rational numbers. It
25917 is the cythonized version of @code{fractions.Fraction}.")
25918 (license license:psfl)))
25919
25920 (define-public python-pathvalidate
25921 (package
25922 (name "python-pathvalidate")
25923 (version "2.4.1")
25924 (source
25925 (origin
25926 (method url-fetch)
25927 (uri (pypi-uri "pathvalidate" version))
25928 (sha256
25929 (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
25930 (build-system python-build-system)
25931 (arguments
25932 '(#:tests? #f))
25933 ;; Tests disabled because of circular dependencies.
25934 ;; pathvalidate tests depend on pytest-md-report, which
25935 ;; depends on pathvalidate.
25936 (native-inputs
25937 `(("python-allpairspy" ,python-allpairspy)
25938 ("python-click" ,python-click)
25939 ("python-faker" ,python-faker)
25940 ("python-pytest" ,python-pytest)))
25941 (home-page "https://github.com/thombashi/pathvalidate")
25942 (synopsis "Sanitize strings representing paths")
25943 (description
25944 "@code{pathvalidate} is a Python library to sanitize/validate strings
25945 representing paths or filenames.")
25946 (license license:expat)))