gnu: Add python-distlib/next.
[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 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 Eric Bavier <bavier@member.fsf.org>
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 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 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 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 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 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
32 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
33 ;;; Copyright © 2016, 2017, 2018, 2020 Julien Lepiller <julien@lepiller.eu>
34 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 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 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 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 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 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 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 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 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 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.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 ;;;
97 ;;; This file is part of GNU Guix.
98 ;;;
99 ;;; GNU Guix is free software; you can redistribute it and/or modify it
100 ;;; under the terms of the GNU General Public License as published by
101 ;;; the Free Software Foundation; either version 3 of the License, or (at
102 ;;; your option) any later version.
103 ;;;
104 ;;; GNU Guix is distributed in the hope that it will be useful, but
105 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
106 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
107 ;;; GNU General Public License for more details.
108 ;;;
109 ;;; You should have received a copy of the GNU General Public License
110 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
111
112 (define-module (gnu packages python-xyz)
113 #:use-module ((guix licenses) #:prefix license:)
114 #:use-module (gnu packages)
115 #:use-module (gnu packages algebra)
116 #:use-module (gnu packages adns)
117 #:use-module (gnu packages aidc)
118 #:use-module (gnu packages attr)
119 #:use-module (gnu packages backup)
120 #:use-module (gnu packages bash)
121 #:use-module (gnu packages check)
122 #:use-module (gnu packages cmake)
123 #:use-module (gnu packages compression)
124 #:use-module (gnu packages crypto)
125 #:use-module (gnu packages databases)
126 #:use-module (gnu packages dbm)
127 #:use-module (gnu packages djvu)
128 #:use-module (gnu packages docker)
129 #:use-module (gnu packages enchant)
130 #:use-module (gnu packages file)
131 #:use-module (gnu packages fontutils)
132 #:use-module (gnu packages gcc)
133 #:use-module (gnu packages geo)
134 #:use-module (gnu packages ghostscript)
135 #:use-module (gnu packages gl)
136 #:use-module (gnu packages glib)
137 #:use-module (gnu packages gnome)
138 #:use-module (gnu packages gnupg)
139 #:use-module (gnu packages graphviz)
140 #:use-module (gnu packages graphics)
141 #:use-module (gnu packages gsasl)
142 #:use-module (gnu packages gstreamer)
143 #:use-module (gnu packages gtk)
144 #:use-module (gnu packages haskell-xyz)
145 #:use-module (gnu packages icu4c)
146 #:use-module (gnu packages image)
147 #:use-module (gnu packages kerberos)
148 #:use-module (gnu packages libevent)
149 #:use-module (gnu packages libffi)
150 #:use-module (gnu packages libidn)
151 #:use-module (gnu packages linux)
152 #:use-module (gnu packages llvm)
153 #:use-module (gnu packages man)
154 #:use-module (gnu packages maths)
155 #:use-module (gnu packages monitoring)
156 #:use-module (gnu packages multiprecision)
157 #:use-module (gnu packages networking)
158 #:use-module (gnu packages ncurses)
159 #:use-module (gnu packages openstack)
160 #:use-module (gnu packages pcre)
161 #:use-module (gnu packages perl)
162 #:use-module (gnu packages photo)
163 #:use-module (gnu packages pkg-config)
164 #:use-module (gnu packages python)
165 #:use-module (gnu packages python-check)
166 #:use-module (gnu packages python-compression)
167 #:use-module (gnu packages python-crypto)
168 #:use-module (gnu packages python-science)
169 #:use-module (gnu packages python-web)
170 #:use-module (gnu packages qt)
171 #:use-module (gnu packages rdf)
172 #:use-module (gnu packages readline)
173 #:use-module (gnu packages sdl)
174 #:use-module (gnu packages search)
175 #:use-module (gnu packages shells)
176 #:use-module (gnu packages sphinx)
177 #:use-module (gnu packages ssh)
178 #:use-module (gnu packages terminals)
179 #:use-module (gnu packages tex)
180 #:use-module (gnu packages texinfo)
181 #:use-module (gnu packages textutils)
182 #:use-module (gnu packages time)
183 #:use-module (gnu packages tls)
184 #:use-module (gnu packages version-control)
185 #:use-module (gnu packages video)
186 #:use-module (gnu packages web)
187 #:use-module (gnu packages wxwidgets)
188 #:use-module (gnu packages base)
189 #:use-module (gnu packages xml)
190 #:use-module (gnu packages xorg)
191 #:use-module (gnu packages xdisorg)
192 #:use-module (gnu packages tcl)
193 #:use-module (gnu packages bdw-gc)
194 #:use-module (gnu packages serialization)
195 #:use-module (guix packages)
196 #:use-module (guix download)
197 #:use-module (guix git-download)
198 #:use-module (guix hg-download)
199 #:use-module (guix utils)
200 #:use-module (guix build-system gnu)
201 #:use-module (guix build-system cmake)
202 #:use-module (guix build-system python)
203 #:use-module (guix build-system trivial)
204 #:use-module (srfi srfi-1)
205 #:use-module (srfi srfi-26))
206
207 (define-public python-slixmpp
208 (package
209 (name "python-slixmpp")
210 (version "1.5.2")
211 (source
212 (origin
213 (method git-fetch)
214 (uri
215 (git-reference
216 (url "https://lab.louiz.org/poezio/slixmpp.git")
217 (commit
218 (string-append "slix-" version))))
219 (file-name
220 (git-file-name name version))
221 (sha256
222 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
223 (build-system python-build-system)
224 (arguments
225 `(#:phases
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch
228 (lambda _
229 (substitute* "setup.py"
230 (("'CC', 'cc'")
231 "'CC', 'gcc'"))
232 #t)))))
233 (native-inputs
234 `(("cython" ,python-cython)
235 ("gnupg" ,gnupg)
236 ("pkg-config" ,pkg-config)))
237 (propagated-inputs
238 `(("python-aiodns" ,python-aiodns)
239 ("python-aiohttp" ,python-aiohttp)
240 ("python-pyasn1" ,python-pyasn1)
241 ("python-pyasn1-modules" ,python-pyasn1-modules)))
242 (inputs
243 `(("libidn" ,libidn)
244 ("python" ,python))) ; We are building a Python extension.
245 (synopsis "XMPP library without threads")
246 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
247 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
248 socket handling, the timers, the events dispatching) in order to remove all
249 threads.")
250 (home-page "https://lab.louiz.org/poezio/slixmpp")
251 (license license:expat)))
252
253 (define-public python-tenacity
254 (package
255 (name "python-tenacity")
256 (version "6.1.0")
257 (source (origin
258 (method url-fetch)
259 (uri (pypi-uri "tenacity" version))
260 (sha256
261 (base32
262 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
263 (build-system python-build-system)
264 (native-inputs
265 `(("python-setuptools-scm" ,python-setuptools-scm)
266 ("python-sphinx" ,python-sphinx)
267 ("python-tornado" ,python-tornado)
268 ("python-pytest" ,python-pytest)))
269 (propagated-inputs
270 `(("python-six" ,python-six)))
271 (arguments
272 `(#:phases (modify-phases %standard-phases
273 (replace 'check
274 (lambda _
275 (invoke "pytest")
276 #t)))))
277 (home-page "https://github.com/jd/tenacity")
278 (synopsis "Retrying library for python")
279 (description "Tenacity is a general-purpose python library to simplify the
280 task of adding retry behavior to just about anything.")
281 (license license:asl2.0)))
282
283 (define-public python-pytelegrambotapi
284 (package
285 (name "python-pytelegrambotapi")
286 (version "3.7.4")
287 (source
288 (origin
289 (method git-fetch)
290 (uri (git-reference
291 (url "https://github.com/eternnoir/pyTelegramBotAPI")
292 (commit version)))
293 (file-name (git-file-name name version))
294 (sha256
295 (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
296 (build-system python-build-system)
297 (arguments
298 `(#:phases
299 (modify-phases %standard-phases
300 (replace 'check
301 (lambda* (#:key tests? #:allow-other-keys)
302 (when tests?
303 (with-directory-excursion "tests"
304 (invoke "py.test")))
305 #t)))))
306 (propagated-inputs
307 `(("python-requests" ,python-requests)))
308 (native-inputs
309 `(("python-pytest" ,python-pytest)))
310 (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
311 (synopsis "Python Telegram bot api")
312 (description "This package provides a simple, but extensible Python
313 implementation for the Telegram Bot API.")
314 (license license:gpl2)))
315
316 (define-public python-colorlog
317 (package
318 (name "python-colorlog")
319 (version "4.1.0")
320 (source (origin
321 (method url-fetch)
322 (uri (pypi-uri "colorlog" version))
323 (sha256
324 (base32
325 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
326 (build-system python-build-system)
327 (native-inputs
328 `(("python-pytest" ,python-pytest)))
329 (arguments
330 `(#:phases (modify-phases %standard-phases
331 (replace 'check
332 (lambda _
333 ;; Extend PYTHONPATH so the built package will be found.
334 (setenv "PYTHONPATH"
335 (string-append (getcwd) "/build/lib:"
336 (getenv "PYTHONPATH")))
337 (invoke "pytest" "-p" "no:logging")
338 #t)))))
339 (home-page "https://github.com/borntyping/python-colorlog")
340 (synopsis "Log formatting with colors for python")
341 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
342 with Python's logging module that outputs records using terminal colors.")
343 (license license:expat)))
344
345 (define-public python-pyprind
346 (package
347 (name "python-pyprind")
348 (version "2.11.2")
349 (source (origin
350 (method url-fetch)
351 (uri (pypi-uri "PyPrind" version))
352 (sha256
353 (base32
354 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
355 (build-system python-build-system)
356 (propagated-inputs
357 `(("python-psutil" ,python-psutil)))
358 (home-page "https://github.com/rasbt/pyprind")
359 (synopsis "Python Progress Bar and Percent Indicator Utility")
360 (description "The PyPrind (Python Progress Indicator) module provides a
361 progress bar and a percentage indicator object that let you track the progress
362 of a loop structure or other iterative computation.")
363 (license license:bsd-3)))
364
365 (define-public python-gphoto2
366 (package
367 (name "python-gphoto2")
368 (version "2.2.1")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "gphoto2" version))
372 (sha256
373 (base32
374 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
375 (build-system python-build-system)
376 (native-inputs
377 `(("pkg-config" ,pkg-config)))
378 (inputs
379 `(("libgphoto2" ,libgphoto2)))
380 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
381 (synopsis "Python interface to libgphoto2")
382 (description "@code{python-gphoto2} is a comprehensive Python interface
383 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
384 automatically generate the interface code.")
385 (license license:gpl3+)))
386
387 (define-public python-colour
388 (package
389 (name "python-colour")
390 (version "0.1.5")
391 (source (origin
392 (method url-fetch)
393 (uri (pypi-uri "colour" version))
394 (sha256
395 (base32
396 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
397 (build-system python-build-system)
398 (native-inputs
399 `(("python-d2to1" ,python-d2to1)))
400 (home-page "https://github.com/vaab/colour")
401 (synopsis "Convert and manipulate various color representations")
402 (description "Pythonic way to manipulate color representations (HSL, RVB,
403 web, X11, ...).")
404 (license license:expat)))
405
406 (define-public python-d2to1
407 (package
408 (name "python-d2to1")
409 (version "0.2.12.post1")
410 (source (origin
411 (method url-fetch)
412 (uri (pypi-uri "d2to1" version))
413 (sha256
414 (base32
415 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
416 (build-system python-build-system)
417 (native-inputs
418 `(("python-nose" ,python-nose)))
419 (home-page "https://github.com/embray/d2to1")
420 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
421 in python")
422 (description "The python package d2to1 (the d is for distutils) allows
423 using distutils2-like setup.cfg files for a package's metadata with a
424 distribute/setuptools setup.py script.")
425 (license license:bsd-2)))
426
427 (define-public python-rawkit
428 (package
429 (name "python-rawkit")
430 (version "0.6.0")
431 (source (origin
432 (method url-fetch)
433 (uri (pypi-uri "rawkit" version))
434 (sha256
435 (base32
436 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
437 (build-system python-build-system)
438 (native-inputs
439 `(("python-pytest" ,python-pytest)
440 ("python-mock" ,python-mock)))
441 (inputs
442 `(("libraw" ,libraw)))
443 (home-page "https://rawkit.readthedocs.io")
444 (synopsis "Ctypes-based LibRaw binding for Python")
445 (description "The rawkit package provides two modules: rawkit and libraw.
446 The rawkit module provides a high-level Pythonic interface for developing raw
447 photos, while the libraw module provides a CTypes based interface for
448 interacting with the low-level LibRaw C APIs.")
449 (license license:expat)))
450
451 (define-public python-easygui
452 (package
453 (name "python-easygui")
454 (version "0.98.1")
455 (source (origin
456 (method url-fetch)
457 (uri (pypi-uri "easygui" version))
458 (sha256
459 (base32
460 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
461 (build-system python-build-system)
462 (propagated-inputs
463 `(("python-tkinter" ,python "tk")))
464 (home-page "https://github.com/robertlugg/easygui")
465 (synopsis "GUI programming module for Python")
466 (description "EasyGUI is a module for very simple, very easy GUI
467 programming in Python. EasyGUI is different from other GUI generators in that
468 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
469 simple function calls.")
470 (license license:bsd-3)))
471
472 (define-public python-pymediainfo
473 (package
474 (name "python-pymediainfo")
475 (version "4.1")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (pypi-uri "pymediainfo" version))
480 (sha256
481 (base32
482 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
483 (build-system python-build-system)
484 (native-inputs
485 `(("python-setuptools-scm" ,python-setuptools-scm)
486 ("python-pytest" ,python-pytest)))
487 (inputs
488 `(("libmediainfo" ,libmediainfo)))
489 (arguments
490 `(#:phases
491 (modify-phases %standard-phases
492 (add-after 'unpack 'patch-libmediainfo
493 (lambda _
494 (substitute* "pymediainfo/__init__.py"
495 (("libmediainfo.so.0")
496 (string-append (assoc-ref %build-inputs "libmediainfo")
497 "/lib/libmediainfo.so.0")))
498 #t))
499 (replace 'check
500 (lambda _
501 ;; Extend PYTHONPATH so the built package will be found.
502 (setenv "PYTHONPATH"
503 (string-append (getcwd) "/build/lib:"
504 (getenv "PYTHONPATH")))
505 ;; Skip the only failing test "test_parse_url"
506 (invoke "pytest" "-vv" "-k" "not test_parse_url")
507 #t)))))
508 (home-page
509 "https://github.com/sbraz/pymediainfo")
510 (synopsis
511 "Python wrapper for the mediainfo library")
512 (description
513 "Python wrapper for the mediainfo library to access the technical and tag
514 data for video and audio files.")
515 (license license:expat)))
516
517 (define-public python-psutil
518 (package
519 (name "python-psutil")
520 (version "5.7.2")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "psutil" version))
525 (sha256
526 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
527 (build-system python-build-system)
528 (arguments
529 ;; FIXME: some tests do not return and time out. Some tests fail because
530 ;; some processes survive kill().
531 '(#:tests? #f))
532 (home-page "https://www.github.com/giampaolo/psutil")
533 (synopsis "Library for retrieving information on running processes")
534 (description
535 "psutil (Python system and process utilities) is a library for retrieving
536 information on running processes and system utilization (CPU, memory, disks,
537 network) in Python. It is useful mainly for system monitoring, profiling and
538 limiting process resources and management of running processes. It implements
539 many functionalities offered by command line tools such as: ps, top, lsof,
540 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
541 pidof, tty, taskset, pmap.")
542 (properties `((python2-variant . ,(delay python2-psutil))))
543 (license license:bsd-3)))
544
545 (define-public python2-psutil
546 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
547 (package
548 (inherit base)
549 (propagated-inputs
550 `(("python2-enum34" ,python2-enum34) ;optional
551 ,@(package-propagated-inputs base))))))
552
553 (define-public python-shapely
554 (package
555 (name "python-shapely")
556 (version "1.7.1")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "Shapely" version))
561 (sha256
562 (base32
563 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
564 (modules '((guix build utils)))
565 (snippet
566 '(begin
567 (delete-file "shapely/speedups/_speedups.c")
568 (delete-file "shapely/vectorized/_vectorized.c")
569 #t))))
570 (build-system python-build-system)
571 (native-inputs
572 `(("python-cython" ,python-cython)
573 ("python-matplotlib" ,python-matplotlib)
574 ("python-pytest" ,python-pytest)
575 ("python-pytest-cov" ,python-pytest-cov)))
576 (inputs
577 `(("geos" ,geos)))
578 (propagated-inputs
579 `(("python-numpy" ,python-numpy)))
580 (arguments
581 `(#:phases
582 (modify-phases %standard-phases
583 (add-after 'unpack 'patch-geos-path
584 (lambda* (#:key inputs #:allow-other-keys)
585 (let ((geos (assoc-ref inputs "geos"))
586 (glibc (assoc-ref inputs ,(if (%current-target-system)
587 "cross-libc" "libc"))))
588 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
589 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
590 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
591 geos "/lib/libgeos_c.so'])"))
592 (("free = load_dll\\('c'\\)\\.free")
593 (string-append "free = load_dll('c', fallbacks=['"
594 glibc "/lib/libc.so.6']).free"))
595 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
596 (string-append "free = load_dll('c', fallbacks=['"
597 glibc "/lib/libc.so.6']).free"))))
598 #t)))))
599 (home-page "https://github.com/Toblerity/Shapely")
600 (synopsis "Library for the manipulation and analysis of geometric objects")
601 (description "Shapely is a Python package for manipulation and analysis of
602 planar geometric objects. It is based on the @code{GEOS} library.")
603 (license license:bsd-3)))
604
605 (define-public python-shortuuid
606 (package
607 (name "python-shortuuid")
608 (version "0.5.0")
609 (source
610 (origin
611 (method url-fetch)
612 (uri (pypi-uri "shortuuid" version))
613 (sha256
614 (base32
615 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
616 (build-system python-build-system)
617 (native-inputs
618 `(("python-pep8" ,python-pep8)))
619 (home-page "https://github.com/skorokithakis/shortuuid")
620 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
621 (description
622 "@code{shortuuid} is a Python library for generating concise, unambiguous
623 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
624 module and then similar looking characters are removed.")
625 (license license:bsd-3)))
626
627 (define-public python-logwrap
628 (package
629 (name "python-logwrap")
630 (version "3.2.1")
631 (source
632 (origin
633 (method url-fetch)
634 (uri (pypi-uri "logwrap" version ".zip"))
635 (sha256
636 (base32
637 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
638 (build-system python-build-system)
639 (propagated-inputs
640 `(("python-six" ,python-six)
641 ("python-typing" ,python-typing)))
642 (native-inputs
643 `(("unzip" ,unzip)
644 ("python-cython" ,python-cython)
645 ("python-pytest" ,python-pytest)
646 ("python-pytest-cov" ,python-pytest-cov)
647 ("python-pytest-runner" ,python-pytest-runner)))
648 (home-page "https://github.com/penguinolog/logwrap")
649 (synopsis "Decorator for logging function arguments")
650 (description "This package provides a decorator to log function arguments
651 and function call return values in a human-readable way.")
652 (license license:asl2.0)))
653
654 (define-public python2-shapely
655 (package-with-python2 python-shapely))
656
657 (define-public python-clyent
658 (package
659 (name "python-clyent")
660 (version "1.2.1")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (pypi-uri "clyent" version))
665 (sha256
666 (base32
667 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
668 (build-system python-build-system)
669 (native-inputs
670 `(("python-mock" ,python-mock)))
671 (home-page "https://github.com/Anaconda-Platform/clyent")
672 (synopsis "Command line client library")
673 (description "Clyent is a Python command line utility library. It is used
674 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
675 (license license:bsd-3)))
676
677 (define-public python2-clyent
678 (package-with-python2 python-clyent))
679
680 (define-public python-babel
681 (package
682 (name "python-babel")
683 (version "2.8.0")
684 (source
685 (origin
686 (method url-fetch)
687 (uri (pypi-uri "Babel" version))
688 (sha256
689 (base32
690 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
691 (build-system python-build-system)
692 (native-inputs
693 `(("python-freezegun" ,python-freezegun)
694 ("python-pytest" ,python-pytest)))
695 (propagated-inputs
696 `(("python-pytz" ,python-pytz)))
697 (arguments
698 `(#:phases (modify-phases %standard-phases
699 (replace 'check
700 (lambda _
701 (invoke "pytest" "-vv" "-k"
702 (string-append
703 ;; XXX: These tests fail when using Pytest 4.x and
704 ;; Babel 2.6.0. Try removing this for later versions.
705 "not test_no_inherit_metazone_marker_never_in_output"
706 " and not test_smoke_dates"
707 " and not test_smoke_numbers")))))))
708 (home-page "http://babel.pocoo.org/")
709 (synopsis
710 "Tools for internationalizing Python applications")
711 (description
712 "Babel is composed of two major parts:
713 - tools to build and work with gettext message catalogs
714 - a Python interface to the CLDR (Common Locale Data Repository), providing
715 access to various locale display names, localized number and date formatting,
716 etc. ")
717 (license license:bsd-3)))
718
719 (define-public python2-babel
720 (package-with-python2 python-babel))
721
722 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
723 (define-public python2-babel-2.6
724 (package
725 (inherit python2-babel)
726 (version "2.6.0")
727 (source (origin
728 (method url-fetch)
729 (uri (pypi-uri "Babel" version))
730 (sha256
731 (base32
732 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
733
734 (define-public python2-backport-ssl-match-hostname
735 (package
736 (name "python2-backport-ssl-match-hostname")
737 (version "3.5.0.1")
738 (source
739 (origin
740 (method url-fetch)
741 (uri (pypi-uri "backports.ssl_match_hostname" version))
742 (sha256
743 (base32
744 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
745 (build-system python-build-system)
746 (arguments
747 `(#:python ,python-2
748 #:tests? #f)) ; no test target
749 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
750 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
751 (description
752 "This backport brings the ssl.match_hostname() function to users of
753 earlier versions of Python. The function checks the hostname in the
754 certificate returned by the server to which a connection has been established,
755 and verifies that it matches the intended target hostname.")
756 (license license:psfl)))
757
758 (define-public python-bitarray
759 (package
760 (name "python-bitarray")
761 (version "1.4.0")
762 (source (origin
763 (method url-fetch)
764 (uri (pypi-uri "bitarray" version))
765 (sha256
766 (base32
767 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
768 (build-system python-build-system)
769 (home-page "https://github.com/ilanschnell/bitarray")
770 (synopsis "Efficient arrays of booleans")
771 (description "This package provides an object type which efficiently
772 represents an array of booleans. Bitarrays are sequence types and behave very
773 much like usual lists. Eight bits are represented by one byte in a contiguous
774 block of memory. The user can select between two representations:
775 little-endian and big-endian. All of the functionality is implemented in C.
776 Methods for accessing the machine representation are provided. This can be
777 useful when bit level access to binary files is required, such as portable
778 bitmap image files. Also, when dealing with compressed data which uses
779 variable bit length encoding, you may find this module useful.")
780 (license license:psfl)))
781
782 (define-public python-boolean.py
783 (package
784 (name "python-boolean.py")
785 (version "3.6")
786 (source
787 (origin
788 ;; There's no source tarball on PyPI.
789 (method git-fetch)
790 (uri (git-reference
791 (url "https://github.com/bastikr/boolean.py")
792 (commit (string-append "v" version))))
793 (file-name (git-file-name name version))
794 (sha256
795 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
796 (build-system python-build-system)
797 (home-page "https://github.com/bastikr/boolean.py")
798 (synopsis "Boolean algebra in one Python module")
799 (description
800 "This is a small Python library that implements boolean algebra.
801 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
802 @code{Symbol} class that can take on one of these two values. Calculations
803 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
804 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
805 Expressions are constructed from parsed strings or directly in Python.")
806 (license license:bsd-2)))
807
808 (define-public python-hdf4
809 (package
810 (name "python-hdf4")
811 (version "0.9")
812 (source
813 (origin
814 (method url-fetch)
815 (uri (pypi-uri name version))
816 (sha256
817 (base32
818 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
819 (build-system python-build-system)
820 (native-inputs `(("nose" ,python-nose)))
821 (propagated-inputs `(("numpy" ,python-numpy)))
822 (inputs
823 `(("hdf4" ,hdf4)
824 ("libjpeg" ,libjpeg-turbo)
825 ("zlib" ,zlib)))
826 (arguments
827 `(#:phases
828 (modify-phases %standard-phases
829 (replace 'check
830 (lambda _
831 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
832 ;; on to import numpy. Somehow this works on their CI system.
833 ;; Let's just manage PYTHONPATH here instead.
834 (substitute* "runexamples.sh"
835 (("export PYTHONPATH=.*") ""))
836 (setenv "PYTHONPATH"
837 (string-append (getcwd) ":"
838 (getenv "PYTHONPATH")))
839 (invoke "./runexamples.sh")
840 (invoke "nosetests" "-v"))))))
841 (home-page "https://github.com/fhs/python-hdf4")
842 (synopsis "Python interface to the NCSA HDF4 library")
843 (description
844 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
845 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
846 NetCDF files can also be read and modified. Python-HDF4 is a fork of
847 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
848 (license license:expat)))
849
850 (define-public python2-hdf4
851 (package-with-python2 python-hdf4))
852
853 (define-public python-h5py
854 (package
855 (name "python-h5py")
856 (version "2.10.0")
857 (source
858 (origin
859 (method url-fetch)
860 (uri (pypi-uri "h5py" version))
861 (sha256
862 (base32
863 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
864 (build-system python-build-system)
865 (arguments
866 `(#:tests? #f ; no test target
867 #:phases
868 (modify-phases %standard-phases
869 (add-after 'unpack 'fix-hdf5-paths
870 (lambda* (#:key inputs #:allow-other-keys)
871 (let ((prefix (assoc-ref inputs "hdf5")))
872 (substitute* "setup_build.py"
873 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
874 (string-append "['" prefix "/lib" "']"))
875 (("'/opt/local/include', '/usr/local/include'")
876 (string-append "'" prefix "/include" "'")))
877 (substitute* "setup_configure.py"
878 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
879 (string-append "['" prefix "/lib" "']")))
880 #t))))))
881 (propagated-inputs
882 `(("python-six" ,python-six)
883 ("python-numpy" ,python-numpy)))
884 (inputs
885 `(("hdf5" ,hdf5-1.10)))
886 (native-inputs
887 `(("python-cython" ,python-cython)
888 ("python-pkgconfig" ,python-pkgconfig)
889 ("pkg-config" ,pkg-config)))
890 (home-page "https://www.h5py.org/")
891 (synopsis "Read and write HDF5 files from Python")
892 (description
893 "The h5py package provides both a high- and low-level interface to the
894 HDF5 library from Python. The low-level interface is intended to be a
895 complete wrapping of the HDF5 API, while the high-level component supports
896 access to HDF5 files, datasets and groups using established Python and NumPy
897 concepts.")
898 (license license:bsd-3)))
899
900 (define-public python2-h5py
901 (package-with-python2 python-h5py))
902
903 (define-public python-sh
904 (package
905 (name "python-sh")
906 (version "1.12.14")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "sh" version))
911 (sha256
912 (base32
913 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
914 (build-system python-build-system)
915 (arguments
916 '(#:phases
917 (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
921 (setenv "HOME" "/tmp")
922 (invoke "python" "sh.py" "test"))))))
923 (native-inputs
924 `(("python-coverage" ,python-coverage)))
925 (home-page "https://github.com/amoffat/sh")
926 (synopsis "Python subprocess replacement")
927 (description "This package provides a replacement for Python's
928 @code{subprocess} feature.")
929 (license license:expat)))
930
931 (define-public python2-sh
932 (package-with-python2 python-sh))
933
934 (define-public python-cftime
935 (package
936 (name "python-cftime")
937 (version "1.0.4.2")
938 (source
939 (origin
940 (method url-fetch)
941 (uri (pypi-uri "cftime" version))
942 (sha256
943 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
944 (build-system python-build-system)
945 (propagated-inputs
946 `(("python-numpy" ,python-numpy)))
947 (native-inputs
948 `(("python-coveralls" ,python-coveralls)
949 ("python-cython" ,python-cython)
950 ("python-pytest-cov" ,python-pytest-cov)))
951 (home-page "https://github.com/Unidata/cftime")
952 (synopsis "Library for time handling")
953 (description
954 "This package provides time-handling functionality that used to be part
955 of the netcdf4 package before.")
956 ;; This package claims to include code under the GPLv3 but is released
957 ;; under ISC.
958 (license (list license:isc license:gpl3+))))
959
960 (define-public python-netcdf4
961 (package
962 (name "python-netcdf4")
963 (version "1.5.3")
964 (source
965 (origin
966 (method url-fetch)
967 (uri (pypi-uri "netCDF4" version))
968 (sha256
969 (base32
970 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
971 (build-system python-build-system)
972 (arguments
973 '(#:phases
974 (modify-phases %standard-phases
975 (add-after 'unpack 'configure-locations
976 (lambda* (#:key inputs #:allow-other-keys)
977 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
978 #t)))))
979 (native-inputs
980 `(("python-cython" ,python-cython)))
981 (propagated-inputs
982 `(("python-numpy" ,python-numpy)
983 ("python-cftime" ,python-cftime)))
984 (inputs
985 `(("netcdf" ,netcdf)
986 ("hdf4" ,hdf4)
987 ("hdf5" ,hdf5)))
988 (home-page "https://github.com/Unidata/netcdf4-python")
989 (synopsis "Python/numpy interface to the netCDF library")
990 (description "Netcdf4-python is a Python interface to the netCDF C
991 library. netCDF version 4 has many features not found in earlier
992 versions of the library and is implemented on top of HDF5. This module
993 can read and write files in both the new netCDF 4 and the old netCDF 3
994 format, and can create files that are readable by HDF5 clients. The
995 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
996 to users of that module.")
997 ;; The software is mainly ISC, but includes some files covered
998 ;; by the Expat license.
999 (license (list license:isc license:expat))))
1000
1001 (define-public python-license-expression
1002 (package
1003 (name "python-license-expression")
1004 (version "0.999")
1005 (source
1006 (origin
1007 (method url-fetch)
1008 (uri (pypi-uri "license-expression" version))
1009 (sha256
1010 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
1011 (build-system python-build-system)
1012 (propagated-inputs
1013 `(("python-boolean.py" ,python-boolean.py)))
1014 (home-page "https://github.com/nexB/license-expression")
1015 (synopsis "Apply boolean logic to license expressions")
1016 (description
1017 "This Python module defines a tiny language to evaluate and compare
1018 license expressions using boolean logic. Logical combinations of licenses can
1019 be tested for equality, containment, and equivalence. They can be normalised
1020 and simplified. It supports SPDX license expressions as well as other naming
1021 conventions and aliases in the same expression.")
1022 (license license:gpl2+)))
1023
1024 (define-public python-lockfile
1025 (package
1026 (name "python-lockfile")
1027 (version "0.12.2")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri (pypi-uri "lockfile" version))
1032 (sha256
1033 (base32
1034 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1035 (build-system python-build-system)
1036 (arguments '(#:test-target "check"))
1037 (native-inputs
1038 `(("python-pbr" ,python-pbr)))
1039 (home-page "https://launchpad.net/pylockfile")
1040 (synopsis "Platform-independent file locking module")
1041 (description
1042 "The lockfile package exports a LockFile class which provides a simple
1043 API for locking files.")
1044 (license license:expat)))
1045
1046 (define-public python2-lockfile
1047 (package-with-python2 python-lockfile))
1048
1049 (define-public python-filelock
1050 (package
1051 (name "python-filelock")
1052 (version "3.0.12")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "filelock" version))
1057 (sha256
1058 (base32
1059 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1060 (build-system python-build-system)
1061 (home-page
1062 "https://github.com/benediktschmitt/py-filelock")
1063 (synopsis "Platform independent file lock")
1064 (description "@code{filelock} contains a single module implementing
1065 a platform independent file lock in Python, which provides a simple way of
1066 inter-process communication.")
1067 (license license:unlicense)))
1068
1069 (define-public python-semantic-version
1070 (package
1071 (name "python-semantic-version")
1072 (version "2.6.0")
1073 (source
1074 (origin
1075 (method url-fetch)
1076 (uri (pypi-uri "semantic_version" version))
1077 (sha256
1078 (base32
1079 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1080 (build-system python-build-system)
1081 (arguments
1082 `(#:tests? #f)) ; PyPI tarball lacks tests
1083 (home-page "https://github.com/rbarrois/python-semanticversion")
1084 (synopsis "Semantic versioning module for Python")
1085 (description
1086 "The @code{semantic_version} class is a small library for handling
1087 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1088
1089 It can compare versions, generate a new version that represents a bump in one of
1090 the version levels, and check whether any given string is a proper semantic
1091 version identifier.")
1092 (license license:bsd-3)))
1093
1094 (define-public python2-semantic-version
1095 (package-with-python2 python-semantic-version))
1096
1097 (define-public python-serpent
1098 (package
1099 (name "python-serpent")
1100 (version "1.28")
1101 (source
1102 (origin
1103 (method url-fetch)
1104 (uri (pypi-uri "serpent" version))
1105 (sha256
1106 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1107 (build-system python-build-system)
1108 (native-inputs
1109 `(("python-attrs" ,python-attrs)
1110 ("python-pytz" ,python-pytz)))
1111 (home-page "https://github.com/irmen/Serpent")
1112 (synopsis "Serializer for literal Python expressions")
1113 (description
1114 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1115 serialization. It serializes an object tree into bytes (an utf-8 encoded
1116 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1117 to rebuild the original object tree.
1118
1119 Because only safe literals are encoded, it is safe to send serpent data to
1120 other machines, such as over the network.")
1121 (properties `((python2-variant . ,(delay python2-serpent))))
1122 (license license:expat)))
1123
1124 (define-public python2-serpent
1125 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1126 (package
1127 (inherit base)
1128 (propagated-inputs
1129 `(("python-enum34" ,python2-enum34)
1130 ,@(package-propagated-inputs base))))))
1131
1132 (define-public python-setuptools
1133 (package
1134 (name "python-setuptools")
1135 (version "41.0.1")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "setuptools" version ".zip"))
1140 (sha256
1141 (base32
1142 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1143 (modules '((guix build utils)))
1144 (snippet
1145 '(begin
1146 ;; Remove included binaries which are used to build self-extracting
1147 ;; installers for Windows.
1148 ;; TODO: Find some way to build them ourself so we can include them.
1149 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1150 #t))))
1151 (build-system python-build-system)
1152 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1153 ;; One could bootstrap with an internal untested setuptools.
1154 (arguments
1155 `(#:tests? #f))
1156 (home-page "https://pypi.org/project/setuptools/")
1157 (synopsis
1158 "Library designed to facilitate packaging Python projects")
1159 (description
1160 "Setuptools is a fully-featured, stable library designed to facilitate
1161 packaging Python projects, where packaging includes:
1162 Python package and module definitions,
1163 distribution package metadata,
1164 test hooks,
1165 project installation,
1166 platform-specific details,
1167 Python 3 support.")
1168 ;; TODO: setuptools now bundles the following libraries:
1169 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1170 (license (list license:psfl ; setuptools itself
1171 license:expat ; six, appdirs, pyparsing
1172 license:asl2.0 ; packaging is dual ASL2/BSD-2
1173 license:bsd-2))))
1174
1175 (define-public python2-setuptools
1176 (package-with-python2 python-setuptools))
1177
1178 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1179 (define-public python-setuptools-for-tensorflow
1180 (hidden-package
1181 (package
1182 (inherit python-setuptools)
1183 (version "39.1.0")
1184 (source (origin
1185 (inherit (package-source python-setuptools))
1186 (uri (pypi-uri "setuptools" version ".zip"))
1187 (sha256
1188 (base32
1189 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1190
1191 (define-public python-uniseg
1192 (package
1193 (name "python-uniseg")
1194 (version "0.7.1")
1195 (source
1196 (origin
1197 (method url-fetch)
1198 (uri (pypi-uri "uniseg" version ".zip"))
1199 (sha256
1200 (base32
1201 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1202 (build-system python-build-system)
1203 (arguments
1204 '(#:tests? #f)) ; The test suite requires network access.
1205 (native-inputs
1206 `(("unzip" ,unzip)))
1207 (home-page
1208 "https://bitbucket.org/emptypage/uniseg-python")
1209 (synopsis
1210 "Python library to determine Unicode text segmentations")
1211 (description
1212 "Uniseg is a Python package used to determine Unicode text segmentations.
1213 Supported segmentations include:
1214 @enumerate
1215 @item @dfn{Code point} (any value in the Unicode codespace)
1216 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1217 multiple Unicode code points, e.g. \"G\" + acute-accent)
1218 @item Word break
1219 @item Sentence break
1220 @item Line break
1221 @end enumerate")
1222 (license license:expat)))
1223
1224 (define-public python2-uniseg
1225 (package-with-python2 python-uniseg))
1226
1227 (define-public python-humanfriendly
1228 (package
1229 (name "python-humanfriendly")
1230 (version "8.2")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "humanfriendly" version))
1235 (sha256
1236 (base32
1237 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1238 (build-system python-build-system)
1239 (arguments
1240 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1241 #:tests? #f))
1242 (home-page "https://humanfriendly.readthedocs.io")
1243 (synopsis "Human-friendly input and output in Python")
1244 (description
1245 "The functions and classes in @code{humanfriendly} can be used to make
1246 text interfaces more user-friendly. It includes tools to parse and format
1247 numbers, file sizes, and timespans, timers for long-running operations, menus
1248 to allow the user to choose from a list of options, and terminal interaction
1249 helpers.")
1250 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1251 (license license:expat)))
1252
1253 (define-public python2-humanfriendly
1254 (let ((base (package-with-python2
1255 (strip-python2-variant python-humanfriendly))))
1256 (package (inherit base)
1257 (propagated-inputs
1258 `(("python2-monotonic" ,python2-monotonic)
1259 ,@(package-propagated-inputs base))))))
1260
1261 (define-public python-textparser
1262 (package
1263 (name "python-textparser")
1264 (version "0.23.0")
1265 (source
1266 (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "textparser" version))
1269 (sha256
1270 (base32
1271 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1272 (build-system python-build-system)
1273 (home-page "https://github.com/eerimoq/textparser")
1274 (synopsis "Fast text parser for Python")
1275 (description "This library provides a text parser written in the Python
1276 language. It aims to be fast.")
1277 (license license:expat)))
1278
1279 (define-public python-aenum
1280 (package
1281 (name "python-aenum")
1282 (version "2.2.4")
1283 (source
1284 (origin
1285 (method url-fetch)
1286 (uri (pypi-uri "aenum" version))
1287 (sha256
1288 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1289 (build-system python-build-system)
1290 (arguments
1291 `(#:phases (modify-phases %standard-phases
1292 (replace 'check
1293 (lambda _
1294 (format #t "current working dir ~s~%" (getcwd))
1295 (setenv "PYTHONPATH"
1296 (string-append ".:" (getenv "PYTHONPATH")))
1297 ;; We must run the test suite module directly, as it
1298 ;; fails to define the 'tempdir' variable in scope for
1299 ;; the tests otherwise
1300 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1301 ;; issues/32/running-tests-with-python-setuppy-test).
1302 (invoke "python3" "aenum/test.py")
1303 ;; This one fails with "NameError: name
1304 ;; 'test_pickle_dump_load' is not defined" (see:
1305 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1306 ;; /error-running-the-test_v3py-test-suite).
1307 ;; (invoke "python3" "aenum/test_v3.py")
1308 #t)))))
1309 (home-page "https://bitbucket.org/stoneleaf/aenum")
1310 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1311 (description "The aenum library includes an @code{Enum} base class, a
1312 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1313 class.")
1314 (license license:bsd-3)))
1315
1316 (define-public python-can
1317 (package
1318 (name "python-can")
1319 (version "3.3.3")
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (pypi-uri "python-can" version))
1324 (sha256
1325 (base32
1326 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1327 (build-system python-build-system)
1328 (arguments
1329 `(#:phases (modify-phases %standard-phases
1330 (add-after 'unpack 'relax-version-requirements
1331 (lambda _
1332 (substitute* "setup.py"
1333 (("mock~=2\\.0") "mock")
1334 (("coverage<5") "coverage")
1335 (("pytest~=4\\.3") "pytest")
1336 (("hypothesis~=4\\.56") "hypothesis"))
1337 #t))
1338 (add-after 'unpack 'fix-broken-tests
1339 ;; The tests try to run two scripts it expects should be
1340 ;; in PATH, but they aren't at this time (see:
1341 ;; https://github.com/hardbyte/python-can/issues/805).
1342 (lambda _
1343 (substitute* "test/test_scripts.py"
1344 (("\"can_logger\\.py --help\"") "")
1345 (("\"can_player\\.py --help\"") ""))
1346 #t)))))
1347 (propagated-inputs
1348 `(("python-aenum" ,python-aenum)
1349 ("python-wrapt" ,python-wrapt)))
1350 (native-inputs
1351 `(("python-codecov" ,python-codecov)
1352 ("python-coverage" ,python-coverage)
1353 ("python-future" ,python-future)
1354 ("python-hypothesis" ,python-hypothesis)
1355 ("python-mock" ,python-mock)
1356 ("python-pyserial" ,python-pyserial)
1357 ("python-pytest" ,python-pytest)
1358 ("python-pytest-cov" ,python-pytest-cov)
1359 ("python-pytest-runner" ,python-pytest-runner)
1360 ("python-pytest-timeout" ,python-pytest-timeout)))
1361 (home-page "https://github.com/hardbyte/python-can")
1362 (synopsis "Controller Area Network (CAN) interface module for Python")
1363 (description "This package defines the @code{can} module, which provides
1364 controller area network (CAN) support for Python developers; providing common
1365 abstractions to different hardware devices, and a suite of utilities for
1366 sending and receiving messages on a CAN bus.")
1367 (license license:lgpl3+)))
1368
1369 (define-public python-diskcache
1370 (package
1371 (name "python-diskcache")
1372 (version "4.1.0")
1373 (source
1374 (origin
1375 (method url-fetch)
1376 (uri (pypi-uri "diskcache" version))
1377 (sha256
1378 (base32
1379 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1380 (build-system python-build-system)
1381 (arguments
1382 `(#:tests? #f)) ;test suite not included in the release
1383 (home-page "http://www.grantjenks.com/docs/diskcache/")
1384 (synopsis "Disk and file backed cache library")
1385 (description "DiskCache is a disk and file backed persistent cache.")
1386 (license license:asl2.0)))
1387
1388 (define-public python-bitstruct
1389 (package
1390 (name "python-bitstruct")
1391 (version "8.9.0")
1392 (source
1393 (origin
1394 (method url-fetch)
1395 (uri (pypi-uri "bitstruct" version))
1396 (sha256
1397 (base32
1398 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1399 (build-system python-build-system)
1400 (home-page "https://github.com/eerimoq/bitstruct")
1401 (synopsis "Python values to and C bit field structs converter")
1402 (description "This module performs conversions between Python values and C
1403 bit field structs represented as Python byte strings. It is intended to have
1404 a similar interface as the @code{struct} module from Python, but working on
1405 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1406 (license license:expat)))
1407
1408 (define-public python-cantools
1409 (package
1410 (name "python-cantools")
1411 (version "33.1.1")
1412 (source
1413 (origin
1414 ;; We take the sources from the Git repository as the documentation is
1415 ;; not included with the PyPI archive.
1416 (method git-fetch)
1417 (uri (git-reference
1418 (url "https://github.com/eerimoq/cantools")
1419 (commit version)))
1420 (file-name (git-file-name name version))
1421 (sha256
1422 (base32
1423 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1424 (build-system python-build-system)
1425 (arguments
1426 `(#:phases
1427 (modify-phases %standard-phases
1428 (add-after 'build 'build-doc
1429 (lambda _
1430 ;; See: https://github.com/eerimoq/cantools/issues/190.
1431 (substitute* "README.rst"
1432 (("https://github.com/eerimoq/cantools/raw/master\
1433 /docs/monitor.png")
1434 "monitor.png"))
1435 (with-directory-excursion "docs"
1436 (invoke "make" "man" "info"))))
1437 (add-after 'install 'install-doc
1438 (lambda* (#:key outputs #:allow-other-keys)
1439 (let* ((out (assoc-ref outputs "out"))
1440 (info (string-append out "/share/info"))
1441 (man1 (string-append out "/share/man/man1")))
1442 (format #t "CWD: ~s~%" (getcwd))
1443 (install-file "docs/_build/texinfo/cantools.info" info)
1444 (install-file "docs/_build/man/cantools.1" man1)
1445 #t))))))
1446 (native-inputs
1447 `(("sphinx" ,python-sphinx)
1448 ("texinfo" ,texinfo)))
1449 (propagated-inputs
1450 `(("python-bitstruct" ,python-bitstruct)
1451 ("python-can" ,python-can)
1452 ("python-diskcache" ,python-diskcache)
1453 ("python-textparser" ,python-textparser)))
1454 (home-page "https://github.com/eerimoq/cantools")
1455 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1456 (description "This package includes Controller Area Network (CAN) related
1457 tools that can be used to:
1458 @itemize
1459 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1460 @item encode and decode CAN messages
1461 @item multiplex simple and extended signals
1462 @item diagnose DID encoding and decoding
1463 @item dump the CAN decoder output
1464 @item test CAN nodes
1465 @item generate C source code
1466 @item monitor the CAN bus
1467 @end itemize")
1468 (license license:expat)))
1469
1470 (define-public python-capturer
1471 (package
1472 (name "python-capturer")
1473 (version "2.4")
1474 (source
1475 (origin
1476 (method url-fetch)
1477 (uri (pypi-uri "capturer" version))
1478 (sha256
1479 (base32
1480 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1481 (build-system python-build-system)
1482 (arguments
1483 `(#:tests? #f))
1484 (propagated-inputs
1485 `(("python-humanfriendly" ,python-humanfriendly)))
1486 (home-page "https://capturer.readthedocs.io")
1487 (synopsis "Capture stdout and stderr streams of the current process")
1488 (description
1489 "The capturer package makes it easy to capture the stdout and stderr
1490 streams of the current process and subprocesses. Output can be relayed
1491 to the terminal in real time but is also available to the Python program
1492 for additional processing.")
1493 (license license:expat)))
1494
1495 (define-public python2-capturer
1496 (package-with-python2 python-capturer))
1497
1498 (define-public python-case
1499 (package
1500 (name "python-case")
1501 (version "1.5.3")
1502 (source
1503 (origin
1504 (method url-fetch)
1505 (uri (pypi-uri "case" version))
1506 (sha256
1507 (base32
1508 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1509 (build-system python-build-system)
1510 (propagated-inputs
1511 `(("python-mock" ,python-mock)
1512 ("python-nose" ,python-nose)
1513 ("python-six" ,python-six)
1514 ("python-unittest2" ,python-unittest2)))
1515 (native-inputs
1516 `(("python-coverage" ,python-coverage)))
1517 (home-page "https://github.com/celery/case")
1518 (synopsis "Unittest utilities and convenience methods")
1519 (description
1520 "The @code{case} package provides utilities on top of unittest, including
1521 some helpful Python 2 compatibility convenience methods.")
1522 (license license:bsd-3)))
1523
1524 (define-public python-verboselogs
1525 (package
1526 (name "python-verboselogs")
1527 (version "1.7")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "verboselogs" version))
1532 (sha256
1533 (base32
1534 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(#:phases
1538 (modify-phases %standard-phases
1539 (replace 'check
1540 (lambda _
1541 ;; Do not run pylint plugin test, as astroid is an old
1542 ;; unsupported version.
1543 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1544 "verboselogs/tests.py"))))))
1545 (native-inputs
1546 `(("python-mock" ,python-mock)
1547 ("python-pytest" ,python-pytest)))
1548 (home-page "https://verboselogs.readthedocs.io")
1549 (synopsis "Verbose logging level for Python's logging module")
1550 (description
1551 "The @code{verboselogs} package extends Python's @code{logging} module to
1552 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1553 (license license:expat)))
1554
1555 (define-public python2-verboselogs
1556 (package-with-python2 python-verboselogs))
1557
1558 (define-public python-coloredlogs
1559 (package
1560 (name "python-coloredlogs")
1561 (version "10.0")
1562 (source
1563 (origin
1564 (method url-fetch)
1565 (uri (pypi-uri "coloredlogs" version))
1566 (sha256
1567 (base32
1568 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1569 (build-system python-build-system)
1570 (arguments
1571 `(;Tests require some updated modules
1572 #:tests? #f))
1573 (propagated-inputs
1574 `(("python-capturer" ,python-capturer)))
1575 (home-page "https://coloredlogs.readthedocs.io")
1576 (synopsis "Colored stream handler for Python's logging module")
1577 (description
1578 "The @code{coloredlogs} package enables colored terminal output for
1579 Python's logging module. The @code{ColoredFormatter} class inherits from
1580 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1581 messages in color.")
1582 (license license:expat)))
1583
1584 (define-public python2-coloredlogs
1585 (package-with-python2 python-coloredlogs))
1586
1587 (define-public python-editorconfig
1588 (package
1589 (name "python-editorconfig")
1590 (version "0.12.2")
1591 (source
1592 (origin
1593 (method url-fetch)
1594 (uri (pypi-uri "EditorConfig" version))
1595 (sha256
1596 (base32
1597 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1598 (build-system python-build-system)
1599 (home-page "https://editorconfig.org/")
1600 (synopsis "EditorConfig bindings for python")
1601 (description "The EditorConfig project consists of a file format for
1602 defining coding styles and a collection of text editor plugins that enable
1603 editors to read the file format and adhere to defined styles. EditorConfig
1604 files are easily readable and they work nicely with version control systems.")
1605 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1606 (license (list license:bsd-2 license:psfl))))
1607
1608 (define-public dosage
1609 (package
1610 (name "dosage")
1611 (version "2.17")
1612 (source
1613 (origin
1614 (method url-fetch)
1615 (uri (pypi-uri "dosage" version))
1616 (sha256
1617 (base32
1618 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1619 (build-system python-build-system)
1620 (propagated-inputs
1621 `(("python2-backports-functools-lru-cache"
1622 ,python2-backports-functools-lru-cache)
1623 ("python2-backports-shutil-get-terminal-size"
1624 ,python2-backports-shutil-get-terminal-size)
1625 ("python-cached-property" ,python-cached-property)
1626 ("python-colorama" ,python-colorama)
1627 ("python-imagesize" ,python-imagesize)
1628 ("python-importlib-metadata" ,python-importlib-metadata)
1629 ("python-lxml" ,python-lxml)
1630 ("python-requests" ,python-requests)
1631 ("python-six" ,python-six)))
1632 (native-inputs
1633 `(("python-pytest-cov" ,python-pytest-cov)
1634 ("python-pytest-xdist" ,python-pytest-xdist)
1635 ("python-responses" ,python-responses)
1636 ("python-setuptools-scm" ,python-setuptools-scm)))
1637 (home-page "https://github.com/webcomics/dosage")
1638 (synopsis "Comic strip downloader and archiver")
1639 (description "Dosage is designed to keep a local copy of specific webcomics and other
1640 picture-based content such as Picture of the Day sites. With the @command{dosage}
1641 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1642 downloaded, or download a strip for a particular date or index, if possible.")
1643 (license license:expat)))
1644
1645 (define-public python-et-xmlfile
1646 (package
1647 (name "python-et-xmlfile")
1648 (version "1.0.1")
1649 (source
1650 (origin
1651 (method url-fetch)
1652 (uri (pypi-uri "et_xmlfile" version))
1653 (sha256
1654 (base32
1655 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1656 (build-system python-build-system)
1657 (arguments
1658 `(#:phases (modify-phases %standard-phases
1659 (replace 'check
1660 (lambda _
1661 (invoke "pytest"))))))
1662 (native-inputs
1663 `(("python-pytest" ,python-pytest)
1664 ("python-lxml" ,python-lxml))) ;used for the tests
1665 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1666 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1667 (description "This Python library is based upon the @code{xmlfile} module
1668 from @code{lxml}. It aims to provide a low memory, compatible implementation
1669 of @code{xmlfile}.")
1670 (license license:expat)))
1671
1672 (define-public python2-et-xmlfile
1673 (package-with-python2 python-et-xmlfile))
1674
1675 (define-public python-openpyxl
1676 (package
1677 (name "python-openpyxl")
1678 (version "3.0.5")
1679 (source
1680 (origin
1681 ;; We use the upstream repository, as the tests are not included in the
1682 ;; PyPI releases.
1683 (method hg-fetch)
1684 (uri (hg-reference
1685 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1686 (changeset version)))
1687 (file-name (string-append name "-" version "-checkout"))
1688 (sha256
1689 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
1690 (build-system python-build-system)
1691 (arguments
1692 `(#:phases (modify-phases %standard-phases
1693 (replace 'check
1694 (lambda _
1695 (invoke "pytest"))))))
1696 (native-inputs
1697 ;; For the test suite.
1698 `(("python-lxml" ,python-lxml)
1699 ("python-pillow" ,python-pillow)
1700 ("python-pytest" ,python-pytest)))
1701 (propagated-inputs
1702 `(("python-et-xmlfile" ,python-et-xmlfile)
1703 ("python-jdcal" ,python-jdcal)))
1704 (home-page "https://openpyxl.readthedocs.io")
1705 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1706 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1707 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1708 standard.")
1709 (properties `((python2-variant . ,(delay python2-openpyxl))))
1710 (license license:expat)))
1711
1712 (define-public python2-openpyxl
1713 (let ((base (package-with-python2
1714 (strip-python2-variant python-openpyxl))))
1715 (package
1716 (inherit base)
1717 ;; This is the latest version that has python2 support
1718 (version "2.6.4")
1719 (source
1720 (origin
1721 (method url-fetch)
1722 (uri (pypi-uri "openpyxl" version))
1723 (sha256
1724 (base32
1725 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1726 (arguments '(#:tests? #f))))) ; No test suite.
1727
1728 (define-public python-eventlet
1729 (package
1730 (name "python-eventlet")
1731 (version "0.25.1")
1732 (source
1733 (origin
1734 (method url-fetch)
1735 (uri (pypi-uri "eventlet" version))
1736 (sha256
1737 (base32
1738 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1739 (build-system python-build-system)
1740 (propagated-inputs
1741 `(("python-greenlet" ,python-greenlet)))
1742 (arguments
1743 ;; TODO: Requires unpackaged 'enum-compat'.
1744 '(#:tests? #f))
1745 (home-page "https://eventlet.net")
1746 (synopsis "Concurrent networking library for Python")
1747 (description
1748 "Eventlet is a concurrent networking library for Python that
1749 allows you to change how you run your code, not how you write it.
1750 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1751 Coroutines ensure that the developer uses a blocking style of programming
1752 that is similar to threading, but provide the benefits of non-blocking I/O.
1753 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1754 from the Python interpreter, or as a small part of a larger application.")
1755 (license license:expat)))
1756
1757 (define-public python2-eventlet
1758 (let ((base (package-with-python2
1759 (strip-python2-variant python-eventlet))))
1760 (package (inherit base)
1761 (propagated-inputs
1762 `(("python2-enum34" ,python2-enum34)
1763 ,@(package-propagated-inputs base))))))
1764
1765 (define-public python-six
1766 (package
1767 (name "python-six")
1768 (version "1.14.0")
1769 (source
1770 (origin
1771 (method url-fetch)
1772 (uri (pypi-uri "six" version))
1773 (sha256
1774 (base32
1775 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1776 (build-system python-build-system)
1777 (arguments
1778 `(#:phases
1779 (modify-phases %standard-phases
1780 (replace 'check
1781 (lambda _
1782 (invoke "py.test" "-v"))))))
1783 (native-inputs
1784 `(("python-pytest" ,python-pytest-bootstrap)))
1785 (home-page "https://pypi.org/project/six/")
1786 (synopsis "Python 2 and 3 compatibility utilities")
1787 (description
1788 "Six is a Python 2 and 3 compatibility library. It provides utility
1789 functions for smoothing over the differences between the Python versions with
1790 the goal of writing Python code that is compatible on both Python versions.
1791 Six supports every Python version since 2.5. It is contained in only one
1792 Python file, so it can be easily copied into your project.")
1793 (license license:x11)))
1794
1795 (define-public python2-six
1796 (package-with-python2 python-six))
1797
1798 (define-public python-six-bootstrap
1799 (package
1800 (inherit python-six)
1801 (name "python-six-bootstrap")
1802 (native-inputs `())
1803 (arguments `(#:tests? #f))))
1804
1805 (define-public python2-six-bootstrap
1806 (package-with-python2 python-six-bootstrap))
1807
1808 (define-public python-schedule
1809 (package
1810 (name "python-schedule")
1811 (version "0.4.3")
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (pypi-uri "schedule" version))
1816 (sha256
1817 (base32
1818 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1819 (build-system python-build-system)
1820 (native-inputs
1821 `(("python-pytest" ,python-pytest)
1822 ("python-mock" ,python-mock)))
1823 (home-page "https://github.com/dbader/schedule")
1824 (synopsis "Schedule periodic function calls in Python")
1825 (description
1826 "Schedule is an in-process scheduler for periodic jobs that uses the
1827 builder pattern for configuration. Schedule lets you run Python functions (or
1828 any other callable) periodically at pre-determined intervals using a simple,
1829 human-friendly syntax.")
1830 (license license:expat)))
1831
1832 (define-public python2-schedule
1833 (package-with-python2 python-schedule))
1834
1835 (define-public python-scour
1836 (package
1837 (name "python-scour")
1838 (version "038.1")
1839 (source
1840 (origin
1841 (method git-fetch)
1842 (uri
1843 (git-reference
1844 (url "https://github.com/scour-project/scour")
1845 (commit
1846 (string-append "v" version))))
1847 (file-name (git-file-name name version))
1848 (sha256
1849 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1850 (propagated-inputs
1851 `(("python-six" ,python-six)))
1852 (build-system python-build-system)
1853 (home-page "https://github.com/scour-project/scour")
1854 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1855 (description "The goal of Scour is to output a file that renderes
1856 identically at a fraction of the size by removing a lot of redundant
1857 information created by most SVG editors. Optimization options are typically
1858 lossless but can be tweaked for more aggressive cleaning.")
1859 (license license:asl2.0)))
1860
1861 (define-public python-mechanize
1862 (package
1863 (name "python-mechanize")
1864 (version "0.4.5")
1865 (source
1866 (origin
1867 (method url-fetch)
1868 (uri (pypi-uri "mechanize" version))
1869 (sha256
1870 (base32
1871 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1872 (build-system python-build-system)
1873 (propagated-inputs
1874 `(("python-html5lib" ,python-html5lib)))
1875 (home-page "https://github.com/python-mechanize/mechanize")
1876 (synopsis
1877 "Stateful programmatic web browsing in Python")
1878 (description
1879 "Mechanize implements stateful programmatic web browsing in Python,
1880 after Andy Lester’s Perl module WWW::Mechanize.")
1881 (license license:bsd-3)))
1882
1883 (define-public python2-mechanize
1884 (package-with-python2 python-mechanize))
1885
1886 (define-public python-simpleaudio
1887 (package
1888 (name "python-simpleaudio")
1889 (version "1.0.4")
1890 (source
1891 (origin
1892 (method url-fetch)
1893 (uri (pypi-uri "simpleaudio" version))
1894 (sha256
1895 (base32
1896 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1897 (build-system python-build-system)
1898 (arguments
1899 `(#:tests? #f))
1900 (inputs
1901 `(("alsa-lib" ,alsa-lib)))
1902 (home-page
1903 "https://github.com/hamiltron/py-simple-audio")
1904 (synopsis "Simple, asynchronous audio playback for Python 3")
1905 (description
1906 "The @code{simplaudio} package provides cross-platform, dependency-free
1907 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1908 (license license:expat))) ; MIT license
1909
1910 (define-public python-simplejson
1911 (package
1912 (name "python-simplejson")
1913 (version "3.17.0")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (pypi-uri "simplejson" version))
1918 (sha256
1919 (base32
1920 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1921 (build-system python-build-system)
1922 (home-page "http://simplejson.readthedocs.org/en/latest/")
1923 (synopsis
1924 "Json library for Python")
1925 (description
1926 "JSON (JavaScript Object Notation) is a subset of JavaScript
1927 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1928 format.
1929
1930 Simplejson exposes an API familiar to users of the standard library marshal
1931 and pickle modules. It is the externally maintained version of the json
1932 library contained in Python 2.6, but maintains compatibility with Python 2.5
1933 and (currently) has significant performance advantages, even without using
1934 the optional C extension for speedups. Simplejson is also supported on
1935 Python 3.3+.")
1936 (license license:x11)))
1937
1938 (define-public python2-simplejson
1939 (package-with-python2 python-simplejson))
1940
1941
1942 (define-public python-pyicu
1943 (package
1944 (name "python-pyicu")
1945 (version "2.4.3")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (pypi-uri "PyICU" version))
1950 (sha256
1951 (base32
1952 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1953 (build-system python-build-system)
1954 (inputs
1955 `(("icu4c" ,icu4c)))
1956 (native-inputs
1957 `(("python-pytest" ,python-pytest)
1958 ("python-six" ,python-six)))
1959 (home-page "https://github.com/ovalhub/pyicu")
1960 (synopsis "Python extension wrapping the ICU C++ API")
1961 (description
1962 "PyICU is a python extension wrapping the ICU C++ API.")
1963 (license license:x11)))
1964
1965 (define-public python2-pyicu
1966 (package-with-python2 python-pyicu))
1967
1968 (define-public python-dogtail
1969 (package
1970 (name "python-dogtail")
1971 (version "0.9.11")
1972 (source (origin
1973 (method url-fetch)
1974 (uri
1975 (string-append
1976 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1977 "dogtail-" version ".tar.gz"))
1978 (sha256
1979 (base32
1980 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1981 (build-system python-build-system)
1982 (arguments
1983 `(#:tests? #f ; TODO Launching dbus for the tests
1984 ; fails
1985 #:phases
1986 (modify-phases %standard-phases
1987 (replace 'check
1988 (lambda* (#:key tests? #:allow-other-keys)
1989 (when tests?
1990 (system "Xvfb :1 &")
1991 (setenv "DISPLAY" ":1")
1992 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1993 #t)))))
1994 (propagated-inputs
1995 `(("python-pygobject" ,python-pygobject)
1996 ("python-pycairo" ,python-pycairo)
1997 ("python-pyatspi" ,python-pyatspi)))
1998 (native-inputs
1999 `(("python-nose" ,python-nose)
2000 ("gtk+" ,gtk+)
2001 ("xvfb" ,xorg-server)
2002 ("dbus" ,dbus)
2003 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
2004 ("gobject-introspection" ,gobject-introspection)))
2005 (home-page "https://gitlab.com/dogtail/dogtail/")
2006 (synopsis "GUI test tool and automation framework written in Python")
2007 (description
2008 "Dogtail is a GUI test tool and automation framework written in Python.
2009 It uses Accessibility (a11y) technologies to communicate with desktop
2010 applications. dogtail scripts are written in Python and executed like any
2011 other Python program.")
2012 (license license:gpl2+)))
2013
2014 (define-public python2-dogtail
2015 (package-with-python2 python-dogtail))
2016
2017 (define-public python-empy
2018 (package
2019 (name "python-empy")
2020 (version "3.3.3")
2021 (source (origin
2022 (method url-fetch)
2023 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
2024 version ".tar.gz"))
2025 (sha256
2026 (base32
2027 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
2028 (build-system python-build-system)
2029 (arguments
2030 `(#:tests? #f)) ; python2 only
2031 (home-page "http://www.alcyone.com/software/empy/")
2032 (synopsis "Templating system for Python")
2033 (description
2034 "EmPy is a system for embedding Python expressions and statements in
2035 template text; it takes an EmPy source file, processes it, and produces
2036 output. This is accomplished via expansions, which are special signals to the
2037 EmPy system and are set off by a special prefix (by default the at sign, @@).
2038 EmPy can expand arbitrary Python expressions and statements in this way, as
2039 well as a variety of special forms. Textual data not explicitly delimited in
2040 this way is sent unaffected to the output, allowing Python to be used in
2041 effect as a markup language. Also supported are callbacks via hooks,
2042 recording and playback via diversions, and dynamic, chainable filters. The
2043 system is highly configurable via command line options and embedded
2044 commands.")
2045 (license license:lgpl2.1+)))
2046
2047 (define-public python2-empy
2048 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2049 (package
2050 (inherit base)
2051 (arguments `(,@(package-arguments base)
2052 #:tests? #t)))))
2053
2054 (define-public python2-element-tree
2055 (package
2056 (name "python2-element-tree")
2057 (version "1.2.6")
2058 (source (origin
2059 (method url-fetch)
2060 (uri (string-append
2061 "http://effbot.org/media/downloads/elementtree-"
2062 version "-20050316.tar.gz"))
2063 (sha256
2064 (base32
2065 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2066 (build-system python-build-system)
2067 (arguments
2068 `(#:python ,python-2 ; seems to be part of Python 3
2069 #:tests? #f)) ; no 'test' sub-command
2070 (synopsis "Toolkit for XML processing in Python")
2071 (description
2072 "ElementTree is a Python library supporting lightweight XML processing.")
2073 (home-page "https://effbot.org/zone/element-index.htm")
2074 (license (license:x11-style
2075 "http://docs.python.org/2/license.html"
2076 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2077
2078 (define-public python2-pybugz
2079 (package
2080 (name "python2-pybugz")
2081 (version "0.6.11")
2082 (source (origin
2083 (method url-fetch)
2084 (uri (string-append
2085 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2086 version ".tar.gz"))
2087 (sha256
2088 (base32
2089 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2090 (patches (search-patches "pybugz-stty.patch"
2091 "pybugz-encode-error.patch"))))
2092 (build-system python-build-system)
2093 (arguments
2094 `(#:python ,python-2 ; SyntaxError with Python 3
2095 #:tests? #f)) ; no 'test' sub-command
2096 (propagated-inputs
2097 `(("element-tree" ,python2-element-tree)))
2098 (synopsis "Python and command-line interface to Bugzilla")
2099 (description
2100 "PyBugz is a Python library and command-line tool to query the Bugzilla
2101 bug tracking system. It is meant as an aid to speed up interaction with the
2102 bug tracker.")
2103 (home-page "http://www.liquidx.net/pybugz/")
2104 (license license:gpl2)))
2105
2106 (define-public python2-enum
2107 (package
2108 (name "python2-enum")
2109 (version "0.4.6")
2110 (source (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "enum" version))
2113 (sha256
2114 (base32
2115 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2116 (build-system python-build-system)
2117 (arguments
2118 `(#:python ,python-2))
2119 (home-page "https://pypi.org/project/enum/")
2120 (synopsis "Robust enumerated type support in Python")
2121 (description
2122 "This provides a module for robust enumerations in Python. It has
2123 been superseded by the Python standard library and is provided only for
2124 compatibility.")
2125 ;; Choice of either license.
2126 (license (list license:gpl3+ license:psfl))))
2127
2128 (define-public python-enum34
2129 (package
2130 (name "python-enum34")
2131 (version "1.1.6")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (pypi-uri "enum34" version))
2136 (sha256
2137 (base32
2138 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2139 (build-system python-build-system)
2140 (home-page "https://pypi.org/project/enum34/")
2141 (synopsis "Backported Python 3.4 Enum")
2142 (description
2143 "Enum34 is the new Python stdlib enum module available in Python 3.4
2144 backported for previous versions of Python from 2.4 to 3.3.")
2145 (license license:bsd-3)))
2146
2147 (define-public python2-enum34
2148 (package-with-python2 python-enum34))
2149
2150 (define-public python-parse-type
2151 (package
2152 (name "python-parse-type")
2153 (version "0.4.2")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "parse_type" version))
2158 (sha256
2159 (base32
2160 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2161 (build-system python-build-system)
2162 (propagated-inputs
2163 `(("python-six" ,python-six)
2164 ("python-parse" ,python-parse)))
2165 (native-inputs
2166 `(("python-pytest" ,python-pytest)
2167 ("python-pytest-runner" ,python-pytest-runner)))
2168 (home-page "https://github.com/jenisys/parse_type")
2169 (synopsis "Extended parse module")
2170 (description
2171 "Parse_type extends the python parse module.")
2172 (properties
2173 `((python2-variant . ,(delay python2-parse-type))))
2174 (license license:bsd-3)))
2175
2176 (define-public python2-parse-type
2177 (let ((base (package-with-python2
2178 (strip-python2-variant python-parse-type))))
2179 (package (inherit base)
2180 (propagated-inputs
2181 `(("python2-enum34" ,python2-enum34)
2182 ,@(package-propagated-inputs base))))))
2183
2184 (define-public python-parse
2185 (package
2186 (name "python-parse")
2187 (version "1.8.4")
2188 (source
2189 (origin
2190 (method url-fetch)
2191 (uri (pypi-uri "parse" version))
2192 (sha256
2193 (base32
2194 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2195 (build-system python-build-system)
2196 (arguments
2197 `(#:phases
2198 (modify-phases %standard-phases
2199 (replace 'check
2200 (lambda _ (invoke "python" "test_parse.py"))))))
2201 (home-page "https://github.com/r1chardj0n3s/parse")
2202 (synopsis "Parse strings")
2203 (description
2204 "Parse strings using a specification based on the Python @code{format()}
2205 syntax.")
2206 (license license:x11)))
2207
2208 (define-public python-polib
2209 (package
2210 (name "python-polib")
2211 (version "1.0.8")
2212 (source (origin
2213 (method url-fetch)
2214 (uri (pypi-uri "polib" version))
2215 (sha256
2216 (base32
2217 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2218 (build-system python-build-system)
2219 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2220 (synopsis "Manipulate, create and modify gettext files")
2221 (description "Polib can manipulate any gettext format (po, pot and mo)
2222 files. It can be used to create po files from scratch or to modify
2223 existing ones.")
2224 (license license:expat)))
2225
2226 (define-public python2-polib
2227 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2228 (package
2229 (inherit base)
2230 (arguments `(,@(package-arguments base)
2231 ;; Tests don't work with python2.
2232 #:tests? #f)))))
2233
2234 (define-public python-poyo
2235 (package
2236 (name "python-poyo")
2237 (version "0.5.0")
2238 (source
2239 (origin
2240 (method url-fetch)
2241 (uri (pypi-uri "poyo" version))
2242 (sha256
2243 (base32
2244 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2245 (build-system python-build-system)
2246 (home-page "https://github.com/hackebrot/poyo")
2247 (synopsis "Lightweight YAML Parser for Python")
2248 (description
2249 "This package provides a lightweight YAML Parser for Python. It supports
2250 only a chosen subset of the YAML format that is required to parse cookiecutter
2251 user configuration files. It does not have support for serializing into YAML
2252 and is not compatible with JSON.")
2253 (license license:expat)))
2254
2255 (define-public scons
2256 (package
2257 (name "scons")
2258 (version "3.0.4")
2259 (source (origin
2260 (method git-fetch)
2261 (uri (git-reference
2262 (url "https://github.com/SCons/scons")
2263 (commit version)))
2264 (file-name (git-file-name name version))
2265 (sha256
2266 (base32
2267 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2268 (build-system python-build-system)
2269 (arguments
2270 `(#:use-setuptools? #f ; still relies on distutils
2271 #:tests? #f ; no 'python setup.py test' command
2272 #:phases
2273 (modify-phases %standard-phases
2274 (add-before 'build 'bootstrap
2275 (lambda _
2276 (substitute* "src/engine/SCons/compat/__init__.py"
2277 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2278 "sys.modules[new] = __import__(old)"))
2279 (substitute* "src/engine/SCons/Platform/__init__.py"
2280 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2281 "mod = __import__(full_name)"))
2282 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2283 (chdir "build/scons")
2284 #t)))))
2285 (home-page "https://scons.org/")
2286 (synopsis "Software construction tool written in Python")
2287 (description
2288 "SCons is a software construction tool. Think of SCons as an improved,
2289 cross-platform substitute for the classic Make utility with integrated
2290 functionality similar to autoconf/automake and compiler caches such as ccache.
2291 In short, SCons is an easier, more reliable and faster way to build
2292 software.")
2293 (license license:x11)))
2294
2295 (define-public scons-python2
2296 (package
2297 (inherit (package-with-python2 scons))
2298 (name "scons-python2")))
2299
2300 (define-public python-extras
2301 (package
2302 (name "python-extras")
2303 (version "1.0.0")
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (pypi-uri "extras" version))
2308 (sha256
2309 (base32
2310 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2311 (build-system python-build-system)
2312 (arguments
2313 ;; FIXME: Circular dependency on testtools.
2314 '(#:tests? #f))
2315 (home-page "https://github.com/testing-cabal/extras")
2316 (synopsis "Useful extensions to the Python standard library")
2317 (description
2318 "Extras is a set of extensions to the Python standard library.")
2319 (license license:expat)))
2320
2321 (define-public python2-extras
2322 (package-with-python2 python-extras))
2323
2324 (define-public python-mimeparse
2325 (package
2326 (name "python-mimeparse")
2327 (version "1.6.0")
2328 (source
2329 (origin
2330 (method url-fetch)
2331 (uri (pypi-uri "python-mimeparse" version))
2332 (sha256
2333 (base32
2334 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2335 (build-system python-build-system)
2336 (arguments
2337 '(#:phases
2338 (modify-phases %standard-phases
2339 (replace 'check
2340 (lambda _
2341 (invoke "./mimeparse_test.py"))))))
2342 (home-page
2343 "https://github.com/dbtsai/python-mimeparse")
2344 (synopsis "Python library for parsing MIME types")
2345 (description
2346 "Mimeparse provides basic functions for parsing MIME type names and
2347 matching them against a list of media-ranges.")
2348 (license license:expat)))
2349
2350 (define-public python2-mimeparse
2351 (package-with-python2 python-mimeparse))
2352
2353 (define-public python-miniboa
2354 (package
2355 (name "python-miniboa")
2356 (version "1.0.7")
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "miniboa" version))
2361 (sha256
2362 (base32
2363 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2364 (build-system python-build-system)
2365 (home-page "https://github.com/shmup/miniboa")
2366 (synopsis "Simple, single-threaded Telnet server")
2367 (description
2368 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2369 server.")
2370 (license license:asl2.0)))
2371
2372 (define-public python2-miniboa
2373 (package-with-python2 python-miniboa))
2374
2375 (define-public python-pafy
2376 (package
2377 (name "python-pafy")
2378 (version "0.5.3.1")
2379 (source
2380 (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "pafy" version))
2383 (sha256
2384 (base32
2385 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2386 (build-system python-build-system)
2387 (arguments
2388 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2389 (propagated-inputs
2390 ;; Youtube-dl is a python package which is imported in the file
2391 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2392 `(("youtube-dl" ,youtube-dl)))
2393 (home-page "https://np1.github.io/pafy/")
2394 (synopsis "Retrieve YouTube content and metadata")
2395 (description
2396 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2397 (license license:lgpl3+)))
2398
2399 (define-public python2-funcsigs
2400 (package
2401 (name "python2-funcsigs")
2402 (version "1.0.2")
2403 (source (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "funcsigs" version))
2406 (sha256
2407 (base32
2408 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2409 (build-system python-build-system)
2410 (arguments
2411 `(#:python ,python-2))
2412 (native-inputs
2413 `(("python2-unittest2" ,python2-unittest2)))
2414 (home-page "http://funcsigs.readthedocs.org")
2415 (synopsis "Python function signatures from PEP362")
2416 (description
2417 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2418 (license license:asl2.0)))
2419
2420 (define-public python2-funcsigs-bootstrap
2421 (package
2422 (inherit python2-funcsigs)
2423 (name "python2-funcsigs-bootstrap")
2424 (native-inputs `())
2425 (arguments
2426 `(#:tests? #f
2427 ,@(package-arguments python2-funcsigs)))))
2428
2429 (define-public python-py
2430 (package
2431 (name "python-py")
2432 (version "1.8.1")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "py" version))
2437 (sha256
2438 (base32
2439 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2440 (build-system python-build-system)
2441 (arguments
2442 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2443 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2444 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2445 ;; Is this module globally installed?"
2446 '(#:tests? #f))
2447 (native-inputs
2448 `(("python-setuptools-scm" ,python-setuptools-scm)))
2449 (home-page "https://github.com/pytest-dev/py")
2450 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2451 (description
2452 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2453 code introspection, and logging.")
2454 (license license:expat)))
2455
2456 (define-public python-py-next
2457 (package
2458 (inherit python-py)
2459 (version "1.9.0")
2460 (source
2461 (origin
2462 (method url-fetch)
2463 (uri (pypi-uri "py" version))
2464 (sha256
2465 (base32
2466 "0hpk0gzd4v1pcnq7zinwg5n219czi23qghcswykqskkbwly8i9lw"))))))
2467
2468 (define-public python2-py
2469 (package-with-python2 python-py))
2470
2471 ;; Recent versions of python-fixtures and python-testrepository need
2472 ;; python-pbr for packaging, which itself needs these two packages for
2473 ;; testing.
2474 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2475 ;; same source, just without any test dependencies and with tests disabled.
2476 ;; python-pbr-minmal is then used to package python-fixtures and
2477 ;; python-testrepository.
2478 ;; Strictly speaking we currently could remove the test-requirements from the
2479 ;; normal python-pbr package (and save this package) since test are disabled
2480 ;; there anyway. But this may change in future.
2481 (define-public python-pbr-minimal
2482 (package
2483 (name "python-pbr-minimal")
2484 (version "3.0.1")
2485 (source
2486 (origin
2487 (method url-fetch)
2488 (uri (pypi-uri "pbr" version))
2489 (sha256
2490 (base32
2491 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2492 (build-system python-build-system)
2493 (arguments
2494 `(#:tests? #f))
2495 (home-page "https://docs.openstack.org/pbr/latest/")
2496 (synopsis "Minimal build of python-pbr used for bootstrapping")
2497 (description
2498 "Used only for bootstrapping python2-pbr, you should not need this.")
2499 (license license:asl2.0)))
2500
2501 (define-public python2-pbr-minimal
2502 (package-with-python2 python-pbr-minimal))
2503
2504 (define-public python-pbr
2505 (package
2506 (inherit python-pbr-minimal)
2507 (name "python-pbr")
2508 (arguments
2509 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2510 (propagated-inputs
2511 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2512 (native-inputs
2513 `(("python-fixtures" ,python-fixtures-bootstrap)
2514 ;; discover, coverage, hacking, subunit
2515 ("python-mock" ,python-mock)
2516 ("python-six" ,python-six)
2517 ("python-sphinx" ,python-sphinx)
2518 ("python-testrepository" ,python-testrepository-bootstrap)
2519 ("python-testresources" ,python-testresources-bootstrap)
2520 ("python-testscenarios" ,python-testscenarios-bootstrap)
2521 ("python-testtools" ,python-testtools-bootstrap)
2522 ("python-virtualenv" ,python-virtualenv)))
2523 (synopsis "Enhance the default behavior of Python’s setuptools")
2524 (description
2525 "Python Build Reasonableness (PBR) is a library that injects some useful
2526 and sensible default behaviors into your setuptools run. It will set
2527 versions, process requirements files and generate AUTHORS and ChangeLog file
2528 from git information.
2529 ")))
2530
2531 (define-public python2-pbr
2532 (package-with-python2 python-pbr))
2533
2534 (define-public python-pyrsistent
2535 (package
2536 (name "python-pyrsistent")
2537 (version "0.16.0")
2538 (home-page "https://github.com/tobgu/pyrsistent")
2539 (source (origin
2540 (method url-fetch)
2541 (uri (pypi-uri "pyrsistent" version))
2542 (sha256
2543 (base32
2544 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2545 (build-system python-build-system)
2546 (arguments
2547 '(#:phases (modify-phases %standard-phases
2548 ;; The package works fine with newer Pytest and Hypothesis, but
2549 ;; has pinned older versions to stay compatible with Python 2.
2550 (add-before 'check 'loosen-pytest-requirement
2551 (lambda _
2552 (substitute* "setup.py"
2553 (("pytest<5") "pytest")
2554 (("hypothesis<5") "hypothesis"))
2555 #t)))))
2556 (native-inputs
2557 `(("python-hypothesis" ,python-hypothesis)
2558 ("python-pytest" ,python-pytest)
2559 ("python-pytest-runner" ,python-pytest-runner)))
2560 (propagated-inputs
2561 `(("python-six" ,python-six)))
2562 (synopsis "Persistent data structures for Python")
2563 (description
2564 "Pyrsistent is a number of persistent collections (by some referred to as
2565 functional data structures). Persistent in the sense that they are immutable.
2566
2567 All methods on a data structure that would normally mutate it instead return a
2568 new copy of the structure containing the requested updates. The original
2569 structure is left untouched.")
2570 (license license:expat)))
2571
2572 (define-public python2-pyrsistent
2573 (package-with-python2 python-pyrsistent))
2574
2575 (define-public python-exif-read
2576 (package
2577 (name "python-exif-read")
2578 (version "2.1.2")
2579 (source (origin
2580 (method url-fetch)
2581 (uri (pypi-uri "ExifRead" version))
2582 (sha256
2583 (base32
2584 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2585 (build-system python-build-system)
2586 (arguments `(#:tests? #f)) ; no tests
2587 (home-page "https://github.com/ianare/exif-py")
2588 (synopsis "Python library to extract EXIF data from image files")
2589 (description
2590 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2591 files.")
2592 (license license:bsd-3)))
2593
2594 (define-public python2-exif-read
2595 (package-with-python2 python-exif-read))
2596
2597 (define-public python-pyld
2598 (package
2599 (name "python-pyld")
2600 (version "1.0.5")
2601 (source (origin
2602 (method url-fetch)
2603 (uri (pypi-uri "PyLD" version))
2604 (sha256
2605 (base32
2606 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2607 (build-system python-build-system)
2608 (home-page "https://github.com/digitalbazaar/pyld")
2609 (synopsis "Python implementation of the JSON-LD specification")
2610 (description
2611 "PyLD is an implementation of the JSON-LD specification.")
2612 (license license:bsd-3)))
2613
2614 (define-public python2-pyld
2615 (package-with-python2 python-pyld))
2616
2617 (define-public python-cli-helpers
2618 (package
2619 (name "python-cli-helpers")
2620 (version "2.0.1")
2621 (source
2622 (origin
2623 ;; There's no source tarball on PyPI.
2624 (method git-fetch)
2625 (uri (git-reference
2626 (url "https://github.com/dbcli/cli_helpers")
2627 (commit (string-append "v" version))))
2628 (file-name (git-file-name name version))
2629 (sha256
2630 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2631 (build-system python-build-system)
2632 (native-inputs
2633 `(("python-pytest" ,python-pytest)))
2634 (propagated-inputs
2635 `(("python-wcwidth" ,python-wcwidth)
2636 ("python-configobj" ,python-configobj)
2637 ("python-tabulate" ,python-tabulate)
2638 ("python-terminaltables" ,python-terminaltables)))
2639 (home-page "https://github.com/dbcli/cli_helpers")
2640 (synopsis "Helpers for building command-line apps")
2641 (description
2642 "CLI Helpers is a Python package that makes it easy to perform common
2643 tasks when building command-line apps. It's a helper library for command-line
2644 interfaces.")
2645 (license license:bsd-3)))
2646
2647 (define-public python-click
2648 (package
2649 (name "python-click")
2650 (version "7.1.2")
2651 (source
2652 (origin
2653 (method url-fetch)
2654 (uri (pypi-uri "click" version))
2655 (sha256
2656 (base32
2657 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2658 (build-system python-build-system)
2659 (arguments
2660 `(#:phases
2661 (modify-phases %standard-phases
2662 (add-after 'unpack 'fix-paths
2663 (lambda* (#:key inputs #:allow-other-keys)
2664 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2665 "cross-libc" "libc"))))
2666 (substitute* "src/click/_unicodefun.py"
2667 (("'locale'")
2668 (string-append "'" glibc "/bin/locale'"))))
2669 #t))
2670 (replace 'check
2671 (lambda _
2672 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2673 (invoke "python" "-m" "pytest"))))))
2674 (native-inputs
2675 `(("python-pytest" ,python-pytest)))
2676 (home-page "https://palletsprojects.com/p/click/")
2677 (synopsis "Command line library for Python")
2678 (description
2679 "Click is a Python package for creating command line interfaces in a
2680 composable way with as little code as necessary. Its name stands for
2681 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2682 with sensible defaults out of the box.")
2683 (license license:bsd-3)))
2684
2685 (define-public python2-click
2686 (package-with-python2 python-click))
2687
2688 (define-public python-click-5
2689 (package (inherit python-click)
2690 (name "python-click")
2691 (version "5.1")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "click" version))
2696 (sha256
2697 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2698 (arguments `())))
2699
2700 (define-public python-wheel
2701 (package
2702 (name "python-wheel")
2703 (version "0.33.6")
2704 (source
2705 (origin
2706 (method url-fetch)
2707 (uri (pypi-uri "wheel" version))
2708 (sha256
2709 (base32
2710 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2711 (build-system python-build-system)
2712 (arguments
2713 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2714 ;; fails to find the newly-built bdist_wheel library, even though it is
2715 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2716 '(#:tests? #f))
2717 (home-page "https://bitbucket.org/pypa/wheel/")
2718 (synopsis "Format for built Python packages")
2719 (description
2720 "A wheel is a ZIP-format archive with a specially formatted filename and
2721 the @code{.whl} extension. It is designed to contain all the files for a PEP
2722 376 compatible install in a way that is very close to the on-disk format. Many
2723 packages will be properly installed with only the @code{Unpack} step and the
2724 unpacked archive preserves enough information to @code{Spread} (copy data and
2725 scripts to their final locations) at any later time. Wheel files can be
2726 installed with a newer @code{pip} or with wheel's own command line utility.")
2727 (license license:expat)))
2728
2729 (define-public python2-wheel
2730 (package-with-python2 python-wheel))
2731
2732 (define-public python-vcversioner
2733 (package
2734 (name "python-vcversioner")
2735 (version "2.16.0.0")
2736 (source
2737 (origin
2738 (method url-fetch)
2739 (uri (pypi-uri "vcversioner" version))
2740 (sha256
2741 (base32
2742 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2743 (build-system python-build-system)
2744 (synopsis "Python library for version number discovery")
2745 (description "Vcversioner is a Python library that inspects tagging
2746 information in a variety of version control systems in order to discover
2747 version numbers.")
2748 (home-page "https://github.com/habnabit/vcversioner")
2749 (license license:isc)))
2750
2751 (define-public python2-vcversioner
2752 (package-with-python2 python-vcversioner))
2753
2754 (define-public python-jdcal
2755 (package
2756 (name "python-jdcal")
2757 (version "1.4")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "jdcal" version))
2762 (sha256
2763 (base32
2764 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2765 (build-system python-build-system)
2766 (arguments
2767 `(#:phases (modify-phases %standard-phases
2768 (replace 'check
2769 (lambda _
2770 (invoke "pytest"))))))
2771 (native-inputs
2772 `(("python-pytest" ,python-pytest)))
2773 (home-page "https://github.com/phn/jdcal")
2774 (synopsis "Functions to convert between Julian dates Gregorian dates")
2775 (description "This Python library provides functions for converting
2776 between Julian dates and Gregorian dates.")
2777 (license license:bsd-2)))
2778
2779 (define-public python2-jdcal
2780 (package-with-python2 python-jdcal))
2781
2782 (define-public python-jsondiff
2783 (package
2784 (name "python-jsondiff")
2785 (version "1.2.0")
2786 (source
2787 (origin
2788 (method url-fetch)
2789 (uri (pypi-uri "jsondiff" version))
2790 (sha256
2791 (base32
2792 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2793 (build-system python-build-system)
2794 (native-inputs
2795 `(("python-nose" ,python-nose)
2796 ("python-nose-random" ,python-nose-random)))
2797 (home-page
2798 "https://github.com/fzumstein/jsondiff")
2799 (synopsis "Compare JSON and JSON-like structures in Python")
2800 (description "@code{jsondiff} is a Python library which lets you
2801 compare, diff, and patch JSON and JSON-like structures in Python.")
2802 (license license:expat)))
2803
2804 (define-public python-jsonschema
2805 (package
2806 (name "python-jsonschema")
2807 (version "3.2.0")
2808 (source (origin
2809 (method url-fetch)
2810 (uri (pypi-uri "jsonschema" version))
2811 (sha256
2812 (base32
2813 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2814 (build-system python-build-system)
2815 (arguments
2816 '(#:phases
2817 (modify-phases %standard-phases
2818 (replace 'check
2819 (lambda* (#:key inputs outputs #:allow-other-keys)
2820 (add-installed-pythonpath inputs outputs)
2821 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2822 (invoke "trial" "jsonschema"))))))
2823 (native-inputs
2824 `(("python-setuptools_scm" ,python-setuptools-scm)
2825 ("python-twisted" ,python-twisted)))
2826 (propagated-inputs
2827 `(("python-attrs" ,python-attrs)
2828 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2829 ("python-pyrsistent" ,python-pyrsistent)
2830 ("python-six" ,python-six)))
2831 (home-page "https://github.com/Julian/jsonschema")
2832 (synopsis "Implementation of JSON Schema for Python")
2833 (description
2834 "Jsonschema is an implementation of JSON Schema for Python.")
2835 (license license:expat)
2836 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2837
2838 (define-public python2-jsonschema
2839 (let ((jsonschema (package-with-python2
2840 (strip-python2-variant python-jsonschema))))
2841 (package (inherit jsonschema)
2842 (propagated-inputs
2843 `(("python2-functools32" ,python2-functools32)
2844 ,@(package-propagated-inputs jsonschema))))))
2845
2846 (define-public python-schema
2847 (package
2848 (name "python-schema")
2849 (version "0.6.6")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (pypi-uri "schema" version))
2854 (sha256
2855 (base32
2856 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2857 (build-system python-build-system)
2858 (native-inputs
2859 `(("python-pytest" ,python-pytest)))
2860 (home-page "https://github.com/keleshev/schema")
2861 (synopsis "Simple data validation library")
2862 (description
2863 "@code{python-schema} is a library for validating Python data
2864 structures, such as those obtained from config-files, forms, external
2865 services or command-line parsing, converted from JSON/YAML (or
2866 something else) to Python data-types.")
2867 (license license:psfl)))
2868
2869 (define-public python2-schema
2870 (package-with-python2 python-schema))
2871
2872 (define-public python-schema-0.5
2873 (package (inherit python-schema)
2874 (version "0.5.0")
2875 (source
2876 (origin
2877 (method url-fetch)
2878 (uri (pypi-uri "schema" version))
2879 (sha256
2880 (base32
2881 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2882
2883 (define-public python2-schema-0.5
2884 (package-with-python2 python-schema-0.5))
2885
2886 (define-public python-kitchen
2887 (package
2888 (name "python-kitchen")
2889 (version "1.2.5")
2890 (source
2891 (origin
2892 (method url-fetch)
2893 (uri (pypi-uri "kitchen" version))
2894 (sha256
2895 (base32
2896 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2897 (build-system python-build-system)
2898 (propagated-inputs
2899 `(("python-chardet" ,python-chardet)))
2900 (home-page "https://github.com/fedora-infra/kitchen")
2901 (synopsis "Python API for snippets")
2902 (description "@code{kitchen} module provides a python API for all sorts of
2903 little useful snippets of code that everybody ends up writing for their projects
2904 but never seem big enough to build an independent release. Use kitchen and stop
2905 cutting and pasting that code over and over.")
2906 (license (list license:lgpl2.1+
2907 ;; subprocess.py, test_subprocess.py,
2908 ;; kitchen/pycompat25/defaultdict.py:
2909 license:psfl))))
2910
2911 (define-public python2-kitchen
2912 (package-with-python2 python-kitchen))
2913
2914 (define-public python-unidecode
2915 (package
2916 (name "python-unidecode")
2917 (version "1.1.1")
2918 (source (origin
2919 (method url-fetch)
2920 (uri (pypi-uri "Unidecode" version))
2921 (sha256
2922 (base32
2923 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2924 (build-system python-build-system)
2925 (home-page "https://pypi.org/project/Unidecode/")
2926 (synopsis "ASCII transliterations of Unicode text")
2927 (description
2928 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2929 useful when integrating with legacy code that doesn't support Unicode, or for
2930 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2931 machine identifiers from human-readable Unicode strings that should still be
2932 somewhat intelligible.")
2933 (license license:gpl2+)))
2934
2935 (define-public python2-unidecode
2936 (package-with-python2 python-unidecode))
2937
2938 (define-public python-text-unidecode
2939 (package
2940 (name "python-text-unidecode")
2941 (version "1.3")
2942 (source (origin
2943 (method url-fetch)
2944 (uri (pypi-uri "text-unidecode" version))
2945 (sha256
2946 (base32
2947 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2948 (build-system python-build-system)
2949 (arguments
2950 '(#:phases (modify-phases %standard-phases
2951 (replace 'check
2952 (lambda _
2953 (setenv "PYTHONPATH"
2954 (string-append "./build/lib:"
2955 (getenv "PYTHONPATH")))
2956 (invoke "pytest" "-vv"))))))
2957 (native-inputs
2958 `(("python-pytest" ,python-pytest)))
2959 (home-page "https://github.com/kmike/text-unidecode/")
2960 (synopsis "Decode Unicode data")
2961 (description
2962 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2963 Perl library. It can create ASCII representations of Unicode data. In general
2964 users should prefer the @code{python-unidecode} package which offers better
2965 memory usage and transliteration quality.")
2966 ;; The user can choose either license.
2967 (license (list license:clarified-artistic license:gpl2+))))
2968
2969 (define-public python2-text-unidecode
2970 (package-with-python2 python-text-unidecode))
2971
2972 (define-public python-pyjwt
2973 (package
2974 (name "python-pyjwt")
2975 (version "1.7.1")
2976 (source
2977 (origin
2978 (method url-fetch)
2979 (uri (pypi-uri "PyJWT" version))
2980 (sha256
2981 (base32
2982 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2983 (modules '((guix build utils)))
2984 (snippet
2985 '(begin
2986 (for-each delete-file-recursively
2987 (find-files "." "\\.pyc$"))
2988 #t))))
2989 (build-system python-build-system)
2990 (arguments
2991 '(#:phases (modify-phases %standard-phases
2992 (replace 'check
2993 (lambda _
2994 ;; Mimic upstream commit 3a20892442b34c7 to get
2995 ;; rid of dependency on pytest-runner < 5.0.
2996 ;; Remove substitution for PyJWT > 1.7.1.
2997 (substitute* "setup.py"
2998 ((".*pytest-runner.*")
2999 ""))
3000 (invoke "pytest" "-vv"))))))
3001 (native-inputs
3002 `(("python-pytest" ,python-pytest)
3003 ("python-pytest-cov" ,python-pytest-cov)))
3004 (home-page "https://github.com/progrium/pyjwt")
3005 (synopsis "JSON Web Token implementation in Python")
3006 (description
3007 "PyJWT is a JSON Web Token implementation written in Python.")
3008 (license license:expat)))
3009
3010 (define-public python2-pyjwt
3011 (package-with-python2 python-pyjwt))
3012
3013 (define-public python-pykka
3014 (package
3015 (name "python-pykka")
3016 (version "1.2.1")
3017 (source
3018 (origin
3019 (method url-fetch)
3020 (uri (pypi-uri "Pykka" version))
3021 (sha256
3022 (base32
3023 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
3024 (build-system python-build-system)
3025 (native-inputs
3026 `(("python-mock" ,python-mock)
3027 ("python-nose" ,python-nose)
3028 ("python-gevent" ,python-gevent)
3029 ("python-eventlet" ,python-eventlet)))
3030 (home-page "https://www.pykka.org/")
3031 (synopsis "Pykka is a Python implementation of the actor model")
3032 (description
3033 "Pykka is a Python implementation of the actor model.
3034 The actor model introduces some simple rules to control the sharing
3035 of state and cooperation between execution units, which makes it
3036 easier to build concurrent applications.")
3037 (license license:asl2.0)))
3038
3039 (define-public python2-pykka
3040 (package-with-python2 python-pykka))
3041
3042 (define-public python-pymsgbox
3043 (package
3044 (name "python-pymsgbox")
3045 (version "1.0.6")
3046 (source
3047 (origin
3048 (method git-fetch)
3049 (uri (git-reference
3050 ;; LICENSE.txt is not present on pypi
3051 (url "https://github.com/asweigart/PyMsgBox")
3052 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3053 (file-name (git-file-name name version))
3054 (sha256
3055 (base32
3056 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3057 (arguments
3058 ;; Circular dependency to run tests:
3059 ;; Tests need pyautogui, which depends on pymsgbox.
3060 '(#:tests? #f))
3061 (build-system python-build-system)
3062 (home-page "https://github.com/asweigart/PyMsgBox")
3063 (synopsis "Python module for JavaScript-like message boxes")
3064 (description
3065 "PyMsgBox is a simple, cross-platform, pure Python module for
3066 JavaScript-like message boxes. Types of dialog boxes include:
3067 @enumerate
3068 @item alert
3069 @item confirm
3070 @item prompt
3071 @item password
3072 @end enumerate
3073 ")
3074 (license license:bsd-3)))
3075
3076 (define-public python-pympler
3077 (package
3078 (name "python-pympler")
3079 (home-page "https://pythonhosted.org/Pympler/")
3080 (version "0.8")
3081 (source (origin
3082 (method url-fetch)
3083 (uri (pypi-uri "Pympler" version))
3084 (sha256
3085 (base32
3086 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3087 (build-system python-build-system)
3088 (arguments
3089 `(#:phases (modify-phases %standard-phases
3090 (delete 'check)
3091 (add-after 'install 'check
3092 (lambda* (#:key inputs outputs #:allow-other-keys)
3093 (add-installed-pythonpath inputs outputs)
3094 (invoke "python" "setup.py" "test"))))))
3095 (synopsis "Measure, monitor and analyze memory behavior")
3096 (description
3097 "Pympler is a development tool to measure, monitor and analyze
3098 the memory behavior of Python objects in a running Python application.
3099
3100 By pympling a Python application, detailed insight in the size and the
3101 lifetime of Python objects can be obtained. Undesirable or unexpected
3102 runtime behavior like memory bloat and other @samp{pymples} can easily
3103 be identified.
3104
3105 A web profiling frontend exposes process statistics, garbage
3106 visualisation and class tracker statistics.")
3107 (license license:asl2.0)))
3108
3109 (define-public python2-pympler
3110 (package-with-python2 python-pympler))
3111
3112 (define-public python-itsdangerous
3113 (package
3114 (name "python-itsdangerous")
3115 (version "1.1.0")
3116 (source
3117 (origin
3118 (method url-fetch)
3119 (uri (pypi-uri "itsdangerous" version))
3120 (sha256
3121 (base32
3122 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3123 (build-system python-build-system)
3124 (home-page "https://palletsprojects.com/p/itsdangerous/")
3125 (synopsis "Python library for passing data to/from untrusted environments")
3126 (description
3127 "Itsdangerous provides various helpers to pass trusted data to untrusted
3128 environments and back.")
3129 (license license:bsd-3)))
3130
3131 (define-public python2-itsdangerous
3132 (package-with-python2 python-itsdangerous))
3133
3134 (define-public python-pyyaml
3135 (package
3136 (name "python-pyyaml")
3137 (version "5.3.1")
3138 (source
3139 (origin
3140 (method url-fetch)
3141 (uri (pypi-uri "PyYAML" version))
3142 (sha256
3143 (base32
3144 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3145 (build-system python-build-system)
3146 (inputs
3147 `(("libyaml" ,libyaml)))
3148 (home-page "https://pyyaml.org")
3149 (synopsis "YAML parser and emitter for Python")
3150 (description
3151 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3152 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3153 API, and sensible error messages. PyYAML supports standard YAML tags and
3154 provides Python-specific tags that represent an arbitrary Python object.")
3155 (license license:expat)))
3156
3157 (define-public python2-pyyaml
3158 (package-with-python2 python-pyyaml))
3159
3160 (define-public python-vine
3161 (package
3162 (name "python-vine")
3163 (version "1.1.4")
3164 (source
3165 (origin
3166 (method url-fetch)
3167 (uri (pypi-uri "vine" version))
3168 (sha256
3169 (base32
3170 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3171 (build-system python-build-system)
3172 (native-inputs
3173 `(("python-pytest" ,python-pytest)
3174 ("python-case" ,python-case)))
3175 (home-page "https://github.com/celery/vine")
3176 (synopsis "Promises for Python")
3177 (description
3178 "@code{vine} provides a special implementation of promises in that it can
3179 be used both for \"promise of a value\" and lazy evaluation. The biggest
3180 upside for this is that everything in a promise can also be a promise,
3181 e.g. filters, callbacks and errbacks can all be promises.")
3182 (license license:bsd-3)))
3183
3184 (define-public python-virtualenv
3185 (package
3186 (name "python-virtualenv")
3187 (version "20.0.10")
3188 (source
3189 (origin
3190 (method url-fetch)
3191 (uri (pypi-uri "virtualenv" version))
3192 (sha256
3193 (base32
3194 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3195 (build-system python-build-system)
3196 (native-inputs
3197 `(("python-mock" ,python-mock)
3198 ("python-pytest" ,python-pytest)
3199 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3200 ;; be an input at all". However, removing the input makes the build error:
3201 ;; File "setup.py", line 4, in <module>
3202 ;; raise RuntimeError("setuptools >= 41 required to build")
3203 ("python-setuptools" ,python-setuptools)
3204 ("python-setuptools-scm" ,python-setuptools-scm)))
3205 (propagated-inputs
3206 `(("python-appdirs" ,python-appdirs)
3207 ("python-distlib" ,python-distlib)
3208 ("python-filelock" ,python-filelock)
3209 ("python-six" ,python-six)
3210 ("python-importlib-metadata" ,python-importlib-metadata)))
3211 (home-page "https://virtualenv.pypa.io/")
3212 (synopsis "Virtual Python environment builder")
3213 (description
3214 "Virtualenv is a tool to create isolated Python environments.")
3215 (properties `((python2-variant . ,(delay python2-virtualenv))))
3216 (license license:expat)))
3217
3218 (define-public python2-virtualenv
3219 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3220 (package
3221 (inherit base)
3222 (arguments
3223 `(#:python ,python-2
3224 #:phases
3225 (modify-phases %standard-phases
3226 (add-after 'set-paths 'adjust-PYTHONPATH
3227 (lambda* (#:key inputs #:allow-other-keys)
3228 (let* ((python (assoc-ref inputs "python"))
3229 (python-sitedir (string-append python "/lib/python2.7"
3230 "/site-packages")))
3231 ;; XXX: 'python2' always comes first on PYTHONPATH
3232 ;; and shadows the 'setuptools' input. Move python2
3233 ;; last: this should be fixed in python-build-system
3234 ;; in a future rebuild cycle.
3235 (setenv "PYTHONPATH"
3236 (string-append (string-join (delete python-sitedir
3237 (string-split
3238 (getenv "PYTHONPATH")
3239 #\:))
3240 ":")
3241 ":" python-sitedir))
3242 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3243 (getenv "PYTHONPATH"))
3244 #t))))))
3245 (propagated-inputs
3246 `(("python-contextlib2" ,python2-contextlib2)
3247 ,@(package-propagated-inputs base))))))
3248
3249 (define-public python-markupsafe
3250 (package
3251 (name "python-markupsafe")
3252 (version "1.1.1")
3253 (source
3254 (origin
3255 (method url-fetch)
3256 (uri (pypi-uri "MarkupSafe" version))
3257 (sha256
3258 (base32
3259 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3260 (build-system python-build-system)
3261 (arguments
3262 `(#:modules ((ice-9 ftw)
3263 (srfi srfi-1)
3264 (srfi srfi-26)
3265 (guix build utils)
3266 (guix build python-build-system))
3267 #:phases (modify-phases %standard-phases
3268 (replace 'check
3269 (lambda _
3270 (let ((cwd (getcwd))
3271 (libdir (find (cut string-prefix? "lib." <>)
3272 (scandir "build"))))
3273 (setenv "PYTHONPATH"
3274 (string-append cwd "/build/" libdir ":"
3275 (getenv "PYTHONPATH")))
3276 (invoke "pytest" "-vv")))))))
3277 (native-inputs
3278 `(("python-pytest" ,python-pytest)))
3279 (home-page "https://github.com/mitsuhiko/markupsafe")
3280 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3281 (description
3282 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3283 for Python.")
3284 (license license:bsd-3)))
3285
3286 (define-public python2-markupsafe
3287 (package-with-python2 python-markupsafe))
3288
3289 (define-public python-jinja2
3290 (package
3291 (name "python-jinja2")
3292 (version "2.11.2")
3293 (source
3294 (origin
3295 (method url-fetch)
3296 (uri (pypi-uri "Jinja2" version))
3297 (sha256
3298 (base32
3299 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3300 (build-system python-build-system)
3301 (arguments
3302 '(#:phases (modify-phases %standard-phases
3303 (replace 'check
3304 (lambda* (#:key tests? #:allow-other-keys)
3305 (if tests?
3306 (begin
3307 (setenv "PYTHONPATH"
3308 (string-append "./build/lib:"
3309 (getenv "PYTHONPATH")))
3310 (invoke "pytest" "-vv"))
3311 (format #t "test suite not run~%"))
3312 #t)))))
3313 (native-inputs
3314 `(("python-pytest" ,python-pytest)))
3315 (propagated-inputs
3316 `(("python-markupsafe" ,python-markupsafe)))
3317 (home-page "http://jinja.pocoo.org/")
3318 (synopsis "Python template engine")
3319 (description
3320 "Jinja2 is a small but fast and easy to use stand-alone template engine
3321 written in pure Python.")
3322 (license license:bsd-3)))
3323
3324 (define-public python2-jinja2
3325 (package-with-python2 python-jinja2))
3326
3327 (define-public python-jinja2-time
3328 (package
3329 (name "python-jinja2-time")
3330 (version "0.2.0")
3331 (source
3332 (origin
3333 (method url-fetch)
3334 (uri (pypi-uri "jinja2-time" version))
3335 (sha256
3336 (base32
3337 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3338 (build-system python-build-system)
3339 (propagated-inputs
3340 `(("python-arrow" ,python-arrow)
3341 ("python-jinja2" ,python-jinja2)))
3342 (home-page
3343 "https://github.com/hackebrot/jinja2-time")
3344 (synopsis "Jinja2 Extension for Dates and Times")
3345 (description
3346 "This package provides an extension for the template engine Jinja2. It
3347 adds a 'now' tag providing a convenient access to the arrow.now() API from
3348 templates. A format string can be provided to control the output.")
3349 (license license:expat)))
3350
3351 (define-public python-pystache
3352 (package
3353 (name "python-pystache")
3354 (version "0.5.4")
3355 (source (origin
3356 (method url-fetch)
3357 (uri (pypi-uri "pystache" version))
3358 (sha256
3359 (base32
3360 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3361 (build-system python-build-system)
3362 (arguments
3363 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3364 (home-page "http://defunkt.io/pystache/")
3365 (synopsis "Python logic-less template engine")
3366 (description
3367 "Pystache is a Python implementation of the framework agnostic,
3368 logic-free templating system Mustache.")
3369 (license license:expat)
3370 (properties `((python2-variant . ,(delay python2-pystache))))))
3371
3372 (define-public python2-pystache
3373 (package (inherit (package-with-python2
3374 (strip-python2-variant python-pystache)))
3375 (arguments
3376 `(#:python ,python-2
3377 #:phases
3378 (modify-phases %standard-phases
3379 (replace 'check
3380 (lambda _
3381 (invoke "python" "test_pystache.py"))))))))
3382
3383 (define-public python-joblib
3384 (package
3385 (name "python-joblib")
3386 (version "0.14.1")
3387 (source (origin
3388 (method url-fetch)
3389 (uri (pypi-uri "joblib" version))
3390 (sha256
3391 (base32
3392 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3393 (build-system python-build-system)
3394 (arguments
3395 `(#:phases
3396 (modify-phases %standard-phases
3397 (replace 'check
3398 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3399 (native-inputs
3400 `(("python-pytest" ,python-pytest)))
3401 (home-page "https://joblib.readthedocs.io/")
3402 (synopsis "Using Python functions as pipeline jobs")
3403 (description
3404 "Joblib is a set of tools to provide lightweight pipelining in Python.
3405 In particular, joblib offers: transparent disk-caching of the output values
3406 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3407 logging and tracing of the execution.")
3408 (license license:bsd-3)))
3409
3410 (define-public python2-joblib
3411 (package-with-python2 python-joblib))
3412
3413 (define-public python-daemon
3414 (package
3415 (name "python-daemon")
3416 (version "2.2.3")
3417 (source
3418 (origin
3419 (method url-fetch)
3420 (uri (pypi-uri "python-daemon" version))
3421 (sha256
3422 (base32
3423 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3424 (build-system python-build-system)
3425 (arguments
3426 `(#:phases
3427 (modify-phases %standard-phases
3428 (add-before 'check 'disable-tests
3429 (lambda _
3430 ;; FIXME: Determine why test fails
3431 (substitute* "test/test_daemon.py"
3432 (("test_detaches_process_context")
3433 "skip_test_detaches_process_context"))
3434 #t)))))
3435 (propagated-inputs
3436 `(("python-lockfile" ,python-lockfile)))
3437 (native-inputs
3438 `(("python-unittest2" ,python-unittest2)
3439 ("python-testtools" ,python-testtools)
3440 ("python-testscenarios" ,python-testscenarios)
3441 ("python-mock" ,python-mock)
3442 ("python-docutils" ,python-docutils)))
3443 (home-page "https://pagure.io/python-daemon/")
3444 (synopsis "Python library for making a Unix daemon process")
3445 (description "Python-daemon is a library that assists a Python program to
3446 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3447
3448 This library provides a @code{DaemonContext} class that manages the following
3449 important tasks for becoming a daemon process:
3450 @enumerate
3451 @item Detach the process into its own process group.
3452 @item Set process environment appropriate for running inside a chroot.
3453 @item Renounce suid and sgid privileges.
3454 @item Close all open file descriptors.
3455 @item Change the working directory, uid, gid, and umask.
3456 @item Set appropriate signal handlers.
3457 @item Open new file descriptors for stdin, stdout, and stderr.
3458 @item Manage a specified PID lock file.
3459 @item Register cleanup functions for at-exit processing.
3460 @end enumerate")
3461 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3462 (license (list license:asl2.0 license:gpl3+))))
3463
3464 (define-public python-anytree
3465 (package
3466 (name "python-anytree")
3467 (version "2.8.0")
3468 (source (origin
3469 (method url-fetch)
3470 (uri (pypi-uri "anytree" version))
3471 (sha256
3472 (base32
3473 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3474 (build-system python-build-system)
3475 (propagated-inputs
3476 `(("python-six" ,python-six)))
3477 (native-inputs
3478 `(;; For tests.
3479 ("graphviz" ,graphviz) ;for 'dot'
3480 ("python-nose" ,python-nose)))
3481 (home-page "https://github.com/c0fec0de/anytree")
3482 (synopsis "Lightweight tree data library")
3483 (description
3484 "@code{anytree} is a simple, lightweight, and extensible tree data
3485 structure for Python.")
3486 (license license:asl2.0)))
3487
3488 (define-public python-docutils
3489 (package
3490 (name "python-docutils")
3491 (version "0.16")
3492 (source
3493 (origin
3494 (method url-fetch)
3495 (uri (pypi-uri "docutils" version))
3496 (sha256
3497 (base32
3498 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3499 (build-system python-build-system)
3500 (arguments
3501 '(#:phases (modify-phases %standard-phases
3502 (replace 'check
3503 (lambda* (#:key tests? #:allow-other-keys)
3504 (if tests?
3505 (invoke "python" "test/alltests.py")
3506 (format #t "test suite not run~%"))
3507 #t)))))
3508 (home-page "http://docutils.sourceforge.net/")
3509 (synopsis "Python Documentation Utilities")
3510 (description
3511 "Docutils is a modular system for processing documentation into useful
3512 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3513 easy to use markup language, for input.
3514
3515 This package provides tools for converting @file{.rst} files to other formats
3516 via commands such as @command{rst2man}, as well as supporting Python code.")
3517 ;; Most of the source code is public domain, but some source files are
3518 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3519 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3520
3521 (define-public python2-docutils
3522 (package-with-python2 python-docutils))
3523
3524 ;; python2-sphinx fails its test suite with newer versions.
3525 (define-public python2-docutils-0.14
3526 (package
3527 (inherit python2-docutils)
3528 (version "0.14")
3529 (source (origin
3530 (method url-fetch)
3531 (uri (pypi-uri "docutils" version))
3532 (sha256
3533 (base32
3534 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3535
3536 (define-public python-restructuredtext-lint
3537 (package
3538 (name "python-restructuredtext-lint")
3539 (version "1.3.0")
3540 (source
3541 (origin
3542 (method url-fetch)
3543 (uri (pypi-uri "restructuredtext-lint" version))
3544 (sha256
3545 (base32
3546 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3547 (build-system python-build-system)
3548 (arguments
3549 `(#:phases
3550 (modify-phases %standard-phases
3551 (delete 'check)
3552 (add-after 'install 'check
3553 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3554 (when tests?
3555 (add-installed-pythonpath inputs outputs)
3556 (invoke "nosetests" "-v"))
3557 #t)))))
3558 (propagated-inputs
3559 `(("python-docutils" ,python-docutils)))
3560 (native-inputs
3561 `(("python-nose" ,python-nose)))
3562 (home-page "https://github.com/twolfson/restructuredtext-lint")
3563 (synopsis "reStructuredText linter")
3564 (description "This package provides a linter for the reStructuredText
3565 format.")
3566 (license license:unlicense)))
3567
3568 (define-public python-doc8
3569 (package
3570 (name "python-doc8")
3571 (version "0.8.0")
3572 (source
3573 (origin
3574 (method url-fetch)
3575 (uri (pypi-uri "doc8" version))
3576 (sha256
3577 (base32
3578 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3579 (build-system python-build-system)
3580 (arguments
3581 `(#:phases
3582 (modify-phases %standard-phases
3583 (delete 'check)
3584 (add-after 'install 'check
3585 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3586 (when tests?
3587 (add-installed-pythonpath inputs outputs)
3588 (invoke "pytest" "-v"))
3589 #t)))))
3590 (propagated-inputs
3591 `(("python-chardet" ,python-chardet)
3592 ("python-docutils" ,python-docutils)
3593 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3594 ("python-six" ,python-six)
3595 ("python-stevedore" ,python-stevedore)))
3596 (native-inputs
3597 `(("python-testtools" ,python-testtools)
3598 ("python-pytest" ,python-pytest)))
3599 (home-page "https://launchpad.net/doc8")
3600 (synopsis
3601 "Style checker for Sphinx (or other) RST documentation")
3602 (description
3603 "Doc8 is an opinionated style checker for reStructured Text and plain
3604 text styles of documentation.")
3605 (license license:asl2.0)))
3606
3607 (define-public python-pygments
3608 (package
3609 (name "python-pygments")
3610 (version "2.6.1")
3611 (source
3612 (origin
3613 (method url-fetch)
3614 (uri (pypi-uri "Pygments" version))
3615 (sha256
3616 (base32
3617 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3618 (build-system python-build-system)
3619 (arguments
3620 ;; FIXME: Tests require sphinx, which depends on this.
3621 '(#:tests? #f))
3622 (home-page "https://pygments.org/")
3623 (synopsis "Syntax highlighting")
3624 (description
3625 "Pygments is a syntax highlighting package written in Python.")
3626 (license license:bsd-2)
3627 (properties `((python2-variant . ,(delay python2-pygments))))))
3628
3629 ;; Pygments 2.6 and later does not support Python 2.
3630 (define-public python2-pygments
3631 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3632 (package
3633 (inherit base)
3634 (version "2.5.2")
3635 (source (origin
3636 (method url-fetch)
3637 (uri (pypi-uri "Pygments" version))
3638 (sha256
3639 (base32
3640 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3641
3642 (define-public python-bumpversion
3643 (package
3644 (name "python-bumpversion")
3645 (version "0.5.3")
3646 (source
3647 (origin
3648 (method url-fetch)
3649 (uri (pypi-uri "bumpversion" version))
3650 (sha256
3651 (base32
3652 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3653 (build-system python-build-system)
3654 (home-page "https://github.com/peritus/bumpversion")
3655 (synopsis "Tool to bump software version")
3656 (description "This tool provides a command-line interface (CLI) to bump a
3657 software version simply.")
3658 (license license:expat)))
3659
3660 (define-public python-deprecated
3661 (package
3662 (name "python-deprecated")
3663 (version "1.2.5")
3664 (source
3665 (origin
3666 (method git-fetch)
3667 (uri (git-reference
3668 (url "https://github.com/tantale/deprecated")
3669 (commit (string-append "v" version))))
3670 (file-name (git-file-name name version))
3671 (sha256
3672 (base32
3673 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3674 (build-system python-build-system)
3675 (arguments
3676 `(#:phases (modify-phases %standard-phases
3677 (replace 'check
3678 (lambda _
3679 (invoke "pytest"))))))
3680 (propagated-inputs
3681 `(("python-wrapt" ,python-wrapt)))
3682 (native-inputs
3683 `(("python-bumpversion" ,python-bumpversion)
3684 ("python-pytest" ,python-pytest)
3685 ("python-pytest-cov" ,python-pytest-cov)
3686 ("python-sphinx" ,python-sphinx)
3687 ("python-tox" ,python-tox)))
3688 (home-page "https://github.com/tantale/deprecated")
3689 (synopsis "Python decorator to deprecate classes, functions or methods")
3690 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3691 to deprecate classes, functions or methods.")
3692 (license license:expat)))
3693
3694 (define-public python-pygithub
3695 (package
3696 (name "python-pygithub")
3697 (version "1.43.8")
3698 (source
3699 ;; We fetch from the Git repo because there are no tests in the PyPI
3700 ;; archive.
3701 (origin
3702 (method git-fetch)
3703 (uri (git-reference
3704 (url "https://github.com/PyGithub/PyGithub")
3705 (commit (string-append "v" version))))
3706 (file-name (git-file-name name version))
3707 (sha256
3708 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3709 (build-system python-build-system)
3710 (arguments
3711 `(#:phases (modify-phases %standard-phases
3712 ;; Some tests rely on the network.
3713 (add-after 'unpack 'disable-failing-tests
3714 (lambda _
3715 (substitute* "tests/Issue142.py"
3716 (("testDecodeJson") "disabled_testDecodeJson"))
3717 #t))
3718 (add-before 'check 'prepare-for-tests
3719 (lambda _
3720 (for-each (lambda (f)
3721 (chmod f #o666))
3722 (find-files "./tests"))
3723 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3724 (setenv "PYTHONPATH"
3725 (string-append "./tests:" (getenv "PYTHONPATH")))
3726 #t)))))
3727 (propagated-inputs
3728 `(("python-deprecated" ,python-deprecated)
3729 ("python-pyjwt" ,python-pyjwt)
3730 ("python-requests" ,python-requests)))
3731 (native-inputs `(("python-httpretty" ,python-httpretty)))
3732 (home-page "https://pygithub.readthedocs.io/en/latest/")
3733 (synopsis "Python library for the GitHub API")
3734 (description "This library allows managing GitHub resources such as
3735 repositories, user profiles, and organizations in your Python applications,
3736 using version 3 of the GitHub application programming interface (API).")
3737 (license license:lgpl3+)))
3738
3739 (define-public python-rellu
3740 (package
3741 (name "python-rellu")
3742 (version "0.7")
3743 (source
3744 (origin
3745 (method url-fetch)
3746 (uri (pypi-uri "rellu" version))
3747 (sha256
3748 (base32
3749 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3750 (build-system python-build-system)
3751 (propagated-inputs
3752 `(("python-invoke" ,python-invoke)
3753 ("python-pygithub" ,python-pygithub)))
3754 (home-page "https://github.com/robotframework/rellu")
3755 (synopsis "Utilities to create PyPI releases")
3756 (description "This collection of utilities contains tooling and templates
3757 to assist in creating releases on GitHub and publishing them on PyPI. It is
3758 designed to be used by Robot Framework and tools and libraries in its
3759 ecosystem, but can naturally be used also by other projects.")
3760 (license license:asl2.0)))
3761
3762 (define-public python-robotframework
3763 (package
3764 (name "python-robotframework")
3765 (version "3.2.2")
3766 ;; There are no tests in the PyPI archive.
3767 (source
3768 (origin
3769 (method git-fetch)
3770 (uri (git-reference
3771 (url "https://github.com/robotframework/robotframework")
3772 (commit (string-append "v" version))))
3773 (file-name (git-file-name name version))
3774 (sha256
3775 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3776 (patches (search-patches
3777 "python-robotframework-source-date-epoch.patch"))))
3778 (build-system python-build-system)
3779 (arguments
3780 `(#:phases (modify-phases %standard-phases
3781 (add-before 'build 'build-and-install-doc
3782 (lambda* (#:key outputs #:allow-other-keys)
3783 (let* ((doc-output (assoc-ref outputs "doc"))
3784 (doc (string-append doc-output "/share/"
3785 ,name "-" ,version "/")))
3786 (invoke "invoke" "library-docs" "all")
3787 (mkdir-p doc)
3788 (copy-recursively "doc/libraries"
3789 (string-append doc "/libraries"))
3790 #t)))
3791 (replace 'check
3792 (lambda* (#:key inputs #:allow-other-keys)
3793 ;; Some tests require timezone data. Otherwise, they
3794 ;; look up /etc/localtime, which doesn't exist, and fail
3795 ;; with:
3796 ;;
3797 ;; OverflowError: mktime argument out of range
3798 (setenv "TZDIR"
3799 (string-append (assoc-ref inputs "tzdata")
3800 "/share/zoneinfo"))
3801 (setenv "TZ" "Europe/Paris")
3802
3803 (invoke "python" "utest/run.py"))))))
3804 (native-inputs
3805 `(("python-invoke" ,python-invoke)
3806 ("python-rellu" ,python-rellu)
3807 ("python:tk" ,python "tk") ;used when building the HTML doc
3808 ("tzdata" ,tzdata-for-tests)))
3809 (outputs '("out" "doc"))
3810 (home-page "https://robotframework.org")
3811 (synopsis "Generic automation framework")
3812 (description "Robot Framework is a generic automation framework for
3813 acceptance testing, acceptance test driven development (ATDD), and robotic
3814 process automation (RPA).")
3815 (license license:asl2.0)))
3816
3817 (define-public python-robotframework-lint
3818 ;; There is no properly tagged release; the commit below seems to correspond
3819 ;; to the 0.9 stable release available from PyPI. The tests are not
3820 ;; included in the PyPI archive, so we fetch the sources from the upstream
3821 ;; Git repo.
3822 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3823 (revision "0"))
3824 (package
3825 (name "python-robotframework-lint")
3826 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3827 revision commit))
3828 (source
3829 (origin
3830 (method git-fetch)
3831 (uri (git-reference
3832 (url "https://github.com/boakley/robotframework-lint")
3833 (commit commit)))
3834 (file-name (git-file-name name version))
3835 (sha256
3836 (base32
3837 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3838 (build-system python-build-system)
3839 (arguments
3840 `(#:phases
3841 (modify-phases %standard-phases
3842 (replace 'check
3843 (lambda _
3844 (invoke "python" "-m" "robot" "-A"
3845 "tests/conf/default.args" "tests"))))))
3846 (propagated-inputs
3847 `(("python-robotframework" ,python-robotframework)))
3848 (home-page "https://github.com/boakley/robotframework-lint/")
3849 (synopsis "Static analysis tool (linter) for Robot Framework")
3850 (description "This package provides the @code{rflint} command-line
3851 utility, a static analysis tool (linter) for Robot Framework source files.")
3852 (license license:asl2.0))))
3853
3854 (define-public python-robotframework-sshlibrary
3855 (package
3856 (name "python-robotframework-sshlibrary")
3857 (version "3.3.0")
3858 ;; There are no tests in the PyPI archive.
3859 (source
3860 (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/robotframework/SSHLibrary")
3864 (commit (string-append "v" version))))
3865 (file-name (git-file-name name version))
3866 (sha256
3867 (base32
3868 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3869 (build-system python-build-system)
3870 (arguments
3871 `(#:phases
3872 (modify-phases %standard-phases
3873 (add-before 'build 'build-and-install-doc
3874 (lambda* (#:key outputs #:allow-other-keys)
3875 (let* ((doc-output (assoc-ref outputs "doc"))
3876 (doc (string-append doc-output "/share/"
3877 ,name "-" ,version "/")))
3878 (invoke "chmod" "-R" "+w" "docs")
3879 (invoke "invoke" "kw-docs" "project-docs")
3880 (mkdir-p doc)
3881 (for-each delete-file (find-files "docs" "\\.rst"))
3882 (copy-recursively "docs" doc)
3883 #t)))
3884 (replace 'check
3885 (lambda _
3886 ;; Some tests require an SSH server; we remove them.
3887 (delete-file "utest/test_client_api.py")
3888 (delete-file "utest/test_scp.py")
3889 (invoke "python" "utest/run.py"))))))
3890 (propagated-inputs
3891 `(("python-robotframework" ,python-robotframework)
3892 ("python-paramiko" ,python-paramiko)
3893 ("python-scp" ,python-scp)))
3894 (native-inputs
3895 `(("openssh" ,openssh)
3896 ("which" ,which)
3897 ;; To generate the documentation
3898 ("python-docutils" ,python-docutils)
3899 ("python-invoke" ,python-invoke)
3900 ("python-pygments" ,python-pygments)
3901 ("python-rellu" ,python-rellu)))
3902 (outputs '("out" "doc"))
3903 (home-page "https://github.com/robotframework/SSHLibrary")
3904 (synopsis "Robot Framework library for SSH and SFTP")
3905 (description "SSHLibrary is a Robot Framework library providing support
3906 for SSH and SFTP. It has the following main usages:
3907 @itemize @bullet
3908 @item Executing commands on the remote machine, either blocking or non-blocking.
3909 @item Writing and reading in an interactive shell.
3910 @item Transferring files and directories over SFTP.
3911 @item Ensuring that files and directories exist on the remote machine.
3912 @end itemize")
3913 (license license:asl2.0)))
3914
3915 (define-public python-rstr
3916 (package
3917 (name "python-rstr")
3918 (version "2.2.6")
3919 (source
3920 (origin
3921 (method url-fetch)
3922 (uri (pypi-uri "rstr" version))
3923 (sha256
3924 (base32
3925 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3926 (build-system python-build-system)
3927 (home-page
3928 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3929 (synopsis "Generate random strings in Python")
3930 (description "This package provides a python module for generating
3931 random strings of various types. It could be useful for fuzz testing,
3932 generating dummy data, or other applications. It has no dependencies
3933 outside the standard library.")
3934 (license license:bsd-3)))
3935
3936 (define-public python-scp
3937 (package
3938 (name "python-scp")
3939 (version "0.13.3")
3940 (source
3941 (origin
3942 (method url-fetch)
3943 (uri (pypi-uri "scp" version))
3944 (sha256
3945 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3946 (build-system python-build-system)
3947 (arguments
3948 '(#:tests? #f)) ;tests require an SSH server
3949 (propagated-inputs
3950 `(("python-paramiko" ,python-paramiko)))
3951 (home-page "https://github.com/jbardin/scp.py")
3952 (synopsis "SCP protocol module for Python and Paramiko")
3953 (description "The scp module extends the Paramiko library to send and
3954 receive files via the SCP1 protocol, as implemented by the OpenSSH
3955 @command{scp} program.")
3956 (license license:gpl2+)))
3957
3958 (define-public python-rst.linker
3959 (package
3960 (name "python-rst.linker")
3961 (version "1.11")
3962 (source
3963 (origin
3964 (method url-fetch)
3965 (uri (pypi-uri "rst.linker" version))
3966 (sha256
3967 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3968 (build-system python-build-system)
3969 (propagated-inputs
3970 `(("python-dateutil" ,python-dateutil)
3971 ("python-six" ,python-six)))
3972 (native-inputs
3973 `(("python-setuptools-scm" ,python-setuptools-scm)))
3974 ;; Test would require path.py, which would introduce a cyclic dependence.
3975 (arguments `(#:tests? #f))
3976 ;; Note: As of version 1.7 the documentation is not worth building.
3977 (home-page "https://github.com/jaraco/rst.linker")
3978 (synopsis "Sphinx plugin to add links and timestamps")
3979 (description "rst.linker automatically replaces text by a
3980 reStructuredText external reference or timestamps. It's primary purpose is to
3981 augment the changelog, but it can be used for other documents, too.")
3982 (license license:expat)))
3983
3984 (define-public python2-rst.linker
3985 (package-with-python2 python-rst.linker))
3986
3987 (define-public python-sshpubkeys
3988 (package
3989 (name "python-sshpubkeys")
3990 (version "3.1.0")
3991 (home-page "https://github.com/ojarva/python-sshpubkeys")
3992 (source (origin
3993 (method git-fetch)
3994 (uri (git-reference
3995 (url home-page)
3996 (commit (string-append "v" version))))
3997 (file-name (git-file-name name version))
3998 (sha256
3999 (base32
4000 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
4001 (build-system python-build-system)
4002 (propagated-inputs
4003 `(("python-cryptography" ,python-cryptography)
4004 ("python-ecdsa" ,python-ecdsa)))
4005 (synopsis "OpenSSH public key parser")
4006 (description
4007 "This package provides a library for parsing and validating OpenSSH
4008 public key files.")
4009 (license license:bsd-3)))
4010
4011 (define-public python-feedgenerator
4012 (package
4013 (name "python-feedgenerator")
4014 (version "1.9")
4015 (source
4016 (origin
4017 (method url-fetch)
4018 (uri (pypi-uri "feedgenerator" version))
4019 (sha256
4020 (base32
4021 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
4022 (modules '((guix build utils)))
4023 (snippet
4024 '(begin
4025 ;; Remove pre-compiled .pyc files from source.
4026 (for-each delete-file-recursively
4027 (find-files "." "__pycache__" #:directories? #t))
4028 (for-each delete-file (find-files "." "\\.pyc$"))
4029 #t))))
4030 (build-system python-build-system)
4031 (propagated-inputs
4032 `(("python-pytz" ,python-pytz)
4033 ("python-six" ,python-six)))
4034 (home-page "https://github.com/getpelican/feedgenerator")
4035 (synopsis
4036 "Standalone version of Django's Atom/RSS feed generator")
4037 (description
4038 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
4039 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
4040 (license license:bsd-3)))
4041
4042 (define-public python2-feedgenerator
4043 (package-with-python2 python-feedgenerator))
4044
4045 (define-public python-toml
4046 (package
4047 (name "python-toml")
4048 (version "0.10.1")
4049 (source
4050 (origin
4051 (method url-fetch)
4052 (uri (pypi-uri "toml" version))
4053 (sha256
4054 (base32
4055 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
4056 (build-system python-build-system)
4057 (arguments
4058 `(#:tests? #f)) ;no tests suite in release
4059 (home-page "https://github.com/uiri/toml")
4060 (synopsis "Library for TOML")
4061 (description
4062 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4063 Language (TOML) configuration files.")
4064 (license license:expat)))
4065
4066 (define-public python-jsonrpc-server
4067 (package
4068 (name "python-jsonrpc-server")
4069 (version "0.4.0")
4070 (source
4071 (origin
4072 (method url-fetch)
4073 (uri (pypi-uri "python-jsonrpc-server" version))
4074 (sha256
4075 (base32
4076 "1585ybn3djvx5r5zbxkzlhz2wb1d47y4wrfwaxdyq0gi87jl7ib2"))))
4077 (build-system python-build-system)
4078 (propagated-inputs
4079 `(("python-mock" ,python-mock)
4080 ("python-pytest" ,python-pytest)
4081 ("python-ujson" ,python-ujson)))
4082 (home-page
4083 "https://github.com/palantir/python-jsonrpc-server")
4084 (synopsis "JSON RPC 2.0 server library")
4085 (description
4086 "This package provides a JSON RPC 2.0 server library for Python.")
4087 (license license:expat)))
4088
4089 (define-public python-pydantic
4090 (package
4091 (name "python-pydantic")
4092 (version "1.6.1")
4093 (source
4094 (origin
4095 (method git-fetch)
4096 (uri (git-reference
4097 (url "https://github.com/samuelcolvin/pydantic")
4098 (commit (string-append "v" version))))
4099 (file-name (git-file-name name version))
4100 (sha256
4101 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4102 (build-system python-build-system)
4103 (arguments
4104 '(#:phases
4105 (modify-phases %standard-phases
4106 ;; Reported upstream:
4107 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4108 ;; Disable the faulty test as the fix is unclear.
4109 (add-before 'check 'disable-test
4110 (lambda _
4111 (substitute* "tests/test_validators.py"
4112 (("test_assert_raises_validation_error")
4113 "_test_assert_raises_validation_error"))
4114 #t))
4115 (replace 'check
4116 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4117 (native-inputs
4118 `(("python-pytest" ,python-pytest)))
4119 (home-page "https://github.com/samuelcolvin/pydantic")
4120 (synopsis "Python data validation and settings management")
4121 (description
4122 "Pydantic enforces type hints at runtime, and provides user friendly
4123 errors when data is invalid.")
4124 (license license:expat)))
4125
4126 (define-public python-pydocstyle
4127 (package
4128 (name "python-pydocstyle")
4129 (version "3.0.0")
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (pypi-uri "pydocstyle" version))
4134 (sha256
4135 (base32
4136 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4137 (build-system python-build-system)
4138 (propagated-inputs
4139 `(("python-six" ,python-six)
4140 ("python-snowballstemmer" ,python-snowballstemmer)))
4141 (home-page
4142 "https://github.com/PyCQA/pydocstyle/")
4143 (synopsis "Python docstring style checker")
4144 (description
4145 "This package provides a style checker for the Python Language
4146 Server (PLS).")
4147 (license license:expat)))
4148
4149 (define-public python-language-server
4150 (package
4151 (name "python-language-server")
4152 (version "0.36.1")
4153 (source
4154 (origin
4155 (method url-fetch)
4156 (uri (pypi-uri "python-language-server" version))
4157 (sha256
4158 (base32
4159 "0ljzc50z5v08is8fis1fg2dk9sb6275jlvzxb6nij0w6ys772pf8"))))
4160 (build-system python-build-system)
4161 (propagated-inputs
4162 `(("python-autopep8" ,python-autopep8)
4163 ("python-configparser" ,python-configparser)
4164 ("python-pydocstyle" ,python-pydocstyle)
4165 ("python-future" ,python-future)
4166 ("python-jedi" ,python-jedi)
4167 ("python-jsonrpc-server" ,python-jsonrpc-server)
4168 ("python-pluggy" ,python-pluggy)
4169 ("python-pycodestyle" ,python-pycodestyle)
4170 ("python-pyflakes" ,python-pyflakes)
4171 ("python-rope" ,python-rope)
4172 ("python-ujson" ,python-ujson)
4173 ("python-yapf" ,python-yapf)))
4174 (native-inputs
4175 `(("python-coverage" ,python-coverage)
4176 ("python-flaky" ,python-flaky)
4177 ("python-matplotlib" ,python-matplotlib)
4178 ("python-mock" ,python-mock)
4179 ("python-numpy" ,python-numpy)
4180 ("python-pandas" ,python-pandas)
4181 ("python-pylint" ,python-pylint)
4182 ("python-pytest" ,python-pytest)
4183 ("python-pytest-cov" ,python-pytest-cov)
4184 ("python-versioneer" ,python-versioneer)))
4185 (home-page "https://github.com/palantir/python-language-server")
4186 (synopsis "Python implementation of the Language Server Protocol")
4187 (description
4188 "The Python Language Server (pyls) is an implementation of the Python 3
4189 language specification for the Language Server Protocol (LSP). This tool is
4190 used in text editing environments to provide a complete and integrated
4191 feature-set for programming Python effectively.")
4192 (license license:expat)))
4193
4194 (define-public python-pathspec
4195 (package
4196 (name "python-pathspec")
4197 (version "0.7.0")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (pypi-uri "pathspec" version))
4202 (sha256
4203 (base32
4204 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4205 (build-system python-build-system)
4206 (home-page "https://github.com/cpburnz/python-path-specification")
4207 (synopsis "Utility library for gitignore style pattern matching of file paths")
4208 (description
4209 "This package provides a utility library for gitignore style pattern
4210 matching of file paths.")
4211 (license license:mpl2.0)))
4212
4213 (define-public python-black
4214 (package
4215 (name "python-black")
4216 (version "20.8b1")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (pypi-uri "black" version))
4221 (sha256
4222 (base32
4223 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4224 (build-system python-build-system)
4225 (arguments
4226 `(#:phases
4227 (modify-phases %standard-phases
4228 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4229 (lambda _
4230 (let ((python3 (which "python3")))
4231 (substitute* '("tests/data/fmtonoff.py"
4232 "tests/data/string_prefixes.py"
4233 "tests/data/function.py"
4234 "tests/data/python37.py")
4235 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4236 (string-append "#!" python3 (if (string? minor-version)
4237 minor-version
4238 "")))))
4239 #t))
4240 (add-after 'unpack 'disable-broken-tests
4241 (lambda* (#:key outputs inputs #:allow-other-keys)
4242 ;; Make installed package available for running the tests
4243 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4244 ":" (getenv "PATH")))
4245
4246 ;; These tests are supposed to be skipped when the blackd
4247 ;; dependencies are missing, but this doesn't quite work.
4248 (substitute* "tests/test_black.py"
4249 (("( *)class BlackDTestCase.*" match indent)
4250 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4251 indent "class BlackDTestCase(unittest.TestCase):\n"))
4252 (("web.Application") "False")
4253 (("@unittest_run_loop") ""))
4254
4255 ;; Patching the above file breaks the self test
4256 (substitute* "tests/test_black.py"
4257 (("( *)def test_self" match indent)
4258 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4259
4260 (substitute* "tests/test_black.py"
4261 (("( *)def test_python38" match indent)
4262 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4263 #t)))))
4264 (propagated-inputs
4265 `(("python-click" ,python-click)
4266 ("python-attrs" ,python-attrs)
4267 ("python-appdirs" ,python-appdirs)
4268 ("python-pathspec" ,python-pathspec)
4269 ("python-mypy-extensions" ,python-mypy-extensions)
4270 ("python-regex" ,python-regex)
4271 ("python-toml" ,python-toml)
4272 ("python-typed-ast" ,python-typed-ast)
4273 ("python-typing-extensions" ,python-typing-extensions)))
4274 (native-inputs
4275 `(("python-setuptools-scm" ,python-setuptools-scm)))
4276 (home-page "https://github.com/ambv/black")
4277 (synopsis "The uncompromising code formatter")
4278 (description "Black is the uncompromising Python code formatter.")
4279 (license license:expat)))
4280
4281 (define-public python-black-macchiato
4282 (package
4283 (name "python-black-macchiato")
4284 (version "1.3.0")
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (pypi-uri "black-macchiato" version))
4289 (sha256
4290 (base32
4291 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4292 (build-system python-build-system)
4293 (propagated-inputs
4294 `(("python-black" ,python-black)))
4295 (home-page "https://github.com/wbolster/black-macchiato")
4296 (synopsis "Partial @code{python-black} formatting")
4297 (description
4298 "This package is built on top the @{python-black} code formatter to
4299 enable formatting of partial files.")
4300 (license license:bsd-3)))
4301
4302 (define-public python-blinker
4303 (package
4304 (name "python-blinker")
4305 (version "1.4")
4306 (source
4307 (origin
4308 (method url-fetch)
4309 (uri (pypi-uri "blinker" version))
4310 (sha256
4311 (base32
4312 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4313 (build-system python-build-system)
4314 (home-page "https://pythonhosted.org/blinker/")
4315 (synopsis "Fast, simple object-to-object and broadcast signaling")
4316 (description
4317 "Blinker provides a fast dispatching system that allows any number of
4318 interested parties to subscribe to events, or \"signals\".")
4319 (license license:expat)))
4320
4321 (define-public python2-blinker
4322 (package-with-python2 python-blinker))
4323
4324 (define-public pelican
4325 (package
4326 (name "pelican")
4327 (version "4.2.0")
4328 (source
4329 (origin
4330 (method url-fetch)
4331 (uri (pypi-uri "pelican" version))
4332 (sha256
4333 (base32
4334 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4335 (build-system python-build-system)
4336 (propagated-inputs
4337 `(("python-blinker" ,python-blinker)
4338 ("python-dateutil" ,python-dateutil)
4339 ("python-docutils" ,python-docutils)
4340 ("python-feedgenerator" ,python-feedgenerator)
4341 ("python-jinja2" ,python-jinja2)
4342 ("python-markdown" ,python-markdown)
4343 ("python-pygments" ,python-pygments)
4344 ("python-pytz" ,python-pytz)
4345 ("python-six" ,python-six)
4346 ("python-unidecode" ,python-unidecode)))
4347 (home-page "https://getpelican.com/")
4348 (arguments
4349 `(;; XXX Requires a lot more packages to do unit tests :P
4350 #:tests? #f))
4351 (synopsis "Python-based static site publishing system")
4352 (description
4353 "Pelican is a tool to generate a static blog from reStructuredText,
4354 Markdown input files, and more. Pelican uses Jinja2 for templating
4355 and is very extensible.")
4356 (license license:agpl3+)))
4357
4358 (define-public mallard-ducktype
4359 (package
4360 (name "mallard-ducktype")
4361 (version "1.0.2")
4362 (source
4363 (origin
4364 (method git-fetch)
4365 ;; git-reference because tests are not included in pypi source tarball
4366 ;; https://issues.guix.gnu.org/issue/36755#2
4367 (uri (git-reference
4368 (url "https://github.com/projectmallard/mallard-ducktype")
4369 (commit version)))
4370 (file-name (git-file-name name version))
4371 (sha256
4372 (base32
4373 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4374 (build-system python-build-system)
4375 (arguments
4376 '(#:phases
4377 (modify-phases %standard-phases
4378 (replace 'check
4379 (lambda _
4380 (with-directory-excursion "tests"
4381 (invoke "sh" "runtests")))))))
4382 (home-page "http://projectmallard.org")
4383 (synopsis "Convert Ducktype to Mallard documentation markup")
4384 (description
4385 "Ducktype is a lightweight syntax that can represent all the semantics
4386 of the Mallard XML documentation system. Ducktype files can be converted to
4387 Mallard using the @command{ducktype} tool. The yelp-tools package
4388 provides additional functionality on the produced Mallard documents.")
4389 (license license:expat)))
4390
4391 (define-public python-cython
4392 (package
4393 (name "python-cython")
4394 (version "0.29.21")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (pypi-uri "Cython" version))
4399 (sha256
4400 (base32
4401 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4402 (build-system python-build-system)
4403 ;; we need the full python package and not just the python-wrapper
4404 ;; because we need libpython3.3m.so
4405 (inputs
4406 `(("python" ,python)))
4407 (arguments
4408 `(#:phases
4409 (modify-phases %standard-phases
4410 (add-before 'check 'set-HOME
4411 ;; some tests require access to "$HOME/.cython"
4412 (lambda _ (setenv "HOME" "/tmp") #t))
4413 (replace 'check
4414 (lambda _
4415 ;; Disable compiler optimizations to greatly reduce the running
4416 ;; time of the test suite.
4417 (setenv "CFLAGS" "-O0")
4418
4419 (invoke "python" "runtests.py" "-vv"
4420 "-j" (number->string (parallel-job-count))
4421 ;; XXX: On 32-bit architectures, running the parallel tests
4422 ;; fails on many-core systems, see
4423 ;; <https://github.com/cython/cython/issues/2807>.
4424 ,@(if (not (target-64bit?))
4425 '("-x" "run.parallel")
4426 '())))))))
4427 (home-page "https://cython.org/")
4428 (synopsis "C extensions for Python")
4429 (description "Cython is an optimising static compiler for both the Python
4430 programming language and the extended Cython programming language. It makes
4431 writing C extensions for Python as easy as Python itself.")
4432 (license license:asl2.0)
4433 (properties `((python2-variant . ,(delay python2-cython))))))
4434
4435 (define-public python2-cython
4436 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4437 (package
4438 (inherit base)
4439 (name "python2-cython")
4440 (inputs
4441 `(("python-2" ,python-2))) ;this is not automatically changed
4442 (arguments
4443 (substitute-keyword-arguments (package-arguments base)
4444 ((#:phases phases)
4445 `(modify-phases ,phases
4446 (add-before 'check 'adjust-test_embed
4447 (lambda _
4448 (substitute* "runtests.py"
4449 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4450 ;; so it can give the right -L flag to GCC when embedding static
4451 ;; builds of Python. It is unaware that the Python "config"
4452 ;; directory (where the static library lives) was renamed in
4453 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4454 ;; which works fine, because that is where the shared library is.
4455 ;;
4456 ;; It also appears to be unaware that the Makefile in Demos/embed
4457 ;; already unconditionally pass the static library location to GCC,
4458 ;; after checking sysconfig.get_config_var('LIBPL).
4459 ;;
4460 ;; The effect is that the linker is unable to resolve libexpat
4461 ;; symbols when building for Python 2, because neither the Python 2
4462 ;; shared library nor Expat is available. To fix it, we can either
4463 ;; add Expat as an input and make it visible to the linker, or just
4464 ;; prevent it from overriding the Python shared library location.
4465 ;; The end result is identical, so we take the easy route.
4466 ((" or libname not in os\\.listdir\\(libdir\\)")
4467 ""))
4468 #t)))))))))
4469
4470 ;; The RPython toolchain currently does not support Python 3.
4471 (define-public python2-rpython
4472 (package
4473 (name "python2-rpython")
4474 (version "0.2.1")
4475 (source
4476 (origin
4477 (method url-fetch)
4478 (uri (pypi-uri "rpython" version))
4479 (sha256
4480 (base32
4481 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4482 (build-system python-build-system)
4483 (arguments `(#:python ,python-2))
4484 (native-inputs
4485 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4486 (home-page "https://rpython.readthedocs.org")
4487 (synopsis "Framework for implementing interpreters and virtual machines")
4488 (description "RPython is a translation and support framework for
4489 producing implementations of dynamic languages, emphasizing a clean separation
4490 between language specification and implementation aspects.")
4491 (license license:expat)))
4492
4493 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4494 ;; python-scipy still build, as these three packages are often used together.
4495 (define-public python-numpy
4496 (package
4497 (name "python-numpy")
4498 (version "1.17.3")
4499 (source
4500 (origin
4501 (method url-fetch)
4502 (uri (string-append
4503 "https://github.com/numpy/numpy/releases/download/v"
4504 version "/numpy-" version ".tar.gz"))
4505 (sha256
4506 (base32
4507 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4508 (build-system python-build-system)
4509 (inputs
4510 `(("openblas" ,openblas)
4511 ("lapack" ,lapack)))
4512 (native-inputs
4513 `(("python-cython" ,python-cython)
4514 ("python-pytest" ,python-pytest)
4515 ("gfortran" ,gfortran)))
4516 (arguments
4517 `(#:phases
4518 (modify-phases %standard-phases
4519 (add-before 'build 'configure-blas-lapack
4520 (lambda* (#:key inputs #:allow-other-keys)
4521 (call-with-output-file "site.cfg"
4522 (lambda (port)
4523 (format port
4524 "[openblas]
4525 libraries = openblas
4526 library_dirs = ~a/lib
4527 include_dirs = ~a/include
4528
4529 # backslash-n to make emacs happy
4530 \n[lapack]
4531 lapack_libs = lapack
4532 library_dirs = ~a/lib
4533 include_dirs = ~a/include
4534 "
4535 (assoc-ref inputs "openblas")
4536 (assoc-ref inputs "openblas")
4537 (assoc-ref inputs "lapack")
4538 (assoc-ref inputs "lapack"))))
4539 #t))
4540 (add-before 'build 'fix-executable-paths
4541 (lambda* (#:key inputs #:allow-other-keys)
4542 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4543 ;; instead of /bin/sh.
4544 (substitute* "numpy/distutils/exec_command.py"
4545 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4546 (string-append match-start (assoc-ref inputs "bash") match-end)))
4547 ;; Use "gcc" executable, not "cc".
4548 (substitute* "numpy/distutils/system_info.py"
4549 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4550 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4551 #t))
4552 ;; Tests can only be run after the library has been installed and not
4553 ;; within the source directory.
4554 (delete 'check)
4555 (add-after 'install 'check
4556 (lambda* (#:key outputs inputs #:allow-other-keys)
4557 ;; Make installed package available for running the tests
4558 (add-installed-pythonpath inputs outputs)
4559 ;; Make sure "f2py" etc is found.
4560 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4561 ":" (getenv "PATH")))
4562 (with-directory-excursion "/tmp"
4563 (invoke "python" "-c"
4564 "import numpy; numpy.test(verbose=2)")))))))
4565 (home-page "https://numpy.org")
4566 (synopsis "Fundamental package for scientific computing with Python")
4567 (description "NumPy is the fundamental package for scientific computing
4568 with Python. It contains among other things: a powerful N-dimensional array
4569 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4570 and Fortran code, useful linear algebra, Fourier transform, and random number
4571 capabilities.")
4572 (properties `((python2-variant . ,(delay python2-numpy))))
4573 (license license:bsd-3)))
4574
4575 ;; Numpy 1.16.x are the last versions that support Python 2.
4576 (define-public python2-numpy
4577 (let ((numpy (package-with-python2
4578 (strip-python2-variant python-numpy))))
4579 (package/inherit
4580 numpy
4581 (version "1.16.5")
4582 (source (origin
4583 (method url-fetch)
4584 (uri (string-append
4585 "https://github.com/numpy/numpy/releases/download/v"
4586 version "/numpy-" version ".tar.gz"))
4587 (sha256
4588 (base32
4589 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4590
4591 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4592 ;; interest only for legacy code going back to NumPy's predecessor
4593 ;; Numeric.
4594 (define-public python2-numpy-1.8
4595 (package (inherit python2-numpy)
4596 (version "1.8.2")
4597 (source
4598 (origin
4599 (method git-fetch)
4600 (uri (git-reference
4601 (url "https://github.com/numpy/numpy")
4602 (commit (string-append "v" version))))
4603 (file-name (git-file-name "numpy" version))
4604 (sha256
4605 (base32
4606 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4607 (arguments
4608 (substitute-keyword-arguments (package-arguments python2-numpy)
4609 ((#:phases phases)
4610 `(modify-phases ,phases
4611 (replace 'configure-blas-lapack
4612 (lambda* (#:key inputs #:allow-other-keys)
4613 (call-with-output-file "site.cfg"
4614 (lambda (port)
4615 (format port
4616 "[openblas]
4617 libraries = openblas,lapack
4618 library_dirs = ~a/lib:~a/lib
4619 include_dirs = ~a/include:~a/include
4620 "
4621 (assoc-ref inputs "openblas")
4622 (assoc-ref inputs "lapack")
4623 (assoc-ref inputs "openblas")
4624 (assoc-ref inputs "lapack"))))
4625 #t))))))
4626 (native-inputs
4627 `(("python2-nose" ,python2-nose)))
4628 (description "NumPy is the fundamental package for scientific computing
4629 with Python. It contains among other things: a powerful N-dimensional array
4630 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4631 and Fortran code, useful linear algebra, Fourier transform, and random number
4632 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4633 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4634 Numeric.")
4635 (license license:bsd-3)))
4636
4637 (define-public python-munch
4638 (package
4639 (name "python-munch")
4640 (version "2.0.4")
4641 (source
4642 (origin
4643 (method url-fetch)
4644 (uri (pypi-uri "munch" version))
4645 (sha256
4646 (base32
4647 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4648 (build-system python-build-system)
4649 (home-page "https://github.com/Infinidat/munch")
4650 (synopsis "Dot-accessible dictionary")
4651 (description "Munch is a dot-accessible dictionary similar to JavaScript
4652 objects.")
4653 (license license:expat)))
4654
4655 (define-public python2-munch
4656 (package-with-python2 python-munch))
4657
4658 (define-public python-colormath
4659 (package
4660 (name "python-colormath")
4661 (version "3.0.0")
4662 (source
4663 (origin
4664 (method url-fetch)
4665 (uri (pypi-uri "colormath" version))
4666 (sha256
4667 (base32
4668 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4669 (build-system python-build-system)
4670 (propagated-inputs
4671 `(("python-networkx" ,python-networkx)
4672 ("python-numpy" ,python-numpy)))
4673 (home-page "https://github.com/gtaylor/python-colormath")
4674 (synopsis "Color math and conversion library")
4675 (description
4676 "This is a Python library for color math and conversions.")
4677 (license license:bsd-3)))
4678
4679 (define-public python2-colormath
4680 (package-with-python2 python-colormath))
4681
4682 (define-public python-spectra
4683 (package
4684 (name "python-spectra")
4685 (version "0.0.11")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "spectra" version))
4690 (sha256
4691 (base32
4692 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4693 (build-system python-build-system)
4694 (arguments
4695 `(#:phases
4696 (modify-phases %standard-phases
4697 (replace 'check
4698 (lambda _ (invoke "nosetests" "-v"))))))
4699 (propagated-inputs
4700 `(("python-colormath" ,python-colormath)))
4701 (native-inputs
4702 `(("python-nose" ,python-nose)))
4703 (home-page "https://github.com/jsvine/spectra")
4704 (synopsis "Color scales and color conversion")
4705 (description
4706 "This package provides a Python library intended to make color math,
4707 color scales, and color space conversion easy. It has support for:
4708
4709 @enumerate
4710 @item Color scales
4711 @item Color ranges
4712 @item Color blending
4713 @item Brightening/darkening colors
4714 @item Saturating/desaturating colors
4715 @item Conversion to/from multiple color spaces.
4716 @end enumerate\n")
4717 (license license:expat)))
4718
4719 (define-public python2-spectra
4720 (package-with-python2 python-spectra))
4721
4722 (define-public python-numpy-documentation
4723 (package
4724 (name "python-numpy-documentation")
4725 (version (package-version python-numpy))
4726 (source (package-source python-numpy))
4727 (build-system python-build-system)
4728 (native-inputs
4729 `(("python-matplotlib" ,python-matplotlib)
4730 ("python-numpy" ,python-numpy)
4731 ("pkg-config" ,pkg-config)
4732 ("python-sphinx" ,python-sphinx)
4733 ("python-numpydoc" ,python-numpydoc)
4734 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4735 texlive-fonts-ec
4736 texlive-generic-ifxetex
4737 texlive-generic-pdftex
4738 texlive-amsfonts
4739 texlive-latex-capt-of
4740 texlive-latex-cmap
4741 texlive-latex-environ
4742 texlive-latex-eqparbox
4743 texlive-latex-etoolbox
4744 texlive-latex-expdlist
4745 texlive-latex-fancyhdr
4746 texlive-latex-fancyvrb
4747 texlive-latex-fncychap
4748 texlive-latex-float
4749 texlive-latex-framed
4750 texlive-latex-geometry
4751 texlive-latex-graphics
4752 texlive-latex-hyperref
4753 texlive-latex-mdwtools
4754 texlive-latex-multirow
4755 texlive-latex-needspace
4756 texlive-latex-oberdiek
4757 texlive-latex-parskip
4758 texlive-latex-preview
4759 texlive-latex-tabulary
4760 texlive-latex-threeparttable
4761 texlive-latex-titlesec
4762 texlive-latex-trimspaces
4763 texlive-latex-ucs
4764 texlive-latex-upquote
4765 texlive-latex-url
4766 texlive-latex-varwidth
4767 texlive-latex-wrapfig)))
4768 ("texinfo" ,texinfo)
4769 ("perl" ,perl)
4770 ("scipy-sphinx-theme"
4771 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4772 (method git-fetch)
4773 (uri (git-reference
4774 (url "https://github.com/scipy/scipy-sphinx-theme")
4775 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4776 (sha256
4777 (base32
4778 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4779 ,@(package-native-inputs python-numpy)))
4780 (arguments
4781 `(#:tests? #f ; we're only generating the documentation
4782 #:phases
4783 (modify-phases %standard-phases
4784 (delete 'build)
4785 (replace 'install
4786 (lambda* (#:key inputs outputs #:allow-other-keys)
4787 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4788 (doc (string-append
4789 data "/doc/" ,name "-"
4790 ,(package-version python-numpy)))
4791 (info-reader (string-append data "/info"))
4792 (html (string-append doc "/html"))
4793 (scipy-sphinx-theme "scipy-sphinx-theme")
4794 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4795 (pyver ,(string-append "PYVER=")))
4796
4797 ;; FIXME: this is needed to for texlive-union to generate
4798 ;; fonts, which are not found.
4799 (setenv "HOME" "/tmp")
4800
4801 (with-directory-excursion "doc"
4802 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4803 (mkdir-p html)
4804 (invoke "make" "html" pyver)
4805 (invoke "make" "latex" "PAPER=a4" pyver)
4806 (invoke "make" "-C" "build/latex"
4807 "all-pdf" "PAPER=a4" pyver)
4808 ;; FIXME: Generation of the info file fails.
4809 ;; (invoke "make" "info" pyver)
4810 ;; (mkdir-p info)
4811 ;; (copy-file "build/texinfo/numpy.info"
4812 ;; (string-append info "/numpy.info"))
4813 (for-each (lambda (file)
4814 (copy-file (string-append "build/latex" file)
4815 (string-append doc file)))
4816 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4817 (with-directory-excursion "build/html"
4818 (for-each (lambda (file)
4819 (let* ((dir (dirname file))
4820 (tgt-dir (string-append html "/" dir)))
4821 (unless (equal? "." dir)
4822 (mkdir-p tgt-dir))
4823 (install-file file html)))
4824 (find-files "." ".*")))))
4825 #t)))))
4826 (home-page (package-home-page python-numpy))
4827 (synopsis "Documentation for the python-numpy package")
4828 (description (package-description python-numpy))
4829 (license (package-license python-numpy))))
4830
4831 (define-public python2-numpy-documentation
4832 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4833 (package
4834 (inherit numpy-documentation)
4835 (native-inputs `(("python2-functools32" ,python2-functools32)
4836 ,@(package-native-inputs numpy-documentation))))))
4837
4838 (define-public python-pygit2
4839 (package
4840 (name "python-pygit2")
4841 (version "1.1.0")
4842 (source
4843 (origin
4844 (method url-fetch)
4845 (uri (pypi-uri "pygit2" version))
4846 (sha256
4847 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4848 (build-system python-build-system)
4849 (arguments
4850 '(#:tests? #f)) ; tests don't run correctly in our environment
4851 (propagated-inputs
4852 `(("python-cached-property" ,python-cached-property)
4853 ("python-cffi" ,python-cffi)
4854 ("libgit2" ,libgit2)))
4855 (native-inputs
4856 `(("python-pytest" ,python-pytest)))
4857 (home-page "https://github.com/libgit2/pygit2")
4858 (synopsis "Python bindings for libgit2")
4859 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4860 library, libgit2 implements Git plumbing.")
4861 ;; GPL2.0 only, with linking exception.
4862 (license license:gpl2)))
4863
4864 (define-public python-patiencediff
4865 (package
4866 (name "python-patiencediff")
4867 (version "0.2.0")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (pypi-uri "patiencediff" version))
4872 (sha256
4873 (base32
4874 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4875 (build-system python-build-system)
4876 (home-page "https://www.breezy-vcs.org/")
4877 (synopsis "Python implementation of the patiencediff algorithm")
4878 (description
4879 "This package contains a Python implementation of the @code{patiencediff}
4880 algorithm. Patiencediff provides a good balance of performance, nice output for
4881 humans, and implementation simplicity.")
4882 (license license:gpl2)))
4883
4884 (define-public python-pyparsing
4885 (package
4886 (name "python-pyparsing")
4887 (version "2.4.6")
4888 (source
4889 (origin
4890 (method url-fetch)
4891 (uri (pypi-uri "pyparsing" version))
4892 (sha256
4893 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4894 (build-system python-build-system)
4895 (outputs '("out" "doc"))
4896 (arguments
4897 `(#:tests? #f ; no test target
4898 #:phases
4899 (modify-phases %standard-phases
4900 (add-after 'install 'install-doc
4901 (lambda* (#:key outputs #:allow-other-keys)
4902 (let* ((doc (string-append (assoc-ref outputs "doc")
4903 "/share/doc/" ,name "-" ,version))
4904 (html-doc (string-append doc "/html"))
4905 (examples (string-append doc "/examples")))
4906 (mkdir-p html-doc)
4907 (mkdir-p examples)
4908 (for-each
4909 (lambda (dir tgt)
4910 (map (lambda (file)
4911 (install-file file tgt))
4912 (find-files dir ".*")))
4913 (list "docs" "htmldoc" "examples")
4914 (list doc html-doc examples))
4915 #t))))))
4916 (home-page "https://github.com/pyparsing/pyparsing")
4917 (synopsis "Python parsing class library")
4918 (description
4919 "The pyparsing module is an alternative approach to creating and
4920 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4921 of regular expressions. The pyparsing module provides a library of classes
4922 that client code uses to construct the grammar directly in Python code.")
4923 (license license:expat)))
4924
4925 (define-public python2-pyparsing
4926 (package-with-python2 python-pyparsing))
4927
4928 (define-public python-pyparsing-2.4.7
4929 (package
4930 (inherit python-pyparsing)
4931 (version "2.4.7")
4932 (source
4933 (origin
4934 (method url-fetch)
4935 (uri (pypi-uri "pyparsing" version))
4936 (sha256
4937 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4938
4939 (define-public python-numpydoc
4940 (package
4941 (name "python-numpydoc")
4942 (version "0.8.0")
4943 (source
4944 (origin
4945 (method url-fetch)
4946 (uri (pypi-uri "numpydoc" version))
4947 (sha256
4948 (base32
4949 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4950 (build-system python-build-system)
4951 (propagated-inputs
4952 `(("python-sphinx" ,python-sphinx)))
4953 (native-inputs
4954 `(("python-nose" ,python-nose)))
4955 (home-page "https://pypi.org/project/numpydoc/")
4956 (synopsis
4957 "Numpy's Sphinx extensions")
4958 (description
4959 "Sphinx extension to support docstrings in Numpy format.")
4960 (license license:bsd-2)))
4961
4962 (define-public python2-numpydoc
4963 (package-with-python2 python-numpydoc))
4964
4965 (define-public python-numexpr
4966 (package
4967 (name "python-numexpr")
4968 (version "2.6.5")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "numexpr" version))
4973 (sha256
4974 (base32
4975 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4976 (build-system python-build-system)
4977 (arguments `(#:tests? #f)) ; no tests included
4978 (propagated-inputs
4979 `(("python-numpy" ,python-numpy)))
4980 (home-page "https://github.com/pydata/numexpr")
4981 (synopsis "Fast numerical expression evaluator for NumPy")
4982 (description
4983 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4984 expressions that operate on arrays are accelerated and use less memory than
4985 doing the same calculation in Python. In addition, its multi-threaded
4986 capabilities can make use of all your cores, which may accelerate
4987 computations, most specially if they are not memory-bounded (e.g. those using
4988 transcendental functions).")
4989 (license license:expat)))
4990
4991 (define-public python2-numexpr
4992 (package-with-python2 python-numexpr))
4993
4994 (define-public python-cycler
4995 (package
4996 (name "python-cycler")
4997 (version "0.10.0")
4998 (source (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "cycler" version))
5001 (sha256
5002 (base32
5003 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
5004 (build-system python-build-system)
5005 (arguments
5006 ;; XXX: The current version requires 'coveralls' which we don't have.
5007 ;; Enable this for the next release which uses 'python-pytest'.
5008 '(#:tests? #f))
5009 (propagated-inputs
5010 `(("python-six" ,python-six)))
5011 (home-page "http://matplotlib.org/cycler/")
5012 (synopsis "Composable keyword argument iterator")
5013 (description
5014 "When using @code{matplotlib} and plotting more than one line, it is
5015 common to want to be able to want to be able to cycle over one or more artist
5016 styles; but the plotting logic can quickly become involved.
5017 To address this and enable easy cycling over arbitrary @code{kwargs}, the
5018 @code{Cycler} class was developed.")
5019 (license license:bsd-3)))
5020
5021 (define-public python2-cycler
5022 (package-with-python2 python-cycler))
5023
5024 (define-public python-colorspacious
5025 (package
5026 (name "python-colorspacious")
5027 (version "1.1.2")
5028 (source
5029 (origin
5030 (method git-fetch)
5031 (uri (git-reference
5032 (url "https://github.com/njsmith/colorspacious")
5033 (commit (string-append "v" version))))
5034 (file-name (git-file-name name version))
5035 (sha256
5036 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
5037 (build-system python-build-system)
5038 (propagated-inputs
5039 `(("python-numpy" ,python-numpy)))
5040 (native-inputs
5041 `(("python-nose" ,python-nose)))
5042 (arguments
5043 `(#:phases
5044 (modify-phases %standard-phases
5045 (replace 'check
5046 (lambda _
5047 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
5048 (home-page "https://github.com/njsmith/colorspacious")
5049 (synopsis "Python library for colorspace conversions")
5050 (description "@code{colorspacious} is a Python library that lets you
5051 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
5052 (license license:expat)))
5053
5054 (define-public python2-colorspacious
5055 (package-with-python2 python-colorspacious))
5056
5057 (define-public python-matplotlib
5058 (package
5059 (name "python-matplotlib")
5060 (version "3.1.2")
5061 (source
5062 (origin
5063 (method url-fetch)
5064 (uri (pypi-uri "matplotlib" version))
5065 (sha256
5066 (base32
5067 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5068 (build-system python-build-system)
5069 (propagated-inputs ; the following packages are all needed at run time
5070 `(("python-cycler" ,python-cycler)
5071 ("python-kiwisolver" ,python-kiwisolver)
5072 ("python-pyparsing" ,python-pyparsing)
5073 ("python-pygobject" ,python-pygobject)
5074 ("gobject-introspection" ,gobject-introspection)
5075 ("python-tkinter" ,python "tk")
5076 ("python-dateutil" ,python-dateutil)
5077 ("python-numpy" ,python-numpy)
5078 ("python-pillow" ,python-pillow)
5079 ("python-pytz" ,python-pytz)
5080 ("python-six" ,python-six)
5081 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5082 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5083 ;; object. For this reason we need to import both libraries.
5084 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5085 ("python-pycairo" ,python-pycairo)
5086 ("python-cairocffi" ,python-cairocffi)))
5087 (inputs
5088 `(("libpng" ,libpng)
5089 ("freetype" ,freetype)
5090 ("cairo" ,cairo)
5091 ("glib" ,glib)
5092 ;; FIXME: Add backends when available.
5093 ;("python-wxpython" ,python-wxpython)
5094 ("tcl" ,tcl)
5095 ("tk" ,tk)))
5096 (native-inputs
5097 `(("pkg-config" ,pkg-config)
5098 ("python-pytest" ,python-pytest)
5099 ("python-mock" ,python-mock)
5100 ("unzip" ,unzip)
5101 ("jquery-ui"
5102 ,(origin
5103 (method url-fetch)
5104 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5105 (sha256
5106 (base32
5107 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5108 (arguments
5109 `(#:phases
5110 (modify-phases %standard-phases
5111 ;; XXX We disable all image comparison tests because we're using a
5112 ;; newer version of FreeType than matplotlib expects. This leads to
5113 ;; minor differences throughout the tests.
5114 (add-after 'unpack 'fix-and-disable-failing-tests
5115 (lambda _
5116 (substitute* (append (find-files "lib/matplotlib/tests/"
5117 "test_.*\\.py$")
5118 (find-files "lib/mpl_toolkits/tests"
5119 "test_.*\\.py$"))
5120 (("^from matplotlib" match)
5121 (string-append "import pytest\n" match))
5122 (("( *)@image_comparison" match indent)
5123 (string-append indent
5124 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5125 match)))
5126 (substitute* "lib/matplotlib/tests/test_animation.py"
5127 (("/bin/sh") (which "sh")))
5128 (for-each delete-file
5129 ;; test_normal_axes, test_get_tightbbox_polar
5130 '("lib/matplotlib/tests/test_axes.py"
5131 ;; We don't use the webagg backend and this test forces it.
5132 "lib/matplotlib/tests/test_backend_webagg.py"
5133 ;; test_outward_ticks
5134 "lib/matplotlib/tests/test_tightlayout.py"
5135 ;; test_hidden_axes fails with minor extent
5136 ;; differences, possibly due to the use of a
5137 ;; different version of FreeType.
5138 "lib/matplotlib/tests/test_constrainedlayout.py"
5139 ;; Fontconfig returns no fonts.
5140 "lib/matplotlib/tests/test_font_manager.py"))
5141 #t))
5142 (add-before 'install 'install-jquery-ui
5143 (lambda* (#:key outputs inputs #:allow-other-keys)
5144 (let ((dir (string-append (assoc-ref outputs "out")
5145 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5146 (mkdir-p dir)
5147 (invoke "unzip"
5148 (assoc-ref inputs "jquery-ui")
5149 "-d" dir))
5150 #t))
5151 (replace 'check
5152 (lambda* (#:key outputs inputs #:allow-other-keys)
5153 (add-installed-pythonpath inputs outputs)
5154 (invoke "python" "tests.py" "-v"
5155 "-m" "not network and not webagg")))
5156 (add-before 'build 'configure-environment
5157 (lambda* (#:key outputs inputs #:allow-other-keys)
5158 (let ((cairo (assoc-ref inputs "cairo")))
5159 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5160 ;; has not effect.
5161 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5162 (setenv "HOME" (getcwd))
5163 ;; Fix rounding errors when using the x87 FPU.
5164 (when (string-prefix? "i686" ,(%current-system))
5165 (setenv "CFLAGS" "-ffloat-store"))
5166 (call-with-output-file "setup.cfg"
5167 (lambda (port)
5168 (format port "[directories]~%
5169 basedirlist = ~a,~a~%
5170 [packages]~%
5171 tests = True~%"
5172 (assoc-ref inputs "tcl")
5173 (assoc-ref inputs "tk")))))
5174 #t)))))
5175 (home-page "https://matplotlib.org/")
5176 (synopsis "2D plotting library for Python")
5177 (description
5178 "Matplotlib is a Python 2D plotting library which produces publication
5179 quality figures in a variety of hardcopy formats and interactive environments
5180 across platforms. Matplotlib can be used in Python scripts, the python and
5181 ipython shell, web application servers, and six graphical user interface
5182 toolkits.")
5183 (license license:psfl)
5184 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5185
5186 (define-public python2-matplotlib
5187 (let ((matplotlib (package-with-python2
5188 (strip-python2-variant python-matplotlib))))
5189 (package (inherit matplotlib)
5190 (version "2.2.4")
5191 (source
5192 (origin
5193 (method url-fetch)
5194 (uri (pypi-uri "matplotlib" version))
5195 (sha256
5196 (base32
5197 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5198 (arguments
5199 (substitute-keyword-arguments (package-arguments matplotlib)
5200 ((#:phases phases)
5201 `(modify-phases ,phases
5202 (replace 'install-jquery-ui
5203 (lambda* (#:key outputs inputs #:allow-other-keys)
5204 (let ((dir (string-append (assoc-ref outputs "out")
5205 "/lib/python2.7/site-packages/"
5206 "matplotlib/backends/web_backend/")))
5207 (mkdir-p dir)
5208 (invoke "unzip"
5209 (assoc-ref inputs "jquery-ui")
5210 "-d" dir))
5211 #t))
5212 (delete 'fix-and-disable-failing-tests)
5213 (delete 'check))))) ; These tests weren't run the the past.
5214 ;; Make sure to use special packages for Python 2 instead
5215 ;; of those automatically rewritten by package-with-python2.
5216 (propagated-inputs
5217 `(("python2-pycairo" ,python2-pycairo)
5218 ("python2-backports-functools-lru-cache"
5219 ,python2-backports-functools-lru-cache)
5220 ("python2-functools32" ,python2-functools32)
5221 ("python2-pygobject-2" ,python2-pygobject-2)
5222 ("python2-subprocess32" ,python2-subprocess32)
5223 ("python2-tkinter" ,python-2 "tk")
5224 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5225 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5226
5227 (define-public python-matplotlib-documentation
5228 (package
5229 (name "python-matplotlib-documentation")
5230 (version (package-version python-matplotlib))
5231 (source (package-source python-matplotlib))
5232 (build-system python-build-system)
5233 (native-inputs
5234 `(("python-matplotlib" ,python-matplotlib)
5235 ("python-colorspacious" ,python-colorspacious)
5236 ("python-sphinx" ,python-sphinx)
5237 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5238 ("python-sphinx-gallery" ,python-sphinx-gallery)
5239 ("python-numpydoc" ,python-numpydoc)
5240 ("python-ipython" ,python-ipython)
5241 ("python-ipykernel" ,python-ipykernel)
5242 ("python-mock" ,python-mock)
5243 ("graphviz" ,graphviz)
5244 ("texlive" ,(texlive-union (list texlive-amsfonts
5245 texlive-latex-amsmath
5246 texlive-latex-enumitem
5247 texlive-latex-expdlist
5248 texlive-latex-geometry
5249 texlive-latex-preview
5250 texlive-latex-type1cm
5251 texlive-latex-ucs
5252
5253 texlive-generic-pdftex
5254
5255 texlive-fonts-ec
5256 texlive-fonts-adobe-times
5257 texlive-fonts-txfonts)))
5258 ("texinfo" ,texinfo)
5259 ,@(package-native-inputs python-matplotlib)))
5260 (arguments
5261 `(#:tests? #f ; we're only generating documentation
5262 #:phases
5263 (modify-phases %standard-phases
5264 ;; The tests in python-matplotlib are run after the install phase, so
5265 ;; we need to delete the extra phase here.
5266 (delete 'check)
5267 (replace 'build
5268 (lambda _
5269 (chdir "doc")
5270 (setenv "PYTHONPATH"
5271 (string-append (getenv "PYTHONPATH")
5272 ":" (getcwd) "/../examples/units"))
5273 (substitute* "conf.py"
5274 ;; Don't use git.
5275 (("^SHA = check_output.*")
5276 (string-append "SHA = \"" ,version "\"\n"))
5277 ;; Don't fetch intersphinx files from the Internet
5278 (("^explicit_order_folders" m)
5279 (string-append "intersphinx_mapping = {}\n" m))
5280 (("'sphinx.ext.intersphinx',") "")
5281 ;; Disable URL embedding which requires internet access.
5282 (("'https://docs.scipy.org/doc/numpy'") "None")
5283 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5284 (invoke "make"
5285 "SPHINXBUILD=sphinx-build"
5286 "SPHINXOPTS=" ; don't abort on warnings
5287 "html" "texinfo")))
5288 (replace 'install
5289 (lambda* (#:key inputs outputs #:allow-other-keys)
5290 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5291 (doc (string-append data "/doc/python-matplotlib-" ,version))
5292 (info (string-append data "/info"))
5293 (html (string-append doc "/html")))
5294 (mkdir-p html)
5295 (mkdir-p info)
5296 (copy-recursively "build/html" html)
5297 (symlink (string-append html "/_images")
5298 (string-append info "/matplotlib-figures"))
5299 (with-directory-excursion "build/texinfo"
5300 (substitute* "matplotlib.texi"
5301 (("@image\\{([^,]*)" all file)
5302 (string-append "@image{matplotlib-figures/" file)))
5303 (symlink (string-append html "/_images")
5304 "./matplotlib-figures")
5305 (invoke "makeinfo" "--no-split"
5306 "-o" "matplotlib.info" "matplotlib.texi"))
5307 (install-file "build/texinfo/matplotlib.info" info))
5308 #t)))))
5309 (home-page (package-home-page python-matplotlib))
5310 (synopsis "Documentation for the python-matplotlib package")
5311 (description (package-description python-matplotlib))
5312 (license (package-license python-matplotlib))))
5313
5314 (define-public python2-matplotlib-documentation
5315 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5316 (package
5317 (inherit parent)
5318 (native-inputs
5319 (alist-delete "python-sphinx-copybutton"
5320 (package-native-inputs parent))))))
5321
5322 (define-public python-matplotlib-venn
5323 (package
5324 (name "python-matplotlib-venn")
5325 (version "0.11.5")
5326 (source
5327 (origin
5328 (method url-fetch)
5329 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5330 (sha256
5331 (base32
5332 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5333 (build-system python-build-system)
5334 (arguments '(#:tests? #f)) ; tests are not included
5335 (propagated-inputs
5336 `(("python-matplotlib" ,python-matplotlib)
5337 ("python-numpy" ,python-numpy)
5338 ("python-scipy" ,python-scipy)))
5339 (native-inputs
5340 `(("unzip" ,unzip)))
5341 (home-page "https://github.com/konstantint/matplotlib-venn")
5342 (synopsis "Plot area-proportional Venn diagrams")
5343 (description
5344 "This package provides tools for plotting area-proportional two- and
5345 three-way Venn diagrams in @code{matplotlib}.")
5346 (license license:expat)))
5347
5348 (define-public python-pysnptools
5349 (package
5350 (name "python-pysnptools")
5351 (version "0.4.11")
5352 (source
5353 (origin
5354 (method url-fetch)
5355 (uri (pypi-uri "pysnptools" version))
5356 (sha256
5357 (base32
5358 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5359 (build-system python-build-system)
5360 (arguments
5361 `(#:tests? #f ; no test data are included
5362 #:phases
5363 (modify-phases %standard-phases
5364 (replace 'check
5365 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5366 (if tests?
5367 (begin
5368 (add-installed-pythonpath inputs outputs)
5369 (invoke "python3" "pysnptools/test.py"))
5370 #t))))))
5371 (propagated-inputs
5372 `(("python-dill" ,python-dill)
5373 ("python-h5py" ,python-h5py)
5374 ("python-numpy" ,python-numpy)
5375 ("python-pandas" ,python-pandas)
5376 ("python-psutil" ,python-psutil)
5377 ("python-scipy" ,python-scipy)))
5378 (native-inputs
5379 `(("python-cython" ,python-cython)))
5380 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5381 (synopsis "Library for reading and manipulating genetic data")
5382 (description
5383 "PySnpTools is a library for reading and manipulating genetic data. It
5384 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5385 those files. It can also efficiently manipulate ranges of integers using set
5386 operators such as union, intersection, and difference.")
5387 (license license:asl2.0)))
5388
5389 (define-public python2-pysnptools
5390 (package-with-python2 python-pysnptools))
5391
5392 (define-public python-wurlitzer
5393 (package
5394 (name "python-wurlitzer")
5395 (version "2.0.1")
5396 (source
5397 (origin
5398 (method url-fetch)
5399 (uri (pypi-uri "wurlitzer" version))
5400 (sha256
5401 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5402 (build-system python-build-system)
5403 (arguments
5404 '(#:phases
5405 (modify-phases %standard-phases
5406 (replace 'check
5407 (lambda _
5408 (invoke "pytest" "-vv" "test.py"))))))
5409 (native-inputs
5410 `(("python-mock" ,python-mock)
5411 ("python-pytest" ,python-pytest)))
5412 (home-page "https://github.com/minrk/wurlitzer")
5413 (synopsis "Capture C-level output in context managers")
5414 (description
5415 "This library helps to redirect @code{sys.stdout} to a stream or a file
5416 while executing some piece of code, including C code running within a Python
5417 process.")
5418 (license license:expat)))
5419
5420 (define-public python-socksipy-branch
5421 (package
5422 (name "python-socksipy-branch")
5423 (version "1.01")
5424 (source
5425 (origin
5426 (method url-fetch)
5427 (uri (pypi-uri "SocksiPy-branch" version))
5428 (sha256
5429 (base32
5430 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5431 (build-system python-build-system)
5432 (arguments
5433 `(#:tests? #f)) ; There are no tests
5434 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5435 (synopsis "Python SOCKS module")
5436 (description
5437 "SocksiPy - A Python SOCKS client module. It provides a
5438 socket-like interface that supports connections to any TCP
5439 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5440 The original version was developed by Dan Haim, this is a
5441 branch created by Mario Vilas to address some open issues,
5442 as the original project seems to have been abandoned circa 2007.")
5443 (license license:bsd-3)))
5444
5445 (define-public python2-socksipy-branch
5446 (package-with-python2 python-socksipy-branch))
5447
5448 (define-public python-socksipychain
5449 (package
5450 (name "python-socksipychain")
5451 (version "2.1.2")
5452 (source
5453 (origin
5454 (method git-fetch)
5455 (uri (git-reference
5456 (url "https://github.com/pagekite/PySocksipyChain")
5457 (commit (string-append "v" version))))
5458 (file-name (git-file-name name version))
5459 (sha256
5460 (base32
5461 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5462 (build-system python-build-system)
5463 (arguments
5464 `(#:tests? #f)) ; Tests try to access the network.
5465 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5466 (synopsis "Python SOCKS module with chained proxies support")
5467 (description
5468 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5469 adds support for arbitrary chaining of proxy servers and various modes of
5470 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5471 a simple netcat replacement with chaining support.")
5472 (license license:bsd-3)))
5473
5474 (define-public python-pycodestyle
5475 (package
5476 (name "python-pycodestyle")
5477 (version "2.6.0")
5478 (source
5479 (origin
5480 (method url-fetch)
5481 (uri (pypi-uri "pycodestyle" version))
5482 (sha256
5483 (base32
5484 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5485 (build-system python-build-system)
5486 (arguments
5487 `(#:phases
5488 (modify-phases %standard-phases
5489 (replace 'check
5490 (lambda _
5491 (invoke "pytest" "-vv"))))))
5492 (native-inputs
5493 `(("python-pytest" ,python-pytest)))
5494 (home-page "https://pycodestyle.readthedocs.io/")
5495 (synopsis "Python style guide checker")
5496 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5497 Python code against some of the style conventions in
5498 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5499 (license license:expat)))
5500
5501 (define-public python2-pycodestyle
5502 (package-with-python2 python-pycodestyle))
5503
5504 (define-public python-multidict
5505 (package
5506 (name "python-multidict")
5507 (version "4.7.5")
5508 (source
5509 (origin
5510 (method url-fetch)
5511 (uri (pypi-uri "multidict" version))
5512 (sha256
5513 (base32
5514 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5515 (build-system python-build-system)
5516 (arguments
5517 '(#:modules ((ice-9 ftw)
5518 (srfi srfi-1)
5519 (srfi srfi-26)
5520 (guix build utils)
5521 (guix build python-build-system))
5522 #:phases (modify-phases %standard-phases
5523 (replace 'check
5524 (lambda* (#:key tests? #:allow-other-keys)
5525 (if tests?
5526 (begin
5527 (let ((libdir (find (cut string-prefix? "lib." <>)
5528 (scandir "build"))))
5529 (setenv "PYTHONPATH"
5530 (string-append "./build/" libdir ":"
5531 (getenv "PYTHONPATH")))
5532 (invoke "pytest" "-vv")))
5533 (format #t "test suite not run~%"))
5534 #t)))))
5535 (native-inputs
5536 `(("python-pytest" ,python-pytest)
5537 ("python-pytest-cov" ,python-pytest-cov)))
5538 (home-page "https://github.com/aio-libs/multidict/")
5539 (synopsis "Multidict implementation")
5540 (description "Multidict is dict-like collection of key-value pairs
5541 where key might be occurred more than once in the container.")
5542 (license license:asl2.0)))
5543
5544 (define-public python-orderedmultidict
5545 (package
5546 (name "python-orderedmultidict")
5547 (version "1.0")
5548 (source
5549 (origin
5550 (method url-fetch)
5551 (uri (pypi-uri "orderedmultidict" version))
5552 (sha256
5553 (base32
5554 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5555 (build-system python-build-system)
5556 (arguments
5557 `(#:phases
5558 (modify-phases %standard-phases
5559 (add-after 'unpack 'fix-tests
5560 (lambda _
5561 ;; The package uses nosetest for running the tests.
5562 ;; Adding this initfile allows to run the test suite
5563 ;; without requiring nosetest.
5564 (with-output-to-file "tests/__init__.py" newline)
5565 #t)))))
5566 (propagated-inputs
5567 `(("python-six" ,python-six)))
5568 (native-inputs
5569 `(("python-pycodestyle" ,python-pycodestyle)))
5570 (home-page "https://github.com/gruns/orderedmultidict")
5571 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5572 (description "This package contains a library for ordered multivalue
5573 dictionaries. A multivalue dictionary is a dictionary that can store
5574 multiple values for the same key. An ordered multivalue dictionary is a
5575 multivalue dictionary that retains the order of insertions and deletions.")
5576 (license license:unlicense)))
5577
5578 (define-public python2-orderedmultidict
5579 (package-with-python2 python-orderedmultidict))
5580
5581 (define-public python-autopep8
5582 (package
5583 (name "python-autopep8")
5584 (version "1.5.3")
5585 (source
5586 (origin
5587 (method url-fetch)
5588 (uri (pypi-uri "autopep8" version))
5589 (sha256
5590 (base32
5591 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5592 (build-system python-build-system)
5593 (propagated-inputs
5594 `(("python-pycodestyle" ,python-pycodestyle)
5595 ("python-toml" ,python-toml)))
5596 (home-page "https://github.com/hhatto/autopep8")
5597 (synopsis "Format Python code according to the PEP 8 style guide")
5598 (description
5599 "@code{autopep8} automatically formats Python code to conform to
5600 the PEP 8 style guide. It uses the pycodestyle utility to determine
5601 what parts of the code needs to be formatted. @code{autopep8} is
5602 capable of fixing most of the formatting issues that can be reported
5603 by pycodestyle.")
5604 (license (license:non-copyleft
5605 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5606
5607 (define-public python2-autopep8
5608 (package-with-python2 python-autopep8))
5609
5610 (define-public python-distlib
5611 (package
5612 (name "python-distlib")
5613 (version "0.3.0")
5614 (source
5615 (origin
5616 (method url-fetch)
5617 (uri (pypi-uri "distlib" version ".zip"))
5618 (sha256
5619 (base32
5620 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5621 (build-system python-build-system)
5622 (arguments
5623 `(#:phases
5624 (modify-phases %standard-phases
5625 (add-before 'build 'no-/bin/sh
5626 (lambda _
5627 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5628 (("/bin/sh") (which "sh")))
5629 #t))
5630 (add-before 'check 'prepare-test-env
5631 (lambda _
5632 (setenv "HOME" "/tmp")
5633 ;; NOTE: Any value works, the variable just has to be present.
5634 (setenv "SKIP_ONLINE" "1")
5635 #t)))))
5636 (native-inputs `(("unzip" ,unzip)))
5637 (home-page "https://bitbucket.org/pypa/distlib")
5638 (synopsis "Distribution utilities")
5639 (description "Distlib is a library which implements low-level functions that
5640 relate to packaging and distribution of Python software. It is intended to be
5641 used as the basis for third-party packaging tools.")
5642 (license license:psfl)))
5643
5644 ;; TODO: Merge with 'python-distlib' on the next rebuild cycle.
5645 (define-public python-distlib/next
5646 (package
5647 (inherit python-distlib)
5648 (version "0.3.1")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "distlib" version ".zip"))
5653 (sha256
5654 (base32
5655 "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))))
5656
5657 (define-public python-distutils-extra
5658 (package
5659 (name "python-distutils-extra")
5660 (version "2.38")
5661 (source
5662 (origin
5663 (method url-fetch)
5664 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5665 version "/+download/python-distutils-extra-"
5666 version ".tar.gz"))
5667 (sha256
5668 (base32
5669 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5670 (build-system python-build-system)
5671 (home-page "https://launchpad.net/python-distutils-extra/")
5672 (synopsis "Enhancements to Python's distutils")
5673 (description
5674 "The python-distutils-extra module enables you to easily integrate
5675 gettext support, themed icons, and scrollkeeper-based documentation into
5676 Python's distutils.")
5677 (license license:gpl2)))
5678
5679 (define-public python2-distutils-extra
5680 (package-with-python2 python-distutils-extra))
5681
5682 (define-public python2-elib.intl
5683 (package
5684 (name "python2-elib.intl")
5685 (version "0.0.3")
5686 (source
5687 (origin
5688 ;; This project doesn't tag releases or publish tarballs, so we take
5689 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5690 (method git-fetch)
5691 (uri (git-reference
5692 (url "https://github.com/dieterv/elib.intl")
5693 (commit "d09997cfef")))
5694 (file-name (string-append name "-" version "-checkout"))
5695 (sha256
5696 (base32
5697 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5698 (build-system python-build-system)
5699 (arguments
5700 ;; incompatible with Python 3 (exception syntax)
5701 `(#:python ,python-2
5702 #:tests? #f))
5703 (home-page "https://github.com/dieterv/elib.intl")
5704 (synopsis "Enhanced internationalization for Python")
5705 (description
5706 "The elib.intl module provides enhanced internationalization (I18N)
5707 services for your Python modules and applications.")
5708 (license license:lgpl3+)))
5709
5710 (define-public python-olefile
5711 (package
5712 (name "python-olefile")
5713 (version "0.46")
5714 (source
5715 (origin
5716 (method url-fetch)
5717 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5718 "download/v" version "/olefile-" version ".tar.gz"))
5719 (file-name (string-append name "-" version ".tar.gz"))
5720 (sha256
5721 (base32
5722 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5723 (build-system python-build-system)
5724 (home-page "https://www.decalage.info/python/olefileio")
5725 (synopsis "Read and write Microsoft OLE2 files.")
5726 (description
5727 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5728 Storage or Compound Document, Microsoft Office). It is an improved version of
5729 the OleFileIO module from PIL, the Python Image Library.")
5730 (license license:bsd-3)))
5731
5732 (define-public python2-olefile
5733 (package-with-python2 python-olefile))
5734
5735 (define-public python-pillow
5736 (package
5737 (name "python-pillow")
5738 (version "8.0.1")
5739 (source
5740 (origin
5741 (method url-fetch)
5742 (uri (pypi-uri "Pillow" version))
5743 (sha256
5744 (base32
5745 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5746 (build-system python-build-system)
5747 (native-inputs
5748 `(("python-pytest" ,python-pytest)))
5749 (inputs
5750 `(("freetype" ,freetype)
5751 ("lcms" ,lcms)
5752 ("libjpeg" ,libjpeg-turbo)
5753 ("libtiff" ,libtiff)
5754 ("libwebp" ,libwebp)
5755 ("openjpeg" ,openjpeg)
5756 ("zlib" ,zlib)))
5757 (propagated-inputs
5758 `(("python-olefile" ,python-olefile)))
5759 (arguments
5760 `(#:phases
5761 (modify-phases %standard-phases
5762 (add-after 'unpack 'patch-ldconfig
5763 (lambda _
5764 (substitute* "setup.py"
5765 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5766 (replace 'check
5767 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5768 (if tests?
5769 (begin
5770 (setenv "HOME" (getcwd))
5771 ;; Make installed package available for running the tests.
5772 (add-installed-pythonpath inputs outputs)
5773 (invoke "python" "selftest.py" "--installed")
5774 (invoke "python" "-m" "pytest" "-vv"))
5775 #t))))))
5776 (home-page "https://python-pillow.org")
5777 (synopsis "Fork of the Python Imaging Library")
5778 (description
5779 "The Python Imaging Library adds image processing capabilities to your
5780 Python interpreter. This library provides extensive file format support, an
5781 efficient internal representation, and fairly powerful image processing
5782 capabilities. The core image library is designed for fast access to data
5783 stored in a few basic pixel formats. It should provide a solid foundation for
5784 a general image processing tool.")
5785 (properties `((python2-variant . ,(delay python2-pillow))))
5786 (license (license:x11-style
5787 "http://www.pythonware.com/products/pil/license.htm"
5788 "The PIL Software License"))))
5789
5790 (define-public python2-pillow
5791 (package-with-python2
5792 (package
5793 (inherit (strip-python2-variant python-pillow))
5794 ;; Version 6 is the last series with Python 2 support.
5795 (version "6.2.2")
5796 (source
5797 (origin
5798 (method url-fetch)
5799 (uri (pypi-uri "Pillow" version))
5800 (sha256
5801 (base32
5802 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5803
5804 (define-public python-pillow-2.9
5805 (package
5806 (inherit python-pillow)
5807 (version "2.9.0")
5808 (source
5809 (origin
5810 (method url-fetch)
5811 (uri (pypi-uri "Pillow" version))
5812 (sha256
5813 (base32
5814 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5815 (arguments
5816 (substitute-keyword-arguments (package-arguments python-pillow)
5817 ((#:tests? _ #f) #f)))
5818 (properties '((hidden? #t)))))
5819
5820 (define-public python-roifile
5821 (package
5822 (name "python-roifile")
5823 (version "2020.5.28")
5824 (source
5825 (origin
5826 (method url-fetch)
5827 (uri (pypi-uri "roifile" version))
5828 (sha256
5829 (base32
5830 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5831 (build-system python-build-system)
5832 (arguments `(#:tests? #f)) ; there are none
5833 (propagated-inputs
5834 `(("python-numpy" ,python-numpy)))
5835 (home-page "https://www.lfd.uci.edu/~gohlke/")
5836 (synopsis "Read and write ImageJ ROI format")
5837 (description "Roifile is a Python library to read, write, create, and plot
5838 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5839 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5840 (license license:bsd-3)))
5841
5842 (define-public python-tifffile
5843 (package
5844 (name "python-tifffile")
5845 (version "2020.6.3")
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (pypi-uri "tifffile" version))
5850 (sha256
5851 (base32
5852 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5853 (build-system python-build-system)
5854 ;; Tests require lfdfiles, which depends on tifffile
5855 (arguments `(#:tests? #f))
5856 (propagated-inputs
5857 `(("python-numpy" ,python-numpy)
5858 ;;("python-lfdfiles" ,python-lfdfiles)
5859 ("python-roifile" ,python-roifile)))
5860 (home-page "https://www.lfd.uci.edu/~gohlke/")
5861 (synopsis "Read and write TIFF(r) files")
5862 (description "This package lets you read image and metadata from many
5863 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5864 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5865 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5866 (license license:bsd-3)))
5867
5868 (define-public python-lfdfiles
5869 (package
5870 (name "python-lfdfiles")
5871 (version "2020.1.1")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "lfdfiles" version))
5876 (sha256
5877 (base32
5878 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5879 (build-system python-build-system)
5880 (propagated-inputs
5881 `(("python-click" ,python-click)
5882 ("python-numpy" ,python-numpy)
5883 ("python-tifffile" ,python-tifffile)))
5884 (home-page "https://www.lfd.uci.edu/~gohlke/")
5885 (synopsis "Work with LFD data files")
5886 (description
5887 "Lfdfiles is a Python library and console script for reading, writing,
5888 converting, and viewing many of the proprietary file formats used to store
5889 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5890 (license license:bsd-3)))
5891
5892 (define-public python-imageio
5893 (package
5894 (name "python-imageio")
5895 (version "2.8.0")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "imageio" version))
5900 (sha256
5901 (base32
5902 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5903 (build-system python-build-system)
5904 (arguments
5905 `(#:tests? #f ; many tests require online data
5906 #:phases
5907 (modify-phases %standard-phases
5908 (replace 'check
5909 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5910 (if tests?
5911 (begin
5912 ;; Make installed package available for running the tests.
5913 (add-installed-pythonpath inputs outputs)
5914 (invoke "pytest" "-vv"))
5915 #t))))))
5916 (propagated-inputs
5917 `(("python-numpy" ,python-numpy)
5918 ("python-pillow" ,python-pillow)
5919 ("python-psutil" ,python-psutil)))
5920 (native-inputs
5921 `(("python-pytest" ,python-pytest)))
5922 (home-page "https://imageio.github.io/")
5923 (synopsis "Library for reading and writing a wide range of image data")
5924 (description
5925 "Imageio is a Python library that provides an easy interface to read and
5926 write a wide range of image data, including animated images, video, volumetric
5927 data, and scientific formats.")
5928 (license license:bsd-2)))
5929
5930 (define-public python-pycparser
5931 (package
5932 (name "python-pycparser")
5933 (version "2.20")
5934 (source
5935 (origin
5936 (method url-fetch)
5937 (uri (pypi-uri "pycparser" version))
5938 (sha256
5939 (base32
5940 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5941 (outputs '("out" "doc"))
5942 (build-system python-build-system)
5943 (native-inputs
5944 `(("pkg-config" ,pkg-config)))
5945 (arguments
5946 `(#:phases
5947 (modify-phases %standard-phases
5948 (replace 'check
5949 (lambda _
5950 (with-directory-excursion "tests"
5951 (invoke "python" "all_tests.py"))
5952 #t))
5953 (add-after 'install 'install-doc
5954 (lambda* (#:key outputs #:allow-other-keys)
5955 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5956 (doc (string-append data "/doc/" ,name "-" ,version))
5957 (examples (string-append doc "/examples")))
5958 (mkdir-p examples)
5959 (for-each (lambda (file)
5960 (copy-file (string-append "." file)
5961 (string-append doc file)))
5962 '("/README.rst" "/CHANGES" "/LICENSE"))
5963 (copy-recursively "examples" examples)
5964 #t))))))
5965 (home-page "https://github.com/eliben/pycparser")
5966 (synopsis "C parser in Python")
5967 (description
5968 "Pycparser is a complete parser of the C language, written in pure Python
5969 using the PLY parsing library. It parses C code into an AST and can serve as
5970 a front-end for C compilers or analysis tools.")
5971 (license license:bsd-3)))
5972
5973 (define-public python2-pycparser
5974 (package-with-python2 python-pycparser))
5975
5976 (define-public python-xlsxwriter
5977 (package
5978 (name "python-xlsxwriter")
5979 (version "1.3.7")
5980 (source
5981 (origin
5982 ;; There are no tests in the PyPI tarball.
5983 (method git-fetch)
5984 (uri (git-reference
5985 (url "https://github.com/jmcnamara/XlsxWriter")
5986 (commit (string-append "RELEASE_" version))))
5987 (file-name (git-file-name name version))
5988 (sha256
5989 (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
5990 (build-system python-build-system)
5991 (home-page "https://github.com/jmcnamara/XlsxWriter")
5992 (synopsis "Python module for creating Excel XLSX files")
5993 (description
5994 "XlsxWriter is a Python module that can be used to write text, numbers,
5995 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
5996 (license license:bsd-2)))
5997
5998 (define-public python-pywavelets
5999 (package
6000 (name "python-pywavelets")
6001 (version "1.1.1")
6002 (home-page "https://github.com/PyWavelets/pywt")
6003 (source (origin
6004 (method url-fetch)
6005 (uri (pypi-uri "PyWavelets" version))
6006 (sha256
6007 (base32
6008 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
6009 (build-system python-build-system)
6010 (arguments
6011 '(#:modules ((ice-9 ftw)
6012 (srfi srfi-1)
6013 (srfi srfi-26)
6014 (guix build utils)
6015 (guix build python-build-system))
6016 #:phases
6017 (modify-phases %standard-phases
6018 (replace 'check
6019 (lambda _
6020 (let ((cwd (getcwd))
6021 (libdir (find (cut string-prefix? "lib." <>)
6022 (scandir "build"))))
6023 (with-directory-excursion (string-append cwd "/build/" libdir)
6024 (invoke "pytest" "-vv"))))))))
6025 (native-inputs
6026 `(("python-matplotlib" ,python-matplotlib) ;for tests
6027 ("python-pytest" ,python-pytest)))
6028 (propagated-inputs
6029 `(("python-numpy" ,python-numpy)))
6030 (synopsis "Wavelet transforms in Python")
6031 (description
6032 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
6033 mathematical basis functions that are localized in both time and frequency.
6034 Wavelet transforms are time-frequency transforms employing wavelets. They are
6035 similar to Fourier transforms, the difference being that Fourier transforms are
6036 localized only in frequency instead of in time and frequency.")
6037 (license license:expat)))
6038
6039 (define-public python-pywinrm
6040 (package
6041 (name "python-pywinrm")
6042 (version "0.4.1")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (pypi-uri "pywinrm" version))
6047 (sha256
6048 (base32
6049 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
6050 (build-system python-build-system)
6051 (propagated-inputs
6052 `(("python-six" ,python-six)
6053 ("python-requests_ntlm" ,python-requests_ntlm)
6054 ("python-xmltodict" ,python-xmltodict)
6055 ("python-kerberos" ,python-kerberos)))
6056 (native-inputs
6057 `(("python-mock" ,python-mock)
6058 ("python-pytest" ,python-pytest)))
6059 (home-page "https://github.com/diyan/pywinrm/")
6060 (synopsis
6061 "Python library for Windows Remote Management (WinRM)")
6062 (description
6063 "pywinrm is a Python client for the Windows Remote Management (WinRM)
6064 service. It allows you to invoke commands on target Windows machines from
6065 any machine that can run Python.")
6066 (license license:expat)))
6067
6068 (define-public python-xcffib
6069 (package
6070 (name "python-xcffib")
6071 (version "0.6.0")
6072 (source
6073 (origin
6074 (method url-fetch)
6075 (uri (pypi-uri "xcffib" version))
6076 (sha256
6077 (base32
6078 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
6079 (build-system python-build-system)
6080 (inputs
6081 `(("libxcb" ,libxcb)))
6082 (propagated-inputs
6083 `(("python-cffi" ,python-cffi) ; used at run time
6084 ("python-six" ,python-six)))
6085 (arguments
6086 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
6087 #:tests? #f
6088 #:phases
6089 (modify-phases %standard-phases
6090 (add-after 'unpack 'fix-libxcb-path
6091 (lambda* (#:key inputs #:allow-other-keys)
6092 (let ((libxcb (assoc-ref inputs "libxcb")))
6093 (substitute* '("xcffib/__init__.py")
6094 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6095 #t)))
6096 (add-after 'install 'install-doc
6097 (lambda* (#:key outputs #:allow-other-keys)
6098 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6099 "/doc/" ,name "-" ,version)))
6100 (mkdir-p doc)
6101 (copy-file "README.md"
6102 (string-append doc "/README.md"))
6103 #t))))))
6104 (home-page "https://github.com/tych0/xcffib")
6105 (synopsis "XCB Python bindings")
6106 (description
6107 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6108 support for Python 3 and PyPy. It is based on cffi.")
6109 (license license:expat)))
6110
6111 (define-public python2-xcffib
6112 (package-with-python2 python-xcffib))
6113
6114 (define-public python-cairocffi
6115 (package
6116 (name "python-cairocffi")
6117 (version "1.2.0")
6118 (source
6119 (origin
6120 ;; The PyPI archive does not include the documentation, so use Git.
6121 (method git-fetch)
6122 (uri (git-reference
6123 (url "https://github.com/Kozea/cairocffi")
6124 (commit (string-append "v" version))))
6125 (file-name (git-file-name name version))
6126 (sha256
6127 (base32
6128 "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
6129 (build-system python-build-system)
6130 (outputs '("out" "doc"))
6131 (inputs
6132 `(("glib" ,glib)
6133 ("gtk+" ,gtk+)
6134 ("gdk-pixbuf" ,gdk-pixbuf)
6135 ("cairo" ,cairo)))
6136 (native-inputs
6137 `(("python-numpy" ,python-numpy)
6138 ("python-pytest" ,python-pytest)
6139 ("python-pytest-cov" ,python-pytest-cov)
6140 ("python-pytest-runner" ,python-pytest-runner)
6141 ("python-sphinx" ,python-sphinx)
6142 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
6143 (propagated-inputs
6144 `(("python-xcffib" ,python-xcffib))) ; used at run time
6145 (arguments
6146 `(#:phases
6147 (modify-phases %standard-phases
6148 (add-after 'unpack 'patch-paths
6149 (lambda* (#:key inputs #:allow-other-keys)
6150 (substitute* "cairocffi/__init__.py"
6151 ;; Hack the dynamic library loading mechanism.
6152 (("find_library\\(library_name\\)")
6153 "\"found\"")
6154 (("filenames = \\(library_filename,\\) \\+ filenames")
6155 "pass")
6156 (("libcairo.so.2")
6157 (string-append (assoc-ref inputs "cairo")
6158 "/lib/libcairo.so.2")))
6159 (substitute* "cairocffi/pixbuf.py"
6160 (("libgdk_pixbuf-2.0.so.0")
6161 (string-append (assoc-ref inputs "gdk-pixbuf")
6162 "/lib/libgdk_pixbuf-2.0.so.0"))
6163 (("libgobject-2.0.so.0")
6164 (string-append (assoc-ref inputs "glib")
6165 "/lib/libgobject-2.0.so.0"))
6166 (("libglib-2.0.so.0")
6167 (string-append (assoc-ref inputs "glib")
6168 "/lib/libglib-2.0.so.0"))
6169 (("libgdk-3.so.0")
6170 (string-append (assoc-ref inputs "gtk+")
6171 "/lib/libgdk-3.so.0")))
6172 #t))
6173 (add-after 'unpack 'disable-linters
6174 ;; Their check fails; none of our business.
6175 (lambda _
6176 (substitute* "setup.cfg"
6177 ((".*pytest-flake8.*") "")
6178 ((".*pytest-isort.*") "")
6179 (("--flake8") "")
6180 (("--isort") ""))
6181 #t))
6182 (add-after 'install 'install-doc
6183 (lambda* (#:key inputs outputs #:allow-other-keys)
6184 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6185 (doc (string-append data "/doc/" ,name "-" ,version))
6186 (html (string-append doc "/html")))
6187 (setenv "LD_LIBRARY_PATH"
6188 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6189 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6190 (setenv "LANG" "en_US.UTF-8")
6191 (mkdir-p html)
6192 (for-each (lambda (file)
6193 (copy-file (string-append "." file)
6194 (string-append doc file)))
6195 '("/README.rst" "/NEWS.rst"))
6196 (system* "python" "setup.py" "build_sphinx")
6197 (copy-recursively "docs/_build/html" html)
6198 #t))))))
6199 (home-page "https://github.com/Kozea/cairocffi")
6200 (synopsis "Python bindings and object-oriented API for Cairo")
6201 (description
6202 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6203 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6204 graphics library with support for multiple backends including image buffers,
6205 PNG, PostScript, PDF, and SVG file output.")
6206 (license license:bsd-3)))
6207
6208 (define-public python2-cairocffi
6209 (package-with-python2 python-cairocffi))
6210
6211 (define-public python-decorator
6212 (package
6213 (name "python-decorator")
6214 (version "4.3.0")
6215 (source
6216 (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "decorator" version))
6219 (sha256
6220 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6221 (build-system python-build-system)
6222 (home-page "https://pypi.org/project/decorator/")
6223 (synopsis "Python module to simplify usage of decorators")
6224 (description
6225 "The aim of the decorator module is to simplify the usage of decorators
6226 for the average programmer, and to popularize decorators usage giving examples
6227 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6228 etc. The core of this module is a decorator factory.")
6229 (license license:expat)))
6230
6231 (define-public python2-decorator
6232 (package-with-python2 python-decorator))
6233
6234 (define-public python-drmaa
6235 (package
6236 (name "python-drmaa")
6237 (version "0.7.7")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (pypi-uri "drmaa" version))
6242 (sha256
6243 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6244 (build-system python-build-system)
6245 ;; The test suite requires libdrmaa which is provided by the cluster
6246 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6247 ;; should be set to the path of the libdrmaa library.
6248 (arguments '(#:tests? #f))
6249 (native-inputs
6250 `(("python-nose" ,python-nose)))
6251 (home-page "https://pypi.org/project/drmaa/")
6252 (synopsis "Python bindings for the DRMAA library")
6253 (description
6254 "A Python package for Distributed Resource Management (DRM) job
6255 submission and control. This package is an implementation of the DRMAA 1.0
6256 Python language binding specification.")
6257 (license license:bsd-3)))
6258
6259 (define-public python2-drmaa
6260 (package-with-python2 python-drmaa))
6261
6262 (define-public python-grako
6263 (package
6264 (name "python-grako")
6265 (version "3.99.9")
6266 (source
6267 (origin
6268 (method url-fetch)
6269 (uri
6270 (pypi-uri "grako" version ".zip"))
6271 (sha256
6272 (base32
6273 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6274 (build-system python-build-system)
6275 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6276 (native-inputs
6277 `(("unzip" ,unzip)
6278 ("python-pytest" ,python-pytest)
6279 ("python-pytest-runner" ,python-pytest-runner)))
6280 (home-page "https://bitbucket.org/neogeny/grako")
6281 (synopsis "EBNF parser generator")
6282 (description
6283 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6284 memoizing PEG/Packrat parser in Python.")
6285 (license license:bsd-3)))
6286
6287 (define-public python2-grako
6288 (package-with-python2 python-grako))
6289
6290 (define-public python-grandalf
6291 (package
6292 (name "python-grandalf")
6293 (version "0.7")
6294 (source
6295 (origin
6296 ;; There's no source tarball on PyPI.
6297 (method git-fetch)
6298 (uri (git-reference
6299 (url "https://github.com/bdcht/grandalf")
6300 (commit (string-append "v" version))))
6301 (file-name (git-file-name name version))
6302 (sha256
6303 (base32
6304 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6305 (build-system python-build-system)
6306 (arguments
6307 '(#:phases
6308 (modify-phases %standard-phases
6309 (replace 'check
6310 (lambda _
6311 (invoke "python" "setup.py" "pytest"))))))
6312 (native-inputs
6313 `(("python-pytest" ,python-pytest)
6314 ("python-pytest-runner" ,python-pytest-runner)))
6315 (propagated-inputs
6316 `(("python-numpy" ,python-numpy)
6317 ("python-ply" ,python-ply)))
6318 (home-page "https://github.com/bdcht/grandalf")
6319 (synopsis "Graph and drawing algorithms framework")
6320 (description
6321 "Grandalf is a Python package made for experimentations with graphs
6322 drawing algorithms. It is written in pure Python, and currently implements
6323 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6324 minimization approach. While not as fast or featured as graphviz or other
6325 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6326 than thousands of nodes, while keeping the source code simple enough to tweak
6327 and hack any part of it for experimental purpose. With a total of about 1500
6328 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6329 in less than 600 lines. The energy minimization approach is comprised of only
6330 250 lines!
6331
6332 Grandalf does only 2 not-so-simple things:
6333 @itemize
6334 @item computing the nodes (x,y) coordinates (based on provided nodes
6335 dimensions, and a chosen layout)
6336 @item routing the edges with lines or nurbs
6337 @end itemize
6338
6339 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6340 will help you find where to draw things like nodes and edges, but it’s up to
6341 you to actually draw things with your favorite toolkit.")
6342 ;; The user can choose either license.
6343 (license (list license:gpl2 license:epl1.0))))
6344
6345 (define-public python-gridmap
6346 (package
6347 (name "python-gridmap")
6348 (version "0.14.0")
6349 (source
6350 (origin
6351 (method git-fetch)
6352 (uri (git-reference
6353 (url "https://github.com/pygridtools/gridmap")
6354 (commit (string-append "v" version))))
6355 (file-name (git-file-name name version))
6356 (sha256
6357 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6358 (build-system python-build-system)
6359 (arguments
6360 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6361 (propagated-inputs
6362 `(("python-psutil" ,python-psutil)
6363 ("python-drmaa" ,python-drmaa)
6364 ("python-pyzmq" ,python-pyzmq)))
6365 (home-page "https://github.com/pygridtools/gridmap")
6366 (synopsis "Create jobs on a cluster directly from Python")
6367 (description
6368 "Gridmap is a Python package to allow you to easily create jobs on the
6369 cluster directly from Python. You can directly map Python functions onto the
6370 cluster without needing to write any wrapper code yourself.")
6371 (license license:gpl3+)))
6372
6373 (define-public python2-gridmap
6374 (package-with-python2 python-gridmap))
6375
6376 (define-public python-honcho
6377 (package
6378 (name "python-honcho")
6379 (version "1.0.1")
6380 (source
6381 (origin
6382 (method git-fetch)
6383 (uri (git-reference
6384 (url "https://github.com/nickstenning/honcho")
6385 (commit (string-append "v" version))))
6386 (file-name (git-file-name name version))
6387 (sha256
6388 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6389 (build-system python-build-system)
6390 (native-inputs
6391 `(("python-pytest" ,python-pytest)
6392 ("python-mock" ,python-mock)
6393 ("python-tox" ,python-tox)
6394 ("which" ,which))) ;for tests
6395 (propagated-inputs
6396 `(("python-jinja2" ,python-jinja2)))
6397 (arguments
6398 `(#:phases
6399 (modify-phases %standard-phases
6400 (delete 'check)
6401 (add-after 'install 'check
6402 (lambda* (#:key outputs inputs #:allow-other-keys)
6403 ;; fix honcho path in testsuite
6404 (substitute* "tests/conftest.py"
6405 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6406 "/bin/honcho" "'")))
6407 ;; It's easier to run tests after install.
6408 ;; Make installed package available for running the tests
6409 (add-installed-pythonpath inputs outputs)
6410 (invoke "py.test" "-v"))))))
6411 (home-page "https://github.com/nickstenning/honcho")
6412 (synopsis "Manage Procfile-based applications")
6413 (description
6414 "A Procfile is a file which describes how to run an application
6415 consisting of several processes. honcho starts all listed processes.
6416 The output of all running processes is collected by honcho and
6417 displayed.")
6418 (license license:expat)))
6419
6420 (define-public python2-honcho
6421 (package-with-python2 python-honcho))
6422
6423 (define-public python-pexpect
6424 (package
6425 (name "python-pexpect")
6426 (version "4.8.0")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "pexpect" version))
6431 (sha256
6432 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6433 (build-system python-build-system)
6434 (arguments
6435 `(#:phases
6436 (modify-phases %standard-phases
6437 (add-before 'check 'prepare-tests
6438 (lambda _
6439 (substitute* (find-files "tests")
6440 (("/bin/ls") (which "ls"))
6441 (("/bin/echo") (which "echo"))
6442 (("/bin/which") (which "which"))
6443 ;; Many tests try to use the /bin directory which
6444 ;; is not present in the build environment.
6445 ;; Use one that's non-empty and unlikely to change.
6446 (("/bin'") "/dev'")
6447 ;; Disable failing test. See upstream bug report
6448 ;; https://github.com/pexpect/pexpect/issues/568
6449 (("def test_bash") "def _test_bash"))
6450 ;; XXX: Socket connection test gets "Connection reset by peer".
6451 ;; Why does it not work? Delete for now.
6452 (delete-file "tests/test_socket.py")
6453 #t))
6454 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6455 (native-inputs
6456 `(("python-nose" ,python-nose)
6457 ("python-pytest" ,python-pytest)
6458 ("man-db" ,man-db)
6459 ("which" ,which)
6460 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6461 (propagated-inputs
6462 `(("python-ptyprocess" ,python-ptyprocess)))
6463 (home-page "http://pexpect.readthedocs.org/")
6464 (synopsis "Controlling interactive console applications")
6465 (description
6466 "Pexpect is a pure Python module for spawning child applications;
6467 controlling them; and responding to expected patterns in their output.
6468 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6469 child application and control it as if a human were typing commands.")
6470 (license license:isc)))
6471
6472 (define-public python2-pexpect
6473 (package-with-python2 python-pexpect))
6474
6475 (define-public python-setuptools-scm
6476 (package
6477 (name "python-setuptools-scm")
6478 (version "3.4.3")
6479 (source (origin
6480 (method url-fetch)
6481 (uri (pypi-uri "setuptools_scm" version))
6482 (sha256
6483 (base32
6484 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6485 (build-system python-build-system)
6486 (home-page "https://github.com/pypa/setuptools_scm/")
6487 (synopsis "Manage Python package versions in SCM metadata")
6488 (description
6489 "Setuptools_scm handles managing your Python package versions in
6490 @dfn{software configuration management} (SCM) metadata instead of declaring
6491 them as the version argument or in a SCM managed file.")
6492 (license license:expat)))
6493
6494 (define-public python2-setuptools-scm
6495 (package-with-python2 python-setuptools-scm))
6496
6497 (define-public python-sexpdata
6498 (package
6499 (name "python-sexpdata")
6500 (version "0.0.3")
6501 (source
6502 (origin
6503 (method url-fetch)
6504 (uri (pypi-uri "sexpdata" version))
6505 (sha256
6506 (base32
6507 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6508 (build-system python-build-system)
6509 (home-page "https://github.com/jd-boyd/sexpdata")
6510 (synopsis "S-expression parser for Python")
6511 (description
6512 "Sexpdata is an S-expression parser/serializer. It has load and dump
6513 functions like pickle, json or PyYAML module.")
6514 (license license:bsd-3)))
6515
6516 (define-public python-pathlib2
6517 (package
6518 (name "python-pathlib2")
6519 (version "2.3.3")
6520 (source
6521 (origin
6522 (method url-fetch)
6523 (uri (pypi-uri "pathlib2" version))
6524 (sha256
6525 (base32
6526 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6527 (build-system python-build-system)
6528 (propagated-inputs
6529 `(("python-scandir" ,python-scandir)
6530 ("python-six" ,python-six)))
6531 (home-page "https://pypi.org/project/pathlib2/")
6532 (synopsis "Object-oriented file system paths")
6533 (description "The goal of pathlib2 is to provide a backport of the
6534 standard @code{pathlib} module which tracks the standard library module, so
6535 all the newest features of the standard @code{pathlib} can be used also on
6536 older Python versions.")
6537 (license license:expat)))
6538
6539 (define-public python-importlib-resources
6540 (package
6541 (name "python-importlib-resources")
6542 (version "3.0.0")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "importlib_resources" version))
6547 (sha256
6548 (base32
6549 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6550 (build-system python-build-system)
6551 (native-inputs
6552 `(("python-setuptools-scm" ,python-setuptools-scm)
6553 ("python-toml" ,python-toml)))
6554 (home-page "http://importlib-resources.readthedocs.io/")
6555 (synopsis "Read resources from Python packages")
6556 (description
6557 "@code{importlib_resources} is a backport of Python 3's standard library
6558 @code{importlib.resources} module for Python 2.7, and Python 3.")
6559 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6560 (license license:asl2.0)))
6561
6562 (define-public python2-importlib-resources
6563 (package
6564 (name "python2-importlib-resources")
6565 (version "1.0.2")
6566 (source (origin
6567 (method url-fetch)
6568 (uri (pypi-uri "importlib_resources" version))
6569 (sha256
6570 (base32
6571 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6572 (build-system python-build-system)
6573 (arguments
6574 `(#:python ,python-2
6575 #:phases (modify-phases %standard-phases
6576 ;; The build system tests for python-wheel, but it is
6577 ;; not required for Guix nor the test suite. Just drop
6578 ;; it to make bootstrapping pytest easier.
6579 (add-after 'unpack 'drop-wheel-dependency
6580 (lambda _
6581 (substitute* "setup.cfg"
6582 (("^[[:blank:]]+wheel")
6583 ""))
6584 #t)))))
6585 (propagated-inputs
6586 `(("python-pathlib2" ,python2-pathlib2)
6587 ("python-typing" ,python2-typing)))
6588 (home-page "https://gitlab.com/python-devs/importlib_resources")
6589 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6590 (description
6591 "This package provides an implementation of @code{importlib.resources}
6592 for older versions of Python.")
6593 (license license:asl2.0)))
6594
6595 ;; For importlib-metadata-bootstrap below.
6596 (define-public python2-importlib-resources-bootstrap
6597 (hidden-package
6598 (package/inherit
6599 python2-importlib-resources
6600 (name "python2-importlib-resources-bootstrap")
6601 (propagated-inputs
6602 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6603 ("python-typing" ,python2-typing))))))
6604
6605 (define-public python-importlib-metadata
6606 (package
6607 (name "python-importlib-metadata")
6608 (version "1.5.0")
6609 (source
6610 (origin
6611 (method url-fetch)
6612 (uri (pypi-uri "importlib_metadata" version))
6613 (sha256
6614 (base32
6615 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6616 (build-system python-build-system)
6617 (propagated-inputs
6618 `(("python-zipp" ,python-zipp)))
6619 (native-inputs
6620 `(("python-setuptools-scm" ,python-setuptools-scm)
6621 ("python-pyfakefs" ,python-pyfakefs)
6622 ("python-packaging" ,python-packaging)))
6623 (home-page "https://importlib-metadata.readthedocs.io/")
6624 (synopsis "Read metadata from Python packages")
6625 (description
6626 "@code{importlib_metadata} is a library which provides an API for
6627 accessing an installed Python package's metadata, such as its entry points or
6628 its top-level name. This functionality intends to replace most uses of
6629 @code{pkg_resources} entry point API and metadata API. Along with
6630 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6631 need to use the older and less efficient @code{pkg_resources} package.")
6632 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6633 (license license:asl2.0)))
6634
6635 (define-public python2-importlib-metadata
6636 (let ((base (package-with-python2 (strip-python2-variant
6637 python-importlib-metadata))))
6638 (package/inherit
6639 base
6640 (name "python2-importlib-metadata")
6641 (native-inputs
6642 `(("python-setuptools-scm" ,python2-setuptools-scm)
6643 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6644 ("python-packaging" ,python2-packaging-bootstrap)))
6645 (propagated-inputs
6646 `(("python-configparser" ,python2-configparser)
6647 ("python-contextlib2" ,python2-contextlib2)
6648 ("python-importlib-resources" ,python2-importlib-resources)
6649 ("python-pathlib2" ,python2-pathlib2)
6650 ,@(package-propagated-inputs base))))))
6651
6652 ;; This package is used by python2-pytest, and thus must not depend on it.
6653 (define-public python2-importlib-metadata-bootstrap
6654 (hidden-package
6655 (package/inherit
6656 python2-importlib-metadata
6657 (name "python2-importlib-metadata-bootstrap")
6658 (arguments
6659 `(#:tests? #f
6660 ,@(package-arguments python2-importlib-metadata)))
6661 (propagated-inputs
6662 `(("python-zipp" ,python2-zipp-bootstrap)
6663 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6664 ("python-configparser" ,python2-configparser)
6665 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6666 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6667
6668 (define-public python-importmagic
6669 (package
6670 (name "python-importmagic")
6671 (version "0.1.7")
6672 (source
6673 (origin
6674 (method url-fetch)
6675 (uri (pypi-uri "importmagic" version))
6676 (sha256
6677 (base32
6678 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6679 (build-system python-build-system)
6680 (home-page "https://github.com/alecthomas/importmagic")
6681 (synopsis "Library for adding, removing and managing Python imports")
6682 (description
6683 "Importmagic is a Python library for automatically managing imports by
6684 finding unresolved symbols in Python code and their corresponding imports.")
6685 (license license:bsd-3)))
6686
6687 (define-public python-jaraco-packaging
6688 (package
6689 (name "python-jaraco-packaging")
6690 (version "6.1")
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "jaraco.packaging" version))
6695 (sha256
6696 (base32
6697 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6698 (build-system python-build-system)
6699 (propagated-inputs
6700 `(("python-pytest" ,python-pytest)
6701 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6702 ("python-pytest-flake8" ,python-pytest-flake8)
6703 ("python-rst.linker" ,python-rst.linker)
6704 ("python-setuptools" ,python-setuptools)
6705 ("python-setuptools-scm" ,python-setuptools-scm)
6706 ("python-six" ,python-six)
6707 ("python-sphinx" ,python-sphinx)))
6708 (home-page "https://github.com/jaraco/jaraco.packaging")
6709 (synopsis "Tools to supplement packaging Python releases")
6710 (description
6711 "This package provides various tools to supplement packaging Python
6712 releases.")
6713 (license license:expat)))
6714
6715 (define-public python-pathpy
6716 (package
6717 (name "python-pathpy")
6718 (version "11.5.1")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (pypi-uri "path.py" version))
6723 (sha256
6724 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6725 (outputs '("out" "doc"))
6726 (build-system python-build-system)
6727 (propagated-inputs
6728 `(("python-appdirs" ,python-appdirs)
6729 ("python-importlib-metadata" ,python-importlib-metadata)))
6730 (native-inputs
6731 `(("python-setuptools-scm" ,python-setuptools-scm)
6732 ("python-sphinx" ,python-sphinx)
6733 ("python-rst.linker" ,python-rst.linker)
6734 ("python-pytest" ,python-pytest)
6735 ("python-pytest-runner" ,python-pytest-runner)
6736 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6737 (arguments
6738 `(#:phases
6739 (modify-phases %standard-phases
6740 (add-after 'build 'build-doc
6741 (lambda _
6742 (setenv "LANG" "en_US.UTF-8")
6743 (invoke "python" "setup.py" "build_sphinx")))
6744 (add-after 'install 'install-doc
6745 (lambda* (#:key outputs #:allow-other-keys)
6746 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6747 (doc (string-append data "/doc/" ,name "-" ,version))
6748 (html (string-append doc "/html")))
6749 (mkdir-p html)
6750 (for-each (lambda (file)
6751 (copy-file file (string-append doc "/" file)))
6752 '("README.rst" "CHANGES.rst"))
6753 (copy-recursively "build/sphinx/html" html)
6754 #t)))
6755 (replace 'check
6756 (lambda _
6757 ;; The import time test aborts if an import takes longer than
6758 ;; 100ms. It may very well take a little longer than that.
6759 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6760 (home-page "https://github.com/jaraco/path.py")
6761 (synopsis "Python module wrapper for built-in os.path")
6762 (description
6763 "@code{path.py} implements path objects as first-class entities, allowing
6764 common operations on files to be invoked on those path objects directly.")
6765 (license license:expat)))
6766
6767 (define-public python2-pathpy
6768 (package-with-python2 python-pathpy))
6769
6770 (define-public python-simplegeneric
6771 (package
6772 (name "python-simplegeneric")
6773 (version "0.8.1")
6774 (source
6775 (origin
6776 (method url-fetch)
6777 (uri (pypi-uri "simplegeneric" version ".zip"))
6778 (sha256
6779 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6780 (build-system python-build-system)
6781 (native-inputs
6782 `(("unzip" ,unzip)))
6783 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6784 (synopsis "Python module for simple generic functions")
6785 (description
6786 "The simplegeneric module lets you define simple single-dispatch generic
6787 functions, akin to Python’s built-in generic functions like @code{len()},
6788 @code{iter()} and so on. However, instead of using specially-named methods,
6789 these generic functions use simple lookup tables, akin to those used by
6790 e.g. @code{pickle.dump()} and other generic functions found in the Python
6791 standard library.")
6792 (license license:zpl2.1)))
6793
6794 (define-public python2-simplegeneric
6795 (package-with-python2 python-simplegeneric))
6796
6797 (define-public python-ipython-genutils
6798 ;; TODO: This package is retired, check if can be removed, see description.
6799 (package
6800 (name "python-ipython-genutils")
6801 (version "0.1.0")
6802 (source
6803 (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "ipython_genutils" version))
6806 (sha256
6807 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6808 (build-system python-build-system)
6809 (arguments `(#:tests? #f)) ; no tests
6810 (home-page "https://ipython.org")
6811 (synopsis "Vestigial utilities from IPython")
6812 (description
6813 "This package provides retired utilities from IPython. No packages
6814 outside IPython/Jupyter should depend on it.
6815
6816 This package shouldn't exist. It contains some common utilities shared by
6817 Jupyter and IPython projects during The Big Split. As soon as possible, those
6818 packages will remove their dependency on this, and this package will go
6819 away.")
6820 (license license:bsd-3)))
6821
6822 (define-public python2-ipython-genutils
6823 (package-with-python2 python-ipython-genutils))
6824
6825 (define-public python-ipyparallel
6826 (package
6827 (name "python-ipyparallel")
6828 (version "6.2.4")
6829 (source
6830 (origin
6831 (method url-fetch)
6832 (uri (pypi-uri "ipyparallel" version))
6833 (sha256
6834 (base32
6835 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6836 (build-system python-build-system)
6837 (arguments
6838 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6839 #:phases
6840 (modify-phases %standard-phases
6841 (add-before 'check 'prepare-for-tests
6842 (lambda _
6843 (setenv "HOME" (getcwd))
6844 #t)))))
6845 (propagated-inputs
6846 `(("python-dateutil" ,python-dateutil)
6847 ("python-decorator" ,python-decorator)
6848 ("python-ipykernel" ,python-ipykernel)
6849 ("python-ipython" ,python-ipython)
6850 ("python-ipython-genutils" ,python-ipython-genutils)
6851 ("python-jupyter-client" ,python-jupyter-client)
6852 ("python-pyzmq" ,python-pyzmq)
6853 ("python-tornado" ,python-tornado)
6854 ("python-traitlets" ,python-traitlets)))
6855 (native-inputs
6856 `(("python-ipython" ,python-ipython)
6857 ("python-mock" ,python-mock)
6858 ("python-nose" ,python-nose)
6859 ("python-pytest" ,python-pytest)
6860 ("python-pytest-cov" ,python-pytest-cov)
6861 ("python-testpath" ,python-testpath)))
6862 (home-page "https://ipython.org/")
6863 (synopsis "Interactive Parallel Computing with IPython")
6864 (description
6865 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6866 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6867 CLI scripts:
6868 @enumerate
6869 @item ipcluster - start/stop a cluster
6870 @item ipcontroller - start a scheduler
6871 @item ipengine - start an engine
6872 @end enumerate")
6873 (license license:bsd-3)))
6874
6875 (define-public python2-ipyparallel
6876 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6877 (package
6878 (inherit ipyparallel)
6879 (propagated-inputs
6880 `(("python2-futures" ,python2-futures)
6881 ,@(package-propagated-inputs ipyparallel))))))
6882
6883 (define-public python-ipython-cluster-helper
6884 (package
6885 (name "python-ipython-cluster-helper")
6886 (version "0.6.4")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "ipython-cluster-helper" version))
6891 (sha256
6892 (base32
6893 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6894 (modules '((guix build utils)))
6895 (snippet
6896 '(begin (substitute* "requirements.txt"
6897 (("ipython.*") "ipython\n"))
6898 #t))))
6899 (build-system python-build-system)
6900 (arguments
6901 `(#:tests? #f ; Test suite can't find IPython.
6902 #:phases
6903 (modify-phases %standard-phases
6904 (replace 'check
6905 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6906 (if tests?
6907 (begin
6908 (setenv "HOME" (getcwd))
6909 (add-installed-pythonpath inputs outputs)
6910 (invoke "python" "example/example.py" "--local"))
6911 #t))))))
6912 (propagated-inputs
6913 `(("python-ipyparallel" ,python-ipyparallel)
6914 ("python-ipython" ,python-ipython)
6915 ("python-netifaces" ,python-netifaces)
6916 ("python-pyzmq" ,python-pyzmq)
6917 ("python-setuptools" ,python-setuptools)
6918 ("python-six" ,python-six)))
6919 (home-page "https://github.com/roryk/ipython-cluster-helper")
6920 (synopsis
6921 "Simplify IPython cluster start up and use for multiple schedulers")
6922 (description
6923 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6924 profile, launches a cluster and returns a view. On program exit it shuts the
6925 cluster down and deletes the throwaway profile.")
6926 (license license:expat)))
6927
6928 (define-public python2-ipython-cluster-helper
6929 (package-with-python2 python-ipython-cluster-helper))
6930
6931 (define-public python-traitlets
6932 (package
6933 (name "python-traitlets")
6934 (version "4.3.3")
6935 (source
6936 (origin
6937 (method url-fetch)
6938 (uri (pypi-uri "traitlets" version))
6939 (sha256
6940 (base32
6941 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6942 (build-system python-build-system)
6943 (arguments
6944 `(#:phases
6945 (modify-phases %standard-phases
6946 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6947 (propagated-inputs
6948 `(("python-ipython-genutils" ,python-ipython-genutils)
6949 ("python-decorator" ,python-decorator)))
6950 (native-inputs
6951 `(("python-pytest" ,python-pytest)))
6952 (properties `((python2-variant . ,(delay python2-traitlets))))
6953 (home-page "https://ipython.org")
6954 (synopsis "Configuration system for Python applications")
6955 (description
6956 "Traitlets is a framework that lets Python classes have attributes with
6957 type checking, dynamically calculated default values, and ‘on change’
6958 callbacks. The package also includes a mechanism to use traitlets for
6959 configuration, loading values from files or from command line arguments. This
6960 is a distinct layer on top of traitlets, so you can use traitlets in your code
6961 without using the configuration machinery.")
6962 (license license:bsd-3)))
6963
6964 (define-public python2-traitlets
6965 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6966 (package
6967 (inherit traitlets)
6968 (propagated-inputs
6969 `(("python2-enum34" ,python2-enum34)
6970 ,@(package-propagated-inputs traitlets))))))
6971
6972 (define-public python-jupyter-core
6973 (package
6974 (name "python-jupyter-core")
6975 (version "4.4.0")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (string-append (pypi-uri "jupyter_core" version)))
6980 (sha256
6981 (base32
6982 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6983 (build-system python-build-system)
6984 ;; FIXME: not sure how to run the tests
6985 (arguments `(#:tests? #f))
6986 (propagated-inputs
6987 `(("python-traitlets" ,python-traitlets)))
6988 (home-page "http://jupyter.org/")
6989 (synopsis "Jupyter base package")
6990 (description
6991 "Jupyter core is the base package on which Jupyter projects rely.")
6992 (license license:bsd-3)))
6993
6994 (define-public python2-jupyter-core
6995 (package-with-python2 python-jupyter-core))
6996
6997 (define-public python-jupyter-client
6998 (package
6999 (name "python-jupyter-client")
7000 (version "5.2.4")
7001 (source
7002 (origin
7003 (method url-fetch)
7004 (uri (pypi-uri "jupyter_client" version))
7005 (sha256
7006 (base32
7007 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
7008 (build-system python-build-system)
7009 ;; Tests fail because of missing native python kernel which I assume is
7010 ;; provided by the ipython package, which we cannot use because it would
7011 ;; cause a dependency cycle.
7012 (arguments
7013 `(#:tests? #f
7014
7015 #:phases (modify-phases %standard-phases
7016 (add-after 'unpack 'set-tool-file-names
7017 (lambda* (#:key inputs #:allow-other-keys)
7018 (let ((iproute (assoc-ref inputs "iproute")))
7019 (substitute* "jupyter_client/localinterfaces.py"
7020 (("'ip'")
7021 (string-append "'" iproute "/sbin/ip'")))
7022 #t))))))
7023 (inputs
7024 `(("iproute" ,iproute)))
7025 (propagated-inputs
7026 `(("python-pyzmq" ,python-pyzmq)
7027 ("python-traitlets" ,python-traitlets)
7028 ("python-jupyter-core" ,python-jupyter-core)))
7029 (home-page "http://jupyter.org/")
7030 (synopsis "Jupyter protocol implementation and client libraries")
7031 (description
7032 "The @code{jupyter_client} package contains the reference implementation
7033 of the Jupyter protocol. It also provides client and kernel management APIs
7034 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
7035 installing @code{kernelspec}s for use with Jupyter frontends.")
7036 (license license:bsd-3)))
7037
7038 (define-public python2-jupyter-client
7039 (package-with-python2 python-jupyter-client))
7040
7041 (define-public python-ipykernel
7042 (package
7043 (name "python-ipykernel")
7044 (version "5.1.3")
7045 (source
7046 (origin
7047 (method url-fetch)
7048 (uri (pypi-uri "ipykernel" version))
7049 (sha256
7050 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
7051 (build-system python-build-system)
7052 (arguments
7053 `(#:phases
7054 (modify-phases %standard-phases
7055 (replace 'check
7056 (lambda _
7057 (setenv "HOME" "/tmp")
7058 (invoke "pytest" "-v")
7059 #t))
7060 (add-after 'install 'set-python-file-name
7061 (lambda* (#:key outputs #:allow-other-keys)
7062 ;; Record the absolute file name of the 'python' executable in
7063 ;; 'kernel.json'.
7064 (let ((out (assoc-ref outputs "out")))
7065 (substitute* (string-append out "/share/jupyter"
7066 "/kernels/python3/kernel.json")
7067 (("\"python\"")
7068 (string-append "\"" (which "python") "\"")))
7069 #t))))))
7070 (propagated-inputs
7071 `(("python-ipython" ,python-ipython)
7072 ;; imported at runtime during connect
7073 ("python-jupyter-client" ,python-jupyter-client)))
7074 (native-inputs
7075 `(("python-flaky" ,python-flaky)
7076 ("python-nose" ,python-nose)
7077 ("python-pytest" ,python-pytest)))
7078 (home-page "https://ipython.org")
7079 (synopsis "IPython Kernel for Jupyter")
7080 (description
7081 "This package provides the IPython kernel for Jupyter.")
7082 (properties `((python2-variant . ,(delay python2-ipykernel))))
7083 (license license:bsd-3)))
7084
7085 ;; Version 5.x and above no longer support Python 2.
7086 (define-public python2-ipykernel
7087 (package
7088 (name "python2-ipykernel")
7089 (version "4.10.1")
7090 (source
7091 (origin
7092 (method url-fetch)
7093 (uri (pypi-uri "ipykernel" version))
7094 (sha256
7095 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
7096 (build-system python-build-system)
7097 (arguments
7098 `(#:python ,python-2))
7099 (propagated-inputs
7100 `(("python2-ipython" ,python2-ipython)
7101 ;; imported at runtime during connect
7102 ("python2-jupyter-client" ,python2-jupyter-client)
7103 ("python2-tornado" ,python2-tornado)
7104 ("python2-traitlets" ,python2-traitlets)))
7105 (native-inputs
7106 `(("python2-mock" ,python2-mock)
7107 ("python2-nose" ,python2-nose)
7108 ("python2-pytest" ,python2-pytest)
7109 ("python2-pytest-cov" ,python2-pytest-cov)))
7110 (home-page "https://ipython.org")
7111 (synopsis "IPython Kernel for Jupyter")
7112 (description
7113 "This package provides the IPython kernel for Jupyter.")
7114 (license license:bsd-3)))
7115
7116 (define-public python-pari-jupyter
7117 (package
7118 (name "python-pari-jupyter")
7119 (version "1.3.2")
7120 (source
7121 (origin
7122 (method url-fetch)
7123 (uri (pypi-uri "pari_jupyter" version))
7124 (sha256
7125 (base32
7126 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7127 (build-system python-build-system)
7128 (propagated-inputs
7129 `(("python-ipykernel" ,python-ipykernel)))
7130 (inputs
7131 `(("pari-gp" ,pari-gp)
7132 ("readline" ,readline)))
7133 (arguments
7134 `(#:tests? #f)) ; no test suite
7135 (home-page
7136 "https://github.com/jdemeyer/pari_jupyter")
7137 (synopsis "A Jupyter kernel for PARI/GP")
7138 (description "The package provides a PARI/GP kernel for Jupyter.")
7139 (license license:gpl3+)))
7140
7141 (define-public python-backcall
7142 (package
7143 (name "python-backcall")
7144 (version "0.1.0")
7145 (source
7146 (origin
7147 (method url-fetch)
7148 (uri (pypi-uri "backcall" version))
7149 (sha256
7150 (base32
7151 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7152 (build-system python-build-system)
7153 (home-page "https://github.com/takluyver/backcall/")
7154 (synopsis "Specifications for callback functions passed in to an API")
7155 (description
7156 "If your code lets other people supply callback functions, it's important
7157 to specify the function signature you expect, and check that functions support
7158 that. Adding extra parameters later would break other peoples code unless
7159 you're careful. The @code{backcall} package provides a way of specifying the
7160 callback signature using a prototype function.")
7161 (license license:bsd-3)))
7162
7163 (define-public python-ipython
7164 (package
7165 (name "python-ipython")
7166 (version "7.9.0")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (pypi-uri "ipython" version ".tar.gz"))
7171 (sha256
7172 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7173 (build-system python-build-system)
7174 (propagated-inputs
7175 `(("python-backcall" ,python-backcall)
7176 ("python-pyzmq" ,python-pyzmq)
7177 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7178 ("python-terminado" ,python-terminado)
7179 ("python-matplotlib" ,python-matplotlib)
7180 ("python-numpy" ,python-numpy)
7181 ("python-numpydoc" ,python-numpydoc)
7182 ("python-jedi" ,python-jedi)
7183 ("python-jinja2" ,python-jinja2)
7184 ("python-mistune" ,python-mistune)
7185 ("python-pexpect" ,python-pexpect)
7186 ("python-pickleshare" ,python-pickleshare)
7187 ("python-simplegeneric" ,python-simplegeneric)
7188 ("python-jsonschema" ,python-jsonschema)
7189 ("python-traitlets" ,python-traitlets)
7190 ("python-nbformat" ,python-nbformat)
7191 ("python-pygments" ,python-pygments)))
7192 (inputs
7193 `(("readline" ,readline)
7194 ("which" ,which)))
7195 (native-inputs
7196 `(("graphviz" ,graphviz)
7197 ("pkg-config" ,pkg-config)
7198 ("python-requests" ,python-requests) ;; for tests
7199 ("python-testpath" ,python-testpath)
7200 ("python-nose" ,python-nose)))
7201 (arguments
7202 `(#:phases
7203 (modify-phases %standard-phases
7204 (add-after 'unpack 'make-docs-reproducible
7205 (lambda _
7206 (substitute* "IPython/sphinxext/ipython_directive.py"
7207 ((".*import datetime") "")
7208 ((".*datetime.datetime.now\\(\\)") "")
7209 (("%timeit") "# %timeit"))
7210 #t))
7211 ;; Tests can only be run after the library has been installed and not
7212 ;; within the source directory.
7213 (delete 'check)
7214 (add-after 'install 'check
7215 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7216 (if tests?
7217 (begin
7218 ;; Make installed package available for running the tests
7219 (add-installed-pythonpath inputs outputs)
7220 (setenv "HOME" "/tmp/") ;; required by a test
7221 ;; We only test the core because one of the other tests
7222 ;; tries to import ipykernel.
7223 (invoke "python" "IPython/testing/iptest.py"
7224 "-v" "IPython/core/tests"))
7225 #t)))
7226 (add-before 'check 'fix-tests
7227 (lambda* (#:key inputs #:allow-other-keys)
7228 (substitute* "./IPython/utils/_process_posix.py"
7229 (("/usr/bin/env', 'which") (which "which")))
7230 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7231 (("#!/usr/bin/env python")
7232 (string-append "#!" (which "python"))))
7233 ;; This test introduces a circular dependency on ipykernel
7234 ;; (which depends on ipython).
7235 (delete-file "IPython/core/tests/test_display.py")
7236 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7237 (delete-file "IPython/core/tests/test_interactiveshell.py")
7238 #t)))))
7239 (home-page "https://ipython.org")
7240 (synopsis "IPython is a tool for interactive computing in Python")
7241 (description
7242 "IPython provides a rich architecture for interactive computing with:
7243 Powerful interactive shells, a browser-based notebook, support for interactive
7244 data visualization, embeddable interpreters and tools for parallel
7245 computing.")
7246 (properties `((python2-variant . ,(delay python2-ipython))))
7247 (license license:bsd-3)))
7248
7249 ;; This is the latest release of the LTS version of ipython with support for
7250 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7251 ;; dropped support for Python 2.7.
7252 (define-public python2-ipython
7253 (package
7254 (name "python2-ipython")
7255 (version "5.8.0")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "ipython" version ".tar.gz"))
7260 (sha256
7261 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7262 (build-system python-build-system)
7263 (propagated-inputs
7264 `(("python2-backports-shutil-get-terminal-size"
7265 ,python2-backports-shutil-get-terminal-size)
7266 ("python2-pathlib2" ,python2-pathlib2)
7267 ("python2-pyzmq" ,python2-pyzmq)
7268 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7269 ("python2-terminado" ,python2-terminado)
7270 ("python2-matplotlib" ,python2-matplotlib)
7271 ("python2-numpy" ,python2-numpy)
7272 ("python2-numpydoc" ,python2-numpydoc)
7273 ("python2-jinja2" ,python2-jinja2)
7274 ("python2-mistune" ,python2-mistune)
7275 ("python2-pexpect" ,python2-pexpect)
7276 ("python2-pickleshare" ,python2-pickleshare)
7277 ("python2-simplegeneric" ,python2-simplegeneric)
7278 ("python2-jsonschema" ,python2-jsonschema)
7279 ("python2-traitlets" ,python2-traitlets)
7280 ("python2-nbformat" ,python2-nbformat)
7281 ("python2-pygments" ,python2-pygments)))
7282 (inputs
7283 `(("readline" ,readline)
7284 ("which" ,which)))
7285 (native-inputs
7286 `(("graphviz" ,graphviz)
7287 ("pkg-config" ,pkg-config)
7288 ("python2-requests" ,python2-requests) ;; for tests
7289 ("python2-testpath" ,python2-testpath)
7290 ("python2-mock" ,python2-mock)
7291 ("python2-nose" ,python2-nose)))
7292 (arguments
7293 `(#:python ,python-2
7294 #:phases
7295 (modify-phases %standard-phases
7296 (add-before 'check 'delete-broken-tests
7297 (lambda* (#:key inputs #:allow-other-keys)
7298 ;; These tests throw errors for unknown reasons.
7299 (delete-file "IPython/core/tests/test_displayhook.py")
7300 (delete-file "IPython/core/tests/test_magic_terminal.py")
7301 (delete-file "IPython/core/tests/test_profile.py")
7302 #t)))))
7303 (home-page "https://ipython.org")
7304 (synopsis "IPython is a tool for interactive computing in Python")
7305 (description
7306 "IPython provides a rich architecture for interactive computing with:
7307 Powerful interactive shells, a browser-based notebook, support for interactive
7308 data visualization, embeddable interpreters and tools for parallel
7309 computing.")
7310 (license license:bsd-3)))
7311
7312 (define-public python-ipython-documentation
7313 (package
7314 (inherit python-ipython)
7315 (name "python-ipython-documentation")
7316 (version (package-version python-ipython))
7317 (arguments
7318 `(#:phases
7319 (modify-phases %standard-phases
7320 (delete 'build)
7321 (delete 'check)
7322 (replace 'install
7323 (lambda* (#:key outputs #:allow-other-keys)
7324 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7325 (doc (string-append data "/doc/" ,name "-" ,version))
7326 (html (string-append doc "/html"))
7327 (man1 (string-append data "/man/man1"))
7328 (info (string-append data "/info"))
7329 (examples (string-append doc "/examples"))
7330 (python-arg (string-append "PYTHON=" (which "python"))))
7331 (setenv "LANG" "en_US.utf8")
7332 (with-directory-excursion "docs"
7333 ;; FIXME: pdf fails to build
7334 ;;(system* "make" "pdf" "PAPER=a4")
7335 (system* "make" python-arg "html")
7336 ;; FIXME: the generated texi file contains ^@^@, which trips
7337 ;; up the parser.
7338 ;; (system* "make" python-arg "info")
7339 )
7340 (copy-recursively "docs/man" man1)
7341 (copy-recursively "examples" examples)
7342 (copy-recursively "docs/build/html" html)
7343 ;; (copy-file "docs/build/latex/ipython.pdf"
7344 ;; (string-append doc "/ipython.pdf"))
7345 (mkdir-p info)
7346 ;; (copy-file "docs/build/texinfo/ipython.info"
7347 ;; (string-append info "/ipython.info"))
7348 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7349 #t)))))
7350 (inputs
7351 `(("python-ipython" ,python-ipython)
7352 ("python-ipykernel" ,python-ipykernel)))
7353 (native-inputs
7354 `(("python-sphinx" ,python-sphinx)
7355 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7356 ;; FIXME: It's possible that a smaller union would work just as well.
7357 ("texlive" ,(texlive-union (list texlive-amsfonts
7358 texlive-fonts-ec
7359 texlive-generic-ifxetex
7360 texlive-generic-pdftex
7361 texlive-latex-capt-of
7362 texlive-latex-cmap
7363 texlive-latex-environ
7364 texlive-latex-eqparbox
7365 texlive-latex-etoolbox
7366 texlive-latex-expdlist
7367 texlive-latex-fancyhdr
7368 texlive-latex-fancyvrb
7369 texlive-latex-fncychap
7370 texlive-latex-float
7371 texlive-latex-framed
7372 texlive-latex-geometry
7373 texlive-latex-graphics
7374 texlive-latex-hyperref
7375 texlive-latex-mdwtools
7376 texlive-latex-multirow
7377 texlive-latex-needspace
7378 texlive-latex-oberdiek
7379 texlive-latex-parskip
7380 texlive-latex-preview
7381 texlive-latex-tabulary
7382 texlive-latex-threeparttable
7383 texlive-latex-titlesec
7384 texlive-latex-trimspaces
7385 texlive-latex-ucs
7386 texlive-latex-upquote
7387 texlive-latex-url
7388 texlive-latex-varwidth
7389 texlive-latex-wrapfig)))
7390 ("texinfo" ,texinfo)))))
7391
7392 (define-public python-urwid
7393 (package
7394 (name "python-urwid")
7395 (version "2.1.0")
7396 (source
7397 (origin
7398 (method url-fetch)
7399 (uri (pypi-uri "urwid" version))
7400 (sha256
7401 (base32
7402 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7403 (build-system python-build-system)
7404 (home-page "http://urwid.org")
7405 (synopsis "Console user interface library for Python")
7406 (description
7407 "Urwid is a curses-based UI/widget library for Python. It includes many
7408 features useful for text console applications.")
7409 (license license:lgpl2.1+)))
7410
7411 (define-public python2-urwid
7412 (package-with-python2 python-urwid))
7413
7414 (define-public python-urwidtrees
7415 (package
7416 (name "python-urwidtrees")
7417 (version "1.0.2")
7418 (source
7419 (origin
7420 (method git-fetch)
7421 ;; package author intends on distributing via github rather than pypi:
7422 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7423 (uri (git-reference
7424 (url "https://github.com/pazz/urwidtrees")
7425 (commit version)))
7426 (file-name (git-file-name name version))
7427 (sha256
7428 (base32
7429 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7430 (build-system python-build-system)
7431 (arguments
7432 '(#:use-setuptools? #f
7433 #:tests? #f)) ; no tests
7434 (propagated-inputs `(("python-urwid" ,python-urwid)))
7435 (home-page "https://github.com/pazz/urwidtrees")
7436 (synopsis "Tree widgets for urwid")
7437 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7438 toolkit. Use it to build trees of widgets.")
7439 (license license:gpl3+)))
7440
7441 (define-public python2-urwidtrees
7442 (package-with-python2 python-urwidtrees))
7443
7444 (define-public python-ua-parser
7445 (package
7446 (name "python-ua-parser")
7447 (version "0.8.0")
7448 (source
7449 (origin
7450 (method url-fetch)
7451 (uri (pypi-uri "ua-parser" version))
7452 (sha256
7453 (base32
7454 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7455 (build-system python-build-system)
7456 (arguments
7457 `(#:tests? #f)) ;no test suite in release
7458 (native-inputs
7459 `(("python-pyyaml" ,python-pyyaml)))
7460 (home-page "https://github.com/ua-parser/uap-python")
7461 (synopsis "User agent parser")
7462 (description
7463 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7464 (license license:asl2.0)))
7465
7466 (define-public python2-ua-parser
7467 (package-with-python2 python-ua-parser))
7468
7469 (define-public python-user-agents
7470 (package
7471 (name "python-user-agents")
7472 (version "1.1.0")
7473 (source
7474 (origin
7475 (method url-fetch)
7476 (uri (pypi-uri "user-agents" version))
7477 (sha256
7478 (base32
7479 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7480 (build-system python-build-system)
7481 (arguments
7482 `(#:tests? #f)) ;missing devices.json test file in release
7483 (propagated-inputs
7484 `(("python-ua-parser" ,python-ua-parser)))
7485 (home-page "https://github.com/selwin/python-user-agents")
7486 (synopsis "User Agent strings parsing library")
7487 (description
7488 "A library to identify devices (phones, tablets) and their capabilities by
7489 parsing (browser/HTTP) user agent strings.")
7490 (license license:expat)))
7491
7492 (define-public python2-user-agents
7493 (package-with-python2 python-user-agents))
7494
7495 (define-public python-dbus
7496 (package
7497 (name "python-dbus")
7498 (version "1.2.16")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7503 "dbus-python-" version ".tar.gz"))
7504 (sha256
7505 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7506 (build-system gnu-build-system)
7507 (native-inputs
7508 `(("pkg-config" ,pkg-config)))
7509 (inputs
7510 `(("python" ,python-wrapper)
7511 ("dbus-glib" ,dbus-glib)))
7512 (synopsis "Python bindings for D-bus")
7513 (description "python-dbus provides bindings for libdbus, the reference
7514 implementation of D-Bus.")
7515 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7516 (license license:expat)))
7517
7518 (define-public python2-dbus
7519 (package (inherit python-dbus)
7520 (name "python2-dbus")
7521 (inputs `(("python" ,python-2)
7522 ,@(alist-delete "python"
7523 (package-inputs python-dbus)
7524 equal?)))))
7525
7526 (define-public python-notify2
7527 (package
7528 (name "python-notify2")
7529 (version "0.3.1")
7530 (source
7531 (origin
7532 (method url-fetch)
7533 (uri (pypi-uri "notify2" version))
7534 (sha256
7535 (base32
7536 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7537 (build-system python-build-system)
7538 (arguments `(#:tests? #f)) ; tests depend on system state
7539 (native-inputs
7540 `(("python-dbus" ,python-dbus)))
7541 (home-page "https://bitbucket.org/takluyver/pynotify2")
7542 (synopsis "Python interface to D-Bus notifications")
7543 (description
7544 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7545 It is a reimplementation of pynotify in pure Python, and an alternative to
7546 the GObject Introspection bindings to libnotify for non-GTK applications.")
7547 (license (list license:bsd-2
7548 license:lgpl2.1+))))
7549
7550 (define-public python2-notify2
7551 (package-with-python2 python-notify2))
7552
7553 ;; beautifulsoup4 has a totally different namespace than 3.x,
7554 ;; and pypi seems to put it under its own name, so I guess we should too
7555 (define-public python-beautifulsoup4
7556 (package
7557 (name "python-beautifulsoup4")
7558 (version "4.9.1")
7559 (source
7560 (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "beautifulsoup4" version))
7563 (sha256
7564 (base32
7565 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7566 (build-system python-build-system)
7567 (arguments
7568 `(#:phases
7569 (modify-phases %standard-phases
7570 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7571 ;; must use this conversion script when building with Python 3. The
7572 ;; conversion script also runs the tests.
7573 ;; For more information, see the file 'convert-py3k' in the source
7574 ;; distribution.
7575 (replace 'check
7576 (lambda _ (invoke "./convert-py3k"))))))
7577 (propagated-inputs
7578 `(("python-soupsieve" ,python-soupsieve)))
7579 (home-page
7580 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7581 (synopsis
7582 "Python screen-scraping library")
7583 (description
7584 "Beautiful Soup is a Python library designed for rapidly setting up
7585 screen-scraping projects. It offers Pythonic idioms for navigating,
7586 searching, and modifying a parse tree, providing a toolkit for
7587 dissecting a document and extracting what you need. It automatically
7588 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7589 (license license:expat)
7590 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7591
7592 (define-public python2-beautifulsoup4
7593 (package
7594 (inherit (package-with-python2
7595 (strip-python2-variant python-beautifulsoup4)))
7596 (arguments `(#:python ,python-2))))
7597
7598 (define-public python-soupsieve
7599 (package
7600 (name "python-soupsieve")
7601 (version "2.0.1")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (pypi-uri "soupsieve" version))
7606 (sha256
7607 (base32
7608 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7609 (build-system python-build-system)
7610 (arguments `(#:tests? #f))
7611 ;;XXX: 2 tests fail currently despite claming they were to be
7612 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7613 ;;don't want to create a circular dependency.
7614 (home-page "https://github.com/facelessuser/soupsieve")
7615 (synopsis "CSS selector library")
7616 (description
7617 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7618 Soup 4. It aims to provide selecting, matching, and filtering using modern
7619 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7620 specifications up through the latest CSS level 4 drafts and beyond (though
7621 some are not yet implemented).")
7622 (properties `((python2-variant . ,(delay python2-soupsieve))))
7623 (license license:expat)))
7624
7625 ;; This is the last version that supports python-2
7626 (define-public python2-soupsieve
7627 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7628 (package
7629 (inherit base)
7630 (version "1.9.6")
7631 (source
7632 (origin
7633 (method url-fetch)
7634 (uri (pypi-uri "soupsieve" version))
7635 (sha256
7636 (base32
7637 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7638 (propagated-inputs
7639 `(("python2-backports-functools-lru-cache"
7640 ,python2-backports-functools-lru-cache)
7641 ,@(package-propagated-inputs base))))))
7642
7643 (define-public python-netifaces
7644 (package
7645 (name "python-netifaces")
7646 (version "0.10.9")
7647 (source
7648 (origin
7649 (method url-fetch)
7650 (uri (pypi-uri "netifaces" version))
7651 (sha256
7652 (base32
7653 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7654 (build-system python-build-system)
7655 (home-page "https://github.com/al45tair/netifaces")
7656 (synopsis
7657 "Python module for portable network interface information")
7658 (description
7659 "Netifaces is a Python module providing information on network
7660 interfaces in an easy and portable manner.")
7661 (license license:expat)))
7662
7663 (define-public python2-netifaces
7664 (package-with-python2 python-netifaces))
7665
7666 (define-public python-networkx
7667 (package
7668 (name "python-networkx")
7669 (version "2.5")
7670 (source
7671 (origin
7672 (method url-fetch)
7673 (uri (pypi-uri "networkx" version))
7674 (sha256
7675 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7676 (build-system python-build-system)
7677 (arguments
7678 '(#:phases (modify-phases %standard-phases
7679 (replace 'check
7680 (lambda* (#:key tests? #:allow-other-keys)
7681 (if tests?
7682 (invoke "pytest" "-vv" "--pyargs" "networkx")
7683 (format #t "test suite not run~%"))
7684 #t)))))
7685 ;; python-decorator is needed at runtime.
7686 (propagated-inputs
7687 `(("python-decorator" ,python-decorator)))
7688 (native-inputs
7689 `(("python-pytest" ,python-pytest)))
7690 (home-page "https://networkx.github.io/")
7691 (synopsis "Python module for creating and manipulating graphs and networks")
7692 (description
7693 "NetworkX is a Python package for the creation, manipulation, and study
7694 of the structure, dynamics, and functions of complex networks.")
7695 (properties `((python2-variant . ,(delay python2-networkx))))
7696 (license license:bsd-3)))
7697
7698 ;; NetworkX 2.2 is the last version with support for Python 2.
7699 (define-public python2-networkx
7700 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7701 (package
7702 (inherit base)
7703 (version "2.2")
7704 (source (origin
7705 (method url-fetch)
7706 (uri (pypi-uri "networkx" version ".zip"))
7707 (sha256
7708 (base32
7709 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7710 (arguments
7711 `(#:python ,python-2))
7712 (native-inputs
7713 `(("python-nose" ,python2-nose)
7714 ("unzip" ,unzip))))))
7715
7716 (define-public python-datrie
7717 (package
7718 (name "python-datrie")
7719 (version "0.8.2")
7720 (source
7721 (origin
7722 (method url-fetch)
7723 (uri (pypi-uri "datrie" version))
7724 (sha256
7725 (base32
7726 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7727 (build-system python-build-system)
7728 (native-inputs
7729 `(("python-cython" ,python-cython)
7730 ("python-hypothesis" ,python-hypothesis)
7731 ("python-pytest" ,python-pytest)
7732 ("python-pytest-runner" ,python-pytest-runner)))
7733 (home-page "https://github.com/kmike/datrie")
7734 (synopsis "Fast, efficiently stored trie for Python")
7735 (description
7736 "This package provides a fast, efficiently stored trie implementation for
7737 Python.")
7738 (license license:lgpl2.1+)))
7739
7740 (define-public snakemake
7741 (package
7742 (name "snakemake")
7743 (version "5.7.1")
7744 (source
7745 (origin
7746 (method url-fetch)
7747 (uri (pypi-uri "snakemake" version))
7748 (sha256
7749 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7750 (build-system python-build-system)
7751 (arguments
7752 ;; TODO: Package missing test dependencies.
7753 '(#:tests? #f
7754 #:phases
7755 (modify-phases %standard-phases
7756 ;; For cluster execution Snakemake will call Python. Since there is
7757 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7758 ;; this by calling the snakemake wrapper instead.
7759 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7760 (lambda* (#:key outputs #:allow-other-keys)
7761 (substitute* "snakemake/executors.py"
7762 (("\\{sys.executable\\} -m snakemake")
7763 (string-append (assoc-ref outputs "out")
7764 "/bin/snakemake")))
7765 #t)))))
7766 (propagated-inputs
7767 `(("python-appdirs" ,python-appdirs)
7768 ("python-configargparse" ,python-configargparse)
7769 ("python-datrie" ,python-datrie)
7770 ("python-docutils" ,python-docutils)
7771 ("python-gitpython" ,python-gitpython)
7772 ("python-jinja2" ,python-jinja2)
7773 ("python-jsonschema" ,python-jsonschema)
7774 ("python-networkx" ,python-networkx)
7775 ("python-psutil" ,python-psutil)
7776 ("python-pyyaml" ,python-pyyaml)
7777 ("python-ratelimiter" ,python-ratelimiter)
7778 ("python-requests" ,python-requests)
7779 ("python-wrapt" ,python-wrapt)))
7780 (home-page "https://snakemake.readthedocs.io")
7781 (synopsis "Python-based execution environment for make-like workflows")
7782 (description
7783 "Snakemake aims to reduce the complexity of creating workflows by
7784 providing a clean and modern domain specific specification language (DSL) in
7785 Python style, together with a fast and comfortable execution environment.")
7786 (license license:expat)))
7787
7788 (define-public python-pyqrcode
7789 (package
7790 (name "python-pyqrcode")
7791 (version "1.2.1")
7792 (source
7793 (origin
7794 (method url-fetch)
7795 (uri (pypi-uri "PyQRCode" version))
7796 (sha256
7797 (base32
7798 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7799 (build-system python-build-system)
7800 (home-page
7801 "https://github.com/mnooner256/pyqrcode")
7802 (synopsis "QR code generator")
7803 (description
7804 "Pyqrcode is a QR code generator written purely in Python with
7805 SVG, EPS, PNG and terminal output.")
7806 (license license:bsd-3)))
7807
7808 (define-public python-seaborn
7809 (package
7810 (name "python-seaborn")
7811 (version "0.10.0")
7812 (source
7813 (origin
7814 (method url-fetch)
7815 (uri (pypi-uri "seaborn" version))
7816 (sha256
7817 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7818 (build-system python-build-system)
7819 (arguments
7820 `(#:phases
7821 (modify-phases %standard-phases
7822 (add-before 'check 'start-xserver
7823 (lambda* (#:key inputs #:allow-other-keys)
7824 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7825 ;; There must be a running X server and make check doesn't
7826 ;; start one. Therefore we must do it.
7827 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7828 (setenv "DISPLAY" ":1")
7829 #t)))
7830 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7831 (propagated-inputs
7832 `(("python-pandas" ,python-pandas)
7833 ("python-matplotlib" ,python-matplotlib)
7834 ("python-numpy" ,python-numpy)
7835 ("python-scipy" ,python-scipy)))
7836 (native-inputs
7837 `(("python-pytest" ,python-pytest)
7838 ("xorg-server" ,xorg-server-for-tests)))
7839 (home-page "https://seaborn.pydata.org/")
7840 (synopsis "Statistical data visualization")
7841 (description
7842 "Seaborn is a library for making attractive and informative statistical
7843 graphics in Python. It is built on top of matplotlib and tightly integrated
7844 with the PyData stack, including support for numpy and pandas data structures
7845 and statistical routines from scipy and statsmodels.")
7846 (properties `((python2-variant . ,(delay python2-seaborn))))
7847 (license license:bsd-3)))
7848
7849 ;; 0.9.1 is the last release with support for Python 2.
7850 (define-public python2-seaborn
7851 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7852 (package
7853 (inherit base)
7854 (version "0.9.1")
7855 (source (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "seaborn" version))
7858 (sha256
7859 (base32
7860 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7861
7862 (define-public python-mpmath
7863 (package
7864 (name "python-mpmath")
7865 (version "1.1.0")
7866 (source (origin
7867 (method url-fetch)
7868 (uri (pypi-uri "mpmath" version))
7869 (file-name (git-file-name name version))
7870 (sha256
7871 (base32
7872 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7873 (build-system python-build-system)
7874 (native-inputs
7875 `(("python-pytest" ,python-pytest)))
7876 (arguments
7877 '(#:phases
7878 (modify-phases %standard-phases
7879 (replace 'check
7880 (lambda _
7881 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7882 (home-page "http://mpmath.org")
7883 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7884 (description
7885 "@code{mpmath} can be used as an arbitrary-precision substitute for
7886 Python's float/complex types and math/cmath modules, but also does much
7887 more advanced mathematics.")
7888 (license license:bsd-3)))
7889
7890 (define-public python2-mpmath
7891 (package-with-python2 python-mpmath))
7892
7893 (define-public python-bigfloat
7894 (package
7895 (name "python-bigfloat")
7896 (version "0.3.0")
7897 (source
7898 (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "bigfloat" version))
7901 (sha256
7902 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7903 (build-system python-build-system)
7904 (inputs
7905 `(("mpfr" ,mpfr)))
7906 (home-page "https://github.com/mdickinson/bigfloat")
7907 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7908 (description
7909 "This package provides a Python interface to the MPFR library for
7910 multiprecision arithmetic.")
7911 (license license:lgpl3+)))
7912
7913 (define-public python2-bigfloat
7914 (package-with-python2 python-bigfloat))
7915
7916 (define-public python-sympy
7917 (package
7918 (name "python-sympy")
7919 (version "1.6.2")
7920 (source
7921 (origin
7922 (method url-fetch)
7923 (uri (pypi-uri "sympy" version))
7924 (sha256
7925 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7926 (build-system python-build-system)
7927 (arguments
7928 `(#:phases
7929 (modify-phases %standard-phases
7930 (replace 'check
7931 (lambda* (#:key outputs #:allow-other-keys)
7932 (invoke
7933 (or (which "python3") (which "python"))
7934 "-c" "import sympy; sympy.test(\"/core\")"))))))
7935 (propagated-inputs
7936 `(("python-mpmath" ,python-mpmath)))
7937 (home-page "https://www.sympy.org/")
7938 (synopsis "Python library for symbolic mathematics")
7939 (description
7940 "SymPy is a Python library for symbolic mathematics. It aims to become a
7941 full-featured computer algebra system (CAS) while keeping the code as simple
7942 as possible in order to be comprehensible and easily extensible.")
7943 (license license:bsd-3)))
7944
7945 (define-public python2-sympy
7946 (package
7947 (inherit (package-with-python2 python-sympy))
7948 (version "1.5.1") ; last release for python2
7949 (source
7950 (origin
7951 (method url-fetch)
7952 (uri (pypi-uri "sympy" version))
7953 (sha256
7954 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7955
7956 (define-public python-q
7957 (package
7958 (name "python-q")
7959 (version "2.6")
7960 (source
7961 (origin
7962 (method url-fetch)
7963 (uri (pypi-uri "q" version))
7964 (sha256
7965 (base32
7966 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7967 (build-system python-build-system)
7968 (home-page "https://github.com/zestyping/q")
7969 (synopsis "Quick-and-dirty debugging output for tired programmers")
7970 (description
7971 "q is a Python module for \"print\" style of debugging Python code. It
7972 provides convenient short API for print out of values, tracebacks, and
7973 falling into the Python interpreter.")
7974 (license license:asl2.0)))
7975
7976 (define-public python2-q
7977 (package-with-python2 python-q))
7978
7979 (define-public python-xlib
7980 (package
7981 (name "python-xlib")
7982 (version "0.27")
7983 (source
7984 (origin
7985 (method git-fetch)
7986 (uri (git-reference
7987 (url "https://github.com/python-xlib/python-xlib")
7988 (commit version)))
7989 (file-name (git-file-name name version))
7990 (sha256
7991 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7992 (build-system python-build-system)
7993 (arguments
7994 `(#:phases
7995 (modify-phases %standard-phases
7996 (add-before 'check 'start-xserver
7997 (lambda* (#:key inputs #:allow-other-keys)
7998 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7999 ;; There must be a running X server and make check doesn't
8000 ;; start one. Therefore we must do it.
8001 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
8002 (setenv "DISPLAY" ":1")
8003 #t))))))
8004 (native-inputs
8005 `(("python-mock" ,python-mock)
8006 ("python-setuptools-scm" ,python-setuptools-scm)
8007 ("python-six" ,python-six)
8008 ("xorg-server" ,xorg-server)))
8009 (home-page "https://github.com/python-xlib/python-xlib")
8010 (synopsis "Python X11 client library")
8011 (description
8012 "The Python X Library is intended to be a fully functional
8013 X client library for Python programs. It is useful to implement
8014 low-level X clients. It is written entirely in Python.")
8015 (license license:gpl2+)))
8016
8017 (define-public python2-xlib
8018 (package-with-python2 python-xlib))
8019
8020 (define-public python-singledispatch
8021 (package
8022 (name "python-singledispatch")
8023 (version "3.4.0.3")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (pypi-uri "singledispatch" version))
8028 (sha256
8029 (base32
8030 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
8031 (build-system python-build-system)
8032 (native-inputs
8033 `(("python-six" ,python-six))) ; required for conversion, not at run-time
8034 (home-page
8035 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
8036 (synopsis "Backport of singledispatch feature from Python 3.4")
8037 (description
8038 "This library brings functools.singledispatch from Python 3.4 to Python
8039 2.6-3.3.")
8040 (license license:expat)))
8041
8042 (define-public python2-singledispatch
8043 (package-with-python2 python-singledispatch))
8044
8045 ;; the python- version can be removed with python-3.5
8046 (define-public python-backports-abc
8047 (package
8048 (name "python-backports-abc")
8049 (version "0.5")
8050 (source
8051 (origin
8052 (method url-fetch)
8053 (uri (pypi-uri "backports_abc" version))
8054 (sha256
8055 (base32
8056 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
8057 (build-system python-build-system)
8058 (home-page "https://github.com/cython/backports_abc")
8059 (synopsis "Backport of additions to the 'collections.abc' module")
8060 (description
8061 "Python-backports-abc provides a backport of additions to the
8062 @code{collections.abc} module in Python-3.5.")
8063 (license license:psfl)))
8064
8065 (define-public python2-backports-abc
8066 (package-with-python2 python-backports-abc))
8067
8068 (define-public python-backports-csv
8069 (package
8070 (name "python-backports-csv")
8071 (version "1.0.7")
8072 (source
8073 (origin
8074 (method url-fetch)
8075 (uri (pypi-uri "backports.csv" version))
8076 (sha256
8077 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
8078 (build-system python-build-system)
8079 (home-page "https://github.com/ryanhiebert/backports.csv")
8080 (synopsis "Backport of Python 3's csv module for Python 2")
8081 (description
8082 "Provides a backport of Python 3's @code{csv} module for parsing
8083 comma separated values. The API of the @code{csv} module in Python 2
8084 is drastically different from the @code{csv} module in Python 3.
8085 This is due, for the most part, to the difference between str in
8086 Python 2 and Python 3.")
8087 (license license:psfl)))
8088
8089 (define-public python2-backports-csv
8090 (package-with-python2 python-backports-csv))
8091
8092 (define-public python2-backports-shutil-get-terminal-size
8093 (package
8094 (name "python2-backports-shutil-get-terminal-size")
8095 (version "1.0.0")
8096 (source
8097 (origin
8098 (method url-fetch)
8099 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
8100 (sha256
8101 (base32
8102 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8103 (build-system python-build-system)
8104 (arguments
8105 `(#:python ,python-2
8106 #:phases
8107 (modify-phases %standard-phases
8108 (replace 'check
8109 (lambda _
8110 (setenv "PYTHONPATH" (string-append "./build/lib:"
8111 (getenv "PYTHONPATH")))
8112 (invoke "py.test" "-v"))))))
8113 (native-inputs
8114 `(("python2-pytest" ,python2-pytest)))
8115 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8116 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8117 (description
8118 "This package provides a backport of the @code{get_terminal_size
8119 function} from Python 3.3's @code{shutil}.
8120 Unlike the original version it is written in pure Python rather than C,
8121 so it might be a tiny bit slower.")
8122 (license license:expat)))
8123
8124 (define-public python-waf
8125 (package
8126 (name "python-waf")
8127 (version "2.0.19")
8128 (source (origin
8129 (method url-fetch)
8130 (uri (string-append "https://waf.io/"
8131 "waf-" version ".tar.bz2"))
8132 (sha256
8133 (base32
8134 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8135 (build-system python-build-system)
8136 (arguments
8137 '(#:phases
8138 (modify-phases %standard-phases
8139 (replace 'build
8140 (lambda _
8141 ;; XXX: Find a way to add all extra tools.
8142 (let ((tools '("gccdeps"
8143 "clang_compilation_database")))
8144 (invoke "python" "waf-light" "configure" "build"
8145 (string-append "--tools="
8146 (string-join tools ","))))))
8147 (replace 'check
8148 (lambda _
8149 (invoke "python" "waf" "--version")))
8150 (replace 'install
8151 (lambda* (#:key outputs #:allow-other-keys)
8152 (let ((out (assoc-ref outputs "out")))
8153 (install-file "waf" (string-append out "/bin")))
8154 #t))
8155 ;; waf breaks when it is wrapped.
8156 (delete 'wrap))))
8157 (home-page "https://waf.io/")
8158 (synopsis "Python-based build system")
8159 (description
8160 "Waf is a Python-based framework for configuring, compiling and installing
8161 applications.")
8162 (license license:bsd-3)))
8163
8164 (define-public python2-waf
8165 (package-with-python2 python-waf))
8166
8167 (define-public python-pyzmq
8168 (package
8169 (name "python-pyzmq")
8170 (version "17.1.2")
8171 (source
8172 (origin
8173 (method url-fetch)
8174 (uri (pypi-uri "pyzmq" version))
8175 (sha256
8176 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8177 (build-system python-build-system)
8178 (arguments
8179 `(#:configure-flags
8180 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8181 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8182 ;; --inplace' for 'python setup.py test' to work.
8183 #:tests? #f))
8184 (inputs
8185 `(("zeromq" ,zeromq)))
8186 (native-inputs
8187 `(("pkg-config" ,pkg-config)
8188 ("python-nose" ,python-nose)))
8189 (home-page "https://github.com/zeromq/pyzmq")
8190 (synopsis "Python bindings for 0MQ")
8191 (description
8192 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8193 (license license:bsd-4)))
8194
8195 (define-public python2-pyzmq
8196 (package-with-python2 python-pyzmq))
8197
8198 (define-public python-pep8
8199 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8200 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8201 ;; some dependents' test suites, and nothing more.
8202 (package
8203 (name "python-pep8")
8204 (version "1.7.0")
8205 (source
8206 (origin
8207 (method url-fetch)
8208 (uri (pypi-uri "pep8" version))
8209 (sha256
8210 (base32
8211 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8212 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8213 (build-system python-build-system)
8214 (home-page "https://pep8.readthedocs.org/")
8215 (synopsis "Python style guide checker")
8216 (description
8217 "This tools checks Python code against some of the style conventions in
8218 PEP 8.")
8219 (license license:expat)))
8220
8221 (define-public python2-pep8
8222 (package-with-python2 python-pep8))
8223
8224 (define-public python-pep517
8225 (package
8226 (name "python-pep517")
8227 (version "0.8.2")
8228 (source
8229 (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "pep517" version))
8232 (sha256
8233 (base32
8234 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8235 (build-system python-build-system)
8236 (arguments
8237 '(#:phases
8238 (modify-phases %standard-phases
8239 (replace 'check
8240 (lambda* (#:key tests? #:allow-other-keys)
8241 (delete-file "pytest.ini")
8242 ;; This test tries to connect to the internet
8243 (delete-file "tests/test_meta.py")
8244 (if tests?
8245 (invoke "pytest")
8246 #t))))))
8247 (native-inputs
8248 `(("python-mock" ,python-mock)
8249 ("python-pytest" ,python-pytest)
8250 ("python-testpath" ,python-testpath)))
8251 (propagated-inputs
8252 `(("python-toml" ,python-toml)
8253 ("python-wheel" ,python-wheel)))
8254 (home-page "https://github.com/pypa/pep517")
8255 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8256 (description
8257 "Wrappers to build Python packages using PEP 517 hooks.")
8258 (properties `((python2-variant . ,(delay python2-pep517))))
8259 (license license:expat)))
8260
8261 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8262 (define-public python2-pep517
8263 (let ((base (package-with-python2
8264 (strip-python2-variant python-pep517))))
8265 (package
8266 (inherit base)
8267 (name "python2-pep517")
8268 (arguments
8269 `(#:tests? #f
8270 ,@(package-arguments base)))
8271 (native-inputs `()))))
8272
8273 (define-public python-pyflakes
8274 (package
8275 (name "python-pyflakes")
8276 (version "2.2.0")
8277 (source
8278 (origin
8279 (method url-fetch)
8280 (uri (pypi-uri "pyflakes" version))
8281 (sha256
8282 (base32
8283 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8284 (build-system python-build-system)
8285 (home-page
8286 "https://github.com/pyflakes/pyflakes")
8287 (synopsis "Passive checker of Python programs")
8288 (description
8289 "Pyflakes statically checks Python source code for common errors.")
8290 (license license:expat)))
8291
8292 (define-public python2-pyflakes
8293 (package-with-python2 python-pyflakes))
8294
8295 (define-public python-mccabe
8296 (package
8297 (name "python-mccabe")
8298 (version "0.6.1")
8299 (source
8300 (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "mccabe" version))
8303 (sha256
8304 (base32
8305 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8306 (build-system python-build-system)
8307 (native-inputs
8308 `(("python-pytest" ,python-pytest-bootstrap)
8309 ("python-pytest-runner" ,python-pytest-runner)))
8310 (home-page "https://github.com/flintwork/mccabe")
8311 (synopsis "McCabe checker, plugin for flake8")
8312 (description
8313 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8314 complexity of Python source code.")
8315 (license license:expat)))
8316
8317 (define-public python2-mccabe
8318 (package-with-python2 python-mccabe))
8319
8320 (define-public python-flake8
8321 (package
8322 (name "python-flake8")
8323 (version "3.8.4")
8324 (source (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "flake8" version))
8327 (sha256
8328 (base32
8329 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8330 (build-system python-build-system)
8331 (arguments
8332 `(#:phases
8333 (modify-phases %standard-phases
8334 (delete 'check)
8335 (add-after 'install 'check
8336 (lambda* (#:key inputs outputs #:allow-other-keys)
8337 (add-installed-pythonpath inputs outputs)
8338 (invoke "pytest" "-v")
8339 #t)))))
8340 (propagated-inputs
8341 `(("python-pycodestyle" ,python-pycodestyle)
8342 ("python-entrypoints" ,python-entrypoints)
8343 ("python-pyflakes" ,python-pyflakes)
8344 ("python-mccabe" ,python-mccabe)))
8345 (native-inputs
8346 `(("python-mock" ,python-mock)
8347 ("python-pytest" ,python-pytest-bootstrap)))
8348 (home-page "https://gitlab.com/pycqa/flake8")
8349 (synopsis
8350 "The modular source code checker: pep8, pyflakes and co")
8351 (description
8352 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8353 (properties `((python2-variant . ,(delay python2-flake8))))
8354 (license license:expat)))
8355
8356 (define-public python2-flake8
8357 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8358 (package (inherit base)
8359 (propagated-inputs
8360 `(("python2-configparser" ,python2-configparser)
8361 ("python2-enum34" ,python2-enum34)
8362 ("python2-functools32" ,python2-functools32)
8363 ("python2-typing" ,python2-typing)
8364 ,@(package-propagated-inputs base))))))
8365
8366 (define-public python-flake8-bugbear
8367 (package
8368 (name "python-flake8-bugbear")
8369 (version "20.1.4")
8370 (source
8371 (origin
8372 (method url-fetch)
8373 (uri (pypi-uri "flake8-bugbear" version))
8374 (sha256
8375 (base32
8376 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8377 (build-system python-build-system)
8378 (arguments
8379 '(#:phases
8380 (modify-phases %standard-phases
8381 (add-before 'check 'disable-test
8382 (lambda _
8383 ;; This test fails on slow computers.
8384 (substitute* "tests/test_bugbear.py"
8385 (("def test_does_not_crash_on_any_valid_code")
8386 "def _test_does_not_crash_on_any_valid_code")))))))
8387 (native-inputs
8388 `(("python-hypothesis" ,python-hypothesis)
8389 ("python-hypothesmith" ,python-hypothesmith)))
8390 (propagated-inputs
8391 `(("python-attrs" ,python-attrs)
8392 ("python-flake8" ,python-flake8)))
8393 (home-page "https://github.com/PyCQA/flake8-bugbear")
8394 (synopsis
8395 "Flake8 plugin for finding likely bugs and design problems in your program")
8396 (description
8397 "This package contains a plugin for Flake8 finding likely bugs and
8398 design problems in your program. It contains warnings that don't belong
8399 in pyflakes and pycodestyle.")
8400 (license license:expat)))
8401
8402 (define-public python-flake8-polyfill
8403 (package
8404 (name "python-flake8-polyfill")
8405 (version "1.0.2")
8406 (source
8407 (origin
8408 (method url-fetch)
8409 (uri (pypi-uri "flake8-polyfill" version))
8410 (sha256
8411 (base32
8412 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8413 (build-system python-build-system)
8414 (arguments
8415 '(#:phases
8416 (modify-phases %standard-phases
8417 (replace 'check
8418 (lambda _
8419 ;; Be compatible with Pytest 4:
8420 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8421 (substitute* "setup.cfg"
8422 (("\\[pytest\\]")
8423 "[tool:pytest]"))
8424
8425 (setenv "PYTHONPATH"
8426 (string-append (getcwd) "/build/lib:"
8427 (getenv "PYTHONPATH")))
8428 (invoke "py.test" "-v"))))))
8429 (native-inputs
8430 `(("python-flake8" ,python-flake8)
8431 ("python-mock" ,python-mock)
8432 ("python-pep8" ,python-pep8)
8433 ("python-pycodestyle" ,python-pycodestyle)
8434 ("python-pytest" ,python-pytest)))
8435 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8436 (synopsis "Polyfill package for Flake8 plugins")
8437 (description
8438 "This package that provides some compatibility helpers for Flake8
8439 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8440 (license license:expat)))
8441
8442 (define-public python2-flake8-polyfill
8443 (package-with-python2 python-flake8-polyfill))
8444
8445 (define-public python-flake8-pyi
8446 (package
8447 (name "python-flake8-pyi")
8448 (version "20.5.0")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "flake8-pyi" version))
8453 (sha256
8454 (base32
8455 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8456 (build-system python-build-system)
8457 (propagated-inputs
8458 `(("python-attrs" ,python-attrs)
8459 ("python-flake8" ,python-flake8)
8460 ("python-pyflakes" ,python-pyflakes)))
8461 (home-page "https://github.com/ambv/flake8-pyi")
8462 (synopsis
8463 "Flake8 plugin that provides specializations for type hinting stub files")
8464 (description
8465 "This package contains a plugin that provides specializations for
8466 type hinting stub files, especially interesting for linting typeshed. It
8467 adds the @file{.pyi} extension to the default value of the @code{--filename}
8468 command-line argument to Flake8. This means stubs are linted by default with
8469 this plugin enabled, without needing to explicitly list every file. It
8470 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8471 expressions after the entire file has been read. This enables support for
8472 first-class forward references that stub files use.")
8473 (license license:expat)))
8474
8475 (define-public python-flake8-pie
8476 (package
8477 (name "python-flake8-pie")
8478 (version "0.5.0")
8479 (source
8480 (origin
8481 (method url-fetch)
8482 (uri (pypi-uri "flake8-pie" version))
8483 (sha256
8484 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8485 (build-system python-build-system)
8486 (home-page "https://github.com/sbdchd/flake8-pie")
8487 (synopsis "Flake8 extension that implements lints")
8488 (description
8489 "This package provides a flake8 extension that implements miscellaneous
8490 lints.")
8491 (license license:bsd-2)))
8492
8493 (define-public python-autoflake
8494 (package
8495 (name "python-autoflake")
8496 (version "1.3.1")
8497 (source
8498 (origin
8499 (method url-fetch)
8500 (uri (pypi-uri "autoflake" version))
8501 (sha256
8502 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8503 (build-system python-build-system)
8504 (propagated-inputs
8505 `(("python-pyflakes" ,python-pyflakes)))
8506 (home-page "https://github.com/myint/autoflake")
8507 (synopsis "Removes unused imports and unused variables")
8508 (description
8509 "@code{autoflake} removes unused imports and unused variables from Python
8510 code as reported by @code{pyflakes}.
8511
8512 By default, it only removes unused imports for modules that are part of the
8513 standard library. Removal of unused variables is also disabled by default.
8514 It also removes useless @code{pass} statements.")
8515 (license license:expat)))
8516
8517 (define-public python-mistune
8518 (package
8519 (name "python-mistune")
8520 (version "0.8.4")
8521 (source
8522 (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "mistune" version))
8525 (sha256
8526 (base32
8527 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8528 (build-system python-build-system)
8529 (native-inputs
8530 `(("python-nose" ,python-nose)
8531 ("python-cython" ,python-cython)))
8532 (home-page "https://github.com/lepture/mistune")
8533 (synopsis "Markdown parser in pure Python")
8534 (description "This package provides a fast markdown parser in pure
8535 Python.")
8536 (license license:bsd-3)))
8537
8538 (define-public python2-mistune
8539 (package-with-python2 python-mistune))
8540
8541 (define-public python-markdown
8542 (package
8543 (name "python-markdown")
8544 (version "3.2.1")
8545 (source
8546 (origin
8547 (method url-fetch)
8548 (uri (pypi-uri "Markdown" version))
8549 (sha256
8550 (base32
8551 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8552 (build-system python-build-system)
8553 (native-inputs
8554 `(("python-nose" ,python-nose)
8555 ("python-pyyaml" ,python-pyyaml)))
8556 (home-page "https://python-markdown.github.io/")
8557 (synopsis "Python implementation of Markdown")
8558 (description
8559 "This package provides a Python implementation of John Gruber's
8560 Markdown. The library features international input, various Markdown
8561 extensions, and several HTML output formats. A command line wrapper
8562 markdown_py is also provided to convert Markdown files to HTML.")
8563 (properties `((python2-variant . ,(delay python2-markdown))))
8564 (license license:bsd-3)))
8565
8566 ;; Markdown 3.2 dropped support for Python 2.
8567 (define-public python2-markdown
8568 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8569 (package/inherit
8570 base
8571 (version "3.1.1")
8572 (source (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "Markdown" version))
8575 (sha256
8576 (base32
8577 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8578
8579 (define-public python-ptyprocess
8580 (package
8581 (name "python-ptyprocess")
8582 (version "0.5.2")
8583 (source
8584 (origin
8585 (method url-fetch)
8586 (uri (pypi-uri "ptyprocess" version))
8587 (sha256
8588 (base32
8589 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8590 (build-system python-build-system)
8591 (native-inputs
8592 `(("python-nose" ,python-nose)))
8593 (arguments
8594 `(#:phases
8595 (modify-phases %standard-phases
8596 (replace 'check
8597 (lambda _ (invoke "nosetests"))))))
8598 (home-page "https://github.com/pexpect/ptyprocess")
8599 (synopsis "Run a subprocess in a pseudo terminal")
8600 (description
8601 "This package provides a Python library used to launch a subprocess in a
8602 pseudo terminal (pty), and interact with both the process and its pty.")
8603 (license license:isc)))
8604
8605 (define-public python2-ptyprocess
8606 (package-with-python2 python-ptyprocess))
8607
8608 (define-public python-cram
8609 (package
8610 (name "python-cram")
8611 (version "0.7")
8612 (home-page "https://bitheap.org/cram/")
8613 (source (origin
8614 (method url-fetch)
8615 (uri (list (string-append home-page "cram-"
8616 version ".tar.gz")
8617 (pypi-uri "cram" version)))
8618 (sha256
8619 (base32
8620 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8621 (arguments
8622 '(#:phases
8623 (modify-phases %standard-phases
8624 (add-after 'unpack 'patch-source
8625 (lambda _
8626 (substitute* (find-files "cram" ".*\\.py$")
8627 ;; Replace default shell path.
8628 (("/bin/sh") (which "sh")))
8629 (substitute* (find-files "tests" ".*\\.t$")
8630 (("md5") "md5sum")
8631 (("/bin/bash") (which "bash"))
8632 (("/bin/sh") (which "sh")))
8633 (substitute* "cram/_test.py"
8634 ;; This hack works around a bug triggered by substituting
8635 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8636 ;; "cram -h", which breaks the output at 80 characters. This
8637 ;; causes the line showing the default shell to break into two
8638 ;; lines, but the test expects a single line...
8639 (("env\\['COLUMNS'\\] = '80'")
8640 "env['COLUMNS'] = '160'"))
8641
8642 (substitute* "Makefile"
8643 ;; Recent versions of python-coverage have caused the test
8644 ;; coverage to decrease (as of version 0.7). Allow that.
8645 (("--fail-under=100")
8646 "--fail-under=90"))
8647
8648 #t))
8649 (replace 'check
8650 ;; The test phase uses the built library and executable.
8651 (lambda* (#:key inputs outputs #:allow-other-keys)
8652 (add-installed-pythonpath inputs outputs)
8653 (setenv "PATH" (string-append (getenv "PATH") ":"
8654 (assoc-ref outputs "out") "/bin"))
8655 (invoke "make" "test"))))))
8656 (build-system python-build-system)
8657 (native-inputs
8658 `(("python-coverage" ,python-coverage)
8659 ("which" ,which)))
8660 (synopsis "Simple testing framework for command line applications")
8661 (description
8662 "Cram is a functional testing framework for command line applications.
8663 Cram tests look like snippets of interactive shell sessions. Cram runs each
8664 command and compares the command output in the test with the command’s actual
8665 output.")
8666 (license license:gpl2+)))
8667
8668 (define-public python2-cram
8669 (package-with-python2 python-cram))
8670
8671 (define-public python-crashtest
8672 (package
8673 (name "python-crashtest")
8674 (version "0.3.1")
8675 (source
8676 (origin
8677 (method url-fetch)
8678 (uri (pypi-uri "crashtest" version))
8679 (sha256
8680 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8681 (build-system python-build-system)
8682 (home-page "https://github.com/sdispater/crashtest")
8683 (synopsis "Manage Python errors with ease")
8684 (description
8685 "Python library that makes exceptions handling and inspection easier.")
8686 (license license:expat)))
8687
8688 (define-public python-straight-plugin
8689 (package
8690 (name "python-straight-plugin")
8691 (version "1.4.1")
8692 (source
8693 (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "straight.plugin" version))
8696 (sha256
8697 (base32
8698 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8699 (build-system python-build-system)
8700 (home-page "https://github.com/ironfroggy/straight.plugin")
8701 (synopsis "Simple namespaced plugin facility")
8702 (description "Straight Plugin provides a type of plugin you can create from
8703 almost any existing Python modules, and an easy way for outside developers to
8704 add functionality and customization to your projects with their own plugins.")
8705 (license license:expat)))
8706
8707 (define-public python2-straight-plugin
8708 (package-with-python2 python-straight-plugin))
8709
8710 (define-public python-fonttools
8711 (package
8712 (name "python-fonttools")
8713 (version "4.6.0")
8714 (source (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "fonttools" version ".zip"))
8717 (sha256
8718 (base32
8719 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8720 (build-system python-build-system)
8721 (native-inputs
8722 `(("unzip" ,unzip)
8723 ("python-pytest" ,python-pytest)
8724 ("python-pytest-runner" ,python-pytest-runner)))
8725 (home-page "https://github.com/fonttools/fonttools")
8726 (synopsis "Tools to manipulate font files")
8727 (description
8728 "FontTools/TTX is a library to manipulate font files from Python. It
8729 supports reading and writing of TrueType/OpenType fonts, reading and writing
8730 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8731 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8732 from an XML-based format.")
8733 (license license:expat)))
8734
8735 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8736 (define-public python2-fonttools
8737 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8738 (package/inherit
8739 base
8740 (version "3.44.0")
8741 (source (origin
8742 (method url-fetch)
8743 (uri (pypi-uri "fonttools" version ".zip"))
8744 (sha256
8745 (base32
8746 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8747
8748 (define-public python-ly
8749 (package
8750 (name "python-ly")
8751 (version "0.9.5")
8752 (source
8753 (origin
8754 (method url-fetch)
8755 (uri (pypi-uri name version))
8756 (sha256
8757 (base32
8758 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8759 (build-system python-build-system)
8760 (arguments
8761 ;; FIXME: Some tests need network access.
8762 '(#:tests? #f))
8763 (synopsis "Tool and library for manipulating LilyPond files")
8764 (description "This package provides a Python library to parse, manipulate
8765 or create documents in LilyPond format. A command line program ly is also
8766 provided that can be used to do various manipulations with LilyPond files.")
8767 (home-page "https://pypi.org/project/python-ly/")
8768 (license license:gpl2+)))
8769
8770 (define-public python-appdirs
8771 (package
8772 (name "python-appdirs")
8773 (version "1.4.3")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "appdirs" version))
8778 (sha256
8779 (base32
8780 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8781 (build-system python-build-system)
8782 (home-page "https://github.com/ActiveState/appdirs")
8783 (synopsis
8784 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8785 (description
8786 "This module provides a portable way of finding out where user data
8787 should be stored on various operating systems.")
8788 (license license:expat)))
8789
8790 (define-public python2-appdirs
8791 (package-with-python2 python-appdirs))
8792
8793 (define-public python-gorilla
8794 (package
8795 (name "python-gorilla")
8796 (version "0.3.0")
8797 (source (origin
8798 (method url-fetch)
8799 (uri (pypi-uri "gorilla" version))
8800 (sha256
8801 (base32
8802 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8803 (build-system python-build-system)
8804 (home-page "https://github.com/christophercrouzet/gorilla")
8805 (synopsis "Convenient monkey patching with Python")
8806 (description
8807 "Gorilla is a Python library that provides a convenient approach to
8808 monkey patching. Monkey patching is the process of modifying module and
8809 class attributes at runtime with the purpose of replacing or extending
8810 third-party code.")
8811 (license license:expat)))
8812
8813 (define-public python-llfuse
8814 (package
8815 (name "python-llfuse")
8816 (version "1.3.6")
8817 (source (origin
8818 (method url-fetch)
8819 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8820 (sha256
8821 (base32
8822 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8823 (build-system python-build-system)
8824 (inputs
8825 `(("fuse" ,fuse)
8826 ("attr" ,attr)))
8827 (native-inputs
8828 `(("pkg-config" ,pkg-config)))
8829 (synopsis "Python bindings for FUSE")
8830 (description
8831 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8832 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8833 (license license:lgpl2.0+)
8834 (properties `((python2-variant . ,(delay python2-llfuse))))))
8835
8836 (define-public python2-llfuse
8837 (package (inherit (package-with-python2
8838 (strip-python2-variant python-llfuse)))
8839 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8840
8841 ;; For attic-0.16
8842 (define-public python-llfuse-0.41
8843 (package (inherit python-llfuse)
8844 (version "0.41.1")
8845 (source (origin
8846 (method url-fetch)
8847 (uri (string-append
8848 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8849 "llfuse-" version ".tar.bz2"))
8850 (sha256
8851 (base32
8852 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8853 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8854 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8855 (license (list license:expat license:lgpl2.0+))))
8856
8857 (define-public python-msgpack
8858 (package
8859 (name "python-msgpack")
8860 (version "1.0.0")
8861 (source (origin
8862 (method url-fetch)
8863 (uri (pypi-uri "msgpack" version))
8864 (sha256
8865 (base32
8866 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8867 (build-system python-build-system)
8868 (arguments
8869 `(#:modules ((guix build utils)
8870 (guix build python-build-system)
8871 (ice-9 ftw)
8872 (srfi srfi-1)
8873 (srfi srfi-26))
8874 #:phases
8875 (modify-phases %standard-phases
8876 (replace 'check
8877 (lambda _
8878 (let ((cwd (getcwd)))
8879 (setenv "PYTHONPATH"
8880 (string-append cwd "/build/"
8881 (find (cut string-prefix? "lib" <>)
8882 (scandir (string-append cwd "/build")))
8883 ":"
8884 (getenv "PYTHONPATH")))
8885 (invoke "pytest" "-v" "test")))))))
8886 (native-inputs
8887 `(("python-pytest" ,python-pytest)))
8888 (synopsis "MessagePack (de)serializer")
8889 (description "MessagePack is a fast, compact binary serialization format,
8890 suitable for similar data to JSON. This package provides CPython bindings for
8891 reading and writing MessagePack data.")
8892 (home-page "https://pypi.org/project/msgpack/")
8893 (license license:asl2.0)))
8894
8895 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8896 ;; release 0.5. Some packages like borg still call it by the old name for now.
8897 ;; <https://bugs.gnu.org/30662>
8898 (define-public python-msgpack-transitional
8899 (package
8900 (inherit python-msgpack)
8901 (name "python-msgpack-transitional")
8902 (version "0.5.6")
8903 (source (origin
8904 (method url-fetch)
8905 (uri (pypi-uri "msgpack" version))
8906 (sha256
8907 (base32
8908 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8909 (arguments
8910 (substitute-keyword-arguments (package-arguments python-msgpack)
8911 ((#:phases phases)
8912 `(modify-phases ,phases
8913 (add-after 'unpack 'configure-transitional
8914 (lambda _
8915 ;; Keep using the old name.
8916 (substitute* "setup.py"
8917 (("TRANSITIONAL = False")
8918 "TRANSITIONAL = 1"))
8919 #t))))))))
8920
8921 (define-public python2-msgpack
8922 (package-with-python2 python-msgpack))
8923
8924 (define-public python-netaddr
8925 (package
8926 (name "python-netaddr")
8927 (version "0.7.19")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (pypi-uri "netaddr" version))
8932 (sha256
8933 (base32
8934 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8935 (build-system python-build-system)
8936 (arguments `(#:tests? #f)) ;; No tests.
8937 (home-page "https://github.com/drkjam/netaddr/")
8938 (synopsis "Pythonic manipulation of network addresses")
8939 (description
8940 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8941 and MAC network addresses.")
8942 (license license:bsd-3)))
8943
8944 (define-public python2-netaddr
8945 (package-with-python2 python-netaddr))
8946
8947 (define-public python2-pyroute2
8948 (package
8949 (name "python2-pyroute2")
8950 (version "0.5.6")
8951 (source
8952 (origin
8953 (method url-fetch)
8954 (uri (pypi-uri "pyroute2" version))
8955 (sha256
8956 (base32
8957 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8958 (build-system python-build-system)
8959 (arguments
8960 `(#:python ,python-2)) ;Python 3.x is not supported
8961 (home-page "https://github.com/svinota/pyroute2")
8962 (synopsis "Python netlink library")
8963 (description
8964 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8965 Supported netlink families and protocols include:
8966 @itemize
8967 @item rtnl, network settings - addresses, routes, traffic controls
8968 @item nfnetlink - netfilter API: ipset, nftables, ...
8969 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8970 @item devlink - manage and monitor devlink-enabled hardware
8971 @item generic - generic netlink families
8972 @itemize
8973 @item nl80211 - wireless functions API (basic support)
8974 @item taskstats - extended process statistics
8975 @item acpi_events - ACPI events monitoring
8976 @item thermal_events - thermal events monitoring
8977 @item VFS_DQUOT - disk quota events monitoring
8978 @end itemize
8979 @end itemize")
8980 (license license:gpl2+)))
8981
8982 (define-public python-wrapt
8983 (package
8984 (name "python-wrapt")
8985 (version "1.11.2")
8986 (source
8987 (origin
8988 (method url-fetch)
8989 (uri (pypi-uri "wrapt" version))
8990 (sha256
8991 (base32
8992 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8993 (build-system python-build-system)
8994 (arguments
8995 ;; Tests are not included in the tarball, they are only available in the
8996 ;; git repository.
8997 `(#:tests? #f))
8998 (home-page "https://github.com/GrahamDumpleton/wrapt")
8999 (synopsis "Module for decorators, wrappers and monkey patching")
9000 (description
9001 "The aim of the wrapt module is to provide a transparent object proxy for
9002 Python, which can be used as the basis for the construction of function
9003 wrappers and decorator functions.")
9004 (license license:bsd-2)))
9005
9006 (define-public python2-wrapt
9007 (package-with-python2 python-wrapt))
9008
9009 (define-public python-commonmark
9010 (package
9011 (name "python-commonmark")
9012 (version "0.9.1")
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (pypi-uri "commonmark" version))
9017 (sha256
9018 (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
9019 (build-system python-build-system)
9020 (arguments
9021 `(#:phases
9022 (modify-phases %standard-phases
9023 (replace 'check
9024 (lambda* (#:key inputs outputs #:allow-other-keys)
9025 (add-installed-pythonpath inputs outputs)
9026 (invoke "python" "setup.py" "test"))))))
9027 (home-page "https://github.com/readthedocs/commonmark.py")
9028 (synopsis "Python parser for the CommonMark Markdown spec")
9029 (description
9030 "This module is a pure Python port of jgm's @code{commonmark.js}, a
9031 Markdown parser and renderer for the CommonMark specification, using only
9032 native modules.")
9033 (license license:bsd-3)))
9034
9035 (define-public python-xlrd
9036 (package
9037 (name "python-xlrd")
9038 (version "1.2.0")
9039 (source (origin
9040 (method url-fetch)
9041 (uri (pypi-uri "xlrd" version))
9042 (sha256
9043 (base32
9044 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
9045 (build-system python-build-system)
9046 (arguments
9047 `(#:phases
9048 (modify-phases %standard-phases
9049 ;; Some tests depend on writing a temporary file to the user's home
9050 ;; directory.
9051 (add-after 'unpack 'fix-tests
9052 (lambda _
9053 (delete-file "tests/test_open_workbook.py")
9054 #t)))))
9055 (home-page "http://www.python-excel.org/")
9056 (synopsis "Library for extracting data from Excel files")
9057 (description "This package provides a library to extract data from
9058 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
9059 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
9060 Unicode-aware. It is not intended as an end-user tool.")
9061 (license license:bsd-3)))
9062
9063 (define-public python2-xlrd
9064 (package-with-python2 python-xlrd))
9065
9066 (define-public python-immutables
9067 (package
9068 (name "python-immutables")
9069 (version "0.14")
9070 (source
9071 (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "immutables" version))
9074 (sha256
9075 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
9076 (build-system python-build-system)
9077 (home-page "https://github.com/MagicStack/immutables")
9078 (synopsis "High-performance immutable mapping type for Python")
9079 (description
9080 "An immutable mapping type for Python. The underlying datastructure is a
9081 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
9082 functional languages.")
9083 (license license:asl2.0)))
9084
9085 (define-public python-prettytable
9086 (package
9087 (name "python-prettytable")
9088 (version "0.7.2")
9089 (source
9090 (origin
9091 (method url-fetch)
9092 (uri (pypi-uri "prettytable" version ".tar.bz2"))
9093 (sha256
9094 (base32
9095 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
9096 (build-system python-build-system)
9097 (home-page "https://code.google.com/archive/p/prettytable/")
9098 (synopsis "Display tabular data in an ASCII table format")
9099 (description
9100 "A library designed to represent tabular data in visually appealing ASCII
9101 tables. PrettyTable allows for selection of which columns are to be printed,
9102 independent alignment of columns (left or right justified or centred) and
9103 printing of sub-tables by specifying a row range.")
9104 (license license:bsd-3)))
9105
9106 (define-public python2-prettytable
9107 (package-with-python2 python-prettytable))
9108
9109 (define-public python-curio
9110 (package
9111 (name "python-curio")
9112 (version "1.2")
9113 (source
9114 (origin
9115 (method url-fetch)
9116 (uri (pypi-uri "curio" version))
9117 (sha256
9118 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
9119 (build-system python-build-system)
9120 (arguments
9121 `(#:phases
9122 (modify-phases %standard-phases
9123 (replace 'check
9124 (lambda* (#:key inputs outputs #:allow-other-keys)
9125 (add-installed-pythonpath inputs outputs)
9126 (invoke "pytest" "-vv" "-k"
9127 ;; Tries to open an outgoing connection.
9128 "not test_ssl_outgoing"))))))
9129 (native-inputs
9130 `(("python-pytest" ,python-pytest)))
9131 (home-page "https://github.com/dabeaz/curio")
9132 (synopsis "Coroutine-based library for concurrent Python")
9133 (description
9134 "Curio is a coroutine-based library for concurrent Python systems
9135 programming. It provides standard programming abstractions such as as
9136 tasks, sockets, files, locks, and queues.")
9137 (license license:bsd-3)))
9138
9139 (define-public python-tables
9140 (package
9141 (name "python-tables")
9142 (version "3.6.1")
9143 (source
9144 (origin
9145 (method url-fetch)
9146 (uri (pypi-uri "tables" version))
9147 (sha256
9148 (base32
9149 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9150 (modules '((guix build utils)))
9151 (snippet
9152 '(begin
9153 ;; Remove pre-compiled .pyc files from source.
9154 (for-each delete-file-recursively
9155 (find-files "." "__pycache__" #:directories? #t))
9156 (for-each delete-file (find-files "." "\\.pyc$"))
9157 #t))))
9158 (build-system python-build-system)
9159 (arguments
9160 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9161 ;; or "check", so we must override the build and check phases.
9162 #:phases
9163 (modify-phases %standard-phases
9164 (add-after 'unpack 'use-gcc
9165 (lambda _
9166 (substitute* "setup.py"
9167 (("^( +)compiler = new_compiler\\(\\)" line indent)
9168 (string-append line
9169 "\n"
9170 indent
9171 "compiler.set_executables(compiler='gcc',"
9172 "compiler_so='gcc',"
9173 "linker_exe='gcc',"
9174 "linker_so='gcc -shared')")))
9175 #t))
9176 (add-after 'unpack 'disable-tuning
9177 (lambda _
9178 (substitute* "setup.py"
9179 (("cpu_flags = .*")
9180 "cpu_flags = ['sse2']\n"))
9181 #t))
9182 (replace 'build
9183 (lambda* (#:key inputs #:allow-other-keys)
9184 (invoke "python" "setup.py" "build"
9185 (string-append "--hdf5="
9186 (assoc-ref inputs "hdf5")))))
9187 (replace 'check
9188 (lambda* (#:key inputs #:allow-other-keys)
9189 (invoke "python" "setup.py" "check"
9190 (string-append "--hdf5="
9191 (assoc-ref inputs "hdf5"))))))))
9192 (propagated-inputs
9193 `(("python-numexpr" ,python-numexpr)
9194 ("python-numpy" ,python-numpy)))
9195 (native-inputs
9196 `(("python-cython" ,python-cython)
9197 ("pkg-config" ,pkg-config)))
9198 (inputs
9199 `(("hdf5" ,hdf5-1.10)
9200 ("bzip2" ,bzip2)
9201 ("zlib" ,zlib)))
9202 (home-page "https://www.pytables.org/")
9203 (synopsis "Hierarchical datasets for Python")
9204 (description "PyTables is a package for managing hierarchical datasets and
9205 designed to efficiently cope with extremely large amounts of data.")
9206 (license license:bsd-3)))
9207
9208 (define-public python2-tables
9209 (package-with-python2 python-tables))
9210
9211 (define-public python-sniffio
9212 (package
9213 (name "python-sniffio")
9214 (version "1.1.0")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "sniffio" version))
9219 (sha256
9220 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9221 (build-system python-build-system)
9222 (arguments
9223 `(#:phases
9224 (modify-phases %standard-phases
9225 (replace 'check
9226 (lambda _
9227 (invoke "pytest" "-vv"))))))
9228 (native-inputs
9229 `(("python-curio" ,python-curio)
9230 ("python-pytest" ,python-pytest)
9231 ("python-pytest-cov" ,python-pytest-cov)))
9232 (home-page "https://github.com/python-trio/sniffio")
9233 (synopsis "Detect which async library a program is running under")
9234 (description "This package detects which async library a program is
9235 running under. It supports multiple async I/O packages, like Trio, and
9236 asyncio.")
9237 ;; Either license applies.
9238 (license (list license:expat license:asl2.0))))
9239
9240 (define-public python-pytest-black
9241 (package
9242 (name "python-pytest-black")
9243 (version "0.3.8")
9244 (source
9245 (origin
9246 (method url-fetch)
9247 (uri (pypi-uri "pytest-black" version))
9248 (sha256
9249 (base32
9250 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9251 (build-system python-build-system)
9252 (propagated-inputs
9253 `(("python-pytest" ,python-pytest)
9254 ("python-black" ,python-black)
9255 ("python-toml" ,python-toml)))
9256 (native-inputs
9257 `(("python-setuptools-scm" ,python-setuptools-scm)))
9258 (home-page "https://github.com/shopkeep/pytest-black")
9259 (synopsis "Pytest plugin to enable format checking with black")
9260 (description
9261 "This package provides a pytest plugin to enable format checking with the
9262 Python code formatter \"black\".")
9263 (license license:expat)))
9264
9265 (define-public python-get-version
9266 (package
9267 (name "python-get-version")
9268 (version "2.1")
9269 (source
9270 (origin
9271 (method url-fetch)
9272 (uri (pypi-uri "get_version" version))
9273 (sha256
9274 (base32
9275 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9276 (build-system python-build-system)
9277 (propagated-inputs
9278 `(("python-pygments" ,python-pygments)
9279 ("python-pytest" ,python-pytest)
9280 ("python-pytest-black" ,python-pytest-black)
9281 ("python-pytest-cov" ,python-pytest-cov)
9282 ("python-setuptools" ,python-setuptools)
9283 ("python-testpath" ,python-testpath)))
9284 (home-page "https://github.com/flying-sheep/get_version")
9285 (synopsis "Version helper in the spirit of versioneer")
9286 (description
9287 "This package provides a version helper that lets you automatically use
9288 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9289 also supports getting the version from Python source distributions or, once
9290 your package is installed, via @code{pkg_resources} (part of
9291 @code{setuptools}).")
9292 (license license:gpl3+)))
9293
9294 (define-public python-legacy-api-wrap
9295 (package
9296 (name "python-legacy-api-wrap")
9297 (version "1.2")
9298 (source
9299 (origin
9300 (method url-fetch)
9301 (uri (pypi-uri "legacy-api-wrap" version))
9302 (sha256
9303 (base32
9304 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9305 (build-system python-build-system)
9306 (propagated-inputs
9307 `(("python-get-version" ,python-get-version)
9308 ("python-pytest" ,python-pytest)
9309 ("python-pytest-black" ,python-pytest-black)
9310 ("python-pytest-cov" ,python-pytest-cov)
9311 ("python-setuptools" ,python-setuptools)))
9312 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9313 (synopsis "Legacy API wrapper")
9314 (description "This module defines a decorator to wrap legacy APIs. The
9315 primary use case is APIs defined before keyword-only parameters existed.")
9316 (license license:gpl3+)))
9317
9318 (define-public python-pyasn1
9319 (package
9320 (name "python-pyasn1")
9321 (version "0.4.8")
9322 (source
9323 (origin
9324 (method url-fetch)
9325 (uri (pypi-uri "pyasn1" version))
9326 (sha256
9327 (base32
9328 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9329 (build-system python-build-system)
9330 (home-page "http://pyasn1.sourceforge.net/")
9331 (synopsis "ASN.1 types and codecs")
9332 (description
9333 "This is an implementation of ASN.1 types and codecs in Python. It is
9334 suitable for a wide range of protocols based on the ASN.1 specification.")
9335 (license license:bsd-2)))
9336
9337 (define-public python2-pyasn1
9338 (package-with-python2 python-pyasn1))
9339
9340 (define-public python-pyasn1-modules
9341 (package
9342 (name "python-pyasn1-modules")
9343 (version "0.2.2")
9344 (source
9345 (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "pyasn1-modules" version))
9348 (sha256
9349 (base32
9350 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9351 (build-system python-build-system)
9352 (propagated-inputs
9353 `(("python-pyasn1" ,python-pyasn1)))
9354 (home-page "https://sourceforge.net/projects/pyasn1/")
9355 (synopsis "ASN.1 codec implementations")
9356 (description
9357 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9358 implementations of ASN.1-based codecs and protocols.")
9359 (license license:bsd-3)))
9360
9361 (define-public python2-pyasn1-modules
9362 (package-with-python2 python-pyasn1-modules))
9363
9364 (define-public python-ipaddress
9365 (package
9366 (name "python-ipaddress")
9367 (version "1.0.22")
9368 (source (origin
9369 (method url-fetch)
9370 (uri (pypi-uri "ipaddress" version))
9371 (sha256
9372 (base32
9373 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9374 (build-system python-build-system)
9375 (home-page "https://github.com/phihag/ipaddress")
9376 (synopsis "IP address manipulation library")
9377 (description
9378 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9379 in Python. This library is used to create, poke at, and manipulate IPv4 and
9380 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9381 module to older versions of Python.")
9382 (license license:psfl)))
9383
9384 (define-public python2-ipaddress
9385 (package-with-python2 python-ipaddress))
9386
9387 (define-public python2-ipaddr
9388 (package
9389 (name "python2-ipaddr")
9390 (version "2.1.11")
9391 (source
9392 (origin
9393 (method url-fetch)
9394 (uri (pypi-uri "ipaddr" version))
9395 (sha256
9396 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9397 (build-system python-build-system)
9398 (arguments
9399 `(#:python ,python-2 ;version 2 only
9400 #:phases
9401 (modify-phases %standard-phases
9402 (replace 'check
9403 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9404 (home-page "https://github.com/google/ipaddr-py")
9405 (synopsis "IP address manipulation library")
9406 (description
9407 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9408 IPv6 addresses and networks.
9409
9410 For new implementations you may prefer to use the standard module
9411 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9412 versions of Python.")
9413 (license license:asl2.0)))
9414
9415 (define-public python-idna
9416 (package
9417 (name "python-idna")
9418 (version "2.10")
9419 (source
9420 (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "idna" version))
9423 (sha256
9424 (base32
9425 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9426 (build-system python-build-system)
9427 (home-page "https://github.com/kjd/idna")
9428 (synopsis "Internationalized domain names in applications")
9429 (description
9430 "This is a library to support the Internationalised Domain Names in
9431 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9432 protocol is often referred to as “IDNA2008” and can produce different results
9433 from the earlier standard from 2003. The library is also intended to act as a
9434 suitable drop-in replacement for the “encodings.idna” module that comes with
9435 the Python standard library but currently only supports the older 2003
9436 specification.")
9437 (license license:bsd-4)))
9438
9439 (define-public python-idna-2.7
9440 (package (inherit python-idna)
9441 (version "2.7")
9442 (source (origin
9443 (method url-fetch)
9444 (uri (pypi-uri "idna" version))
9445 (sha256
9446 (base32
9447 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9448
9449
9450 (define-public python2-idna
9451 (package-with-python2 python-idna))
9452
9453 (define-public python-libsass
9454 (package
9455 (name "python-libsass")
9456 (version "0.20.1")
9457 (source
9458 (origin
9459 ;; PyPI tarball is missing some test files.
9460 (method git-fetch)
9461 (uri (git-reference
9462 (url "https://github.com/sass/libsass-python")
9463 (commit version)))
9464 (file-name (git-file-name name version))
9465 (sha256
9466 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9467 (build-system python-build-system)
9468 (arguments
9469 `(#:phases
9470 (modify-phases %standard-phases
9471 ;; Use Guix package of libsass instead of compiling from a checkout.
9472 (add-before 'build 'set-libsass
9473 (lambda _
9474 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9475 #t))
9476 (replace 'check
9477 (lambda* (#:key inputs outputs #:allow-other-keys)
9478 (add-installed-pythonpath inputs outputs)
9479 (invoke "pytest" "sasstests.py"))))))
9480 (native-inputs
9481 `(("python-pytest" ,python-pytest)
9482 ("python-werkzeug" ,python-werkzeug)))
9483 (inputs
9484 `(("libsass" ,libsass)))
9485 (propagated-inputs
9486 `(("python-six" ,python-six)))
9487 (home-page "https://sass.github.io/libsass-python/")
9488 (synopsis "Straightforward binding of libsass for Python")
9489 (description
9490 "This package provides a simple Python extension module @code{sass} which
9491 is binding LibSass.")
9492 (license license:expat)))
9493
9494 (define-public python-idna-ssl
9495 (package
9496 (name "python-idna-ssl")
9497 (version "1.0.1")
9498 (source
9499 (origin
9500 (method url-fetch)
9501 (uri (pypi-uri "idna-ssl" version))
9502 (sha256
9503 (base32
9504 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9505 (build-system python-build-system)
9506 (arguments
9507 `(#:tests? #f)) ;circular dependency with python-aiohttp
9508 (home-page "https://github.com/aio-libs/idna-ssl")
9509 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9510 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9511 domains support.")
9512 (license license:expat)))
9513
9514 (define-public python-pretend
9515 (package
9516 (name "python-pretend")
9517 (version "1.0.9")
9518 (source
9519 (origin
9520 (method url-fetch)
9521 (uri (pypi-uri "pretend" version))
9522 (sha256
9523 (base32
9524 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9525 (build-system python-build-system)
9526 (home-page "https://github.com/alex/pretend")
9527 (synopsis "Library for stubbing in Python")
9528 (description
9529 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9530 technique for writing tests. You may hear the term mixed up with mocks,
9531 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9532 responses, rather than doing any computation.")
9533 (license license:bsd-3)))
9534
9535 (define-public python2-pretend
9536 (package-with-python2 python-pretend))
9537
9538 (define-public python-pip
9539 (package
9540 (name "python-pip")
9541 (version "20.0.2")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "pip" version))
9546 (sha256
9547 (base32
9548 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9549 (build-system python-build-system)
9550 (arguments
9551 '(#:tests? #f)) ; there are no tests in the pypi archive.
9552 (home-page "https://pip.pypa.io/")
9553 (synopsis "Package manager for Python software")
9554 (description
9555 "Pip is a package manager for Python software, that finds packages on the
9556 Python Package Index (PyPI).")
9557 (license license:expat)))
9558
9559 (define-public python2-pip
9560 (package-with-python2 python-pip))
9561
9562 (define-public python-tlsh
9563 (package
9564 (name "python-tlsh")
9565 (version "3.4.5")
9566 (home-page "https://github.com/trendmicro/tlsh")
9567 (source
9568 (origin
9569 (method git-fetch)
9570 (uri (git-reference
9571 (url "https://github.com/trendmicro/tlsh")
9572 (commit (string-append "v" version))))
9573 (file-name (git-file-name name version))
9574 (sha256
9575 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9576 (build-system cmake-build-system)
9577 (arguments
9578 '(#:out-of-source? #f
9579 #:phases (modify-phases %standard-phases
9580 (replace
9581 'install
9582 (lambda* (#:key outputs #:allow-other-keys)
9583 ;; Build and install the Python bindings. The underlying
9584 ;; C++ library is apparently not meant to be installed.
9585 (let ((out (assoc-ref outputs "out")))
9586 (with-directory-excursion "py_ext"
9587 (and (system* "python" "setup.py" "build")
9588 (system* "python" "setup.py" "install"
9589 (string-append "--prefix=" out))))))))))
9590 (inputs `(("python" ,python-wrapper))) ;for the bindings
9591 (synopsis "Fuzzy matching library for Python")
9592 (description
9593 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9594 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9595 value which can be used for similarity comparisons. Similar objects have
9596 similar hash values, which allows for the detection of similar objects by
9597 comparing their hash values. The byte stream should have a sufficient amount
9598 of complexity; for example, a byte stream of identical bytes will not generate
9599 a hash value.")
9600 (license license:asl2.0)))
9601
9602 (define-public python2-tlsh
9603 (package
9604 (inherit python-tlsh)
9605 (name "python2-tlsh")
9606 (inputs `(("python" ,python-2)))))
9607
9608 (define-public python-termcolor
9609 (package
9610 (name "python-termcolor")
9611 (version "1.1.0")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (pypi-uri "termcolor" version))
9616 (sha256
9617 (base32
9618 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9619 (build-system python-build-system)
9620 (arguments
9621 ;; There are no tests.
9622 `(#:tests? #f))
9623 (home-page "https://pypi.org/project/termcolor/")
9624 (synopsis "ANSII Color formatting for terminal output")
9625 (description
9626 "This package provides ANSII Color formatting for output in terminals.")
9627 (license license:expat)))
9628
9629 (define-public python2-termcolor
9630 (package-with-python2 python-termcolor))
9631
9632 (define-public python-terminaltables
9633 (package
9634 (name "python-terminaltables")
9635 (version "3.1.0")
9636 (source
9637 (origin
9638 (method url-fetch)
9639 (uri (pypi-uri "terminaltables" version))
9640 (sha256
9641 (base32
9642 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9643 (build-system python-build-system)
9644 (home-page "https://github.com/Robpol86/terminaltables")
9645 (synopsis
9646 "Generate simple tables in terminals from a nested list of strings")
9647 (description
9648 "This package makes it easy to draw tables in terminal/console
9649 applications from a list of lists of strings. It supports multi-line rows.")
9650 (license license:expat)))
9651
9652 (define-public python-libarchive-c
9653 (package
9654 (name "python-libarchive-c")
9655 (version "2.9")
9656 (source (origin
9657 (method url-fetch)
9658 (uri (pypi-uri "libarchive-c" version))
9659 (sha256
9660 (base32
9661 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9662 (build-system python-build-system)
9663 (arguments
9664 '(#:phases (modify-phases %standard-phases
9665 (add-before
9666 'build 'reference-libarchive
9667 (lambda* (#:key inputs #:allow-other-keys)
9668 ;; Retain the absolute file name of libarchive.so.
9669 (let ((libarchive (assoc-ref inputs "libarchive")))
9670 (substitute* "libarchive/ffi.py"
9671 (("find_library\\('archive'\\)")
9672 (string-append "'" libarchive
9673 "/lib/libarchive.so'"))))))
9674 (replace 'check
9675 (lambda _ (invoke "pytest" "-vv"))))))
9676 (native-inputs
9677 `(("python-mock" ,python-mock)
9678 ("python-pytest" ,python-pytest)))
9679 (inputs
9680 `(("libarchive" ,libarchive)))
9681 (home-page "https://github.com/Changaco/python-libarchive-c")
9682 (synopsis "Python interface to libarchive")
9683 (description
9684 "This package provides Python bindings to libarchive, a C library to
9685 access possibly compressed archives in many different formats. It uses
9686 Python's @code{ctypes} foreign function interface (FFI).")
9687 (license license:lgpl2.0+)))
9688
9689 (define-public python2-libarchive-c
9690 (package-with-python2 python-libarchive-c))
9691
9692 (define-public python-file
9693 (package
9694 (inherit file)
9695 (name "python-file")
9696 (build-system python-build-system)
9697 (arguments
9698 '(#:tests? #f ;no tests
9699 #:configure-flags '("--single-version-externally-managed" "--root=/")
9700 #:phases (modify-phases %standard-phases
9701 (add-before 'build 'change-directory
9702 (lambda _
9703 (chdir "python")
9704 #t))
9705 (add-before 'build 'set-library-file-name
9706 (lambda* (#:key inputs #:allow-other-keys)
9707 (let ((file (assoc-ref inputs "file")))
9708 (substitute* "magic.py"
9709 (("find_library\\('magic'\\)")
9710 (string-append "'" file "/lib/libmagic.so'")))
9711 #t))))))
9712 (inputs `(("file" ,file)))
9713 (native-inputs (if (%current-target-system)
9714 `(("self" ,this-package))
9715 '()))
9716 (synopsis "Python bindings to the libmagic file type guesser")
9717 (description "This package provides Python bindings to the libmagic file
9718 type guesser.
9719
9720 Note that this module and the @code{python-magic} module both provide a
9721 @file{magic.py} file; these two modules, which are different and were
9722 developed separately, both serve the same purpose: provide Python bindings for
9723 libmagic.")))
9724
9725 (define-public python2-file
9726 (package-with-python2 python-file))
9727
9728 (define-public python-debian
9729 (package
9730 (name "python-debian")
9731 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9732 (version "0.1.36")
9733 (source
9734 (origin
9735 ;; Use git-fetch, as pypi doesn't include test suite.
9736 (method git-fetch)
9737 (uri (git-reference
9738 (url home-page)
9739 (commit version)))
9740 (file-name (git-file-name name version))
9741 (sha256
9742 (base32
9743 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9744 (build-system python-build-system)
9745 (arguments
9746 `(#:phases (modify-phases %standard-phases
9747 (add-after 'unpack 'remove-debian-specific-tests
9748 ;; python-apt, apt and dpkg are not yet available in guix,
9749 ;; and these tests heavily depend on them.
9750 (lambda _
9751 (delete-file "lib/debian/tests/test_deb822.py")
9752 (delete-file "lib/debian/tests/test_debfile.py")
9753 #t)))))
9754 (propagated-inputs
9755 `(("python-six" ,python-six)
9756 ("python-chardet" ,python-chardet)))
9757 (synopsis "Debian package related modules")
9758 (description
9759 ;; XXX: Use @enumerate instead of @itemize to work around
9760 ;; <http://bugs.gnu.org/21772>.
9761 "This package provides Python modules that abstract many formats of
9762 Debian-related files, such as:
9763
9764 @enumerate
9765 @item Debtags information;
9766 @item @file{debian/changelog} files;
9767 @item packages files, pdiffs;
9768 @item control files of single or multiple RFC822-style paragraphs---e.g.
9769 @file{debian/control}, @file{.changes}, @file{.dsc};
9770 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9771 contained files and meta-information.
9772 @end enumerate\n")
9773
9774 ;; Modules are either GPLv2+ or GPLv3+.
9775 (license license:gpl3+)))
9776
9777 (define-public python-nbformat
9778 (package
9779 (name "python-nbformat")
9780 (version "4.4.0")
9781 (source
9782 (origin
9783 (method url-fetch)
9784 (uri (pypi-uri "nbformat" version))
9785 (sha256
9786 (base32
9787 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9788 (build-system python-build-system)
9789 (arguments `(#:tests? #f)) ; no test target
9790 (propagated-inputs
9791 `(("python-ipython-genutils" ,python-ipython-genutils)
9792 ("python-jsonschema" ,python-jsonschema)
9793 ("python-jupyter-core" ,python-jupyter-core)
9794 ("python-traitlets" ,python-traitlets)))
9795 (home-page "http://jupyter.org")
9796 (synopsis "Jupyter Notebook format")
9797 (description "This package provides the reference implementation of the
9798 Jupyter Notebook format and Python APIs for working with notebooks.")
9799 (license license:bsd-3)))
9800
9801 (define-public python2-nbformat
9802 (package-with-python2 python-nbformat))
9803
9804 (define-public python-bleach
9805 (package
9806 (name "python-bleach")
9807 (version "3.1.5")
9808 (source
9809 (origin
9810 (method url-fetch)
9811 (uri (pypi-uri "bleach" version))
9812 (sha256
9813 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9814 (build-system python-build-system)
9815 (propagated-inputs
9816 `(("python-webencodings" ,python-webencodings)
9817 ("python-six" ,python-six)))
9818 (native-inputs
9819 `(("python-datrie" ,python-datrie)
9820 ("python-genshi" ,python-genshi)
9821 ("python-lxml" ,python-lxml)
9822 ("python-pytest" ,python-pytest)))
9823 (home-page "https://github.com/mozilla/bleach")
9824 (synopsis "Whitelist-based HTML-sanitizing tool")
9825 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9826 (license license:asl2.0)))
9827
9828 (define-public python2-bleach
9829 (package-with-python2 python-bleach))
9830
9831 (define-public python-entrypoints
9832 (package
9833 (name "python-entrypoints")
9834 (version "0.3")
9835 (source
9836 (origin
9837 (method url-fetch)
9838 (uri (pypi-uri "entrypoints" version))
9839 (sha256
9840 (base32
9841 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9842 (build-system python-build-system)
9843 ;; The package does not come with a setup.py file, so we have to generate
9844 ;; one ourselves.
9845 (arguments
9846 `(#:tests? #f
9847 #:phases
9848 (modify-phases %standard-phases
9849 (add-after 'unpack 'create-setup.py
9850 (lambda _
9851 (call-with-output-file "setup.py"
9852 (lambda (port)
9853 (format port "\
9854 from setuptools import setup
9855 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9856 " ,version))))))))
9857 (home-page "https://github.com/takluyver/entrypoints")
9858 (synopsis "Discover and load entry points from installed Python packages")
9859 (description "Entry points are a way for Python packages to advertise
9860 objects with some common interface. The most common examples are
9861 @code{console_scripts} entry points, which define shell commands by
9862 identifying a Python function to run. The @code{entrypoints} module contains
9863 functions to find and load entry points.")
9864 (license license:expat)))
9865
9866 (define-public python2-entrypoints
9867 (package-with-python2 python-entrypoints))
9868
9869 (define-public python-epc
9870 (package
9871 (name "python-epc")
9872 (version "0.0.5")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "epc" version))
9877 (sha256
9878 (base32
9879 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9880 (build-system python-build-system)
9881 (propagated-inputs
9882 `(("python-sexpdata" ,python-sexpdata)))
9883 (native-inputs
9884 `(("python-nose" ,python-nose)))
9885 (home-page "https://github.com/tkf/python-epc")
9886 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9887 (description
9888 "Python-EPC can call elisp functions from Python and Python functions
9889 from elisp.")
9890 (license license:gpl3)))
9891
9892 (define-public python-forex-python
9893 (package
9894 (name "python-forex-python")
9895 (version "1.5")
9896 (source
9897 (origin
9898 (method url-fetch)
9899 (uri (pypi-uri "forex-python" version))
9900 (sha256
9901 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9902 (build-system python-build-system)
9903 (arguments
9904 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9905 ;; repository require online data.
9906 `(#:tests? #f))
9907 (propagated-inputs
9908 `(("python-requests" ,python-requests)
9909 ("python-simplejson" ,python-simplejson)))
9910 (home-page "https://github.com/MicroPyramid/forex-python")
9911 (synopsis "Foreign exchange rates and currency conversion")
9912 (description
9913 "@code{python-forex-python} can be used to manipulate foreign
9914 exchange rates and to operate currency conversions.
9915
9916 Features:
9917 @itemize
9918 @item List all currency rates.
9919 @item BitCoin price for all currencies.
9920 @item Converting amount to BitCoins.
9921 @item Get historical rates for any day since 1999.
9922 @item Conversion rate for one currency(ex; USD to INR).
9923 @item Convert amount from one currency to other.('USD 10$' to INR).
9924 @item Currency symbols.
9925 @item Currency names.
9926 @end itemize")
9927 (license license:expat)))
9928
9929 (define-public python-simpleeval
9930 (package
9931 (name "python-simpleeval")
9932 (version "0.9.10")
9933 (source
9934 (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "simpleeval" version))
9937 (sha256
9938 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9939 (build-system python-build-system)
9940 (home-page "https://github.com/danthedeckie/simpleeval")
9941 (synopsis "Simple, safe single expression evaluator library")
9942 (description
9943 "This package provides a quick single file library for easily adding
9944 evaluatable expressions into python projects. Say you want to allow a user
9945 to set an alarm volume, which could depend on the time of day, alarm level,
9946 how many previous alarms had gone off, and if there is music playing at the
9947 time.")
9948 (license license:expat)))
9949
9950 (define-public python-nbconvert
9951 (package
9952 (name "python-nbconvert")
9953 (version "5.0.0b1")
9954 (source
9955 (origin
9956 (method url-fetch)
9957 (uri (pypi-uri "nbconvert" version))
9958 (sha256
9959 (base32
9960 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9961 (build-system python-build-system)
9962 (arguments
9963 `(;; The "bdist_egg" target is disabled by default, causing the installation
9964 ;; to fail.
9965 #:configure-flags (list "bdist_egg")
9966 ;; FIXME: 5 failures, 40 errors.
9967 #:tests? #f))
9968 ;; #:phases
9969 ;; (modify-phases %standard-phases
9970 ;; (replace 'check
9971 ;; (lambda _
9972 ;; (zero? (system* "py.test" "-v")))))
9973 (native-inputs
9974 `(("python-pytest" ,python-pytest)))
9975 (propagated-inputs
9976 `(("python-bleach" ,python-bleach)
9977 ("python-entrypoints" ,python-entrypoints)
9978 ("python-jinja2" ,python-jinja2)
9979 ("python-jupyter-core" ,python-jupyter-core)
9980 ("python-mistune" ,python-mistune)
9981 ("python-nbformat" ,python-nbformat)
9982 ("python-pygments" ,python-pygments)
9983 ("python-traitlets" ,python-traitlets)))
9984 (home-page "http://jupyter.org")
9985 (synopsis "Converting Jupyter Notebooks")
9986 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9987 notebooks to various other formats via Jinja templates. It allows you to
9988 convert an @code{.ipynb} notebook file into various static formats including:
9989
9990 @enumerate
9991 @item HTML
9992 @item LaTeX
9993 @item PDF
9994 @item Reveal JS
9995 @item Markdown (md)
9996 @item ReStructured Text (rst)
9997 @item executable script
9998 @end enumerate\n")
9999 (license license:bsd-3)))
10000
10001 (define-public python2-nbconvert
10002 (package-with-python2 python-nbconvert))
10003
10004 (define-public python-notebook
10005 (package
10006 (name "python-notebook")
10007 (version "5.7.4")
10008 (source (origin
10009 (method url-fetch)
10010 (uri (pypi-uri "notebook" version))
10011 (sha256
10012 (base32
10013 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
10014 (build-system python-build-system)
10015 (arguments
10016 `(#:phases
10017 (modify-phases %standard-phases
10018 (replace 'check
10019 (lambda _
10020 ;; These tests require a browser
10021 (delete-file-recursively "notebook/tests/selenium")
10022 ;; Some tests need HOME
10023 (setenv "HOME" "/tmp")
10024 ;; This file contains "warningfilters", which are not supported
10025 ;; by this version of nose.
10026 (delete-file "setup.cfg")
10027 (with-directory-excursion "/tmp"
10028 (invoke "nosetests" "-v"))
10029 #t)))))
10030 (propagated-inputs
10031 `(("python-jupyter-core" ,python-jupyter-core)
10032 ("python-nbformat" ,python-nbformat)
10033 ("python-nbconvert" ,python-nbconvert)
10034 ("python-prometheus-client" ,python-prometheus-client)
10035 ("python-send2trash" ,python-send2trash)
10036 ("python-terminado" ,python-terminado)))
10037 (native-inputs
10038 `(("python-nose" ,python-nose)
10039 ("python-sphinx" ,python-sphinx)
10040 ("python-requests" ,python-requests)))
10041 (home-page "http://jupyter.org/")
10042 (synopsis "Web-based notebook environment for interactive computing")
10043 (description
10044 "The Jupyter HTML notebook is a web-based notebook environment for
10045 interactive computing.")
10046 (properties `((python2-variant . ,(delay python2-notebook))))
10047 (license license:bsd-3)))
10048
10049 (define-public python2-notebook
10050 (let ((base (package-with-python2
10051 (strip-python2-variant python-notebook))))
10052 (package (inherit base)
10053 (native-inputs
10054 `(("python2-mock" ,python2-mock)
10055 ,@(package-native-inputs base)))
10056 (arguments
10057 (substitute-keyword-arguments (package-arguments base)
10058 ((#:phases phases)
10059 `(modify-phases ,phases
10060 (add-before 'check 'disable-test-case
10061 ;; The test requires network access to localhost. Curiously it
10062 ;; fails with Python 2 only. Simply make the test-case return
10063 ;; immediately.
10064 (lambda _
10065 (substitute*
10066 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
10067 (("formats = self.nbconvert_api") "return #")))))))))))
10068
10069 (define-public python-widgetsnbextension
10070 (package
10071 (name "python-widgetsnbextension")
10072 (version "3.5.1")
10073 (source
10074 (origin
10075 (method url-fetch)
10076 (uri (pypi-uri "widgetsnbextension" version))
10077 (sha256
10078 (base32
10079 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
10080 (build-system python-build-system)
10081 (propagated-inputs
10082 `(("python-ipykernel" ,python-ipykernel)
10083 ("python-notebook" ,python-notebook)))
10084 (native-inputs
10085 `(("python-certifi" ,python-certifi)
10086 ("python-nose" ,python-nose)))
10087 (home-page "https://ipython.org")
10088 (synopsis "IPython HTML widgets for Jupyter")
10089 (description "This package provides interactive HTML widgets for Jupyter
10090 notebooks.")
10091 (license license:bsd-3)))
10092
10093 (define-public python2-widgetsnbextension
10094 (package-with-python2 python-widgetsnbextension))
10095
10096 (define-public python-ipywidgets
10097 (package
10098 (name "python-ipywidgets")
10099 (version "7.5.1")
10100 (source
10101 (origin
10102 (method url-fetch)
10103 (uri (pypi-uri "ipywidgets" version))
10104 (sha256
10105 (base32
10106 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
10107 (build-system python-build-system)
10108 (propagated-inputs
10109 `(("python-ipython" ,python-ipython)
10110 ("python-traitlets" ,python-traitlets)
10111 ("python-widgetsnbextension" ,python-widgetsnbextension)))
10112 (native-inputs
10113 `(("python-nose" ,python-nose)
10114 ("python-pytest" ,python-pytest)))
10115 (home-page "https://ipython.org")
10116 (synopsis "IPython HTML widgets for Jupyter")
10117 (description "Ipywidgets are interactive HTML widgets for Jupyter
10118 notebooks and the IPython kernel. Notebooks come alive when interactive
10119 widgets are used. Users gain control of their data and can visualize changes
10120 in the data.")
10121 (license license:bsd-3)))
10122
10123 (define-public python2-ipywidgets
10124 (package-with-python2 python-ipywidgets))
10125
10126 (define-public python-jupyter-console
10127 (package
10128 (name "python-jupyter-console")
10129 (version "6.1.0")
10130 (source
10131 (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "jupyter_console" version))
10134 (sha256
10135 (base32
10136 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10137 (build-system python-build-system)
10138 (propagated-inputs
10139 `(("python-ipykernel" ,python-ipykernel)
10140 ("python-jupyter-client" ,python-jupyter-client)
10141 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10142 ("python-pygments" ,python-pygments)))
10143 (native-inputs
10144 `(("python-nose" ,python-nose)))
10145 (home-page "https://jupyter.org")
10146 (synopsis "Jupyter terminal console")
10147 (description "This package provides a terminal-based console frontend for
10148 Jupyter kernels. It also allows for console-based interaction with non-Python
10149 Jupyter kernels such as IJulia and IRKernel.")
10150 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10151 (license license:bsd-3)))
10152
10153 (define-public python2-jupyter-console
10154 (package
10155 (name "python2-jupyter-console")
10156 (version "5.2.0")
10157 (source
10158 (origin
10159 (method url-fetch)
10160 (uri (pypi-uri "jupyter_console" version))
10161 (sha256
10162 (base32
10163 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10164 (build-system python-build-system)
10165 (arguments
10166 `(#:python ,python-2
10167 #:tests? #f)) ; Tests only run in a TTY.
10168 (propagated-inputs
10169 `(("python2-ipykernel" ,python2-ipykernel)
10170 ("python2-jupyter-client" ,python2-jupyter-client)
10171 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10172 ("python2-pygments" ,python2-pygments)))
10173 (native-inputs
10174 `(("python2-nose" ,python2-nose)))
10175 (home-page "https://jupyter.org")
10176 (synopsis "Jupyter terminal console")
10177 (description "This package provides a terminal-based console frontend for
10178 Jupyter kernels. It also allows for console-based interaction with non-Python
10179 Jupyter kernels such as IJulia and IRKernel.")
10180 (license license:bsd-3)))
10181
10182 ;; The python-ipython and python-jupyter-console require each other. To get
10183 ;; the functionality in both packages working, strip down the
10184 ;; python-jupyter-console package when using it as an input to python-ipython.
10185 (define python-jupyter-console-minimal
10186 (package
10187 (inherit python-jupyter-console)
10188 (name "python-jupyter-console-minimal")
10189 (arguments
10190 (substitute-keyword-arguments
10191 (package-arguments python-jupyter-console)
10192 ((#:phases phases)
10193 `(modify-phases ,phases
10194 (add-after 'install 'delete-bin
10195 (lambda* (#:key outputs #:allow-other-keys)
10196 ;; Delete the bin files, to avoid conflicts in profiles
10197 ;; where python-ipython and python-jupyter-console are
10198 ;; both present.
10199 (delete-file-recursively
10200 (string-append
10201 (assoc-ref outputs "out") "/bin"))))))))
10202 ;; Remove the python-ipython propagated input, to avoid the cycle
10203 (propagated-inputs
10204 (alist-delete
10205 "python-ipython"
10206 (package-propagated-inputs python-jupyter-console)))))
10207
10208 (define-public python-qtconsole
10209 (package
10210 (name "python-qtconsole")
10211 (version "4.4.3")
10212 (source
10213 (origin
10214 (method url-fetch)
10215 (uri (pypi-uri "qtconsole" version))
10216 (sha256
10217 (base32
10218 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10219 (build-system python-build-system)
10220 (arguments
10221 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10222 ;; but we only have the LTS version 5.x. This means that there might be
10223 ;; runtime errors, but since this is a dependency of the Jupyter package,
10224 ;; and Jupyter can be used without the qtconsole we can overlook this for
10225 ;; now.
10226 `(#:tests? #f
10227 #:phases
10228 (modify-phases %standard-phases
10229 (add-before 'check 'pre-check
10230 (lambda _
10231 (setenv "QT_QPA_PLATFORM" "offscreen")
10232 #t)))))
10233 (propagated-inputs
10234 `(("python-ipykernel" ,python-ipykernel)
10235 ("python-ipython" ,python-ipython)))
10236 (native-inputs
10237 `(("python-pytest" ,python-pytest)))
10238 (home-page "http://jupyter.org")
10239 (synopsis "Jupyter Qt console")
10240 (description "This package provides a Qt-based console for Jupyter with
10241 support for rich media output.")
10242 (license license:bsd-3)))
10243
10244 (define-public python-jsbeautifier
10245 (package
10246 (name "python-jsbeautifier")
10247 (version "1.10.2")
10248 (home-page "https://github.com/beautify-web/js-beautify")
10249 (source (origin
10250 (method git-fetch)
10251 (uri (git-reference
10252 (url home-page)
10253 (commit (string-append "v" version))))
10254 (file-name (git-file-name name version))
10255 (sha256
10256 (base32
10257 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10258 (build-system python-build-system)
10259 (arguments
10260 `(#:phases (modify-phases %standard-phases
10261 (add-after 'unpack 'chdir
10262 (lambda _
10263 ;; The upstream Git repository contains all the code,
10264 ;; but this package only builds the python code.
10265 (chdir "python")
10266 #t))
10267 (add-after 'unpack 'patch-python-six-requirements
10268 (lambda _
10269 (substitute* "python/setup.py"
10270 (("six>=1.12.0")
10271 "six>=1.11.0"))
10272 #t)))))
10273 (propagated-inputs
10274 `(("python-editorconfig" ,python-editorconfig)
10275 ("python-six" ,python-six)))
10276 (native-inputs
10277 `(("python-pytest" ,python-pytest)))
10278 (synopsis "JavaScript unobfuscator and beautifier")
10279 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10280 popular online obfuscators.")
10281 (license license:expat)))
10282
10283 (define-public jupyter
10284 (package
10285 (name "jupyter")
10286 (version "1.0.0")
10287 (source
10288 (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "jupyter" version))
10291 (sha256
10292 (base32
10293 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10294 (build-system python-build-system)
10295 (arguments '(#:tests? #f)) ; there are none.
10296 (propagated-inputs
10297 `(("python-ipykernel" ,python-ipykernel)
10298 ("python-ipywidgets" ,python-ipywidgets)
10299 ("python-jupyter-console" ,python-jupyter-console)
10300 ("python-nbconvert" ,python-nbconvert)
10301 ("python-notebook" ,python-notebook)
10302 ("python-qtconsole" ,python-qtconsole)))
10303 (native-search-paths
10304 (list (search-path-specification
10305 (variable "JUPYTER_PATH")
10306 (files '("share/jupyter")))))
10307 (home-page "https://jupyter.org")
10308 (synopsis "Web application for interactive documents")
10309 (description
10310 "The Jupyter Notebook is a web application that allows you to create and
10311 share documents that contain live code, equations, visualizations and
10312 explanatory text. Uses include: data cleaning and transformation, numerical
10313 simulation, statistical modeling, machine learning and much more.")
10314 (license license:bsd-3)))
10315
10316 (define-public python-chardet
10317 (package
10318 (name "python-chardet")
10319 (version "3.0.4")
10320 (source
10321 (origin
10322 (method url-fetch)
10323 (uri (pypi-uri "chardet" version))
10324 (sha256
10325 (base32
10326 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10327 (native-inputs
10328 `(("python-hypothesis" ,python-hypothesis)
10329 ("python-pytest" ,python-pytest)
10330 ("python-pytest-runner" ,python-pytest-runner)))
10331 (build-system python-build-system)
10332 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10333 (arguments `(#:tests? #f))
10334 (home-page "https://github.com/chardet/chardet")
10335 (synopsis "Universal encoding detector for Python 2 and 3")
10336 (description
10337 "This package provides @code{chardet}, a Python module that can
10338 automatically detect a wide range of file encodings.")
10339 (license license:lgpl2.1+)))
10340
10341 (define-public python2-chardet
10342 (package-with-python2 python-chardet))
10343
10344 (define-public python-docopt
10345 (package
10346 (name "python-docopt")
10347 (version "0.6.2")
10348 (source
10349 (origin
10350 (method git-fetch)
10351 ;; The release on PyPI does not include tests.
10352 (uri (git-reference
10353 (url "https://github.com/docopt/docopt")
10354 (commit version)))
10355 (file-name (git-file-name name version))
10356 (sha256
10357 (base32
10358 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10359 (build-system python-build-system)
10360 (native-inputs
10361 `(("python-pytest" ,python-pytest)))
10362 (arguments
10363 `(#:phases
10364 (modify-phases %standard-phases
10365 (replace 'check
10366 (lambda _ (invoke "py.test"))))))
10367 (home-page "http://docopt.org")
10368 (synopsis "Command-line interface description language for Python")
10369 (description "This library allows the user to define a command-line
10370 interface from a program's help message rather than specifying it
10371 programmatically with command-line parsers like @code{getopt} and
10372 @code{argparse}.")
10373 (license license:expat)))
10374
10375 (define-public python2-docopt
10376 (package-with-python2 python-docopt))
10377
10378 (define-public python-pythondialog
10379 (package
10380 (name "python-pythondialog")
10381 (version "3.4.0")
10382 (source
10383 (origin
10384 (method url-fetch)
10385 (uri (pypi-uri "pythondialog" version))
10386 (sha256
10387 (base32
10388 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10389 (build-system python-build-system)
10390 (arguments
10391 `(#:phases
10392 (modify-phases %standard-phases
10393 (add-after 'unpack 'patch-path
10394 (lambda* (#:key inputs #:allow-other-keys)
10395 (let* ((dialog (assoc-ref inputs "dialog")))
10396 ;; Since this library really wants to grovel the search path, we
10397 ;; must hardcode dialog's store path into it.
10398 (substitute* "dialog.py"
10399 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10400 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10401 #t))))
10402 #:tests? #f)) ; no test suite
10403 (propagated-inputs
10404 `(("dialog" ,dialog)))
10405 (home-page "http://pythondialog.sourceforge.net/")
10406 (synopsis "Python interface to the UNIX dialog utility")
10407 (description "A Python wrapper for the dialog utility. Its purpose is to
10408 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10409 This allows one to make simple text-mode user interfaces on Unix-like systems")
10410 (license license:lgpl2.1)
10411 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10412
10413 (define-public python2-pythondialog
10414 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10415 (package
10416 (inherit base)
10417 (version (package-version python-pythondialog))
10418 (source (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "python2-pythondialog" version))
10421 (sha256
10422 (base32
10423 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10424
10425 (define-public python-configobj
10426 (package
10427 (name "python-configobj")
10428 (version "5.0.6")
10429 (source (origin
10430 (method url-fetch)
10431 (uri (pypi-uri "configobj" version))
10432 (sha256
10433 (base32
10434 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10435 ;; Patch setup.py so it looks for python-setuptools, which is
10436 ;; required to parse the keyword 'install_requires' in setup.py.
10437 (patches (search-patches "python-configobj-setuptools.patch"))))
10438 (build-system python-build-system)
10439 (propagated-inputs
10440 `(("python-six" ,python-six)))
10441 (synopsis "Config file reading, writing and validation")
10442 (description "ConfigObj is a simple but powerful config file reader and
10443 writer: an ini file round tripper. Its main feature is that it is very easy to
10444 use, with a straightforward programmer’s interface and a simple syntax for
10445 config files.")
10446 (home-page "https://github.com/DiffSK/configobj")
10447 (license license:bsd-3)))
10448
10449 (define-public python2-configobj
10450 (package-with-python2 python-configobj))
10451
10452 (define-public python-configargparse
10453 (package
10454 (name "python-configargparse")
10455 (version "0.14.0")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "ConfigArgParse" version))
10459 (sha256
10460 (base32
10461 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10462 (build-system python-build-system)
10463 (native-inputs
10464 `(("python-pyyaml" ,python-pyyaml)))
10465 (arguments
10466 `(#:phases
10467 (modify-phases %standard-phases
10468 (replace 'check
10469 (lambda _
10470 ;; Bypass setuptools-shim because one test relies on "setup.py"
10471 ;; being the first argument passed to the python call.
10472 ;;
10473 ;; NOTE: Many tests do not run because they rely on Python's
10474 ;; built-in test.test_argparse, but we remove the unit tests from
10475 ;; our Python installation.
10476 (invoke "python" "setup.py" "test"))))))
10477 (synopsis "Replacement for argparse")
10478 (description "A drop-in replacement for argparse that allows options to also
10479 be set via config files and/or environment variables.")
10480 (home-page "https://github.com/bw2/ConfigArgParse")
10481 (license license:expat)))
10482
10483 (define-public python2-configargparse
10484 (package-with-python2 python-configargparse))
10485
10486 (define-public python-argparse-manpage
10487 (package
10488 (name "python-argparse-manpage")
10489 (version "1.1")
10490 (source
10491 (origin
10492 (method url-fetch)
10493 (uri (pypi-uri "argparse-manpage" version))
10494 (sha256
10495 (base32
10496 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10497 (build-system python-build-system)
10498 (home-page "https://github.com/praiskup/argparse-manpage")
10499 (synopsis "Build manual page from Python's ArgumentParser object")
10500 (description
10501 "This package provides tools to build manual pages from Python's
10502 @code{ArgumentParser} object.")
10503 (license license:asl2.0)))
10504
10505 (define-public python-contextlib2
10506 (package
10507 (name "python-contextlib2")
10508 (version "0.6.0.post1")
10509 (source
10510 (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "contextlib2" version))
10513 (sha256
10514 (base32
10515 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10516 (build-system python-build-system)
10517 (home-page "https://contextlib2.readthedocs.org/")
10518 (synopsis "Tools for decorators and context managers")
10519 (description "This module is primarily a backport of the Python
10520 3.2 contextlib to earlier Python versions. Like contextlib, it
10521 provides utilities for common tasks involving decorators and context
10522 managers. It also contains additional features that are not part of
10523 the standard library.")
10524 (properties `((python2-variant . ,(delay python2-contextlib2))))
10525 (license license:psfl)))
10526
10527 (define-public python2-contextlib2
10528 (let ((base (package-with-python2
10529 (strip-python2-variant python-contextlib2))))
10530 (package
10531 (inherit base)
10532 (arguments
10533 (substitute-keyword-arguments (package-arguments base)
10534 ((#:phases phases)
10535 `(modify-phases ,phases
10536 (replace 'check
10537 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10538 (native-inputs
10539 `(("python2-unittest2" ,python2-unittest2))))))
10540
10541 ;; This package is used by python2-pytest via python2-importlib-metadata,
10542 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10543 (define-public python2-contextlib2-bootstrap
10544 (hidden-package
10545 (package/inherit
10546 python2-contextlib2
10547 (name "python2-contextlib2-bootstrap")
10548 (arguments
10549 `(#:tests? #f
10550 ,@(package-arguments python2-contextlib2)))
10551 (native-inputs '()))))
10552
10553 (define-public python-texttable
10554 (package
10555 (name "python-texttable")
10556 (version "1.6.2")
10557 (source
10558 (origin
10559 (method url-fetch)
10560 (uri (pypi-uri "texttable" version))
10561 (sha256
10562 (base32
10563 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10564 (build-system python-build-system)
10565 (arguments
10566 `(#:phases
10567 (modify-phases %standard-phases
10568 (replace 'check
10569 (lambda _ (invoke "pytest" "tests.py"))))))
10570 (native-inputs
10571 `(("python-pytest" ,python-pytest)))
10572 (home-page "https://github.com/foutaise/texttable/")
10573 (synopsis "Python module for creating simple ASCII tables")
10574 (description "Texttable is a Python module for creating simple ASCII
10575 tables.")
10576 (license license:expat)))
10577
10578 (define-public python2-texttable
10579 (package-with-python2 python-texttable))
10580
10581 (define-public python-atomicwrites
10582 (package
10583 (name "python-atomicwrites")
10584 (version "1.3.0")
10585 (source (origin
10586 (method url-fetch)
10587 (uri (pypi-uri "atomicwrites" version))
10588 (sha256
10589 (base32
10590 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10591 (build-system python-build-system)
10592 (synopsis "Atomic file writes in Python")
10593 (description "Library for atomic file writes using platform dependent tools
10594 for atomic file system operations.")
10595 (home-page "https://github.com/untitaker/python-atomicwrites")
10596 (license license:expat)))
10597
10598 (define-public python2-atomicwrites
10599 (package-with-python2 python-atomicwrites))
10600
10601 (define-public python-click-threading
10602 (package
10603 (name "python-click-threading")
10604 (version "0.4.4")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (pypi-uri "click-threading" version))
10608 (sha256
10609 (base32
10610 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10611 (build-system python-build-system)
10612 (propagated-inputs
10613 `(("python-click" ,python-click)))
10614 (synopsis "Utilities for multithreading in Click")
10615 (description "This package provides utilities for multithreading in Click
10616 applications.")
10617 (home-page "https://github.com/click-contrib/click-threading")
10618 (license license:expat)))
10619
10620 (define-public python-click-log
10621 (package
10622 (name "python-click-log")
10623 (version "0.3.2")
10624 (source (origin
10625 (method url-fetch)
10626 (uri (pypi-uri "click-log" version))
10627 (sha256
10628 (base32
10629 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10630 (build-system python-build-system)
10631 (propagated-inputs
10632 `(("python-click" ,python-click)))
10633 (synopsis "Logging for click applications")
10634 (description "This package provides a Python library for logging Click
10635 applications.")
10636 (home-page "https://github.com/click-contrib/click-log")
10637 (license license:expat)))
10638
10639 (define-public python-apipkg
10640 (package
10641 (name "python-apipkg")
10642 (version "1.5")
10643 (source (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "apipkg" version))
10646 (sha256
10647 (base32
10648 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10649 (build-system python-build-system)
10650 (native-inputs
10651 `(("python-pytest" ,python-pytest)
10652 ("python-setuptools-scm" ,python-setuptools-scm)))
10653 (synopsis "Namespace control and lazy-import mechanism")
10654 (description "With apipkg you can control the exported namespace of a Python
10655 package and greatly reduce the number of imports for your users. It is a small
10656 pure Python module that works on virtually all Python versions.")
10657 (home-page "https://github.com/pytest-dev/apipkg")
10658 (license license:expat)))
10659
10660 (define-public python-execnet
10661 (package
10662 (name "python-execnet")
10663 (version "1.4.1")
10664 (source (origin
10665 (method url-fetch)
10666 (uri (pypi-uri "execnet" version))
10667 (sha256
10668 (base32
10669 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10670 (build-system python-build-system)
10671 (arguments
10672 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10673 ;; The two test failures are caused by the lack of an `ssh` executable.
10674 ;; The test suite can be run with pytest after the 'install' phase.
10675 #:tests? #f))
10676 (native-inputs
10677 `(("python-pytest" ,python-pytest)
10678 ("python-setuptools-scm" ,python-setuptools-scm)))
10679 (propagated-inputs
10680 `(("python-apipkg" ,python-apipkg)))
10681 (synopsis "Rapid multi-Python deployment")
10682 (description "Execnet provides a share-nothing model with
10683 channel-send/receive communication for distributing execution across many
10684 Python interpreters across version, platform and network barriers. It has a
10685 minimal and fast API targeting the following uses:
10686 @enumerate
10687 @item distribute tasks to (many) local or remote CPUs
10688 @item write and deploy hybrid multi-process applications
10689 @item write scripts to administer multiple environments
10690 @end enumerate")
10691 (home-page "https://codespeak.net/execnet/")
10692 (license license:expat)))
10693
10694 (define-public python2-execnet
10695 (package-with-python2 python-execnet))
10696
10697 (define-public python-icalendar
10698 (package
10699 (name "python-icalendar")
10700 (version "4.0.5")
10701 (source (origin
10702 (method url-fetch)
10703 (uri (pypi-uri "icalendar" version))
10704 (sha256
10705 (base32
10706 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10707 (build-system python-build-system)
10708 (propagated-inputs
10709 `(("python-dateutil" ,python-dateutil)
10710 ("python-pytz" ,python-pytz)))
10711 (synopsis "Python library for parsing iCalendar files")
10712 (description "The icalendar package is a parser/generator of iCalendar
10713 files for use with Python.")
10714 (home-page "https://github.com/collective/icalendar")
10715 (license license:bsd-2)))
10716
10717 (define-public python-args
10718 (package
10719 (name "python-args")
10720 (version "0.1.0")
10721 (source (origin
10722 (method url-fetch)
10723 (uri (pypi-uri "args" version))
10724 (sha256
10725 (base32
10726 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10727 (build-system python-build-system)
10728 (home-page "https://github.com/kennethreitz/args")
10729 (synopsis "Command-line argument parser")
10730 (description
10731 "This library provides a Python module to parse command-line arguments.")
10732 (license license:bsd-3)))
10733
10734 (define-public python2-args
10735 (package-with-python2 python-args))
10736
10737 (define-public python-clint
10738 (package
10739 (name "python-clint")
10740 (version "0.5.1")
10741 (source (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "clint" version))
10744 (sha256
10745 (base32
10746 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10747 (build-system python-build-system)
10748 (arguments
10749 '(#:phases
10750 (modify-phases %standard-phases
10751 (replace 'check
10752 (lambda _ (invoke "py.test" "-v"))))))
10753 (native-inputs
10754 `(("python-pytest" ,python-pytest)))
10755 (propagated-inputs
10756 `(("python-args" ,python-args)))
10757 (home-page "https://github.com/kennethreitz/clint")
10758 (synopsis "Command-line interface tools")
10759 (description
10760 "Clint is a Python module filled with a set of tools for developing
10761 command-line applications, including tools for colored and indented
10762 output, progress bar display, and pipes.")
10763 (license license:isc)))
10764
10765 (define-public python2-clint
10766 (package-with-python2 python-clint))
10767
10768 (define-public python-rply
10769 (package
10770 (name "python-rply")
10771 (version "0.7.5")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "rply" version))
10775 (sha256
10776 (base32
10777 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10778 (build-system python-build-system)
10779 (propagated-inputs
10780 `(("python-appdirs" ,python-appdirs)))
10781 (home-page "https://github.com/alex/rply")
10782 (synopsis "Parser generator for Python")
10783 (description
10784 "This package provides a pure Python based parser generator, that also
10785 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10786 with a new public API, and RPython support.")
10787 (license license:bsd-3)))
10788
10789 (define-public python2-rply
10790 (package-with-python2 python-rply))
10791
10792 (define-public python-hy
10793 (package
10794 (name "python-hy")
10795 (version "0.18.0")
10796 (source (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "hy" version))
10799 (sha256
10800 (base32
10801 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10802 (build-system python-build-system)
10803 (arguments
10804 '(#:phases
10805 (modify-phases %standard-phases
10806 (add-before 'install 'set-HOME
10807 (lambda _
10808 (setenv "HOME" "/tmp") #t))
10809 (replace 'check
10810 (lambda _
10811 ;; Tests require write access to HOME.
10812 (setenv "HOME" "/tmp")
10813 (invoke "nosetests"))))))
10814 (native-inputs
10815 `(("python-coverage" ,python-coverage)
10816 ("python-nose" ,python-nose)))
10817 (propagated-inputs
10818 `(("python-astor" ,python-astor)
10819 ("python-colorama" ,python-colorama)
10820 ("python-rply" ,python-rply)
10821 ("python-funcparserlib"
10822 ,python-funcparserlib)))
10823 (home-page "http://hylang.org/")
10824 (synopsis "Lisp frontend to Python")
10825 (description
10826 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10827 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10828 Python at your fingertips, in Lisp form.")
10829 (license license:expat)))
10830
10831 (define-public python2-functools32
10832 (package
10833 (name "python2-functools32")
10834 (version "3.2.3-2")
10835 (source
10836 (origin
10837 (method url-fetch)
10838 (uri (pypi-uri "functools32" version))
10839 (sha256
10840 (base32
10841 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10842 (build-system python-build-system)
10843 (arguments
10844 `(#:python ,python-2
10845 #:tests? #f)) ; no test target
10846 (home-page "https://github.com/MiCHiLU/python-functools32")
10847 (synopsis
10848 "Backport of the functools module from Python 3.2.3")
10849 (description
10850 "This package is a backport of the @code{functools} module from Python
10851 3.2.3 for use with older versions of Python and PyPy.")
10852 (license license:expat)))
10853
10854 (define-public python2-subprocess32
10855 (package
10856 (name "python2-subprocess32")
10857 (version "3.2.7")
10858 (source (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "subprocess32" version))
10861 (sha256
10862 (base32
10863 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10864 (patches
10865 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10866 (build-system python-build-system)
10867 (arguments
10868 `(#:python ,python-2
10869 ;; The test suite fails with Python > 2.7.13:
10870 ;; import test.support
10871 ;; ImportError: No module named support
10872 #:tests? #f
10873 #:phases
10874 (modify-phases %standard-phases
10875 (add-after 'unpack 'patch-/bin/sh
10876 (lambda _
10877 (substitute* '("subprocess32.py"
10878 "test_subprocess32.py")
10879 (("/bin/sh") (which "sh")))
10880 #t)))))
10881 (home-page "https://github.com/google/python-subprocess32")
10882 (synopsis "Backport of the subprocess module from Python 3.2")
10883 (description
10884 "This is a backport of the @code{subprocess} standard library module
10885 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10886 new features. On POSIX systems it is guaranteed to be reliable when used
10887 in threaded applications. It includes timeout support from Python 3.3 but
10888 otherwise matches 3.2’s API.")
10889 (license license:psfl)))
10890
10891 (define-public python2-futures
10892 (package
10893 (name "python2-futures")
10894 (version "3.2.0")
10895 (source
10896 (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "futures" version))
10899 (sha256
10900 (base32
10901 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10902 (build-system python-build-system)
10903 (arguments
10904 `(#:python ,python-2
10905 #:phases
10906 (modify-phases %standard-phases
10907 (replace 'check
10908 (lambda _
10909 (invoke "python" "test_futures.py")
10910 #t)))))
10911 (home-page "https://github.com/agronholm/pythonfutures")
10912 (synopsis
10913 "Backport of the concurrent.futures package from Python 3.2")
10914 (description
10915 "The concurrent.futures module provides a high-level interface for
10916 asynchronously executing callables. This package backports the
10917 concurrent.futures package from Python 3.2")
10918 (license license:bsd-3)))
10919
10920 (define-public python-promise
10921 (package
10922 (name "python-promise")
10923 (version "0.4.2")
10924 (source
10925 (origin
10926 (method url-fetch)
10927 (uri (pypi-uri "promise" version))
10928 (sha256
10929 (base32
10930 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10931 (build-system python-build-system)
10932 ;; Tests wants python-futures, which is a python2 only program, and
10933 ;; can't be found by python-promise at test time.
10934 (arguments `(#:tests? #f))
10935 (home-page "https://github.com/syrusakbary/promise")
10936 (synopsis "Promises/A+ implementation for Python")
10937 (description
10938 "Promises/A+ implementation for Python")
10939 (properties `((python2-variant . ,(delay python2-promise))))
10940 (license license:expat)))
10941
10942 (define-public python2-promise
10943 (let ((promise (package-with-python2
10944 (strip-python2-variant python-promise))))
10945 (package (inherit promise)
10946 (arguments (substitute-keyword-arguments (package-arguments promise)
10947 ((#:tests? _) #t)))
10948 (native-inputs
10949 `(("python2-futures" ,python2-futures)
10950 ("python2-pytest" ,python2-pytest)
10951 ,@(package-native-inputs promise))))))
10952
10953 (define-public python-progressbar2
10954 (package
10955 (name "python-progressbar2")
10956 (version "3.51.3")
10957 (source
10958 (origin
10959 (method url-fetch)
10960 (uri (pypi-uri "progressbar2" version))
10961 (sha256
10962 (base32
10963 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10964 (build-system python-build-system)
10965 (propagated-inputs
10966 `(("python-six" ,python-six)
10967 ("python-utils" ,python-utils)))
10968 (native-inputs
10969 `(("python-flake8" ,python-flake8)
10970 ("python-freezegun" ,python-freezegun)
10971 ("python-pycodestyle" ,python-pycodestyle)
10972 ("python-pytest" ,python-pytest)
10973 ("python-pytest-cache" ,python-pytest-cache)
10974 ("python-pytest-cov" ,python-pytest-cov)
10975 ("python-pytest-flakes" ,python-pytest-flakes)
10976 ("python-pytest-pep8" ,python-pytest-pep8)
10977 ("python-sphinx" ,python-sphinx)))
10978 (home-page "https://github.com/WoLpH/python-progressbar")
10979 (synopsis "Text progress bar library for Python")
10980 (description
10981 "This package provides a Python progressbar library to provide
10982 visual (yet text based) progress to long running operations.")
10983 (license license:bsd-3)))
10984
10985 (define-public python-progressbar33
10986 (package
10987 (name "python-progressbar33")
10988 (version "2.4")
10989 (source
10990 (origin
10991 (method url-fetch)
10992 (uri (pypi-uri "progressbar33" version))
10993 (sha256
10994 (base32
10995 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10996 (build-system python-build-system)
10997 (home-page "https://github.com/germangh/python-progressbar")
10998 (synopsis "Text progress bar library for Python")
10999 (description
11000 "This package provides a text progress bar library for Python. This
11001 version only differs from the original @code{progressbar} package in that it
11002 uses relative package imports instead of absolute imports, which is necessary
11003 for the module to work under Python 3.3.")
11004 ;; Either or both of these licenses may be selected.
11005 (license (list license:lgpl2.1+ license:bsd-3))))
11006
11007 (define-public python-colorama
11008 (package
11009 (name "python-colorama")
11010 (version "0.4.4")
11011 (source
11012 (origin
11013 (method url-fetch)
11014 (uri (pypi-uri "colorama" version))
11015 (sha256
11016 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
11017 (build-system python-build-system)
11018 (synopsis "Colored terminal text rendering for Python")
11019 (description "Colorama is a Python library for rendering colored terminal
11020 text.")
11021 (home-page "https://pypi.org/project/colorama/")
11022 (license license:bsd-3)))
11023
11024 (define-public python2-colorama
11025 (package-with-python2 python-colorama))
11026
11027 (define-public python-moto
11028 (package
11029 (name "python-moto")
11030 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
11031 (version "1.3.16.dev134")
11032 (source (origin
11033 (method url-fetch)
11034 (uri (pypi-uri "moto" version))
11035 (sha256
11036 (base32
11037 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
11038 (build-system python-build-system)
11039 (arguments
11040 `(#:phases (modify-phases %standard-phases
11041 (add-after 'unpack 'patch-hardcoded-executable-names
11042 (lambda _
11043 (substitute* "moto/batch/models.py"
11044 (("/bin/sh")
11045 (which "sh")))
11046 (substitute* (find-files "tests" "\\.py$")
11047 (("#!/bin/bash")
11048 (string-append "#!" (which "bash"))))
11049 #t))
11050 (replace 'check
11051 (lambda _
11052 (setenv "PYTHONPATH" (string-append "./build/lib:"
11053 (getenv "PYTHONPATH")))
11054 (invoke "pytest" "-vv" "-m" "not network"
11055 ;; These tests require Docker.
11056 "-k" "not test_terminate_job \
11057 and not test_invoke_function_from_sqs_exception"))))))
11058 (native-inputs
11059 `(("python-flask" ,python-flask)
11060 ("python-flask-cors" ,python-flask-cors)
11061 ("python-freezegun" ,python-freezegun)
11062 ("python-parameterized" ,python-parameterized)
11063 ("python-pytest" ,python-pytest)
11064 ("python-sure" ,python-sure)))
11065 (propagated-inputs
11066 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
11067 ("python-boto" ,python-boto)
11068 ("python-boto3" ,python-boto3)
11069 ("python-botocore" ,python-botocore)
11070 ("python-cfn-lint" ,python-cfn-lint)
11071 ("python-cryptography" ,python-cryptography)
11072 ("python-dateutil" ,python-dateutil)
11073 ("python-docker" ,python-docker)
11074 ("python-idna" ,python-idna)
11075 ("python-jinja2" ,python-jinja2)
11076 ("python-jose" ,python-jose)
11077 ("python-jsondiff" ,python-jsondiff)
11078 ("python-mock" ,python-mock)
11079 ("python-pytz" ,python-pytz)
11080 ("python-pyyaml" ,python-pyyaml)
11081 ("python-requests" ,python-requests)
11082 ("python-responses" ,python-responses)
11083 ("python-six" ,python-six)
11084 ("python-sshpubkeys" ,python-sshpubkeys)
11085 ("python-werkzeug" ,python-werkzeug)
11086 ("python-xmltodict" ,python-xmltodict)))
11087 (home-page "https://github.com/spulec/moto")
11088 (synopsis "Mock out the boto library")
11089 (description
11090 "@code{moto} is a library designed to easily mock out the
11091 @code{boto} library.")
11092 (license license:asl2.0)))
11093
11094 (define-public python-rsa
11095 (package
11096 (name "python-rsa")
11097 (version "3.4.2")
11098 (source
11099 (origin
11100 (method url-fetch)
11101 (uri (pypi-uri "rsa" version))
11102 (sha256
11103 (base32
11104 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
11105 (build-system python-build-system)
11106 (propagated-inputs
11107 `(("python-pyasn1" ,python-pyasn1)))
11108 (synopsis "Pure-Python RSA implementation")
11109 (description "Python-RSA is a pure-Python RSA implementation. It supports
11110 encryption and decryption, signing and verifying signatures, and key
11111 generation according to PKCS#1 version 1.5. It can be used as a Python
11112 library as well as on the command line.")
11113 (home-page "https://stuvel.eu/rsa")
11114 (license license:asl2.0)))
11115
11116 (define-public python2-rsa
11117 (package-with-python2 python-rsa))
11118
11119 (define-public python-pluggy
11120 (package
11121 (name "python-pluggy")
11122 (version "0.13.1")
11123 (source
11124 (origin
11125 (method url-fetch)
11126 (uri (pypi-uri "pluggy" version))
11127 (sha256
11128 (base32
11129 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11130 (build-system python-build-system)
11131 (native-inputs
11132 `(("python-setuptools-scm" ,python-setuptools-scm)))
11133 (synopsis "Plugin and hook calling mechanism for Python")
11134 (description "Pluggy is an extraction of the plugin manager as used by
11135 Pytest but stripped of Pytest specific details.")
11136 (home-page "https://pypi.org/project/pluggy/")
11137 (properties `((python2-variant . ,(delay python2-pluggy))))
11138 (license license:expat)))
11139
11140 (define-public python2-pluggy
11141 (let ((base (package-with-python2 (strip-python2-variant
11142 python-pluggy))))
11143 (package/inherit
11144 base
11145 (propagated-inputs
11146 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11147
11148 ;; This package requires python2-importlib-metadata, but that package
11149 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11150 ;; variant to solve the circular dependency.
11151 (define-public python2-pluggy-bootstrap
11152 (hidden-package
11153 (package/inherit
11154 python2-pluggy
11155 (name "python2-pluggy-bootstrap")
11156 (arguments
11157 `(#:tests? #f
11158 ,@(package-arguments python2-pluggy)))
11159 (propagated-inputs
11160 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11161
11162 (define-public python-tox
11163 (package
11164 (name "python-tox")
11165 (version "3.20.0")
11166 (source
11167 (origin
11168 (method url-fetch)
11169 (uri (pypi-uri "tox" version))
11170 (sha256
11171 (base32
11172 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11173 (build-system python-build-system)
11174 (arguments
11175 ;; FIXME: Tests require pytest-timeout, which itself requires
11176 ;; pytest>=2.8.0 for installation.
11177 '(#:tests? #f))
11178 (propagated-inputs
11179 `(("python-filelock" ,python-filelock)
11180 ("python-packaging" ,python-packaging)
11181 ("python-pluggy" ,python-pluggy)
11182 ("python-py" ,python-py)
11183 ("python-six" ,python-six)
11184 ("python-toml" ,python-toml)
11185 ("python-virtualenv" ,python-virtualenv)))
11186 (native-inputs
11187 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11188 ("python-pytest" ,python-pytest) ; >= 2.3.5
11189 ("python-setuptools-scm" ,python-setuptools-scm)))
11190 (home-page "https://tox.readthedocs.io")
11191 (synopsis "Virtualenv-based automation of test activities")
11192 (description "Tox is a generic virtualenv management and test command line
11193 tool. It can be used to check that a package installs correctly with
11194 different Python versions and interpreters, or run tests in each type of
11195 supported environment, or act as a frontend to continuous integration
11196 servers.")
11197 (license license:expat)))
11198
11199 (define-public python2-tox
11200 (package-with-python2 python-tox))
11201
11202 (define-public python-jmespath
11203 (package
11204 (name "python-jmespath")
11205 (version "0.9.4")
11206 (source
11207 (origin
11208 (method url-fetch)
11209 (uri (pypi-uri "jmespath" version))
11210 (sha256
11211 (base32
11212 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11213 (build-system python-build-system)
11214 (native-inputs
11215 `(("python-nose" ,python-nose)))
11216 (synopsis "JSON Matching Expressions")
11217 (description "JMESPath (pronounced “james path”) is a Python library that
11218 allows one to declaratively specify how to extract elements from a JSON
11219 document.")
11220 (home-page "https://github.com/jmespath/jmespath.py")
11221 (license license:expat)))
11222
11223 (define-public python2-jmespath
11224 (package-with-python2 python-jmespath))
11225
11226 (define-public python-symengine
11227 (package
11228 (name "python-symengine")
11229 (version "0.6.1")
11230 (source
11231 (origin
11232 (method url-fetch)
11233 (uri (pypi-uri "symengine" version))
11234 (sha256
11235 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11236 (build-system python-build-system)
11237 (native-inputs
11238 `(("cmake" ,cmake)
11239 ("python-cython" ,python-cython)))
11240 (inputs
11241 `(("symengine" ,symengine)))
11242 (home-page "https://github.com/symengine/symengine.py")
11243 (synopsis "Python library providing wrappers to SymEngine")
11244 (description
11245 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11246 manipulation library.")
11247 (license license:expat)))
11248
11249 (define-public python-boto
11250 (package
11251 (name "python-boto")
11252 (version "2.49.0")
11253 (source (origin
11254 (method url-fetch)
11255 (uri (pypi-uri "boto" version))
11256 (sha256
11257 (base32
11258 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11259 (build-system python-build-system)
11260 (arguments
11261 ;; XXX: This package is unmaintained and has problems with newer versions
11262 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11263 ;; subset of this library, so keep it around for now, but disable tests.
11264 '(#:tests? #f))
11265 (propagated-inputs
11266 `(("python-paramiko" ,python-paramiko)
11267 ("python-requests" ,python-requests)))
11268 (home-page "https://github.com/boto/boto")
11269 (synopsis "Python interfaces for Amazon Web Services")
11270 (description
11271 "This package provides various facilities for interacting with Amazon
11272 Web Services through Python.
11273
11274 This software is unmaintained, and new projects should use @code{boto3} instead.")
11275 (license license:expat)))
11276
11277 (define-public python-botocore
11278 ;; Note: When updating botocore, also make sure that boto3 and awscli
11279 ;; are compatible.
11280 (package
11281 (name "python-botocore")
11282 (version "1.19.22")
11283 (source
11284 (origin
11285 (method url-fetch)
11286 (uri (pypi-uri "botocore" version))
11287 (sha256
11288 (base32
11289 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11290 (build-system python-build-system)
11291 (arguments
11292 ;; FIXME: Many tests are failing.
11293 '(#:tests? #f))
11294 (propagated-inputs
11295 `(("python-dateutil" ,python-dateutil)
11296 ("python-jmespath" ,python-jmespath)
11297 ("python-urllib3" ,python-urllib3)))
11298 (home-page "https://github.com/boto/botocore")
11299 (synopsis "Low-level interface to AWS")
11300 (description "Botocore is a Python library that provides a low-level
11301 interface to the Amazon Web Services (AWS) API.")
11302 (license license:asl2.0)))
11303
11304 (define-public python2-botocore
11305 (package-with-python2 python-botocore))
11306
11307 (define-public python-boto3
11308 (package
11309 (name "python-boto3")
11310 (version "1.16.22")
11311 (home-page "https://github.com/boto/boto3")
11312 (source (origin
11313 (method git-fetch)
11314 (uri (git-reference (url home-page) (commit version)))
11315 (file-name (git-file-name name version))
11316 (sha256
11317 (base32
11318 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11319 (arguments
11320 `(#:phases
11321 (modify-phases %standard-phases
11322 (add-after 'unpack 'delete-network-tests
11323 ;; Deleting integration tests because they are trying to connect to AWS.
11324 (lambda _
11325 (delete-file-recursively "tests/integration")
11326 #t)))))
11327 (build-system python-build-system)
11328 (native-inputs
11329 `(("python-nose" ,python-nose)
11330 ("python-mock" ,python-mock)))
11331 (propagated-inputs
11332 `(("python-botocore" ,python-botocore)
11333 ("python-jmespath" ,python-jmespath)
11334 ("python-s3transfer" ,python-s3transfer)))
11335 (synopsis "AWS SDK for Python")
11336 (description
11337 "Boto3 is a Python library for writing programs that interact with
11338 @acronym{AWS,Amazon Web Services}.")
11339 (license license:asl2.0)))
11340
11341 (define-public python-pyfiglet
11342 (package
11343 (name "python-pyfiglet")
11344 (version "0.8.post1")
11345 (source
11346 (origin
11347 (method url-fetch)
11348 (uri (pypi-uri "pyfiglet" version))
11349 (sha256
11350 (base32
11351 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11352 (build-system python-build-system)
11353 (home-page "https://github.com/pwaller/pyfiglet")
11354 (synopsis "Draw ASCII art big letters in Python")
11355 (description "This module lets you draw large letter from ordinary characters
11356 in pure Python.")
11357 (license license:expat)))
11358
11359 (define-public python-xdo
11360 (package
11361 (name "python-xdo")
11362 (version "0.3")
11363 (source (origin
11364 (method url-fetch)
11365 (uri (string-append
11366 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11367 "python-xdo_" version ".orig.tar.gz"))
11368 (sha256
11369 (base32
11370 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11371 (build-system python-build-system)
11372 (arguments
11373 '(#:phases
11374 (modify-phases %standard-phases
11375 (add-before 'install 'patch-libxdo-path
11376 ;; Hardcode the path of dynamically loaded libxdo library.
11377 (lambda* (#:key inputs #:allow-other-keys)
11378 (let ((libxdo (string-append
11379 (assoc-ref inputs "xdotool")
11380 "/lib/libxdo.so")))
11381 (substitute* "xdo/_xdo.py"
11382 (("find_library\\(\"xdo\"\\)")
11383 (simple-format #f "\"~a\"" libxdo)))
11384 #t))))
11385 #:tests? #f)) ; no tests provided
11386 (propagated-inputs
11387 `(("python-six" ,python-six)))
11388 (inputs
11389 `(("xdotool" ,xdotool)
11390 ("libX11" ,libx11)))
11391 (home-page "https://tracker.debian.org/pkg/python-xdo")
11392 (synopsis "Python library for simulating X11 keyboard/mouse input")
11393 (description "Provides bindings to libxdo for manipulating X11 via simulated
11394 input. (Note that this is mostly a legacy library; you may wish to look at
11395 python-xdo for newer bindings.)")
11396 (license license:bsd-3)))
11397
11398 (define-public python2-xdo
11399 (package-with-python2 python-xdo))
11400
11401 (define-public python-mako
11402 (package
11403 (name "python-mako")
11404 (version "1.1.3")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (pypi-uri "Mako" version))
11409 (sha256
11410 (base32
11411 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11412 (build-system python-build-system)
11413 (arguments
11414 `(#:phases (modify-phases %standard-phases
11415 (replace 'check
11416 (lambda* (#:key tests? #:allow-other-keys)
11417 (if tests?
11418 (invoke "nosetests" "-v")
11419 (format #t "test suite not run~%"))
11420 #t)))))
11421 (propagated-inputs
11422 `(("python-markupsafe" ,python-markupsafe)))
11423 (native-inputs
11424 `(("python-mock" ,python-mock)
11425 ("python-nose" ,python-nose)))
11426 (home-page "https://www.makotemplates.org/")
11427 (synopsis "Templating language for Python")
11428 (description "Mako is a templating language for Python that compiles
11429 templates into Python modules.")
11430 (license license:expat)))
11431
11432 (define-public python2-mako
11433 (package-with-python2 python-mako))
11434
11435 (define-public python-waitress
11436 (package
11437 (name "python-waitress")
11438 (version "1.1.0")
11439 (source
11440 (origin
11441 (method url-fetch)
11442 (uri (pypi-uri "waitress" version))
11443 (patches (search-patches "python-waitress-fix-tests.patch"))
11444 (sha256
11445 (base32
11446 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11447 (build-system python-build-system)
11448 (home-page "https://github.com/Pylons/waitress")
11449 (synopsis "Waitress WSGI server")
11450 (description "Waitress is meant to be a production-quality pure-Python WSGI
11451 server with very acceptable performance.")
11452 (license license:zpl2.1)))
11453
11454 (define-public python2-waitress
11455 (package-with-python2 python-waitress))
11456
11457 (define-public python-whichcraft
11458 (package
11459 (name "python-whichcraft")
11460 (version "0.6.1")
11461 (source
11462 (origin
11463 (method url-fetch)
11464 (uri (pypi-uri "whichcraft" version))
11465 (sha256
11466 (base32
11467 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11468 (build-system python-build-system)
11469 (native-inputs
11470 `(("python-pytest" ,python-pytest)))
11471 (home-page "https://github.com/pydanny/whichcraft")
11472 (synopsis "Cross-platform cross-python shutil.which functionality")
11473 (description
11474 "This package provides a shim of the shutil.which function that's
11475 designed to work across multiple versions of Python.")
11476 (license license:bsd-3)))
11477
11478 (define-public python-cookiecutter
11479 (package
11480 (name "python-cookiecutter")
11481 (version "1.7.2")
11482 (source
11483 (origin
11484 (method url-fetch)
11485 (uri (pypi-uri "cookiecutter" version))
11486 (sha256
11487 (base32
11488 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11489 (build-system python-build-system)
11490 (native-inputs
11491 `(("python-freezegun" ,python-freezegun)
11492 ("python-pytest" ,python-pytest)
11493 ("python-pytest-catchlog" ,python-pytest-catchlog)
11494 ("python-pytest-cov" ,python-pytest-cov)
11495 ("python-pytest-mock" ,python-pytest-mock)))
11496 (propagated-inputs
11497 `(("python-binaryornot" ,python-binaryornot)
11498 ("python-click" ,python-click)
11499 ("python-future" ,python-future)
11500 ("python-jinja2" ,python-jinja2)
11501 ("python-jinja2-time" ,python-jinja2-time)
11502 ("python-poyo" ,python-poyo)
11503 ("python-requests" ,python-requests)
11504 ("python-slugify" ,python-slugify)
11505 ("python-text-unidecode" ,python-text-unidecode)
11506 ("python-whichcraft" ,python-whichcraft)))
11507 (home-page "https://github.com/cookiecutter/cookiecutter")
11508 (synopsis
11509 "Command-line utility that creates projects from project templates")
11510 (description
11511 "This package provides a command-line utility that creates projects from
11512 project templates, e.g. creating a Python package project from a Python package
11513 project template.")
11514 (license license:bsd-3)))
11515
11516 (define-public python-pyquery
11517 (package
11518 (name "python-pyquery")
11519 (version "1.2.17")
11520 (source
11521 (origin
11522 (method url-fetch)
11523 (uri (pypi-uri "pyquery" version))
11524 (sha256
11525 (base32
11526 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11527 (build-system python-build-system)
11528 (native-inputs
11529 `(("python-webob" ,python-webob)
11530 ("python-webtest" ,python-webtest)))
11531 (propagated-inputs
11532 `(("python-lxml" ,python-lxml)
11533 ("python-cssselect" ,python-cssselect)))
11534 (home-page "https://github.com/gawel/pyquery")
11535 (synopsis "Make jQuery-like queries on xml documents")
11536 (description "pyquery allows you to make jQuery queries on xml documents.
11537 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11538 fast xml and html manipulation.")
11539 (license license:bsd-3)))
11540
11541 (define-public python-anyjson
11542 (package
11543 (name "python-anyjson")
11544 (version "0.3.3")
11545 (source
11546 (origin
11547 (method url-fetch)
11548 (uri (pypi-uri "anyjson" version))
11549 (sha256
11550 (base32
11551 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11552 (build-system python-build-system)
11553 (arguments
11554 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11555 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11556 ;; whatever) so this transformation needs to be done before the tests
11557 ;; can be run. Maybe we could add a build step to transform beforehand
11558 ;; but it could be annoying/difficult.
11559 ;; We can enable tests for the Python 2 version, though, and do below.
11560 #:tests? #f))
11561 (home-page "https://bitbucket.org/runeh/anyjson/")
11562 (synopsis
11563 "Wraps best available JSON implementation in a common interface")
11564 (description
11565 "Anyjson loads whichever is the fastest JSON module installed
11566 and provides a uniform API regardless of which JSON implementation is used.")
11567 (license license:bsd-3)
11568 (properties `((python2-variant . ,(delay python2-anyjson))))))
11569
11570 (define-public python2-anyjson
11571 (let ((anyjson (package-with-python2
11572 (strip-python2-variant python-anyjson))))
11573 (package
11574 (inherit anyjson)
11575 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11576 #:tests? #t
11577 ,@(package-arguments anyjson)))
11578 (native-inputs `(("python2-nose" ,python2-nose))))))
11579
11580 (define-public python-amqp
11581 (package
11582 (name "python-amqp")
11583 (version "2.3.2")
11584 (source
11585 (origin
11586 (method url-fetch)
11587 (uri (pypi-uri "amqp" version))
11588 (sha256
11589 (base32
11590 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11591 (build-system python-build-system)
11592 (native-inputs
11593 `(("python-case" ,python-case)
11594 ("python-pytest-sugar" ,python-pytest-sugar)
11595 ("python-mock" ,python-mock)))
11596 (propagated-inputs
11597 `(("python-vine" ,python-vine)))
11598 (home-page "https://github.com/celery/py-amqp")
11599 (synopsis
11600 "Low-level AMQP client for Python (fork of amqplib)")
11601 (description
11602 "This is a fork of amqplib which was originally written by Barry Pederson.
11603 It is maintained by the Celery project, and used by kombu as a pure python
11604 alternative when librabbitmq is not available.")
11605 (license license:lgpl2.1+)
11606 (properties `((python2-variant . ,(delay python2-amqp))))))
11607
11608 (define-public python2-amqp
11609 (let ((amqp (package-with-python2
11610 (strip-python2-variant python-amqp))))
11611 (package
11612 (inherit amqp)
11613 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11614 ;; unmaintained. Weirdly, does not do this on the python 3
11615 ;; version?
11616 #:tests? #f
11617 ,@(package-arguments amqp))))))
11618
11619 (define-public python-txamqp
11620 (package
11621 (name "python-txamqp")
11622 (version "0.8.2")
11623 (source
11624 (origin
11625 (method url-fetch)
11626 (uri (pypi-uri "txAMQP" version))
11627 (sha256
11628 (base32
11629 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11630 (build-system python-build-system)
11631 (propagated-inputs
11632 `(("python-six" ,python-six)
11633 ("python-twisted" ,python-twisted)))
11634 (home-page "https://github.com/txamqp/txamqp")
11635 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11636 (description
11637 "This package provides a Python library for communicating with AMQP peers
11638 and brokers using the asynchronous networking framework Twisted. It contains
11639 all the necessary code to connect, send and receive messages to/from an
11640 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11641 also includes support for using Thrift RPC over AMQP in Twisted
11642 applications.")
11643 (license license:asl2.0)))
11644
11645 (define-public python2-txamqp
11646 (package-with-python2 python-txamqp))
11647
11648 (define-public python-kombu
11649 (package
11650 (name "python-kombu")
11651 (version "4.2.2")
11652 (source
11653 (origin
11654 (method url-fetch)
11655 (uri (pypi-uri "kombu" version))
11656 (sha256
11657 (base32
11658 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11659 (build-system python-build-system)
11660 (native-inputs
11661 `(("python-mock" ,python-mock)
11662 ("python-case" ,python-case)
11663 ("python-pyro4" ,python-pyro4)
11664 ("python-pytest-sugar" ,python-pytest-sugar)
11665 ("python-pytz" ,python-pytz)))
11666 (propagated-inputs
11667 `(("python-anyjson" ,python-anyjson)
11668 ("python-amqp" ,python-amqp)
11669 ("python-redis" ,python-redis)))
11670 (home-page "https://kombu.readthedocs.io")
11671 (synopsis "Message passing library for Python")
11672 (description "The aim of Kombu is to make messaging in Python as easy as
11673 possible by providing an idiomatic high-level interface for the AMQ protocol,
11674 and also provide proven and tested solutions to common messaging problems.
11675 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11676 message orientation, queuing, routing, reliability and security, for which the
11677 RabbitMQ messaging server is the most popular implementation.")
11678 (license license:bsd-3)
11679 (properties `((python2-variant . ,(delay python2-kombu))))))
11680
11681 (define-public python2-kombu
11682 (let ((kombu (package-with-python2
11683 (strip-python2-variant python-kombu))))
11684 (package
11685 (inherit kombu)
11686 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11687 ;; It works fine on the python3 variant.
11688 #:tests? #f
11689 ,@(package-arguments kombu)))
11690 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11691 ,@(package-native-inputs kombu))))))
11692
11693 (define-public python-billiard
11694 (package
11695 (name "python-billiard")
11696 (version "3.5.0.5")
11697 (source
11698 (origin
11699 (method url-fetch)
11700 (uri (pypi-uri "billiard" version))
11701 (sha256
11702 (base32
11703 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11704 (build-system python-build-system)
11705 (native-inputs
11706 `(("python-case" ,python-case)
11707 ("python-pytest" ,python-pytest)))
11708 (home-page "https://github.com/celery/billiard")
11709 (synopsis
11710 "Python multiprocessing fork with improvements and bugfixes")
11711 (description
11712 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11713 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11714 pyprocessing package. This standalone variant is intended to be compatible with
11715 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11716 (license license:bsd-3)
11717 (properties `((python2-variant . ,(delay python2-billiard))))))
11718
11719 (define-public python2-billiard
11720 (let ((billiard (package-with-python2
11721 (strip-python2-variant python-billiard))))
11722 (package
11723 (inherit billiard)
11724 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11725 ("python2-mock" ,python2-mock)
11726 ,@(package-native-inputs billiard))))))
11727
11728 (define-public python-celery
11729 (package
11730 (name "python-celery")
11731 (version "4.2.1")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "celery" version))
11736 (sha256
11737 (base32
11738 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11739 (build-system python-build-system)
11740 (arguments
11741 '(;; TODO The tests fail with Python 3.7
11742 ;; https://github.com/celery/celery/issues/4849
11743 #:tests? #f
11744 #:phases
11745 (modify-phases %standard-phases
11746 (add-after 'unpack 'patch-requirements
11747 (lambda _
11748 (substitute* "requirements/test.txt"
11749 (("pytest>=3\\.0,<3\\.3")
11750 "pytest>=3.0"))
11751 #t)))))
11752 (native-inputs
11753 `(("python-case" ,python-case)
11754 ("python-pytest" ,python-pytest)))
11755 (propagated-inputs
11756 `(("python-pytz" ,python-pytz)
11757 ("python-billiard" ,python-billiard)
11758 ("python-kombu" ,python-kombu)))
11759 (home-page "https://celeryproject.org")
11760 (synopsis "Distributed Task Queue")
11761 (description "Celery is an asynchronous task queue/job queue based on
11762 distributed message passing. It is focused on real-time operation, but
11763 supports scheduling as well. The execution units, called tasks, are executed
11764 concurrently on a single or more worker servers using multiprocessing,
11765 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11766 synchronously (wait until ready).")
11767 (license license:bsd-3)
11768 (properties `((python2-variant . ,(delay python2-celery))))))
11769
11770 (define-public python2-celery
11771 (let ((celery (package-with-python2
11772 (strip-python2-variant python-celery))))
11773 (package
11774 (inherit celery)
11775 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11776 ("python2-mock" ,python2-mock)
11777 ,@(package-native-inputs celery))))))
11778
11779 (define-public python-translitcodec
11780 (package
11781 (name "python-translitcodec")
11782 (version "0.4.0")
11783 (source
11784 (origin
11785 (method url-fetch)
11786 (uri (pypi-uri "translitcodec" version))
11787 (sha256
11788 (base32
11789 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11790 (build-system python-build-system)
11791 (arguments
11792 `(#:tests? #f)) ; no tests provided
11793 (home-page
11794 "https://github.com/claudep/translitcodec")
11795 (synopsis
11796 "Unicode to 8-bit charset transliteration codec")
11797 (description
11798 "This package contains codecs for transliterating ISO 10646 texts into
11799 best-effort representations using smaller coded character sets (ASCII,
11800 ISO 8859, etc.).")
11801 (license license:expat)))
11802
11803 (define-public python2-translitcodec
11804 (package-with-python2 python-translitcodec))
11805
11806 (define-public python-editor
11807 (package
11808 (name "python-editor")
11809 (version "1.0.4")
11810 (source
11811 (origin
11812 (method url-fetch)
11813 (uri (pypi-uri "python-editor" version))
11814 (sha256
11815 (base32
11816 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11817 (build-system python-build-system)
11818 (arguments
11819 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11820 (home-page "https://github.com/fmoo/python-editor")
11821 (synopsis "Programmatically open an editor, capture the result")
11822 (description
11823 "python-editor is a library that provides the editor module for
11824 programmatically interfacing with your system's $EDITOR.")
11825 (license license:asl2.0)))
11826
11827 (define-public python2-editor
11828 (package-with-python2 python-editor))
11829
11830 (define-public python-vobject
11831 (package
11832 (name "python-vobject")
11833 (version "0.9.6.1")
11834 (source (origin
11835 (method url-fetch)
11836 (uri (pypi-uri "vobject" version))
11837 (sha256
11838 (base32
11839 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11840 (build-system python-build-system)
11841 (arguments
11842 '(;; The test suite relies on some non-portable Windows interfaces.
11843 #:tests? #f))
11844 (propagated-inputs
11845 `(("python-dateutil" ,python-dateutil)
11846 ("python-pyicu" ,python-pyicu)))
11847 (synopsis "Parse and generate vCard and vCalendar files")
11848 (description "Vobject is intended to be a full featured Python package for
11849 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11850 are supported and well tested. vCard 3.0 files are supported, and all data
11851 should be imported, but only a few components are understood in a sophisticated
11852 way.")
11853 (home-page "https://eventable.github.io/vobject/")
11854 (license license:asl2.0)))
11855
11856 (define-public python2-vobject
11857 (package-with-python2 python-vobject))
11858
11859 (define-public python-munkres
11860 (package
11861 (name "python-munkres")
11862 (version "1.0.8")
11863 (source (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "munkres" version))
11866 (sha256
11867 (base32
11868 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11869 (build-system python-build-system)
11870 (arguments
11871 '(#:tests? #f)) ; no test suite
11872 (home-page "https://software.clapper.org/munkres/")
11873 (synopsis "Implementation of the Munkres algorithm")
11874 (description "The Munkres module provides an implementation of the Munkres
11875 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11876 useful for solving the Assignment Problem.")
11877 (license license:bsd-3)))
11878
11879 (define-public python2-munkres
11880 (package-with-python2 python-munkres))
11881
11882 (define-public python-whoosh
11883 (package
11884 (name "python-whoosh")
11885 (version "2.7.4")
11886 (source
11887 (origin
11888 (method url-fetch)
11889 (uri (pypi-uri "Whoosh" version))
11890 (sha256
11891 (base32
11892 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11893 (build-system python-build-system)
11894 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11895 (native-inputs
11896 `(("python-pytest" ,python-pytest)))
11897 (home-page "https://bitbucket.org/mchaput/whoosh")
11898 (synopsis "Full text indexing, search, and spell checking library")
11899 (description
11900 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11901 checking library.")
11902 (license license:bsd-2)))
11903
11904 (define-public python2-whoosh
11905 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11906 (package (inherit whoosh)
11907 (propagated-inputs
11908 `(("python2-backport-ssl-match-hostname"
11909 ,python2-backport-ssl-match-hostname)
11910 ,@(package-propagated-inputs whoosh))))))
11911
11912 (define-public python-pathlib
11913 (package
11914 (name "python-pathlib")
11915 (version "1.0.1")
11916 (source (origin
11917 (method url-fetch)
11918 (uri (pypi-uri "pathlib" version))
11919 (sha256
11920 (base32
11921 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11922 (build-system python-build-system)
11923 ;; The tests depend on the internal "test" module, which does not provide
11924 ;; a stable interface.
11925 (arguments `(#:tests? #f))
11926 (home-page "https://pathlib.readthedocs.org/")
11927 (synopsis "Object-oriented file system paths")
11928 (description "Pathlib offers a set of classes to handle file system paths.
11929 It offers the following advantages over using string objects:
11930
11931 @enumerate
11932 @item No more cumbersome use of os and os.path functions. Everything can
11933 be done easily through operators, attribute accesses, and method calls.
11934 @item Embodies the semantics of different path types. For example,
11935 comparing Windows paths ignores casing.
11936 @item Well-defined semantics, eliminating any inconsistencies or
11937 ambiguities (forward vs. backward slashes, etc.).
11938 @end enumerate
11939
11940 Note: In Python 3.4, pathlib is now part of the standard library. For other
11941 Python versions please consider python-pathlib2 instead, which tracks the
11942 standard library module. This module (python-pathlib) isn't maintained
11943 anymore.")
11944 (license license:expat)))
11945
11946 (define-public python2-pathlib
11947 (package-with-python2 python-pathlib))
11948
11949 (define-public python2-pathlib2
11950 (package
11951 (name "python2-pathlib2")
11952 (version "2.3.5")
11953 (source (origin
11954 (method url-fetch)
11955 (uri (pypi-uri "pathlib2" version))
11956 (sha256
11957 (base32
11958 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11959 (build-system python-build-system)
11960 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11961 ;; version is 3.4 which already includes this package as part of the
11962 ;; standard library.
11963 (arguments
11964 `(#:python ,python-2))
11965 (propagated-inputs
11966 `(("python2-scandir" ,python2-scandir)
11967 ("python2-six" ,python2-six)))
11968 (home-page "https://pypi.org/project/pathlib2/")
11969 (synopsis "Object-oriented file system paths - backport of standard
11970 pathlib module")
11971 (description "The goal of pathlib2 is to provide a backport of standard
11972 pathlib module which tracks the standard library module, so all the newest
11973 features of the standard pathlib can be used also on older Python versions.
11974
11975 Pathlib offers a set of classes to handle file system paths. It offers the
11976 following advantages over using string objects:
11977
11978 @enumerate
11979 @item No more cumbersome use of os and os.path functions. Everything can
11980 be done easily through operators, attribute accesses, and method calls.
11981 @item Embodies the semantics of different path types. For example,
11982 comparing Windows paths ignores casing.
11983 @item Well-defined semantics, eliminating any inconsistencies or
11984 ambiguities (forward vs. backward slashes, etc.).
11985 @end enumerate")
11986 (license license:expat)))
11987
11988 (define-public python2-pathlib2-bootstrap
11989 (hidden-package
11990 (package
11991 (inherit python2-pathlib2)
11992 (name "python2-pathlib2-bootstrap")
11993 (propagated-inputs
11994 `(("python2-scandir" ,python2-scandir)
11995 ("python2-six" ,python2-six-bootstrap))))))
11996
11997 (define-public python-jellyfish
11998 (package
11999 (name "python-jellyfish")
12000 (version "0.5.6")
12001 (source (origin
12002 (method url-fetch)
12003 (uri (pypi-uri "jellyfish" version))
12004 (sha256
12005 (base32
12006 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
12007 (build-system python-build-system)
12008 (native-inputs
12009 `(("python-pytest" ,python-pytest)))
12010 (home-page "https://github.com/jamesturk/jellyfish")
12011 (synopsis "Approximate and phonetic matching of strings")
12012 (description "Jellyfish uses a variety of string comparison and phonetic
12013 encoding algorithms to do fuzzy string matching.")
12014 (license license:bsd-2)
12015 (properties `((python2-variant . ,(delay python2-jellyfish))))))
12016
12017 (define-public python2-jellyfish
12018 (let ((jellyfish (package-with-python2
12019 (strip-python2-variant python-jellyfish))))
12020 (package (inherit jellyfish)
12021 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
12022 ,@(package-native-inputs jellyfish))))))
12023
12024 (define-public python2-unicodecsv
12025 (package
12026 (name "python2-unicodecsv")
12027 (version "0.14.1")
12028 (source (origin
12029 (method git-fetch)
12030 ;; The test suite is not included in the PyPi release.
12031 ;; https://github.com/jdunck/python-unicodecsv/issues/19
12032 (uri (git-reference
12033 (url "https://github.com/jdunck/python-unicodecsv")
12034 (commit version)))
12035 (file-name (git-file-name name version))
12036 (sha256
12037 (base32
12038 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
12039 (build-system python-build-system)
12040 (arguments
12041 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
12042 #:python ,python-2))
12043 (native-inputs
12044 `(("python2-unittest2" ,python2-unittest2)))
12045 (home-page "https://github.com/jdunck/python-unicodecsv")
12046 (synopsis "Unicode CSV module for Python 2")
12047 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
12048 module, adding support for Unicode strings.")
12049 (license license:bsd-2)))
12050
12051 (define-public python-rarfile
12052 (package
12053 (name "python-rarfile")
12054 (version "2.8")
12055 (source (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "rarfile" version))
12058 (sha256
12059 (base32
12060 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
12061 (build-system python-build-system)
12062 (arguments
12063 '(#:phases
12064 (modify-phases %standard-phases
12065 (replace 'check
12066 ;; Many tests fail, but the installation proceeds.
12067 (lambda _ (invoke "make" "-C" "test" "test"))))))
12068 (native-inputs
12069 `(("which" ,which))) ; required for tests
12070 (propagated-inputs
12071 `(("libarchive" ,libarchive)))
12072 (home-page "https://github.com/markokr/rarfile")
12073 (synopsis "RAR archive reader for Python")
12074 (description "This is Python module for RAR archive reading. The interface
12075 is made as zipfile like as possible.")
12076 (license license:isc)))
12077
12078 (define-public python2-rarfile
12079 (package-with-python2 python-rarfile))
12080
12081 (define-public python-magic
12082 (package
12083 (name "python-magic")
12084 (version "0.4.15")
12085 (source
12086 (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "python-magic" version))
12089 (sha256
12090 (base32
12091 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
12092 (file-name (string-append name "-" version "-checkout"))))
12093 (build-system python-build-system)
12094 (arguments
12095 ;; The tests are unreliable, so don't run them. The tests fail
12096 ;; under Python3 because they were written for Python2 and
12097 ;; contain import statements that do not work in Python3. One of
12098 ;; the tests fails under Python2 because its assertions are
12099 ;; overly stringent; it relies on comparing output strings which
12100 ;; are brittle and can change depending on the version of
12101 ;; libmagic being used and the system on which the test is
12102 ;; running. In my case, under GuixSD 0.10.0, only one test
12103 ;; failed, and it seems to have failed only because the version
12104 ;; of libmagic that is packaged in Guix outputs a slightly
12105 ;; different (but not wrong) string than the one that the test
12106 ;; expected.
12107 '(#:tests? #f
12108 #:phases (modify-phases %standard-phases
12109 ;; Replace a specific method call with a hard-coded
12110 ;; path to the necessary libmagic.so file in the
12111 ;; store. If we don't do this, then the method call
12112 ;; will fail to find the libmagic.so file, which in
12113 ;; turn will cause any application using
12114 ;; python-magic to fail.
12115 (add-before 'build 'hard-code-path-to-libmagic
12116 (lambda* (#:key inputs #:allow-other-keys)
12117 (let ((file (assoc-ref inputs "file")))
12118 (substitute* "magic.py"
12119 (("ctypes.util.find_library\\('magic'\\)")
12120 (string-append "'" file "/lib/libmagic.so'")))
12121 #t)))
12122 (add-before 'install 'disable-egg-compression
12123 (lambda _
12124 (let ((port (open-file "setup.cfg" "a")))
12125 (display "\n[easy_install]\nzip_ok = 0\n"
12126 port)
12127 (close-port port)
12128 #t))))))
12129 (inputs
12130 ;; python-magic needs to be able to find libmagic.so.
12131 `(("file" ,file)))
12132 (home-page
12133 "https://github.com/ahupp/python-magic")
12134 (synopsis
12135 "File type identification using libmagic")
12136 (description
12137 "This module uses ctypes to access the libmagic file type
12138 identification library. It makes use of the local magic database and
12139 supports both textual and MIME-type output. Note that this module and
12140 the python-file module both provide a \"magic.py\" file; these two
12141 modules, which are different and were developed separately, both serve
12142 the same purpose: to provide Python bindings for libmagic.")
12143 (license license:expat)))
12144
12145 (define-public python2-magic
12146 (package-with-python2 python-magic))
12147
12148 (define-public python2-s3cmd
12149 (package
12150 (name "python2-s3cmd")
12151 (version "1.6.1")
12152 (source
12153 (origin
12154 (method url-fetch)
12155 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12156 "s3cmd-" version ".tar.gz"))
12157 (sha256
12158 (base32
12159 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12160 (build-system python-build-system)
12161 (arguments
12162 ;; s3cmd is written for python2 only and contains no tests.
12163 `(#:python ,python-2
12164 #:tests? #f))
12165 (propagated-inputs
12166 `(("python2-dateutil" ,python2-dateutil)
12167 ;; The python-file package also provides a magic.py module.
12168 ;; This is an unfortunate state of affairs; however, s3cmd
12169 ;; fails to install if it cannot find specifically the
12170 ;; python-magic package. Thus we include it, instead of using
12171 ;; python-file. Ironically, s3cmd sometimes works better
12172 ;; without libmagic bindings at all:
12173 ;; https://github.com/s3tools/s3cmd/issues/198
12174 ("python2-magic" ,python2-magic)))
12175 (home-page "https://s3tools.org/s3cmd")
12176 (synopsis "Command line tool for S3-compatible storage services")
12177 (description
12178 "S3cmd is a command line tool for uploading, retrieving and managing data
12179 in storage services that are compatible with the Amazon Simple Storage
12180 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12181 GnuPG encryption, and more. It also supports management of Amazon's
12182 CloudFront content delivery network.")
12183 (license license:gpl2+)))
12184
12185 (define-public python-pkgconfig
12186 (package
12187 (name "python-pkgconfig")
12188 (version "1.3.1")
12189 (source
12190 (origin
12191 (method url-fetch)
12192 (uri (pypi-uri "pkgconfig" version))
12193 (sha256
12194 (base32
12195 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12196 (build-system python-build-system)
12197 (native-inputs
12198 `(("python-nose" ,python-nose)))
12199 (inputs
12200 `(("pkg-config" ,pkg-config)))
12201 (arguments
12202 `(#:phases
12203 (modify-phases %standard-phases
12204 (add-before 'build 'patch
12205 ;; Hard-code the path to pkg-config.
12206 (lambda _
12207 (substitute* "pkgconfig/pkgconfig.py"
12208 (("cmd = 'pkg-config")
12209 (string-append "cmd = '" (which "pkg-config"))))
12210 #t))
12211 (replace 'check
12212 (lambda _
12213 (invoke "nosetests" "test.py"))))))
12214 (home-page "https://github.com/matze/pkgconfig")
12215 (synopsis "Python interface for pkg-config")
12216 (description "This module provides a Python interface to pkg-config. It
12217 can be used to find all pkg-config packages, check if a package exists,
12218 check if a package meets certain version requirements, query CFLAGS and
12219 LDFLAGS and parse the output to build extensions with setup.py.")
12220 (license license:expat)))
12221
12222 (define-public python2-pkgconfig
12223 (package-with-python2 python-pkgconfig))
12224
12225 (define-public python-bz2file
12226 (package
12227 (name "python-bz2file")
12228 (version "0.98")
12229 (source
12230 (origin
12231 (method url-fetch)
12232 (uri (pypi-uri "bz2file" version))
12233 (sha256
12234 (base32
12235 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12236 (build-system python-build-system)
12237 (arguments
12238 `(#:tests? #f)) ; Tests use deprecated python modules.
12239 (home-page "https://github.com/nvawda/bz2file")
12240 (synopsis "Read and write bzip2-compressed files")
12241 (description
12242 "Bz2file is a Python library for reading and writing bzip2-compressed
12243 files. It contains a drop-in replacement for the I/O interface in the
12244 standard library's @code{bz2} module, including features from the latest
12245 development version of CPython that are not available in older releases.")
12246 (license license:asl2.0)))
12247
12248 (define-public python2-bz2file
12249 (package-with-python2 python-bz2file))
12250
12251 (define-public python-future
12252 (package
12253 (name "python-future")
12254 (version "0.17.1")
12255 (source
12256 (origin
12257 (method url-fetch)
12258 (uri (pypi-uri "future" version))
12259 (sha256
12260 (base32
12261 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12262 (build-system python-build-system)
12263 ;; Many tests connect to the network or are otherwise flawed.
12264 ;; https://github.com/PythonCharmers/python-future/issues/210
12265 (arguments
12266 `(#:tests? #f))
12267 (home-page "https://python-future.org")
12268 (synopsis "Single-source support for Python 3 and 2")
12269 (description
12270 "@code{python-future} is the missing compatibility layer between Python 2 and
12271 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12272 to support both Python 2 and Python 3 with minimal overhead.")
12273 (license license:expat)))
12274
12275 (define-public python2-future
12276 (package-with-python2 python-future))
12277
12278 (define-public python-cysignals
12279 (package
12280 (name "python-cysignals")
12281 (version "1.9.0")
12282 (source
12283 (origin
12284 (method url-fetch)
12285 (uri (pypi-uri "cysignals" version))
12286 (sha256
12287 (base32
12288 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12289 (build-system python-build-system)
12290 (native-inputs
12291 `(("python-cython" ,python-cython)
12292 ("python-sphinx" ,python-sphinx)))
12293 (inputs
12294 `(("pari-gp" ,pari-gp)))
12295 (arguments
12296 `(#:modules ((guix build python-build-system)
12297 ((guix build gnu-build-system) #:prefix gnu:)
12298 (guix build utils))
12299 ;; FIXME: Tests are executed after installation and currently fail
12300 ;; when not installing into standard locations; the author is working
12301 ;; on a fix.
12302 #:tests? #f
12303 #:phases
12304 (modify-phases %standard-phases
12305 (add-before
12306 'build 'configure
12307 (assoc-ref gnu:%standard-phases 'configure)))))
12308 (home-page
12309 "https://github.com/sagemath/cysignals")
12310 (synopsis
12311 "Handling of interrupts and signals for Cython")
12312 (description
12313 "The cysignals package provides mechanisms to handle interrupts (and
12314 other signals and errors) in Cython code, using two related approaches,
12315 for mixed Cython/Python code or external C libraries and pure Cython code,
12316 respectively.")
12317 (license license:lgpl3+)))
12318
12319 (define-public python2-cysignals
12320 (package-with-python2 python-cysignals))
12321
12322 (define-public python2-shedskin
12323 (package
12324 (name "python2-shedskin")
12325 (version "0.9.4")
12326 (source
12327 (origin
12328 (method url-fetch)
12329 (uri (string-append "https://github.com/shedskin/shedskin/"
12330 "releases/download/v" version
12331 "/shedskin-" version ".tgz"))
12332 (sha256
12333 (base32
12334 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12335 (build-system python-build-system)
12336 (arguments
12337 `(#:python ,python-2
12338 #:phases (modify-phases %standard-phases
12339 (add-after 'unpack 'fix-resulting-include-libs
12340 (lambda* (#:key inputs #:allow-other-keys)
12341 (let ((libgc (assoc-ref inputs "libgc"))
12342 (pcre (assoc-ref inputs "pcre")))
12343 (substitute* "shedskin/makefile.py"
12344 (("variable == 'CCFLAGS':[ ]*")
12345 (string-append "variable == 'CCFLAGS':\n"
12346 " line += ' -I " pcre "/include"
12347 " -I " libgc "/include'"))
12348 (("variable == 'LFLAGS':[ ]*")
12349 (string-append "variable == 'LFLAGS':\n"
12350 " line += ' -L" pcre "/lib"
12351 " -L " libgc "/lib'")))
12352 #t))))))
12353 (inputs `(("pcre" ,pcre)
12354 ("libgc" ,libgc)))
12355 (home-page "https://shedskin.github.io/")
12356 (synopsis "Experimental Python-2 to C++ Compiler")
12357 (description (string-append "This is an experimental compiler for a subset of
12358 Python. It generates C++ code and a Makefile."))
12359 (license (list license:gpl3 license:bsd-3 license:expat))))
12360
12361 (define-public python2-rope
12362 (package
12363 (name "python2-rope")
12364 (version "0.11.0")
12365 (source
12366 (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "rope" version))
12369 (sha256
12370 (base32
12371 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12372 (arguments
12373 ;; Rope has only partial python3 support, see `python-rope'
12374 `(#:python ,python-2))
12375 (build-system python-build-system)
12376 (native-inputs
12377 `(("python2-unittest2" ,python2-unittest2)))
12378 (home-page "https://github.com/python-rope/rope")
12379 (synopsis "Refactoring library for Python")
12380 (description "Rope is a refactoring library for Python. It facilitates
12381 the renaming, moving and extracting of attributes, functions, modules, fields
12382 and parameters in Python 2 source code. These refactorings can also be applied
12383 to occurrences in strings and comments.")
12384 (license license:gpl2)))
12385
12386 (define-public python-rope
12387 (package
12388 (inherit python2-rope)
12389 (name "python-rope")
12390 (arguments `(#:python ,python-wrapper
12391 ;; XXX: Only partial python3 support, results in some failing
12392 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12393 #:tests? #f))
12394 (properties `((python2-variant . ,(delay python2-rope))))))
12395
12396 (define-public python-py3status
12397 (package
12398 (name "python-py3status")
12399 (version "3.21")
12400 (source
12401 (origin
12402 (method url-fetch)
12403 (uri (pypi-uri "py3status" version))
12404 (sha256
12405 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12406 (build-system python-build-system)
12407 (inputs
12408 `(("file" ,file)))
12409 (arguments
12410 '(#:phases
12411 (modify-phases %standard-phases
12412 ;; 'file' is used for detection of configuration file encoding
12413 ;; let's make link the dependency to particular input
12414 (add-before 'build 'patch-file-path
12415 (lambda* (#:key inputs #:allow-other-keys)
12416 (let ((file-path (assoc-ref inputs "file")))
12417 (substitute* "py3status/parse_config.py"
12418 (("\\[\"file\", \"-b\"")
12419 (string-append "['" file-path "/bin/file', '-b'")))
12420 #t))))
12421 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12422 (home-page "https://github.com/ultrabug/py3status")
12423 (synopsis "Extensible i3status wrapper written in Python")
12424 (description "py3status is an i3status wrapper which extends i3status
12425 functionality in a modular way, allowing you to extend your panel with your
12426 own code, responding to click events and updating clock every second.")
12427 (license license:bsd-3)))
12428
12429 (define-public python2-selectors2
12430 (package
12431 (name "python2-selectors2")
12432 (version "2.0.1")
12433 (source (origin
12434 (method url-fetch)
12435 (uri (pypi-uri "selectors2" version))
12436 (sha256
12437 (base32
12438 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12439 (build-system python-build-system)
12440 (arguments
12441 `(#:python ,python-2))
12442 (native-inputs
12443 `(("python2-mock" ,python2-mock)
12444 ("python2-psutil" ,python2-psutil)))
12445 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12446 (synopsis "Backport of the selectors module from Python 3.5+")
12447 (description
12448 "This package provides a drop-in replacement for the @code{selectors}
12449 module in Python 3.5 and later.")
12450 (license license:expat)))
12451
12452 (define-public python-tblib
12453 (package
12454 (name "python-tblib")
12455 (version "1.6.0")
12456 (source (origin
12457 (method url-fetch)
12458 (uri (pypi-uri "tblib" version))
12459 (sha256
12460 (base32
12461 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12462 (build-system python-build-system)
12463 (arguments
12464 `(#:phases
12465 (modify-phases %standard-phases
12466 (replace 'check
12467 (lambda _
12468 ;; Upstream runs tests after installation and the package itself
12469 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12470 ;; found.
12471 (setenv "PYTHONPATH"
12472 (string-append (getcwd) "/build/lib:"
12473 (getenv "PYTHONPATH")))
12474 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12475 (native-inputs
12476 `(("python-pytest" ,python-pytest)
12477 ("python-six" ,python-six)))
12478 (home-page "https://github.com/ionelmc/python-tblib")
12479 (synopsis "Traceback serialization library")
12480 (description
12481 "Traceback serialization allows you to:
12482
12483 @enumerate
12484 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12485 different processes. This allows better error handling when running code over
12486 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12487
12488 @item Parse traceback strings and raise with the parsed tracebacks.
12489 @end enumerate\n")
12490 (license license:bsd-3)))
12491
12492 (define-public python2-tblib
12493 (package-with-python2 python-tblib))
12494
12495 (define-public python-greenlet
12496 (package
12497 (name "python-greenlet")
12498 (version "0.4.16")
12499 (source (origin
12500 (method url-fetch)
12501 (uri (pypi-uri "greenlet" version))
12502 (sha256
12503 (base32
12504 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12505 (build-system python-build-system)
12506 (home-page "https://greenlet.readthedocs.io/")
12507 (synopsis "Lightweight in-process concurrent programming")
12508 (description
12509 "Greenlet package is a spin-off of Stackless, a version of CPython
12510 that supports micro-threads called \"tasklets\". Tasklets run
12511 pseudo-concurrently (typically in a single or a few OS-level threads) and
12512 are synchronized with data exchanges on \"channels\".")
12513 (license (list license:psfl license:expat))))
12514
12515 (define-public python2-greenlet
12516 (package-with-python2 python-greenlet))
12517
12518 (define-public python-objgraph
12519 (package
12520 (name "python-objgraph")
12521 (version "3.4.1")
12522 (source
12523 (origin
12524 (method url-fetch)
12525 (uri (pypi-uri "objgraph" version))
12526 (sha256
12527 (base32
12528 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12529 (build-system python-build-system)
12530 (propagated-inputs
12531 `(("python-graphviz" ,python-graphviz)))
12532 (native-inputs
12533 `(("python-mock" ,python-mock)
12534 ("graphviz" ,graphviz)))
12535 (home-page "https://mg.pov.lt/objgraph/")
12536 (synopsis "Draw Python object reference graphs with graphviz")
12537 (description
12538 "This package provides tools to draw Python object reference graphs with
12539 graphviz.")
12540 (license license:expat)))
12541
12542 (define-public python2-objgraph
12543 (package-with-python2 python-objgraph))
12544
12545 (define-public python-gevent
12546 (package
12547 (name "python-gevent")
12548 (version "20.6.2")
12549 (source (origin
12550 (method url-fetch)
12551 (uri (pypi-uri "gevent" version))
12552 (sha256
12553 (base32
12554 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12555 (modules '((guix build utils)))
12556 (snippet
12557 '(begin
12558 ;; unbunding libev and c-ares
12559 (delete-file-recursively "deps")
12560 #t))))
12561 (build-system python-build-system)
12562 (arguments
12563 `(#:modules ((ice-9 ftw)
12564 (ice-9 match)
12565 (srfi srfi-26)
12566 (guix build utils)
12567 (guix build python-build-system))
12568 #:phases (modify-phases %standard-phases
12569 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12570 (lambda _
12571 (substitute* "src/gevent/subprocess.py"
12572 (("/bin/sh") (which "sh")))
12573 (for-each (lambda (file)
12574 (substitute* file
12575 (("/bin/sh") (which "sh"))
12576 (("/bin/true") (which "true"))))
12577 (find-files "src/greentest" "\\.py$"))
12578 #t))
12579 (add-before 'build 'do-not-use-bundled-sources
12580 (lambda _
12581 (setenv "GEVENTSETUP_EMBED" "0")
12582
12583 ;; Prevent building bundled libev.
12584 (substitute* "setup.py"
12585 (("run_make=_BUILDING")
12586 "run_make=False"))
12587 #t))
12588 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12589 (lambda* (#:key inputs #:allow-other-keys)
12590 (let ((greenlet (string-append
12591 (assoc-ref inputs "python-greenlet")
12592 "/include")))
12593 (match (scandir greenlet
12594 (lambda (item)
12595 (string-prefix? "python" item)))
12596 ((python)
12597 (setenv "C_INCLUDE_PATH"
12598 (string-append greenlet "/" python ":"
12599 (or (getenv "C_INCLUDE_PATH")
12600 ""))))))
12601 #t))
12602 (add-before 'check 'pretend-to-be-CI
12603 (lambda _
12604 ;; A few tests are skipped due to network constraints or
12605 ;; get longer timeouts when running in a CI environment.
12606 ;; Piggy-back on that, as we need the same adjustments.
12607 (setenv "TRAVIS" "1")
12608 (setenv "APPVEYOR" "1")
12609 #t))
12610 (add-before 'check 'adjust-tests
12611 (lambda _
12612 (let ((disabled-tests
12613 '(;; These tests rely on networking which is not
12614 ;; available in the build container.
12615 "test_urllib2net.py"
12616 "test__server.py"
12617 "test__server_pywsgi.py"
12618 "test_socket.py"
12619 "test__socket.py"
12620 "test__socket_ssl.py"
12621 "test__socket_dns.py"
12622 "test__socket_dns6.py"
12623 "test___example_servers.py"
12624 "test__getaddrinfo_import.py"
12625 "test__examples.py"
12626 "test_httplib.py"
12627 "test_https.py"
12628 "test_urllib2_localnet.py"
12629 "test_ssl.py"
12630 "test__ssl.py"
12631 ;; XXX: These tests borrow functionality from the
12632 ;; Python builtin 'test' module, but it is not
12633 ;; installed with the Guix Python distribution.
12634 "test_smtpd.py"
12635 "test_wsgiref.py"
12636 "test_urllib2.py"
12637 "test_thread.py"
12638 "test_threading.py"
12639 "test__threading_2.py"
12640 ;; These tests rely on KeyboardInterrupts which do not
12641 ;; work inside the build container for some reason
12642 ;; (lack of controlling terminal?).
12643 "test_subprocess.py"
12644 "test__issues461_471.py"
12645 ;; TODO: Patch out the tests that use getprotobyname, etc
12646 ;; instead of disabling all the tests from these files.
12647 "test__resolver_dnspython.py"
12648 "test__doctests.py"
12649 "test__all__.py"
12650 "test___config.py"
12651 "test__execmodules.py")))
12652 (call-with-output-file "skipped_tests.txt"
12653 (lambda (port)
12654 (format port "~a~%"
12655 (string-join disabled-tests "\n"))))
12656 #t)))
12657 (replace 'check
12658 (lambda _
12659 ;; Make sure the build directory is on PYTHONPATH.
12660 (setenv "PYTHONPATH"
12661 (string-append
12662 (getenv "PYTHONPATH") ":"
12663 (getcwd) "/build/"
12664 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12665
12666 ;; Use the build daemons configured number of workers.
12667 (setenv "NWORKERS" (number->string (parallel-job-count)))
12668
12669 (invoke "python" "-m" "gevent.tests" "--config"
12670 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12671 (propagated-inputs
12672 `(("python-greenlet" ,python-greenlet)
12673 ("python-objgraph" ,python-objgraph)
12674 ("python-zope.event" ,python-zope-event)
12675 ("python-zope.interface" ,python-zope-interface)))
12676 (native-inputs
12677 `(("python-six" ,python-six)
12678
12679 ;; For tests.
12680 ("python-dnspython" ,python-dnspython)
12681 ("python-psutil" ,python-psutil)))
12682 (inputs
12683 `(("c-ares" ,c-ares)
12684 ("libev" ,libev)))
12685 (home-page "http://www.gevent.org/")
12686 (synopsis "Coroutine-based network library")
12687 (description
12688 "gevent is a coroutine-based Python networking library that uses greenlet
12689 to provide a high-level synchronous API on top of the libev event loop.")
12690 (license license:expat)
12691 (properties `((python2-variant . ,(delay python2-gevent))))))
12692
12693 (define-public python2-gevent
12694 (let ((base (package-with-python2
12695 (strip-python2-variant python-gevent))))
12696 (package
12697 (inherit base)
12698 (native-inputs `(,@(package-native-inputs base)
12699 ("python-mock" ,python2-mock)
12700 ("python2-selectors2" ,python2-selectors2))))))
12701
12702 (define-public python-fastimport
12703 (package
12704 (name "python-fastimport")
12705 (version "0.9.8")
12706 (source
12707 (origin
12708 (method url-fetch)
12709 (uri (pypi-uri "fastimport" version))
12710 (sha256
12711 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12712 (build-system python-build-system)
12713 (home-page "https://github.com/jelmer/python-fastimport")
12714 (synopsis "VCS fastimport parser and generator in Python")
12715 (description "This package provides a parser for and generator of the Git
12716 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12717 format.")
12718 (license license:gpl2+)))
12719
12720 (define-public python2-fastimport
12721 (package-with-python2 python-fastimport))
12722
12723 (define-public python-twisted
12724 (package
12725 (name "python-twisted")
12726 (version "19.7.0")
12727 (source (origin
12728 (method url-fetch)
12729 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12730 (sha256
12731 (base32
12732 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12733 (build-system python-build-system)
12734 (arguments
12735 '(#:tests? #f)) ; FIXME: some tests fail
12736 (propagated-inputs
12737 `(("python-zope-interface" ,python-zope-interface)
12738 ("python-pyhamcrest" ,python-pyhamcrest)
12739 ("python-incremental" ,python-incremental)
12740 ("python-hyperlink" ,python-hyperlink)
12741 ("python-constantly" ,python-constantly)
12742 ("python-automat" ,python-automat)))
12743 (home-page "https://twistedmatrix.com/")
12744 (synopsis "Asynchronous networking framework written in Python")
12745 (description
12746 "Twisted is an extensible framework for Python programming, with special
12747 focus on event-based network programming and multiprotocol integration.")
12748 (license license:expat)))
12749
12750 (define-public python2-twisted
12751 (package-with-python2 python-twisted))
12752
12753 (define-public python-pika
12754 (package
12755 (name "python-pika")
12756 (version "0.12.0")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "pika" version))
12761 (sha256
12762 (base32
12763 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12764 (build-system python-build-system)
12765 (native-inputs
12766 `(("python-pyev" ,python-pyev)
12767 ("python-tornado" ,python-tornado)
12768 ("python-twisted" ,python-twisted)))
12769 (home-page "https://pika.readthedocs.org")
12770 (synopsis "Pure Python AMQP Client Library")
12771 (description
12772 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12773 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12774 network support library.")
12775 (license license:bsd-3)))
12776
12777 (define-public python2-pika
12778 (package-with-python2 python-pika))
12779
12780 (define-public python-ply
12781 (package
12782 (name "python-ply")
12783 (version "3.11")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "ply" version))
12788 (sha256
12789 (base32
12790 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12791 (build-system python-build-system)
12792 (home-page "http://www.dabeaz.com/ply/")
12793 (synopsis "Python Lex & Yacc")
12794 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12795 It uses LR parsing and does extensive error checking.")
12796 (license license:bsd-3)))
12797
12798 (define-public python-tabulate
12799 (package
12800 (name "python-tabulate")
12801 (version "0.8.7")
12802 (source (origin
12803 (method url-fetch)
12804 (uri (pypi-uri "tabulate" version))
12805 (sha256
12806 (base32
12807 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12808 (build-system python-build-system)
12809 (arguments
12810 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12811 ;; and the latest release is not tagged in the upstream repository.
12812 '(#:tests? #f))
12813 (home-page "https://bitbucket.org/astanin/python-tabulate")
12814 (synopsis "Pretty-print tabular data")
12815 (description
12816 "Tabulate is a library and command-line utility to pretty-print tabular
12817 data in Python.")
12818 (license license:expat)))
12819
12820 (define-public python2-tabulate
12821 (package-with-python2 python-tabulate))
12822
12823 (define-public python-kazoo
12824 (package
12825 (name "python-kazoo")
12826 (version "2.4.0")
12827 (source
12828 (origin
12829 (method url-fetch)
12830 (uri (pypi-uri "kazoo" version))
12831 (sha256
12832 (base32
12833 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12834 (build-system python-build-system)
12835 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12836 (propagated-inputs
12837 `(("python-six" ,python-six)))
12838 (home-page "https://kazoo.readthedocs.org")
12839 (synopsis "High-level Zookeeper client library")
12840 (description
12841 "Kazoo is a Python client library for the Apache Zookeeper distributed
12842 application service. It is designed to be easy to use and to avoid common
12843 programming errors.")
12844 (license license:asl2.0)))
12845
12846 (define-public python2-kazoo
12847 (package-with-python2 python-kazoo))
12848
12849 (define-public python-pykafka
12850 (package
12851 (name "python-pykafka")
12852 (version "2.4.0")
12853 (source (origin
12854 (method url-fetch)
12855 (uri (pypi-uri "pykafka" version))
12856 (sha256
12857 (base32
12858 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12859 (build-system python-build-system)
12860 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12861 (propagated-inputs
12862 `(("python-gevent" ,python-gevent)
12863 ("python-kazoo" ,python-kazoo)
12864 ("python-tabulate" ,python-tabulate)))
12865 (inputs
12866 `(("librdkafka" ,librdkafka)))
12867 (home-page "https://pykafka.readthedocs.io/")
12868 (synopsis "Apache Kafka client for Python")
12869 (description
12870 "PyKafka is a client for the Apache Kafka distributed messaging system.
12871 It includes Python implementations of Kafka producers and consumers, which
12872 are optionally backed by a C extension built on librdkafka.")
12873 (license license:asl2.0)))
12874
12875 (define-public python2-pykafka
12876 (package-with-python2 python-pykafka))
12877
12878 (define-public python-wcwidth
12879 (package
12880 (name "python-wcwidth")
12881 (version "0.1.8")
12882 (source (origin
12883 (method url-fetch)
12884 (uri (pypi-uri "wcwidth" version))
12885 (sha256
12886 (base32
12887 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12888 (build-system python-build-system)
12889 (home-page "https://github.com/jquast/wcwidth")
12890 (synopsis "Measure number of terminal column cells of wide-character codes")
12891 (description "Wcwidth measures the number of terminal column cells of
12892 wide-character codes. It is useful for those implementing a terminal emulator,
12893 or programs that carefully produce output to be interpreted by one. It is a
12894 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12895 specified in POSIX.1-2001 and POSIX.1-2008.")
12896 (license license:expat)))
12897
12898 (define-public python2-wcwidth
12899 (package-with-python2 python-wcwidth))
12900
12901 (define-public python2-jsonrpclib
12902 (package
12903 (name "python2-jsonrpclib")
12904 (version "0.1.7")
12905 (source (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "jsonrpclib" version))
12908 (sha256
12909 (base32
12910 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12911 (build-system python-build-system)
12912 (arguments
12913 `(#:tests? #f
12914 #:python ,python-2))
12915 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12916 (synopsis "Implementation of JSON-RPC specification for Python")
12917 (description
12918 "This library is an implementation of the JSON-RPC specification.
12919 It supports both the original 1.0 specification, as well as the
12920 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12921 etc.")
12922 (license license:asl2.0)))
12923
12924 (define-public python-chai
12925 (package
12926 (name "python-chai")
12927 (version "1.1.2")
12928 (source (origin
12929 (method url-fetch)
12930 (uri (pypi-uri "chai" version))
12931 (sha256
12932 (base32
12933 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12934 (build-system python-build-system)
12935 (home-page "https://github.com/agoragames/chai")
12936 (synopsis "Mocking framework for Python")
12937 (description
12938 "Chai provides an api for mocking, stubbing and spying your python
12939 objects, patterned after the Mocha library for Ruby.")
12940 (license license:bsd-3)))
12941
12942 (define-public python2-chai
12943 (package-with-python2 python-chai))
12944
12945 (define-public python-inflection
12946 (package
12947 (name "python-inflection")
12948 (version "0.3.1")
12949 (source
12950 (origin (method url-fetch)
12951 (uri (pypi-uri "inflection" version))
12952 (sha256
12953 (base32
12954 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12955 (build-system python-build-system)
12956 (native-inputs
12957 `(("python-pytest" ,python-pytest)))
12958 (home-page "https://github.com/jpvanhal/inflection")
12959 (synopsis "Python string transformation library")
12960 (description
12961 "Inflection is a string transformation library. It singularizes
12962 and pluralizes English words, and transforms strings from CamelCase to
12963 underscored string.")
12964 (license license:expat)))
12965
12966 (define-public python2-inflection
12967 (package-with-python2 python-inflection))
12968
12969 (define-public python-pylev
12970 (package
12971 (name "python-pylev")
12972 (version "1.3.0")
12973 (source (origin
12974 (method url-fetch)
12975 (uri (pypi-uri "pylev" version))
12976 (sha256
12977 (base32
12978 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12979 (build-system python-build-system)
12980 (home-page "https://github.com/toastdriven/pylev")
12981 (synopsis "Levenshtein distance implementation in Python")
12982 (description "Pure Python Levenshtein implementation, based off the
12983 Wikipedia code samples at
12984 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12985 (license license:bsd-3)))
12986
12987 (define-public python2-pylev
12988 (package-with-python2 python-pylev))
12989
12990 (define-public python-cleo
12991 (package
12992 (name "python-cleo")
12993 (version "0.8.1")
12994 (source (origin
12995 (method url-fetch)
12996 (uri (pypi-uri "cleo" version))
12997 (sha256
12998 (base32
12999 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
13000 (build-system python-build-system)
13001 (native-inputs
13002 `( ;; For testing
13003 ("python-mock" ,python-mock)
13004 ("python-pytest-mock" ,python-pytest-mock)
13005 ("python-pytest" ,python-pytest)))
13006 (propagated-inputs
13007 `(("python-backpack" ,python-backpack)
13008 ("python-clikit" ,python-clikit)
13009 ("python-pastel" ,python-pastel)
13010 ("python-pylev" ,python-pylev)))
13011 (home-page "https://github.com/sdispater/cleo")
13012 (synopsis "Command-line arguments library for Python")
13013 (description
13014 "Cleo allows you to create command-line commands with signature in
13015 docstring and colored output.")
13016 (license license:expat)))
13017
13018 (define-public python2-cleo
13019 (package-with-python2 python-cleo))
13020
13021 (define-public python-tomlkit
13022 (package
13023 (name "python-tomlkit")
13024 (version "0.6.0")
13025 (source
13026 (origin
13027 (method url-fetch)
13028 (uri (pypi-uri "tomlkit" version))
13029 (sha256
13030 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
13031 (build-system python-build-system)
13032 (native-inputs
13033 `(("python-pytest" ,python-pytest)))
13034 (home-page "https://github.com/sdispater/tomlkit")
13035 (synopsis "Style-preserving TOML library")
13036 (description
13037 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
13038 preserves all comments, indentations, whitespace and internal element ordering,
13039 and makes them accessible and editable via an intuitive API. It can also
13040 create new TOML documents from scratch using the provided helpers. Part of the
13041 implementation has been adapted, improved, and fixed from Molten.")
13042 (license license:expat)))
13043
13044 (define-public python-shellingham
13045 (package
13046 (name "python-shellingham")
13047 (version "1.3.2")
13048 (source
13049 (origin
13050 (method url-fetch)
13051 (uri (pypi-uri "shellingham" version))
13052 (sha256
13053 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13054 (build-system python-build-system)
13055 (arguments
13056 `(#:phases
13057 (modify-phases %standard-phases
13058 (add-after 'unpack 'restore-setup.py
13059 ;; setup.py will return in the next release.
13060 ;; <https://github.com/sarugaku/shellingham/issues/33>
13061 (lambda _
13062 (with-output-to-file "setup.py"
13063 (lambda _
13064 (display "from setuptools import setup\nsetup()\n")))
13065 #t)))))
13066 (home-page "https://github.com/sarugaku/shellingham")
13067 (synopsis "Tool to detect surrounding shell")
13068 (description
13069 "Shellingham detects what shell the current Python executable is
13070 running in.")
13071 (license license:isc)))
13072
13073 (define-public python-memcached
13074 (package
13075 (name "python-memcached")
13076 (version "1.59")
13077 (source
13078 (origin
13079 (method url-fetch)
13080 (uri (pypi-uri "python-memcached" version))
13081 (sha256
13082 (base32
13083 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13084 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13085 (build-system python-build-system)
13086 (propagated-inputs `(("python-six" ,python-six)))
13087 (home-page
13088 "https://github.com/linsomniac/python-memcached")
13089 (synopsis "Pure python memcached client")
13090 (description
13091 "This software is a pure Python interface to the memcached memory cache
13092 daemon. It is the client side software which allows storing values in one or
13093 more, possibly remote, memcached servers.")
13094 (license license:psfl)))
13095
13096 (define-public python-clikit
13097 (package
13098 (name "python-clikit")
13099 (version "0.6.2")
13100 (source
13101 (origin
13102 (method url-fetch)
13103 (uri (pypi-uri "clikit" version))
13104 (sha256
13105 (base32
13106 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13107 (build-system python-build-system)
13108 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13109 (propagated-inputs
13110 `(("python-crashtest" ,python-crashtest)
13111 ("python-pastel" ,python-pastel)
13112 ("python-pylev" ,python-pylev)))
13113 (home-page "https://github.com/sdispater/clikit")
13114 (synopsis "Group of utilities to build command line interfaces")
13115 (description
13116 "CliKit is a group of utilities to build testable command line
13117 interfaces.")
13118 (properties `((python2-variant . ,(delay python2-clikit))))
13119 (license license:expat)))
13120
13121 (define-public python2-clikit
13122 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13123 (package/inherit
13124 base
13125 (propagated-inputs
13126 `(("python-enum34" ,python2-enum34)
13127 ("python-typing" ,python2-typing)
13128 ,@(package-propagated-inputs base))))))
13129
13130 (define-public python-msgpack-python
13131 (package
13132 (name "python-msgpack-python")
13133 (version "0.5.6")
13134 (source
13135 (origin
13136 (method url-fetch)
13137 (uri (pypi-uri "msgpack-python" version))
13138 (sha256
13139 (base32
13140 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13141 (build-system python-build-system)
13142 (home-page "http://msgpack.org/")
13143 (synopsis "Package to deserialize messages in MessagePack binary format")
13144 (description
13145 "MessagePack is an efficient binary serialization format. It lets you
13146 exchange data among multiple languages like JSON. But it's faster and
13147 smaller. Small integers are encoded into a single byte, and typical short
13148 strings require only one extra byte in addition to the strings themselves.")
13149 (license license:asl2.0)))
13150
13151 (define-public python-cachy
13152 (package
13153 (name "python-cachy")
13154 (version "0.3.0")
13155 (source
13156 (origin
13157 (method url-fetch)
13158 (uri (pypi-uri "cachy" version))
13159 (sha256
13160 (base32
13161 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13162 (build-system python-build-system)
13163 (arguments
13164 '(#:phases
13165 (modify-phases %standard-phases
13166 (replace 'check
13167 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13168 "pytest"))))))
13169 (native-inputs
13170 `(("memcached" ,memcached)
13171 ("python-fakeredis" ,python-fakeredis)
13172 ("python-flexmock" ,python-flexmock)
13173 ("python-pifpaf" ,python-pifpaf)
13174 ("python-pytest" ,python-pytest)))
13175 (propagated-inputs
13176 `(("python-memcached" ,python-memcached)
13177 ("python-msgpack-python" ,python-msgpack-python)
13178 ("python-redis" ,python-redis)))
13179 (home-page "https://github.com/sdispater/cachy")
13180 (synopsis "Simple yet effective caching library")
13181 (description
13182 "Cachy provides a simple yet effective caching library. A simple but
13183 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13184 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13185 (license license:expat)))
13186
13187 (define-public poetry
13188 (package
13189 (name "poetry")
13190 (version "1.0.10")
13191 ;; Poetry can only be built from source with Poetry.
13192 (source
13193 (origin
13194 (method url-fetch)
13195 (uri (pypi-uri "poetry" version))
13196 (sha256
13197 (base32
13198 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
13199 (build-system python-build-system)
13200 (arguments
13201 `(#:tests? #f ;; Pypi does not have tests.
13202 #:phases
13203 (modify-phases %standard-phases
13204 (add-before 'build 'patch-setup-py
13205 (lambda _
13206 (substitute* "setup.py"
13207 ;; poetry won't update version as 21.0.0 relies on python > 3.6
13208 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
13209 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
13210 ;; Reported upstream:
13211 ;; <https://github.com/python-poetry/poetry/issues/2752>.
13212 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
13213 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
13214 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
13215 #t)))))
13216 (propagated-inputs
13217 `(("python-cachecontrol" ,python-cachecontrol)
13218 ("python-cachy" ,python-cachy)
13219 ("python-cleo" ,python-cleo)
13220 ("python-clikit" ,python-clikit)
13221 ("python-html5lib" ,python-html5lib)
13222 ("python-jsonschema" ,python-jsonschema)
13223 ("python-keyring" ,python-keyring)
13224 ("python-msgpack-transitional" ,python-msgpack-transitional)
13225 ("python-pexpect" ,python-pexpect)
13226 ("python-pkginfo" ,python-pkginfo)
13227 ("python-pyparsing" ,python-pyparsing)
13228 ("python-pyrsistent" ,python-pyrsistent)
13229 ("python-requests" ,python-requests)
13230 ("python-requests-toolbelt" ,python-requests-toolbelt)
13231 ("python-shellingham" ,python-shellingham)
13232 ("python-tomlkit" ,python-tomlkit)
13233 ("python-virtualenv" ,python-virtualenv)))
13234 (home-page "https://python-poetry.org")
13235 (synopsis "Python dependency management and packaging made easy")
13236 (description "Poetry is a tool for dependency management and packaging
13237 in Python. It allows you to declare the libraries your project depends on and
13238 it will manage (install/update) them for you.")
13239 (license license:expat)))
13240
13241 (define-public python-lark-parser
13242 (package
13243 (name "python-lark-parser")
13244 (version "0.9.0")
13245 (source (origin
13246 (method url-fetch)
13247 (uri (pypi-uri "lark-parser" version))
13248 (sha256
13249 (base32
13250 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13251 (build-system python-build-system)
13252 (home-page "https://github.com/lark-parser/lark")
13253 (synopsis "Multi-language parser for Python")
13254 (description
13255 "Lark is a parser built with a focus on ergonomics, performance and
13256 resilience. Lark can parse all context-free languages. That means it is
13257 capable of parsing almost any programming language out there, and to
13258 some degree most natural languages too.")
13259 (license license:expat)))
13260
13261 (define-public python-libcst
13262 (package
13263 (name "python-libcst")
13264 (version "0.3.8")
13265 (source (origin
13266 (method url-fetch)
13267 (uri (pypi-uri "libcst" version))
13268 (sha256
13269 (base32
13270 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13271 (build-system python-build-system)
13272 (arguments
13273 `(#:phases
13274 (modify-phases %standard-phases
13275 (add-after 'unpack 'remove-failing-tests
13276 (lambda _
13277 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13278 (delete-file "libcst/tests/test_fuzz.py")
13279 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13280 (delete-file "libcst/tests/test_pyre_integration.py")
13281 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13282 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13283 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13284 #t))
13285 (add-before 'check 'generate-test-data
13286 (lambda _
13287 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13288 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13289 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13290 (replace 'check
13291 (lambda _
13292 (invoke "python" "-m" "unittest")
13293 #t)))))
13294 (native-inputs
13295 `(("python-black" ,python-black)
13296 ("python-isort" ,python-isort)))
13297 (propagated-inputs
13298 `(("python-typing-extensions" ,python-typing-extensions)
13299 ("python-typing-inspect" ,python-typing-inspect)
13300 ("python-pyyaml" ,python-pyyaml)))
13301 (home-page "https://github.com/Instagram/LibCST")
13302 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13303 (description
13304 "LibCST parses Python source code as a CST tree that keeps all
13305 formatting details (comments, whitespaces, parentheses, etc). It's useful
13306 for building automated refactoring (codemod) applications and linters.
13307 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13308 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13309 naming node types and fields, LibCST creates a lossless CST that looks and
13310 feels like an AST.")
13311 (license (list license:expat
13312 ;; Some files unde libcst/_parser/ are under Python Software
13313 ;; Foundation license (see LICENSE file for details)
13314 license:psfl
13315 ;; libcst/_add_slots.py
13316 license:asl2.0))))
13317
13318 (define-public python-typing-inspect
13319 (package
13320 (name "python-typing-inspect")
13321 (version "0.6.0")
13322 (source (origin
13323 (method url-fetch)
13324 (uri (pypi-uri "typing_inspect" version))
13325 (sha256
13326 (base32
13327 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13328 (build-system python-build-system)
13329 (propagated-inputs
13330 `(("python-mypy-extensions" ,python-mypy-extensions)
13331 ("python-typing-extensions" ,python-typing-extensions)))
13332 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13333 (synopsis "API for inspection of types in the Python @code{typing} module")
13334 (description
13335 "The @code{typing_inspect} module defines experimental API for runtime
13336 inspection of types defined in the Python standard typing module.")
13337 (license license:expat)))
13338
13339 (define-public python-lazy-object-proxy
13340 (package
13341 (name "python-lazy-object-proxy")
13342 (version "1.5.1")
13343 (source (origin
13344 (method url-fetch)
13345 (uri (pypi-uri "lazy-object-proxy" version))
13346 (sha256
13347 (base32
13348 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13349 (native-inputs
13350 `(("python-setuptools-scm" ,python-setuptools-scm)))
13351 (build-system python-build-system)
13352 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13353 (synopsis "Lazy object proxy for python")
13354 (description
13355 "Lazy object proxy is an object that wraps a callable but defers the call
13356 until the object is actually required, and caches the result of said call.")
13357 (license license:bsd-2)))
13358
13359 (define-public python2-lazy-object-proxy
13360 (package-with-python2 python-lazy-object-proxy))
13361
13362 (define-public python-dnspython
13363 (package
13364 (name "python-dnspython")
13365 (version "1.16.0")
13366 (source (origin
13367 (method url-fetch)
13368 (uri (string-append "http://www.dnspython.org/kits/"
13369 version "/dnspython-" version ".tar.gz"))
13370 (sha256
13371 (base32
13372 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13373 (build-system python-build-system)
13374 (arguments '(#:tests? #f)) ; XXX: requires internet access
13375 (home-page "http://www.dnspython.org")
13376 (synopsis "DNS toolkit for Python")
13377 (description
13378 "dnspython is a DNS toolkit for Python. It supports almost all record
13379 types. It can be used for queries, zone transfers, and dynamic updates.
13380 It supports TSIG authenticated messages and EDNS0.")
13381 (license license:expat)))
13382
13383 (define-public python2-dnspython
13384 (package-with-python2 python-dnspython))
13385
13386 (define-public python-py3dns
13387 (package
13388 (name "python-py3dns")
13389 (version "3.2.1")
13390 (source
13391 (origin
13392 (method url-fetch)
13393 (uri (pypi-uri "py3dns" version))
13394 (sha256
13395 (base32
13396 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13397 (build-system python-build-system)
13398 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13399 ;; removing functionality so we copy from Nix and "just don't build it".
13400 (arguments
13401 `(#:phases
13402 (modify-phases %standard-phases
13403 (add-after 'unpack 'patch-source
13404 (lambda _
13405 (substitute* "setup.py"
13406 (("import DNS") "")
13407 (("DNS.__version__") (string-append "\"" ,version "\"")))
13408 #t)))
13409 #:tests? #f)) ; Also skip the tests.
13410 (home-page "https://launchpad.net/py3dns")
13411 (synopsis "Python 3 DNS library")
13412 (description "This Python 3 module provides a DNS API for looking up DNS
13413 entries from within Python 3 modules and applications. This module is a
13414 simple, lightweight implementation.")
13415 (license license:psfl)))
13416
13417 (define-public python-email-validator
13418 (package
13419 (name "python-email-validator")
13420 (version "1.0.2")
13421 (source
13422 (origin (method url-fetch)
13423 (uri (pypi-uri "email_validator" version))
13424 (sha256
13425 (base32
13426 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13427 (build-system python-build-system)
13428 (arguments
13429 '(#:phases
13430 (modify-phases %standard-phases
13431 (add-before 'build 'use-dnspython
13432 (lambda _
13433 (substitute* "setup.py"
13434 (("dnspython3") "dnspython"))
13435 #t)))))
13436 (propagated-inputs
13437 `(("python-dnspython" ,python-dnspython)
13438 ("python-idna" ,python-idna)))
13439 (home-page "https://github.com/JoshData/python-email-validator")
13440 (synopsis "Email address validation library for Python")
13441 (description
13442 "This library validates email address syntax and deliverability.")
13443 (license license:cc0)))
13444
13445 (define-public python2-email-validator
13446 (package-with-python2 python-email-validator))
13447
13448 (define-public python-ukpostcodeparser
13449 (package
13450 (name "python-ukpostcodeparser")
13451 (version "1.0.3")
13452 (source (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "UkPostcodeParser" version))
13455 (sha256
13456 (base32
13457 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13458 (build-system python-build-system)
13459 (home-page "https://github.com/hamstah/ukpostcodeparser")
13460 (synopsis "UK Postcode parser for Python")
13461 (description
13462 "This library provides the @code{parse_uk_postcode} function for
13463 parsing UK postcodes.")
13464 (license license:expat)))
13465
13466 (define-public python2-ukpostcodeparser
13467 (package-with-python2 python-ukpostcodeparser))
13468
13469 (define-public python-faker
13470 (package
13471 (name "python-faker")
13472 (version "4.0.2")
13473 (source (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "Faker" version))
13476 (sha256
13477 (base32
13478 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13479 (build-system python-build-system)
13480 (arguments
13481 '(#:phases
13482 (modify-phases %standard-phases
13483 (replace 'check
13484 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13485 (native-inputs
13486 `(;; For testing
13487 ("python-freezegun" ,python-freezegun)
13488 ("python-pytest" ,python-pytest)
13489 ("python-random2" ,python-random2)
13490 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13491 ("python-validators" ,python-validators)))
13492 (propagated-inputs
13493 `(("python-dateutil" ,python-dateutil)
13494 ("python-text-unidecode" ,python-text-unidecode)))
13495 (home-page "https://github.com/joke2k/faker")
13496 (synopsis "Python package that generates fake data")
13497 (description
13498 "Faker is a Python package that generates fake data such as names,
13499 addresses, and phone numbers.")
13500 (license license:expat)
13501 (properties `((python2-variant . ,(delay python2-faker))))))
13502
13503 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13504 (define-public python2-faker
13505 (let ((base (package-with-python2 (strip-python2-variant
13506 python-faker))))
13507 (package
13508 (inherit base)
13509 (version "3.0.1")
13510 (source (origin
13511 (method url-fetch)
13512 (uri (pypi-uri "Faker" version))
13513 (sha256
13514 (base32
13515 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13516 (native-inputs
13517 `(("python-mock" ,python2-mock)
13518 ,@(package-native-inputs base)))
13519 (propagated-inputs
13520 `(("python2-ipaddress" ,python2-ipaddress)
13521 ("python2-six" ,python2-six)
13522 ,@(package-propagated-inputs base))))))
13523
13524 (define-public python-pyaml
13525 (package
13526 (name "python-pyaml")
13527 (version "18.11.0")
13528 (source (origin
13529 (method url-fetch)
13530 (uri (pypi-uri "pyaml" version))
13531 (sha256
13532 (base32
13533 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13534 (build-system python-build-system)
13535 (native-inputs
13536 `(("python-unidecode" ,python-unidecode)))
13537 (propagated-inputs
13538 `(("python-pyyaml" ,python-pyyaml)))
13539 (home-page "https://github.com/mk-fg/pretty-yaml")
13540 (synopsis "YAML pretty-print library for Python")
13541 (description
13542 "pyaml is a PyYAML based python module to produce pretty and readable
13543 YAML-serialized data.")
13544 (license license:wtfpl2)))
13545
13546 (define-public python2-pyaml
13547 (package-with-python2 python-pyaml))
13548
13549 (define-public python-backpack
13550 (package
13551 (name "python-backpack")
13552 (version "0.1")
13553 (source
13554 (origin
13555 (method url-fetch)
13556 (uri (pypi-uri "backpack" version))
13557 (sha256
13558 (base32
13559 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13560 (build-system python-build-system)
13561 (native-inputs
13562 `(("python-pytest" ,python-pytest)
13563 ("python-nose" ,python-nose)))
13564 (propagated-inputs
13565 `(("python-simplejson" ,python-simplejson)))
13566 (home-page "https://github.com/sdispater/backpack")
13567 (synopsis "Utilities for working with Python collections")
13568 (description "Backpack provides some useful utilities for working with
13569 collections of data.")
13570 (license license:expat)))
13571
13572 (define-public python2-backpack
13573 (package-with-python2 python-backpack))
13574
13575 (define-public python-prompt-toolkit
13576 (package
13577 (name "python-prompt-toolkit")
13578 (version "3.0.7")
13579 (source
13580 (origin
13581 (method url-fetch)
13582 (uri (pypi-uri "prompt_toolkit" version))
13583 (sha256
13584 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13585 (build-system python-build-system)
13586 (arguments
13587 `(#:phases
13588 (modify-phases %standard-phases
13589 (delete 'check)
13590 (add-after 'install 'post-install-check
13591 (lambda* (#:key inputs outputs #:allow-other-keys)
13592 ;; HOME is needed for the test
13593 ;; "test_pathcompleter_can_expanduser".
13594 (setenv "HOME" "/tmp")
13595 (add-installed-pythonpath inputs outputs)
13596 (invoke "py.test"))))))
13597 (propagated-inputs
13598 `(("python-wcwidth" ,python-wcwidth)))
13599 (native-inputs
13600 `(("python-pytest" ,python-pytest)))
13601 (home-page
13602 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13603 (synopsis "Library for building command line interfaces in Python")
13604 (description
13605 "Prompt-Toolkit is a library for building interactive command line
13606 interfaces in Python. It's like GNU Readline but it also features syntax
13607 highlighting while typing, out-of-the-box multi-line input editing, advanced
13608 code completion, incremental search, support for Chinese double-width
13609 characters, mouse support, and auto suggestions.")
13610 (license license:bsd-3)
13611 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13612
13613 (define-public python-prompt-toolkit-2
13614 (package (inherit python-prompt-toolkit)
13615 (name "python-prompt-toolkit")
13616 (version "2.0.7")
13617 (source
13618 (origin
13619 (method url-fetch)
13620 (uri (pypi-uri "prompt_toolkit" version))
13621 (sha256
13622 (base32
13623 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13624 (propagated-inputs
13625 `(("python-wcwidth" ,python-wcwidth)
13626 ("python-six" ,python-six)
13627 ("python-pygments" ,python-pygments)))
13628 (properties '())))
13629
13630 (define-public python2-prompt-toolkit
13631 (package-with-python2 python-prompt-toolkit-2))
13632
13633 (define-public python-prompt-toolkit-1
13634 (package (inherit python-prompt-toolkit-2)
13635 (version "1.0.15")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13640 (sha256
13641 (base32
13642 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13643
13644 (define-public python2-prompt-toolkit-1
13645 (package-with-python2 python-prompt-toolkit-1))
13646
13647 (define-public python-jedi
13648 (package
13649 (name "python-jedi")
13650 (version "0.17.2")
13651 (source
13652 (origin
13653 (method url-fetch)
13654 (uri (pypi-uri "jedi" version))
13655 (sha256
13656 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13657 (build-system python-build-system)
13658 (arguments
13659 `(#:phases
13660 (modify-phases %standard-phases
13661 (replace 'check
13662 (lambda _
13663 (setenv "HOME" "/tmp")
13664 (invoke "python" "-m" "pytest" "-vv"))))))
13665 (native-inputs
13666 `(("python-pytest" ,python-pytest)
13667 ("python-docopt" ,python-docopt)))
13668 (propagated-inputs
13669 `(("python-parso" ,python-parso)))
13670 (home-page "https://github.com/davidhalter/jedi")
13671 (synopsis "Autocompletion and static analysis library for Python")
13672 (description
13673 "Jedi is a static analysis tool for Python that can be used in Integrated
13674 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13675 on a deeper level than many other static analysis frameworks for Python.
13676
13677 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13678 well.")
13679 (license license:expat)))
13680
13681 (define-public python2-jedi
13682 (package-with-python2 python-jedi))
13683
13684 (define-public ptpython
13685 (package
13686 (name "ptpython")
13687 (version "3.0.5")
13688 (source (origin
13689 (method url-fetch)
13690 (uri (pypi-uri "ptpython" version))
13691 (sha256
13692 (base32
13693 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13694 (build-system python-build-system)
13695 (arguments
13696 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13697 (propagated-inputs
13698 `(("python-appdirs" ,python-appdirs)
13699 ("python-jedi" ,python-jedi)
13700 ("python-prompt-toolkit" ,python-prompt-toolkit)
13701 ("python-pygments" ,python-pygments)))
13702 (home-page "https://github.com/jonathanslenders/ptpython")
13703 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13704 (description
13705 "ptpython is a Python read-eval-print loop with IDE-like features.
13706 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13707 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13708 etc.")
13709 (license license:bsd-3)
13710 (properties `((python2-variant . ,(delay ptpython-2))))))
13711
13712 (define-public ptpython-2
13713 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13714 (package
13715 (inherit base)
13716 (name "ptpython2"))))
13717
13718 (define-public python-stem
13719 (package
13720 (name "python-stem")
13721 (version "1.8.0")
13722 (source
13723 (origin
13724 (method url-fetch)
13725 (uri (pypi-uri "stem" version))
13726 (sha256
13727 (base32
13728 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13729 (build-system python-build-system)
13730 (arguments
13731 `(#:phases
13732 (modify-phases %standard-phases
13733 (replace 'check
13734 (lambda _
13735 (invoke "./run_tests.py" "--unit")
13736 #t)))))
13737 (native-inputs
13738 `(("python-mock" ,python-mock)
13739 ("python-pycodestyle" ,python-pycodestyle)
13740 ("python-pyflakes" ,python-pyflakes)))
13741 (home-page "https://stem.torproject.org/")
13742 (synopsis
13743 "Python controller library that allows applications to interact with Tor")
13744 (description
13745 "Stem is a Python controller library for Tor. With it you can use Tor's
13746 control protocol to script against the Tor process and read descriptor data
13747 relays publish about themselves.")
13748 (license license:lgpl3)))
13749
13750 (define-public python2-stem
13751 (package-with-python2 python-stem))
13752
13753 (define-public python-pyserial
13754 (package
13755 (name "python-pyserial")
13756 (version "3.4")
13757 (source
13758 (origin
13759 (method url-fetch)
13760 (uri (pypi-uri "pyserial" version))
13761 (sha256
13762 (base32
13763 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13764 (build-system python-build-system)
13765 (arguments
13766 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13767 ;; #:phases
13768 ;; (modify-phases %standard-phases
13769 ;; (replace 'check
13770 ;; (lambda _
13771 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13772 (home-page
13773 "https://github.com/pyserial/pyserial")
13774 (synopsis "Python Serial Port Bindings")
13775 (description "@code{pyserial} provide serial port bindings for Python. It
13776 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13777 and/or Xon/Xoff. The port is accessed in RAW mode.")
13778 (license license:bsd-3)))
13779
13780 (define-public python2-pyserial
13781 (package-with-python2 python-pyserial))
13782
13783 (define-public python-kivy
13784 (package
13785 (name "python-kivy")
13786 (version "1.10.1")
13787 (source
13788 (origin
13789 (method url-fetch)
13790 (uri (pypi-uri "Kivy" version))
13791 (file-name (string-append name "-" version ".tar.gz"))
13792 (sha256
13793 (base32
13794 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13795 (build-system python-build-system)
13796 (arguments
13797 `(#:tests? #f ; Tests require many optional packages
13798 #:phases
13799 (modify-phases %standard-phases
13800 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13801 (lambda* (#:key inputs #:allow-other-keys)
13802 (setenv "KIVY_SDL2_PATH"
13803 (string-append (assoc-ref inputs "sdl-union")
13804 "/include/SDL2"))
13805 #t)))))
13806 (native-inputs
13807 `(("pkg-config" ,pkg-config)
13808 ("python-cython" ,python-cython)))
13809 (inputs
13810 `(("gstreamer" ,gstreamer)
13811 ("mesa" ,mesa)
13812 ("sdl-union"
13813 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13814 (home-page "https://kivy.org")
13815 (synopsis
13816 "Multitouch application framework")
13817 (description
13818 "A software library for rapid development of
13819 hardware-accelerated multitouch applications.")
13820 (license license:expat)))
13821
13822 (define-public python2-kivy
13823 (package-with-python2 python-kivy))
13824
13825 (define-public python-binaryornot
13826 (package
13827 (name "python-binaryornot")
13828 (version "0.4.4")
13829 (source (origin
13830 (method url-fetch)
13831 (uri (pypi-uri "binaryornot" version))
13832 (sha256
13833 (base32
13834 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13835 (build-system python-build-system)
13836 (arguments
13837 `(#:phases
13838 (modify-phases %standard-phases
13839 (add-after 'unpack 'patch-tests
13840 (lambda _
13841 ;; TypeError: binary() got an unexpected keyword argument
13842 ;; 'average_size'.
13843 (substitute* "tests/test_check.py"
13844 (("average_size=512") ""))
13845 #t)))))
13846 (propagated-inputs
13847 `(("python-chardet" ,python-chardet)
13848 ("python-hypothesis" ,python-hypothesis)))
13849 (home-page "https://github.com/audreyr/binaryornot")
13850 (synopsis "Package to check if a file is binary or text")
13851 (description "Ultra-lightweight pure Python package to check if a file is
13852 binary or text.")
13853 (license license:bsd-3)
13854 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13855
13856 (define-public python2-binaryornot
13857 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13858 (package (inherit base)
13859 (propagated-inputs
13860 `(("python2-enum34" ,python2-enum34)
13861 ,@(package-propagated-inputs base))))))
13862
13863 (define-public python-binwalk
13864 (package
13865 (name "python-binwalk")
13866 (version "2.2.0")
13867 (source
13868 (origin
13869 (method git-fetch)
13870 (uri (git-reference
13871 (url "https://github.com/ReFirmLabs/binwalk")
13872 (commit (string-append "v" version))))
13873 (file-name (git-file-name name version))
13874 (sha256
13875 (base32
13876 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13877 (build-system python-build-system)
13878 (arguments
13879 `(#:phases
13880 (modify-phases %standard-phases
13881 (add-before 'check 'set-pythonpath
13882 (lambda _
13883 (setenv "PYTHONPATH"
13884 (string-append
13885 (getcwd) "/src/"
13886 ":" (getenv "PYTHONPATH")))
13887 (setenv "HOME" "")
13888 #t)))))
13889 (native-inputs
13890 `(("python-coverage" ,python-coverage)
13891 ("python-nose" ,python-nose)))
13892 (home-page "https://github.com/ReFirmLabs/binwalk")
13893 (synopsis "Firmware analysis tool")
13894 (description "Binwalk is a tool for analyzing, reverse engineering, and
13895 extracting firmware images")
13896 (license license:expat)))
13897
13898 (define-public python-nltk
13899 (package
13900 (name "python-nltk")
13901 (version "3.2.1")
13902 (source (origin
13903 (method url-fetch)
13904 (uri (pypi-uri "nltk" version))
13905 (sha256
13906 (base32
13907 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13908 (build-system python-build-system)
13909 (arguments
13910 '(;; The tests require some extra resources to be downloaded.
13911 ;; TODO Try packaging these resources.
13912 #:tests? #f))
13913 (home-page "http://nltk.org/")
13914 (synopsis "Natural Language Toolkit")
13915 (description "It provides interfaces to over 50 corpora and lexical
13916 resources such as WordNet, along with a suite of text processing libraries
13917 for classification, tokenization, stemming, tagging, parsing, and semantic
13918 reasoning, wrappers for natural language processing libraries.")
13919 (license license:asl2.0)))
13920
13921 (define-public python2-nltk
13922 (package-with-python2 python-nltk))
13923
13924 (define-public python-pymongo
13925 (package
13926 (name "python-pymongo")
13927 (version "3.7.2")
13928 (source (origin
13929 (method url-fetch)
13930 (uri (pypi-uri "pymongo" version))
13931 (sha256
13932 (base32
13933 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13934 (build-system python-build-system)
13935 (propagated-inputs
13936 `(("python-certifi" ,python-certifi)))
13937 (home-page "https://github.com/mongodb/mongo-python-driver")
13938 (synopsis "Python driver for MongoDB")
13939 (description "Python driver for MongoDB.")
13940 (license license:asl2.0)))
13941
13942 (define-public python2-pymongo
13943 (package-with-python2 python-pymongo))
13944
13945 (define-public python-consul
13946 (package
13947 (name "python-consul")
13948 (version "0.6.1")
13949 (source
13950 (origin
13951 (method url-fetch)
13952 (uri (pypi-uri "python-consul" version))
13953 (sha256
13954 (base32
13955 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13956 (build-system python-build-system)
13957 (arguments
13958 '(#:tests? #f)) ; The tests are not distributed
13959 (propagated-inputs
13960 `(("python-requests" ,python-requests)
13961 ("python-six" ,python-six)))
13962 (home-page "https://github.com/cablehead/python-consul")
13963 (synopsis "Python client for Consul")
13964 (description
13965 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13966 discovery, monitoring and configuration.")
13967 (license license:expat)))
13968
13969 (define-public python2-consul
13970 (package-with-python2 python-consul))
13971
13972 (define-public python-schematics
13973 (package
13974 (name "python-schematics")
13975 (version "1.1.1")
13976 (source
13977 (origin
13978 (method git-fetch)
13979 (uri (git-reference
13980 (url "https://github.com/schematics/schematics")
13981 (commit (string-append "v" version))))
13982 (file-name (git-file-name name version))
13983 (sha256
13984 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13985 (build-system python-build-system)
13986 (propagated-inputs
13987 `(("python-six" ,python-six)))
13988 (arguments
13989 ;; The tests require a bunch of not very nice packages with fixed
13990 ;; version requirements (e.g. python-coveralls).
13991 `(#:tests? #f))
13992 (home-page "https://github.com/schematics/schematics")
13993 (synopsis "Python Data Structures for Humans")
13994 (description "Python Data Structures for Humans.")
13995 (license license:bsd-3)))
13996
13997 (define-public python2-schematics
13998 (package-with-python2 python-schematics))
13999
14000 (define-public python-odfpy
14001 (package
14002 (name "python-odfpy")
14003 (version "1.4.1")
14004 (source (origin
14005 (method url-fetch)
14006 (uri (pypi-uri "odfpy" version))
14007 (sha256
14008 (base32
14009 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14010 (arguments
14011 `(#:phases
14012 (modify-phases %standard-phases
14013 (replace 'check
14014 (lambda _
14015 (setenv "PYTHONPATH" (string-append "./build/lib:"
14016 (getenv "PYTHONPATH")))
14017 (invoke "pytest" "-vv"))))))
14018 (build-system python-build-system)
14019 (native-inputs
14020 `(("python-pytest" ,python-pytest)))
14021 (propagated-inputs
14022 `(("python-defusedxml" ,python-defusedxml)))
14023 (home-page "https://github.com/eea/odfpy")
14024 (synopsis "Python API and tools to manipulate OpenDocument files")
14025 (description "Collection of libraries and utility programs written in
14026 Python to manipulate OpenDocument 1.2 files.")
14027 (license
14028 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14029 ;; number of files with other licenses.
14030 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14031
14032 (define-public python2-odfpy
14033 (package-with-python2 python-odfpy))
14034
14035 (define-public python-natsort
14036 (package
14037 (name "python-natsort")
14038 (version "7.0.1")
14039 (source (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "natsort" version))
14042 (sha256
14043 (base32
14044 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14045 (build-system python-build-system)
14046 (arguments
14047 `(#:modules ((guix build utils)
14048 (guix build python-build-system)
14049 (srfi srfi-1)
14050 (srfi srfi-26)
14051 (ice-9 ftw))
14052 #:phases
14053 (modify-phases %standard-phases
14054 (add-before 'check 'set-cachedir
14055 ;; Tests require write access to $HOME by default
14056 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14057 (replace 'check
14058 (lambda _
14059 (let ((cwd (getcwd)))
14060 (setenv "PYTHONPATH"
14061 (string-append
14062 cwd "/build/"
14063 (find (cut string-prefix? "lib" <>)
14064 (scandir (string-append cwd "/build")))
14065 ":"
14066 (getenv "PYTHONPATH")))
14067 (invoke "pytest" "-v")))))))
14068 (native-inputs
14069 `(("python-hypothesis" ,python-hypothesis)
14070 ("python-pytest-cov" ,python-pytest-cov)
14071 ("python-pytest-mock" ,python-pytest-mock)
14072 ("python-pytest" ,python-pytest)))
14073 (propagated-inputs ; TODO: Add python-fastnumbers.
14074 `(("python-pyicu" ,python-pyicu)))
14075 (home-page "https://github.com/SethMMorton/natsort")
14076 (synopsis "Natural sorting for python and shell")
14077 (description
14078 "Natsort lets you apply natural sorting on lists instead of
14079 lexicographical. If you use the built-in @code{sorted} method in python
14080 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14081 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14082 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14083 identifies numbers and sorts them separately from strings. It can also sort
14084 version numbers, real numbers, mixed types and more, and comes with a shell
14085 command @command{natsort} that exposes this functionality in the command line.")
14086 (license license:expat)
14087 (properties `((python2-variant . ,(delay python2-natsort))))))
14088
14089 ;; Natsort 6.x are the last versions with support for Python 2.
14090 (define-public python2-natsort
14091 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14092 (package (inherit base)
14093 (version "6.2.1")
14094 (source (origin
14095 (method url-fetch)
14096 (uri (pypi-uri "natsort" version))
14097 (sha256
14098 (base32
14099 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14100 (native-inputs
14101 `(("python2-pathlib" ,python2-pathlib)
14102 ,@(package-native-inputs base))))))
14103
14104 (define-public glances
14105 (package
14106 (name "glances")
14107 (version "3.1.4")
14108 (source
14109 (origin
14110 (method url-fetch)
14111 (uri (pypi-uri "Glances" version))
14112 (sha256
14113 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14114 (modules '((guix build utils)))
14115 (snippet
14116 '(begin
14117 ;; Glances phones PyPI for weekly update checks by default.
14118 ;; Disable these. The user can re-enable them if desired.
14119 (substitute* "glances/outdated.py"
14120 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14121 (string-append indentation
14122 "self.args.disable_check_update = True\n"
14123 line)))
14124 #t))))
14125 (build-system python-build-system)
14126 (propagated-inputs
14127 `(("python-future" ,python-future)
14128 ("python-psutil" ,python-psutil)))
14129 (home-page "https://github.com/nicolargo/glances")
14130 (synopsis "Cross-platform curses-based monitoring tool")
14131 (description
14132 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14133 Glances uses the PsUtil library to get information from your system. It
14134 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14135 (license license:lgpl3+)))
14136
14137 (define-public python-glances
14138 (deprecated-package "python-glances" glances))
14139
14140 (define-public python-graphql-core
14141 (package
14142 (name "python-graphql-core")
14143 (version "0.5.3")
14144 (source
14145 (origin
14146 (method url-fetch)
14147 (uri (pypi-uri "graphql-core" version))
14148 (sha256
14149 (base32
14150 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14151 (build-system python-build-system)
14152 (arguments
14153 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14154 #:phases
14155 (modify-phases %standard-phases
14156 (add-after 'unpack 'patch-hardcoded-version
14157 (lambda _ (substitute*
14158 "setup.py"
14159 (("'gevent==1.1rc1'") "'gevent'"))
14160 #t)))))
14161 (native-inputs
14162 `(("python-gevent" ,python-gevent)
14163 ("python-mock" ,python-mock)
14164 ("python-pytest-mock" ,python-pytest-mock)))
14165 (propagated-inputs
14166 `(("python-promise" ,python-promise)
14167 ("python-six" ,python-six)))
14168 (home-page "https://github.com/graphql-python/graphql-core")
14169 (synopsis "GraphQL implementation for Python")
14170 (description
14171 "GraphQL implementation for Python. GraphQL is a data query language and
14172 runtime designed and used to request and deliver data to mobile and web apps.
14173 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14174 to Python.")
14175 (license license:expat)))
14176
14177 (define-public python2-graphql-core
14178 (package-with-python2 python-graphql-core))
14179
14180 (define-public python-graphql-relay
14181 (package
14182 (name "python-graphql-relay")
14183 (version "0.4.5")
14184 (source
14185 (origin
14186 (method url-fetch)
14187 (uri (pypi-uri "graphql-relay" version))
14188 (sha256
14189 (base32
14190 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14191 (build-system python-build-system)
14192 (arguments
14193 '(#:tests? #f)) ; The tests are not distributed
14194 (propagated-inputs
14195 `(("python-graphql-core" ,python-graphql-core)
14196 ("python-promise" ,python-promise)
14197 ("python-six" ,python-six)))
14198 (home-page "https://github.com/graphql-python/graphql-relay-py")
14199 (synopsis "Relay implementation for Python")
14200 (description
14201 "This is a library to allow the easy creation of Relay-compliant servers
14202 using the GraphQL Python reference implementation of a GraphQL server. It
14203 should be noted that the code is a exact port of the original
14204 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14205 from Facebook.")
14206 (license license:expat)))
14207
14208 (define-public python2-graphql-relay
14209 (package-with-python2 python-graphql-relay))
14210
14211 (define-public python-graphene
14212 (package
14213 (name "python-graphene")
14214 (version "0.10.2")
14215 (source
14216 (origin
14217 (method url-fetch)
14218 (uri (pypi-uri "graphene" version))
14219 (sha256
14220 (base32
14221 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14222 (build-system python-build-system)
14223 (propagated-inputs
14224 `(("python-graphql-core" ,python-graphql-core)
14225 ("python-graphql-relay" ,python-graphql-relay)
14226 ("python-iso8601" ,python-iso8601)
14227 ("python-promise" ,python-promise)
14228 ("python-six" ,python-six)))
14229 (arguments
14230 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14231 (home-page "https://graphene-python.org/")
14232 (synopsis "GraphQL Framework for Python")
14233 (description
14234 "Graphene is a Python library for building GraphQL schemas/types.
14235 A GraphQL schema describes your data model, and provides a GraphQL server
14236 with an associated set of resolve methods that know how to fetch data.")
14237 (properties `((python2-variant . ,(delay python2-graphene))))
14238 (license license:expat)))
14239
14240 (define-public python2-graphene
14241 (let ((base (package-with-python2
14242 (strip-python2-variant python-graphene))))
14243 (package (inherit base)
14244 (native-inputs
14245 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14246 ,@(package-native-inputs base))))))
14247
14248 (define-public python-nautilus
14249 (package
14250 (name "python-nautilus")
14251 (version "0.4.9")
14252 (source
14253 (origin
14254 (method url-fetch)
14255 (uri (pypi-uri "nautilus" version))
14256 (sha256
14257 (base32
14258 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14259 (build-system python-build-system)
14260 (arguments `(#:tests? #f)) ; fails to import test modules
14261 (propagated-inputs
14262 `(("python-bcrypt" ,python-bcrypt)
14263 ("python-click" ,python-click)
14264 ("python-consul" ,python-consul)
14265 ("python-graphene" ,python-graphene)
14266 ("python-jinja2" ,python-jinja2)
14267 ("python-peewee" ,python-peewee)
14268 ("python-pika" ,python-pika)
14269 ("python-tornado" ,python-tornado)
14270 ("python-wtforms" ,python-wtforms)))
14271 (native-inputs
14272 `(("python-nose2" ,python-nose2)))
14273 (home-page "https://github.com/AlecAivazis/nautilus")
14274 (synopsis "Library for creating microservice applications")
14275 (description
14276 "Nautilus is a framework for flux based microservices that looks to
14277 provide extendible implementations of common aspects of a cloud so that you can
14278 focus on building massively scalable web applications.")
14279 (license license:expat)))
14280
14281 (define-public python-random2
14282 (package
14283 (name "python-random2")
14284 (version "1.0.1")
14285 (source (origin
14286 (method url-fetch)
14287 (uri (pypi-uri "random2" version ".zip"))
14288 (sha256
14289 (base32
14290 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14291 (build-system python-build-system)
14292 (native-inputs `(("unzip" ,unzip)))
14293 (home-page "http://pypi.python.org/pypi/random2")
14294 (synopsis "Python 3 version of the Python 2 @code{random} module")
14295 (description
14296 "This package provides a Python 3 ported version of Python 2.7’s
14297 @code{random} module. It has also been back-ported to work in Python 2.6.
14298
14299 In Python 3, the implementation of @code{randrange()} was changed, so that
14300 even with the same seed you get different sequences in Python 2 and 3.
14301
14302 This package closes that gap, allowing stable random number generation
14303 between the different Python versions.")
14304 (license license:psfl)))
14305
14306 (define-public python2-random2
14307 (package-with-python2 python-random2))
14308
14309 (define-public python-snowballstemmer
14310 (package
14311 (name "python-snowballstemmer")
14312 (version "2.0.0")
14313 (source (origin
14314 (method url-fetch)
14315 (uri (pypi-uri "snowballstemmer" version))
14316 (sha256
14317 (base32
14318 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14319 (build-system python-build-system)
14320 (arguments
14321 `(;; No tests exist
14322 #:tests? #f))
14323 (home-page "https://github.com/shibukawa/snowball_py")
14324 (synopsis "Snowball stemming library collection for Python")
14325 (description "This package provides 16 word stemmer algorithms generated
14326 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14327 English stemmer.")
14328 (license license:bsd-3)))
14329
14330 (define-public python2-snowballstemmer
14331 (package-with-python2 python-snowballstemmer))
14332
14333 (define-public python-setproctitle
14334 (package
14335 (name "python-setproctitle")
14336 (version "1.1.10")
14337 (source
14338 (origin
14339 (method url-fetch)
14340 (uri (pypi-uri "setproctitle" version))
14341 (sha256
14342 (base32
14343 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14344 (build-system python-build-system)
14345 (arguments
14346 '(#:phases
14347 (modify-phases %standard-phases
14348 (add-before 'check 'patch-Makefile
14349 ;; Stricly this is only required for the python2 variant.
14350 ;; But adding a phase in an inherited package seems to be
14351 ;; cumbersum. So we patch even for python3.
14352 (lambda _
14353 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14354 (when nose
14355 (substitute* "Makefile"
14356 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14357 (string-append nose "/bin/nosetests "))))
14358 #t)))
14359 (replace 'check
14360 (lambda _
14361 (setenv "PYTHON" (or (which "python3") (which "python")))
14362 (setenv "PYCONFIG" (if (which "python3-config")
14363 "python3-config --embed"
14364 "python-config"))
14365 (setenv "CC" "gcc")
14366 ;; No need to extend PYTHONPATH to find the built package, since
14367 ;; the Makefile will build anyway
14368 (invoke "make" "check"))))))
14369 (native-inputs
14370 `(("procps" ,procps))) ; required for tests
14371 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14372 (synopsis
14373 "Setproctitle implementation for Python to customize the process title")
14374 (description "The library allows a process to change its title (as displayed
14375 by system tools such as ps and top).
14376
14377 Changing the title is mostly useful in multi-process systems, for
14378 example when a master process is forked: changing the children's title
14379 allows identifying the task each process is busy with. The technique
14380 is used by PostgreSQL and the OpenSSH Server for example.")
14381 (license license:bsd-3)
14382 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14383
14384 (define-public python2-setproctitle
14385 (let ((base (package-with-python2
14386 (strip-python2-variant python-setproctitle))))
14387 (package
14388 (inherit base)
14389 (native-inputs `(("python2-nose" ,python2-nose)
14390 ,@(package-native-inputs base))))))
14391
14392 (define-public python-validictory
14393 (package
14394 (name "python-validictory")
14395 (version "1.0.1")
14396 (source
14397 (origin
14398 (method url-fetch)
14399 (uri (pypi-uri "validictory" version))
14400 (sha256
14401 (base32
14402 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14403 (build-system python-build-system)
14404 (arguments
14405 '(#:phases
14406 (modify-phases %standard-phases
14407 (add-after 'unpack 'bootstrap
14408 ;; Move the tests out of the package directory to avoid
14409 ;; packaging them.
14410 (lambda* _
14411 (rename-file "validictory/tests" "tests")
14412 (delete-file "tests/__init__.py")))
14413 (replace 'check
14414 (lambda _
14415 ;; Extend PYTHONPATH so the built package will be found.
14416 (setenv "PYTHONPATH"
14417 (string-append (getcwd) "/build/lib:"
14418 (getenv "PYTHONPATH")))
14419 (invoke "py.test" "-vv" ))))))
14420 (native-inputs
14421 `(("python-pytest" ,python-pytest)))
14422 (home-page
14423 "https://github.com/jamesturk/validictory")
14424 (synopsis "General purpose Python data validator")
14425 (description "It allows validation of arbitrary Python data structures.
14426
14427 The schema format is based on the JSON Schema
14428 proposal (http://json-schema.org), so combined with json the library is also
14429 useful as a validator for JSON data.")
14430 (license license:expat)))
14431
14432 (define-public python2-validictory
14433 (package-with-python2 python-validictory))
14434
14435 (define-public python-pyelftools
14436 (package
14437 (name "python-pyelftools")
14438 (version "0.25")
14439 (source
14440 (origin
14441 (method url-fetch)
14442 (uri (pypi-uri "pyelftools" version))
14443 (sha256
14444 (base32
14445 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14446 (build-system python-build-system)
14447 (arguments
14448 `(#:phases
14449 (modify-phases %standard-phases
14450 (add-before 'check 'set-pythonpath
14451 (lambda _
14452 (setenv "PYTHONPATH"
14453 (string-append
14454 (getcwd) "/test/"
14455 ":" (getenv "PYTHONPATH")))
14456 #t)))))
14457 (home-page
14458 "https://github.com/eliben/pyelftools")
14459 (synopsis
14460 "Analyze binary and library file information")
14461 (description "This Python library provides interfaces for parsing and
14462 analyzing two binary and library file formats; the Executable and Linking
14463 Format (ELF), and debugging information in the Debugging With Attributed
14464 Record Format (DWARF).")
14465 (license license:public-domain)))
14466
14467 (define-public python-pyev
14468 (package
14469 (name "python-pyev")
14470 (version "0.9.0")
14471 (source
14472 (origin
14473 (method url-fetch)
14474 (uri (pypi-uri "pyev" version))
14475 (sha256
14476 (base32
14477 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14478 (build-system python-build-system)
14479 (arguments
14480 `(#:tests? #f ; no test suite
14481 #:phases
14482 (modify-phases %standard-phases
14483 (add-after 'unpack 'patch
14484 (lambda* (#:key inputs #:allow-other-keys)
14485 (let ((libev (string-append (assoc-ref inputs "libev")
14486 "/lib/libev.so.4")))
14487 (substitute* "setup.py"
14488 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14489 (string-append "libev_dll_name = \"" libev "\"")))))))))
14490 (inputs
14491 `(("libev" ,libev)))
14492 (home-page "http://pythonhosted.org/pyev/")
14493 (synopsis "Python libev interface")
14494 (description "Pyev provides a Python interface to libev.")
14495 (license license:gpl3)))
14496
14497 (define-public python2-pyev
14498 (package-with-python2 python-pyev))
14499
14500 (define-public python-imagesize
14501 (package
14502 (name "python-imagesize")
14503 (version "1.2.0")
14504 (source
14505 (origin
14506 (method url-fetch)
14507 (uri (pypi-uri "imagesize" version))
14508 (sha256
14509 (base32
14510 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14511 (build-system python-build-system)
14512 (home-page "https://github.com/shibukawa/imagesize_py")
14513 (synopsis "Gets image size of files in various formats in Python")
14514 (description
14515 "This package allows determination of image size from
14516 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14517 (license license:expat)))
14518
14519 (define-public python2-imagesize
14520 (package-with-python2 python-imagesize))
14521
14522 (define-public python-termstyle
14523 (package
14524 (name "python-termstyle")
14525 (version "0.1.11")
14526 (source
14527 (origin
14528 (method url-fetch)
14529 (uri (pypi-uri "termstyle" version))
14530 (sha256
14531 (base32
14532 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14533 (build-system python-build-system)
14534 (arguments
14535 '(#:phases
14536 (modify-phases %standard-phases
14537 (replace 'check
14538 (lambda _
14539 (invoke "python" "test3.py"))))))
14540 (home-page "https://github.com/gfxmonk/termstyle")
14541 (synopsis "Console text coloring for Python")
14542 (description "This package provides console text coloring for Python.")
14543 (license license:bsd-3)))
14544
14545 (define-public python-argcomplete
14546 (package
14547 (name "python-argcomplete")
14548 (version "1.11.1")
14549 (source
14550 (origin
14551 (method url-fetch)
14552 (uri (pypi-uri "argcomplete" version))
14553 (sha256
14554 (base32
14555 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14556 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14557 (build-system python-build-system)
14558 (native-inputs
14559 `(("python-coverage" ,python-coverage)
14560 ("python-flake8" ,python-flake8)
14561 ("python-pexpect" ,python-pexpect)
14562 ("python-wheel" ,python-wheel)
14563 ("tcsh" ,tcsh)
14564 ("fish" ,fish)
14565 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14566 (home-page "https://github.com/kislyuk/argcomplete")
14567 (synopsis "Shell tab completion for Python argparse")
14568 (description "argcomplete provides extensible command line tab completion
14569 of arguments and options for Python scripts using @code{argparse}. It's
14570 particularly useful for programs with many options or sub-parsers that can
14571 dynamically suggest completions; for example, when browsing resources over the
14572 network.")
14573 (license license:asl2.0)))
14574
14575 (define-public python2-argcomplete
14576 (package-with-python2 python-argcomplete))
14577
14578 (define-public python-csscompressor
14579 (package
14580 (name "python-csscompressor")
14581 (version "0.9.5")
14582 (source
14583 (origin
14584 (method url-fetch)
14585 (uri (pypi-uri "csscompressor" version))
14586 (sha256
14587 (base32
14588 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14589 (build-system python-build-system)
14590 (arguments
14591 '(#:phases
14592 (modify-phases %standard-phases
14593 (replace 'check
14594 (lambda _
14595 (invoke "py.test"))))))
14596 (native-inputs
14597 `(("python-pytest" ,python-pytest)))
14598 (home-page "https://github.com/sprymix/csscompressor")
14599 (synopsis "Python port of YUI CSS Compressor")
14600 (description
14601 "This package provides a python port of YUI CSS Compressor.")
14602 (license license:bsd-3)))
14603
14604 (define-public python-rcssmin
14605 (package
14606 (name "python-rcssmin")
14607 (version "1.0.6")
14608 (source
14609 (origin
14610 (method url-fetch)
14611 (uri (pypi-uri "rcssmin" version))
14612 (sha256
14613 (base32
14614 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14615 (build-system python-build-system)
14616 (arguments
14617 '(#:phases
14618 (modify-phases %standard-phases
14619 (replace 'check
14620 (lambda _
14621 (invoke "python" "run_tests.py" "tests"))))))
14622 (home-page "http://opensource.perlig.de/rcssmin/")
14623 (synopsis "CSS Minifier")
14624 (description "The minifier is based on the semantics of the YUI compressor,
14625 which itself is based on the rule list by Isaac Schlueter.")
14626 (license license:asl2.0)))
14627
14628 (define-public python-rjsmin
14629 (package
14630 (name "python-rjsmin")
14631 (version "1.1.0")
14632 (source
14633 (origin
14634 (method url-fetch)
14635 (uri (pypi-uri "rjsmin" version))
14636 (sha256
14637 (base32
14638 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14639 (modules '((guix build utils)))
14640 (snippet
14641 '(begin
14642 (for-each delete-file (find-files "bench" "\\.js$"))
14643 #t))))
14644 (build-system python-build-system)
14645 (arguments
14646 '(#:tests? #f ; Not all test files included.
14647 #:phases
14648 (modify-phases %standard-phases
14649 (replace 'check
14650 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14651 (add-installed-pythonpath inputs outputs)
14652 (if tests?
14653 (invoke "py.test" "-vv" "tests")
14654 #t))))))
14655 (native-inputs
14656 `(("python-pytest" ,python-pytest)))
14657 (home-page "http://opensource.perlig.de/rjsmin/")
14658 (synopsis "Javascript Minifier")
14659 (description "@code{rJSmin} is a javascript minifier written in Python. The
14660 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14661 is a re-implementation aiming for speed, so it can be used at runtime (rather
14662 than during a preprocessing step).")
14663 (license license:asl2.0)))
14664
14665 (define-public python-xopen
14666 (package
14667 (name "python-xopen")
14668 (version "0.5.0")
14669 (source
14670 (origin
14671 (method url-fetch)
14672 (uri (pypi-uri "xopen" version))
14673 (sha256
14674 (base32
14675 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14676 (build-system python-build-system)
14677 (propagated-inputs
14678 `(("python-setuptools-scm" ,python-setuptools-scm)))
14679 (home-page "https://github.com/marcelm/xopen/")
14680 (synopsis "Open compressed files transparently")
14681 (description "This module provides an @code{xopen} function that works like
14682 Python's built-in @code{open} function, but can also deal with compressed files.
14683 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14684 recognized by their file extensions. The focus is on being as efficient as
14685 possible on all supported Python versions.")
14686 (license license:expat)))
14687
14688 (define-public python2-xopen
14689 (let ((base (package-with-python2
14690 (strip-python2-variant python-xopen))))
14691 (package
14692 (inherit base)
14693 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14694 ,@(package-propagated-inputs base))))))
14695
14696 (define-public python-cheetah
14697 (package
14698 (name "python-cheetah")
14699 (version "3.2.4")
14700 (source
14701 (origin
14702 (method url-fetch)
14703 (uri (pypi-uri "Cheetah3" version))
14704 (sha256
14705 (base32
14706 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14707 (build-system python-build-system)
14708 (arguments
14709 `(#:modules ((guix build utils)
14710 (guix build python-build-system)
14711 (ice-9 ftw)
14712 (srfi srfi-1)
14713 (srfi srfi-26))
14714 #:phases (modify-phases %standard-phases
14715 (add-after 'unpack 'use-absolute-python
14716 (lambda _
14717 (substitute* "Cheetah/CheetahWrapper.py"
14718 (("#!/usr/bin/env python")
14719 (string-append "#!" (which "python"))))
14720 #t))
14721 (add-after 'unpack 'fix-tests
14722 (lambda _
14723 (substitute* "Cheetah/Tests/ImportHooks.py"
14724 (("os.path.dirname\\(__file__\\)")
14725 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14726 #t))
14727 (replace 'check
14728 (lambda _
14729 (let ((cwd (getcwd)))
14730 (setenv "PYTHONPATH"
14731 (string-append
14732 cwd "/build/"
14733 (find (cut string-prefix? "lib" <>)
14734 (scandir (string-append cwd "/build")))
14735 ":" (getenv "PYTHONPATH")))
14736 (setenv "PATH"
14737 (string-append (getenv "PATH")
14738 ":" cwd "/bin"))
14739 (setenv "TMPDIR" "/tmp")
14740
14741 (substitute* "Cheetah/Tests/Test.py"
14742 (("unittest.TextTestRunner\\(\\)")
14743 "unittest.TextTestRunner(verbosity=2)"))
14744
14745 (invoke "python" "Cheetah/Tests/Test.py")))))))
14746 (propagated-inputs
14747 `(("python-markdown" ,python-markdown))) ;optional
14748 (home-page "https://cheetahtemplate.org/")
14749 (synopsis "Template engine")
14750 (description "Cheetah is a text-based template engine and Python code
14751 generator.
14752
14753 Cheetah can be used as a standalone templating utility or referenced as
14754 a library from other Python applications. It has many potential uses,
14755 but web developers looking for a viable alternative to ASP, JSP, PHP and
14756 PSP are expected to be its principle user group.
14757
14758 Features:
14759 @enumerate
14760 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14761 text-based format.
14762 @item Cleanly separates content, graphic design, and program code.
14763 @item Blends the power and flexibility of Python with a simple template language
14764 that non-programmers can understand.
14765 @item Gives template writers full access to any Python data structure, module,
14766 function, object, or method in their templates.
14767 @item Makes code reuse easy by providing an object-orientated interface to
14768 templates that is accessible from Python code or other Cheetah templates.
14769 One template can subclass another and selectively reimplement sections of it.
14770 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14771 improve the performance of a dynamic website.
14772 @item Compiles templates into optimized, yet readable, Python code.
14773 @end enumerate")
14774 (license (license:x11-style "file://LICENSE"))))
14775
14776 (define-public python2-cheetah
14777 (package-with-python2 python-cheetah))
14778
14779 (define-public python-dulwich
14780 (package
14781 (name "python-dulwich")
14782 (version "0.19.16")
14783 (source
14784 (origin
14785 (method url-fetch)
14786 (uri (list (string-append "https://www.dulwich.io/releases/"
14787 "dulwich-" version ".tar.gz")
14788 (pypi-uri "dulwich" version)))
14789 (sha256
14790 (base32
14791 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14792 (build-system python-build-system)
14793 (arguments
14794 `(#:phases
14795 (modify-phases %standard-phases
14796 (add-before 'check 'fix-tests
14797 (lambda* (#:key inputs #:allow-other-keys)
14798 ;; The tests use Popen with a custom environment which doesn't
14799 ;; include PATH.
14800 (substitute* "dulwich/tests/compat/utils.py"
14801 (("'git'") (string-append "'"
14802 (which "git")
14803 "'")))
14804 (substitute* '("dulwich/tests/test_repository.py"
14805 "dulwich/tests/test_hooks.py")
14806 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14807 (setenv "TEST_RUNNER" "unittest")
14808 (setenv "PYTHONHASHSEED" "random")
14809 #t)))))
14810 (propagated-inputs
14811 `(("python-fastimport" ,python-fastimport)
14812 ("python-urllib3" ,python-urllib3)))
14813 (native-inputs
14814 `(("python-mock" ,python-mock)
14815 ("python-geventhttpclient" ,python-geventhttpclient)
14816 ("git" ,git)))
14817 (home-page "https://www.dulwich.io/")
14818 (synopsis "Git implementation in Python")
14819 (description "Dulwich is an implementation of the Git file formats and
14820 protocols written in pure Python.")
14821 ;; Can be used with either license.
14822 (license (list license:asl2.0 license:gpl2+))))
14823
14824 (define-public python2-dulwich
14825 (package-with-python2 python-dulwich))
14826
14827 (define-public python-pbkdf2
14828 (package
14829 (name "python-pbkdf2")
14830 (version "1.3")
14831 (source
14832 (origin
14833 (method url-fetch)
14834 (uri (pypi-uri "pbkdf2" version))
14835 (sha256
14836 (base32
14837 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14838 (build-system python-build-system)
14839 (arguments
14840 '(#:phases
14841 (modify-phases %standard-phases
14842 (replace 'check
14843 (lambda _
14844 (setenv "PYTHONPATH"
14845 (string-append (getcwd) "/build/lib:"
14846 (getenv "PYTHONPATH")))
14847 (invoke "python" "test/test_pbkdf2.py"))))))
14848 (propagated-inputs
14849 `(("python-pycrypto" ,python-pycrypto))) ; optional
14850 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14851 (synopsis "Password-based key derivation")
14852 (description "This module implements the password-based key derivation
14853 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14854
14855 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14856 is part of the RSA Public Key Cryptography Standards series. The provided
14857 implementation takes a password or a passphrase and a salt value (and
14858 optionally a iteration count, a digest module, and a MAC module) and provides
14859 a file-like object from which an arbitrarily-sized key can be read.")
14860 (license license:expat)))
14861
14862 (define-public python2-pbkdf2
14863 (package-with-python2 python-pbkdf2))
14864
14865 (define-public python-qrcode
14866 (package
14867 (name "python-qrcode")
14868 (version "6.1")
14869 (source
14870 (origin
14871 (method url-fetch)
14872 (uri (pypi-uri "qrcode" version))
14873 (sha256
14874 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14875 (build-system python-build-system)
14876 (arguments
14877 ;; FIXME: Tests require packaging 'pymaging'.
14878 '(#:tests? #f))
14879 (propagated-inputs
14880 `(("python-lxml" ,python-lxml) ; for SVG output
14881 ("python-pillow" ,python-pillow) ; for PNG output
14882 ("python-six" ,python-six)))
14883 (home-page "https://github.com/lincolnloop/python-qrcode")
14884 (synopsis "QR Code image generator")
14885 (description "This package provides a pure Python QR Code generator
14886 module. It uses the Python Imaging Library (PIL) to allow for the generation
14887 of QR Codes.
14888
14889 In addition this package provides a command line tool to generate QR codes and
14890 either write these QR codes to a file or do the output as ascii art at the
14891 console.")
14892 (license license:bsd-3)))
14893
14894 (define-public python2-qrcode
14895 (package-with-python2 python-qrcode))
14896
14897 (define-public python-rst2ansi
14898 (package
14899 (name "python-rst2ansi")
14900 (version "0.1.5")
14901 (source
14902 (origin
14903 (method url-fetch)
14904 (uri (pypi-uri "rst2ansi" version))
14905 (sha256
14906 (base32
14907 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14908 (build-system python-build-system)
14909 (propagated-inputs
14910 `(("python-docutils" ,python-docutils)))
14911 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14912 (synopsis "Convert RST to ANSI-decorated console output")
14913 (description
14914 "Python module dedicated to rendering RST (reStructuredText) documents
14915 to ansi-escaped strings suitable for display in a terminal.")
14916 (license license:expat)))
14917
14918 (define-public python-ansi2html
14919 (package
14920 (name "python-ansi2html")
14921 (version "1.2.0")
14922 (source
14923 (origin
14924 (method url-fetch)
14925 (uri (pypi-uri "ansi2html" version))
14926 (sha256
14927 (base32
14928 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14929 (build-system python-build-system)
14930 (native-inputs
14931 `(("python-mock" ,python-mock)
14932 ("python-nose" ,python-nose)))
14933 (propagated-inputs
14934 `(("python-six" ,python-six)))
14935 (home-page "https://github.com/ralphbean/ansi2html")
14936 (synopsis "Convert ANSI-decorated console output to HTML")
14937 (description
14938 "@command{ansi2html} is a Python library and command line utility for
14939 converting text with ANSI color codes to HTML or LaTeX.")
14940 (license license:gpl3+)))
14941
14942 (define-public python2-ansi2html
14943 (package-with-python2 python-ansi2html))
14944
14945 (define-public python-ddt
14946 (package
14947 (name "python-ddt")
14948 (version "1.4.1")
14949 (source
14950 (origin
14951 (method url-fetch)
14952 (uri (pypi-uri "ddt" version))
14953 (sha256
14954 (base32
14955 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14956 (build-system python-build-system)
14957 (native-inputs
14958 `(("python-pytest" ,python-pytest)))
14959 (propagated-inputs
14960 `(("python-pyyaml" ,python-pyyaml)))
14961 (home-page "https://github.com/datadriventests/ddt")
14962 (synopsis "Data-Driven Tests")
14963 (description
14964 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14965 running it with different test data, and make it appear as multiple test
14966 cases.")
14967 (license license:expat)))
14968
14969 (define-public python-pycountry
14970 (package
14971 (name "python-pycountry")
14972 (version "18.5.26")
14973 (source
14974 (origin
14975 (method url-fetch)
14976 (uri (pypi-uri "pycountry" version))
14977 (sha256
14978 (base32
14979 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14980 (build-system python-build-system)
14981 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14982 (synopsis "ISO databases for languages, countries, currencies, etc.")
14983 (description
14984 "@code{pycountry} provides the ISO databases for the standards:
14985 @enumerate
14986 @item 639-3 (Languages)
14987 @item 3166 (Countries)
14988 @item 3166-3 (Deleted Countries)
14989 @item 3166-2 (Subdivisions of countries)
14990 @item 4217 (Currencies)
14991 @item 15924 (Scripts)
14992 @end enumerate
14993 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14994 through a Python API.")
14995 (license license:lgpl2.1+)))
14996
14997 (define-public python2-pycountry
14998 (package-with-python2 python-pycountry))
14999
15000 (define-public python-pycosat
15001 (package
15002 (name "python-pycosat")
15003 (version "0.6.3")
15004 (source
15005 (origin
15006 (method url-fetch)
15007 (uri (pypi-uri "pycosat" version ".zip"))
15008 (sha256
15009 (base32
15010 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15011 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15012 (build-system python-build-system)
15013 (native-inputs
15014 `(("unzip" ,unzip)))
15015 (home-page "https://github.com/ContinuumIO/pycosat")
15016 (synopsis "Bindings to picosat (a SAT solver)")
15017 (description
15018 "This package provides efficient Python bindings to @code{picosat} on
15019 the C level. When importing pycosat, the @code{picosat} solver becomes part
15020 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15021 Problem} (SAT) solver.")
15022 (license license:expat)))
15023
15024 (define-public python2-pycosat
15025 (package-with-python2 python-pycosat))
15026
15027 (define-public python2-ruamel.ordereddict
15028 (package
15029 (name "python2-ruamel.ordereddict")
15030 (version "0.4.9")
15031 (source
15032 (origin
15033 (method url-fetch)
15034 (uri (pypi-uri "ruamel.ordereddict" version))
15035 (sha256
15036 (base32
15037 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15038 (build-system python-build-system)
15039 (arguments
15040 `(#:python ,python-2
15041 #:phases
15042 (modify-phases %standard-phases
15043 (delete 'check)
15044 (add-after 'install 'check
15045 (lambda* (#:key inputs outputs #:allow-other-keys)
15046 (add-installed-pythonpath inputs outputs)
15047 (invoke "python" "test/testordereddict.py"))))))
15048 (home-page "https://bitbucket.org/ruamel/ordereddict")
15049 (synopsis "Version of dict that keeps keys in insertion order")
15050 (description
15051 "This is an implementation of an ordered dictionary with @dfn{Key
15052 Insertion Order} (KIO: updates of values do not affect the position of the
15053 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15054 removed and put at the back). The standard library module @code{OrderedDict},
15055 implemented later, implements a subset of @code{ordereddict} functionality.
15056 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15057 Order} (KSO, no sorting function can be specified, but a transform can be
15058 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15059 (license license:expat)))
15060
15061 (define-public python-pypeg2
15062 (package
15063 (name "python-pypeg2")
15064 (version "2.15.2")
15065 (source
15066 (origin
15067 (method url-fetch)
15068 (uri (pypi-uri "pyPEG2" version))
15069 (sha256
15070 (base32
15071 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15072 (build-system python-build-system)
15073 (propagated-inputs `(("python-lxml" ,python-lxml)))
15074 (arguments
15075 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15076 '(#:tests? #f))
15077 (home-page "https://fdik.org/pyPEG/")
15078 (synopsis "Parsering Expression Grammars in Python")
15079 (description "PyPEG is an intrinsic parser interpreter framework for
15080 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15081 parse many formal languages.")
15082 (license license:gpl2)))
15083
15084 (define-public python-incremental
15085 (package
15086 (name "python-incremental")
15087 (version "17.5.0")
15088 (source
15089 (origin
15090 (method url-fetch)
15091 (uri (pypi-uri "incremental" version))
15092 (sha256
15093 (base32
15094 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15095 (build-system python-build-system)
15096 (home-page "https://github.com/hawkowl/incremental")
15097 (synopsis "Library for versioning Python projects")
15098 (description "Incremental is a small library that versions your Python
15099 projects.")
15100 (license license:expat)))
15101
15102 (define-public python2-incremental
15103 (package-with-python2 python-incremental))
15104
15105 (define-public python-invoke
15106 (package
15107 (name "python-invoke")
15108 (home-page "https://www.pyinvoke.org/")
15109 (version "1.4.1")
15110 (source (origin
15111 (method url-fetch)
15112 (uri (pypi-uri "invoke" version))
15113 (sha256
15114 (base32
15115 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
15116 (build-system python-build-system)
15117 (arguments
15118 ;; XXX: Requires many dependencies that are not yet in Guix.
15119 `(#:tests? #f))
15120 (synopsis "Pythonic task execution")
15121 (description
15122 "Invoke is a Python task execution tool and library, drawing inspiration
15123 from various sources to arrive at a powerful and clean feature set. It is
15124 evolved from the Fabric project, but focuses on local and abstract concerns
15125 instead of servers and network commands.")
15126 (license license:bsd-3)))
15127
15128 (define-public python2-invoke
15129 (package-with-python2 python-invoke))
15130
15131 (define-public python-automat
15132 (package
15133 (name "python-automat")
15134 (version "20.2.0")
15135 (source (origin
15136 (method url-fetch)
15137 (uri (pypi-uri "Automat" version))
15138 (sha256
15139 (base32
15140 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15141 (build-system python-build-system)
15142 ;; We disable the tests because they require python-twisted, while
15143 ;; python-twisted depends on python-automat. Twisted is optional, but the
15144 ;; tests fail if it is not available. Also see
15145 ;; <https://github.com/glyph/automat/issues/71>.
15146 (arguments '(#:tests? #f))
15147 (native-inputs
15148 `(("python-m2r" ,python-m2r)
15149 ("python-setuptools-scm" ,python-setuptools-scm)
15150 ("python-graphviz" ,python-graphviz)))
15151 (propagated-inputs
15152 `(("python-six" ,python-six)
15153 ("python-attrs" ,python-attrs)))
15154 (home-page "https://github.com/glyph/Automat")
15155 (synopsis "Self-service finite-state machines")
15156 (description "Automat is a library for concise, idiomatic Python
15157 expression of finite-state automata (particularly deterministic finite-state
15158 transducers).")
15159 (license license:expat)))
15160
15161 (define-public python2-automat
15162 (package-with-python2 python-automat))
15163
15164 (define-public python-m2r
15165 (package
15166 (name "python-m2r")
15167 (version "0.2.1")
15168 (source (origin
15169 (method url-fetch)
15170 (uri (pypi-uri "m2r" version))
15171 (sha256
15172 (base32
15173 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15174 (build-system python-build-system)
15175 (propagated-inputs
15176 `(("python-docutils" ,python-docutils)
15177 ("python-mistune" ,python-mistune)))
15178 (native-inputs
15179 `(("python-pygments" ,python-pygments)
15180 ("python-mock" ,python-mock)))
15181 (home-page "https://github.com/miyakogi/m2r")
15182 (synopsis "Markdown to reStructuredText converter")
15183 (description "M2R converts a markdown file including reST markups to valid
15184 reST format.")
15185 (license license:expat)))
15186
15187 (define-public python2-m2r
15188 (package-with-python2 python-m2r))
15189
15190 (define-public python-constantly
15191 (package
15192 (name "python-constantly")
15193 (version "15.1.0")
15194 (source (origin
15195 (method url-fetch)
15196 (uri (pypi-uri "constantly" version))
15197 (sha256
15198 (base32
15199 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15200 (build-system python-build-system)
15201 (home-page "https://github.com/twisted/constantly")
15202 (synopsis "Symbolic constants in Python")
15203 (description "Constantly is a Python library that provides symbolic
15204 constant support. It includes collections and constants with text, numeric,
15205 and bit flag values.")
15206 (license license:expat)))
15207
15208 (define-public python2-constantly
15209 (package-with-python2 python-constantly))
15210
15211 (define-public python-attrs
15212 (package
15213 (name "python-attrs")
15214 (version "19.3.0")
15215 (source (origin
15216 (method url-fetch)
15217 (uri (pypi-uri "attrs" version))
15218 (sha256
15219 (base32
15220 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15221 (build-system python-build-system)
15222 (arguments
15223 `(#:modules ((guix build utils)
15224 (guix build python-build-system)
15225 (ice-9 ftw)
15226 (srfi srfi-1)
15227 (srfi srfi-26))
15228 #:phases (modify-phases %standard-phases
15229 (replace 'check
15230 (lambda _
15231 (let ((cwd (getcwd)))
15232 (setenv "PYTHONPATH"
15233 (string-append
15234 cwd "/build/"
15235 (find (cut string-prefix? "lib" <>)
15236 (scandir (string-append cwd "/build")))
15237 ":"
15238 (getenv "PYTHONPATH")))
15239 (invoke "python" "-m" "pytest")))))))
15240 (native-inputs
15241 `(("python-coverage" ,python-coverage)
15242 ("python-hypothesis" ,python-hypothesis)
15243 ("python-pympler" ,python-pympler)
15244 ("python-pytest" ,python-pytest)
15245 ("python-six" ,python-six)
15246 ("python-sphinx" ,python-sphinx)
15247 ("python-zope-interface" ,python-zope-interface)))
15248 (home-page "https://github.com/python-attrs/attrs/")
15249 (synopsis "Attributes without boilerplate")
15250 (description "@code{attrs} is a Python package with class decorators that
15251 ease the chores of implementing the most common attribute-related object
15252 protocols.")
15253 (license license:expat)))
15254
15255 (define-public python2-attrs
15256 (package-with-python2 python-attrs))
15257
15258 (define-public python-attrs-bootstrap
15259 (package
15260 (inherit python-attrs)
15261 (name "python-attrs-bootstrap")
15262 (native-inputs `())
15263 (arguments `(#:tests? #f))))
15264
15265 (define-public python2-attrs-bootstrap
15266 (package-with-python2 python-attrs-bootstrap))
15267
15268 (define-public python2-cliapp
15269 (package
15270 (name "python2-cliapp")
15271 (version "1.20180812.1")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (string-append
15276 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15277 version ".tar.gz"))
15278 (sha256
15279 (base32
15280 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15281 (build-system python-build-system)
15282 (arguments
15283 `(#:python ,python-2
15284 #:phases
15285 (modify-phases %standard-phases
15286 ;; check phase needs to be run before the build phase. If not,
15287 ;; coverage-test-runner looks for tests for the built source files,
15288 ;; and fails.
15289 (delete 'check)
15290 (add-before 'build 'check
15291 (lambda _
15292 ;; Disable python3 tests
15293 (substitute* "check"
15294 (("python3") "# python3"))
15295 (invoke "./check"))))))
15296 (native-inputs
15297 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15298 ("python2-pep8" ,python2-pep8)))
15299 (propagated-inputs
15300 `(("python2-pyaml" ,python2-pyaml)))
15301 (home-page "https://liw.fi/cliapp/")
15302 (synopsis "Python framework for command line programs")
15303 (description "@code{python2-cliapp} is a python framework for
15304 command line programs. It contains the typical stuff such programs
15305 need to do, such as parsing the command line for options, and
15306 iterating over input files.")
15307 (license license:gpl2+)))
15308
15309 (define-public python2-ttystatus
15310 (package
15311 (name "python2-ttystatus")
15312 (version "0.38")
15313 (source
15314 (origin
15315 (method git-fetch)
15316 (uri (git-reference
15317 (url "http://git.liw.fi/ttystatus")
15318 ;; There are no tags after ttystatus-0.36.
15319 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15320 (sha256
15321 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15322 (file-name (git-file-name name version))))
15323 (build-system python-build-system)
15324 (native-inputs
15325 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15326 ("python2-pep8" ,python2-pep8)))
15327 (arguments
15328 `(#:python ,python-2
15329 #:phases
15330 (modify-phases %standard-phases
15331 ;; check phase needs to be run before the build phase. If not,
15332 ;; coverage-test-runner looks for tests for the built source files,
15333 ;; and fails.
15334 (delete 'check)
15335 (add-before 'build 'check
15336 (lambda _ (invoke "make" "check"))))))
15337 (home-page "https://liw.fi/ttystatus/")
15338 (synopsis "Python library for showing progress reporting and
15339 status updates on terminals")
15340 (description "@code{python2-ttystatus} is a python library for
15341 showing progress reporting and status updates on terminals, for
15342 command line programs. Output is automatically adapted to the width
15343 of the terminal: truncated if it does not fit, and resized if the
15344 terminal size changes.")
15345 (license license:gpl3+)))
15346
15347 (define-public python2-tracing
15348 (package
15349 (name "python2-tracing")
15350 (version "0.10")
15351 (source
15352 (origin
15353 (method url-fetch)
15354 (uri (string-append
15355 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15356 version ".tar.gz"))
15357 (sha256
15358 (base32
15359 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15360 (build-system python-build-system)
15361 (arguments
15362 `(#:python ,python-2))
15363 (home-page "https://liw.fi/tracing/")
15364 (synopsis "Python debug logging helper")
15365 (description "@code{python2-tracing} is a python library for
15366 logging debug messages. It provides a way to turn debugging messages
15367 on and off, based on the filename they occur in. It is much faster
15368 than using @code{logging.Filter} to accomplish the same thing, which
15369 matters when code is run in production mode. The actual logging still
15370 happens using the @code{logging} library.")
15371 (license license:gpl3+)))
15372
15373 (define-public python2-larch
15374 (package
15375 (name "python2-larch")
15376 (version "1.20151025")
15377 (source
15378 (origin
15379 (method url-fetch)
15380 (uri (string-append
15381 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15382 version ".tar.gz"))
15383 (patches (search-patches
15384 "python2-larch-coverage-4.0a6-compatibility.patch"))
15385 (sha256
15386 (base32
15387 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15388 (build-system python-build-system)
15389 (arguments
15390 `(#:python ,python-2
15391 #:phases
15392 (modify-phases %standard-phases
15393 ;; check phase needs to be run before the build phase. If not,
15394 ;; coverage-test-runner looks for tests for the built source files,
15395 ;; and fails.
15396 (delete 'check)
15397 (add-before 'build 'check
15398 (lambda _ (invoke "make" "check"))))))
15399 (native-inputs
15400 `(("cmdtest" ,cmdtest)
15401 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15402 (propagated-inputs
15403 `(("python2-tracing" ,python2-tracing)))
15404 (home-page "https://liw.fi/larch/")
15405 (synopsis "Python copy-on-write B-tree library")
15406 (description "@code{python2-larch} is an implementation of
15407 particular kind of B-tree, based on research by Ohad Rodeh. See
15408 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15409 on the data structure.
15410
15411 The distinctive feature of this B-tree is that a node is never
15412 (conceptually) modified. Instead, all updates are done by
15413 copy-on-write. This makes it easy to clone a tree, and modify only the
15414 clone, while other processes access the original tree.")
15415 (license license:gpl3+)))
15416
15417 (define-public python-astroid
15418 (package
15419 (name "python-astroid")
15420 (version "2.4.2")
15421 (source
15422 (origin
15423 (method url-fetch)
15424 (uri (pypi-uri "astroid" version))
15425 (sha256
15426 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15427 (modules '((guix build utils)))
15428 (snippet
15429 '(begin
15430 ;; Check to see if the version pinning has been removed.
15431 (substitute* "astroid/__pkginfo__.py"
15432 (("==1\\.4\\.\\*") ">=1.4.0"))
15433 #t))))
15434 (build-system python-build-system)
15435 (propagated-inputs
15436 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15437 ("python-six" ,python-six)
15438 ("python-wrapt" ,python-wrapt)))
15439 (native-inputs
15440 `(("python-dateutil" ,python-dateutil)
15441 ("python-pytest" ,python-pytest)
15442 ("python-pytest-runner" ,python-pytest-runner)))
15443 (home-page "https://github.com/PyCQA/astroid")
15444 (synopsis "Common base representation of python source code for pylint and
15445 other projects")
15446 (description "@code{python-astroid} provides a common base representation
15447 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15448
15449 It provides a compatible representation which comes from the _ast module. It
15450 rebuilds the tree generated by the builtin _ast module by recursively walking
15451 down the AST and building an extended ast. The new node classes have
15452 additional methods and attributes for different usages. They include some
15453 support for static inference and local name scopes. Furthermore, astroid
15454 builds partial trees by inspecting living objects.")
15455 (license license:lgpl2.1+)
15456 (properties `((python2-variant . ,(delay python2-astroid))))))
15457
15458 (define-public python2-astroid
15459 (let ((base (package-with-python2
15460 (strip-python2-variant python-astroid))))
15461 (package (inherit base)
15462 ;; Version 2.x removes python2 support.
15463 (version "1.6.5")
15464 (source
15465 (origin
15466 (method url-fetch)
15467 (uri (pypi-uri "astroid" version))
15468 (sha256
15469 (base32
15470 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15471 (arguments
15472 (substitute-keyword-arguments (package-arguments base)
15473 ((#:phases phases)
15474 `(modify-phases ,phases
15475 (add-after 'unpack 'remove-spurious-test
15476 (lambda _
15477 ;; https://github.com/PyCQA/astroid/issues/276
15478 (delete-file "astroid/tests/unittest_brain.py")
15479 #t))
15480 (replace 'check
15481 (lambda _
15482 (invoke"python" "-m" "unittest" "discover"
15483 "-p" "unittest*.py")))))))
15484 (native-inputs `())
15485 (propagated-inputs
15486 `(("python2-backports-functools-lru-cache"
15487 ,python2-backports-functools-lru-cache)
15488 ("python2-enum34" ,python2-enum34)
15489 ("python2-singledispatch" ,python2-singledispatch)
15490 ,@(alist-delete "python-typed-ast"
15491 (package-propagated-inputs base)))))))
15492
15493 (define-public python-isbnlib
15494 (package
15495 (name "python-isbnlib")
15496 (version "3.10.4")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "isbnlib" version))
15501 (sha256
15502 (base32
15503 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15504 (build-system python-build-system)
15505 (arguments '(#:tests? #f)) ; No test
15506 (home-page "https://github.com/xlcnd/isbnlib")
15507 (synopsis "Python library to work with ISBN strings")
15508 (description "@code{python-isbnlib} is a (pure) python library that provides
15509 several useful methods and functions to validate, clean, transform, hyphenate and
15510 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15511 version, is suitable to be include as a dependency in other projects.")
15512 (license license:lgpl3+)))
15513
15514 (define-public python-isort
15515 (package
15516 (name "python-isort")
15517 (version "4.3.4")
15518 (source
15519 (origin
15520 (method git-fetch)
15521 (uri (git-reference
15522 ;; Tests pass only from the Github sources
15523 (url "https://github.com/timothycrosley/isort")
15524 (commit version)))
15525 (file-name (git-file-name name version))
15526 (sha256
15527 (base32
15528 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15529 (build-system python-build-system)
15530 (native-inputs
15531 `(("python-mock" ,python-mock)
15532 ("python-pytest" ,python-pytest)))
15533 (home-page "https://github.com/timothycrosley/isort")
15534 (synopsis "Python utility/library to sort python imports")
15535 (description "@code{python-isort} is a python utility/library to sort
15536 imports alphabetically, and automatically separated into sections. It
15537 provides a command line utility, a python library and plugins for various
15538 editors.")
15539 (license license:expat)
15540 (properties `((python2-variant . ,(delay python2-isort))))))
15541
15542 (define-public python2-isort
15543 (let ((base (package-with-python2
15544 (strip-python2-variant python-isort))))
15545 (package (inherit base)
15546 (native-inputs
15547 `(("python2-futures" ,python2-futures)
15548 ,@(package-native-inputs base))))))
15549
15550 (define-public python2-backports-functools-lru-cache
15551 (package
15552 (name "python2-backports-functools-lru-cache")
15553 (version "1.6.1")
15554 (source
15555 (origin
15556 (method url-fetch)
15557 ;; only the pypi tarballs contain the necessary metadata
15558 (uri (pypi-uri "backports.functools_lru_cache" version))
15559 (sha256
15560 (base32
15561 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15562 (build-system python-build-system)
15563 (native-inputs
15564 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15565 (arguments
15566 `(#:python ,python-2))
15567 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15568 (synopsis "Backport of functools.lru_cache from Python 3.3")
15569 (description "@code{python2-backports-functools-lru-cache} is a backport
15570 of @code{functools.lru_cache} from python 3.3.")
15571 (license license:expat)))
15572
15573 (define-public python-configparser
15574 (package
15575 (name "python-configparser")
15576 (version "4.0.2")
15577 (source
15578 (origin
15579 (method url-fetch)
15580 (uri (pypi-uri "configparser" version))
15581 (sha256
15582 (base32
15583 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15584 (native-inputs
15585 `(("python-setuptools_scm" ,python-setuptools-scm)))
15586 (build-system python-build-system)
15587 (home-page "https://github.com/jaraco/configparser/")
15588 (synopsis "Backport of configparser from python 3.5")
15589 (description "@code{python-configparser} is a backport of
15590 @code{configparser} from Python 3.5 so that it can be used directly
15591 in other versions.")
15592 (license license:expat)))
15593
15594 (define-public python2-configparser
15595 (package-with-python2 python-configparser))
15596
15597 (define-public python-iniconfig
15598 (package
15599 (name "python-iniconfig")
15600 (version "1.1.1")
15601 (source
15602 (origin
15603 (method url-fetch)
15604 (uri (pypi-uri "iniconfig" version))
15605 (sha256
15606 (base32
15607 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15608 (build-system python-build-system)
15609 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15610 (synopsis "Simple INI-file parser")
15611 (description "The @code{iniconfig} package provides a small and simple
15612 INI-file parser module having a unique set of features; @code{iniconfig}
15613 @itemize
15614 @item maintains the order of sections and entries;
15615 @item supports multi-line values with or without line-continuations;
15616 @item supports \"#\" comments everywhere;
15617 @item raises errors with proper line-numbers;
15618 @item raises an error when two sections have the same name.
15619 @end itemize")
15620 (license license:expat)))
15621
15622 (define-public python-mamba
15623 (package
15624 (name "python-mamba")
15625 (version "0.11.2")
15626 (source (origin
15627 (method url-fetch)
15628 (uri (pypi-uri "mamba" version))
15629 (sha256
15630 (base32
15631 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15632 (build-system python-build-system)
15633 (arguments `(#:tests? #f)) ; No test
15634 (propagated-inputs
15635 `(("python-clint" ,python-clint)
15636 ("python-coverage" ,python-coverage)))
15637 (home-page "https://nestorsalceda.com/mamba/")
15638 (synopsis "Test runner for Python")
15639 (description
15640 "Mamba is a Behaviour-Driven Development tool for Python developers.
15641 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15642 (license license:expat)))
15643
15644 (define-public python-mando
15645 (package
15646 (name "python-mando")
15647 (version "0.6.4")
15648 (source (origin
15649 (method url-fetch)
15650 (uri (pypi-uri "mando" version))
15651 (sha256
15652 (base32
15653 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15654 (build-system python-build-system)
15655 (propagated-inputs
15656 `(("python-rst2ansi" ,python-rst2ansi)
15657 ("python-six" ,python-six)))
15658 (native-inputs
15659 `(("python-pytest" ,python-pytest)))
15660 (home-page "https://mando.readthedocs.org/")
15661 (synopsis
15662 "Wrapper around argparse, allowing creation of complete CLI applications")
15663 (description
15664 "This package is a wrapper around argparse, allowing you to write complete CLI
15665 applications in seconds while maintaining all the flexibility.")
15666 (license license:expat)))
15667
15668 (define-public python2-mando
15669 (package-with-python2 python-mando))
15670
15671 (define-public python2-argparse
15672 (package
15673 (name "python2-argparse")
15674 (version "1.4.0")
15675 (source
15676 (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "argparse" version))
15679 (sha256
15680 (base32
15681 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15682 (build-system python-build-system)
15683 (arguments
15684 `(#:python ,python-2))
15685 (home-page "https://github.com/ThomasWaldmann/argparse/")
15686 (synopsis "Python command-line parsing library")
15687 (description
15688 "This package is mostly for people who want to have @code{argparse} on
15689 older Pythons because it was not part of the standard library back then.")
15690 (license license:psfl)))
15691
15692 (define-public python-fudge
15693 (package
15694 (name "python-fudge")
15695 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15696 ;; package, which is currently the only use of this package.
15697 (version "0.9.6")
15698 (source
15699 (origin
15700 (method url-fetch)
15701 (uri (pypi-uri "fudge" version))
15702 (sha256
15703 (base32
15704 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15705 (build-system python-build-system)
15706 (arguments
15707 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15708 (home-page "https://github.com/fudge-py/fudge")
15709 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15710 (description
15711 "Fudge is a Python module for using fake objects (mocks and stubs) to
15712 test real ones.
15713
15714 In readable Python code, you declare the methods available on your fake object
15715 and how they should be called. Then you inject that into your application and
15716 start testing. This declarative approach means you don’t have to record and
15717 playback actions and you don’t have to inspect your fakes after running code.
15718 If the fake object was used incorrectly then you’ll see an informative
15719 exception message with a traceback that points to the culprit.")
15720 (license license:expat)))
15721
15722 (define-public python2-fudge
15723 (package-with-python2 python-fudge))
15724
15725 (define-public python-mwclient
15726 (package
15727 (name "python-mwclient")
15728 (version "0.10.1")
15729 (source
15730 (origin
15731 (method git-fetch)
15732 ;; The PyPI version wouldn't contain tests.
15733 (uri (git-reference
15734 (url "https://github.com/mwclient/mwclient")
15735 (commit (string-append "v" version))))
15736 (file-name (git-file-name name version))
15737 (sha256
15738 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15739 (build-system python-build-system)
15740 (propagated-inputs
15741 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15742 ("python-six" ,python-six)))
15743 (native-inputs
15744 `(("python-mock" ,python-mock)
15745 ("python-pytest" ,python-pytest)
15746 ("python-pytest-cov" ,python-pytest-cov)
15747 ("python-pytest-runner" ,python-pytest-runner)
15748 ("python-responses" ,python-responses)))
15749 (home-page "https://github.com/btongminh/mwclient")
15750 (synopsis "MediaWiki API client")
15751 (description "This package provides a MediaWiki API client.")
15752 (license license:expat)))
15753
15754 (define-public python2-mwclient
15755 (package-with-python2 python-mwclient))
15756
15757 (define-public python-utils
15758 (package
15759 (name "python-utils")
15760 (version "2.4.0")
15761 (source (origin
15762 (method url-fetch)
15763 (uri (pypi-uri "python-utils" version))
15764 (sha256
15765 (base32
15766 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15767 (build-system python-build-system)
15768 (arguments
15769 `(#:phases
15770 (modify-phases %standard-phases
15771 (replace 'check
15772 (lambda* (#:key inputs outputs #:allow-other-keys)
15773 (add-installed-pythonpath inputs outputs)
15774 (delete-file "pytest.ini")
15775 (invoke "pytest" "-vv"))))))
15776 (native-inputs
15777 `(("pytest-runner" ,python-pytest-runner)
15778 ("pytest" ,python-pytest)
15779 ("six" ,python-six)))
15780 (home-page "https://github.com/WoLpH/python-utils")
15781 (synopsis "Convenient utilities not included with the standard Python install")
15782 (description
15783 "Python Utils is a collection of small Python functions and classes which
15784 make common patterns shorter and easier.")
15785 (license license:bsd-2)))
15786
15787 (define-public python2-utils
15788 (package-with-python2 python-utils))
15789
15790 (define-public python-diff-match-patch
15791 (package
15792 (name "python-diff-match-patch")
15793 (version "20121119")
15794 (source
15795 (origin
15796 (method url-fetch)
15797 (uri (pypi-uri "diff-match-patch" version))
15798 (sha256
15799 (base32
15800 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15801 (build-system python-build-system)
15802 (home-page "https://code.google.com/p/google-diff-match-patch")
15803 (synopsis "Synchronize plain text")
15804 (description "Diff Match and Patch libraries offer robust algorithms to
15805 perform the operations required for synchronizing plain text.")
15806 (license license:asl2.0)))
15807
15808 (define-public python2-diff-match-patch
15809 (package-with-python2 python-diff-match-patch))
15810
15811 (define-public python-dirsync
15812 (package
15813 (name "python-dirsync")
15814 (version "2.2.5")
15815 (source
15816 (origin
15817 (method url-fetch)
15818 (uri (pypi-uri "dirsync" version))
15819 (sha256
15820 (base32
15821 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15822 (build-system python-build-system)
15823 (propagated-inputs
15824 `(("six" ,python-six)))
15825 (home-page "https://github.com/tkhyn/dirsync")
15826 (synopsis "Advanced directory tree synchronisation tool")
15827 (description "Advanced directory tree synchronisation tool.")
15828 (license license:expat)))
15829
15830 (define-public python2-dirsync
15831 (package-with-python2 python-dirsync))
15832
15833 (define-public python-levenshtein
15834 (package
15835 (name "python-levenshtein")
15836 (version "0.12.0")
15837 (source
15838 (origin
15839 (method url-fetch)
15840 (uri (pypi-uri "python-Levenshtein" version))
15841 (sha256
15842 (base32
15843 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15844 (build-system python-build-system)
15845 (home-page "https://github.com/ztane/python-Levenshtein")
15846 (synopsis "Fast computation of Levenshtein distance and string similarity")
15847 (description
15848 "The Levenshtein Python C extension module contains functions for fast computation of
15849 @enumerate
15850 @item Levenshtein (edit) distance, and edit operations
15851 @item string similarity
15852 @item approximate median strings, and generally string averaging
15853 @item string sequence and set similarity
15854 @end enumerate
15855 It supports both normal and Unicode strings.")
15856 (license license:gpl2+)))
15857
15858 (define-public python2-levenshtein
15859 (package-with-python2 python-levenshtein))
15860
15861 (define-public python-scandir
15862 (package
15863 (name "python-scandir")
15864 (version "1.10.0")
15865 (source
15866 (origin
15867 (method url-fetch)
15868 (uri (pypi-uri "scandir" version))
15869 (sha256
15870 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15871 (build-system python-build-system)
15872 (arguments
15873 `(#:phases (modify-phases %standard-phases
15874 (replace 'check
15875 (lambda _
15876 (invoke "python" "test/run_tests.py"))))))
15877 (home-page "https://github.com/benhoyt/scandir")
15878 (synopsis "Directory iteration function")
15879 (description
15880 "Directory iteration function like os.listdir(), except that instead of
15881 returning a list of bare filenames, it yields DirEntry objects that include
15882 file type and stat information along with the name. Using scandir() increases
15883 the speed of os.walk() by 2-20 times (depending on the platform and file
15884 system) by avoiding unnecessary calls to os.stat() in most cases.
15885
15886 This package is part of the Python standard library since version 3.5.")
15887 (license license:bsd-3)))
15888
15889 (define-public python2-scandir
15890 (package-with-python2 python-scandir))
15891
15892 (define-public python2-stemming
15893 (package
15894 (name "python2-stemming")
15895 (version "1.0.1")
15896 (source
15897 (origin
15898 (method url-fetch)
15899 (uri (pypi-uri "stemming" version))
15900 (sha256
15901 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15902 (build-system python-build-system)
15903 (arguments
15904 `(#:python ,python-2))
15905 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15906 (synopsis "Python implementations of various stemming algorithms")
15907 (description
15908 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15909 stemming algorithms for English. These implementations are straightforward and
15910 efficient, unlike some Python versions of the same algorithms available on the
15911 Web. This package is an extraction of the stemming code included in the Whoosh
15912 search engine.")
15913 (license license:public-domain)))
15914
15915 (define-public python-factory-boy
15916 (package
15917 (name "python-factory-boy")
15918 (version "2.8.1")
15919 (source
15920 (origin
15921 (method url-fetch)
15922 (uri (pypi-uri "factory_boy" version))
15923 (sha256
15924 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15925 (build-system python-build-system)
15926 (arguments
15927 ;; Tests are not included in the tarball.
15928 `(#:tests? #f))
15929 (propagated-inputs
15930 `(("faker" ,python-faker)))
15931 (home-page "https://github.com/benhoyt/scandir")
15932 (synopsis "Versatile test fixtures replacement")
15933 (description
15934 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15935
15936 As a fixtures replacement tool, it aims to replace static, hard to maintain
15937 fixtures with easy-to-use factories for complex object.
15938
15939 Instead of building an exhaustive test setup with every possible combination
15940 of corner cases, factory_boy allows you to use objects customized for the
15941 current test, while only declaring the test-specific fields")
15942 (license license:expat)))
15943
15944 (define-public python2-factory-boy
15945 (package-with-python2 python-factory-boy))
15946
15947 (define-public python-translate-toolkit
15948 (package
15949 (name "python-translate-toolkit")
15950 (version "2.1.0")
15951 (source
15952 (origin
15953 (method url-fetch)
15954 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15955 (sha256
15956 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15957 (build-system python-build-system)
15958 (native-inputs
15959 `(("python-pytest" ,python-pytest)
15960 ("python-sphinx" ,python-sphinx)))
15961 (propagated-inputs
15962 `(("python-babel" ,python-babel)
15963 ("python-beautifulsoup4" ,python-beautifulsoup4)
15964 ("python-chardet" ,python-chardet)
15965 ("python-diff-match-patch" ,python-diff-match-patch)
15966 ("python-levenshtein" ,python-levenshtein)
15967 ("python-lxml" ,python-lxml)
15968 ("python-six" ,python-six)
15969 ("python-vobject" ,python-vobject)
15970 ("python-pyyaml" ,python-pyyaml)))
15971 (arguments
15972 ;; TODO: tests are not run, because they end with
15973 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15974 ;; 'parse_funcs'
15975 ;; during test setup.
15976 `(#:tests? #f))
15977 (home-page "https://toolkit.translatehouse.org")
15978 (synopsis "Tools and API for translation and localization engineering")
15979 (description
15980 "Tools and API for translation and localization engineering. It contains
15981 several utilities, as well as an API for building localization tools.")
15982 (license license:gpl2+)))
15983
15984 (define-public python2-translate-toolkit
15985 (package-with-python2 python-translate-toolkit))
15986
15987 (define-public python-packaging
15988 (package
15989 (name "python-packaging")
15990 (version "20.4")
15991 (source
15992 (origin
15993 (method url-fetch)
15994 (uri (pypi-uri "packaging" version))
15995 (sha256
15996 (base32
15997 "1y3rc1ams1i25calk6b9jf1gl85ix5a23a146swjvhdr8x7zfms3"))))
15998 (build-system python-build-system)
15999 (arguments
16000 `(#:phases (modify-phases %standard-phases
16001 (replace 'check
16002 (lambda* (#:key tests? #:allow-other-keys)
16003 (if tests?
16004 (invoke "py.test" "-vv")
16005 (format #t "test suite not run~%"))
16006 #t)))))
16007 (native-inputs
16008 `(("python-pretend" ,python-pretend)
16009 ("python-pytest" ,python-pytest)))
16010 (propagated-inputs
16011 `(("python-pyparsing" ,python-pyparsing)
16012 ("python-six" ,python-six)))
16013 (home-page "https://github.com/pypa/packaging")
16014 (synopsis "Core utilities for Python packages")
16015 (description "Packaging is a Python module for dealing with Python packages.
16016 It offers an interface for working with package versions, names, and dependency
16017 information.")
16018 ;; From 'LICENSE': This software is made available under the terms of
16019 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16020 ;; Contributions to this software is made under the terms of *both* these
16021 ;; licenses.
16022 (license (list license:asl2.0 license:bsd-2))))
16023
16024 (define-public python2-packaging
16025 (package-with-python2 python-packaging))
16026
16027 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16028 (define-public python-packaging-bootstrap
16029 (hidden-package
16030 (package/inherit
16031 python-packaging
16032 (name "python-packaging-bootstrap")
16033 (native-inputs '())
16034 (propagated-inputs
16035 `(("python-pyparsing" ,python-pyparsing)))
16036 (arguments '(#:tests? #f)))))
16037
16038 (define-public python2-packaging-bootstrap
16039 (hidden-package
16040 (package/inherit
16041 python2-packaging
16042 (name "python2-packaging-bootstrap")
16043 (native-inputs '())
16044 (propagated-inputs
16045 `(("python-pyparsing" ,python2-pyparsing)))
16046 (arguments
16047 `(#:tests? #f
16048 ,@(package-arguments python2-packaging))))))
16049
16050 (define-public python-relatorio
16051 (package
16052 (name "python-relatorio")
16053 (version "0.8.0")
16054 (source
16055 (origin
16056 (method url-fetch)
16057 (uri (pypi-uri "relatorio" version))
16058 (sha256
16059 (base32
16060 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16061 (build-system python-build-system)
16062 (propagated-inputs
16063 `(("python-lxml" ,python-lxml)
16064 ("python-genshi" ,python-genshi)))
16065 (native-inputs
16066 `(("python-magic" ,python-magic)))
16067 (home-page "https://relatorio.tryton.org/")
16068 (synopsis "Templating library able to output ODT and PDF files")
16069 (description "Relatorio is a templating library which provides a way to
16070 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16071 for more filetypes can be easily added by creating plugins for them.")
16072 (license license:gpl3+)))
16073
16074 (define-public python2-relatorio
16075 (package-with-python2 python-relatorio))
16076
16077 (define-public python-radon
16078 (package
16079 (name "python-radon")
16080 (version "4.1.0")
16081 (source
16082 (origin
16083 (method url-fetch)
16084 (uri (pypi-uri "radon" version))
16085 (sha256
16086 (base32
16087 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16088 (build-system python-build-system)
16089 (arguments
16090 `(#:phases (modify-phases %standard-phases
16091 (replace 'check
16092 (lambda _
16093 (invoke "python" "radon/tests/run.py"))))))
16094 (propagated-inputs
16095 `(("python-colorama" ,python-colorama)
16096 ("python-flake8-polyfill" ,python-flake8-polyfill)
16097 ("python-mando" ,python-mando)))
16098 (native-inputs
16099 `(("python-pytest" ,python-pytest)
16100 ("python-pytest-mock" ,python-pytest-mock)))
16101 (home-page "https://radon.readthedocs.org/")
16102 (synopsis "Code Metrics in Python")
16103 (description "Radon is a Python tool which computes various code metrics.
16104 Supported metrics are:
16105 @itemize @bullet
16106 @item raw metrics: SLOC, comment lines, blank lines, &c.
16107 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16108 @item Halstead metrics (all of them)
16109 @item the Maintainability Index (a Visual Studio metric)
16110 @end itemize")
16111 (properties `((python2-variant . ,(delay python2-radon))))
16112 (license license:expat)))
16113
16114 (define-public python2-radon
16115 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16116 (package
16117 (inherit base)
16118 (propagated-inputs
16119 `(("python-configparser" ,python2-configparser)
16120 ("python-future" ,python2-future)
16121 ,@(package-propagated-inputs base))))))
16122
16123 (define-public python-sure
16124 (package
16125 (name "python-sure")
16126 (version "1.4.11")
16127 (source
16128 (origin
16129 (method url-fetch)
16130 (uri (pypi-uri "sure" version))
16131 (sha256
16132 (base32
16133 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16134 (build-system python-build-system)
16135 (propagated-inputs
16136 `(("python-mock" ,python-mock)
16137 ("python-six" ,python-six)))
16138 (native-inputs
16139 `(("python-nose" ,python-nose)))
16140 (home-page "https://github.com/gabrielfalcao/sure")
16141 (synopsis "Automated testing library in python for python")
16142 (description
16143 "Sure is a python library that leverages a DSL for writing assertions.
16144 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16145 (license license:gpl3+)))
16146
16147 (define-public python2-sure
16148 (package-with-python2 python-sure))
16149
16150 (define-public python2-couleur
16151 ;; This package does not seem to support python3 at all, hence,
16152 ;; only the python2 variant definition is provided.
16153 (package
16154 (name "python2-couleur")
16155 (version "0.6.2")
16156 (source
16157 (origin
16158 (method url-fetch)
16159 (uri (pypi-uri "couleur" version))
16160 (sha256
16161 (base32
16162 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16163 (build-system python-build-system)
16164 (arguments
16165 `(#:python ,python-2))
16166 (home-page "https://github.com/gabrielfalcao/couleur")
16167 (synopsis
16168 "ANSI terminal tool for python, colored shell and other handy fancy features")
16169 (description
16170 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16171 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16172 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16173 ;; https://github.com/gabrielfalcao/couleur/issues/11
16174 (license license:lgpl3+)))
16175
16176 (define-public python-misaka
16177 (package
16178 (name "python-misaka")
16179 (version "2.1.1")
16180 (source
16181 (origin
16182 (method url-fetch)
16183 (uri (pypi-uri "misaka" version))
16184 (sha256
16185 (base32
16186 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16187 (build-system python-build-system)
16188 (arguments
16189 `(;; Line 37 of setup.py calls self.run_command('develop')
16190 ;; in the 'check' phase. This command seems to be trying
16191 ;; to write to
16192 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16193 ;; for which it does not have the permission to write.
16194 #:tests? #f))
16195 (propagated-inputs
16196 `(("python-cffi" ,python-cffi)))
16197 (home-page "https://github.com/FSX/misaka")
16198 (synopsis "Python binding for Hoedown")
16199 (description
16200 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16201 library written in C. It features a fast HTML renderer and functionality to make custom
16202 renderers (e.g. man pages or LaTeX).")
16203 (license license:expat)))
16204
16205 (define-public python2-misaka
16206 (package-with-python2 python-misaka))
16207
16208 (define-public python2-steadymark
16209 ;; This is forced into being a python2 only variant
16210 ;; due to its dependence on couleur that has no support
16211 ;; for python3
16212 (package
16213 (name "python2-steadymark")
16214 (version "0.7.3")
16215 (source
16216 (origin
16217 (method url-fetch)
16218 (uri (pypi-uri "steadymark" version))
16219 (sha256
16220 (base32
16221 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16222 (build-system python-build-system)
16223 (native-inputs
16224 `(("python-couleur" ,python2-couleur)
16225 ("python-sure" ,python2-sure)
16226 ("python-misaka" ,python2-misaka)))
16227 (arguments
16228 `(#:python ,python-2
16229 #:phases
16230 (modify-phases %standard-phases
16231 (add-before 'build 'patch-setup-py
16232 (lambda _
16233 ;; Update requirements from dependency==version
16234 ;; to dependency>=version
16235 (substitute* "setup.py"
16236 (("==") ">="))
16237 #t)))))
16238 (home-page "https://github.com/gabrielfalcao/steadymark")
16239 (synopsis "Markdown-based test runner for python")
16240 (description
16241 "@code{Steadymark} allows documentation to be written in github-flavoured
16242 markdown. The documentation may contain snippets of code surrounded by python
16243 code blocks and @code{Steadymark} will find these snippets and run them, making
16244 sure that there are no old malfunctional examples in the documentation examples.")
16245 (license license:expat)))
16246
16247 (define-public python-jsonpointer
16248 (package
16249 (name "python-jsonpointer")
16250 (version "1.10")
16251 (source
16252 (origin
16253 (method url-fetch)
16254 (uri (pypi-uri "jsonpointer" version))
16255 (sha256
16256 (base32
16257 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16258 (build-system python-build-system)
16259 (home-page "https://github.com/stefankoegl/python-json-pointer")
16260 (synopsis "Identify specific nodes in a JSON document")
16261 (description "@code{jsonpointer} allows you to access specific nodes
16262 by path in a JSON document (see RFC 6901).")
16263 (license license:bsd-3)))
16264
16265 (define-public python2-jsonpointer
16266 (package-with-python2 python-jsonpointer))
16267
16268 (define-public python-jsonpatch
16269 (package
16270 (name "python-jsonpatch")
16271 (version "1.16")
16272 (source
16273 (origin
16274 (method git-fetch)
16275 ;; pypi version lacks tests.js
16276 (uri (git-reference
16277 (url "https://github.com/stefankoegl/python-json-patch")
16278 (commit (string-append "v" version))))
16279 (file-name (git-file-name name version))
16280 (sha256
16281 (base32
16282 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16283 (build-system python-build-system)
16284 (propagated-inputs
16285 `(("python-jsonpointer" ,python-jsonpointer)))
16286 (home-page "https://github.com/stefankoegl/python-json-patch")
16287 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16288 (description "@code{jsonpatch} is a library and program that allows
16289 applying JSON Patches according to RFC 6902.")
16290 (license license:bsd-3)))
16291
16292 (define-public python2-jsonpatch
16293 (package-with-python2 python-jsonpatch))
16294
16295 (define-public python-jsonpatch-0.4
16296 (package (inherit python-jsonpatch)
16297 (name "python-jsonpatch")
16298 (version "0.4")
16299 (source
16300 (origin
16301 (method git-fetch)
16302 (uri (git-reference
16303 (url "https://github.com/stefankoegl/python-json-patch")
16304 (commit (string-append "v" version))))
16305 (file-name (git-file-name name version))
16306 (sha256
16307 (base32
16308 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16309
16310 (define-public python2-jsonpatch-0.4
16311 (package-with-python2 python-jsonpatch-0.4))
16312
16313 (define-public python-rfc3986
16314 (package
16315 (name "python-rfc3986")
16316 (version "1.4.0")
16317 (source (origin
16318 (method url-fetch)
16319 (uri (pypi-uri "rfc3986" version))
16320 (sha256
16321 (base32
16322 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16323 (build-system python-build-system)
16324 (arguments
16325 `(#:modules ((guix build utils)
16326 (guix build python-build-system)
16327 (ice-9 ftw)
16328 (srfi srfi-1)
16329 (srfi srfi-26))
16330 #:phases
16331 (modify-phases %standard-phases
16332 (replace 'check
16333 (lambda _
16334 (let ((cwd (getcwd)))
16335 (setenv "PYTHONPATH"
16336 (string-append cwd "/build/"
16337 (find (cut string-prefix? "lib" <>)
16338 (scandir (string-append cwd "/build")))
16339 ":"
16340 (getenv "PYTHONPATH")))
16341 (invoke "pytest" "-v")))))))
16342 (native-inputs
16343 `(("python-pytest" ,python-pytest)))
16344 (home-page "https://rfc3986.readthedocs.io/")
16345 (synopsis "Parse and validate URI references")
16346 (description
16347 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16348 validation and authority parsing. This module also supports RFC@tie{}6874
16349 which adds support for zone identifiers to IPv6 addresses.")
16350 (license license:asl2.0)))
16351
16352 (define-public python2-rfc3986
16353 (package-with-python2 python-rfc3986))
16354
16355 (define-public python-rfc3987
16356 (package
16357 (name "python-rfc3987")
16358 (version "1.3.7")
16359 (source
16360 (origin
16361 (method url-fetch)
16362 (uri (pypi-uri "rfc3987" version))
16363 (sha256
16364 (base32
16365 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16366 (build-system python-build-system)
16367 (home-page "https://pypi.org/project/rfc3987/")
16368 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16369 (description "@code{rfc3987} provides routines for parsing and
16370 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16371 (license license:gpl3+)))
16372
16373 (define-public python2-rfc3987
16374 (package-with-python2 python-rfc3987))
16375
16376 ;; The latest commit contains fixes for building with both python3 and python2.
16377 (define-public python-rfc6555
16378 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16379 (revision "1"))
16380 (package
16381 (name "python-rfc6555")
16382 (version (git-version "0.0.0" revision commit))
16383 (source (origin
16384 (method git-fetch)
16385 (uri (git-reference
16386 (url "https://github.com/sethmlarson/rfc6555")
16387 (commit commit)))
16388 (file-name (git-file-name name version))
16389 (sha256
16390 (base32
16391 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16392 (build-system python-build-system)
16393 (arguments
16394 '(#:phases
16395 (modify-phases %standard-phases
16396 (replace 'check
16397 (lambda* (#:key tests? #:allow-other-keys)
16398 (if tests?
16399 ;; Other tests require network access.
16400 (invoke "pytest" "tests/test_ipv6.py")
16401 #t))))))
16402 (native-inputs
16403 `(("python-pytest" ,python-pytest)))
16404 (home-page "https://pypi.org/project/rfc6555/")
16405 (synopsis "Python implementation of RFC 6555")
16406 (description
16407 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16408 6555. Provided with a single file and dead-simple API to allow easy vendoring
16409 and integration into other projects.")
16410 (properties `((python2-variant . ,(delay python2-rfc6555))))
16411 (license license:asl2.0))))
16412
16413 (define-public python2-rfc6555
16414 (let ((base (package-with-python2
16415 (strip-python2-variant python-rfc6555))))
16416 (package
16417 (inherit base)
16418 (propagated-inputs
16419 `(("python2-selectors2" ,python2-selectors2))))))
16420
16421 (define-public python-bagit
16422 (package
16423 (name "python-bagit")
16424 (version "1.7.0")
16425 (source
16426 (origin
16427 (method url-fetch)
16428 (uri (pypi-uri "bagit" version))
16429 (sha256
16430 (base32
16431 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16432 (build-system python-build-system)
16433 (native-inputs
16434 `(("python-setuptools-scm" ,python-setuptools-scm)
16435 ("python-coverage" ,python-coverage)
16436 ("python-mock" ,python-mock)))
16437 (home-page "https://libraryofcongress.github.io/bagit-python/")
16438 (synopsis "Create and validate BagIt packages")
16439 (description "Bagit is a Python library and command line utility for working
16440 with BagIt style packages. BagIt is a minimalist packaging format for digital
16441 preservation.")
16442 (license license:cc0)))
16443
16444 (define-public python-prov
16445 (package
16446 (name "python-prov")
16447 (version "2.0.0")
16448 (source
16449 (origin
16450 (method url-fetch)
16451 (uri (pypi-uri "prov" version))
16452 (sha256
16453 (base32
16454 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16455 (build-system python-build-system)
16456 (propagated-inputs
16457 `(("python-dateutil" ,python-dateutil)
16458 ("python-lxml" ,python-lxml)
16459 ("python-networkx" ,python-networkx)
16460 ("python-rdflib" ,python-rdflib)))
16461 (native-inputs
16462 `(("graphviz" ,graphviz)
16463 ("python-pydot" ,python-pydot)))
16464 (home-page "https://github.com/trungdong/prov")
16465 (synopsis
16466 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16467 (description
16468 "This package provides a library for W3C Provenance Data Model supporting
16469 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16470 (license license:expat)))
16471
16472 (define-public python-arcp
16473 (package
16474 (name "python-arcp")
16475 (version "0.2.1")
16476 (source
16477 (origin
16478 (method url-fetch)
16479 (uri (pypi-uri "arcp" version))
16480 (sha256
16481 (base32
16482 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16483 (build-system python-build-system)
16484 (native-inputs
16485 `(("python-pytest" ,python-pytest)))
16486 (home-page "http://arcp.readthedocs.io/")
16487 (synopsis
16488 "Archive and Package URI parser and generator")
16489 (description
16490 "@acronym{arcp, Archive and Package} provides functions for creating
16491 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16492 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16493 consume or reference hypermedia resources bundled inside a file archive or an
16494 application package, as well as to resolve URIs for archive resources within a
16495 programmatic framework. This URI scheme provides mechanisms to generate a
16496 unique base URI to represent the root of the archive, so that relative URI
16497 references in a bundled resource can be resolved within the archive without
16498 having to extract the archive content on the local file system. An arcp URI can
16499 be used for purposes of isolation (e.g. when consuming multiple archives),
16500 security constraints (avoiding \"climb out\" from the archive), or for
16501 externally identiyfing sub-resources referenced by hypermedia formats.")
16502 (license license:asl2.0)))
16503
16504 (define-public python-shellescape
16505 (package
16506 (name "python-shellescape")
16507 (version "3.8.1")
16508 (source
16509 (origin
16510 (method git-fetch)
16511 (uri (git-reference
16512 (url "https://github.com/chrissimpkins/shellescape")
16513 (commit (string-append "v" version))))
16514 (file-name (git-file-name name version))
16515 (sha256
16516 (base32
16517 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16518 (build-system python-build-system)
16519 (arguments
16520 '(#:phases
16521 (modify-phases %standard-phases
16522 (replace 'check
16523 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16524 (when tests?
16525 (add-installed-pythonpath inputs outputs)
16526 (invoke "python" "tests/test_shellescape.py"))
16527 #t)))))
16528 (native-inputs
16529 `(("python-pytest" ,python-pytest)))
16530 (home-page "https://github.com/chrissimpkins/shellescape")
16531 (synopsis
16532 "Shell escape a string to safely use it as a token in a shell command")
16533 (description
16534 "The shellescape Python module defines the @code{shellescape.quote()}
16535 function that returns a shell-escaped version of a Python string. This is a
16536 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16537 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16538 (license license:expat)))
16539
16540 (define-public python-validators
16541 (package
16542 (name "python-validators")
16543 (version "0.14.2")
16544 (source (origin
16545 (method url-fetch)
16546 (uri (pypi-uri "validators" version))
16547 (sha256
16548 (base32
16549 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16550 (build-system python-build-system)
16551 (arguments
16552 '(#:phases (modify-phases %standard-phases
16553 (replace 'check
16554 (lambda _
16555 (invoke "pytest" "-vv"))))))
16556 (propagated-inputs
16557 `(("python-decorator" ,python-decorator)
16558 ("python-six" ,python-six)))
16559 (native-inputs
16560 `(("python-flake8" ,python-flake8)
16561 ("python-isort" ,python-isort)
16562 ("python-pytest" ,python-pytest)))
16563 (home-page "https://github.com/kvesteri/validators")
16564 (synopsis "Data validation library")
16565 (description
16566 "This package contains validators for different things such as email
16567 addresses, IP addresses, URLs, hashes and more. It has been designed to
16568 be easy to use and not require defining a schema or form just to validate
16569 some input.")
16570 (license license:expat)))
16571
16572 (define-public python2-validators
16573 (package-with-python2 python-validators))
16574
16575 (define-public python-validate-email
16576 (package
16577 (name "python-validate-email")
16578 (version "1.3")
16579 (source
16580 (origin
16581 (method url-fetch)
16582 (uri (pypi-uri "validate_email" version))
16583 (sha256
16584 (base32
16585 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16586 (build-system python-build-system)
16587 (home-page "https://github.com/syrusakbary/validate_email")
16588 (synopsis "Verifies if an email address is valid and really exists")
16589 (description "@code{validate_email} can be used to verify if an email
16590 address is valid and really exists.")
16591 (license license:lgpl3+)))
16592
16593 (define-public python2-validate-email
16594 (package-with-python2 python-validate-email))
16595
16596 (define-public python-flex
16597 (package
16598 (name "python-flex")
16599 (version "6.10.0")
16600 (source
16601 (origin
16602 (method url-fetch)
16603 (uri (pypi-uri "flex" version))
16604 (sha256
16605 (base32
16606 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16607 (build-system python-build-system)
16608 (propagated-inputs
16609 `(("python-click" ,python-click)
16610 ("python-iso8601" ,python-iso8601)
16611 ("python-jsonpointer" ,python-jsonpointer)
16612 ("python-pyyaml" ,python-pyyaml)
16613 ("python-requests" ,python-requests)
16614 ("python-rfc3987" ,python-rfc3987)
16615 ("python-six" ,python-six)
16616 ("python-validate-email" ,python-validate-email)))
16617 (home-page "https://github.com/pipermerriam/flex")
16618 (synopsis "Validates Swagger schemata")
16619 (description "@code{flex} can be used to validate Swagger schemata.")
16620 (license license:bsd-3)))
16621
16622 (define-public python2-flex
16623 (package-with-python2 python-flex))
16624
16625 (define-public python-marshmallow
16626 (package
16627 (name "python-marshmallow")
16628 (version "3.9.1")
16629 (source
16630 (origin
16631 (method url-fetch)
16632 (uri (pypi-uri "marshmallow" version))
16633 (sha256
16634 (base32
16635 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16636 (build-system python-build-system)
16637 (propagated-inputs
16638 `(("python-dateutil" ,python-dateutil)
16639 ("python-simplejson" ,python-simplejson)))
16640 (native-inputs
16641 `(("python-pytest" ,python-pytest)
16642 ("python-pytz" ,python-pytz)))
16643 (home-page "https://github.com/marshmallow-code/marshmallow")
16644 (synopsis "Convert complex datatypes to and from native
16645 Python datatypes.")
16646 (description "@code{marshmallow} provides a library for converting
16647 complex datatypes to and from native Python datatypes.")
16648 (license license:expat)))
16649
16650 (define-public python-apispec
16651 (package
16652 (name "python-apispec")
16653 (version "4.0.0")
16654 (source
16655 (origin
16656 (method url-fetch)
16657 (uri (pypi-uri "apispec" version))
16658 (sha256
16659 (base32
16660 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16661 (build-system python-build-system)
16662 (arguments
16663 '(#:phases (modify-phases %standard-phases
16664 (add-after 'unpack 'disable-prance-tests
16665 (lambda _
16666 ;; Disable validation tests since they require the
16667 ;; optional 'prance' library which is not yet in Guix.
16668 (substitute* "tests/test_ext_marshmallow_openapi.py"
16669 (("def test_openapi_tools_validate.*" all)
16670 (string-append "@pytest.mark.xfail\n" all)))))
16671 (replace 'check
16672 (lambda _
16673 (setenv "PYTHONPATH"
16674 (string-append "./build/lib:"
16675 (getenv "PYTHONPATH")))
16676 (invoke "pytest" "-vv"))))))
16677 (propagated-inputs
16678 `(("python-pyyaml" ,python-pyyaml)))
16679 (native-inputs
16680 `(("python-pytest" ,python-pytest)
16681 ("python-marshmallow" ,python-marshmallow)))
16682 (home-page "https://github.com/marshmallow-code/apispec")
16683 (synopsis "Swagger/OpenAPI specification generator")
16684 (description "@code{python-apispec} is a pluggable API specification
16685 generator. It currently supports the OpenAPI specification, formerly known
16686 as Swagger.")
16687 (license license:expat)))
16688
16689 (define-public python-flasgger
16690 (package
16691 (name "python-flasgger")
16692 (version "0.6.3")
16693 (source
16694 (origin
16695 (method git-fetch)
16696 (uri (git-reference
16697 (url "https://github.com/rochacbruno/flasgger")
16698 (commit version)))
16699 (file-name (git-file-name name version))
16700 (sha256
16701 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16702 (build-system python-build-system)
16703 (arguments
16704 `(#:phases
16705 (modify-phases %standard-phases
16706 (replace 'check
16707 (lambda* (#:key inputs outputs #:allow-other-keys)
16708 (substitute* "Makefile"
16709 (("flake8 flasgger --ignore=F403")
16710 "flake8 flasgger --ignore=E731,F403"))
16711 (setenv "PYTHONPATH" (string-append (getcwd)
16712 ":"
16713 (getenv "PYTHONPATH")))
16714 (invoke "py.test"))))))
16715 (propagated-inputs
16716 `(("python-flask" ,python-flask)
16717 ("python-pyyaml" ,python-pyyaml)
16718 ("python-jsonschema" ,python-jsonschema)
16719 ("python-mistune" ,python-mistune)
16720 ("python-six" ,python-six)))
16721 (native-inputs
16722 `(("python-decorator" ,python-decorator)
16723 ("python-flake8" ,python-flake8)
16724 ("python-flask-restful" ,python-flask-restful)
16725 ("python-flex" ,python-flex)
16726 ("python-pytest" ,python-pytest)
16727 ("python-pytest-cov" ,python-pytest-cov)
16728 ("python-marshmallow" ,python-marshmallow)
16729 ("python-apispec" ,python-apispec)))
16730 (home-page "https://github.com/rochacbruno/flasgger/")
16731 (synopsis "Extract Swagger specs from your Flask project")
16732 (description "@code{python-flasgger} allows extracting Swagger specs
16733 from your Flask project. It is a fork of Flask-Swagger.")
16734 (license license:expat)))
16735
16736 (define-public python-swagger-spec-validator
16737 (package
16738 (name "python-swagger-spec-validator")
16739 (version "2.4.3")
16740 (source
16741 (origin
16742 (method url-fetch)
16743 (uri (pypi-uri "swagger-spec-validator" version))
16744 (sha256
16745 (base32
16746 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16747 (build-system python-build-system)
16748 (propagated-inputs
16749 `(("python-jsonschema" ,python-jsonschema)
16750 ("python-pyyaml" ,python-pyyaml)
16751 ("python-six" ,python-six)))
16752 (home-page
16753 "https://github.com/Yelp/swagger_spec_validator")
16754 (synopsis "Validation of Swagger specifications")
16755 (description "@code{swagger_spec_validator} provides a library for
16756 validating Swagger API specifications.")
16757 (license license:asl2.0)))
16758
16759 (define-public python2-swagger-spec-validator
16760 (package-with-python2 python-swagger-spec-validator))
16761
16762 (define-public python-apache-libcloud
16763 (package
16764 (name "python-apache-libcloud")
16765 (version "3.1.0")
16766 (source
16767 (origin
16768 (method url-fetch)
16769 (uri (pypi-uri "apache-libcloud" version))
16770 (sha256
16771 (base32
16772 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16773 (build-system python-build-system)
16774 (arguments
16775 `(#:phases
16776 (modify-phases %standard-phases
16777 (add-after 'unpack 'patch-ssh
16778 (lambda* (#:key inputs #:allow-other-keys)
16779 (substitute* "libcloud/compute/ssh.py"
16780 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16781 "/bin/ssh" "'")))
16782 #t))
16783 (add-after 'unpack 'patch-tests
16784 (lambda _
16785 (substitute* "libcloud/test/compute/test_ssh_client.py"
16786 (("class ShellOutSSHClientTests")
16787 "@unittest.skip(\"Guix container doesn't have ssh service\")
16788 class ShellOutSSHClientTests"))
16789 #t))
16790 (add-before 'check 'copy-secret
16791 (lambda _
16792 (copy-file "libcloud/test/secrets.py-dist"
16793 "libcloud/test/secrets.py")
16794 #t)))))
16795 (inputs
16796 `(("openssh" ,openssh)))
16797 (propagated-inputs
16798 `(("python-paramiko" ,python-paramiko)
16799 ("python-requests" ,python-requests)))
16800 (native-inputs
16801 `(("python-lockfile" ,python-lockfile)
16802 ("python-mock" ,python-mock)
16803 ("python-pytest" ,python-pytest)
16804 ("python-pytest-runner" ,python-pytest-runner)
16805 ("python-requests-mock" ,python-requests-mock)))
16806 (home-page "https://libcloud.apache.org/")
16807 (synopsis "Unified Cloud API")
16808 (description "@code{libcloud} is a Python library for interacting with
16809 many of the popular cloud service providers using a unified API.")
16810 (license license:asl2.0)))
16811
16812 (define-public python2-apache-libcloud
16813 (package-with-python2 python-apache-libcloud))
16814
16815 (define-public python-smmap
16816 (package
16817 (name "python-smmap")
16818 (version "3.0.1")
16819 (source
16820 (origin
16821 (method url-fetch)
16822 (uri (pypi-uri "smmap" version))
16823 (sha256
16824 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16825 (build-system python-build-system)
16826 (native-inputs
16827 `(("python-nosexcover" ,python-nosexcover)))
16828 (home-page "https://github.com/Byron/smmap")
16829 (synopsis "Python sliding window memory map manager")
16830 (description "@code{smmap} is a pure Python implementation of a sliding
16831 window memory map manager.")
16832 (license license:bsd-3)))
16833
16834 (define-public python-smmap2
16835 (deprecated-package "python-smmap2" python-smmap))
16836
16837 (define-public python2-smmap
16838 (package-with-python2 python-smmap))
16839
16840 (define-public python2-smmap2
16841 (deprecated-package "python2-smmap2" python2-smmap))
16842
16843 (define-public python-regex
16844 (package
16845 (name "python-regex")
16846 (version "2020.6.8")
16847 (source (origin
16848 (method url-fetch)
16849 (uri (pypi-uri "regex" version))
16850 (sha256
16851 (base32
16852 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16853 (build-system python-build-system)
16854 (arguments
16855 '(#:phases
16856 (modify-phases %standard-phases
16857 (replace 'check
16858 (lambda* (#:key inputs outputs #:allow-other-keys)
16859 (add-installed-pythonpath inputs outputs)
16860 (invoke "python" "-c"
16861 "from regex.test_regex import test_main; test_main()"))))))
16862 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16863 (synopsis "Alternative regular expression module")
16864 (description "This regular expression implementation is backwards-
16865 compatible with the standard @code{re} module, but offers additional
16866 functionality like full case-folding for case-insensitive matches in Unicode.")
16867 (license license:psfl)))
16868
16869 (define-public python2-regex
16870 (package-with-python2 python-regex))
16871
16872 (define-public python-pyopengl
16873 (package
16874 (name "python-pyopengl")
16875 (version "3.1.5")
16876 (source
16877 (origin
16878 (method url-fetch)
16879 (uri (pypi-uri "PyOpenGL" version))
16880 (sha256
16881 (base32
16882 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16883 (build-system python-build-system)
16884 (inputs
16885 `(("mesa" ,mesa)
16886 ("freeglut" ,freeglut)
16887 ("glu" ,glu)))
16888 (arguments
16889 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16890 ;attribute 'OSMesa'
16891 #:phases
16892 (modify-phases %standard-phases
16893 (add-before 'build 'fix-paths
16894 (lambda* (#:key inputs outputs #:allow-other-keys)
16895 (substitute* '("OpenGL/platform/ctypesloader.py")
16896 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16897 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16898 (("'GL'")
16899 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16900 (("'GLU'")
16901 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16902 (("'glut',")
16903 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16904 (("'GLESv1_CM'")
16905 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16906 (("'GLESv2'")
16907 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16908 ;; Not providing libgle. It seems to be very old.
16909 #t)))))
16910 (home-page "http://pyopengl.sourceforge.net")
16911 (synopsis "Standard OpenGL bindings for Python")
16912 (description
16913 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16914 related APIs. The binding is created using the standard @code{ctypes}
16915 library.")
16916 (license license:bsd-3)))
16917
16918 (define-public python-pyopengl-accelerate
16919 (package
16920 (inherit python-pyopengl)
16921 (name "python-pyopengl-accelerate")
16922 (version "3.1.5")
16923 (source
16924 (origin
16925 (method url-fetch)
16926 (uri (pypi-uri "PyOpenGL-accelerate" version))
16927 (sha256
16928 (base32
16929 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16930 (inputs
16931 `(("mesa" ,mesa)
16932 ("python-numpy" ,python-numpy))) ; for cython module
16933 ; numpy_formathandler, thus not propagated
16934 (arguments
16935 `(#:tests? #f
16936 #:phases
16937 (modify-phases %standard-phases
16938 (delete 'fix-paths))))
16939 (synopsis "Acceleration code for PyOpenGL")
16940 (description
16941 "This is the Cython-coded accelerator module for PyOpenGL.")))
16942
16943 (define-public python-rencode
16944 (package
16945 (name "python-rencode")
16946 (version "1.0.5")
16947 (source
16948 (origin
16949 (method url-fetch)
16950 (uri (pypi-uri "rencode" version))
16951 (sha256
16952 (base32
16953 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16954 (build-system python-build-system)
16955 (arguments
16956 `(#:phases
16957 (modify-phases %standard-phases
16958 (add-before 'check 'delete-bogus-test
16959 ;; This test requires /home/aresch/Downloads, which is not provided by
16960 ;; the build environment.
16961 (lambda _
16962 (delete-file "rencode/t.py")
16963 #t)))))
16964 (native-inputs `(("pkg-config" ,pkg-config)
16965 ("python-cython" ,python-cython)))
16966 (home-page "https://github.com/aresch/rencode")
16967 (synopsis "Serialization of heterogeneous data structures")
16968 (description
16969 "The @code{rencode} module is a data structure serialization library,
16970 similar to @code{bencode} from the BitTorrent project. For complex,
16971 heterogeneous data structures with many small elements, r-encoding stake up
16972 significantly less space than b-encodings. This version of rencode is a
16973 complete rewrite in Cython to attempt to increase the performance over the
16974 pure Python module.")
16975 (license license:bsd-3)))
16976
16977 (define-public python2-rencode
16978 (package-with-python2 python-rencode))
16979
16980 (define-public python-xenon
16981 (package
16982 (name "python-xenon")
16983 (version "0.7.0")
16984 (source
16985 (origin
16986 (method url-fetch)
16987 (uri (pypi-uri "xenon" version))
16988 (sha256
16989 (base32
16990 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16991 (build-system python-build-system)
16992 (native-inputs
16993 `(("python-pyyaml" ,python-pyyaml)
16994 ("python-radon" ,python-radon)
16995 ("python-requests" ,python-requests)
16996 ("python-flake8" ,python-flake8)
16997 ("python-tox" ,python-tox)))
16998 (arguments
16999 `(#:tests? #f ;test suite not shipped with the PyPI archive
17000 #:phases
17001 (modify-phases %standard-phases
17002 (add-before 'build 'patch-test-requirements
17003 (lambda _
17004 ;; Remove httpretty dependency for tests.
17005 (substitute* "setup.py"
17006 (("httpretty") ""))
17007 #t)))))
17008 (home-page "https://xenon.readthedocs.org/")
17009 (synopsis "Monitor code metrics for Python on your CI server")
17010 (description
17011 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17012 Ideally, @code{xenon} is run every time code is committed. Through command
17013 line options, various thresholds can be set for the complexity of code. It
17014 will fail (i.e. it will exit with a non-zero exit code) when any of these
17015 requirements is not met.")
17016 (license license:expat)))
17017
17018 (define-public python2-xenon
17019 (package-with-python2 python-xenon))
17020
17021 (define-public python-pysocks
17022 (package
17023 (name "python-pysocks")
17024 (version "1.7.1")
17025 (source
17026 (origin
17027 (method url-fetch)
17028 (uri (pypi-uri "PySocks" version))
17029 (sha256
17030 (base32
17031 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17032 (build-system python-build-system)
17033 (arguments `(#:tests? #f))
17034 (home-page "https://github.com/Anorov/PySocks")
17035 (synopsis "SOCKS client module")
17036 (description "@code{pysocks} is an updated and semi-actively maintained
17037 version of @code{SocksiPy} with bug fixes and extra features.")
17038 (license license:bsd-3)))
17039
17040 (define-public python2-pysocks
17041 (package-with-python2 python-pysocks))
17042
17043 (define-public python-pydiff
17044 (package
17045 (name "python-pydiff")
17046 (version "0.2")
17047 (source
17048 (origin
17049 (method url-fetch)
17050 (uri (pypi-uri "pydiff" version))
17051 (sha256
17052 (base32
17053 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17054 (build-system python-build-system)
17055 (home-page "https://github.com/myint/pydiff")
17056 (synopsis "Library to diff two Python files at the bytecode level")
17057 (description
17058 "@code{pydiff} makes it easy to look for actual code changes while
17059 ignoring formatting changes.")
17060 (license license:expat)))
17061
17062 (define-public python2-pydiff
17063 (package-with-python2 python-pydiff))
17064
17065 (define-public python-pydub
17066 (package
17067 (name "python-pydub")
17068 (version "0.24.1")
17069 (source
17070 (origin
17071 (method url-fetch)
17072 (uri (pypi-uri "pydub" version))
17073 (sha256
17074 (base32
17075 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17076 (build-system python-build-system)
17077 (arguments
17078 `(#:phases
17079 (modify-phases %standard-phases
17080 (add-after 'unpack 'fix-ffmpeg-path
17081 (lambda* (#:key inputs #:allow-other-keys)
17082 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17083 (substitute* '("pydub/utils.py")
17084 (("return \"ffmpeg\"")
17085 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17086 (("return \"ffplay\"")
17087 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17088 (("return \"ffprobe\"")
17089 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17090 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17091 #t))))))
17092 (home-page "https://pydub.com")
17093 (inputs
17094 `(("ffmpeg" ,ffmpeg)))
17095 (propagated-inputs
17096 `(("python-scipy" ,python-scipy)))
17097 (synopsis "Manipulate audio with a high level interface in Python")
17098 (description
17099 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17100 @code{ffmpeg} to open various audio formats.")
17101 (license license:expat))) ; MIT license
17102
17103 (define-public python-tqdm
17104 (package
17105 (name "python-tqdm")
17106 (version "4.43.0")
17107 (source
17108 (origin
17109 (method url-fetch)
17110 (uri (pypi-uri "tqdm" version))
17111 (sha256
17112 (base32
17113 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17114 (build-system python-build-system)
17115 (arguments
17116 '(#:phases (modify-phases %standard-phases
17117 (replace 'check
17118 (lambda* (#:key inputs outputs #:allow-other-keys)
17119 (add-installed-pythonpath inputs outputs)
17120 ;; This invokation is taken from tox.ini.
17121 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17122 "-d" "-v" "tqdm/"))))))
17123 (native-inputs
17124 `(("python-nose" ,python-nose)))
17125 (home-page "https://github.com/tqdm/tqdm")
17126 (synopsis "Fast, extensible progress meter")
17127 (description
17128 "Make loops show a progress bar on the console by just wrapping any
17129 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17130 design and layout.")
17131 (license (list license:mpl2.0 license:expat))))
17132
17133 (define-public python2-tqdm
17134 (package-with-python2 python-tqdm))
17135
17136 (define-public python-pkginfo
17137 (package
17138 (name "python-pkginfo")
17139 (version "1.4.2")
17140 (source
17141 (origin
17142 (method url-fetch)
17143 (uri (pypi-uri "pkginfo" version))
17144 (sha256
17145 (base32
17146 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
17147 (build-system python-build-system)
17148 (arguments
17149 ;; The tests are broken upstream.
17150 '(#:tests? #f))
17151 (home-page
17152 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17153 (synopsis
17154 "Query metadatdata from sdists, bdists, and installed packages")
17155 (description
17156 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17157 source distriubtion (an sdist) or a binary distribution (e.g., created by
17158 running bdist_egg). It can also query the EGG-INFO directory of an installed
17159 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17160 created by running @code{python setup.py develop}).")
17161 (license license:expat)))
17162
17163 (define-public python2-pkginfo
17164 (package-with-python2 python-pkginfo))
17165
17166 (define-public python-twine
17167 (package
17168 (name "python-twine")
17169 (version "1.15.0")
17170 (source
17171 (origin
17172 (method url-fetch)
17173 (uri (pypi-uri "twine" version))
17174 (sha256
17175 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17176 (build-system python-build-system)
17177 (propagated-inputs
17178 `(("python-tqdm" ,python-tqdm)
17179 ("python-packaging" ,python-packaging)
17180 ("python-pkginfo" ,python-pkginfo)
17181 ("python-readme-renderer" ,python-readme-renderer)
17182 ("python-requests" ,python-requests)
17183 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17184 (home-page "https://github.com/pypa/twine")
17185 (synopsis "Collection of utilities for interacting with PyPI")
17186 (description
17187 "@code{twine} currently supports registering projects and uploading
17188 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17189 their files and supports any packaging format (including wheels).")
17190 (license license:asl2.0)))
17191
17192 (define-public python2-twine
17193 (package-with-python2 python-twine))
17194
17195 (define-public python-linecache2
17196 (package
17197 (name "python-linecache2")
17198 (version "1.0.0")
17199 (source
17200 (origin
17201 (method url-fetch)
17202 (uri (pypi-uri "linecache2" version))
17203 (sha256
17204 (base32
17205 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17206 (build-system python-build-system)
17207 (arguments
17208 `(;; The tests depend on unittest2, and our version is a bit too old.
17209 #:tests? #f))
17210 (native-inputs
17211 `(("python-pbr" ,python-pbr-minimal)))
17212 (home-page
17213 "https://github.com/testing-cabal/linecache2")
17214 (synopsis "Backports of the linecache module")
17215 (description
17216 "The linecache module allows one to get any line from any file, while
17217 attempting to optimize internally, using a cache, the common case where many
17218 lines are read from a single file.")
17219 (license license:psfl)))
17220
17221 (define-public python2-linecache2
17222 (package-with-python2 python-linecache2))
17223
17224 (define-public python-traceback2
17225 (package
17226 (name "python-traceback2")
17227 (version "1.4.0")
17228 (source
17229 (origin
17230 (method url-fetch)
17231 (uri (pypi-uri "traceback2" version))
17232 (sha256
17233 (base32
17234 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17235 (build-system python-build-system)
17236 (arguments
17237 `(;; python-traceback2 and python-unittest2 depend on one another.
17238 #:tests? #f))
17239 (native-inputs
17240 `(("python-pbr" ,python-pbr-minimal)))
17241 (propagated-inputs
17242 `(("python-linecache2" ,python-linecache2)))
17243 (home-page
17244 "https://github.com/testing-cabal/traceback2")
17245 (synopsis "Backports of the traceback module")
17246 (description
17247 "This module provides a standard interface to extract, format and print
17248 stack traces of Python programs. It exactly mimics the behavior of the Python
17249 interpreter when it prints a stack trace.")
17250 (license license:psfl)))
17251
17252 (define-public python2-traceback2
17253 (package-with-python2 python-traceback2))
17254
17255 (define-public python-ratelimiter
17256 (package
17257 (name "python-ratelimiter")
17258 (version "1.2.0")
17259 (source
17260 (origin
17261 (method url-fetch)
17262 (uri (pypi-uri "ratelimiter" version))
17263 (sha256
17264 (base32
17265 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17266 (build-system python-build-system)
17267 (arguments
17268 '(#:tests? #f)) ; There are no tests in the pypi archive.
17269 (home-page "https://github.com/RazerM/ratelimiter")
17270 (synopsis "Simple rate limiting object")
17271 (description
17272 "The @code{ratelimiter} module ensures that an operation will not be
17273 executed more than a given number of times during a given period.")
17274 (license license:asl2.0)))
17275
17276 (define-public python2-ratelimiter
17277 (package-with-python2 python-ratelimiter))
17278
17279 (define-public python-dukpy
17280 (package
17281 (name "python-dukpy")
17282 (version "0.3")
17283 (source
17284 (origin
17285 (method git-fetch)
17286 (uri (git-reference
17287 (url "https://github.com/kovidgoyal/dukpy")
17288 (commit (string-append "v" version))))
17289 (file-name (git-file-name name version))
17290 (sha256
17291 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17292 (build-system python-build-system)
17293 (home-page "https://github.com/kovidgoyal/dukpy")
17294 (synopsis "Run JavaScript in python")
17295 (description
17296 "dukpy is a JavaScript runtime environment for Python using the duktape
17297 embeddable JavaScript engine.")
17298 ;; Dukpy is licensed under MIT like the embedded duktape library,
17299 ;; with 'errors.c' as GPL3.
17300 (license (list license:expat license:gpl3))))
17301
17302 (define-public python2-dukpy
17303 (package-with-python2 python-dukpy))
17304
17305 (define-public python-jsonrpclib-pelix
17306 (package
17307 (name "python-jsonrpclib-pelix")
17308 (version "0.3.2")
17309 (source
17310 (origin
17311 (method url-fetch)
17312 (uri (pypi-uri "jsonrpclib-pelix" version))
17313 (sha256
17314 (base32
17315 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17316 (build-system python-build-system)
17317 (arguments
17318 `(#:tests? #f)) ; no tests in PyPI tarball
17319 (home-page "https://github.com/tcalmant/jsonrpclib/")
17320 (synopsis "JSON-RPC 2.0 client library for Python")
17321 (description
17322 "This library implements the JSON-RPC v2.0
17323 specification (backwards-compatible) as a client library for Python. This
17324 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17325 services.")
17326 (license license:asl2.0)))
17327
17328 (define-public python2-jsonrpclib-pelix
17329 (package-with-python2 python-jsonrpclib-pelix))
17330
17331 (define-public python-setuptools-scm-git-archive
17332 (package
17333 (name "python-setuptools-scm-git-archive")
17334 (version "1.0")
17335 (source
17336 (origin
17337 (method url-fetch)
17338 (uri (pypi-uri "setuptools_scm_git_archive" version))
17339 (sha256
17340 (base32
17341 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17342 (build-system python-build-system)
17343 (native-inputs
17344 `(("python-pytest" ,python-pytest)))
17345 (propagated-inputs
17346 `(("python-setuptools-scm" ,python-setuptools-scm)))
17347 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17348 (synopsis "Setuptools_scm plugin for git archives")
17349 (description
17350 "The setuptools_scm_git_archive package is a plugin to
17351 setuptools_scm, which supports obtaining versions from git archives that
17352 belong to tagged versions.")
17353 (license license:expat)))
17354
17355 (define-public python2-setuptools-scm-git-archive
17356 (package-with-python2 python-setuptools-scm-git-archive))
17357
17358 (define-public python-setuptools-git
17359 (package
17360 (name "python-setuptools-git")
17361 (version "1.2")
17362 (source
17363 (origin
17364 (method url-fetch)
17365 (uri (pypi-uri "setuptools-git" version))
17366 (sha256
17367 (base32
17368 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17369 (build-system python-build-system)
17370 (arguments
17371 `(#:phases
17372 (modify-phases %standard-phases
17373 ;; This is needed for tests.
17374 (add-after 'unpack 'configure-git
17375 (lambda _
17376 (setenv "HOME" "/tmp")
17377 (invoke "git" "config" "--global" "user.email" "guix")
17378 (invoke "git" "config" "--global" "user.name" "guix")
17379 #t)))))
17380 (native-inputs
17381 `(("git" ,git-minimal)))
17382 (home-page "https://github.com/msabramo/setuptools-git")
17383 (synopsis "Setuptools revision control system plugin for Git")
17384 (description
17385 "This package provides a plugin for Setuptools for revision control with
17386 Git.")
17387 (license license:bsd-3)))
17388
17389 (define-public python-pyclipper
17390 (package
17391 (name "python-pyclipper")
17392 (version "1.1.0.post3")
17393 (source
17394 (origin
17395 (method url-fetch)
17396 (uri (pypi-uri "pyclipper" version ".zip"))
17397 (sha256
17398 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17399 (modules '((guix build utils)))
17400 (snippet
17401 '(begin
17402 ;; This file is generated by Cython.
17403 (delete-file "pyclipper/pyclipper.cpp") #t))))
17404 (build-system python-build-system)
17405 (arguments
17406 `(#:phases
17407 (modify-phases %standard-phases
17408 (add-before 'build 'cythonize-sources
17409 (lambda _
17410 (with-directory-excursion "pyclipper"
17411 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17412 (propagated-inputs
17413 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17414 (native-inputs
17415 `(("python-cython" ,python-cython)
17416 ("python-pytest" ,python-pytest)
17417 ("python-pytest-runner" ,python-pytest-runner)
17418 ("python-unittest2" ,python-unittest2)
17419 ("unzip" ,unzip)))
17420 (home-page "https://github.com/greginvm/pyclipper")
17421 (synopsis "Wrapper for Angus Johnson's Clipper library")
17422 (description
17423 "Pyclipper is a Cython wrapper for the C++ translation of the
17424 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17425 (license license:expat)))
17426
17427 (define-public python2-pyclipper
17428 (package-with-python2 python-pyclipper))
17429
17430 (define-public python2-booleanoperations
17431 (package
17432 (name "python2-booleanoperations")
17433 (version "0.7.1")
17434 (source
17435 (origin
17436 (method url-fetch)
17437 (uri (pypi-uri "booleanOperations" version ".zip"))
17438 (sha256
17439 (base32
17440 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17441 (build-system python-build-system)
17442 (arguments
17443 `(#:python ,python-2))
17444 (native-inputs
17445 `(("unzip" ,unzip)
17446 ("python2-pytest" ,python2-pytest)
17447 ("python2-pytest-runner" ,python2-pytest-runner)))
17448 (propagated-inputs
17449 `(("python-fonttools" ,python2-fonttools)
17450 ("python-pyclipper" ,python2-pyclipper)
17451 ("python-ufolib" ,python2-ufolib)))
17452 (home-page "https://github.com/typemytype/booleanOperations")
17453 (synopsis "Boolean operations on paths")
17454 (description
17455 "BooleanOperations provides a Python library that enables
17456 boolean operations on paths.")
17457 (license license:expat)))
17458
17459 (define-public python-tempdir
17460 (package
17461 (name "python-tempdir")
17462 (version "0.7.1")
17463 (source
17464 (origin
17465 (method url-fetch)
17466 (uri (pypi-uri "tempdir" version))
17467 (sha256
17468 (base32
17469 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17470 (build-system python-build-system)
17471 (home-page "https://pypi.org/project/tempdir/")
17472 (arguments
17473 ;; the package has no tests
17474 '(#:tests? #f))
17475 (synopsis "Python library for managing temporary directories")
17476 (description
17477 "This library manages temporary directories that are automatically
17478 deleted with all their contents when they are no longer needed. It is
17479 particularly convenient for use in tests.")
17480 (license license:expat)))
17481
17482 (define-public python2-tempdir
17483 (package-with-python2 python-tempdir))
17484
17485 (define-public python-activepapers
17486 (package
17487 (name "python-activepapers")
17488 (version "0.2.2")
17489 (source
17490 (origin
17491 (method url-fetch)
17492 (uri (pypi-uri "ActivePapers.Py" version))
17493 (sha256
17494 (base32
17495 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17496 (build-system python-build-system)
17497 (arguments
17498 `(#:modules ((ice-9 ftw)
17499 (srfi srfi-1)
17500 (guix build utils)
17501 (guix build python-build-system))
17502
17503 #:phases
17504 (modify-phases %standard-phases
17505 (add-after 'unpack 'delete-python2-code
17506 (lambda _
17507 (for-each delete-file
17508 '("lib/activepapers/builtins2.py"
17509 "lib/activepapers/standardlib2.py"
17510 "lib/activepapers/utility2.py"))))
17511 (replace 'check
17512 (lambda _
17513 ;; Deactivate the test cases that download files
17514 (setenv "NO_NETWORK_ACCESS" "1")
17515 ;; For some strange reason, some tests fail if nosetests runs all
17516 ;; test modules in a single execution. They pass if each test
17517 ;; module is run individually.
17518 (for-each (lambda (filename)
17519 (invoke "nosetests"
17520 (string-append "tests/" filename)))
17521 (scandir "tests"
17522 (lambda (filename)
17523 (string-suffix? ".py" filename)))))))))
17524 (native-inputs
17525 `(("python-tempdir" ,python-tempdir)
17526 ("python-nose" ,python-nose)))
17527 (propagated-inputs
17528 `(("python-h5py" ,python-h5py)))
17529 (home-page "https://www.activepapers.org/")
17530 (synopsis "Executable papers for scientific computing")
17531 (description
17532 "ActivePapers is a tool for working with executable papers, which
17533 combine data, code, and documentation in single-file packages,
17534 suitable for publication as supplementary material or on repositories
17535 such as figshare or Zenodo.")
17536 (properties `((python2-variant . ,(delay python2-activepapers))))
17537 (license license:bsd-3)))
17538
17539 (define-public python2-activepapers
17540 (let ((base (package-with-python2
17541 (strip-python2-variant python-activepapers))))
17542 (package
17543 (inherit base)
17544 (arguments
17545 (substitute-keyword-arguments (package-arguments base)
17546 ((#:phases phases)
17547 `(modify-phases ,phases
17548 (delete 'delete-python2-code)
17549 (add-after 'unpack 'delete-python3-code
17550 (lambda _
17551 (for-each delete-file
17552 '("lib/activepapers/builtins3.py"
17553 "lib/activepapers/standardlib3.py"
17554 "lib/activepapers/utility3.py")))))))))))
17555
17556 (define-public python-semver
17557 (package
17558 (name "python-semver")
17559 (version "2.9.0")
17560 (source
17561 (origin
17562 (method url-fetch)
17563 (uri (pypi-uri "semver" version))
17564 (sha256
17565 (base32
17566 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17567 (build-system python-build-system)
17568 (arguments
17569 `(#:phases (modify-phases %standard-phases
17570 (replace 'check
17571 (lambda _
17572 (delete-file "setup.cfg")
17573 (invoke "py.test"))))))
17574 (native-inputs
17575 `(("python-pytest" ,python-pytest)))
17576 (home-page "https://github.com/k-bx/python-semver")
17577 (synopsis "Python helper for Semantic Versioning")
17578 (description "This package provides a Python library for
17579 @url{Semantic Versioning, http://semver.org/}.")
17580 (license license:bsd-3)))
17581
17582 (define-public python2-semver
17583 (package-with-python2 python-semver))
17584
17585 (define-public python-pyro4
17586 (package
17587 (name "python-pyro4")
17588 (version "4.77")
17589 (source
17590 (origin
17591 (method url-fetch)
17592 (uri (pypi-uri "Pyro4" version))
17593 (sha256
17594 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17595 (build-system python-build-system)
17596 (arguments
17597 '(#:tests? #f)) ;FIXME: Some tests require network access.
17598 (native-inputs
17599 `(("python-cloudpickle" ,python-cloudpickle)
17600 ("python-dill" ,python-dill)
17601 ("python-msgpack" ,python-msgpack)))
17602 (propagated-inputs
17603 `(("python-serpent" ,python-serpent)))
17604 (home-page "https://pyro4.readthedocs.io")
17605 (synopsis "Distributed object middleware for Python")
17606 (description
17607 "Pyro enables you to build applications in which objects can talk to each
17608 other over the network. You can just use normal Python method calls to call
17609 objects on other machines, also known as remote procedure calls (RPC).")
17610 (license license:expat)))
17611
17612 (define-public python2-pyro
17613 (package
17614 (name "python2-pyro")
17615 (version "3.16")
17616 (source
17617 (origin
17618 (method url-fetch)
17619 (uri (pypi-uri "Pyro" version))
17620 (file-name (string-append "Pyro-" version ".tar.gz"))
17621 (sha256
17622 (base32
17623 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17624 (build-system python-build-system)
17625 (arguments
17626 ;; Pyro is not compatible with Python 3
17627 `(#:python ,python-2
17628 ;; Pyro has no test cases for automatic execution
17629 #:tests? #f))
17630 (home-page "https://pythonhosted.org/Pyro/")
17631 (synopsis "Distributed object manager for Python")
17632 (description "Pyro is a Distributed Object Technology system
17633 written in Python that is designed to be easy to use. It resembles
17634 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17635 which is a system and language independent Distributed Object Technology
17636 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17637 longer maintained. New projects should use Pyro4 instead, which
17638 is the new Pyro version that is actively developed.")
17639 (license license:expat)))
17640
17641 (define-public python2-scientific
17642 (package
17643 (name "python2-scientific")
17644 (version "2.9.4")
17645 (source
17646 (origin
17647 (method git-fetch)
17648 (uri (git-reference
17649 (url "https://github.com/khinsen/ScientificPython")
17650 (commit (string-append "rel" version))))
17651 (file-name (git-file-name name version))
17652 (sha256
17653 (base32
17654 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17655 (build-system python-build-system)
17656 (inputs
17657 `(("netcdf" ,netcdf)))
17658 (propagated-inputs
17659 `(("python-numpy" ,python2-numpy-1.8)
17660 ("python-pyro" ,python2-pyro)))
17661 (arguments
17662 ;; ScientificPython is not compatible with Python 3
17663 `(#:python ,python-2
17664 #:tests? #f ; No test suite
17665 #:phases
17666 (modify-phases %standard-phases
17667 (replace 'build
17668 (lambda* (#:key inputs #:allow-other-keys)
17669 (invoke "python" "setup.py" "build"
17670 (string-append "--netcdf_prefix="
17671 (assoc-ref inputs "netcdf"))))))))
17672 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17673 (synopsis "Python modules for scientific computing")
17674 (description "ScientificPython is a collection of Python modules that are
17675 useful for scientific computing. Most modules are rather general (Geometry,
17676 physical units, automatic derivatives, ...) whereas others are more
17677 domain-specific (e.g. netCDF and PDB support). The library is currently
17678 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17679 (license license:cecill-c)))
17680
17681 (define-public python2-mmtk
17682 (package
17683 (name "python2-mmtk")
17684 (version "2.7.12")
17685 (source
17686 (origin
17687 (method git-fetch)
17688 (uri (git-reference
17689 (url "https://github.com/khinsen/MMTK")
17690 (commit (string-append "rel" version))))
17691 (file-name (git-file-name name version))
17692 (sha256
17693 (base32
17694 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17695 (build-system python-build-system)
17696 (native-inputs
17697 `(("netcdf" ,netcdf)))
17698 (propagated-inputs
17699 `(("python-scientific" ,python2-scientific)
17700 ("python-tkinter" ,python-2 "tk")))
17701 (arguments
17702 `(#:python ,python-2
17703 #:tests? #f
17704 #:phases
17705 (modify-phases %standard-phases
17706 (add-before 'build 'includes-from-scientific
17707 (lambda* (#:key inputs #:allow-other-keys)
17708 (mkdir-p "Include/Scientific")
17709 (copy-recursively
17710 (string-append
17711 (assoc-ref inputs "python-scientific")
17712 "/include/python2.7/Scientific")
17713 "Include/Scientific"))))))
17714 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17715 (synopsis "Python library for molecular simulation")
17716 (description "MMTK is a library for molecular simulations with an emphasis
17717 on biomolecules. It provides widely used methods such as Molecular Dynamics
17718 and normal mode analysis, but also basic routines for implementing new methods
17719 for simulation and analysis. The library is currently not actively maintained
17720 and works only with Python 2 and NumPy < 1.9.")
17721 (license license:cecill-c)))
17722
17723 (define-public python-phonenumbers
17724 (package
17725 (name "python-phonenumbers")
17726 (version "8.9.1")
17727 (source
17728 (origin
17729 (method url-fetch)
17730 (uri (pypi-uri "phonenumbers" version))
17731 (sha256
17732 (base32
17733 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17734 (build-system python-build-system)
17735 (home-page
17736 "https://github.com/daviddrysdale/python-phonenumbers")
17737 (synopsis
17738 "Python library for dealing with international phone numbers")
17739 (description
17740 "This package provides a Python port of Google's libphonenumber library.")
17741 (license license:asl2.0)))
17742
17743 (define-public python2-phonenumbers
17744 (package-with-python2 python-phonenumbers))
17745
17746 (define-public python-send2trash
17747 (package
17748 (name "python-send2trash")
17749 (version "1.5.0")
17750 (source
17751 (origin (method git-fetch)
17752 ;; Source tarball on PyPI doesn't include tests.
17753 (uri (git-reference
17754 (url "https://github.com/hsoft/send2trash")
17755 (commit version)))
17756 (file-name (git-file-name name version))
17757 (sha256
17758 (base32
17759 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17760 (build-system python-build-system)
17761 (arguments
17762 '(#:phases
17763 (modify-phases %standard-phases
17764 (add-before 'check 'pre-check
17765 (lambda _
17766 (mkdir-p "/tmp/foo")
17767 (setenv "HOME" "/tmp/foo")
17768 #t)))))
17769 (home-page "https://github.com/hsoft/send2trash")
17770 (synopsis "Send files to the user's @file{~/Trash} directory")
17771 (description "This package provides a Python library to send files to the
17772 user's @file{~/Trash} directory.")
17773 (properties `((python2-variant . ,(delay python2-send2trash))))
17774 (license license:bsd-3)))
17775
17776 (define-public python2-send2trash
17777 (package
17778 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17779 (arguments
17780 (substitute-keyword-arguments (package-arguments python-send2trash)
17781 ((#:phases phases)
17782 `(modify-phases ,phases
17783 (add-before 'check 'setenv
17784 (lambda _
17785 (setenv "PYTHONPATH"
17786 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17787 #t))))))))
17788
17789 (define-public python-pyfavicon
17790 (package
17791 (name "python-pyfavicon")
17792 (version "0.1.1")
17793 (source
17794 (origin
17795 (method url-fetch)
17796 (uri (pypi-uri "pyfavicon" version))
17797 (sha256
17798 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17799 (build-system python-build-system)
17800 (arguments
17801 ;; There are no tests in the PyPI tarball and the tests from the
17802 ;; repository require online data.
17803 '(#:tests? #f))
17804 (propagated-inputs
17805 `(("python-aiohttp" ,python-aiohttp)
17806 ("python-beautifulsoup4" ,python-beautifulsoup4)
17807 ("python-pillow" ,python-pillow)))
17808 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17809 (synopsis "Async favicon fetcher")
17810 (description
17811 "@code{pyfavicon} is an async favicon fetcher.")
17812 (license license:expat)))
17813
17814 (define-public python-yapf
17815 (package
17816 (name "python-yapf")
17817 (version "0.29.0")
17818 (source
17819 (origin
17820 (method url-fetch)
17821 (uri (pypi-uri "yapf" version))
17822 (sha256
17823 (base32
17824 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17825 (build-system python-build-system)
17826 (home-page "https://github.com/google/yapf")
17827 (synopsis "Formatter for Python code")
17828 (description "YAPF is a formatter for Python code. It's based off of
17829 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17830 takes the code and reformats it to the best formatting that conforms to the
17831 style guide, even if the original code didn't violate the style guide.")
17832 (license license:asl2.0)))
17833
17834 (define-public python2-yapf
17835 (package-with-python2 python-yapf))
17836
17837 (define-public python-yq
17838 (package
17839 (name "python-yq")
17840 (version "2.11.1")
17841 (source
17842 (origin
17843 (method url-fetch)
17844 (uri (pypi-uri "yq" version))
17845 (sha256
17846 (base32
17847 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17848 (build-system python-build-system)
17849 (arguments
17850 '(#:phases
17851 (modify-phases %standard-phases
17852 (add-after 'unpack 'patch
17853 (lambda* (#:key inputs #:allow-other-keys)
17854 (substitute* "yq/__init__.py"
17855 (("Popen\\(\\[\"jq")
17856 (string-append
17857 "Popen([\""
17858 (assoc-ref inputs "jq")
17859 "/bin/jq")))
17860 #t)))))
17861 (inputs
17862 `(("python-argcomplete" ,python-argcomplete)
17863 ("python-pyyaml" ,python-pyyaml)
17864 ("python-xmltodict" ,python-xmltodict)
17865 ("jq" ,jq)))
17866 (native-inputs
17867 `(("python-coverage" ,python-coverage)
17868 ("python-flake8" ,python-flake8)
17869 ("python-wheel" ,python-wheel)))
17870 (home-page "https://github.com/kislyuk/yq")
17871 (synopsis "Command-line YAML/XML processor")
17872 (description
17873 "This package provides @command{yq} and @command{xq} for processing YAML
17874 and XML respectively. The processing is done through @{jq}, @command{jq}
17875 filters can be used to process the data as it passes through.")
17876 (license license:asl2.0)))
17877
17878 (define-public python-gyp
17879 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17880 (revision "0"))
17881 (package
17882 (name "python-gyp")
17883 ;; Google does not release versions,
17884 ;; based on second most recent commit date.
17885 (version (git-version "0.0.0" revision commit))
17886 (source
17887 (origin
17888 ;; Google does not release tarballs,
17889 ;; git checkout is needed.
17890 (method git-fetch)
17891 (uri (git-reference
17892 (url "https://chromium.googlesource.com/external/gyp")
17893 (commit commit)))
17894 (file-name (git-file-name name version))
17895 (sha256
17896 (base32
17897 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17898 (build-system python-build-system)
17899 (home-page "https://gyp.gsrc.io/")
17900 (synopsis "GYP is a Meta-Build system")
17901 (description
17902 "GYP builds build systems for large, cross platform applications.
17903 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17904 files, and Makefiles.")
17905 (license license:bsd-3))))
17906
17907 (define-public python2-gyp
17908 (package-with-python2 python-gyp))
17909
17910 (define-public python-whatever
17911 (package
17912 (name "python-whatever")
17913 (version "0.6")
17914 (source
17915 (origin
17916 (method git-fetch)
17917 (uri (git-reference
17918 (url "https://github.com/Suor/whatever")
17919 (commit version)))
17920 (file-name (git-file-name name version))
17921 (sha256
17922 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17923 (build-system python-build-system)
17924 (arguments
17925 `(#:phases
17926 (modify-phases %standard-phases
17927 (replace 'check
17928 (lambda _
17929 (invoke "py.test"))))))
17930 (native-inputs
17931 `(("python-pytest" ,python-pytest)))
17932 (home-page "https://github.com/Suor/whatever")
17933 (synopsis "Make anonymous functions by partial application of operators")
17934 (description "@code{whatever} provides an easy way to make anonymous
17935 functions by partial application of operators.")
17936 (license license:bsd-3)))
17937
17938 (define-public python2-whatever
17939 (package-with-python2 python-whatever))
17940
17941 (define-public python-funcy
17942 (package
17943 (name "python-funcy")
17944 (version "1.11")
17945 (source
17946 (origin
17947 (method git-fetch)
17948 (uri (git-reference
17949 (url "https://github.com/Suor/funcy")
17950 (commit version)))
17951 (sha256
17952 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17953 (file-name (git-file-name name version))))
17954 (build-system python-build-system)
17955 (arguments
17956 `(#:phases
17957 (modify-phases %standard-phases
17958 (replace 'check
17959 (lambda _
17960 (invoke "py.test"))))))
17961 (native-inputs
17962 `(("python-pytest" ,python-pytest)
17963 ("python-whatever" ,python-whatever)))
17964 (home-page "https://github.com/Suor/funcy")
17965 (synopsis "Functional tools")
17966 (description "@code{funcy} is a library that provides functional tools.
17967 Examples are:
17968 @enumerate
17969 @item merge - Merges collections of the same type
17970 @item walk - Type-preserving map
17971 @item select - Selects a part of a collection
17972 @item take - Takes the first n items of a collection
17973 @item first - Takes the first item of a collection
17974 @item remove - Predicated-removes items of a collection
17975 @item concat - Concatenates two collections
17976 @item flatten - Flattens a collection with subcollections
17977 @item distinct - Returns only distinct items
17978 @item split - Predicated-splits a collection
17979 @item split_at - Splits a collection at a given item
17980 @item group_by - Groups items by group
17981 @item pairwise - Pairs off adjacent items
17982 @item partial - Partially-applies a function
17983 @item curry - Curries a function
17984 @item compose - Composes functions
17985 @item complement - Complements a predicate
17986 @item all_fn - \"all\" with predicate
17987 @end enumerate")
17988 (license license:bsd-3)))
17989
17990 (define-public python2-funcy
17991 (package-with-python2 python-funcy))
17992
17993 (define-public python-isoweek
17994 (package
17995 (name "python-isoweek")
17996 (version "1.3.3")
17997 (source
17998 (origin
17999 (method url-fetch)
18000 (uri (pypi-uri "isoweek" version))
18001 (sha256
18002 (base32
18003 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18004 (build-system python-build-system)
18005 (home-page "https://github.com/gisle/isoweek")
18006 (synopsis "Objects representing a week")
18007 (description "The @code{isoweek} module provide the class Week that
18008 implements the week definition of ISO 8601. This standard also defines
18009 a notation for identifying weeks; yyyyWww (where the W is a literal).
18010 Week instances stringify to this form.")
18011 (license license:bsd-3)))
18012
18013 (define-public python2-isoweek
18014 (package-with-python2 python-isoweek))
18015
18016 (define-public python-pyzbar
18017 (package
18018 (name "python-pyzbar")
18019 (version "0.1.8")
18020 (source
18021 (origin
18022 ;; There's no source tarball on PyPI.
18023 (method git-fetch)
18024 (uri (git-reference
18025 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18026 (commit (string-append "v" version))))
18027 (file-name (git-file-name name version))
18028 (sha256
18029 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18030 (build-system python-build-system)
18031 (arguments
18032 `(#:phases
18033 (modify-phases %standard-phases
18034 (add-after 'unpack 'remove-failing-test
18035 (lambda _
18036 ;; This tests if find_library was called once, but we remove
18037 ;; the call in the stage below to make the library find libzbar.
18038 (delete-file "pyzbar/tests/test_zbar_library.py")
18039 #t))
18040 (add-before 'build 'set-library-file-name
18041 (lambda* (#:key inputs #:allow-other-keys)
18042 (let ((libzbar (assoc-ref inputs "zbar")))
18043 (substitute* "pyzbar/zbar_library.py"
18044 (("find_library\\('zbar'\\)")
18045 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18046 #t))))))
18047 (native-inputs
18048 `(("pkg-config" ,pkg-config)
18049 ("python-numpy" ,python-numpy)
18050 ("python-pillow" ,python-pillow)))
18051 (inputs
18052 `(("zbar" ,zbar)))
18053 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18054 (synopsis "Read one-dimensional barcodes and QR codes")
18055 (description
18056 "Read one-dimensional barcodes and QR codes using the zbar library.
18057
18058 Features:
18059
18060 @itemize
18061 @item Pure python
18062 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18063 @item Decodes locations of barcodes
18064 @item No dependencies, other than the zbar library itself
18065 @end itemize")
18066 (license license:expat)))
18067
18068 (define-public python-tokenize-rt
18069 (package
18070 (name "python-tokenize-rt")
18071 (version "2.0.1")
18072 (source
18073 (origin
18074 (method url-fetch)
18075 (uri (pypi-uri "tokenize-rt" version))
18076 (sha256
18077 (base32
18078 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18079 (build-system python-build-system)
18080 (home-page "https://github.com/asottile/tokenize-rt")
18081 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18082 (description
18083 "This Python library is a wrapper around @code{tokenize} from the Python
18084 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18085 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18086 and @code{tokens_to_src} to roundtrip.")
18087 (license license:expat)))
18088
18089 (define-public python-future-fstrings
18090 (package
18091 (name "python-future-fstrings")
18092 (version "0.4.1")
18093 (source
18094 (origin
18095 (method url-fetch)
18096 (uri (pypi-uri "future_fstrings" version))
18097 (sha256
18098 (base32
18099 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18100 (build-system python-build-system)
18101 (propagated-inputs
18102 `(("python-tokenize-rt" ,python-tokenize-rt)))
18103 (home-page "https://github.com/asottile/future-fstrings")
18104 (synopsis "Backport of fstrings to Python < 3.6")
18105 (description
18106 "This package provides a UTF-8 compatible encoding
18107 @code{future_fstrings}, which performs source manipulation. It decodes the
18108 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18109 @code{f} strings.")
18110 (license license:expat)))
18111
18112 (define-public python-typed-ast
18113 (package
18114 (name "python-typed-ast")
18115 (version "1.4.0")
18116 (source
18117 (origin
18118 (method git-fetch)
18119 (uri (git-reference
18120 (url "https://github.com/python/typed_ast")
18121 (commit version)))
18122 (sha256
18123 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18124 (file-name (git-file-name name version))))
18125 (build-system python-build-system)
18126 (arguments
18127 `(#:modules ((guix build utils)
18128 (guix build python-build-system)
18129 (ice-9 ftw)
18130 (srfi srfi-1)
18131 (srfi srfi-26))
18132 #:phases
18133 (modify-phases %standard-phases
18134 (replace 'check
18135 (lambda _
18136 (let ((cwd (getcwd)))
18137 (setenv "PYTHONPATH"
18138 (string-append cwd "/build/"
18139 (find (cut string-prefix? "lib" <>)
18140 (scandir (string-append cwd "/build")))
18141 ":"
18142 (getenv "PYTHONPATH"))))
18143 (invoke "pytest")
18144 #t)))))
18145 (native-inputs `(("python-pytest" ,python-pytest)))
18146 (home-page "https://github.com/python/typed_ast")
18147 (synopsis "Fork of Python @code{ast} modules with type comment support")
18148 (description "This package provides a parser similar to the standard
18149 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18150 include PEP 484 type comments and are independent of the version of Python
18151 under which they are run. The @code{typed_ast} parsers produce the standard
18152 Python AST (plus type comments), and are both fast and correct, as they are
18153 based on the CPython 2.7 and 3.7 parsers.")
18154 ;; See the file "LICENSE" for the details.
18155 (license (list license:psfl
18156 license:asl2.0
18157 license:expat)))) ;ast27/Parser/spark.py
18158
18159 (define-public python-typing
18160 (package
18161 (name "python-typing")
18162 (version "3.7.4.3")
18163 (source
18164 (origin
18165 (method url-fetch)
18166 (uri (pypi-uri "typing" version))
18167 (sha256
18168 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18169 (build-system python-build-system)
18170 (home-page "https://docs.python.org/3/library/typing.html")
18171 (synopsis "Type hints for Python")
18172 (description "This is a backport of the standard library @code{typing}
18173 module to Python versions older than 3.5. Typing defines a standard notation
18174 for Python function and variable type annotations. The notation can be used
18175 for documenting code in a concise, standard format, and it has been designed
18176 to also be used by static and runtime type checkers, static analyzers, IDEs
18177 and other tools.")
18178 (license license:psfl)))
18179
18180 (define-public python2-typing
18181 (package-with-python2 python-typing))
18182
18183 (define-public python-typing-extensions
18184 (package
18185 (name "python-typing-extensions")
18186 (version "3.7.4.3")
18187 (source
18188 (origin
18189 (method url-fetch)
18190 (uri (pypi-uri "typing_extensions" version))
18191 (sha256
18192 (base32
18193 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18194 (build-system python-build-system)
18195 (home-page
18196 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18197 (synopsis "Experimental type hints for Python")
18198 (description
18199 "The typing_extensions module contains additional @code{typing} hints not
18200 yet present in the of the @code{typing} standard library.
18201 Included are implementations of:
18202 @enumerate
18203 @item ClassVar
18204 @item ContextManager
18205 @item Counter
18206 @item DefaultDict
18207 @item Deque
18208 @item NewType
18209 @item NoReturn
18210 @item overload
18211 @item Protocol
18212 @item runtime
18213 @item Text
18214 @item Type
18215 @item TYPE_CHECKING
18216 @item AsyncGenerator
18217 @end enumerate\n")
18218 (license license:psfl)))
18219
18220 (define-public bpython
18221 (package
18222 (name "bpython")
18223 (version "0.18")
18224 (source
18225 (origin
18226 (method url-fetch)
18227 (uri (pypi-uri "bpython" version))
18228 (sha256
18229 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18230 (build-system python-build-system)
18231 (arguments
18232 `(#:phases
18233 (modify-phases %standard-phases
18234 (add-after 'unpack 'remove-failing-test
18235 (lambda _
18236 ;; Remove failing test. FIXME: make it pass
18237 (delete-file "bpython/test/test_args.py")
18238 #t))
18239 (add-after 'wrap 'add-aliases
18240 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18241 (lambda* (#:key outputs #:allow-other-keys)
18242 (let ((out (assoc-ref outputs "out")))
18243 (for-each
18244 (lambda (old new)
18245 (symlink old (string-append out "/bin/" new)))
18246 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18247 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18248 #t)))))
18249 (propagated-inputs
18250 `(("python-pygments" ,python-pygments)
18251 ("python-requests" ,python-requests)
18252 ("python-babel" ,python-babel) ; optional, for internationalization
18253 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18254 ("python-greenlet" ,python-greenlet)
18255 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18256 ("python-six" ,python-six)))
18257 (native-inputs
18258 `(("python-sphinx" ,python-sphinx)
18259 ("python-mock" ,python-mock)))
18260 (home-page "https://bpython-interpreter.org/")
18261 (synopsis "Fancy interface to the Python interpreter")
18262 (description "Bpython is a fancy interface to the Python
18263 interpreter. bpython's main features are
18264
18265 @enumerate
18266 @item in-line syntax highlighting,
18267 @item readline-like autocomplete with suggestions displayed as you type,
18268 @item expected parameter list for any Python function,
18269 @item \"rewind\" function to pop the last line of code from memory and
18270 re-evaluate,
18271 @item send the code you've entered off to a pastebin,
18272 @item save the code you've entered to a file, and
18273 @item auto-indentation.
18274 @end enumerate")
18275 (license license:expat)))
18276
18277 (define-public bpython2
18278 (let ((base (package-with-python2
18279 (strip-python2-variant bpython))))
18280 (package (inherit base)
18281 (name "bpython2")
18282 (arguments
18283 `(#:python ,python-2
18284 #:phases
18285 (modify-phases %standard-phases
18286 (add-after 'unpack 'remove-failing-test
18287 (lambda _
18288 ;; Remove failing test. FIXME: make it pass
18289 (delete-file "bpython/test/test_args.py")
18290 ;; Disable failing test-cases (renaming inhibits they are
18291 ;; discovered)
18292 (substitute* "bpython/test/test_curtsies_repl.py"
18293 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
18294 (string-append a "xxx_off_" b))
18295 (("^(\\s*def )(test_complex\\W)" _ a b)
18296 (string-append a "xxx_off_" b)))
18297 #t))
18298 (add-before 'build 'rename-scripts
18299 ;; rename the scripts to bypthon2, bpdb2, etc.
18300 (lambda _
18301 (substitute* "setup.py"
18302 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
18303 (string-append name "2" rest "\n"))
18304 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
18305 (string-append name "2" (or sub "") rest "\n")))
18306 #t))))))))
18307
18308 (define-public python-pyinotify
18309 (package
18310 (name "python-pyinotify")
18311 (version "0.9.6")
18312 (source (origin
18313 (method url-fetch)
18314 (uri (pypi-uri "pyinotify" version))
18315 (sha256
18316 (base32
18317 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18318 (build-system python-build-system)
18319 (arguments `(#:tests? #f)) ;no tests
18320 (home-page "https://github.com/seb-m/pyinotify")
18321 (synopsis "Python library for monitoring inotify events")
18322 (description
18323 "@code{pyinotify} provides a Python interface for monitoring
18324 file system events on Linux.")
18325 (license license:expat)))
18326
18327 (define-public python2-pyinotify
18328 (package-with-python2 python-pyinotify))
18329
18330 ;; Ada parser uses this version.
18331 (define-public python2-quex-0.67.3
18332 (package
18333 (name "python2-quex")
18334 (version "0.67.3")
18335 (source
18336 (origin
18337 (method url-fetch)
18338 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18339 (version-major+minor version)
18340 "/quex-" version ".zip"))
18341 (sha256
18342 (base32
18343 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18344 (build-system python-build-system)
18345 (native-inputs
18346 `(("unzip" ,unzip)))
18347 (arguments
18348 `(#:python ,python-2
18349 #:tests? #f
18350 #:phases
18351 (modify-phases %standard-phases
18352 (delete 'configure)
18353 (delete 'build)
18354 (replace 'install
18355 (lambda* (#:key outputs #:allow-other-keys)
18356 (let* ((out (assoc-ref outputs "out"))
18357 (share/quex (string-append out "/share/quex"))
18358 (bin (string-append out "/bin")))
18359 (copy-recursively "." share/quex)
18360 (mkdir-p bin)
18361 (symlink (string-append share/quex "/quex-exe.py")
18362 (string-append bin "/quex"))
18363 #t))))))
18364 (native-search-paths
18365 (list (search-path-specification
18366 (variable "QUEX_PATH")
18367 (files '("share/quex")))))
18368 (home-page "http://quex.sourceforge.net/")
18369 (synopsis "Lexical analyzer generator in Python")
18370 (description "@code{quex} is a lexical analyzer generator in Python.")
18371 (license license:lgpl2.1+))) ; Non-military
18372
18373 (define-public python2-quex
18374 (package (inherit python2-quex-0.67.3)
18375 (name "python2-quex")
18376 (version "0.68.1")
18377 (source
18378 (origin
18379 (method url-fetch)
18380 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18381 (sha256
18382 (base32
18383 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18384 (file-name (string-append name "-" version ".tar.gz"))))))
18385
18386 (define-public python-more-itertools
18387 (package
18388 (name "python-more-itertools")
18389 (version "8.2.0")
18390 (source
18391 (origin
18392 (method url-fetch)
18393 (uri (pypi-uri "more-itertools" version))
18394 (sha256
18395 (base32
18396 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18397 (build-system python-build-system)
18398 (home-page "https://github.com/erikrose/more-itertools")
18399 (synopsis "More routines for operating on iterables, beyond itertools")
18400 (description "Python's built-in @code{itertools} module implements a
18401 number of iterator building blocks inspired by constructs from APL, Haskell,
18402 and SML. @code{more-itertools} includes additional building blocks for
18403 working with iterables.")
18404 (properties `((python2-variant . ,(delay python2-more-itertools))))
18405 (license license:expat)))
18406
18407 ;; The 5.x series are the last versions supporting Python 2.7.
18408 (define-public python2-more-itertools
18409 (package
18410 (inherit python-more-itertools)
18411 (name "python2-more-itertools")
18412 (version "5.0.0")
18413 (source (origin
18414 (method url-fetch)
18415 (uri (pypi-uri "more-itertools" version))
18416 (sha256
18417 (base32
18418 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18419 (arguments
18420 `(#:python ,python-2))
18421 (propagated-inputs
18422 `(("python2-six" ,python2-six-bootstrap)))))
18423
18424 (define-public python-latexcodec
18425 (package
18426 (name "python-latexcodec")
18427 (version "1.0.7")
18428 (source
18429 (origin
18430 (method url-fetch)
18431 (uri (pypi-uri "latexcodec" version))
18432 (sha256
18433 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18434 (build-system python-build-system)
18435 (inputs
18436 `(("python-six" ,python-six)))
18437 (home-page "https://readthedocs.org/projects/latexcodec/")
18438 (synopsis "Work with LaTeX code in Python")
18439 (description "Lexer and codec to work with LaTeX code in Python.")
18440 (license license:expat)))
18441
18442 (define-public python-pybtex
18443 (package
18444 (name "python-pybtex")
18445 (version "0.22.2")
18446 (source
18447 (origin
18448 (method url-fetch)
18449 (uri (pypi-uri "pybtex" version))
18450 (sha256
18451 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18452 (build-system python-build-system)
18453 (native-inputs
18454 `(("python-nose" ,python-nose)))
18455 (inputs
18456 `(("python-latexcodec" ,python-latexcodec)
18457 ("python-pyyaml" ,python-pyyaml)
18458 ("python-six" ,python-six)))
18459 (arguments
18460 `(#:test-target "nosetests"))
18461 (home-page "https://pybtex.org/")
18462 (synopsis "BibTeX-compatible bibliography processor")
18463 (description "Pybtex is a BibTeX-compatible bibliography processor written
18464 in Python. You can simply type pybtex instead of bibtex.")
18465 (license license:expat)))
18466
18467 (define-public python-onetimepass
18468 (package
18469 (name "python-onetimepass")
18470 (version "1.0.1")
18471 (source
18472 (origin
18473 (method url-fetch)
18474 (uri (pypi-uri "onetimepass" version))
18475 (sha256
18476 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18477 (build-system python-build-system)
18478 (propagated-inputs `(("python-six" ,python-six)))
18479 (home-page "https://github.com/tadeck/onetimepass/")
18480 (synopsis "One-time password library")
18481 (description "Python one-time password library for HMAC-based (HOTP) and
18482 time-based (TOTP) passwords.")
18483 (license license:expat)))
18484
18485 (define-public python-parso
18486 (package
18487 (name "python-parso")
18488 (version "0.7.1")
18489 (source
18490 (origin
18491 (method url-fetch)
18492 (uri (pypi-uri "parso" version))
18493 (sha256
18494 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18495 (native-inputs
18496 `(("python-pytest" ,python-pytest)))
18497 (build-system python-build-system)
18498 (arguments
18499 `(#:phases (modify-phases %standard-phases
18500 (replace 'check
18501 (lambda _ (invoke "pytest" "-vv"))))))
18502 (home-page "https://github.com/davidhalter/parso")
18503 (synopsis "Python Parser")
18504 (description "Parso is a Python parser that supports error recovery and
18505 round-trip parsing for different Python versions (in multiple Python versions).
18506 Parso is also able to list multiple syntax errors in your Python file.")
18507 (license license:expat)))
18508
18509 (define-public python2-parso
18510 (package-with-python2 python-parso))
18511
18512 (define-public python-async-generator
18513 (package
18514 (name "python-async-generator")
18515 (version "1.10")
18516 (source
18517 (origin
18518 (method url-fetch)
18519 (uri (pypi-uri "async_generator" version))
18520 (sha256
18521 (base32
18522 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18523 (build-system python-build-system)
18524 (native-inputs
18525 `(("python-pytest" ,python-pytest)))
18526 (home-page "https://github.com/python-trio/async_generator")
18527 (synopsis "Async generators and context managers for Python 3.5+")
18528 (description "@code{async_generator} back-ports Python 3.6's native async
18529 generators and Python 3.7's context managers into Python 3.5.")
18530 ;; Dual licensed.
18531 (license (list license:expat license:asl2.0))))
18532
18533 (define-public python-async-timeout
18534 (package
18535 (name "python-async-timeout")
18536 (version "3.0.1")
18537 (source
18538 (origin
18539 (method url-fetch)
18540 (uri (pypi-uri "async-timeout" version))
18541 (sha256
18542 (base32
18543 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18544 (build-system python-build-system)
18545 (home-page "https://github.com/aio-libs/async_timeout/")
18546 (synopsis "Timeout context manager for asyncio programs")
18547 (description "@code{async-timeout} provides a timeout timeout context
18548 manager compatible with @code{asyncio}.")
18549 (license license:asl2.0)))
18550
18551 (define-public python-glob2
18552 (package
18553 (name "python-glob2")
18554 (version "0.7")
18555 (source
18556 (origin
18557 (method git-fetch)
18558 (uri (git-reference
18559 (url "https://github.com/miracle2k/python-glob2")
18560 (commit (string-append "v" version))))
18561 (file-name (git-file-name name version))
18562 (sha256
18563 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18564 (build-system python-build-system)
18565 (home-page "https://github.com/miracle2k/python-glob2/")
18566 (synopsis "Extended Version of the python buildin glob module")
18567 (description "This is an extended version of the Python
18568 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18569 adds:
18570
18571 @itemize
18572 @item The ability to capture the text matched by glob patterns, and return
18573 those matches alongside the file names.
18574 @item A recursive @code{**} globbing syntax, akin for example to the
18575 @code{globstar} option of Bash.
18576 @item The ability to replace the file system functions used, in order to glob
18577 on virtual file systems.
18578 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18579 @end itemize
18580
18581 Glob2 currently based on the glob code from Python 3.3.1.")
18582 (license license:bsd-2)))
18583
18584 (define-public python2-glob2
18585 (package-with-python2 python-glob2))
18586
18587 (define-public python-gipc
18588 (package
18589 (name "python-gipc")
18590 (version "0.6.0")
18591 (source
18592 (origin
18593 (method url-fetch)
18594 (uri (pypi-uri "gipc" version ".zip"))
18595 (sha256
18596 (base32
18597 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18598 (build-system python-build-system)
18599 (native-inputs
18600 `(("unzip" ,unzip)))
18601 (propagated-inputs
18602 `(("python-gevent" ,python-gevent)))
18603 (home-page "https://gehrcke.de/gipc/")
18604 (synopsis "Child process management in the context of gevent")
18605 (description "Usage of Python's multiprocessing package in a
18606 gevent-powered application may raise problems. With @code{gipc},
18607 process-based child processes can safely be created anywhere within a
18608 gevent-powered application.")
18609 (license license:expat)))
18610
18611 (define-public python2-gipc
18612 (package-with-python2 python-gipc))
18613
18614 (define-public python-beautifultable
18615 (package
18616 (name "python-beautifultable")
18617 (version "1.0.0")
18618 (source
18619 (origin
18620 (method url-fetch)
18621 (uri (pypi-uri "beautifultable" version))
18622 (sha256
18623 (base32
18624 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18625 (build-system python-build-system)
18626 (propagated-inputs
18627 `(("python-wcwidth" ,python-wcwidth)))
18628 (arguments
18629 `(#:phases
18630 (modify-phases %standard-phases
18631 (add-after 'unpack 'patch-setup.py
18632 (lambda _
18633 (substitute* "setup.py"
18634 (("setup\\(")
18635 "setup(\n test_suite=\"test\",")))))))
18636 (home-page "https://github.com/pri22296/beautifultable")
18637 (synopsis "Print ASCII tables for terminals")
18638 (description "@code{python-beautifultable} provides a class for easily
18639 printing tabular data in a visually appealing ASCII format to a terminal.
18640
18641 Features include, but are not limited to:
18642 @itemize
18643 @item Full customization of the look and feel of the table
18644 @item Row and column accessors.
18645 @item Full support for colors using ANSI sequences or any library.
18646 @item Plenty of predefined styles and option to create custom ones.
18647 @item Support for Unicode characters.
18648 @item Supports streaming table when data is slow to retrieve.
18649 @end itemize")
18650 (license license:expat)))
18651
18652 (define-public python-globber
18653 (package
18654 (name "python-globber")
18655 (version "0.2.1")
18656 (source
18657 (origin
18658 (method git-fetch)
18659 (uri (git-reference
18660 (url "https://github.com/asharov/globber")
18661 (commit version)))
18662 (file-name (git-file-name name version))
18663 (sha256
18664 (base32
18665 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18666 (build-system python-build-system)
18667 (home-page "https://github.com/asharov/globber")
18668 (synopsis "Library for string matching with glob patterns")
18669 (description
18670 "Globber is a Python library for matching file names against glob patterns.
18671 In contrast to other glob-matching libraries, it matches arbitrary strings and
18672 doesn't require the matched names to be existing files. In addition, it
18673 supports the globstar @code{**} operator to match an arbitrary number of
18674 path components.")
18675 (license license:asl2.0)))
18676
18677 (define-public python-git-hammer
18678 (package
18679 (name "python-git-hammer")
18680 (version "0.3.1")
18681 (source
18682 (origin
18683 (method git-fetch)
18684 (uri (git-reference
18685 (url "https://github.com/asharov/git-hammer")
18686 (commit version)))
18687 (file-name (git-file-name name version))
18688 (sha256
18689 (base32
18690 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18691 (build-system python-build-system)
18692 (arguments
18693 `(#:phases
18694 (modify-phases %standard-phases
18695 (add-after 'unpack 'patch-setup.py
18696 (lambda _
18697 (substitute* "setup.py"
18698 (("setup\\(")
18699 "setup(\n test_suite=\"test\",")))))))
18700 (propagated-inputs
18701 `(("python-beautifultable" ,python-beautifultable)
18702 ("python-dateutil" ,python-dateutil)
18703 ("python-gitpython" ,python-gitpython)
18704 ("python-globber" ,python-globber)
18705 ("python-matplotlib" ,python-matplotlib)
18706 ("python-sqlalchemy" ,python-sqlalchemy)
18707 ("python-sqlalchemy-utils"
18708 ,python-sqlalchemy-utils)))
18709 (home-page "https://github.com/asharov/git-hammer")
18710 (synopsis "Provide statistics for git repositories")
18711 (description
18712 "Git Hammer is a statistics tool for projects in git repositories.
18713 Its major feature is tracking the number of lines authored by each person for every
18714 commit, but it also includes some other useful statistics.")
18715 (license license:asl2.0)))
18716
18717 (define-public python-fusepy
18718 (package
18719 (name "python-fusepy")
18720 (version "2.0.4")
18721 (source
18722 (origin
18723 (method url-fetch)
18724 (uri (pypi-uri "fusepy" version))
18725 (sha256
18726 (base32
18727 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18728 (build-system python-build-system)
18729 (arguments
18730 `(#:phases
18731 (modify-phases %standard-phases
18732 (add-before 'build 'set-library-file-name
18733 (lambda* (#:key inputs #:allow-other-keys)
18734 (let ((fuse (assoc-ref inputs "fuse")))
18735 (substitute* "fuse.py"
18736 (("find_library\\('fuse'\\)")
18737 (string-append "'" fuse "/lib/libfuse.so'")))
18738 #t))))))
18739 (propagated-inputs
18740 `(("fuse" ,fuse)))
18741 (home-page "https://github.com/fusepy/fusepy")
18742 (synopsis "Simple ctypes bindings for FUSE")
18743 (description "Python module that provides a simple interface to FUSE and
18744 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18745 (license license:isc)))
18746
18747 (define-public python2-fusepy
18748 (package-with-python2 python-fusepy))
18749
18750 (define-public python-fusepyng
18751 (package
18752 (name "python-fusepyng")
18753 (version "1.0.7")
18754 (source
18755 (origin
18756 (method url-fetch)
18757 (uri (pypi-uri "fusepyng" version))
18758 (sha256
18759 (base32
18760 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18761 (build-system python-build-system)
18762 (arguments
18763 '(#:phases
18764 (modify-phases %standard-phases
18765 (add-after 'unpack 'set-libfuse-path
18766 (lambda* (#:key inputs #:allow-other-keys)
18767 (let ((fuse (assoc-ref inputs "fuse")))
18768 (substitute* "fusepyng.py"
18769 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18770 (string-append "\"" fuse "/lib/libfuse.so\""))))
18771 #t)))))
18772 (inputs
18773 `(("fuse" ,fuse)))
18774 (propagated-inputs
18775 `(("python-paramiko" ,python-paramiko)))
18776 (home-page "https://github.com/rianhunter/fusepyng")
18777 (synopsis "Simple ctypes bindings for FUSE")
18778 (description "@code{fusepyng} is a Python module that provides a simple
18779 interface to FUSE on various operating systems. It's just one file and is
18780 implemented using @code{ctypes}.")
18781 (license license:isc)))
18782
18783 (define-public python2-gdrivefs
18784 (package
18785 (name "python2-gdrivefs")
18786 (version "0.14.9")
18787 (source
18788 (origin
18789 (method url-fetch)
18790 (uri (pypi-uri "gdrivefs" version))
18791 (sha256
18792 (base32
18793 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18794 (build-system python-build-system)
18795 (arguments
18796 `(#:python ,python-2
18797 #:phases
18798 (modify-phases %standard-phases
18799 (add-before 'build 'patch-setup-py
18800 (lambda _
18801 ;; Update requirements from dependency==version
18802 ;; to dependency>=version
18803 (substitute* "gdrivefs/resources/requirements.txt"
18804 (("==") ">="))
18805 #t)))))
18806 (native-inputs
18807 `(("python2-gipc" ,python2-gipc)
18808 ("python2-gevent" ,python2-gevent)
18809 ("python2-greenlet" ,python2-greenlet)
18810 ("python2-httplib2" ,python2-httplib2)
18811 ("python2-uritemplate" ,python2-uritemplate)
18812 ("python2-oauth2client" ,python2-oauth2client)
18813 ("python2-six" ,python2-six)))
18814 (propagated-inputs
18815 `(("python2-dateutil" ,python2-dateutil)
18816 ("python2-fusepy" ,python2-fusepy)
18817 ("python2-google-api-client" ,python2-google-api-client)))
18818 (home-page "https://github.com/dsoprea/GDriveFS")
18819 (synopsis "Mount Google Drive as a local file system")
18820 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18821 under Python 2.7.")
18822 (license license:gpl2)))
18823
18824 (define-public python-userspacefs
18825 (package
18826 (name "python-userspacefs")
18827 (version "1.0.13")
18828 (source
18829 (origin
18830 (method url-fetch)
18831 (uri (pypi-uri "userspacefs" version))
18832 (sha256
18833 (base32
18834 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18835 (build-system python-build-system)
18836 (propagated-inputs
18837 `(("python-fusepyng" ,python-fusepyng)))
18838 (home-page "https://github.com/rianhunter/userspacefs")
18839 (synopsis "User-space file systems for Python")
18840 (description
18841 "@code{userspacefs} is a library that allows you to easily write
18842 user-space file systems in Python.")
18843 (license license:gpl3+)))
18844
18845 (define-public pybind11
18846 (package
18847 (name "pybind11")
18848 (version "2.4.3")
18849 (source (origin
18850 (method git-fetch)
18851 (uri (git-reference
18852 (url "https://github.com/pybind/pybind11")
18853 (commit (string-append "v" version))))
18854 (sha256
18855 (base32
18856 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18857 (file-name (git-file-name name version))))
18858 (build-system cmake-build-system)
18859 (native-inputs
18860 `(("python" ,python-wrapper)
18861
18862 ;; The following dependencies are used for tests.
18863 ("python-pytest" ,python-pytest)
18864 ("catch" ,catch-framework2-1)
18865 ("eigen" ,eigen)))
18866 (arguments
18867 `(#:configure-flags
18868 (list (string-append "-DCATCH_INCLUDE_DIR="
18869 (assoc-ref %build-inputs "catch")
18870 "/include/catch"))
18871
18872 #:phases (modify-phases %standard-phases
18873 (add-after 'install 'install-python
18874 (lambda* (#:key outputs #:allow-other-keys)
18875 (let ((out (assoc-ref outputs "out")))
18876 (with-directory-excursion "../source"
18877 (setenv "PYBIND11_USE_CMAKE" "yes")
18878 (invoke "python" "setup.py" "install"
18879 "--single-version-externally-managed"
18880 "--root=/"
18881 (string-append "--prefix=" out)))))))
18882
18883 #:test-target "check"))
18884 (home-page "https://github.com/pybind/pybind11/")
18885 (synopsis "Seamless operability between C++11 and Python")
18886 (description
18887 "@code{pybind11} is a lightweight header-only library that exposes C++
18888 types in Python and vice versa, mainly to create Python bindings of existing
18889 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18890 library: to minimize boilerplate code in traditional extension modules by
18891 inferring type information using compile-time introspection.")
18892 (license license:bsd-3)))
18893
18894 (define-public python-fasteners
18895 (package
18896 (name "python-fasteners")
18897 (version "0.15")
18898 (source
18899 (origin
18900 (method url-fetch)
18901 (uri (pypi-uri "fasteners" version))
18902 (sha256
18903 (base32
18904 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18905 (build-system python-build-system)
18906 (propagated-inputs
18907 `(("python-monotonic" ,python-monotonic)
18908 ("python-six" ,python-six)))
18909 (native-inputs
18910 `(("python-testtools" ,python-testtools)))
18911 (home-page "https://github.com/harlowja/fasteners")
18912 (synopsis "Python package that provides useful locks")
18913 (description
18914 "This package provides a Python program that provides following locks:
18915
18916 @itemize
18917 @item Locking decorator
18918 @item Reader-writer locks
18919 @item Inter-process locks
18920 @item Generic helpers
18921 @end itemize\n")
18922 (properties `((python2-variant . ,(delay python2-fasteners))))
18923 (license license:asl2.0)))
18924
18925 (define-public python2-fasteners
18926 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18927 (package
18928 (inherit base)
18929 (propagated-inputs
18930 `(("python2-futures" ,python2-futures)
18931 ,@(package-propagated-inputs base))))))
18932
18933 (define-public python-requests-file
18934 (package
18935 (name "python-requests-file")
18936 (version "1.4.3")
18937 (source
18938 (origin
18939 (method url-fetch)
18940 (uri (pypi-uri "requests-file" version))
18941 (sha256
18942 (base32
18943 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18944 (build-system python-build-system)
18945 (propagated-inputs
18946 `(("python-requests" ,python-requests)
18947 ("python-six" ,python-six)))
18948 (home-page
18949 "https://github.com/dashea/requests-file")
18950 (synopsis "File transport adapter for Requests")
18951 (description
18952 "Requests-File is a transport adapter for use with the Requests Python
18953 library to allow local file system access via @code{file://} URLs.")
18954 (license license:asl2.0)))
18955
18956 (define-public python2-requests-file
18957 (package-with-python2 python-requests-file))
18958
18959 (define-public python-identify
18960 (package
18961 (name "python-identify")
18962 (version "1.4.25")
18963 (source
18964 (origin
18965 ;; There are no tests in the PyPI tarball.
18966 (method git-fetch)
18967 (uri (git-reference
18968 (url "https://github.com/chriskuehl/identify")
18969 (commit (string-append "v" version))))
18970 (file-name (git-file-name name version))
18971 (sha256
18972 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18973 (build-system python-build-system)
18974 (arguments
18975 `(#:phases
18976 (modify-phases %standard-phases
18977 (replace 'check
18978 (lambda _
18979 (invoke "pytest" "-vv"))))))
18980 (native-inputs
18981 `(("python-coverage" ,python-coverage)
18982 ("python-pytest" ,python-pytest)))
18983 (propagated-inputs
18984 `(("python-editdistance" ,python-editdistance)))
18985 (home-page "https://github.com/chriskuehl/identify")
18986 (synopsis "File identification library for Python")
18987 (description
18988 "@code{identify} is a file identification library for Python. Given
18989 a file (or some information about a file), return a set of standardized tags
18990 identifying what the file is.")
18991 (license license:expat)))
18992
18993 (define-public python-tldextract
18994 (package
18995 (name "python-tldextract")
18996 (version "2.2.0")
18997 (source
18998 (origin
18999 (method url-fetch)
19000 (uri (pypi-uri "tldextract" version))
19001 (sha256
19002 (base32
19003 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19004 (build-system python-build-system)
19005 (native-inputs
19006 `(("python-pytest" ,python-pytest)
19007 ("python-responses" ,python-responses)))
19008 (propagated-inputs
19009 `(("python-idna" ,python-idna)
19010 ("python-requests" ,python-requests)
19011 ("python-requests-file" ,python-requests-file)))
19012 (home-page
19013 "https://github.com/john-kurkowski/tldextract")
19014 (synopsis
19015 "Separate the TLD from the registered domain and subdomains of a URL")
19016 (description
19017 "TLDExtract accurately separates the TLD from the registered domain and
19018 subdomains of a URL, using the Public Suffix List. By default, this includes
19019 the public ICANN TLDs and their exceptions. It can optionally support the
19020 Public Suffix List's private domains as well.")
19021 (license license:bsd-3)))
19022
19023 (define-public python2-tldextract
19024 (package-with-python2 python-tldextract))
19025
19026 (define-public python-nodeenv
19027 (package
19028 (name "python-nodeenv")
19029 (version "1.4.0")
19030 (source
19031 (origin
19032 ;; There's no tarball in PyPI.
19033 (method git-fetch)
19034 (uri (git-reference
19035 (url "https://github.com/ekalinin/nodeenv")
19036 (commit version)))
19037 (file-name (git-file-name name version))
19038 (sha256
19039 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19040 (build-system python-build-system)
19041 (arguments
19042 `(#:phases
19043 (modify-phases %standard-phases
19044 (replace 'check
19045 (lambda _
19046 ;; This test fails. It tries to open a network socket.
19047 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19048 (native-inputs
19049 `(("python-coverage" ,python-coverage)
19050 ("python-mock" ,python-mock)
19051 ("python-pytest" ,python-pytest)))
19052 (home-page "https://ekalinin.github.io/nodeenv/")
19053 (synopsis "Create isolated node.js environments")
19054 (description
19055 "Nodeenv (node.js virtual environment) is a tool to create isolated
19056 node.js environments. It creates an environment that has its own installation
19057 directories, that doesn't share libraries with other node.js virtual
19058 environments.")
19059 (license license:bsd-3)))
19060
19061 (define-public python-pynamecheap
19062 (package
19063 (name "python-pynamecheap")
19064 (version "0.0.3")
19065 (source
19066 (origin
19067 (method url-fetch)
19068 (uri (pypi-uri "PyNamecheap" version))
19069 (sha256
19070 (base32
19071 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19072 (build-system python-build-system)
19073 (propagated-inputs
19074 `(("python-requests" ,python-requests)))
19075 (home-page
19076 "https://github.com/Bemmu/PyNamecheap")
19077 (synopsis
19078 "Namecheap API client in Python")
19079 (description
19080 "PyNamecheap is a Namecheap API client in Python.")
19081 (license license:expat)))
19082
19083 (define-public python2-pynamecheap
19084 (package-with-python2 python-pynamecheap))
19085
19086 (define-public python-dns-lexicon
19087 (package
19088 (name "python-dns-lexicon")
19089 (version "2.4.0")
19090 (source
19091 (origin
19092 (method url-fetch)
19093 (uri (pypi-uri "dns-lexicon" version))
19094 (sha256
19095 (base32
19096 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19097 (build-system python-build-system)
19098 (arguments
19099 `(#:tests? #f)) ;requires internet access
19100 (propagated-inputs
19101 `(("python-future" ,python-future)
19102 ("python-pynamecheap" ,python-pynamecheap)
19103 ("python-requests" ,python-requests)
19104 ("python-tldextract" ,python-tldextract)
19105 ("python-urllib3" ,python-urllib3)))
19106 (home-page "https://github.com/AnalogJ/lexicon")
19107 (synopsis
19108 "Manipulate DNS records on various DNS providers")
19109 (description
19110 "Lexicon provides a way to manipulate DNS records on multiple DNS
19111 providers in a standardized way. It has a CLI but it can also be used as a
19112 Python library. It was designed to be used in automation, specifically with
19113 Let's Encrypt.")
19114 (license license:expat)))
19115
19116 (define-public python2-dns-lexicon
19117 (package-with-python2 python-dns-lexicon))
19118
19119 (define-public python-cfgv
19120 (package
19121 (name "python-cfgv")
19122 (version "3.1.0")
19123 (source
19124 (origin
19125 ;; There are no tests in the PyPI tarball.
19126 (method git-fetch)
19127 (uri (git-reference
19128 (url "https://github.com/asottile/cfgv")
19129 (commit (string-append "v" version))))
19130 (file-name (git-file-name name version))
19131 (sha256
19132 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19133 (build-system python-build-system)
19134 (arguments
19135 `(#:phases
19136 (modify-phases %standard-phases
19137 (replace 'check
19138 (lambda _
19139 (invoke "pytest" "-vv"))))))
19140 (native-inputs
19141 `(("python-covdefaults" ,python-covdefaults)
19142 ("python-coverage" ,python-coverage)
19143 ("python-pytest" ,python-pytest)))
19144 (home-page "https://github.com/asottile/cfgv")
19145 (synopsis "Configuration validation library")
19146 (description
19147 "This library helps to validate configuration files and produce human
19148 readable error messages.")
19149 (license license:expat)))
19150
19151 (define-public python-commandlines
19152 (package
19153 (name "python-commandlines")
19154 (version "0.4.1")
19155 (source
19156 (origin
19157 (method url-fetch)
19158 (uri (pypi-uri "commandlines" version))
19159 (sha256
19160 (base32
19161 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19162 (build-system python-build-system)
19163 (home-page "https://github.com/chrissimpkins/commandlines")
19164 (synopsis "Command line argument to object parsing library")
19165 (description
19166 "@code{Commandlines} is a Python library for command line application
19167 development that supports command line argument parsing, command string
19168 validation testing and application logic.")
19169 (license license:expat)))
19170
19171 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19172 ;; python-numba. They have a very unflexible relationship.
19173 (define-public python-numba
19174 (package
19175 (name "python-numba")
19176 (version "0.51.2")
19177 (source
19178 (origin
19179 (method url-fetch)
19180 (uri (pypi-uri "numba" version))
19181 (sha256
19182 (base32
19183 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19184 (build-system python-build-system)
19185 (arguments
19186 `(#:phases
19187 (modify-phases %standard-phases
19188 (add-after 'unpack 'disable-proprietary-features
19189 (lambda _
19190 (setenv "NUMBA_DISABLE_HSA" "1")
19191 (setenv "NUMBA_DISABLE_CUDA" "1")
19192 #t))
19193 (replace 'check
19194 (lambda* (#:key inputs outputs #:allow-other-keys)
19195 (add-installed-pythonpath inputs outputs)
19196 ;; Something is wrong with the PYTHONPATH when running the
19197 ;; tests from the build directory, as it complains about not being
19198 ;; able to import certain modules.
19199 (with-directory-excursion "/tmp"
19200 (setenv "HOME" (getcwd))
19201 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19202 (propagated-inputs
19203 `(("python-llvmlite" ,python-llvmlite)
19204 ("python-numpy" ,python-numpy)
19205 ("python-singledispatch" ,python-singledispatch)))
19206 (native-inputs ;for tests
19207 `(("python-jinja2" ,python-jinja2)
19208 ("python-pygments" ,python-pygments)))
19209 (home-page "https://numba.pydata.org")
19210 (synopsis "Compile Python code using LLVM")
19211 (description "Numba gives you the power to speed up your applications with
19212 high performance functions written directly in Python. With a few
19213 annotations, array-oriented and math-heavy Python code can be just-in-time
19214 compiled to native machine instructions, similar in performance to C, C++ and
19215 Fortran, without having to switch languages or Python interpreters.
19216
19217 Numba works by generating optimized machine code using the LLVM compiler
19218 infrastructure at import time, runtime, or statically (using the included pycc
19219 tool).")
19220 (license license:bsd-3)))
19221
19222 (define-public python-numcodecs
19223 (package
19224 (name "python-numcodecs")
19225 (version "0.6.4")
19226 (source
19227 (origin
19228 (method url-fetch)
19229 (uri (pypi-uri "numcodecs" version))
19230 (sha256
19231 (base32
19232 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19233 (build-system python-build-system)
19234 (propagated-inputs
19235 `(("python-numpy" ,python-numpy)
19236 ("python-msgpack" ,python-msgpack)))
19237 (native-inputs
19238 `(("python-pytest" ,python-pytest)
19239 ("python-setuptools-scm" ,python-setuptools-scm)))
19240 (home-page "https://github.com/zarr-developers/numcodecs")
19241 (synopsis "Buffer compression and transformation codecs")
19242 (description
19243 "This Python package provides buffer compression and transformation
19244 codecs for use in data storage and communication applications.")
19245 (license license:expat)))
19246
19247 (define-public python-asciitree
19248 (package
19249 (name "python-asciitree")
19250 (version "0.3.3")
19251 (source
19252 (origin
19253 (method url-fetch)
19254 (uri (pypi-uri "asciitree" version))
19255 (sha256
19256 (base32
19257 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19258 (build-system python-build-system)
19259 (home-page "https://github.com/mbr/asciitree")
19260 (synopsis "Draws ASCII trees")
19261 (description "This package draws tree structures using characters.")
19262 (license license:expat)))
19263
19264 (define-public python-zarr
19265 (package
19266 (name "python-zarr")
19267 (version "2.4.0")
19268 (source
19269 (origin
19270 (method url-fetch)
19271 (uri (pypi-uri "zarr" version))
19272 (sha256
19273 (base32
19274 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19275 (build-system python-build-system)
19276 (arguments
19277 `(#:phases
19278 (modify-phases %standard-phases
19279 (add-after 'unpack 'disable-service-tests
19280 (lambda _
19281 (setenv "ZARR_TEST_ABS" "0")
19282 (setenv "ZARR_TEST_MONGO" "0")
19283 (setenv "ZARR_TEST_REDIS" "0")
19284 #t))
19285 (replace 'check
19286 (lambda _
19287 (invoke "pytest" "-vv" "-k" "not lmdb")
19288 #t)))))
19289 (propagated-inputs
19290 `(("python-asciitree" ,python-asciitree)
19291 ("python-fasteners" ,python-fasteners)
19292 ("python-numcodecs" ,python-numcodecs)
19293 ("python-numpy" ,python-numpy)))
19294 (native-inputs
19295 `(("python-pytest" ,python-pytest)
19296 ("python-setuptools-scm" ,python-setuptools-scm)))
19297 (home-page "https://github.com/zarr-developers/zarr-python")
19298 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19299 (description
19300 "This package provides an implementation of chunked, compressed,
19301 N-dimensional arrays for Python.")
19302 (license license:expat)))
19303
19304 (define-public python-anndata
19305 (package
19306 (name "python-anndata")
19307 (version "0.7.1")
19308 (source
19309 (origin
19310 (method url-fetch)
19311 (uri (pypi-uri "anndata" version))
19312 (sha256
19313 (base32
19314 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19315 (build-system python-build-system)
19316 (arguments
19317 `(#:phases
19318 (modify-phases %standard-phases
19319 (add-after 'unpack 'delete-inconvenient-tests
19320 (lambda _
19321 ;; This test depends on python-scikit-learn.
19322 (delete-file "anndata/tests/test_inplace_subset.py")
19323 #t))
19324 (delete 'check)
19325 (add-after 'install 'check
19326 (lambda* (#:key inputs outputs #:allow-other-keys)
19327 (add-installed-pythonpath inputs outputs)
19328 (invoke "pytest" "-vv"))))))
19329 (propagated-inputs
19330 `(("python-h5py" ,python-h5py)
19331 ("python-importlib-metadata" ,python-importlib-metadata)
19332 ("python-natsort" ,python-natsort)
19333 ("python-numcodecs" ,python-numcodecs)
19334 ("python-packaging" ,python-packaging)
19335 ("python-pandas" ,python-pandas)
19336 ("python-scipy" ,python-scipy)
19337 ("python-zarr" ,python-zarr)))
19338 (native-inputs
19339 `(("python-joblib" ,python-joblib)
19340 ("python-pytest" ,python-pytest)
19341 ("python-setuptools-scm" ,python-setuptools-scm)))
19342 (home-page "https://github.com/theislab/anndata")
19343 (synopsis "Annotated data for data analysis pipelines")
19344 (description "Anndata is a package for simple (functional) high-level APIs
19345 for data analysis pipelines. In this context, it provides an efficient,
19346 scalable way of keeping track of data together with learned annotations and
19347 reduces the code overhead typically encountered when using a mostly
19348 object-oriented library such as @code{scikit-learn}.")
19349 (license license:bsd-3)))
19350
19351 (define-public python-dill
19352 (package
19353 (name "python-dill")
19354 (version "0.3.1.1")
19355 (source
19356 (origin
19357 (method url-fetch)
19358 (uri (pypi-uri "dill" version))
19359 (sha256
19360 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19361 (build-system python-build-system)
19362 (arguments
19363 `(#:phases
19364 (modify-phases %standard-phases
19365 (replace 'check
19366 (lambda _
19367 (with-directory-excursion "/tmp"
19368 (invoke "nosetests" "-v"))
19369 #t)))))
19370 (native-inputs
19371 `(("python-nose" ,python-nose)))
19372 (home-page "https://pypi.org/project/dill/")
19373 (synopsis "Serialize all of Python")
19374 (description "Dill extends Python's @code{pickle} module for serializing
19375 and de-serializing Python objects to the majority of the built-in Python
19376 types. Dill provides the user the same interface as the @code{pickle} module,
19377 and also includes some additional features. In addition to pickling Python
19378 objects, @code{dill} provides the ability to save the state of an interpreter
19379 session in a single command. Hence, it would be feasible to save a
19380 interpreter session, close the interpreter, ship the pickled file to another
19381 computer, open a new interpreter, unpickle the session and thus continue from
19382 the saved state of the original interpreter session.")
19383 (license license:bsd-3)))
19384
19385 (define-public python-multiprocess
19386 (package
19387 (name "python-multiprocess")
19388 (version "0.70.9")
19389 (source
19390 (origin
19391 (method url-fetch)
19392 (uri (pypi-uri "multiprocess" version))
19393 (sha256
19394 (base32
19395 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19396 (build-system python-build-system)
19397 (arguments
19398 `(#:phases
19399 (modify-phases %standard-phases
19400 (add-after 'unpack 'disable-broken-tests
19401 (lambda _
19402 ;; This test is broken as there is no keyboard interrupt.
19403 (substitute* "py3.7/multiprocess/tests/__init__.py"
19404 (("^(.*)def test_wait_result"
19405 line indent)
19406 (string-append indent
19407 "@unittest.skip(\"Disabled by Guix\")\n"
19408 line)))
19409 #t))
19410 ;; Tests must be run after installation.
19411 (delete 'check)
19412 (add-after 'install 'check
19413 (lambda* (#:key inputs outputs #:allow-other-keys)
19414 (add-installed-pythonpath inputs outputs)
19415 (invoke "python" "-m" "multiprocess.tests")
19416 #t)))))
19417 (propagated-inputs
19418 `(("python-dill" ,python-dill)))
19419 (home-page "https://pypi.org/project/multiprocess/")
19420 (synopsis "Multiprocessing and multithreading in Python")
19421 (description
19422 "This package is a fork of the multiprocessing Python package, a package
19423 which supports the spawning of processes using the API of the standard
19424 library's @code{threading} module.")
19425 (license license:bsd-3)))
19426
19427 (define-public python-toolz
19428 (package
19429 (name "python-toolz")
19430 (version "0.9.0")
19431 (source
19432 (origin
19433 (method url-fetch)
19434 (uri (pypi-uri "toolz" version))
19435 (sha256
19436 (base32
19437 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19438 (build-system python-build-system)
19439 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19440 ;; unregistered loader type"
19441 (arguments '(#:tests? #f))
19442 (home-page "https://github.com/pytoolz/toolz/")
19443 (synopsis "List processing tools and functional utilities")
19444 (description
19445 "This package provides a set of utility functions for iterators,
19446 functions, and dictionaries.")
19447 (license license:bsd-3)))
19448
19449 (define-public python2-toolz
19450 (package-with-python2 python-toolz))
19451
19452 (define-public python-cytoolz
19453 (package
19454 (name "python-cytoolz")
19455 (version "0.9.0.1")
19456 (source
19457 (origin
19458 (method url-fetch)
19459 (uri (pypi-uri "cytoolz" version))
19460 (sha256
19461 (base32
19462 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19463 (build-system python-build-system)
19464 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19465 ;; 'exceptions'"
19466 (arguments '(#:tests? #f))
19467 (propagated-inputs
19468 `(("python-toolz" ,python-toolz)))
19469 (native-inputs
19470 `(("python-cython" ,python-cython)))
19471 (home-page "https://github.com/pytoolz/cytoolz")
19472 (synopsis "High performance functional utilities")
19473 (description
19474 "The cytoolz package implements the same API as provided by toolz. The
19475 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19476 that is accessible to other projects developed in Cython.")
19477 (license license:bsd-3)))
19478
19479 (define-public python-sortedcontainers
19480 (package
19481 (name "python-sortedcontainers")
19482 (version "2.1.0")
19483 (source
19484 (origin
19485 (method url-fetch)
19486 (uri (pypi-uri "sortedcontainers" version))
19487 (sha256
19488 (base32
19489 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19490 (build-system python-build-system)
19491 (arguments
19492 ;; FIXME: Tests require many extra dependencies, and would introduce
19493 ;; a circular dependency on hypothesis, which uses this package.
19494 '(#:tests? #f))
19495 (propagated-inputs
19496 `(("python-appdirs" ,python-appdirs)
19497 ("python-distlib" ,python-distlib)
19498 ("python-filelock" ,python-filelock)
19499 ("python-six" ,python-six-bootstrap)))
19500 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19501 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19502 (description
19503 "This package provides a sorted collections library, written in
19504 pure-Python.")
19505 (license license:asl2.0)))
19506
19507 (define-public python2-sortedcontainers
19508 (package-with-python2 python-sortedcontainers))
19509
19510 (define-public python-cloudpickle
19511 (package
19512 (name "python-cloudpickle")
19513 (version "1.3.0")
19514 (source
19515 (origin
19516 (method url-fetch)
19517 (uri (pypi-uri "cloudpickle" version))
19518 (sha256
19519 (base32
19520 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19521 (build-system python-build-system)
19522 (arguments
19523 '(#:phases (modify-phases %standard-phases
19524 (add-before 'check 'do-not-override-PYTHONPATH
19525 (lambda _
19526 ;; Append to PYTHONPATH instead of overriding it so
19527 ;; that dependencies from Guix can be found.
19528 (substitute* "tests/testutils.py"
19529 (("env\\['PYTHONPATH'\\] = pythonpath")
19530 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19531 #t))
19532 (replace 'check
19533 (lambda* (#:key tests? #:allow-other-keys)
19534 (if tests?
19535 (invoke "pytest" "-s" "-vv")
19536 (format #t "test suite not run~%"))
19537 #t)))))
19538 (native-inputs
19539 `(;; For tests.
19540 ("python-psutil" ,python-psutil)
19541 ("python-pytest" ,python-pytest)
19542 ("python-tornado" ,python-tornado)))
19543 (home-page "https://github.com/cloudpipe/cloudpickle")
19544 (synopsis "Extended pickling support for Python objects")
19545 (description
19546 "Cloudpickle makes it possible to serialize Python constructs not
19547 supported by the default pickle module from the Python standard library. It
19548 is especially useful for cluster computing where Python expressions are
19549 shipped over the network to execute on remote hosts, possibly close to the
19550 data.")
19551 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19552 (license license:bsd-3)))
19553
19554 (define-public python2-cloudpickle
19555 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19556 (package
19557 (inherit base)
19558 (native-inputs
19559 `(("python-mock" ,python2-mock)
19560 ,@(package-native-inputs base)))
19561 (propagated-inputs
19562 `(("python-futures" ,python2-futures)
19563 ,@(package-propagated-inputs base))))))
19564
19565 (define-public python-locket
19566 (package
19567 (name "python-locket")
19568 (version "0.2.0")
19569 (source
19570 (origin
19571 (method url-fetch)
19572 (uri (pypi-uri "locket" version))
19573 (sha256
19574 (base32
19575 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19576 (build-system python-build-system)
19577 (home-page "https://github.com/mwilliamson/locket.py")
19578 (synopsis "File-based locks for Python")
19579 (description
19580 "Locket implements a lock that can be used by multiple processes provided
19581 they use the same path.")
19582 (license license:bsd-2)))
19583
19584 (define-public python2-locket
19585 (package-with-python2 python-locket))
19586
19587 (define-public python-blosc
19588 (package
19589 (name "python-blosc")
19590 (version "1.5.1")
19591 (source
19592 (origin
19593 (method url-fetch)
19594 (uri (pypi-uri "blosc" version))
19595 (sha256
19596 (base32
19597 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19598 (build-system python-build-system)
19599 ;; FIXME: all tests pass, but then this error is printed:
19600 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19601 (arguments '(#:tests? #f))
19602 (propagated-inputs
19603 `(("python-numpy" ,python-numpy)))
19604 (home-page "https://github.com/blosc/python-blosc")
19605 (synopsis "Python wrapper for the Blosc data compressor library")
19606 (description "Blosc is a high performance compressor optimized for binary
19607 data. It has been designed to transmit data to the processor cache faster
19608 than the traditional, non-compressed, direct memory fetch approach via a
19609 @code{memcpy()} system call.
19610
19611 Blosc works well for compressing numerical arrays that contains data with
19612 relatively low entropy, like sparse data, time series, grids with
19613 regular-spaced values, etc.
19614
19615 This Python package wraps the Blosc library.")
19616 (license license:bsd-3)))
19617
19618 (define-public python2-blosc
19619 (package-with-python2 python-blosc))
19620
19621 (define-public python-partd
19622 (package
19623 (name "python-partd")
19624 (version "0.3.9")
19625 (source
19626 (origin
19627 (method url-fetch)
19628 (uri (pypi-uri "partd" version))
19629 (sha256
19630 (base32
19631 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19632 (build-system python-build-system)
19633 (propagated-inputs
19634 `(("python-blosc" ,python-blosc)
19635 ("python-locket" ,python-locket)
19636 ("python-numpy" ,python-numpy)
19637 ("python-pandas" ,python-pandas)
19638 ("python-pyzmq" ,python-pyzmq)
19639 ("python-toolz" ,python-toolz)))
19640 (home-page "https://github.com/dask/partd/")
19641 (synopsis "Appendable key-value storage")
19642 (description "Partd stores key-value pairs. Values are raw bytes. We
19643 append on old values. Partd excels at shuffling operations.")
19644 (license license:bsd-3)))
19645
19646 (define-public python2-partd
19647 (package-with-python2 python-partd))
19648
19649 (define-public python-fsspec
19650 (package
19651 (name "python-fsspec")
19652 (version "0.6.1")
19653 (source
19654 (origin
19655 (method url-fetch)
19656 (uri (pypi-uri "fsspec" version))
19657 (sha256
19658 (base32
19659 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19660 (build-system python-build-system)
19661 (arguments '(#:tests? #f)) ; there are none
19662 (home-page "https://github.com/intake/filesystem_spec")
19663 (synopsis "File-system specification")
19664 (description "The purpose of this package is to produce a template or
19665 specification for a file-system interface, that specific implementations
19666 should follow, so that applications making use of them can rely on a common
19667 behavior and not have to worry about the specific internal implementation
19668 decisions with any given backend.")
19669 (license license:bsd-3)))
19670
19671 (define-public python-dask
19672 (package
19673 (name "python-dask")
19674 (version "2.14.0")
19675 (source
19676 (origin
19677 (method url-fetch)
19678 (uri (pypi-uri "dask" version))
19679 (sha256
19680 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19681 (build-system python-build-system)
19682 (arguments
19683 `(#:phases
19684 (modify-phases %standard-phases
19685 (add-after 'unpack 'disable-broken-tests
19686 (lambda _
19687 ;; This test is marked as xfail when pytest-xdist is used.
19688 (substitute* "dask/tests/test_threaded.py"
19689 (("def test_interrupt\\(\\)" m)
19690 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19691 m)))
19692 ;; This one fails with a type error:
19693 ;; TypeError: Already tz-aware, use tz_convert to convert.
19694 (substitute* "dask/dataframe/tests/test_shuffle.py"
19695 (("def test_set_index_timestamp\\(\\)" m)
19696 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19697 m)))
19698 #t))
19699 (replace 'check
19700 (lambda _ (invoke "pytest" "-vv"))))))
19701 (propagated-inputs
19702 `(("python-cloudpickle" ,python-cloudpickle)
19703 ("python-fsspec" ,python-fsspec)
19704 ("python-numpy" ,python-numpy)
19705 ("python-packaging" ,python-packaging)
19706 ("python-pandas" ,python-pandas)
19707 ("python-partd" ,python-partd)
19708 ("python-toolz" ,python-toolz)
19709 ("python-pyyaml" ,python-pyyaml)))
19710 (native-inputs
19711 `(("python-pytest" ,python-pytest)
19712 ("python-pytest-runner" ,python-pytest-runner)))
19713 (home-page "https://github.com/dask/dask/")
19714 (synopsis "Parallel computing with task scheduling")
19715 (description
19716 "Dask is a flexible parallel computing library for analytics. It
19717 consists of two components: dynamic task scheduling optimized for computation,
19718 and large data collections like parallel arrays, dataframes, and lists that
19719 extend common interfaces like NumPy, Pandas, or Python iterators to
19720 larger-than-memory or distributed environments. These parallel collections
19721 run on top of the dynamic task schedulers. ")
19722 (license license:bsd-3)))
19723
19724 (define-public python-ilinkedlist
19725 (package
19726 (name "python-ilinkedlist")
19727 (version "0.4.0")
19728 (source
19729 (origin
19730 (method url-fetch)
19731 (uri (pypi-uri "ilinkedlist" version))
19732 (sha256
19733 (base32
19734 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19735 (build-system python-build-system)
19736 (native-inputs `(("python-pytest" ,python-pytest)))
19737 (inputs `(("python" ,python)))
19738 (home-page "https://github.com/luther9/ilinkedlist-py")
19739 (synopsis "Immutable linked list library")
19740 (description
19741 "This is a implementation of immutable linked lists for Python. It
19742 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19743 Since a linked list is treated as immutable, it is hashable, and its length
19744 can be retrieved in constant time. Some of the terminology is inspired by
19745 LISP. It is possible to create an improper list by creating a @code{Pair}
19746 with a non-list @code{cdr}.")
19747 (license license:gpl3+)))
19748
19749 (define-public python-readlike
19750 (package
19751 (name "python-readlike")
19752 (version "0.1.3")
19753 (source
19754 (origin
19755 (method url-fetch)
19756 (uri (pypi-uri "readlike" version))
19757 (sha256
19758 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19759 (build-system python-build-system)
19760 (home-page "https://github.com/jangler/readlike")
19761 (synopsis "GNU Readline-like line editing module")
19762 (description
19763 "This Python module provides line editing functions similar to the default
19764 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19765 @code{readline} package, this one allows access to those capabilities in settings
19766 outside of a standard command-line interface. It is especially well-suited to
19767 interfacing with Urwid, due to a shared syntax for describing key inputs.
19768
19769 Currently, all stateless Readline commands are implemented. Yanking and history
19770 are not supported.")
19771 (license license:expat)))
19772
19773 (define-public python2-readlike
19774 (package-with-python2 python-readlike))
19775
19776 (define-public python-reparser
19777 (package
19778 (name "python-reparser")
19779 (version "1.4.3")
19780 (source
19781 (origin
19782 (method url-fetch)
19783 (uri (pypi-uri "ReParser" version))
19784 (sha256
19785 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19786 (build-system python-build-system)
19787 (home-page "https://github.com/xmikos/reparser")
19788 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19789 (description
19790 "This Python library provides a simple lexer/parser for inline markup based
19791 on regular expressions.")
19792 (license license:expat)))
19793
19794 (define-public python2-reparser
19795 (let ((reparser (package-with-python2
19796 (strip-python2-variant python-reparser))))
19797 (package (inherit reparser)
19798 (propagated-inputs
19799 `(("python2-enum34" ,python2-enum34)
19800 ,@(package-propagated-inputs reparser))))))
19801
19802 (define-public python-retrying
19803 (package
19804 (name "python-retrying")
19805 (version "1.3.3")
19806 (source
19807 (origin
19808 (method git-fetch)
19809 (uri (git-reference
19810 (url "https://github.com/rholder/retrying")
19811 (commit (string-append "v" version))))
19812 (file-name (git-file-name name version))
19813 (sha256
19814 (base32
19815 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19816 (build-system python-build-system)
19817 (propagated-inputs
19818 `(("python-six" ,python-six)))
19819 (home-page "https://github.com/rholder/retrying")
19820 (synopsis "Library for adding retry behavior")
19821 (description "Retrying is a general-purpose retrying library to simplify
19822 the task of adding retry behavior to just about anything.
19823
19824 Features:
19825
19826 @itemize
19827 @item Generic Decorator API.
19828 @item Specify stop condition (i.e. limit by number of attempts).
19829 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19830 @item Customize retrying on Exceptions.
19831 @item Customize retrying on expected returned result.
19832 @end itemize")
19833 (license license:asl2.0)))
19834
19835 (define-public python-precis-i18n
19836 (package
19837 (name "python-precis-i18n")
19838 (version "1.0.0")
19839 (source
19840 (origin
19841 (method url-fetch)
19842 (uri (pypi-uri "precis_i18n" version))
19843 (sha256
19844 (base32
19845 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19846 (build-system python-build-system)
19847 (home-page "https://github.com/byllyfish/precis_i18n")
19848 (synopsis "Implementation of the PRECIS framework")
19849 (description
19850 "This module implements the PRECIS Framework as described in RFC 8264,
19851 RFC 8265 and RFC 8266.")
19852 (license license:expat)))
19853
19854 (define-public python-absl-py
19855 (package
19856 (name "python-absl-py")
19857 (version "0.6.1")
19858 (source
19859 (origin
19860 (method url-fetch)
19861 (uri (pypi-uri "absl-py" version))
19862 (sha256
19863 (base32
19864 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19865 (build-system python-build-system)
19866 (propagated-inputs
19867 `(("python-six" ,python-six)))
19868 (home-page "https://github.com/abseil/abseil-py")
19869 (synopsis "Abseil Python common libraries")
19870 (description
19871 "This package provides the Abseil Python Common Libraries, a collection
19872 of Python libraries for building Python applications.")
19873 (license license:asl2.0)))
19874
19875 (define-public python-astor
19876 (package
19877 (name "python-astor")
19878 (version "0.7.1")
19879 (source
19880 (origin
19881 (method url-fetch)
19882 (uri (pypi-uri "astor" version))
19883 (sha256
19884 (base32
19885 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19886 (build-system python-build-system)
19887 ;; FIXME: There are two errors and two test failures.
19888 (arguments `(#:tests? #f))
19889 (home-page "https://github.com/berkerpeksag/astor")
19890 (synopsis "Read and write Python ASTs")
19891 (description "Astor is designed to allow easy manipulation of Python
19892 source via the Abstract Syntax Tree.")
19893 (license license:bsd-3)))
19894
19895 (define-public python2-astor
19896 (package-with-python2 python-astor))
19897
19898 (define-public python-astunparse
19899 (package
19900 (name "python-astunparse")
19901 (version "1.6.2")
19902 (source
19903 (origin
19904 (method url-fetch)
19905 (uri (pypi-uri "astunparse" version))
19906 (sha256
19907 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19908 (build-system python-build-system)
19909 (arguments '(#:tests? #f)) ; there are none
19910 (propagated-inputs
19911 `(("python-six" ,python-six)
19912 ("python-wheel" ,python-wheel)))
19913 (home-page "https://github.com/simonpercivall/astunparse")
19914 (synopsis "AST unparser for Python")
19915 (description "This package provides an AST unparser for Python. It is a
19916 factored out version of @code{unparse} found in the Python source
19917 distribution.")
19918 (license license:bsd-3)))
19919
19920 (define-public python-gast
19921 (package
19922 (name "python-gast")
19923 (version "0.3.3")
19924 (source
19925 (origin
19926 (method url-fetch)
19927 (uri (pypi-uri "gast" version))
19928 (sha256
19929 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19930 (build-system python-build-system)
19931 (propagated-inputs
19932 `(("python-astunparse" ,python-astunparse)))
19933 (home-page "https://pypi.org/project/gast/")
19934 (synopsis "Generic Python AST that abstracts the underlying Python version")
19935 (description
19936 "GAST provides a compatibility layer between the AST of various Python
19937 versions, as produced by @code{ast.parse} from the standard @code{ast}
19938 module.")
19939 (license license:bsd-3)))
19940
19941 (define-public python-wikidata
19942 (package
19943 (name "python-wikidata")
19944 (version "0.6.1")
19945 (source
19946 (origin
19947 (method url-fetch)
19948 (uri (pypi-uri "Wikidata" version))
19949 (sha256
19950 (base32
19951 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19952 (build-system python-build-system)
19953 (propagated-inputs
19954 `(("python-babel" ,python-babel)))
19955 (home-page "https://github.com/dahlia/wikidata")
19956 (synopsis "Wikidata client library")
19957 (description
19958 "This package provides a Python interface to
19959 @url{https://www.wikidata.org/, Wikidata}.")
19960 (properties '((upstream-name . "Wikidata")))
19961 (license license:gpl3+)))
19962
19963 (define-public python-doctest-ignore-unicode
19964 (package
19965 (name "python-doctest-ignore-unicode")
19966 (version "0.1.2")
19967 (source
19968 (origin
19969 (method url-fetch)
19970 (uri (pypi-uri "doctest-ignore-unicode" version))
19971 (sha256
19972 (base32
19973 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19974 (build-system python-build-system)
19975 (native-inputs
19976 `(("python-nose" ,python-nose)))
19977 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19978 (synopsis "Ignore Unicode literal prefixes in doctests")
19979 (description
19980 "This package adds support for a flag to ignore Unicode literal prefixes
19981 in doctests.")
19982 (license license:asl2.0)))
19983
19984 (define-public python-attr
19985 (package
19986 (name "python-attr")
19987 (version "0.3.1")
19988 (source
19989 (origin
19990 (method url-fetch)
19991 (uri (pypi-uri "attr" version))
19992 (sha256
19993 (base32
19994 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19995 (build-system python-build-system)
19996 (home-page "https://github.com/denis-ryzhkov/attr")
19997 (synopsis "Decorator for attributes of target function or class")
19998 (description "Simple decorator to set attributes of target function or
19999 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20000 (license license:expat)))
20001
20002 (define-public python-construct
20003 (package
20004 (name "python-construct")
20005 (version "2.10.56")
20006 (source
20007 (origin
20008 (method url-fetch)
20009 (uri (pypi-uri "construct" version))
20010 (sha256
20011 (base32
20012 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20013 (build-system python-build-system)
20014 (arguments
20015 `(#:tests? #f)) ; No tests exist.
20016 (propagated-inputs
20017 `(("python-extras" ,python-extras)
20018 ("python-arrow" ,python-arrow)
20019 ("python-numpy" ,python-numpy)
20020 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20021 (home-page "https://construct.readthedocs.io")
20022 (synopsis "Declarative and symmetrical parser and builder for binary data")
20023 (description
20024 "This package provides both simple, atomic constructs (such as
20025 integers of various sizes), as well as composite ones which allow you
20026 form hierarchical and sequential structures of increasing complexity.
20027 It features bit and byte granularity, easy debugging and testing, an
20028 easy-to-extend subclass system, and lots of primitive constructs to
20029 make your work easier.")
20030 (license license:expat)))
20031
20032 (define-public python-outcome
20033 (package
20034 (name "python-outcome")
20035 (version "1.0.1")
20036 (source
20037 (origin
20038 (method url-fetch)
20039 (uri (pypi-uri "outcome" version))
20040 (sha256
20041 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20042 (build-system python-build-system)
20043 (arguments
20044 `(#:phases
20045 (modify-phases %standard-phases
20046 (replace 'check
20047 (lambda* (#:key inputs outputs #:allow-other-keys)
20048 (add-installed-pythonpath inputs outputs)
20049 (invoke "pytest" "-vv"))))))
20050 (native-inputs
20051 `(("python-pytest" ,python-pytest)
20052 ("python-pytest-cov" ,python-pytest-cov)
20053 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20054 (propagated-inputs
20055 `(("python-async-generator" ,python-async-generator)
20056 ("python-attrs" ,python-attrs)))
20057 (home-page "https://github.com/python-trio/outcome")
20058 (synopsis "Capture the outcome of Python function calls")
20059 (description
20060 "Capture the outcome of Python function calls. Extracted from the Trio
20061 project.")
20062 ;; Either license applies.
20063 (license (list license:expat license:asl2.0))))
20064
20065 (define-public python-trio
20066 (package
20067 (name "python-trio")
20068 (version "0.17.0")
20069 (source
20070 (origin
20071 (method url-fetch)
20072 (uri (pypi-uri "trio" version))
20073 (sha256
20074 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20075 (build-system python-build-system)
20076 (arguments
20077 `(#:phases
20078 (modify-phases %standard-phases
20079 (add-before 'check 'change-home
20080 (lambda _
20081 ;; Tests require a writable home.
20082 (setenv "HOME" "/tmp")
20083 #t))
20084 (replace 'check
20085 (lambda _
20086 (invoke "pytest" "-vv" "-k"
20087 (string-append
20088 ;; This test times out.
20089 "not test_ki_protection_works"
20090 ;; Assertion errors.
20091 " and not test_guest_mode_ki"
20092 " and not test_run_in_trio_thread_ki"
20093 ;; These try to raise KeyboardInterrupt which does not work
20094 ;; in the build environment.
20095 " and not test_ki_self"
20096 " and not test_ki_wakes_us_up"
20097 ;; Failure in name resolution.
20098 " and not test_getnameinfo"
20099 " and not test_SocketType_resolve"
20100 ;; OSError: protocol not found.
20101 " and not test_getprotobyname")))))))
20102 (native-inputs
20103 `(("python-astor" ,python-astor)
20104 ("python-ipython" ,python-ipython)
20105 ("python-jedi" ,python-jedi)
20106 ("python-pylint" ,python-pylint)
20107 ("python-pyopenssl" ,python-pyopenssl)
20108 ("python-pytest" ,python-pytest)
20109 ("python-pytest-cov" ,python-pytest-cov)
20110 ("python-trustme" ,python-trustme)))
20111 (propagated-inputs
20112 `(("python-attrs" ,python-attrs)
20113 ("python-idna" ,python-idna)
20114 ("python-outcome" ,python-outcome)
20115 ("python-sniffio" ,python-sniffio)
20116 ("python-sortedcontainers"
20117 ,python-sortedcontainers)))
20118 (home-page "https://github.com/python-trio/trio")
20119 (synopsis "Friendly Python library for async concurrency and I/O")
20120 (description
20121 "Trio strives to be a production-quality, async/await-native I/O library
20122 for Python. Like all async libraries, its main purpose is to help you write
20123 programs that do multiple things at the same time with parallelized I/O.")
20124 ;; Either license applies.
20125 (license (list license:expat license:asl2.0))))
20126
20127 (define-public python-trio-typing
20128 (package
20129 (name "python-trio-typing")
20130 (version "0.5.0")
20131 (source
20132 (origin
20133 (method url-fetch)
20134 (uri (pypi-uri "trio-typing" version))
20135 (sha256
20136 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20137 (build-system python-build-system)
20138 (arguments
20139 `(#:phases
20140 (modify-phases %standard-phases
20141 (replace 'check
20142 (lambda _
20143 (invoke "pytest" "-vv"))))))
20144 (native-inputs
20145 `(("python-attrs" ,python-attrs)
20146 ("python-pytest" ,python-pytest)))
20147 (propagated-inputs
20148 `(("python-mypy" ,python-mypy)
20149 ("python-mypy-extensions"
20150 ,python-mypy-extensions)
20151 ("python-trio" ,python-trio)
20152 ("python-typing-extensions"
20153 ,python-typing-extensions)))
20154 (home-page "https://github.com/python-trio/trio-typing")
20155 (synopsis "Static type checking support for Trio and related projects")
20156 (description
20157 "This package provides:
20158
20159 @itemize
20160 @item PEP 561 typing stubs packages for the Trio project packages:
20161
20162 @itemize
20163 @item trio (@code{trio-stubs})
20164 @item outcome (@code{outcome-stubs})
20165 @item async_generator (@code{async_generator-stubs})
20166 @end itemize
20167
20168 @item A package @code{trio_typing} containing types that Trio programs often
20169 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20170 a mypy plugin that smooths over some limitations in the basic type hints.
20171 @end itemize")
20172 ;; Either license applies.
20173 (license (list license:expat license:asl2.0))))
20174
20175 (define-public python-humanize
20176 (package
20177 (name "python-humanize")
20178 (version "0.5.1")
20179 (source
20180 (origin
20181 (method url-fetch)
20182 (uri (pypi-uri "humanize" version))
20183 (sha256
20184 (base32
20185 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20186 (arguments
20187 '(#:tests? #f)) ; tests not in pypi archive
20188 (build-system python-build-system)
20189 (home-page "https://github.com/jmoiron/humanize")
20190 (synopsis "Print numerical information in a human-readable form")
20191 (description "This package provides a Python module that displays numbers
20192 and dates in \"human readable\" forms. For example, it would display
20193 \"12345591313\" as \"12.3 billion\".")
20194 (license license:expat)))
20195
20196 (define-public python-txaio
20197 (package
20198 (name "python-txaio")
20199 (version "18.8.1")
20200 (source
20201 (origin
20202 (method url-fetch)
20203 (uri (pypi-uri "txaio" version))
20204 (sha256
20205 (base32
20206 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20207 (build-system python-build-system)
20208 (propagated-inputs
20209 `(("python-twisted" ,python-twisted)
20210 ("python-six" ,python-six)))
20211 (home-page "https://github.com/crossbario/txaio")
20212 (synopsis "Compatibility layer between Python asyncio and Twisted")
20213 (description "Txaio provides a compatibility layer between the Python
20214 @code{asyncio} module and @code{Twisted}.")
20215 (license license:expat)))
20216
20217 (define-public python-toolshed
20218 (package
20219 (name "python-toolshed")
20220 (version "0.4.6")
20221 (source
20222 (origin
20223 (method url-fetch)
20224 (uri (pypi-uri "toolshed" version))
20225 (sha256
20226 (base32
20227 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20228 (build-system python-build-system)
20229 (native-inputs
20230 `(("python-nose" ,python-nose)))
20231 (home-page "https://github.com/brentp/toolshed/")
20232 (synopsis "Collection of modules and functions for working with data")
20233 (description "This is a collection of well-tested, simple modules and
20234 functions that aim to reduce boilerplate when working with data.")
20235 (license license:bsd-2)))
20236
20237 (define-public python-annoy
20238 (package
20239 (name "python-annoy")
20240 (version "1.15.1")
20241 (source
20242 (origin
20243 (method url-fetch)
20244 (uri (pypi-uri "annoy" version))
20245 (sha256
20246 (base32
20247 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20248 (build-system python-build-system)
20249 (native-inputs
20250 `(("python-nose" ,python-nose)))
20251 (home-page "https://github.com/spotify/annoy/")
20252 (synopsis "Approximate nearest neighbors library")
20253 (description
20254 "Annoy is a C++ library with Python bindings to search for points in
20255 space that are close to a given query point. It also creates large read-only
20256 file-based data structures that are @code{mmap}ped into memory so that many
20257 processes may share the same data.")
20258 (license license:asl2.0)))
20259
20260 (define-public python-croniter
20261 (package
20262 (name "python-croniter")
20263 (version "0.3.34")
20264 (source (origin
20265 (method url-fetch)
20266 (uri (pypi-uri "croniter" version))
20267 (sha256
20268 (base32
20269 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20270 (build-system python-build-system)
20271 (propagated-inputs
20272 `(("python-dateutil" ,python-dateutil)
20273 ("python-natsort" ,python-natsort)))
20274 (home-page "https://github.com/kiorky/croniter")
20275 (synopsis "Iterate datetime objects with cron-like syntax")
20276 (description
20277 "@code{croniter} provides iteration for datetime object with cron-like
20278 format.")
20279 (license license:expat)))
20280
20281 (define-public python-pylzma
20282 (package
20283 (name "python-pylzma")
20284 (version "0.5.0")
20285 (source
20286 (origin
20287 (method url-fetch)
20288 (uri (pypi-uri "pylzma" version))
20289 (sha256
20290 (base32
20291 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20292 (build-system python-build-system)
20293 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20294 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20295 (description "This package provides Python bindings for the LZMA library
20296 by Igor Pavlov.")
20297 (license license:lgpl2.1+)))
20298
20299 (define-public python2-pylzma
20300 (package-with-python2 python-pylzma))
20301
20302 (define-public python2-zeroconf
20303 (package
20304 (name "python2-zeroconf")
20305
20306 ;; This is the last version that supports Python 2.x.
20307 (version "0.19.1")
20308 (source
20309 (origin
20310 (method url-fetch)
20311 (uri (pypi-uri "zeroconf" version))
20312 (sha256
20313 (base32
20314 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20315 (build-system python-build-system)
20316 (arguments
20317 `(#:python ,python-2
20318 #:phases
20319 (modify-phases %standard-phases
20320 (add-after 'unpack 'patch-requires
20321 (lambda* (#:key inputs #:allow-other-keys)
20322 (substitute* "setup.py"
20323 (("enum-compat")
20324 "enum34"))
20325 #t)))))
20326 (native-inputs
20327 `(("python2-six" ,python2-six)
20328 ("python2-enum32" ,python2-enum34)
20329 ("python2-netifaces" ,python2-netifaces)
20330 ("python2-typing" ,python2-typing)))
20331 (home-page "https://github.com/jstasiak/python-zeroconf")
20332 (synopsis "Pure Python mDNS service discovery")
20333 (description
20334 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20335 compatible).")
20336 (license license:lgpl2.1+)))
20337
20338 (define-public python-bsddb3
20339 (package
20340 (name "python-bsddb3")
20341 (version "6.2.6")
20342 (source
20343 (origin
20344 (method url-fetch)
20345 (uri (pypi-uri "bsddb3" version))
20346 (sha256
20347 (base32
20348 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20349 (build-system python-build-system)
20350 (inputs
20351 `(("bdb" ,bdb)))
20352 (arguments
20353 '(#:phases
20354 (modify-phases %standard-phases
20355 (add-after 'unpack 'configure-locations
20356 (lambda* (#:key inputs #:allow-other-keys)
20357 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20358 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20359 #t))
20360 (replace 'check
20361 (lambda _
20362 (invoke "python3" "test3.py" "-v"))))))
20363 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20364 (synopsis "Python bindings for Oracle Berkeley DB")
20365 (description
20366 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20367 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20368 Transaction objects, and each of these is exposed as a Python type in the
20369 bsddb3.db module. The database objects can use various access methods: btree,
20370 hash, recno, and queue. Complete support of Berkeley DB distributed
20371 transactions. Complete support for Berkeley DB Replication Manager.
20372 Complete support for Berkeley DB Base Replication. Support for RPC.")
20373 (license license:bsd-3)))
20374
20375 (define-public python-dbfread
20376 (package
20377 (name "python-dbfread")
20378 (version "2.0.7")
20379 (source (origin
20380 (method url-fetch)
20381 (uri (pypi-uri "dbfread" version))
20382 (sha256
20383 (base32
20384 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20385 (build-system python-build-system)
20386 (native-inputs
20387 `(("python-pytest" ,python-pytest)))
20388 (home-page "https://dbfread.readthedocs.io")
20389 (synopsis "Read DBF Files with Python")
20390 (description
20391 "This library reads DBF files and returns the data as native Python data
20392 types for further processing. It is primarily intended for batch jobs and
20393 one-off scripts.")
20394 (license license:expat)))
20395
20396 (define-public python-cached-property
20397 (package
20398 (name "python-cached-property")
20399 (version "1.5.1")
20400 (source
20401 (origin
20402 (method url-fetch)
20403 (uri (pypi-uri "cached-property" version))
20404 (sha256
20405 (base32
20406 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20407 (build-system python-build-system)
20408 (arguments
20409 `(#:phases
20410 (modify-phases %standard-phases
20411 ;; https://github.com/pydanny/cached-property/issues/131
20412 ;; recent versions of freezegun break one test
20413 (add-after 'unpack 'disable-broken-test
20414 (lambda _
20415 (substitute* "tests/test_cached_property.py"
20416 (("def test_threads_ttl_expiry\\(self\\)" m)
20417 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20418 " " m)))
20419 #t)))))
20420 (native-inputs
20421 `(("python-freezegun" ,python-freezegun)))
20422 (home-page
20423 "https://github.com/pydanny/cached-property")
20424 (synopsis
20425 "Decorator for caching properties in classes")
20426 (description
20427 "This package provides a decorator which makes caching
20428 time-or-computationally-expensive properties quick and easy and works in Python
20429 2 or 3.")
20430 (license license:bsd-3)))
20431
20432 (define-public python-folium
20433 (package
20434 (name "python-folium")
20435 (version "0.11.0")
20436 (source
20437 (origin
20438 (method url-fetch)
20439 (uri (pypi-uri "folium" version))
20440 (sha256
20441 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20442 (build-system python-build-system)
20443 (propagated-inputs
20444 `(("python-branca" ,python-branca)
20445 ("python-jinja2" ,python-jinja2)
20446 ("python-numpy" ,python-numpy)
20447 ("python-requests" ,python-requests)))
20448 (native-inputs
20449 `(("python-pytest" ,python-pytest)))
20450 (home-page "https://github.com/python-visualization/folium")
20451 (synopsis "Make beautiful maps with Leaflet.js & Python")
20452 (description "@code{folium} makes it easy to visualize data that’s been
20453 manipulated in Python on an interactive leaflet map. It enables both the
20454 binding of data to a map for @code{choropleth} visualizations as well as
20455 passing rich vector/raster/HTML visualizations as markers on the map.
20456
20457 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20458 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20459 supports Image, Video, GeoJSON and TopoJSON overlays.")
20460 (license license:expat)))
20461
20462 (define-public jube
20463 (package
20464 ;; This is a command-line tool, so no "python-" prefix.
20465 (name "jube")
20466 (version "2.2.2")
20467 (source (origin
20468 (method url-fetch)
20469 (uri (string-append
20470 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20471 version))
20472 (sha256
20473 (base32
20474 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20475 (file-name (string-append "jube-" version ".tar.gz"))))
20476 (build-system python-build-system)
20477 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20478 (synopsis "Benchmarking environment")
20479 (description
20480 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20481 benchmarked application, benchmark data is stored in a format that allows JUBE
20482 to deduct the desired information. This data can be parsed by automatic pre-
20483 and post-processing scripts that draw information and store it more densely
20484 for manual interpretation.")
20485 (license license:gpl3+)))
20486
20487 (define-public python-pyroutelib3
20488 (package
20489 (name "python-pyroutelib3")
20490 (version "1.3.post1")
20491 (source
20492 (origin
20493 (method url-fetch)
20494 (uri (pypi-uri "pyroutelib3" version))
20495 (sha256
20496 (base32
20497 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20498 (build-system python-build-system)
20499 (propagated-inputs
20500 `(("python-dateutil" ,python-dateutil)))
20501 (home-page "https://github.com/MKuranowski/pyroutelib3")
20502 (synopsis "Library for simple routing on OSM data")
20503 (description "Library for simple routing on OSM data")
20504 (license license:gpl3+)))
20505
20506 (define-public python-bibtexparser
20507 (package
20508 (name "python-bibtexparser")
20509 (version "1.1.0")
20510 (source
20511 (origin
20512 (method url-fetch)
20513 (uri (pypi-uri "bibtexparser" version))
20514 (sha256
20515 (base32
20516 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20517 (build-system python-build-system)
20518 (propagated-inputs
20519 `(("python-pyparsing" ,python-pyparsing)))
20520 (native-inputs
20521 `(("python-future" ,python-future)))
20522 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20523 (synopsis "Python library to parse BibTeX files")
20524 (description "BibtexParser is a Python library to parse BibTeX files.")
20525 (license (list license:bsd-3 license:lgpl3))))
20526
20527 (define-public python-distro
20528 (package
20529 (name "python-distro")
20530 (version "1.4.0")
20531 (source
20532 (origin
20533 (method url-fetch)
20534 (uri (pypi-uri "distro" version))
20535 (sha256
20536 (base32
20537 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20538 (build-system python-build-system)
20539 (native-inputs
20540 `(("python-pytest" ,python-pytest)))
20541 (home-page "https://github.com/nir0s/distro")
20542 (synopsis
20543 "OS platform information API")
20544 (description
20545 "@code{distro} provides information about the OS distribution it runs on,
20546 such as a reliable machine-readable ID, or version information.
20547
20548 It is the recommended replacement for Python's original
20549 `platform.linux_distribution` function (which will be removed in Python 3.8).
20550 @code{distro} also provides a command-line interface to output the platform
20551 information in various formats.")
20552 (license license:asl2.0)))
20553
20554 (define-public python-cairosvg
20555 (package
20556 (name "python-cairosvg")
20557 (version "2.5.0")
20558 (source
20559 (origin
20560 (method url-fetch)
20561 (uri (pypi-uri "CairoSVG" version))
20562 (sha256
20563 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20564 (build-system python-build-system)
20565 (arguments
20566 `(#:phases
20567 (modify-phases %standard-phases
20568 (replace 'check
20569 (lambda _ (invoke "pytest"))))))
20570 (propagated-inputs
20571 `(("python-cairocffi" ,python-cairocffi)
20572 ("python-cssselect2" ,python-cssselect2)
20573 ("python-defusedxml" ,python-defusedxml)
20574 ("python-pillow" ,python-pillow)
20575 ("python-tinycss2" ,python-tinycss2)))
20576 (native-inputs
20577 `(("python-pytest-flake8" ,python-pytest-flake8)
20578 ("python-pytest-isort" ,python-pytest-isort)
20579 ("python-pytest-runner" ,python-pytest-runner)))
20580 (home-page "https://cairosvg.org/")
20581 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20582 (description "CairoSVG is a SVG converter based on Cairo. It can export
20583 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20584 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20585 parsed, the result is drawn to a Cairo surface that can be exported to
20586 qvarious formats: PDF, PostScript, PNG and even SVG.")
20587 (license license:lgpl3+)))
20588
20589 (define-public python-pyphen
20590 (package
20591 (name "python-pyphen")
20592 (version "0.10.0")
20593 (source
20594 (origin
20595 (method url-fetch)
20596 (uri (pypi-uri "Pyphen" version))
20597 (sha256
20598 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
20599 (build-system python-build-system)
20600 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20601 ;; embedded set provided by upstream - like Debian does.
20602 (home-page "https://github.com/Kozea/Pyphen")
20603 (synopsis "Pure Python module to hyphenate text")
20604 (description "Pyphen is a pure Python module to hyphenate text using
20605 existing Hunspell hyphenation dictionaries.")
20606 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20607
20608 (define-public python-intelhex
20609 (package
20610 (name "python-intelhex")
20611 (version "2.2.1")
20612 (source
20613 (origin
20614 (method url-fetch)
20615 (uri (pypi-uri "intelhex" version))
20616 (sha256
20617 (base32
20618 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20619 (build-system python-build-system)
20620 (arguments '(#:tests? #f)) ;issue with version
20621 (home-page "https://pypi.org/project/IntelHex/")
20622 (synopsis "Python library for Intel HEX files manipulations")
20623 (description "The Intel HEX file format is widely used in microprocessors
20624 and microcontrollers area (embedded systems etc.) as the de facto standard for
20625 representation of code to be programmed into microelectronic devices. This
20626 package provides an intelhex Python library to read, write, create from
20627 scratch and manipulate data from Intel HEX file format. It also includes
20628 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20629 converters and more, those based on the library itself.")
20630 (license license:bsd-3)))
20631
20632 (define-public python-pykwalify
20633 (package
20634 (name "python-pykwalify")
20635 (version "1.7.0")
20636 (source
20637 (origin
20638 (method url-fetch)
20639 (uri (pypi-uri "pykwalify" version))
20640 (sha256
20641 (base32
20642 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20643 (build-system python-build-system)
20644 (arguments '(#:tests? #f)) ;missing dependencies
20645 (propagated-inputs
20646 `(("python-dateutil" ,python-dateutil)
20647 ("python-docopt" ,python-docopt)
20648 ("python-pyyaml" ,python-pyyaml)))
20649 (home-page "https://github.com/grokzen/pykwalify")
20650 (synopsis
20651 "Python lib/cli for JSON/YAML schema validation")
20652 (description
20653 "This package provides a parser, schema validator, and data binding tool
20654 for YAML and JSON.")
20655 (license license:expat)))
20656
20657 (define-public python-dbusmock
20658 (package
20659 (name "python-dbusmock")
20660 (version "0.18.3")
20661 (source
20662 (origin
20663 (method url-fetch)
20664 (uri (pypi-uri "python-dbusmock" version))
20665 (sha256
20666 (base32
20667 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20668 (build-system python-build-system)
20669 (arguments
20670 '(#:phases
20671 (modify-phases %standard-phases
20672 (add-after 'unpack 'patch-shell-path
20673 (lambda _
20674 (substitute* "tests/test_code.py"
20675 (("/bin/bash") (which "bash")))
20676 #t)))))
20677 (native-inputs
20678 `(;; For tests.
20679 ("dbus" ,dbus) ; for dbus-daemon
20680 ("python-nose" ,python-nose)
20681 ("which" ,which)))
20682 (propagated-inputs
20683 `(("python-dbus" ,python-dbus)
20684 ("python-pygobject" ,python-pygobject)))
20685 (home-page "https://github.com/martinpitt/python-dbusmock")
20686 (synopsis "Python library for mock D-Bus objects")
20687 (description "python-dbusmock allows for the easy creation of mock objects on
20688 D-Bus. This is useful for writing tests for software which talks to D-Bus
20689 services such as upower, systemd, logind, gnome-session or others, and it is
20690 hard (or impossible without root privileges) to set the state of the real
20691 services to what you expect in your tests.")
20692 (license license:lgpl3+)))
20693
20694 (define-public python-jsonplus
20695 (package
20696 (name "python-jsonplus")
20697 (version "0.8.0")
20698 (home-page "https://github.com/randomir/jsonplus")
20699 (source (origin
20700 (method url-fetch)
20701 (uri (pypi-uri "jsonplus" version))
20702 (sha256
20703 (base32
20704 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20705 (build-system python-build-system)
20706 ;; XXX: No tests on PyPI, and the repository has no tags.
20707 (arguments '(#:tests? #f))
20708 (propagated-inputs
20709 `(("python-dateutil" ,python-dateutil)
20710 ("python-simplejson" ,python-simplejson)
20711 ("python-sortedcontainers" ,python-sortedcontainers)))
20712 (synopsis "Serialize Python types to/from JSON")
20713 (description
20714 "This package provides functionality to serialize arbitrary data types
20715 to and from JSON. Common data types are implemented and it is easy to
20716 register custom encoders and decoders.")
20717 (license license:expat)))
20718
20719 (define-public python-ujson
20720 (package
20721 (name "python-ujson")
20722 (version "4.0.1")
20723 (source
20724 (origin
20725 (method url-fetch)
20726 (uri (pypi-uri "ujson" version))
20727 (sha256
20728 (base32
20729 "1lr9lbm76y3ah1463jggwg2hjcb709mpns5f752wxxbgnd0n5kr6"))
20730 (modules '((guix build utils)))
20731 (snippet
20732 '(begin (delete-file-recursively "deps") #t))))
20733 (build-system python-build-system)
20734 (arguments
20735 `(#:phases
20736 (modify-phases %standard-phases
20737 (add-after 'unpack 'link-to-system-double-conversion
20738 (lambda* (#:key inputs #:allow-other-keys)
20739 (let ((d-c (assoc-ref inputs "double-conversion")))
20740 (substitute* "setup.py"
20741 (("./deps/double-conversion/double-conversion\"")
20742 (string-append d-c "/include/double-conversion\""))
20743 (("-lstdc++" stdc)
20744 (string-append "-L" d-c "/lib\","
20745 " \"-ldouble-conversion\","
20746 " \"" stdc)))
20747 #t)))
20748 (replace 'check
20749 (lambda* (#:key inputs outputs #:allow-other-keys)
20750 (add-installed-pythonpath inputs outputs)
20751 (invoke "pytest"))))))
20752 (native-inputs
20753 `(("double-conversion" ,double-conversion)
20754 ("python-setuptools-scm" ,python-setuptools-scm)
20755 ("python-pytest" ,python-pytest)))
20756 (home-page "https://github.com/ultrajson/ultrajson")
20757 (synopsis "Ultra fast JSON encoder and decoder for Python")
20758 (description
20759 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20760 bindings for Python 3.")
20761 (license license:bsd-3)))
20762
20763 (define-public python-iocapture
20764 ;; The latest release is more than a year older than this commit.
20765 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20766 (revision "1"))
20767 (package
20768 (name "python-iocapture")
20769 (version "0.1.2")
20770 (source
20771 (origin
20772 (method git-fetch)
20773 (uri (git-reference
20774 (url "https://github.com/oinume/iocapture")
20775 (commit commit)))
20776 (file-name (git-file-name name version))
20777 (sha256
20778 (base32
20779 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20780 (build-system python-build-system)
20781 (arguments
20782 `(#:phases
20783 (modify-phases %standard-phases
20784 (delete 'check)
20785 (add-after 'install 'check
20786 (lambda* (#:key inputs outputs #:allow-other-keys)
20787 (add-installed-pythonpath inputs outputs)
20788 (invoke "py.test" "-v" "tests")
20789 #t)))))
20790 (propagated-inputs
20791 `(("python-flexmock" ,python-flexmock)
20792 ("python-pytest" ,python-pytest)
20793 ("python-pytest-cov" ,python-pytest-cov)
20794 ("python-six" ,python-six)))
20795 (home-page "https://github.com/oinume/iocapture")
20796 (synopsis "Python capturing tool for stdout and stderr")
20797 (description
20798 "This package helps you to capture the standard out (stdout) and the
20799 standard error channel (stderr) in your program.")
20800 (license license:expat))))
20801
20802 (define-public python-argh
20803 ;; There are 21 commits since the latest release containing important
20804 ;; improvements.
20805 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20806 (revision "1"))
20807 (package
20808 (name "python-argh")
20809 (version (git-version "0.26.2" revision commit))
20810 (source
20811 (origin
20812 (method git-fetch)
20813 (uri (git-reference
20814 (url "https://github.com/neithere/argh")
20815 (commit commit)))
20816 (file-name (git-file-name name version))
20817 (sha256
20818 (base32
20819 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20820 (build-system python-build-system)
20821 (propagated-inputs
20822 `(("python-iocapture" ,python-iocapture)
20823 ("python-mock" ,python-mock)
20824 ("python-pytest" ,python-pytest)
20825 ("python-pytest-cov" ,python-pytest-cov)
20826 ("python-pytest-xdist" ,python-pytest-xdist)
20827 ("python-tox" ,python-tox)))
20828 (home-page "https://github.com/neithere/argh/")
20829 (synopsis "Argparse wrapper with natural syntax")
20830 (description
20831 "python-argh is a small library that provides several layers of
20832 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20833 always possible to declare a command with the highest possible (and least
20834 flexible) layer and then tune the behaviour with any of the lower layers
20835 including the native API of @code{python-argparse}.")
20836 (license license:lgpl3+))))
20837
20838 (define-public python-ppft
20839 (package
20840 (name "python-ppft")
20841 (version "1.6.6.1")
20842 (source
20843 (origin
20844 (method url-fetch)
20845 (uri (pypi-uri "ppft" version))
20846 (sha256
20847 (base32
20848 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20849 (build-system python-build-system)
20850 (arguments '(#:tests? #f)) ; there are none
20851 (propagated-inputs
20852 `(("python-six" ,python-six)))
20853 (home-page "https://pypi.org/project/ppft/")
20854 (synopsis "Fork of Parallel Python")
20855 (description
20856 "This package is a fork of Parallel Python. The Parallel Python
20857 module (@code{pp}) provides an easy and efficient way to create
20858 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20859 computers and clusters. It features cross-platform portability and dynamic
20860 load balancing.")
20861 (license license:bsd-3)))
20862
20863 (define-public python-pox
20864 (package
20865 (name "python-pox")
20866 (version "0.2.7")
20867 (source
20868 (origin
20869 (method url-fetch)
20870 (uri (pypi-uri "pox" version))
20871 (sha256
20872 (base32
20873 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20874 (build-system python-build-system)
20875 (arguments
20876 `(#:phases
20877 (modify-phases %standard-phases
20878 (replace 'check
20879 (lambda _
20880 (mkdir-p "/tmp/guix")
20881 (setenv "SHELL" "bash")
20882 (setenv "USERNAME" "guix")
20883 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20884 (invoke "py.test" "-vv")
20885 #t)))))
20886 (native-inputs
20887 `(("python-pytest" ,python-pytest)
20888 ("which" ,which)))
20889 (home-page "https://pypi.org/project/pox/")
20890 (synopsis "Python utilities for file system exploration and automated builds")
20891 (description
20892 "Pox provides a collection of utilities for navigating and manipulating
20893 file systems. This module is designed to facilitate some of the low-level
20894 operating system interactions that are useful when exploring a file system on a
20895 remote host. Pox provides Python equivalents of several shell commands such
20896 as @command{which} and @command{find}. These commands allow automated
20897 discovery of what has been installed on an operating system, and where the
20898 essential tools are located.")
20899 (license license:bsd-3)))
20900
20901 (define-public python-pathos
20902 (package
20903 (name "python-pathos")
20904 (version "0.2.5")
20905 (source
20906 (origin
20907 (method url-fetch)
20908 (uri (pypi-uri "pathos" version))
20909 (sha256
20910 (base32
20911 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20912 (build-system python-build-system)
20913 (arguments
20914 '(#:phases
20915 (modify-phases %standard-phases
20916 (replace 'check
20917 (lambda _
20918 (setenv "PYTHONPATH"
20919 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20920 (invoke "python" "./tests/__main__.py"))))))
20921 (propagated-inputs
20922 `(("python-dill" ,python-dill)
20923 ("python-multiprocess" ,python-multiprocess)
20924 ("python-pox" ,python-pox)
20925 ("python-ppft" ,python-ppft)))
20926 (native-inputs
20927 `(("python-pytest" ,python-pytest)))
20928 (home-page "https://pypi.org/project/pathos/")
20929 (synopsis
20930 "Parallel graph management and execution in heterogeneous computing")
20931 (description
20932 "Python-pathos is a framework for heterogeneous computing. It provides a
20933 consistent high-level interface for configuring and launching parallel
20934 computations across heterogeneous resources. Python-pathos provides configurable
20935 launchers for parallel and distributed computing, where each launcher contains
20936 the syntactic logic to configure and launch jobs in an execution environment.")
20937 (license license:bsd-3)))
20938
20939 (define-public python-flit
20940 (package
20941 (name "python-flit")
20942 (version "3.0.0")
20943 (source
20944 (origin
20945 (method url-fetch)
20946 (uri (pypi-uri "flit" version))
20947 (sha256
20948 (base32
20949 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
20950 (build-system python-build-system)
20951 (arguments
20952 `(#:tests? #f)) ; XXX: Check requires network access.
20953 (home-page "https://flit.readthedocs.io/")
20954 (synopsis
20955 "Simple packaging tool for simple packages")
20956 (description
20957 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20958 packages a single importable module or package at a time, using the import
20959 name as the name on PyPI. All subpackages and data files within a package
20960 are included automatically.")
20961 (license license:bsd-3)))
20962
20963 (define-public python-pathtools
20964 (package
20965 (name "python-pathtools")
20966 (version "0.1.2")
20967 (source
20968 (origin
20969 (method url-fetch)
20970 (uri (pypi-uri "pathtools" version))
20971 (sha256
20972 (base32
20973 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20974 (build-system python-build-system)
20975 (home-page
20976 "https://github.com/gorakhargosh/pathtools")
20977 (synopsis "Path utilities for Python")
20978 (description "Pattern matching and various utilities for file systems
20979 paths.")
20980 (license license:expat)))
20981
20982 (define-public python-fastentrypoints
20983 (package
20984 (name "python-fastentrypoints")
20985 (version "0.12")
20986 (source
20987 (origin
20988 (method url-fetch)
20989 (uri (pypi-uri "fastentrypoints" version))
20990 (sha256
20991 (base32
20992 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20993 (build-system python-build-system)
20994 (home-page
20995 "https://github.com/ninjaaron/fast-entry_points")
20996 (synopsis
20997 "Makes entry_points specified in setup.py load more quickly")
20998 (description
20999 "Using entry_points in your setup.py makes scripts that start really
21000 slowly because it imports pkg_resources. This package allows such setup
21001 scripts to load entry points more quickly.")
21002 (license license:bsd-3)))
21003
21004 (define-public python-funcparserlib
21005 (package
21006 (name "python-funcparserlib")
21007 (version "0.3.6")
21008 (source
21009 (origin
21010 (method url-fetch)
21011 (uri (pypi-uri "funcparserlib" version))
21012 (sha256
21013 (base32
21014 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21015 (native-inputs
21016 `(("python-tox" ,python-tox)))
21017 (arguments
21018 `(#:phases
21019 (modify-phases %standard-phases
21020 (replace 'check
21021 (lambda _
21022 (invoke "tox"))))))
21023 (build-system python-build-system)
21024 (home-page
21025 "https://github.com/vlasovskikh/funcparserlib")
21026 (synopsis
21027 "Recursive descent parsing library based on functional combinators")
21028 (description
21029 "This package is a recursive descent parsing library for Python based on
21030 functional combinators. Parser combinators are just higher-order functions
21031 that take parsers as their arguments and return them as result values.")
21032 (license license:expat)))
21033
21034 (define-public python-speg
21035 (package
21036 (name "python-speg")
21037 (version "0.3")
21038 (source
21039 (origin
21040 (method url-fetch)
21041 (uri (pypi-uri "speg" version ".zip"))
21042 (sha256
21043 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21044 (arguments
21045 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21046 (native-inputs
21047 `(("unzip" ,unzip)))
21048 (build-system python-build-system)
21049 (home-page "https://github.com/avakar/speg")
21050 (synopsis "PEG-based parser interpreter with memoization")
21051 (description "This package is a PEG-based parser and interpreter with
21052 memoization.")
21053 (license license:expat)))
21054
21055 (define-public python-cson
21056 (package
21057 (name "python-cson")
21058 (version "0.8")
21059 (source
21060 (origin
21061 (method url-fetch)
21062 (uri (pypi-uri "cson" version))
21063 (sha256
21064 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21065 (build-system python-build-system)
21066 (propagated-inputs
21067 `(("python-speg" ,python-speg)))
21068 (home-page "https://github.com/avakar/pycson")
21069 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21070 (description "This package is a parser for Coffeescript Object
21071 Notation (CSON).")
21072 (license license:expat)))
21073
21074 (define-public python-asynctest
21075 (package
21076 (name "python-asynctest")
21077 (version "0.13.0")
21078 (source
21079 (origin
21080 (method url-fetch)
21081 (uri (pypi-uri "asynctest" version))
21082 (sha256
21083 (base32
21084 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21085 (build-system python-build-system)
21086 (arguments
21087 '(#:phases
21088 (modify-phases %standard-phases
21089 (replace 'check
21090 (lambda _
21091 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21092 (add-after 'unpack 'disable-tests
21093 (lambda* _
21094 ;; XXX: 7 tests fail out of 220. Disable them for now.
21095 (substitute* (list "test/test_selector.py"
21096 "test/test_mock.py")
21097 (("def test_events_watched_outside_test_are_ignored")
21098 "@unittest.skip('disabled by guix')
21099 def test_events_watched_outside_test_are_ignored")
21100 (("def test_awaited_from_autospec_mock.*" line)
21101 (string-append line " return True\n"))
21102 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21103 (string-append line " return True\n"))
21104 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21105 (string-append line " return True\n"))
21106 (("def test_multiple_patches_on_coroutine.*" line)
21107 (string-append line " return True\n"))
21108 (("def test_patch_coroutine_only_when_running.*" line)
21109 (string-append line " return True\n")))
21110 #t)))))
21111 (home-page "https://github.com/Martiusweb/asynctest")
21112 (synopsis "Extension of unittest for testing asyncio libraries")
21113 (description
21114 "The package asynctest is built on top of the standard unittest module
21115 and cuts down boilerplate code when testing libraries for asyncio.")
21116 (license license:asl2.0)))
21117
21118 (define-public python-aionotify
21119 (package
21120 (name "python-aionotify")
21121 (version "0.2.0")
21122 (source
21123 (origin
21124 ;; Source tarball on PyPi lacks tests
21125 (method git-fetch)
21126 (uri (git-reference
21127 (url "https://github.com/rbarrois/aionotify")
21128 (commit (string-append "v" version))))
21129 (file-name (git-file-name name version))
21130 (sha256
21131 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21132 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21133 (build-system python-build-system)
21134 (home-page "https://github.com/rbarrois/aionotify")
21135 (synopsis "Asyncio-powered inotify library")
21136 (description
21137 "@code{aionotify} is a simple, asyncio-based inotify library.")
21138 (license license:bsd-3)))
21139
21140 (define-public python-forbiddenfruit
21141 (package
21142 (name "python-forbiddenfruit")
21143 (version "0.1.3")
21144 (source
21145 (origin
21146 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21147 (method git-fetch)
21148 (uri (git-reference
21149 (url "https://github.com/clarete/forbiddenfruit")
21150 (commit version)))
21151 (file-name (git-file-name name version))
21152 (sha256
21153 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21154 (build-system python-build-system)
21155 (arguments
21156 '(#:phases
21157 (modify-phases %standard-phases
21158 (replace 'check
21159 (lambda _
21160 (invoke "make" "SKIP_DEPS=1"))))))
21161 (native-inputs
21162 `(("python-nose" ,python-nose)
21163 ("python-coverage" ,python-coverage)))
21164 (home-page "https://github.com/clarete/forbiddenfruit")
21165 (synopsis "Patch python built-in objects")
21166 (description "This project allows Python code to extend built-in types.")
21167 (license (list license:gpl3+ license:expat))))
21168
21169 (define-public python-shouldbe
21170 (package
21171 (name "python-shouldbe")
21172 (version "0.1.2")
21173 (source
21174 (origin
21175 (method url-fetch)
21176 (uri (pypi-uri "shouldbe" version))
21177 (sha256
21178 (base32
21179 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21180 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21181 (build-system python-build-system)
21182 (propagated-inputs
21183 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21184 (native-inputs
21185 `(("python-nose" ,python-nose)))
21186 (home-page "https://github.com/directxman12/should_be")
21187 (synopsis "Python Assertion Helpers inspired by Shouldly")
21188 (description
21189 "Python Assertion Helpers inspired by Shouldly.")
21190 (license license:isc)))
21191
21192 (define-public python-k5test
21193 (package
21194 (name "python-k5test")
21195 (version "0.9.2")
21196 (source
21197 (origin
21198 (method url-fetch)
21199 (uri (pypi-uri "k5test" version))
21200 (sha256
21201 (base32
21202 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21203 (build-system python-build-system)
21204 (propagated-inputs
21205 `(("python-six" ,python-six)
21206 ;; `which`, `kadmin.local` binaries called inside library
21207 ("which" ,which)
21208 ("mit-krb5" ,mit-krb5)))
21209 (native-inputs `(("mit-krb5" ,mit-krb5)))
21210 (arguments
21211 '(#:phases
21212 (modify-phases %standard-phases
21213 (add-after 'unpack 'patch-paths
21214 (lambda* _
21215 (substitute* "k5test/realm.py"
21216 (("'kadmin_local'") "'kadmin.local'")))))))
21217 (home-page "https://github.com/pythongssapi/k5test")
21218 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21219 (description
21220 "@code{k5test} is a library for setting up self-contained Kerberos 5
21221 environments, and running Python unit tests inside those environments. It is
21222 based on the file of the same name found alongside the MIT Kerberos 5 unit
21223 tests.")
21224 (license license:isc)))
21225
21226 (define-public python-gssapi
21227 (package
21228 (name "python-gssapi")
21229 (version "1.6.9")
21230 (source
21231 (origin
21232 (method url-fetch)
21233 (uri (pypi-uri "gssapi" version))
21234 (sha256
21235 (base32
21236 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21237 (build-system python-build-system)
21238 (arguments
21239 `(#:phases
21240 (modify-phases %standard-phases
21241 ;; Work around
21242 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21243 (add-before 'check 'disable-failing-tests
21244 (lambda _
21245 (let ((reason "Disabled failing test (see: \
21246 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21247 (substitute* "gssapi/tests/test_high_level.py"
21248 ((".*def test_add_with_impersonate.*" all)
21249 (string-append all " self.skipTest('" reason "')\n")))
21250 (substitute* "gssapi/tests/test_raw.py"
21251 ((".*def test_.*impersonate_name.*" all)
21252 (string-append all " self.skipTest('" reason "')\n")))
21253 #t))))))
21254 (propagated-inputs
21255 `(("python-decorator" ,python-decorator)
21256 ("python-six" ,python-six)))
21257 (inputs
21258 `(("mit-krb5" ,mit-krb5)))
21259 ;; for tests
21260 (native-inputs
21261 `(("python-shouldbe" ,python-shouldbe)
21262 ("python-parameterized" ,python-parameterized)
21263 ("python-k5test" ,python-k5test)
21264 ("python-nose" ,python-nose)))
21265 (home-page "https://github.com/pythongssapi/python-gssapi")
21266 (synopsis "Python GSSAPI Wrapper")
21267 (description
21268 "Python-GSSAPI provides both low-level and high level wrappers around the
21269 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21270 also be usable with other GSSAPI mechanisms.")
21271 (license license:isc)))
21272
21273 (define-public python-check-manifest
21274 (package
21275 (name "python-check-manifest")
21276 (version "0.37")
21277 (source
21278 (origin
21279 (method url-fetch)
21280 (uri (pypi-uri "check-manifest" version))
21281 (sha256
21282 (base32
21283 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21284 (build-system python-build-system)
21285 (native-inputs
21286 `(("python-mock" ,python-mock)
21287 ("git" ,git)))
21288 (home-page "https://github.com/mgedmin/check-manifest")
21289 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21290 (description "Python package can include a MANIFEST.in file to help with
21291 sending package files to the Python Package Index. This package checks that
21292 file to ensure it completely and accurately describes your project.")
21293 (license license:expat)))
21294
21295 (define-public python-android-stringslib
21296 (package
21297 (name "python-android-stringslib")
21298 (version "0.1.2")
21299 (source
21300 (origin
21301 (method git-fetch)
21302 (uri (git-reference
21303 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21304 (commit (string-append "v" version))))
21305 (file-name (git-file-name name version))
21306 (sha256
21307 (base32
21308 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21309 (build-system python-build-system)
21310 (arguments
21311 `(#:tests? #f))
21312 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21313 (synopsis "Android strings.xml support")
21314 (description "Android Strings Lib provides support for android's strings.xml
21315 files. These files are used to translate strings in android apps.")
21316 (license license:expat)))
21317
21318 (define-public python-watchdog
21319 (package
21320 (name "python-watchdog")
21321 (version "0.9.0")
21322 (source
21323 (origin
21324 (method url-fetch)
21325 (uri (pypi-uri "watchdog" version))
21326 (sha256
21327 (base32
21328 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21329 (build-system python-build-system)
21330 (arguments
21331 `(#:phases
21332 (modify-phases %standard-phases
21333 (add-before 'check 'remove-failing
21334 (lambda _
21335 (delete-file "tests/test_inotify_buffer.py")
21336 (delete-file "tests/test_snapshot_diff.py")
21337 #t)))))
21338 (propagated-inputs
21339 `(("python-argh" ,python-argh)
21340 ("python-pathtools" ,python-pathtools)
21341 ("python-pyyaml" ,python-pyyaml)))
21342 (native-inputs
21343 `(("python-pytest-cov" ,python-pytest-cov)
21344 ("python-pytest-timeout" ,python-pytest-timeout)))
21345 (home-page "https://github.com/gorakhargosh/watchdog")
21346 (synopsis "File system events monitoring")
21347 (description "This package provides a way to monitor file system events
21348 such as a file modification and trigger an action. This is similar to inotify,
21349 but portable.")
21350 (license license:asl2.0)))
21351
21352 (define-public python-watchgod
21353 (package
21354 (name "python-watchgod")
21355 (version "0.6")
21356 (source
21357 (origin
21358 ;; There are no tests in the PyPI tarball.
21359 (method git-fetch)
21360 (uri (git-reference
21361 (url "https://github.com/samuelcolvin/watchgod")
21362 (commit (string-append "v" version))))
21363 (file-name (git-file-name name version))
21364 (sha256
21365 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21366 (build-system python-build-system)
21367 (arguments
21368 `(#:phases
21369 (modify-phases %standard-phases
21370 (replace 'check
21371 (lambda _
21372 (invoke "pytest" "-vv"))))))
21373 (native-inputs
21374 `(("python-coverage" ,python-coverage)
21375 ("python-docutils" ,python-docutils)
21376 ("python-flake8" ,python-flake8)
21377 ("python-isort" ,python-isort)
21378 ("python-pycodestyle" ,python-pycodestyle)
21379 ("python-pyflakes" ,python-pyflakes)
21380 ("python-pygments" ,python-pygments)
21381 ("python-pytest" ,python-pytest)
21382 ("python-pytest-cov" ,python-pytest-cov)
21383 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21384 ("python-pytest-mock" ,python-pytest-mock)
21385 ("python-pytest-sugar" ,python-pytest-sugar)
21386 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21387 (home-page "https://github.com/samuelcolvin/watchgod")
21388 (synopsis "Simple, modern file watching and code reload in Python")
21389 (description
21390 "Simple, modern file watching and code reload in Python inspired by
21391 @code{watchdog}. Among the differences are a unified approach for each
21392 operating systems and an elegant approach to concurrency using threading.")
21393 (license license:expat)))
21394
21395 (define-public python-wget
21396 (package
21397 (name "python-wget")
21398 (version "3.2")
21399 (source
21400 (origin
21401 (method url-fetch)
21402 (uri (pypi-uri "wget" version ".zip"))
21403 (sha256
21404 (base32
21405 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21406 (build-system python-build-system)
21407 (native-inputs `(("unzip" ,unzip)))
21408 (home-page "https://bitbucket.org/techtonik/python-wget/")
21409 (synopsis "Pure Python download utility")
21410 (description "The python-wget library provides an API to download files
21411 with features similar to the @command{wget} utility.")
21412 (license license:unlicense)))
21413
21414 (define-public offlate
21415 (package
21416 (name "offlate")
21417 (version "0.5")
21418 (source
21419 (origin
21420 (method git-fetch)
21421 (uri (git-reference
21422 (url "https://framagit.org/tyreunom/offlate")
21423 (commit version)))
21424 (file-name (git-file-name name version))
21425 (sha256
21426 (base32
21427 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21428 (build-system python-build-system)
21429 (arguments
21430 ;; No tests
21431 `(#:tests? #f))
21432 (propagated-inputs
21433 `(("python-android-stringslib" ,python-android-stringslib)
21434 ("python-dateutil" ,python-dateutil)
21435 ("python-gitlab" ,python-gitlab)
21436 ("python-lxml" ,python-lxml)
21437 ("python-polib" ,python-polib)
21438 ("python-pyenchant" ,python-pyenchant)
21439 ("python-pygit2" ,python-pygit2)
21440 ("python-pygithub" ,python-pygithub)
21441 ("python-pyqt" ,python-pyqt)
21442 ("python-requests" ,python-requests)
21443 ("python-ruamel.yaml" ,python-ruamel.yaml)
21444 ("python-translation-finder" ,python-translation-finder)
21445 ("python-watchdog" ,python-watchdog)))
21446 (native-inputs
21447 `(("qttools" ,qttools)))
21448 (home-page "https://framagit.org/tyreunom/offlate")
21449 (synopsis "Offline translation interface for online translation tools")
21450 (description "Offlate offers a unified interface for different translation
21451 file formats, as well as many different online translation platforms. You can
21452 use it to get work from online platforms, specialized such as the Translation
21453 Project, or not such a gitlab instance when your upstream doesn't use any
21454 dedicated platform. The tool proposes a unified interface for any format and
21455 an upload option to send your work back to the platform.")
21456 (license license:gpl3+)))
21457
21458 (define-public python-titlecase
21459 (package
21460 (name "python-titlecase")
21461 (version "0.12.0")
21462 (source
21463 (origin
21464 (method url-fetch)
21465 (uri (pypi-uri "titlecase" version))
21466 (sha256
21467 (base32
21468 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21469 (build-system python-build-system)
21470 (native-inputs
21471 `(("python-nose" ,python-nose)))
21472 (home-page "https://github.com/ppannuto/python-titlecase")
21473 (synopsis "Capitalize strings similar to book titles")
21474 (description
21475 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21476 It capitalizes (predominantly English) strings in a way that is similar to
21477 book titles, using the New York Times Manual of Style to leave certain words
21478 lowercase.")
21479 (license license:expat)))
21480
21481 (define-public python-pypng
21482 (package
21483 (name "python-pypng")
21484 (version "0.0.20")
21485 (source
21486 (origin
21487 (method url-fetch)
21488 (uri (pypi-uri "pypng" version))
21489 (sha256
21490 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21491 (build-system python-build-system)
21492 (home-page "https://github.com/drj11/pypng")
21493 (synopsis "Pure Python PNG image encoder/decoder")
21494 (description
21495 "The PyPNG module implements support for PNG images. It reads and writes
21496 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21497 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21498 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21499 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21500 A number of optional chunks can be specified (when writing) and
21501 understood (when reading): tRNS, bKGD, gAMA.
21502
21503 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21504 aim at being a replacement or competitor. Its strength lies in fine-grained
21505 extensive support of PNG features. It can also read and write Netpbm PAM
21506 files, with a focus on its use as an intermediate format for implementing
21507 custom PNG processing.")
21508 (license license:expat)))
21509
21510 (define-public python-fuzzywuzzy
21511 (package
21512 (name "python-fuzzywuzzy")
21513 (version "0.18.0")
21514 (source
21515 (origin
21516 (method url-fetch)
21517 (uri (pypi-uri "fuzzywuzzy" version))
21518 (sha256
21519 (base32
21520 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21521 (build-system python-build-system)
21522 (native-inputs
21523 `(("python-hypothesis" ,python-hypothesis)
21524 ("python-pycodestyle" ,python-pycodestyle)
21525 ("python-pytest" ,python-pytest)))
21526 (propagated-inputs
21527 `(("python-levenshtein" ,python-levenshtein)))
21528 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21529 (synopsis "Fuzzy string matching in Python")
21530 (description "Approximate string matching using
21531 @emph{Levenshtein Distance} to calculate the differences between
21532 sequences.")
21533 (license license:gpl2)))
21534
21535 (define-public python2-fuzzywuzzy
21536 (package-with-python2 python-fuzzywuzzy))
21537
21538 (define-public python-block-tracing
21539 (package
21540 (name "python-block-tracing")
21541 (version "1.0.1")
21542 (source
21543 (origin
21544 (method url-fetch)
21545 (uri (pypi-uri "block_tracing" version))
21546 (sha256
21547 (base32
21548 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21549 (build-system python-build-system)
21550 (arguments '(#:tests? #f)) ; no tests
21551 (home-page "https://github.com/rianhunter/block_tracing")
21552 (synopsis "Protect process memory")
21553 (description
21554 "@code{block_tracing} is a tiny Python library that can be used to
21555 prevent debuggers and other applications from inspecting the memory within
21556 your process.")
21557 (license license:expat)))
21558
21559 (define-public python-gcovr
21560 (package
21561 (name "python-gcovr")
21562 (version "4.2")
21563 (source
21564 (origin
21565 (method url-fetch)
21566 (uri (pypi-uri "gcovr" version))
21567 (sha256
21568 (base32
21569 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21570 (build-system python-build-system)
21571 (propagated-inputs
21572 `(("python-lxml" ,python-lxml)
21573 ("python-jinja2" ,python-jinja2)))
21574 (home-page "https://gcovr.com/")
21575 (synopsis "Utility for generating code coverage results")
21576 (description
21577 "Gcovr provides a utility for managing the use of the GNU gcov
21578 utility and generating summarized code coverage results. It is inspired
21579 by the Python coverage.py package, which provides a similar utility for
21580 Python.")
21581 (license license:bsd-3)))
21582
21583 (define-public python-owslib
21584 (package
21585 (name "python-owslib")
21586 (version "0.19.2")
21587 (source
21588 (origin
21589 (method url-fetch)
21590 (uri (pypi-uri "OWSLib" version))
21591 (sha256
21592 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21593 (build-system python-build-system)
21594 (arguments
21595 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21596 (synopsis "Interface for Open Geospatial Consortium web service")
21597 (description
21598 "OWSLib is a Python package for client programming with Open Geospatial
21599 Consortium (OGC) web service (hence OWS) interface standards, and their related
21600 content models.")
21601 (home-page "https://geopython.github.io/OWSLib/")
21602 (license license:bsd-3)))
21603
21604 (define-public python-docusign-esign
21605 (package
21606 (name "python-docusign-esign")
21607 (version "3.1.0")
21608 (source (origin
21609 (method url-fetch)
21610 (uri (pypi-uri "docusign_esign" version))
21611 (sha256
21612 (base32
21613 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21614 (build-system python-build-system)
21615 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21616 (arguments `(#:tests? #f))
21617 (propagated-inputs
21618 `(("python-certifi" ,python-certifi)
21619 ("python-six" ,python-six)
21620 ("python-dateutil" ,python-dateutil)
21621 ("python-urllib3" ,python-urllib3)
21622 ("python-pyjwt" ,python-pyjwt)
21623 ("python-cryptography" ,python-cryptography)
21624 ("python-nose" ,python-nose)))
21625 (synopsis "DocuSign Python Client")
21626 (description "The Official DocuSign Python Client Library used to interact
21627 with the eSign REST API. Send, sign, and approve documents using this client.")
21628 (home-page "https://www.docusign.com/devcenter")
21629 (license license:expat)))
21630
21631 (define-public python-xattr
21632 (package
21633 (name "python-xattr")
21634 (version "0.9.7")
21635 (source
21636 (origin
21637 (method url-fetch)
21638 (uri (pypi-uri "xattr" version))
21639 (sha256
21640 (base32
21641 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21642 (build-system python-build-system)
21643 (propagated-inputs
21644 `(("python-cffi" ,python-cffi)))
21645 (home-page "https://github.com/xattr/xattr")
21646 (synopsis
21647 "Python wrapper for extended file system attributes")
21648 (description "This package provides a Python wrapper for using extended
21649 file system attributes. Extended attributes extend the basic attributes of files
21650 and directories in the file system. They are stored as name:data pairs
21651 associated with file system objects (files, directories, symlinks, etc).")
21652 (license license:expat)))
21653
21654 (define-public python-json-logger
21655 (package
21656 (name "python-json-logger")
21657 (version "0.1.11")
21658 (source
21659 (origin
21660 (method url-fetch)
21661 (uri (pypi-uri "python-json-logger" version))
21662 (sha256
21663 (base32
21664 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21665 (build-system python-build-system)
21666 (home-page
21667 "https://github.com/madzak/python-json-logger")
21668 (synopsis "JSON log formatter in Python")
21669 (description "This library allows standard Python logging to output log data
21670 as JSON objects. With JSON we can make our logs more readable by machines and
21671 we can stop writing custom parsers for syslog-type records.")
21672 (license license:bsd-3)))
21673
21674 (define-public python-daiquiri
21675 (package
21676 (name "python-daiquiri")
21677 (version "2.1.1")
21678 (source
21679 (origin
21680 (method url-fetch)
21681 (uri (pypi-uri "daiquiri" version))
21682 (sha256
21683 (base32
21684 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21685 (build-system python-build-system)
21686 (propagated-inputs
21687 `(("python-json-logger" ,python-json-logger)))
21688 (native-inputs
21689 `(("python-mock" ,python-mock)
21690 ("python-pytest" ,python-pytest)
21691 ("python-setuptools-scm" ,python-setuptools-scm)
21692 ("python-six" ,python-six)))
21693 (home-page "https://github.com/jd/daiquiri")
21694 (synopsis
21695 "Library to configure Python logging easily")
21696 (description "The daiquiri library provides an easy way to configure
21697 logging in Python. It also provides some custom formatters and handlers.")
21698 (license license:asl2.0)))
21699
21700 (define-public python-pifpaf
21701 (package
21702 (name "python-pifpaf")
21703 (version "2.5.0")
21704 (source
21705 (origin
21706 (method url-fetch)
21707 (uri (pypi-uri "pifpaf" version))
21708 (sha256
21709 (base32
21710 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21711 (build-system python-build-system)
21712 (arguments
21713 '(#:phases
21714 (modify-phases %standard-phases
21715 (replace 'check
21716 (lambda _
21717 (invoke "python" "setup.py" "testr" "--slowest"
21718 "--testr-args=until-failure"))))))
21719 (propagated-inputs
21720 `(("python-click" ,python-click)
21721 ("python-daiquiri" ,python-daiquiri)
21722 ("python-fixtures" ,python-fixtures)
21723 ("python-jinja2" ,python-jinja2)
21724 ("python-pbr" ,python-pbr)
21725 ("python-psutil" ,python-psutil)
21726 ("python-six" ,python-six)
21727 ("python-xattr" ,python-xattr)))
21728 (native-inputs
21729 `(("python-mock" ,python-mock)
21730 ("python-os-testr" ,python-os-testr)
21731 ("python-requests" ,python-requests)
21732 ("python-testrepository" ,python-testrepository)
21733 ("python-testtools" ,python-testtools)))
21734 (home-page "https://github.com/jd/pifpaf")
21735 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21736 (description "Pifpaf is a suite of fixtures and a command-line tool that
21737 starts and stops daemons for a quick throw-away usage. This is typically
21738 useful when needing these daemons to run integration testing. It originally
21739 evolved from its precursor @code{overtest}.")
21740 (license license:asl2.0)))
21741
21742 (define-public python-pytest-check-links
21743 (package
21744 (name "python-pytest-check-links")
21745 (version "0.3.0")
21746 (source
21747 (origin
21748 (method url-fetch)
21749 ;; URI uses underscores
21750 (uri (pypi-uri "pytest_check_links" version))
21751 (sha256
21752 (base32
21753 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21754 (build-system python-build-system)
21755 (propagated-inputs
21756 `(("python-docutils" ,python-docutils)
21757 ("python-html5lib" ,python-html5lib)
21758 ("python-nbconvert" ,python-nbconvert)
21759 ("python-nbformat" ,python-nbformat)
21760 ("python-pytest" ,python-pytest)
21761 ("python-six" ,python-six)))
21762 (native-inputs
21763 `(("python-pbr-minimal" ,python-pbr-minimal)))
21764 (home-page "https://github.com/minrk/pytest-check-links")
21765 (synopsis "Check links in files")
21766 (description "This package provides a pytest plugin that checks URLs for
21767 HTML-containing files.")
21768 (license license:bsd-3)))
21769
21770 (define-public python-json5
21771 (package
21772 (name "python-json5")
21773 (version "0.8.5")
21774 (source
21775 (origin
21776 ;; sample.json5 is missing from PyPi source tarball
21777 (method git-fetch)
21778 (uri (git-reference
21779 (url "https://github.com/dpranke/pyjson5")
21780 (commit (string-append "v" version))))
21781 (file-name (git-file-name name version))
21782 (sha256
21783 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21784 (build-system python-build-system)
21785 (home-page "https://github.com/dpranke/pyjson5")
21786 (synopsis
21787 "Python implementation of the JSON5 data format")
21788 (description
21789 "JSON5 extends the JSON data interchange format to make it slightly more
21790 usable as a configuration language. This Python package implements parsing and
21791 dumping of JSON5 data structures.")
21792 (license license:asl2.0)))
21793
21794 (define-public python-frozendict
21795 (package
21796 (name "python-frozendict")
21797 (version "1.2")
21798 (source
21799 (origin
21800 (method url-fetch)
21801 (uri (pypi-uri "frozendict" version))
21802 (sha256
21803 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21804 (build-system python-build-system)
21805 (home-page "https://github.com/slezica/python-frozendict")
21806 (synopsis "Simple immutable mapping for Python")
21807 (description
21808 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21809 implements the complete mapping interface. It can be used as a drop-in
21810 replacement for dictionaries where immutability is desired.")
21811 (license license:expat)))
21812
21813 (define-public python-unpaddedbase64
21814 (package
21815 (name "python-unpaddedbase64")
21816 (version "1.1.0")
21817 (source
21818 (origin
21819 (method git-fetch)
21820 (uri (git-reference
21821 (url "https://github.com/matrix-org/python-unpaddedbase64")
21822 (commit (string-append "v" version))))
21823 (file-name (git-file-name name version))
21824 (sha256
21825 (base32
21826 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21827 (build-system python-build-system)
21828 (home-page "https://pypi.org/project/unpaddedbase64/")
21829 (synopsis "Encode and decode Base64 without “=” padding")
21830 (description
21831 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21832 using “=” characters. However this conveys no benefit so many protocols
21833 choose to use Base64 without the “=” padding.")
21834 (license license:asl2.0)))
21835
21836 (define-public python-py-cpuinfo
21837 (package
21838 (name "python-py-cpuinfo")
21839 (version "5.0.0")
21840 (source
21841 (origin
21842 (method url-fetch)
21843 (uri (pypi-uri "py-cpuinfo" version))
21844 (sha256
21845 (base32
21846 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21847 (build-system python-build-system)
21848 (home-page "https://github.com/workhorsy/py-cpuinfo")
21849 (synopsis "Get CPU info with Python")
21850 (description
21851 "This Python module returns the CPU info by using the best sources of
21852 information for your operating system.")
21853 (license license:expat)))
21854
21855 (define-public python-canonicaljson
21856 (package
21857 (name "python-canonicaljson")
21858 (version "1.4.0")
21859 (source
21860 (origin
21861 (method url-fetch)
21862 (uri (pypi-uri "canonicaljson" version))
21863 (sha256
21864 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21865 (build-system python-build-system)
21866 (propagated-inputs
21867 `(("python-six" ,python-six)
21868 ("python-frozendict" ,python-frozendict)
21869 ("python-simplejson" ,python-simplejson)))
21870 (home-page "https://github.com/matrix-org/python-canonicaljson")
21871 (synopsis "Canonical JSON")
21872 (description
21873 "Deterministically encode JSON.
21874
21875 @itemize
21876 @item Encodes objects and arrays as RFC 7159 JSON.
21877 @item Sorts object keys so that you get the same result each time.
21878 @item Has no insignificant whitespace to make the output as small as possible.
21879 @item Escapes only the characters that must be escaped, U+0000 to
21880 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21881 @item Uses the shortest escape sequence for each escaped character.
21882 @item Encodes the JSON as UTF-8.
21883 @item Can encode frozendict immutable dictionaries.
21884 @end itemize")
21885 (license license:asl2.0)))
21886
21887 (define-public python-signedjson
21888 (package
21889 (name "python-signedjson")
21890 (version "1.1.1")
21891 (source
21892 (origin
21893 (method url-fetch)
21894 (uri (pypi-uri "signedjson" version))
21895 (sha256
21896 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21897 (build-system python-build-system)
21898 (propagated-inputs
21899 `(("python-canonicaljson" ,python-canonicaljson)
21900 ("python-importlib-metadata" ,python-importlib-metadata)
21901 ("python-pynacl" ,python-pynacl)
21902 ("python-typing-extensions" ,python-typing-extensions)
21903 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21904 (native-inputs
21905 `(("python-setuptools-scm" ,python-setuptools-scm)))
21906 (home-page "https://github.com/matrix-org/python-signedjson")
21907 (synopsis "Sign JSON objects with ED25519 signatures")
21908 (description
21909 "Sign JSON objects with ED25519 signatures.
21910
21911 @itemize
21912 @item More than one entity can sign the same object.
21913 @item Each entity can sign the object with more than one key making it easier to
21914 rotate keys
21915 @item ED25519 can be replaced with a different algorithm.
21916 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21917 key.
21918 @end itemize")
21919 (license license:asl2.0)))
21920
21921 (define-public python-daemonize
21922 (package
21923 (name "python-daemonize")
21924 (version "2.5.0")
21925 (source
21926 (origin
21927 (method url-fetch)
21928 (uri (pypi-uri "daemonize" version))
21929 (sha256
21930 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21931 (build-system python-build-system)
21932 (home-page "https://github.com/thesharp/daemonize")
21933 (synopsis "Library for writing system daemons in Python")
21934 (description "Daemonize is a library for writing system daemons in Python.")
21935 (license license:expat)))
21936
21937 (define-public python-pymacaroons
21938 (package
21939 (name "python-pymacaroons")
21940 (version "0.13.0")
21941 (source
21942 (origin
21943 (method url-fetch)
21944 (uri (pypi-uri "pymacaroons" version))
21945 (sha256
21946 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21947 (build-system python-build-system)
21948 (propagated-inputs
21949 `(("python-six" ,python-six)
21950 ("python-pynacl" ,python-pynacl)))
21951 (home-page "https://github.com/ecordell/pymacaroons")
21952 (synopsis "Python Macaroon Library")
21953 (description
21954 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21955 tokens, macaroons embed caveats that define specific authorization
21956 requirements for the target service, the service that issued the root macaroon
21957 and which is capable of verifying the integrity of macaroons it receives.
21958
21959 Macaroons allow for delegation and attenuation of authorization. They are
21960 simple and fast to verify, and decouple authorization policy from the
21961 enforcement of that policy.")
21962 (license license:expat)))
21963
21964 (define-public python-ldap3
21965 (package
21966 (name "python-ldap3")
21967 (version "2.7")
21968 (home-page "https://github.com/cannatag/ldap3")
21969 (source
21970 (origin
21971 (method git-fetch)
21972 (uri (git-reference (url home-page)
21973 (commit (string-append "v" version))))
21974 (file-name (git-file-name name version))
21975 (sha256
21976 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21977 (build-system python-build-system)
21978 (arguments
21979 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21980 #:phases (modify-phases %standard-phases
21981 (replace 'check
21982 (lambda* (#:key tests? #:allow-other-keys)
21983 (when tests?
21984 (invoke "nosetests" "-s" "test"))
21985 #t)))))
21986 (native-inputs
21987 `(("python-nose" ,python-nose)))
21988 (propagated-inputs
21989 `(("python-gssapi" ,python-gssapi)
21990 ("python-pyasn1" ,python-pyasn1)))
21991 (synopsis "Python LDAP client")
21992 (description
21993 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21994 library.")
21995 (license license:lgpl3+)))
21996
21997 (define-public python-boltons
21998 (package
21999 (name "python-boltons")
22000 (version "20.0.0")
22001 (source
22002 (origin
22003 (method url-fetch)
22004 (uri (pypi-uri "boltons" version))
22005 (sha256
22006 (base32
22007 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22008 (build-system python-build-system)
22009 (home-page "https://github.com/mahmoud/boltons")
22010 (synopsis "Extensions to the Python standard library")
22011 (description
22012 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22013 as — and yet conspicuously missing from — the standard library, including:
22014
22015 @itemize
22016 @item Atomic file saving, bolted on with fileutils
22017 @item A highly-optimized OrderedMultiDict, in dictutils
22018 @item Two types of PriorityQueue, in queueutils
22019 @item Chunked and windowed iteration, in iterutils
22020 @item Recursive data structure iteration and merging, with iterutils.remap
22021 @item Exponential backoff functionality, including jitter, through
22022 iterutils.backoff
22023 @item A full-featured TracebackInfo type, for representing stack traces, in
22024 tbutils
22025 @end itemize")
22026 (license license:bsd-3)))
22027
22028 (define-public python-eliot
22029 (package
22030 (name "python-eliot")
22031 (version "1.12.0")
22032 (source
22033 (origin
22034 (method url-fetch)
22035 (uri (pypi-uri "eliot" version))
22036 (sha256
22037 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22038 (build-system python-build-system)
22039 (arguments
22040 `(#:phases
22041 (modify-phases %standard-phases
22042 (add-after 'unpack 'remove-journald-support
22043 (lambda _
22044 (for-each delete-file
22045 '("eliot/tests/test_journald.py"
22046 "eliot/journald.py"))
22047 #t))
22048 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22049 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22050 ;; be installed and these tests should pass.
22051 (lambda _
22052 (delete-file "eliot/tests/test_prettyprint.py")
22053 #t)))))
22054 (propagated-inputs
22055 `(("python-boltons" ,python-boltons)
22056 ("python-pyrsistent" ,python-pyrsistent)
22057 ("python-six" ,python-six)
22058 ("python-zope-interface" ,python-zope-interface)))
22059 (native-inputs
22060 `(("python-black" ,python-black)
22061 ("python-coverage" ,python-coverage)
22062 ("python-dask" ,python-dask)
22063 ("python-flake8" ,python-flake8)
22064 ("python-hypothesis" ,python-hypothesis)
22065 ("python-pytest" ,python-pytest)
22066 ("python-setuptools" ,python-setuptools)
22067 ("python-sphinx" ,python-sphinx)
22068 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22069 ("python-testtools" ,python-testtools)
22070 ("python-twine" ,python-twine)
22071 ("python-twisted" ,python-twisted)))
22072 (home-page "https://github.com/itamarst/eliot/")
22073 (synopsis "Eliot: the logging system that tells you why it happened")
22074 (description
22075 "@dfn{eliot} is a Python logging system that outputs causal chains of
22076 actions: actions can spawn other actions, and eventually they either succeed
22077 or fail. The resulting logs tell you the story of what your software did: what
22078 happened, and what caused it.")
22079 (license license:asl2.0)))
22080
22081 (define-public python-pem
22082 (package
22083 (name "python-pem")
22084 (version "20.1.0")
22085 (source
22086 (origin
22087 (method url-fetch)
22088 (uri (pypi-uri "pem" version))
22089 (sha256
22090 (base32
22091 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22092 (build-system python-build-system)
22093 (native-inputs
22094 `(("python-certifi" ,python-certifi)
22095 ("python-coverage" ,python-coverage)
22096 ("python-pretend" ,python-pretend)
22097 ("python-pyopenssl" ,python-pyopenssl)
22098 ("python-pytest" ,python-pytest)
22099 ("python-sphinx" ,python-sphinx)
22100 ("python-twisted" ,python-twisted)))
22101 (home-page "https://pem.readthedocs.io/")
22102 (synopsis "Easy PEM file parsing in Python")
22103 (description
22104 "This package provides a Python module for parsing and splitting PEM files.")
22105 (license license:expat)))
22106
22107 (define-public python-txsni
22108 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22109 ;; Python and OpenSSL.
22110 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22111 (revision "0"))
22112 (package
22113 (name "python-txsni")
22114 (version (git-version "0.1.9" revision commit))
22115 (home-page "https://github.com/glyph/txsni")
22116 (source
22117 (origin
22118 (method git-fetch)
22119 (uri (git-reference (url home-page) (commit commit)))
22120 (file-name (git-file-name name version))
22121 (sha256
22122 (base32
22123 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22124 (build-system python-build-system)
22125 (propagated-inputs
22126 `(("python-pyopenssl" ,python-pyopenssl)
22127 ("python-service-identity" ,python-service-identity)
22128 ("python-twisted" ,python-twisted)))
22129 (synopsis "Run TLS servers with Twisted")
22130 (description
22131 "This package provides an easy-to-use SNI endpoint for use
22132 with the Twisted web framework.")
22133 (license license:expat))))
22134
22135 (define-public python-txacme
22136 (package
22137 (name "python-txacme")
22138 (version "0.9.2")
22139 (source
22140 (origin
22141 (method url-fetch)
22142 (uri (pypi-uri "txacme" version))
22143 (sha256
22144 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22145 (build-system python-build-system)
22146 (propagated-inputs
22147 `(("python-acme" ,python-acme)
22148 ("python-attrs" ,python-attrs)
22149 ("python-eliot" ,python-eliot)
22150 ("python-josepy" ,python-josepy)
22151 ("python-pem" ,python-pem)
22152 ("python-treq" ,python-treq)
22153 ("python-twisted" ,python-twisted)
22154 ("python-txsni" ,python-txsni)))
22155 (native-inputs
22156 `(("python-fixtures" ,python-fixtures)
22157 ("python-hypothesis" ,python-hypothesis)
22158 ("python-mock" ,python-mock)
22159 ("python-service-identity"
22160 ,python-service-identity)
22161 ("python-testrepository" ,python-testrepository)
22162 ("python-testscenarios" ,python-testscenarios)
22163 ("python-testtools" ,python-testtools)))
22164 (home-page "https://github.com/twisted/txacme")
22165 (synopsis "Twisted implexmentation of the ACME protocol")
22166 (description
22167 "ACME is Automatic Certificate Management Environment, a protocol that
22168 allows clients and certificate authorities to automate verification and
22169 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22170 Certificate Authority.
22171
22172 txacme is an implementation of the protocol for Twisted, the event-driven
22173 networking engine for Python.")
22174 (license license:expat)))
22175
22176 (define-public python-pysaml2
22177 (package
22178 (name "python-pysaml2")
22179 (version "5.0.0")
22180 (source
22181 (origin
22182 (method url-fetch)
22183 (uri (pypi-uri "pysaml2" version))
22184 (sha256
22185 (base32
22186 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22187 (build-system python-build-system)
22188 (propagated-inputs
22189 `(("python-cryptography" ,python-cryptography)
22190 ("python-dateutil" ,python-dateutil)
22191 ("python-defusedxml" ,python-defusedxml)
22192 ("python-pyopenssl" ,python-pyopenssl)
22193 ("python-pytz" ,python-pytz)
22194 ("python-requests" ,python-requests)
22195 ("python-six" ,python-six)))
22196 (home-page "https://idpy.org")
22197 (synopsis "Python implementation of SAML Version 2 Standard")
22198 (description
22199 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22200 It contains all necessary pieces for building a SAML2 service provider or
22201 an identity provider. The distribution contains examples of both.
22202
22203 This package was originally written to work in a WSGI environment, but
22204 there are extensions that allow you to use it with other frameworks.")
22205 (license license:asl2.0)))
22206
22207 (define-public python-click-plugins
22208 (package
22209 (name "python-click-plugins")
22210 (version "1.1.1")
22211 (source
22212 (origin
22213 (method url-fetch)
22214 (uri (pypi-uri "click-plugins" version))
22215 (sha256
22216 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22217 (build-system python-build-system)
22218 (native-inputs
22219 `(("python-pytest" ,python-pytest)))
22220 (propagated-inputs
22221 `(("python-click" ,python-click)))
22222 (synopsis "Extension for Click to register external CLI commands")
22223 (description "This package provides n extension module for Click to
22224 register external CLI commands via setuptools entry-points.")
22225 (home-page "https://github.com/click-contrib/click-plugins")
22226 (license license:bsd-3)))
22227
22228 (define-public python-diceware
22229 (package
22230 (name "python-diceware")
22231 (version "0.9.6")
22232 (source
22233 (origin
22234 (method url-fetch)
22235 (uri (pypi-uri "diceware" version))
22236 (sha256
22237 (base32
22238 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22239 (build-system python-build-system)
22240 (native-inputs
22241 `(("python-coverage" ,python-coverage)
22242 ("python-pytest" ,python-pytest)
22243 ("python-pytest-runner" ,python-pytest-runner)))
22244 (home-page "https://github.com/ulif/diceware/")
22245 (synopsis "Generates memorable passphrases")
22246 (description "This package generates passphrases by concatenating words
22247 randomly picked from wordlists. It supports several sources of
22248 randomness (including real life dice) and different wordlists (including
22249 cryptographically signed ones).")
22250 (license license:gpl3+)))
22251
22252 (define-public python-dictdiffer
22253 (package
22254 (name "python-dictdiffer")
22255 (version "0.8.1")
22256 (source (origin
22257 (method url-fetch)
22258 (uri (pypi-uri "dictdiffer" version))
22259 (sha256
22260 (base32
22261 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22262 (build-system python-build-system)
22263 (native-inputs
22264 `(("python-check-manifest" ,python-check-manifest)
22265 ("python-coverage" ,python-coverage)
22266 ("python-isort" ,python-isort)
22267 ("python-mock" ,python-mock)
22268 ("python-pydoctstyle" ,python-pydocstyle)
22269 ("python-pytest-cache" ,python-pytest-cache)
22270 ("python-pytest-cov" ,python-pytest-cov)
22271 ("python-pytest-pep8" ,python-pytest-pep8)
22272 ("python-pytest-runner" ,python-pytest-runner)
22273 ("python-pytest" ,python-pytest)
22274 ("python-setuptools-scm" ,python-setuptools-scm)
22275 ("python-tox" ,python-tox)))
22276 (home-page "https://github.com/inveniosoftware/dictdiffer")
22277 (synopsis "Diff and patch Python dictionary objects")
22278 (description
22279 "Dictdiffer is a Python module that helps you to diff and patch
22280 dictionaries.")
22281 (license license:expat)))
22282
22283 (define-public pyzo
22284 (package
22285 (name "pyzo")
22286 (version "4.11.2")
22287 (source
22288 (origin
22289 (method url-fetch)
22290 (uri (pypi-uri "pyzo" version))
22291 (sha256
22292 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22293 (build-system python-build-system)
22294 (arguments
22295 `(#:phases
22296 (modify-phases %standard-phases
22297 (add-before 'check 'fix-home-directory
22298 (lambda _
22299 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22300 (setenv "HOME" "/tmp")
22301 #t)))
22302 ;; Tests fail with "Uncaught Python exception: python: undefined
22303 ;; symbol: objc_getClass".
22304 #:tests? #f))
22305 (propagated-inputs
22306 `(("python-pyqt" ,python-pyqt)))
22307 (home-page "https://pyzo.org")
22308 (synopsis
22309 "Python IDE for scientific computing")
22310 (description
22311 "Pyzo is a Python IDE focused on interactivity and introspection,
22312 which makes it very suitable for scientific computing. Its practical
22313 design is aimed at simplicity and efficiency.
22314
22315 It consists of two main components, the editor and the shell, and uses
22316 a set of pluggable tools to help the programmer in various ways. Some
22317 example tools are source structure, project manager, interactive help,
22318 workspace...")
22319 (license license:bsd-2)))
22320
22321 (define-public python-osc
22322 (package
22323 (name "python-osc")
22324 (version "1.7.4")
22325 (source
22326 (origin
22327 (method url-fetch)
22328 (uri (pypi-uri "python-osc" version))
22329 (sha256
22330 (base32
22331 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22332 (build-system python-build-system)
22333 (home-page "https://github.com/attwad/python-osc")
22334 (synopsis "Open Sound Control server and client implementations")
22335 (description
22336 "@code{python-osc} is a pure Python library with no external
22337 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22338 Open Sound Control 1.0} specification.")
22339 (license license:unlicense)))
22340
22341 (define-public python-voluptuous
22342 (package
22343 (name "python-voluptuous")
22344 (version "0.11.7")
22345 (source
22346 (origin
22347 (method url-fetch)
22348 (uri (pypi-uri "voluptuous" version))
22349 (sha256
22350 (base32
22351 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22352 (build-system python-build-system)
22353 (native-inputs
22354 `(("python-nose" ,python-nose)))
22355 (home-page "https://github.com/alecthomas/voluptuous")
22356 (synopsis "Python data validation library")
22357 (description
22358 "Voluptuous is a Python data validation library. It is primarily
22359 intended for validating data coming into Python as JSON, YAML, etc.")
22360 (license license:bsd-3)))
22361
22362 (define-public python-cmd2
22363 (package
22364 (name "python-cmd2")
22365 (version "1.0.2")
22366 (source
22367 (origin
22368 (method url-fetch)
22369 (uri (pypi-uri "cmd2" version))
22370 (sha256
22371 (base32
22372 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22373 (build-system python-build-system)
22374 (propagated-inputs
22375 `(("python-attrs" ,python-attrs)
22376 ("python-colorama" ,python-colorama)
22377 ("python-pyperclip" ,python-pyperclip)
22378 ("python-wcwidth" ,python-wcwidth)))
22379 (native-inputs
22380 `(("python-codecov" ,python-codecov)
22381 ("python-coverage" ,python-coverage)
22382 ("python-doc8" ,python-doc8)
22383 ("python-flake8" ,python-flake8)
22384 ("python-invoke" ,python-invoke)
22385 ("python-mock" ,python-mock)
22386 ("python-pytest" ,python-pytest)
22387 ("python-pytest-cov" ,python-pytest-cov)
22388 ("python-pytest-mock" ,python-pytest-mock)
22389 ("python-setuptools-scm" ,python-setuptools-scm)
22390 ("python-sphinx" ,python-sphinx)
22391 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22392 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22393 ("python-tox" ,python-tox)
22394 ("python-twine" ,python-twine)
22395 ("which" ,which)))
22396 (home-page "https://github.com/python-cmd2/cmd2")
22397 (synopsis "Tool for building interactive command line applications")
22398 (description
22399 "Cmd2 is a tool for building interactive command line applications in
22400 Python. Its goal is to make it quick and easy for developers to build
22401 feature-rich and user-friendly interactive command line applications. It
22402 provides a simple API which is an extension of Python's built-in @code{cmd}
22403 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22404 make your life easier and eliminates much of the boilerplate code which would
22405 be necessary when using @code{cmd}.")
22406 (license license:expat)))
22407
22408 (define-public python-pytidylib
22409 (package
22410 (name "python-pytidylib")
22411 (version "0.3.2")
22412 (source (origin
22413 (method url-fetch)
22414 (uri (pypi-uri "pytidylib" version))
22415 (sha256
22416 (base32
22417 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22418 (build-system python-build-system)
22419 (arguments
22420 '(#:phases
22421 (modify-phases %standard-phases
22422 (add-before 'build 'qualify-libtidy
22423 (lambda* (#:key inputs #:allow-other-keys)
22424 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22425 "/lib/libtidy.so")))
22426 (substitute* "tidylib/tidy.py"
22427 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22428 (format #f "'~a'" libtidy)))
22429 #t))))))
22430 (inputs `(("tidy" ,tidy)))
22431 (home-page "https://github.com/countergram/pytidylib")
22432 (synopsis "Python wrapper for HTML Tidy library")
22433 (description
22434 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22435 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22436 (license license:expat)))
22437
22438 (define-public python2-pytidylib
22439 (package-with-python2 python-pytidylib))
22440
22441 (define-public python-mujson
22442 (package
22443 (name "python-mujson")
22444 (version "1.4")
22445 (source
22446 (origin
22447 (method url-fetch)
22448 (uri (pypi-uri "mujson" version))
22449 (sha256
22450 (base32
22451 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22452 (build-system python-build-system)
22453 (home-page "https://github.com/mattgiles/mujson")
22454 (synopsis "Use the fastest JSON functions available at import time")
22455 (description "This package selects the fastest JSON functions available
22456 at import time.")
22457 (license license:expat)))
22458
22459 (define-public python-bashlex
22460 (package
22461 (name "python-bashlex")
22462 (version "0.14")
22463 (source
22464 (origin
22465 (method url-fetch)
22466 (uri (pypi-uri "bashlex" version))
22467 (sha256
22468 (base32
22469 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22470 (build-system python-build-system)
22471 (arguments
22472 `(#:phases
22473 (modify-phases %standard-phases
22474 (add-before 'build 'pregenerate-yacc-tables
22475 (lambda _
22476 ;; parser.py caches tables, which attempts to write to site lib
22477 ;; see https://github.com/idank/bashlex/issues/51
22478 (invoke "python" "-c" "import bashlex"))))))
22479 (home-page
22480 "https://github.com/idank/bashlex")
22481 (synopsis "Python parser for bash")
22482 (description "@code{bashlex} is a Python port of the parser used
22483 internally by GNU bash.
22484
22485 For the most part it's transliterated from C, the major differences are:
22486
22487 @itemize
22488 @item it does not execute anything
22489 @item it is reentrant
22490 @item it generates a complete AST
22491 @end itemize
22492 ")
22493 (license license:gpl3+)))
22494
22495 (define-public python-jinxed
22496 (package
22497 (name "python-jinxed")
22498 (version "1.0.0")
22499 (source
22500 (origin
22501 (method url-fetch)
22502 (uri (pypi-uri "jinxed" version))
22503 (sha256
22504 (base32
22505 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22506 (build-system python-build-system)
22507 (arguments
22508 '(#:phases
22509 (modify-phases %standard-phases
22510 (add-before 'check 'set-environment-variables
22511 (lambda* (#:key inputs #:allow-other-keys)
22512 (let ((ncurses (assoc-ref inputs "ncurses")))
22513 (setenv "TERM" "LINUX")
22514 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22515 #t))))
22516 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22517 (native-inputs
22518 `(("ncurses" ,ncurses)))
22519 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22520 (synopsis "Jinxed Terminal Library")
22521 (description
22522 "Jinxed is an implementation of a subset of the Python curses library.")
22523 (license license:mpl2.0)))
22524
22525 (define-public python-blessed
22526 (package
22527 (name "python-blessed")
22528 (version "1.17.8")
22529 (source
22530 (origin
22531 (method url-fetch)
22532 (uri (pypi-uri "blessed" version))
22533 (sha256
22534 (base32
22535 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22536 (modules '((guix build utils)))
22537 (snippet
22538 '(begin
22539 ;; Don't get hung up on Windows test failures.
22540 (delete-file "blessed/win_terminal.py") #t))))
22541 (build-system python-build-system)
22542 (propagated-inputs
22543 `(("python-jinxed" ,python-jinxed)
22544 ("python-six" ,python-six)
22545 ("python-wcwidth" ,python-wcwidth)))
22546 (native-inputs
22547 `(("python-mock" ,python-mock)
22548 ("python-pytest" ,python-pytest)))
22549 (home-page "https://github.com/jquast/blessed")
22550 (synopsis "Wrapper around terminal capabilities")
22551 (description
22552 "Blessed is a thin, practical wrapper around terminal styling, screen
22553 positioning, and keyboard input.")
22554 (license license:expat)))
22555
22556 (define-public python-readme-renderer
22557 (package
22558 (name "python-readme-renderer")
22559 (version "26.0")
22560 (source
22561 (origin
22562 (method url-fetch)
22563 (uri (pypi-uri "readme_renderer" version))
22564 (sha256
22565 (base32
22566 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22567 (build-system python-build-system)
22568 (propagated-inputs
22569 `(("python-bleach" ,python-bleach)
22570 ("python-docutils" ,python-docutils)
22571 ("python-pygments" ,python-pygments)
22572 ("python-six" ,python-six)))
22573 (native-inputs
22574 `(("python-mock" ,python-mock)
22575 ("python-pytest" ,python-pytest)))
22576 (home-page "https://github.com/pypa/readme_renderer")
22577 (synopsis "Render README files in Warehouse")
22578 (description
22579 "Readme Renderer is a library that will safely render arbitrary README
22580 files into HTML. It is designed to be used in Warehouse to render the
22581 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22582 and plain text.")
22583 (license license:asl2.0)))
22584
22585 (define-public python-lazr-delegates
22586 (package
22587 (name "python-lazr-delegates")
22588 (version "2.0.4")
22589 (source
22590 (origin
22591 (method url-fetch)
22592 (uri (pypi-uri "lazr.delegates" version))
22593 (sha256
22594 (base32
22595 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22596 (build-system python-build-system)
22597 (arguments
22598 '(#:phases
22599 (modify-phases %standard-phases
22600 (replace 'check
22601 (lambda _
22602 (invoke "python" "setup.py" "nosetests"))))))
22603 (native-inputs
22604 `(("python-nose" ,python-nose)))
22605 (propagated-inputs
22606 `(("python-zope-interface" ,python-zope-interface)))
22607 (home-page "https://launchpad.net/lazr.delegates")
22608 (synopsis "Easily write objects that delegate behavior")
22609 (description
22610 "The @code{lazr.delegates} package makes it easy to write objects that
22611 delegate behavior to another object. The new object adds some property or
22612 behavior on to the other object, while still providing the underlying interface,
22613 and delegating behavior.")
22614 (license license:lgpl3)))
22615
22616 (define-public python-lazr-config
22617 (package
22618 (name "python-lazr-config")
22619 (version "2.2.2")
22620 (source
22621 (origin
22622 (method url-fetch)
22623 (uri (pypi-uri "lazr.config" version))
22624 (sha256
22625 (base32
22626 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22627 (build-system python-build-system)
22628 (arguments
22629 '(#:phases
22630 (modify-phases %standard-phases
22631 (replace 'check
22632 (lambda _
22633 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22634 (native-inputs
22635 `(("python-nose" ,python-nose)))
22636 (propagated-inputs
22637 `(("python-lazr-delegates" ,python-lazr-delegates)
22638 ("python-zope-interface" ,python-zope-interface)))
22639 (home-page "https://launchpad.net/lazr.config")
22640 (synopsis "Create configuration schemas and process and validate configurations")
22641 (description
22642 "The LAZR config system is typically used to manage process configuration.
22643 Process configuration is for saying how things change when we run systems on
22644 different machines, or under different circumstances. This system uses ini-like
22645 file format of section, keys, and values. The config file supports inheritance
22646 to minimize duplication of information across files. The format supports schema
22647 validation.")
22648 (license license:lgpl3)))
22649
22650 (define-public python-flufl-bounce
22651 (package
22652 (name "python-flufl-bounce")
22653 (version "3.0.1")
22654 (source
22655 (origin
22656 (method url-fetch)
22657 (uri (pypi-uri "flufl.bounce" version))
22658 (sha256
22659 (base32
22660 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22661 (build-system python-build-system)
22662 (propagated-inputs
22663 `(("python-atpublic" ,python-atpublic)
22664 ("python-zope-interface" ,python-zope-interface)))
22665 (native-inputs
22666 `(("python-nose2" ,python-nose2)))
22667 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22668 (synopsis "Email bounce detectors")
22669 (description "The @code{flufl.bounce} library provides a set of heuristics
22670 and an API for detecting the original bouncing email addresses from a bounce
22671 message. Many formats found in the wild are supported, as are VERP and
22672 RFC 3464.")
22673 (license (list license:asl2.0
22674 license:lgpl3)))) ; only for setup_headers.py
22675
22676 (define-public python-flufl-i18n
22677 (package
22678 (name "python-flufl-i18n")
22679 (version "3.0")
22680 (source
22681 (origin
22682 (method url-fetch)
22683 (uri (pypi-uri "flufl.i18n" version))
22684 (sha256
22685 (base32
22686 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22687 (build-system python-build-system)
22688 (propagated-inputs
22689 `(("python-atpublic" ,python-atpublic)))
22690 (home-page "https://flufli18n.readthedocs.io")
22691 (synopsis "API for Python internationalization")
22692 (description
22693 "This package provides a high-level, convenient API for managing
22694 internationalization/translation contexts in Python applications. There is a
22695 simple API for single-context applications, such as command line scripts which
22696 only need to translate into one language during the entire course of their
22697 execution. There is a more flexible, but still convenient API for multi-context
22698 applications, such as servers, which may need to switch language contexts for
22699 different tasks.")
22700 (license license:asl2.0)))
22701
22702 (define-public python-flufl-lock
22703 (package
22704 (name "python-flufl-lock")
22705 (version "4.0")
22706 (source
22707 (origin
22708 (method url-fetch)
22709 (uri (pypi-uri "flufl.lock" version))
22710 (sha256
22711 (base32
22712 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22713 (build-system python-build-system)
22714 (propagated-inputs
22715 `(("python-atpublic" ,python-atpublic)
22716 ("python-psutil" ,python-psutil)))
22717 (home-page "https://flufllock.readthedocs.io")
22718 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22719 (description
22720 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22721 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22722 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22723 and have a maximum lifetime built-in.")
22724 (license (list license:asl2.0
22725 license:lgpl3)))) ; only for setup_helpers.py
22726
22727 (define-public python-flufl-testing
22728 (package
22729 (name "python-flufl-testing")
22730 (version "0.8")
22731 (source
22732 (origin
22733 (method url-fetch)
22734 (uri (pypi-uri "flufl.testing" version))
22735 (sha256
22736 (base32
22737 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22738 (build-system python-build-system)
22739 (native-inputs
22740 `(("python-nose2" ,python-nose2)))
22741 (home-page "https://gitlab.com/warsaw/flufl.testing")
22742 (synopsis "Collection of test tool plugins")
22743 (description
22744 "This package contains a small collection of test tool plugins for
22745 @code{nose2} and @code{flake8}.")
22746 (license license:asl2.0)))
22747
22748 (define-public python-devtools
22749 (package
22750 (name "python-devtools")
22751 (version "0.6")
22752 (source
22753 (origin
22754 (method git-fetch)
22755 (uri (git-reference
22756 (url "https://github.com/samuelcolvin/python-devtools")
22757 (commit (string-append "v" version))))
22758 (file-name (git-file-name name version))
22759 (sha256
22760 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22761 (build-system python-build-system)
22762 (native-inputs
22763 `(("python-pytest" ,python-pytest)
22764 ("python-pytest-mock" ,python-pytest-mock)))
22765 (propagated-inputs
22766 `(("python-pygments" ,python-pygments)))
22767 (arguments
22768 `(#:phases (modify-phases %standard-phases
22769 (replace 'check
22770 (lambda _
22771 (invoke "pytest")
22772 #t)))))
22773 (home-page "https://github.com/samuelcolvin/python-devtools")
22774 (synopsis "Debug command and development tools")
22775 (description
22776 "This package provides a debug print command and other development tools.
22777 It adds a simple and readable way to print stuff during development.")
22778 (license license:expat)))
22779
22780 (define-public python-dateparser
22781 (package
22782 (name "python-dateparser")
22783 (version "0.7.6")
22784 (source
22785 (origin
22786 (method url-fetch)
22787 (uri (pypi-uri "dateparser" version))
22788 (sha256
22789 (base32
22790 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22791 (build-system python-build-system)
22792 (propagated-inputs
22793 `(("python-dateutil" ,python-dateutil)
22794 ("python-pytz" ,python-pytz)
22795 ("python-regex" ,python-regex)
22796 ("python-ruamel.yaml" ,python-ruamel.yaml)
22797 ("python-tzlocal" ,python-tzlocal)))
22798 (native-inputs
22799 `(("python-mock" ,python-mock)
22800 ("python-parameterized" ,python-parameterized)
22801 ("tzdata" ,tzdata-for-tests)))
22802 (arguments
22803 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22804 #:tests? #f
22805 #:phases
22806 (modify-phases %standard-phases
22807 (add-before 'check 'set-check-environment
22808 (lambda* (#:key inputs #:allow-other-keys)
22809 (setenv "TZ" "UTC")
22810 (setenv "TZDIR"
22811 (string-append (assoc-ref inputs "tzdata")
22812 "/share/zoneinfo"))
22813 #t)))))
22814 (home-page "https://github.com/scrapinghub/dateparser")
22815 (synopsis
22816 "Date parsing library designed to parse dates from HTML pages")
22817 (description
22818 "@code{python-dateparser} provides modules to easily parse localized
22819 dates in almost any string formats commonly found on web pages.")
22820 (license license:bsd-3)))
22821
22822 (define-public python-dparse
22823 (package
22824 (name "python-dparse")
22825 (version "0.5.1")
22826 (source
22827 (origin
22828 (method url-fetch)
22829 (uri (pypi-uri "dparse" version))
22830 (sha256
22831 (base32
22832 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22833 (build-system python-build-system)
22834 (native-inputs
22835 `(("python-pytest" ,python-pytest)))
22836 (propagated-inputs
22837 `(("python-packaging" ,python-packaging)
22838 ("python-pyyaml" ,python-pyyaml)
22839 ("python-toml" ,python-toml)))
22840 (home-page "https://github.com/pyupio/dparse")
22841 (synopsis "Parser for Python dependency files")
22842 (description "This package provides a parser for Python dependency files.")
22843 (license license:expat)))
22844
22845 (define-public python-dpath
22846 (package
22847 (name "python-dpath")
22848 (version "2.0.1")
22849 (source
22850 (origin
22851 (method url-fetch)
22852 (uri (pypi-uri "dpath" version))
22853 (sha256
22854 (base32
22855 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22856 (build-system python-build-system)
22857 (native-inputs
22858 `(("python-hypothesis" ,python-hypothesis)
22859 ("python-mock" ,python-mock)
22860 ("python-nose" ,python-nose)))
22861 (arguments
22862 '(#:phases
22863 (modify-phases %standard-phases
22864 (replace 'check
22865 (lambda* (#:key inputs outputs #:allow-other-keys)
22866 (add-installed-pythonpath inputs outputs)
22867 ;; This invokation is taken from tox.ini.
22868 (invoke "nosetests" "-d" "-v" "tests/"))))))
22869 (home-page "https://github.com/akesterson/dpath-python")
22870 (synopsis "Filesystem-like pathing and searching for dictionaries")
22871 (description
22872 "@code{python-dpath} is a library for accessing and searching
22873 dictionaries via /slashed/paths ala xpath.
22874
22875 Basically it lets you glob over a dictionary as if it were a filesystem. It
22876 allows you to specify globs (ala the bash eglob syntax, through some advanced
22877 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22878 facility for filtering those results.")
22879 (license license:expat)))
22880
22881 (define-public python-safety
22882 (package
22883 (name "python-safety")
22884 (version "1.9.0")
22885 (source
22886 (origin
22887 (method url-fetch)
22888 (uri (pypi-uri "safety" version))
22889 (sha256
22890 (base32
22891 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22892 (build-system python-build-system)
22893 (arguments
22894 `(#:phases
22895 (modify-phases %standard-phases
22896 (add-after 'unpack 'disable-tests
22897 (lambda _
22898 (substitute* "tests/test_safety.py"
22899 ;; requires network
22900 (("def test_check_live") "def _test_check_live"))
22901 #t)))))
22902 (propagated-inputs
22903 `(("python-click" ,python-click)
22904 ("python-dparse" ,python-dparse)
22905 ("python-packaging" ,python-packaging)
22906 ("python-requests" ,python-requests)))
22907 (home-page "https://github.com/pyupio/safety")
22908 (synopsis "Check installed dependencies for known vulnerabilities")
22909 (description "Safety checks installed dependencies for known vulnerabilities.
22910 By default it uses the open Python vulnerability database Safety DB.")
22911 (license license:expat)))
22912
22913 (define-public python-pypandoc
22914 (package
22915 (name "python-pypandoc")
22916 (version "1.5")
22917 (source
22918 (origin
22919 (method url-fetch)
22920 (uri (pypi-uri "pypandoc" version))
22921 (sha256
22922 (base32
22923 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22924 (build-system python-build-system)
22925 (inputs
22926 `(("pandoc" ,pandoc)
22927 ("pandoc-citeproc" ,pandoc-citeproc)))
22928 (propagated-inputs
22929 `(("wheel" ,python-wheel)))
22930 (native-inputs
22931 `(("texlive" ,(texlive-union (list texlive-amsfonts
22932 texlive-fonts-ec
22933 texlive-latex-hyperref
22934 texlive-latex-oberdiek
22935 texlive-lm
22936 texlive-xcolor)))))
22937 (arguments
22938 `(#:phases
22939 (modify-phases %standard-phases
22940 (add-before 'check 'disable-tests
22941 (lambda _
22942 ;; Disable test requiring network access
22943 (substitute* "tests.py"
22944 (("test_basic_conversion_from_http_url")
22945 "skip_test_basic_conversion_from_http_url"))
22946 ;; Needed by texlive-union to generate fonts
22947 (setenv "HOME" "/tmp")
22948 #t)))))
22949 (home-page "https://github.com/bebraw/pypandoc")
22950 (synopsis "Python wrapper for pandoc")
22951 (description "pypandoc is a thin Python wrapper around pandoc
22952 and pandoc-citeproc.")
22953 (license license:expat)))
22954
22955 (define-public python-rnc2rng
22956 (package
22957 (name "python-rnc2rng")
22958 (version "2.6.4")
22959 (source
22960 (origin
22961 (method url-fetch)
22962 (uri (pypi-uri "rnc2rng" version))
22963 (sha256
22964 (base32
22965 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22966 (build-system python-build-system)
22967 (propagated-inputs
22968 `(("python-rply" ,python-rply)))
22969 (arguments
22970 `(#:phases (modify-phases %standard-phases
22971 (replace 'check
22972 (lambda _
22973 (invoke "python" "test.py"))))))
22974 (home-page "https://github.com/djc/rnc2rng")
22975 (synopsis "Convert RELAX NG Compact to regular syntax")
22976 (description
22977 "This package provides the @command{rnc2rng} command-line tool as well as
22978 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22979 equivalent schemata in the XML-based default RELAX NG syntax.")
22980 (license license:expat)))
22981
22982 (define-public python-telethon
22983 (package
22984 (name "python-telethon")
22985 (version "1.17.5")
22986 (source
22987 (origin
22988 (method git-fetch)
22989 (uri (git-reference
22990 (url "https://github.com/LonamiWebs/Telethon")
22991 (commit (string-append "v" version))))
22992 (file-name (git-file-name name version))
22993 (sha256
22994 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22995 (build-system python-build-system)
22996 (arguments
22997 '(#:phases
22998 (modify-phases %standard-phases
22999 (replace 'check
23000 (lambda* (#:key tests? #:allow-other-keys)
23001 (when tests?
23002 (invoke "py.test" "-v"))
23003 #t)))))
23004 (propagated-inputs
23005 `(("python-rsa" ,python-rsa)
23006 ("python-pyaes" ,python-pyaes)))
23007 (native-inputs
23008 `(("python-pytest" ,python-pytest)
23009 ("python-pytest-asyncio" ,python-pytest-asyncio)
23010 ("python-pytest-trio" ,python-pytest-trio)))
23011 (home-page "https://docs.telethon.dev")
23012 (synopsis "Full-featured Telegram client library for Python 3")
23013 (description "This library is designed to make it easy to write Python
23014 programs that can interact with Telegram.")
23015 (license license:expat)))
23016
23017 (define-public python-citeproc-py
23018 (package
23019 (name "python-citeproc-py")
23020 (version "0.5.1")
23021 (source
23022 (origin
23023 (method url-fetch)
23024 (uri (pypi-uri "citeproc-py" version))
23025 (sha256
23026 (base32
23027 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23028 (build-system python-build-system)
23029 (propagated-inputs
23030 `(("python-lxml" ,python-lxml)
23031 ("python-rnc2rng" ,python-rnc2rng)))
23032 (home-page
23033 "https://github.com/brechtm/citeproc-py")
23034 (synopsis "Citations and bibliography formatter")
23035 (description
23036 "Citeproc-py is a CSL processor for Python. It aims to implement the
23037 CSL 1.0.1 specification. citeproc-py can output styled citations and
23038 bibliographies in a number of different output formats. Currently supported
23039 are plain text, reStructuredText and HTML.")
23040 (license license:bsd-2)))
23041
23042 (define-public python-inform
23043 (package
23044 (name "python-inform")
23045 (version "1.23.0")
23046 (source
23047 (origin
23048 (method url-fetch)
23049 (uri (pypi-uri "inform" version))
23050 (sha256
23051 (base32
23052 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23053 (build-system python-build-system)
23054 (arguments
23055 `(#:tests? #f)) ; PyPI tarball lacks tests
23056 (native-inputs
23057 `(("python-hypothesis" ,python-hypothesis)
23058 ("python-pytest-cov" ,python-pytest-cov)
23059 ("python-pytest-runner" ,python-pytest-runner)))
23060 (propagated-inputs
23061 `(("python-arrow" ,python-arrow)
23062 ("python-six" ,python-six)))
23063 (home-page "https://inform.readthedocs.io")
23064 (synopsis "Print & logging utilities for communicating with user")
23065 (description
23066 "Inform is designed to display messages from programs that are typically run from
23067 a console. It provides a collection of ‘print’ functions that allow you to simply and
23068 cleanly print different types of messages.")
23069 (license license:gpl3+)))
23070
23071 (define-public python-nestedtext
23072 (package
23073 (name "python-nestedtext")
23074 (version "1.0.0")
23075 (source
23076 (origin
23077 (method url-fetch)
23078 (uri (pypi-uri "nestedtext" version))
23079 (sha256
23080 (base32
23081 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23082 (build-system python-build-system)
23083 (arguments
23084 `(#:tests? #f)) ; PyPI tarball lacks tests
23085 (propagated-inputs
23086 `(("python-inform" ,python-inform)))
23087 (home-page "https://nestedtext.org")
23088 (synopsis "Human readable and writable data interchange format")
23089 (description
23090 "NestedText is a file format for holding data that is to be entered, edited, or
23091 viewed by people. It allows data to be organized into a nested collection of
23092 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23093 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23094 NestedText is both simple and natural. Only a small number of concepts and rules must
23095 be kept in mind when creating it. It is easily created, modified, or viewed with
23096 a text editor and easily understood and used by both programmers and non-programmers.")
23097 (license license:expat))) ; MIT license
23098
23099 (define-public python-parallel
23100 (package
23101 (name "python-parallel")
23102 (version "1.6.4.4")
23103 (source
23104 (origin
23105 (method url-fetch)
23106 (uri (string-append
23107 "https://www.parallelpython.com/downloads/pp/pp-"
23108 version ".zip"))
23109 (sha256
23110 (base32
23111 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23112 (native-inputs
23113 `(("unzip" ,unzip)))
23114 (build-system python-build-system)
23115 (arguments '(#:tests? #f)) ; No test suite.
23116 (home-page "https://www.parallelpython.com")
23117 (synopsis "Parallel and distributed programming for Python")
23118 (description "Parallel Python module (PP) provides an easy and efficient
23119 way to create parallel-enabled applications for SMP computers and clusters.
23120 PP module features cross-platform portability and dynamic load balancing.
23121 Thus applications written with PP will parallelize efficiently even on
23122 heterogeneous and multi-platform clusters (including clusters running other
23123 applications with variable CPU loads).")
23124 (license license:bsd-3)))
23125
23126 (define-public python2-parallel
23127 (package-with-python2 python-parallel))
23128
23129 (define-public python-djvulibre
23130 (package
23131 (name "python-djvulibre")
23132 (version "0.8.5")
23133 (source
23134 (origin
23135 (method url-fetch)
23136 (uri (pypi-uri "python-djvulibre" version))
23137 (sha256
23138 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23139 (build-system python-build-system)
23140 (native-inputs
23141 `(("ghostscript" ,ghostscript)
23142 ("pkg-config" ,pkg-config)
23143 ("python-nose" ,python-nose)))
23144 (inputs
23145 `(("djvulibre" ,djvulibre)
23146 ("python-cython" ,python-cython)))
23147 (arguments
23148 `(#:phases
23149 (modify-phases %standard-phases
23150 (add-after 'unpack 'fix-tests
23151 (lambda _
23152 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23153 ;; doesn't make sense on GNU/Linux.
23154 (delete-file "djvu/dllpath.py")
23155 #t)))))
23156 (synopsis "Python bindings for DjVuLibre")
23157 (description "This is a set of Python bindings for the DjVuLibre library.")
23158 (home-page "https://jwilk.net/software/python-djvulibre")
23159 (license license:gpl2)))
23160
23161 (define-public python2-djvulibre
23162 (package-with-python2 python-djvulibre))
23163
23164 (define-public python-versioneer
23165 (package
23166 (name "python-versioneer")
23167 (version "0.19")
23168 (source
23169 (origin
23170 (method url-fetch)
23171 (uri (pypi-uri "versioneer" version))
23172 (sha256
23173 (base32
23174 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23175 (build-system python-build-system)
23176 (home-page
23177 "https://github.com/python-versioneer/python-versioneer")
23178 (synopsis
23179 "Version-string management for VCS-controlled trees")
23180 (description
23181 "@code{versioneer} is a tool for managing a recorded version number in
23182 distutils-based python projects. The goal is to remove the tedious and
23183 error-prone \"update the embedded version string\" step from your release
23184 process.")
23185 (license license:public-domain)))
23186
23187 (define-public python2-gamera
23188 (package
23189 (name "python2-gamera")
23190 (version "3.4.4")
23191 (source
23192 (origin
23193 (method url-fetch)
23194 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23195 "gamera-" version ".tar.gz"))
23196 (sha256
23197 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23198 (modules '((guix build utils)))
23199 (snippet
23200 '(begin
23201 ;; Remove bundled libraries.
23202 (for-each delete-file-recursively
23203 '("src/libpng-1.2.5"
23204 "src/libtiff"
23205 "src/zlib-1.2.8"))))))
23206 (build-system python-build-system)
23207 (inputs
23208 `(("libpng" ,libpng)
23209 ("libtiff" ,libtiff)
23210 ("python2-wxpython" ,python2-wxpython)
23211 ("zlib" ,zlib)))
23212 (arguments
23213 `(#:python ,python-2))
23214 (synopsis "Framework for building document analysis applications")
23215 (description
23216 "Gamera is a toolkit for building document image recognition systems.")
23217 (home-page "https://gamera.informatik.hsnr.de/")
23218 (license license:gpl2+)))