gnu: poetry: Fix a problem with a dependency.
[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.2.1")
3188 (source
3189 (origin
3190 (method url-fetch)
3191 (uri (pypi-uri "virtualenv" version))
3192 (sha256
3193 (base32
3194 "1rd6wmymsgv0cdsn50jwybcvbbslzym3mzffcjbl42l8br9cgap0"))))
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/next)
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.2.4")
9542 (source
9543 (origin
9544 (method url-fetch)
9545 (uri (pypi-uri "pip" version))
9546 (sha256
9547 (base32
9548 "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
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.7.0")
13025 (source
13026 (origin
13027 (method url-fetch)
13028 (uri (pypi-uri "tomlkit" version))
13029 (sha256
13030 (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
13031 (build-system python-build-system)
13032 (native-inputs
13033 `(("python-pytest" ,python-pytest)
13034 ("python-pyyaml" ,python-pyyaml)))
13035 (home-page "https://github.com/sdispater/tomlkit")
13036 (synopsis "Style-preserving TOML library")
13037 (description
13038 "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
13039 preserves all comments, indentations, whitespace and internal element ordering,
13040 and makes them accessible and editable via an intuitive API. It can also
13041 create new TOML documents from scratch using the provided helpers. Part of the
13042 implementation has been adapted, improved, and fixed from Molten.")
13043 (license license:expat)))
13044
13045 (define-public python-shellingham
13046 (package
13047 (name "python-shellingham")
13048 (version "1.3.2")
13049 (source
13050 (origin
13051 (method url-fetch)
13052 (uri (pypi-uri "shellingham" version))
13053 (sha256
13054 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
13055 (build-system python-build-system)
13056 (arguments
13057 `(#:phases
13058 (modify-phases %standard-phases
13059 (add-after 'unpack 'restore-setup.py
13060 ;; setup.py will return in the next release.
13061 ;; <https://github.com/sarugaku/shellingham/issues/33>
13062 (lambda _
13063 (with-output-to-file "setup.py"
13064 (lambda _
13065 (display "from setuptools import setup\nsetup()\n")))
13066 #t)))))
13067 (home-page "https://github.com/sarugaku/shellingham")
13068 (synopsis "Tool to detect surrounding shell")
13069 (description
13070 "Shellingham detects what shell the current Python executable is
13071 running in.")
13072 (license license:isc)))
13073
13074 (define-public python-memcached
13075 (package
13076 (name "python-memcached")
13077 (version "1.59")
13078 (source
13079 (origin
13080 (method url-fetch)
13081 (uri (pypi-uri "python-memcached" version))
13082 (sha256
13083 (base32
13084 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
13085 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
13086 (build-system python-build-system)
13087 (propagated-inputs `(("python-six" ,python-six)))
13088 (home-page
13089 "https://github.com/linsomniac/python-memcached")
13090 (synopsis "Pure python memcached client")
13091 (description
13092 "This software is a pure Python interface to the memcached memory cache
13093 daemon. It is the client side software which allows storing values in one or
13094 more, possibly remote, memcached servers.")
13095 (license license:psfl)))
13096
13097 (define-public python-clikit
13098 (package
13099 (name "python-clikit")
13100 (version "0.6.2")
13101 (source
13102 (origin
13103 (method url-fetch)
13104 (uri (pypi-uri "clikit" version))
13105 (sha256
13106 (base32
13107 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
13108 (build-system python-build-system)
13109 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
13110 (propagated-inputs
13111 `(("python-crashtest" ,python-crashtest)
13112 ("python-pastel" ,python-pastel)
13113 ("python-pylev" ,python-pylev)))
13114 (home-page "https://github.com/sdispater/clikit")
13115 (synopsis "Group of utilities to build command line interfaces")
13116 (description
13117 "CliKit is a group of utilities to build testable command line
13118 interfaces.")
13119 (properties `((python2-variant . ,(delay python2-clikit))))
13120 (license license:expat)))
13121
13122 (define-public python2-clikit
13123 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
13124 (package/inherit
13125 base
13126 (propagated-inputs
13127 `(("python-enum34" ,python2-enum34)
13128 ("python-typing" ,python2-typing)
13129 ,@(package-propagated-inputs base))))))
13130
13131 (define-public python-msgpack-python
13132 (package
13133 (name "python-msgpack-python")
13134 (version "0.5.6")
13135 (source
13136 (origin
13137 (method url-fetch)
13138 (uri (pypi-uri "msgpack-python" version))
13139 (sha256
13140 (base32
13141 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13142 (build-system python-build-system)
13143 (home-page "http://msgpack.org/")
13144 (synopsis "Package to deserialize messages in MessagePack binary format")
13145 (description
13146 "MessagePack is an efficient binary serialization format. It lets you
13147 exchange data among multiple languages like JSON. But it's faster and
13148 smaller. Small integers are encoded into a single byte, and typical short
13149 strings require only one extra byte in addition to the strings themselves.")
13150 (license license:asl2.0)))
13151
13152 (define-public python-cachy
13153 (package
13154 (name "python-cachy")
13155 (version "0.3.0")
13156 (source
13157 (origin
13158 (method url-fetch)
13159 (uri (pypi-uri "cachy" version))
13160 (sha256
13161 (base32
13162 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13163 (build-system python-build-system)
13164 (arguments
13165 '(#:phases
13166 (modify-phases %standard-phases
13167 (replace 'check
13168 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13169 "pytest"))))))
13170 (native-inputs
13171 `(("memcached" ,memcached)
13172 ("python-fakeredis" ,python-fakeredis)
13173 ("python-flexmock" ,python-flexmock)
13174 ("python-pifpaf" ,python-pifpaf)
13175 ("python-pytest" ,python-pytest)))
13176 (propagated-inputs
13177 `(("python-memcached" ,python-memcached)
13178 ("python-msgpack-python" ,python-msgpack-python)
13179 ("python-redis" ,python-redis)))
13180 (home-page "https://github.com/sdispater/cachy")
13181 (synopsis "Simple yet effective caching library")
13182 (description
13183 "Cachy provides a simple yet effective caching library. A simple but
13184 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13185 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13186 (license license:expat)))
13187
13188 (define-public python-poetry-core
13189 (package
13190 (name "python-poetry-core")
13191 (version "1.0.0")
13192 (source
13193 (origin
13194 (method url-fetch)
13195 (uri (pypi-uri "poetry-core" version))
13196 (sha256
13197 (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka"))))
13198 (build-system python-build-system)
13199 (home-page "https://github.com/python-poetry/poetry-core")
13200 (synopsis "Poetry PEP 517 build back-end")
13201 (description
13202 "The @code{poetry-core} module provides a PEP 517 build back-end
13203 implementation developed for Poetry. This project is intended to be
13204 a light weight, fully compliant, self-contained package allowing PEP 517
13205 compatible build front-ends to build Poetry managed projects.")
13206 (license license:expat)))
13207
13208 (define-public poetry
13209 (package
13210 (name "poetry")
13211 (version "1.1.4")
13212 ;; Poetry can only be built from source with Poetry.
13213 (source
13214 (origin
13215 (method url-fetch)
13216 (uri (pypi-uri "poetry" version))
13217 (sha256
13218 (base32
13219 "1a2kgfiw66fvxhlqk5qc83s6l38czfh5hcsrbiy7qq5yfc8mlsll"))))
13220 (build-system python-build-system)
13221 (arguments
13222 `(#:tests? #f ;; Pypi does not have tests.
13223 #:phases
13224 (modify-phases %standard-phases
13225 (add-before 'build 'patch-setup-py
13226 (lambda _
13227 (substitute* "setup.py"
13228 ;; Newer versions of keyring produce a package with version "0.0.0"
13229 ;; Reported upstream: <https://github.com/jaraco/keyring/issues/469>
13230 (("keyring>=21.2.0,<22.0.0") "keyring>=21.0.0,<22.0.0")
13231 ;; TODO: remove after the next release cycle,
13232 ;; when packaging has been updated.
13233 (("packaging>=20.4,<21.0") "packaging>=20.0,<21.0"))
13234 #t)))))
13235 (propagated-inputs
13236 `(("python-cachecontrol" ,python-cachecontrol)
13237 ("python-cachy" ,python-cachy)
13238 ("python-cleo" ,python-cleo)
13239 ("python-clikit" ,python-clikit)
13240 ("python-html5lib" ,python-html5lib)
13241 ("python-keyring" ,python-keyring)
13242 ("python-msgpack-transitional" ,python-msgpack-transitional)
13243 ("python-packaging" ,python-packaging)
13244 ("python-pexpect" ,python-pexpect)
13245 ("python-pip" ,python-pip)
13246 ("python-pkginfo" ,python-pkginfo)
13247 ("python-poetry-core" ,python-poetry-core)
13248 ("python-requests" ,python-requests)
13249 ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
13250 ("python-shellingham" ,python-shellingham)
13251 ("python-tomlkit" ,python-tomlkit)
13252 ("python-virtualenv" ,python-virtualenv)))
13253 (home-page "https://python-poetry.org")
13254 (synopsis "Python dependency management and packaging made easy")
13255 (description "Poetry is a tool for dependency management and packaging
13256 in Python. It allows you to declare the libraries your project depends on and
13257 it will manage (install/update) them for you.")
13258 (license license:expat)))
13259
13260 (define-public python-lark-parser
13261 (package
13262 (name "python-lark-parser")
13263 (version "0.9.0")
13264 (source (origin
13265 (method url-fetch)
13266 (uri (pypi-uri "lark-parser" version))
13267 (sha256
13268 (base32
13269 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13270 (build-system python-build-system)
13271 (home-page "https://github.com/lark-parser/lark")
13272 (synopsis "Multi-language parser for Python")
13273 (description
13274 "Lark is a parser built with a focus on ergonomics, performance and
13275 resilience. Lark can parse all context-free languages. That means it is
13276 capable of parsing almost any programming language out there, and to
13277 some degree most natural languages too.")
13278 (license license:expat)))
13279
13280 (define-public python-libcst
13281 (package
13282 (name "python-libcst")
13283 (version "0.3.8")
13284 (source (origin
13285 (method url-fetch)
13286 (uri (pypi-uri "libcst" version))
13287 (sha256
13288 (base32
13289 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13290 (build-system python-build-system)
13291 (arguments
13292 `(#:phases
13293 (modify-phases %standard-phases
13294 (add-after 'unpack 'remove-failing-tests
13295 (lambda _
13296 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13297 (delete-file "libcst/tests/test_fuzz.py")
13298 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13299 (delete-file "libcst/tests/test_pyre_integration.py")
13300 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13301 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13302 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13303 #t))
13304 (add-before 'check 'generate-test-data
13305 (lambda _
13306 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13307 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13308 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13309 (replace 'check
13310 (lambda _
13311 (invoke "python" "-m" "unittest")
13312 #t)))))
13313 (native-inputs
13314 `(("python-black" ,python-black)
13315 ("python-isort" ,python-isort)))
13316 (propagated-inputs
13317 `(("python-typing-extensions" ,python-typing-extensions)
13318 ("python-typing-inspect" ,python-typing-inspect)
13319 ("python-pyyaml" ,python-pyyaml)))
13320 (home-page "https://github.com/Instagram/LibCST")
13321 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13322 (description
13323 "LibCST parses Python source code as a CST tree that keeps all
13324 formatting details (comments, whitespaces, parentheses, etc). It's useful
13325 for building automated refactoring (codemod) applications and linters.
13326 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13327 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13328 naming node types and fields, LibCST creates a lossless CST that looks and
13329 feels like an AST.")
13330 (license (list license:expat
13331 ;; Some files unde libcst/_parser/ are under Python Software
13332 ;; Foundation license (see LICENSE file for details)
13333 license:psfl
13334 ;; libcst/_add_slots.py
13335 license:asl2.0))))
13336
13337 (define-public python-typing-inspect
13338 (package
13339 (name "python-typing-inspect")
13340 (version "0.6.0")
13341 (source (origin
13342 (method url-fetch)
13343 (uri (pypi-uri "typing_inspect" version))
13344 (sha256
13345 (base32
13346 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13347 (build-system python-build-system)
13348 (propagated-inputs
13349 `(("python-mypy-extensions" ,python-mypy-extensions)
13350 ("python-typing-extensions" ,python-typing-extensions)))
13351 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13352 (synopsis "API for inspection of types in the Python @code{typing} module")
13353 (description
13354 "The @code{typing_inspect} module defines experimental API for runtime
13355 inspection of types defined in the Python standard typing module.")
13356 (license license:expat)))
13357
13358 (define-public python-lazy-object-proxy
13359 (package
13360 (name "python-lazy-object-proxy")
13361 (version "1.5.1")
13362 (source (origin
13363 (method url-fetch)
13364 (uri (pypi-uri "lazy-object-proxy" version))
13365 (sha256
13366 (base32
13367 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13368 (native-inputs
13369 `(("python-setuptools-scm" ,python-setuptools-scm)))
13370 (build-system python-build-system)
13371 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13372 (synopsis "Lazy object proxy for python")
13373 (description
13374 "Lazy object proxy is an object that wraps a callable but defers the call
13375 until the object is actually required, and caches the result of said call.")
13376 (license license:bsd-2)))
13377
13378 (define-public python2-lazy-object-proxy
13379 (package-with-python2 python-lazy-object-proxy))
13380
13381 (define-public python-dnspython
13382 (package
13383 (name "python-dnspython")
13384 (version "1.16.0")
13385 (source (origin
13386 (method url-fetch)
13387 (uri (string-append "http://www.dnspython.org/kits/"
13388 version "/dnspython-" version ".tar.gz"))
13389 (sha256
13390 (base32
13391 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13392 (build-system python-build-system)
13393 (arguments '(#:tests? #f)) ; XXX: requires internet access
13394 (home-page "http://www.dnspython.org")
13395 (synopsis "DNS toolkit for Python")
13396 (description
13397 "dnspython is a DNS toolkit for Python. It supports almost all record
13398 types. It can be used for queries, zone transfers, and dynamic updates.
13399 It supports TSIG authenticated messages and EDNS0.")
13400 (license license:expat)))
13401
13402 (define-public python2-dnspython
13403 (package-with-python2 python-dnspython))
13404
13405 (define-public python-py3dns
13406 (package
13407 (name "python-py3dns")
13408 (version "3.2.1")
13409 (source
13410 (origin
13411 (method url-fetch)
13412 (uri (pypi-uri "py3dns" version))
13413 (sha256
13414 (base32
13415 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13416 (build-system python-build-system)
13417 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13418 ;; removing functionality so we copy from Nix and "just don't build it".
13419 (arguments
13420 `(#:phases
13421 (modify-phases %standard-phases
13422 (add-after 'unpack 'patch-source
13423 (lambda _
13424 (substitute* "setup.py"
13425 (("import DNS") "")
13426 (("DNS.__version__") (string-append "\"" ,version "\"")))
13427 #t)))
13428 #:tests? #f)) ; Also skip the tests.
13429 (home-page "https://launchpad.net/py3dns")
13430 (synopsis "Python 3 DNS library")
13431 (description "This Python 3 module provides a DNS API for looking up DNS
13432 entries from within Python 3 modules and applications. This module is a
13433 simple, lightweight implementation.")
13434 (license license:psfl)))
13435
13436 (define-public python-email-validator
13437 (package
13438 (name "python-email-validator")
13439 (version "1.0.2")
13440 (source
13441 (origin (method url-fetch)
13442 (uri (pypi-uri "email_validator" version))
13443 (sha256
13444 (base32
13445 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13446 (build-system python-build-system)
13447 (arguments
13448 '(#:phases
13449 (modify-phases %standard-phases
13450 (add-before 'build 'use-dnspython
13451 (lambda _
13452 (substitute* "setup.py"
13453 (("dnspython3") "dnspython"))
13454 #t)))))
13455 (propagated-inputs
13456 `(("python-dnspython" ,python-dnspython)
13457 ("python-idna" ,python-idna)))
13458 (home-page "https://github.com/JoshData/python-email-validator")
13459 (synopsis "Email address validation library for Python")
13460 (description
13461 "This library validates email address syntax and deliverability.")
13462 (license license:cc0)))
13463
13464 (define-public python2-email-validator
13465 (package-with-python2 python-email-validator))
13466
13467 (define-public python-ukpostcodeparser
13468 (package
13469 (name "python-ukpostcodeparser")
13470 (version "1.0.3")
13471 (source (origin
13472 (method url-fetch)
13473 (uri (pypi-uri "UkPostcodeParser" version))
13474 (sha256
13475 (base32
13476 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13477 (build-system python-build-system)
13478 (home-page "https://github.com/hamstah/ukpostcodeparser")
13479 (synopsis "UK Postcode parser for Python")
13480 (description
13481 "This library provides the @code{parse_uk_postcode} function for
13482 parsing UK postcodes.")
13483 (license license:expat)))
13484
13485 (define-public python2-ukpostcodeparser
13486 (package-with-python2 python-ukpostcodeparser))
13487
13488 (define-public python-faker
13489 (package
13490 (name "python-faker")
13491 (version "4.0.2")
13492 (source (origin
13493 (method url-fetch)
13494 (uri (pypi-uri "Faker" version))
13495 (sha256
13496 (base32
13497 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13498 (build-system python-build-system)
13499 (arguments
13500 '(#:phases
13501 (modify-phases %standard-phases
13502 (replace 'check
13503 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13504 (native-inputs
13505 `(;; For testing
13506 ("python-freezegun" ,python-freezegun)
13507 ("python-pytest" ,python-pytest)
13508 ("python-random2" ,python-random2)
13509 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13510 ("python-validators" ,python-validators)))
13511 (propagated-inputs
13512 `(("python-dateutil" ,python-dateutil)
13513 ("python-text-unidecode" ,python-text-unidecode)))
13514 (home-page "https://github.com/joke2k/faker")
13515 (synopsis "Python package that generates fake data")
13516 (description
13517 "Faker is a Python package that generates fake data such as names,
13518 addresses, and phone numbers.")
13519 (license license:expat)
13520 (properties `((python2-variant . ,(delay python2-faker))))))
13521
13522 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13523 (define-public python2-faker
13524 (let ((base (package-with-python2 (strip-python2-variant
13525 python-faker))))
13526 (package
13527 (inherit base)
13528 (version "3.0.1")
13529 (source (origin
13530 (method url-fetch)
13531 (uri (pypi-uri "Faker" version))
13532 (sha256
13533 (base32
13534 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13535 (native-inputs
13536 `(("python-mock" ,python2-mock)
13537 ,@(package-native-inputs base)))
13538 (propagated-inputs
13539 `(("python2-ipaddress" ,python2-ipaddress)
13540 ("python2-six" ,python2-six)
13541 ,@(package-propagated-inputs base))))))
13542
13543 (define-public python-pyaml
13544 (package
13545 (name "python-pyaml")
13546 (version "18.11.0")
13547 (source (origin
13548 (method url-fetch)
13549 (uri (pypi-uri "pyaml" version))
13550 (sha256
13551 (base32
13552 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13553 (build-system python-build-system)
13554 (native-inputs
13555 `(("python-unidecode" ,python-unidecode)))
13556 (propagated-inputs
13557 `(("python-pyyaml" ,python-pyyaml)))
13558 (home-page "https://github.com/mk-fg/pretty-yaml")
13559 (synopsis "YAML pretty-print library for Python")
13560 (description
13561 "pyaml is a PyYAML based python module to produce pretty and readable
13562 YAML-serialized data.")
13563 (license license:wtfpl2)))
13564
13565 (define-public python2-pyaml
13566 (package-with-python2 python-pyaml))
13567
13568 (define-public python-backpack
13569 (package
13570 (name "python-backpack")
13571 (version "0.1")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "backpack" version))
13576 (sha256
13577 (base32
13578 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13579 (build-system python-build-system)
13580 (native-inputs
13581 `(("python-pytest" ,python-pytest)
13582 ("python-nose" ,python-nose)))
13583 (propagated-inputs
13584 `(("python-simplejson" ,python-simplejson)))
13585 (home-page "https://github.com/sdispater/backpack")
13586 (synopsis "Utilities for working with Python collections")
13587 (description "Backpack provides some useful utilities for working with
13588 collections of data.")
13589 (license license:expat)))
13590
13591 (define-public python2-backpack
13592 (package-with-python2 python-backpack))
13593
13594 (define-public python-prompt-toolkit
13595 (package
13596 (name "python-prompt-toolkit")
13597 (version "3.0.7")
13598 (source
13599 (origin
13600 (method url-fetch)
13601 (uri (pypi-uri "prompt_toolkit" version))
13602 (sha256
13603 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13604 (build-system python-build-system)
13605 (arguments
13606 `(#:phases
13607 (modify-phases %standard-phases
13608 (delete 'check)
13609 (add-after 'install 'post-install-check
13610 (lambda* (#:key inputs outputs #:allow-other-keys)
13611 ;; HOME is needed for the test
13612 ;; "test_pathcompleter_can_expanduser".
13613 (setenv "HOME" "/tmp")
13614 (add-installed-pythonpath inputs outputs)
13615 (invoke "py.test"))))))
13616 (propagated-inputs
13617 `(("python-wcwidth" ,python-wcwidth)))
13618 (native-inputs
13619 `(("python-pytest" ,python-pytest)))
13620 (home-page
13621 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13622 (synopsis "Library for building command line interfaces in Python")
13623 (description
13624 "Prompt-Toolkit is a library for building interactive command line
13625 interfaces in Python. It's like GNU Readline but it also features syntax
13626 highlighting while typing, out-of-the-box multi-line input editing, advanced
13627 code completion, incremental search, support for Chinese double-width
13628 characters, mouse support, and auto suggestions.")
13629 (license license:bsd-3)
13630 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13631
13632 (define-public python-prompt-toolkit-2
13633 (package (inherit python-prompt-toolkit)
13634 (name "python-prompt-toolkit")
13635 (version "2.0.7")
13636 (source
13637 (origin
13638 (method url-fetch)
13639 (uri (pypi-uri "prompt_toolkit" version))
13640 (sha256
13641 (base32
13642 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13643 (propagated-inputs
13644 `(("python-wcwidth" ,python-wcwidth)
13645 ("python-six" ,python-six)
13646 ("python-pygments" ,python-pygments)))
13647 (properties '())))
13648
13649 (define-public python2-prompt-toolkit
13650 (package-with-python2 python-prompt-toolkit-2))
13651
13652 (define-public python-prompt-toolkit-1
13653 (package (inherit python-prompt-toolkit-2)
13654 (version "1.0.15")
13655 (source
13656 (origin
13657 (method url-fetch)
13658 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13659 (sha256
13660 (base32
13661 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13662
13663 (define-public python2-prompt-toolkit-1
13664 (package-with-python2 python-prompt-toolkit-1))
13665
13666 (define-public python-jedi
13667 (package
13668 (name "python-jedi")
13669 (version "0.17.2")
13670 (source
13671 (origin
13672 (method url-fetch)
13673 (uri (pypi-uri "jedi" version))
13674 (sha256
13675 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13676 (build-system python-build-system)
13677 (arguments
13678 `(#:phases
13679 (modify-phases %standard-phases
13680 (replace 'check
13681 (lambda _
13682 (setenv "HOME" "/tmp")
13683 (invoke "python" "-m" "pytest" "-vv"))))))
13684 (native-inputs
13685 `(("python-pytest" ,python-pytest)
13686 ("python-docopt" ,python-docopt)))
13687 (propagated-inputs
13688 `(("python-parso" ,python-parso)))
13689 (home-page "https://github.com/davidhalter/jedi")
13690 (synopsis "Autocompletion and static analysis library for Python")
13691 (description
13692 "Jedi is a static analysis tool for Python that can be used in Integrated
13693 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13694 on a deeper level than many other static analysis frameworks for Python.
13695
13696 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13697 well.")
13698 (license license:expat)))
13699
13700 (define-public python2-jedi
13701 (package-with-python2 python-jedi))
13702
13703 (define-public ptpython
13704 (package
13705 (name "ptpython")
13706 (version "3.0.5")
13707 (source (origin
13708 (method url-fetch)
13709 (uri (pypi-uri "ptpython" version))
13710 (sha256
13711 (base32
13712 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13713 (build-system python-build-system)
13714 (arguments
13715 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13716 (propagated-inputs
13717 `(("python-appdirs" ,python-appdirs)
13718 ("python-jedi" ,python-jedi)
13719 ("python-prompt-toolkit" ,python-prompt-toolkit)
13720 ("python-pygments" ,python-pygments)))
13721 (home-page "https://github.com/jonathanslenders/ptpython")
13722 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13723 (description
13724 "ptpython is a Python read-eval-print loop with IDE-like features.
13725 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13726 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13727 etc.")
13728 (license license:bsd-3)
13729 (properties `((python2-variant . ,(delay ptpython-2))))))
13730
13731 (define-public ptpython-2
13732 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13733 (package
13734 (inherit base)
13735 (name "ptpython2"))))
13736
13737 (define-public python-stem
13738 (package
13739 (name "python-stem")
13740 (version "1.8.0")
13741 (source
13742 (origin
13743 (method url-fetch)
13744 (uri (pypi-uri "stem" version))
13745 (sha256
13746 (base32
13747 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13748 (build-system python-build-system)
13749 (arguments
13750 `(#:phases
13751 (modify-phases %standard-phases
13752 (replace 'check
13753 (lambda _
13754 (invoke "./run_tests.py" "--unit")
13755 #t)))))
13756 (native-inputs
13757 `(("python-mock" ,python-mock)
13758 ("python-pycodestyle" ,python-pycodestyle)
13759 ("python-pyflakes" ,python-pyflakes)))
13760 (home-page "https://stem.torproject.org/")
13761 (synopsis
13762 "Python controller library that allows applications to interact with Tor")
13763 (description
13764 "Stem is a Python controller library for Tor. With it you can use Tor's
13765 control protocol to script against the Tor process and read descriptor data
13766 relays publish about themselves.")
13767 (license license:lgpl3)))
13768
13769 (define-public python2-stem
13770 (package-with-python2 python-stem))
13771
13772 (define-public python-pyserial
13773 (package
13774 (name "python-pyserial")
13775 (version "3.4")
13776 (source
13777 (origin
13778 (method url-fetch)
13779 (uri (pypi-uri "pyserial" version))
13780 (sha256
13781 (base32
13782 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13783 (build-system python-build-system)
13784 (arguments
13785 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13786 ;; #:phases
13787 ;; (modify-phases %standard-phases
13788 ;; (replace 'check
13789 ;; (lambda _
13790 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13791 (home-page
13792 "https://github.com/pyserial/pyserial")
13793 (synopsis "Python Serial Port Bindings")
13794 (description "@code{pyserial} provide serial port bindings for Python. It
13795 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13796 and/or Xon/Xoff. The port is accessed in RAW mode.")
13797 (license license:bsd-3)))
13798
13799 (define-public python2-pyserial
13800 (package-with-python2 python-pyserial))
13801
13802 (define-public python-kivy
13803 (package
13804 (name "python-kivy")
13805 (version "1.10.1")
13806 (source
13807 (origin
13808 (method url-fetch)
13809 (uri (pypi-uri "Kivy" version))
13810 (file-name (string-append name "-" version ".tar.gz"))
13811 (sha256
13812 (base32
13813 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13814 (build-system python-build-system)
13815 (arguments
13816 `(#:tests? #f ; Tests require many optional packages
13817 #:phases
13818 (modify-phases %standard-phases
13819 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13820 (lambda* (#:key inputs #:allow-other-keys)
13821 (setenv "KIVY_SDL2_PATH"
13822 (string-append (assoc-ref inputs "sdl-union")
13823 "/include/SDL2"))
13824 #t)))))
13825 (native-inputs
13826 `(("pkg-config" ,pkg-config)
13827 ("python-cython" ,python-cython)))
13828 (inputs
13829 `(("gstreamer" ,gstreamer)
13830 ("mesa" ,mesa)
13831 ("sdl-union"
13832 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13833 (home-page "https://kivy.org")
13834 (synopsis
13835 "Multitouch application framework")
13836 (description
13837 "A software library for rapid development of
13838 hardware-accelerated multitouch applications.")
13839 (license license:expat)))
13840
13841 (define-public python2-kivy
13842 (package-with-python2 python-kivy))
13843
13844 (define-public python-binaryornot
13845 (package
13846 (name "python-binaryornot")
13847 (version "0.4.4")
13848 (source (origin
13849 (method url-fetch)
13850 (uri (pypi-uri "binaryornot" version))
13851 (sha256
13852 (base32
13853 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13854 (build-system python-build-system)
13855 (arguments
13856 `(#:phases
13857 (modify-phases %standard-phases
13858 (add-after 'unpack 'patch-tests
13859 (lambda _
13860 ;; TypeError: binary() got an unexpected keyword argument
13861 ;; 'average_size'.
13862 (substitute* "tests/test_check.py"
13863 (("average_size=512") ""))
13864 #t)))))
13865 (propagated-inputs
13866 `(("python-chardet" ,python-chardet)
13867 ("python-hypothesis" ,python-hypothesis)))
13868 (home-page "https://github.com/audreyr/binaryornot")
13869 (synopsis "Package to check if a file is binary or text")
13870 (description "Ultra-lightweight pure Python package to check if a file is
13871 binary or text.")
13872 (license license:bsd-3)
13873 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13874
13875 (define-public python2-binaryornot
13876 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13877 (package (inherit base)
13878 (propagated-inputs
13879 `(("python2-enum34" ,python2-enum34)
13880 ,@(package-propagated-inputs base))))))
13881
13882 (define-public python-binwalk
13883 (package
13884 (name "python-binwalk")
13885 (version "2.2.0")
13886 (source
13887 (origin
13888 (method git-fetch)
13889 (uri (git-reference
13890 (url "https://github.com/ReFirmLabs/binwalk")
13891 (commit (string-append "v" version))))
13892 (file-name (git-file-name name version))
13893 (sha256
13894 (base32
13895 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13896 (build-system python-build-system)
13897 (arguments
13898 `(#:phases
13899 (modify-phases %standard-phases
13900 (add-before 'check 'set-pythonpath
13901 (lambda _
13902 (setenv "PYTHONPATH"
13903 (string-append
13904 (getcwd) "/src/"
13905 ":" (getenv "PYTHONPATH")))
13906 (setenv "HOME" "")
13907 #t)))))
13908 (native-inputs
13909 `(("python-coverage" ,python-coverage)
13910 ("python-nose" ,python-nose)))
13911 (home-page "https://github.com/ReFirmLabs/binwalk")
13912 (synopsis "Firmware analysis tool")
13913 (description "Binwalk is a tool for analyzing, reverse engineering, and
13914 extracting firmware images")
13915 (license license:expat)))
13916
13917 (define-public python-nltk
13918 (package
13919 (name "python-nltk")
13920 (version "3.2.1")
13921 (source (origin
13922 (method url-fetch)
13923 (uri (pypi-uri "nltk" version))
13924 (sha256
13925 (base32
13926 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13927 (build-system python-build-system)
13928 (arguments
13929 '(;; The tests require some extra resources to be downloaded.
13930 ;; TODO Try packaging these resources.
13931 #:tests? #f))
13932 (home-page "http://nltk.org/")
13933 (synopsis "Natural Language Toolkit")
13934 (description "It provides interfaces to over 50 corpora and lexical
13935 resources such as WordNet, along with a suite of text processing libraries
13936 for classification, tokenization, stemming, tagging, parsing, and semantic
13937 reasoning, wrappers for natural language processing libraries.")
13938 (license license:asl2.0)))
13939
13940 (define-public python2-nltk
13941 (package-with-python2 python-nltk))
13942
13943 (define-public python-pymongo
13944 (package
13945 (name "python-pymongo")
13946 (version "3.7.2")
13947 (source (origin
13948 (method url-fetch)
13949 (uri (pypi-uri "pymongo" version))
13950 (sha256
13951 (base32
13952 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13953 (build-system python-build-system)
13954 (propagated-inputs
13955 `(("python-certifi" ,python-certifi)))
13956 (home-page "https://github.com/mongodb/mongo-python-driver")
13957 (synopsis "Python driver for MongoDB")
13958 (description "Python driver for MongoDB.")
13959 (license license:asl2.0)))
13960
13961 (define-public python2-pymongo
13962 (package-with-python2 python-pymongo))
13963
13964 (define-public python-consul
13965 (package
13966 (name "python-consul")
13967 (version "0.6.1")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "python-consul" version))
13972 (sha256
13973 (base32
13974 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13975 (build-system python-build-system)
13976 (arguments
13977 '(#:tests? #f)) ; The tests are not distributed
13978 (propagated-inputs
13979 `(("python-requests" ,python-requests)
13980 ("python-six" ,python-six)))
13981 (home-page "https://github.com/cablehead/python-consul")
13982 (synopsis "Python client for Consul")
13983 (description
13984 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13985 discovery, monitoring and configuration.")
13986 (license license:expat)))
13987
13988 (define-public python2-consul
13989 (package-with-python2 python-consul))
13990
13991 (define-public python-schematics
13992 (package
13993 (name "python-schematics")
13994 (version "1.1.1")
13995 (source
13996 (origin
13997 (method git-fetch)
13998 (uri (git-reference
13999 (url "https://github.com/schematics/schematics")
14000 (commit (string-append "v" version))))
14001 (file-name (git-file-name name version))
14002 (sha256
14003 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
14004 (build-system python-build-system)
14005 (propagated-inputs
14006 `(("python-six" ,python-six)))
14007 (arguments
14008 ;; The tests require a bunch of not very nice packages with fixed
14009 ;; version requirements (e.g. python-coveralls).
14010 `(#:tests? #f))
14011 (home-page "https://github.com/schematics/schematics")
14012 (synopsis "Python Data Structures for Humans")
14013 (description "Python Data Structures for Humans.")
14014 (license license:bsd-3)))
14015
14016 (define-public python2-schematics
14017 (package-with-python2 python-schematics))
14018
14019 (define-public python-odfpy
14020 (package
14021 (name "python-odfpy")
14022 (version "1.4.1")
14023 (source (origin
14024 (method url-fetch)
14025 (uri (pypi-uri "odfpy" version))
14026 (sha256
14027 (base32
14028 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
14029 (arguments
14030 `(#:phases
14031 (modify-phases %standard-phases
14032 (replace 'check
14033 (lambda _
14034 (setenv "PYTHONPATH" (string-append "./build/lib:"
14035 (getenv "PYTHONPATH")))
14036 (invoke "pytest" "-vv"))))))
14037 (build-system python-build-system)
14038 (native-inputs
14039 `(("python-pytest" ,python-pytest)))
14040 (propagated-inputs
14041 `(("python-defusedxml" ,python-defusedxml)))
14042 (home-page "https://github.com/eea/odfpy")
14043 (synopsis "Python API and tools to manipulate OpenDocument files")
14044 (description "Collection of libraries and utility programs written in
14045 Python to manipulate OpenDocument 1.2 files.")
14046 (license
14047 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
14048 ;; number of files with other licenses.
14049 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
14050
14051 (define-public python2-odfpy
14052 (package-with-python2 python-odfpy))
14053
14054 (define-public python-natsort
14055 (package
14056 (name "python-natsort")
14057 (version "7.0.1")
14058 (source (origin
14059 (method url-fetch)
14060 (uri (pypi-uri "natsort" version))
14061 (sha256
14062 (base32
14063 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
14064 (build-system python-build-system)
14065 (arguments
14066 `(#:modules ((guix build utils)
14067 (guix build python-build-system)
14068 (srfi srfi-1)
14069 (srfi srfi-26)
14070 (ice-9 ftw))
14071 #:phases
14072 (modify-phases %standard-phases
14073 (add-before 'check 'set-cachedir
14074 ;; Tests require write access to $HOME by default
14075 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
14076 (replace 'check
14077 (lambda _
14078 (let ((cwd (getcwd)))
14079 (setenv "PYTHONPATH"
14080 (string-append
14081 cwd "/build/"
14082 (find (cut string-prefix? "lib" <>)
14083 (scandir (string-append cwd "/build")))
14084 ":"
14085 (getenv "PYTHONPATH")))
14086 (invoke "pytest" "-v")))))))
14087 (native-inputs
14088 `(("python-hypothesis" ,python-hypothesis)
14089 ("python-pytest-cov" ,python-pytest-cov)
14090 ("python-pytest-mock" ,python-pytest-mock)
14091 ("python-pytest" ,python-pytest)))
14092 (propagated-inputs ; TODO: Add python-fastnumbers.
14093 `(("python-pyicu" ,python-pyicu)))
14094 (home-page "https://github.com/SethMMorton/natsort")
14095 (synopsis "Natural sorting for python and shell")
14096 (description
14097 "Natsort lets you apply natural sorting on lists instead of
14098 lexicographical. If you use the built-in @code{sorted} method in python
14099 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
14100 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
14101 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
14102 identifies numbers and sorts them separately from strings. It can also sort
14103 version numbers, real numbers, mixed types and more, and comes with a shell
14104 command @command{natsort} that exposes this functionality in the command line.")
14105 (license license:expat)
14106 (properties `((python2-variant . ,(delay python2-natsort))))))
14107
14108 ;; Natsort 6.x are the last versions with support for Python 2.
14109 (define-public python2-natsort
14110 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
14111 (package (inherit base)
14112 (version "6.2.1")
14113 (source (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "natsort" version))
14116 (sha256
14117 (base32
14118 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
14119 (native-inputs
14120 `(("python2-pathlib" ,python2-pathlib)
14121 ,@(package-native-inputs base))))))
14122
14123 (define-public glances
14124 (package
14125 (name "glances")
14126 (version "3.1.4")
14127 (source
14128 (origin
14129 (method url-fetch)
14130 (uri (pypi-uri "Glances" version))
14131 (sha256
14132 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
14133 (modules '((guix build utils)))
14134 (snippet
14135 '(begin
14136 ;; Glances phones PyPI for weekly update checks by default.
14137 ;; Disable these. The user can re-enable them if desired.
14138 (substitute* "glances/outdated.py"
14139 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
14140 (string-append indentation
14141 "self.args.disable_check_update = True\n"
14142 line)))
14143 #t))))
14144 (build-system python-build-system)
14145 (propagated-inputs
14146 `(("python-future" ,python-future)
14147 ("python-psutil" ,python-psutil)))
14148 (home-page "https://github.com/nicolargo/glances")
14149 (synopsis "Cross-platform curses-based monitoring tool")
14150 (description
14151 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14152 Glances uses the PsUtil library to get information from your system. It
14153 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14154 (license license:lgpl3+)))
14155
14156 (define-public python-glances
14157 (deprecated-package "python-glances" glances))
14158
14159 (define-public python-graphql-core
14160 (package
14161 (name "python-graphql-core")
14162 (version "0.5.3")
14163 (source
14164 (origin
14165 (method url-fetch)
14166 (uri (pypi-uri "graphql-core" version))
14167 (sha256
14168 (base32
14169 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14170 (build-system python-build-system)
14171 (arguments
14172 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14173 #:phases
14174 (modify-phases %standard-phases
14175 (add-after 'unpack 'patch-hardcoded-version
14176 (lambda _ (substitute*
14177 "setup.py"
14178 (("'gevent==1.1rc1'") "'gevent'"))
14179 #t)))))
14180 (native-inputs
14181 `(("python-gevent" ,python-gevent)
14182 ("python-mock" ,python-mock)
14183 ("python-pytest-mock" ,python-pytest-mock)))
14184 (propagated-inputs
14185 `(("python-promise" ,python-promise)
14186 ("python-six" ,python-six)))
14187 (home-page "https://github.com/graphql-python/graphql-core")
14188 (synopsis "GraphQL implementation for Python")
14189 (description
14190 "GraphQL implementation for Python. GraphQL is a data query language and
14191 runtime designed and used to request and deliver data to mobile and web apps.
14192 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14193 to Python.")
14194 (license license:expat)))
14195
14196 (define-public python2-graphql-core
14197 (package-with-python2 python-graphql-core))
14198
14199 (define-public python-graphql-relay
14200 (package
14201 (name "python-graphql-relay")
14202 (version "0.4.5")
14203 (source
14204 (origin
14205 (method url-fetch)
14206 (uri (pypi-uri "graphql-relay" version))
14207 (sha256
14208 (base32
14209 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14210 (build-system python-build-system)
14211 (arguments
14212 '(#:tests? #f)) ; The tests are not distributed
14213 (propagated-inputs
14214 `(("python-graphql-core" ,python-graphql-core)
14215 ("python-promise" ,python-promise)
14216 ("python-six" ,python-six)))
14217 (home-page "https://github.com/graphql-python/graphql-relay-py")
14218 (synopsis "Relay implementation for Python")
14219 (description
14220 "This is a library to allow the easy creation of Relay-compliant servers
14221 using the GraphQL Python reference implementation of a GraphQL server. It
14222 should be noted that the code is a exact port of the original
14223 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14224 from Facebook.")
14225 (license license:expat)))
14226
14227 (define-public python2-graphql-relay
14228 (package-with-python2 python-graphql-relay))
14229
14230 (define-public python-graphene
14231 (package
14232 (name "python-graphene")
14233 (version "0.10.2")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "graphene" version))
14238 (sha256
14239 (base32
14240 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14241 (build-system python-build-system)
14242 (propagated-inputs
14243 `(("python-graphql-core" ,python-graphql-core)
14244 ("python-graphql-relay" ,python-graphql-relay)
14245 ("python-iso8601" ,python-iso8601)
14246 ("python-promise" ,python-promise)
14247 ("python-six" ,python-six)))
14248 (arguments
14249 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14250 (home-page "https://graphene-python.org/")
14251 (synopsis "GraphQL Framework for Python")
14252 (description
14253 "Graphene is a Python library for building GraphQL schemas/types.
14254 A GraphQL schema describes your data model, and provides a GraphQL server
14255 with an associated set of resolve methods that know how to fetch data.")
14256 (properties `((python2-variant . ,(delay python2-graphene))))
14257 (license license:expat)))
14258
14259 (define-public python2-graphene
14260 (let ((base (package-with-python2
14261 (strip-python2-variant python-graphene))))
14262 (package (inherit base)
14263 (native-inputs
14264 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14265 ,@(package-native-inputs base))))))
14266
14267 (define-public python-nautilus
14268 (package
14269 (name "python-nautilus")
14270 (version "0.4.9")
14271 (source
14272 (origin
14273 (method url-fetch)
14274 (uri (pypi-uri "nautilus" version))
14275 (sha256
14276 (base32
14277 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14278 (build-system python-build-system)
14279 (arguments `(#:tests? #f)) ; fails to import test modules
14280 (propagated-inputs
14281 `(("python-bcrypt" ,python-bcrypt)
14282 ("python-click" ,python-click)
14283 ("python-consul" ,python-consul)
14284 ("python-graphene" ,python-graphene)
14285 ("python-jinja2" ,python-jinja2)
14286 ("python-peewee" ,python-peewee)
14287 ("python-pika" ,python-pika)
14288 ("python-tornado" ,python-tornado)
14289 ("python-wtforms" ,python-wtforms)))
14290 (native-inputs
14291 `(("python-nose2" ,python-nose2)))
14292 (home-page "https://github.com/AlecAivazis/nautilus")
14293 (synopsis "Library for creating microservice applications")
14294 (description
14295 "Nautilus is a framework for flux based microservices that looks to
14296 provide extendible implementations of common aspects of a cloud so that you can
14297 focus on building massively scalable web applications.")
14298 (license license:expat)))
14299
14300 (define-public python-random2
14301 (package
14302 (name "python-random2")
14303 (version "1.0.1")
14304 (source (origin
14305 (method url-fetch)
14306 (uri (pypi-uri "random2" version ".zip"))
14307 (sha256
14308 (base32
14309 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14310 (build-system python-build-system)
14311 (native-inputs `(("unzip" ,unzip)))
14312 (home-page "http://pypi.python.org/pypi/random2")
14313 (synopsis "Python 3 version of the Python 2 @code{random} module")
14314 (description
14315 "This package provides a Python 3 ported version of Python 2.7’s
14316 @code{random} module. It has also been back-ported to work in Python 2.6.
14317
14318 In Python 3, the implementation of @code{randrange()} was changed, so that
14319 even with the same seed you get different sequences in Python 2 and 3.
14320
14321 This package closes that gap, allowing stable random number generation
14322 between the different Python versions.")
14323 (license license:psfl)))
14324
14325 (define-public python2-random2
14326 (package-with-python2 python-random2))
14327
14328 (define-public python-snowballstemmer
14329 (package
14330 (name "python-snowballstemmer")
14331 (version "2.0.0")
14332 (source (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "snowballstemmer" version))
14335 (sha256
14336 (base32
14337 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14338 (build-system python-build-system)
14339 (arguments
14340 `(;; No tests exist
14341 #:tests? #f))
14342 (home-page "https://github.com/shibukawa/snowball_py")
14343 (synopsis "Snowball stemming library collection for Python")
14344 (description "This package provides 16 word stemmer algorithms generated
14345 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14346 English stemmer.")
14347 (license license:bsd-3)))
14348
14349 (define-public python2-snowballstemmer
14350 (package-with-python2 python-snowballstemmer))
14351
14352 (define-public python-setproctitle
14353 (package
14354 (name "python-setproctitle")
14355 (version "1.1.10")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "setproctitle" version))
14360 (sha256
14361 (base32
14362 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14363 (build-system python-build-system)
14364 (arguments
14365 '(#:phases
14366 (modify-phases %standard-phases
14367 (add-before 'check 'patch-Makefile
14368 ;; Stricly this is only required for the python2 variant.
14369 ;; But adding a phase in an inherited package seems to be
14370 ;; cumbersum. So we patch even for python3.
14371 (lambda _
14372 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14373 (when nose
14374 (substitute* "Makefile"
14375 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14376 (string-append nose "/bin/nosetests "))))
14377 #t)))
14378 (replace 'check
14379 (lambda _
14380 (setenv "PYTHON" (or (which "python3") (which "python")))
14381 (setenv "PYCONFIG" (if (which "python3-config")
14382 "python3-config --embed"
14383 "python-config"))
14384 (setenv "CC" "gcc")
14385 ;; No need to extend PYTHONPATH to find the built package, since
14386 ;; the Makefile will build anyway
14387 (invoke "make" "check"))))))
14388 (native-inputs
14389 `(("procps" ,procps))) ; required for tests
14390 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14391 (synopsis
14392 "Setproctitle implementation for Python to customize the process title")
14393 (description "The library allows a process to change its title (as displayed
14394 by system tools such as ps and top).
14395
14396 Changing the title is mostly useful in multi-process systems, for
14397 example when a master process is forked: changing the children's title
14398 allows identifying the task each process is busy with. The technique
14399 is used by PostgreSQL and the OpenSSH Server for example.")
14400 (license license:bsd-3)
14401 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14402
14403 (define-public python2-setproctitle
14404 (let ((base (package-with-python2
14405 (strip-python2-variant python-setproctitle))))
14406 (package
14407 (inherit base)
14408 (native-inputs `(("python2-nose" ,python2-nose)
14409 ,@(package-native-inputs base))))))
14410
14411 (define-public python-validictory
14412 (package
14413 (name "python-validictory")
14414 (version "1.0.1")
14415 (source
14416 (origin
14417 (method url-fetch)
14418 (uri (pypi-uri "validictory" version))
14419 (sha256
14420 (base32
14421 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14422 (build-system python-build-system)
14423 (arguments
14424 '(#:phases
14425 (modify-phases %standard-phases
14426 (add-after 'unpack 'bootstrap
14427 ;; Move the tests out of the package directory to avoid
14428 ;; packaging them.
14429 (lambda* _
14430 (rename-file "validictory/tests" "tests")
14431 (delete-file "tests/__init__.py")))
14432 (replace 'check
14433 (lambda _
14434 ;; Extend PYTHONPATH so the built package will be found.
14435 (setenv "PYTHONPATH"
14436 (string-append (getcwd) "/build/lib:"
14437 (getenv "PYTHONPATH")))
14438 (invoke "py.test" "-vv" ))))))
14439 (native-inputs
14440 `(("python-pytest" ,python-pytest)))
14441 (home-page
14442 "https://github.com/jamesturk/validictory")
14443 (synopsis "General purpose Python data validator")
14444 (description "It allows validation of arbitrary Python data structures.
14445
14446 The schema format is based on the JSON Schema
14447 proposal (http://json-schema.org), so combined with json the library is also
14448 useful as a validator for JSON data.")
14449 (license license:expat)))
14450
14451 (define-public python2-validictory
14452 (package-with-python2 python-validictory))
14453
14454 (define-public python-pyelftools
14455 (package
14456 (name "python-pyelftools")
14457 (version "0.25")
14458 (source
14459 (origin
14460 (method url-fetch)
14461 (uri (pypi-uri "pyelftools" version))
14462 (sha256
14463 (base32
14464 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14465 (build-system python-build-system)
14466 (arguments
14467 `(#:phases
14468 (modify-phases %standard-phases
14469 (add-before 'check 'set-pythonpath
14470 (lambda _
14471 (setenv "PYTHONPATH"
14472 (string-append
14473 (getcwd) "/test/"
14474 ":" (getenv "PYTHONPATH")))
14475 #t)))))
14476 (home-page
14477 "https://github.com/eliben/pyelftools")
14478 (synopsis
14479 "Analyze binary and library file information")
14480 (description "This Python library provides interfaces for parsing and
14481 analyzing two binary and library file formats; the Executable and Linking
14482 Format (ELF), and debugging information in the Debugging With Attributed
14483 Record Format (DWARF).")
14484 (license license:public-domain)))
14485
14486 (define-public python-pyev
14487 (package
14488 (name "python-pyev")
14489 (version "0.9.0")
14490 (source
14491 (origin
14492 (method url-fetch)
14493 (uri (pypi-uri "pyev" version))
14494 (sha256
14495 (base32
14496 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14497 (build-system python-build-system)
14498 (arguments
14499 `(#:tests? #f ; no test suite
14500 #:phases
14501 (modify-phases %standard-phases
14502 (add-after 'unpack 'patch
14503 (lambda* (#:key inputs #:allow-other-keys)
14504 (let ((libev (string-append (assoc-ref inputs "libev")
14505 "/lib/libev.so.4")))
14506 (substitute* "setup.py"
14507 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14508 (string-append "libev_dll_name = \"" libev "\"")))))))))
14509 (inputs
14510 `(("libev" ,libev)))
14511 (home-page "http://pythonhosted.org/pyev/")
14512 (synopsis "Python libev interface")
14513 (description "Pyev provides a Python interface to libev.")
14514 (license license:gpl3)))
14515
14516 (define-public python2-pyev
14517 (package-with-python2 python-pyev))
14518
14519 (define-public python-imagesize
14520 (package
14521 (name "python-imagesize")
14522 (version "1.2.0")
14523 (source
14524 (origin
14525 (method url-fetch)
14526 (uri (pypi-uri "imagesize" version))
14527 (sha256
14528 (base32
14529 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14530 (build-system python-build-system)
14531 (home-page "https://github.com/shibukawa/imagesize_py")
14532 (synopsis "Gets image size of files in various formats in Python")
14533 (description
14534 "This package allows determination of image size from
14535 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14536 (license license:expat)))
14537
14538 (define-public python2-imagesize
14539 (package-with-python2 python-imagesize))
14540
14541 (define-public python-termstyle
14542 (package
14543 (name "python-termstyle")
14544 (version "0.1.11")
14545 (source
14546 (origin
14547 (method url-fetch)
14548 (uri (pypi-uri "termstyle" version))
14549 (sha256
14550 (base32
14551 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14552 (build-system python-build-system)
14553 (arguments
14554 '(#:phases
14555 (modify-phases %standard-phases
14556 (replace 'check
14557 (lambda _
14558 (invoke "python" "test3.py"))))))
14559 (home-page "https://github.com/gfxmonk/termstyle")
14560 (synopsis "Console text coloring for Python")
14561 (description "This package provides console text coloring for Python.")
14562 (license license:bsd-3)))
14563
14564 (define-public python-argcomplete
14565 (package
14566 (name "python-argcomplete")
14567 (version "1.11.1")
14568 (source
14569 (origin
14570 (method url-fetch)
14571 (uri (pypi-uri "argcomplete" version))
14572 (sha256
14573 (base32
14574 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14575 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14576 (build-system python-build-system)
14577 (native-inputs
14578 `(("python-coverage" ,python-coverage)
14579 ("python-flake8" ,python-flake8)
14580 ("python-pexpect" ,python-pexpect)
14581 ("python-wheel" ,python-wheel)
14582 ("tcsh" ,tcsh)
14583 ("fish" ,fish)
14584 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14585 (home-page "https://github.com/kislyuk/argcomplete")
14586 (synopsis "Shell tab completion for Python argparse")
14587 (description "argcomplete provides extensible command line tab completion
14588 of arguments and options for Python scripts using @code{argparse}. It's
14589 particularly useful for programs with many options or sub-parsers that can
14590 dynamically suggest completions; for example, when browsing resources over the
14591 network.")
14592 (license license:asl2.0)))
14593
14594 (define-public python2-argcomplete
14595 (package-with-python2 python-argcomplete))
14596
14597 (define-public python-csscompressor
14598 (package
14599 (name "python-csscompressor")
14600 (version "0.9.5")
14601 (source
14602 (origin
14603 (method url-fetch)
14604 (uri (pypi-uri "csscompressor" version))
14605 (sha256
14606 (base32
14607 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14608 (build-system python-build-system)
14609 (arguments
14610 '(#:phases
14611 (modify-phases %standard-phases
14612 (replace 'check
14613 (lambda _
14614 (invoke "py.test"))))))
14615 (native-inputs
14616 `(("python-pytest" ,python-pytest)))
14617 (home-page "https://github.com/sprymix/csscompressor")
14618 (synopsis "Python port of YUI CSS Compressor")
14619 (description
14620 "This package provides a python port of YUI CSS Compressor.")
14621 (license license:bsd-3)))
14622
14623 (define-public python-rcssmin
14624 (package
14625 (name "python-rcssmin")
14626 (version "1.0.6")
14627 (source
14628 (origin
14629 (method url-fetch)
14630 (uri (pypi-uri "rcssmin" version))
14631 (sha256
14632 (base32
14633 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14634 (build-system python-build-system)
14635 (arguments
14636 '(#:phases
14637 (modify-phases %standard-phases
14638 (replace 'check
14639 (lambda _
14640 (invoke "python" "run_tests.py" "tests"))))))
14641 (home-page "http://opensource.perlig.de/rcssmin/")
14642 (synopsis "CSS Minifier")
14643 (description "The minifier is based on the semantics of the YUI compressor,
14644 which itself is based on the rule list by Isaac Schlueter.")
14645 (license license:asl2.0)))
14646
14647 (define-public python-rjsmin
14648 (package
14649 (name "python-rjsmin")
14650 (version "1.1.0")
14651 (source
14652 (origin
14653 (method url-fetch)
14654 (uri (pypi-uri "rjsmin" version))
14655 (sha256
14656 (base32
14657 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14658 (modules '((guix build utils)))
14659 (snippet
14660 '(begin
14661 (for-each delete-file (find-files "bench" "\\.js$"))
14662 #t))))
14663 (build-system python-build-system)
14664 (arguments
14665 '(#:tests? #f ; Not all test files included.
14666 #:phases
14667 (modify-phases %standard-phases
14668 (replace 'check
14669 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14670 (add-installed-pythonpath inputs outputs)
14671 (if tests?
14672 (invoke "py.test" "-vv" "tests")
14673 #t))))))
14674 (native-inputs
14675 `(("python-pytest" ,python-pytest)))
14676 (home-page "http://opensource.perlig.de/rjsmin/")
14677 (synopsis "Javascript Minifier")
14678 (description "@code{rJSmin} is a javascript minifier written in Python. The
14679 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14680 is a re-implementation aiming for speed, so it can be used at runtime (rather
14681 than during a preprocessing step).")
14682 (license license:asl2.0)))
14683
14684 (define-public python-xopen
14685 (package
14686 (name "python-xopen")
14687 (version "0.5.0")
14688 (source
14689 (origin
14690 (method url-fetch)
14691 (uri (pypi-uri "xopen" version))
14692 (sha256
14693 (base32
14694 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14695 (build-system python-build-system)
14696 (propagated-inputs
14697 `(("python-setuptools-scm" ,python-setuptools-scm)))
14698 (home-page "https://github.com/marcelm/xopen/")
14699 (synopsis "Open compressed files transparently")
14700 (description "This module provides an @code{xopen} function that works like
14701 Python's built-in @code{open} function, but can also deal with compressed files.
14702 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14703 recognized by their file extensions. The focus is on being as efficient as
14704 possible on all supported Python versions.")
14705 (license license:expat)))
14706
14707 (define-public python2-xopen
14708 (let ((base (package-with-python2
14709 (strip-python2-variant python-xopen))))
14710 (package
14711 (inherit base)
14712 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14713 ,@(package-propagated-inputs base))))))
14714
14715 (define-public python-cheetah
14716 (package
14717 (name "python-cheetah")
14718 (version "3.2.4")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "Cheetah3" version))
14723 (sha256
14724 (base32
14725 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14726 (build-system python-build-system)
14727 (arguments
14728 `(#:modules ((guix build utils)
14729 (guix build python-build-system)
14730 (ice-9 ftw)
14731 (srfi srfi-1)
14732 (srfi srfi-26))
14733 #:phases (modify-phases %standard-phases
14734 (add-after 'unpack 'use-absolute-python
14735 (lambda _
14736 (substitute* "Cheetah/CheetahWrapper.py"
14737 (("#!/usr/bin/env python")
14738 (string-append "#!" (which "python"))))
14739 #t))
14740 (add-after 'unpack 'fix-tests
14741 (lambda _
14742 (substitute* "Cheetah/Tests/ImportHooks.py"
14743 (("os.path.dirname\\(__file__\\)")
14744 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14745 #t))
14746 (replace 'check
14747 (lambda _
14748 (let ((cwd (getcwd)))
14749 (setenv "PYTHONPATH"
14750 (string-append
14751 cwd "/build/"
14752 (find (cut string-prefix? "lib" <>)
14753 (scandir (string-append cwd "/build")))
14754 ":" (getenv "PYTHONPATH")))
14755 (setenv "PATH"
14756 (string-append (getenv "PATH")
14757 ":" cwd "/bin"))
14758 (setenv "TMPDIR" "/tmp")
14759
14760 (substitute* "Cheetah/Tests/Test.py"
14761 (("unittest.TextTestRunner\\(\\)")
14762 "unittest.TextTestRunner(verbosity=2)"))
14763
14764 (invoke "python" "Cheetah/Tests/Test.py")))))))
14765 (propagated-inputs
14766 `(("python-markdown" ,python-markdown))) ;optional
14767 (home-page "https://cheetahtemplate.org/")
14768 (synopsis "Template engine")
14769 (description "Cheetah is a text-based template engine and Python code
14770 generator.
14771
14772 Cheetah can be used as a standalone templating utility or referenced as
14773 a library from other Python applications. It has many potential uses,
14774 but web developers looking for a viable alternative to ASP, JSP, PHP and
14775 PSP are expected to be its principle user group.
14776
14777 Features:
14778 @enumerate
14779 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14780 text-based format.
14781 @item Cleanly separates content, graphic design, and program code.
14782 @item Blends the power and flexibility of Python with a simple template language
14783 that non-programmers can understand.
14784 @item Gives template writers full access to any Python data structure, module,
14785 function, object, or method in their templates.
14786 @item Makes code reuse easy by providing an object-orientated interface to
14787 templates that is accessible from Python code or other Cheetah templates.
14788 One template can subclass another and selectively reimplement sections of it.
14789 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14790 improve the performance of a dynamic website.
14791 @item Compiles templates into optimized, yet readable, Python code.
14792 @end enumerate")
14793 (license (license:x11-style "file://LICENSE"))))
14794
14795 (define-public python2-cheetah
14796 (package-with-python2 python-cheetah))
14797
14798 (define-public python-dulwich
14799 (package
14800 (name "python-dulwich")
14801 (version "0.19.16")
14802 (source
14803 (origin
14804 (method url-fetch)
14805 (uri (list (string-append "https://www.dulwich.io/releases/"
14806 "dulwich-" version ".tar.gz")
14807 (pypi-uri "dulwich" version)))
14808 (sha256
14809 (base32
14810 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14811 (build-system python-build-system)
14812 (arguments
14813 `(#:phases
14814 (modify-phases %standard-phases
14815 (add-before 'check 'fix-tests
14816 (lambda* (#:key inputs #:allow-other-keys)
14817 ;; The tests use Popen with a custom environment which doesn't
14818 ;; include PATH.
14819 (substitute* "dulwich/tests/compat/utils.py"
14820 (("'git'") (string-append "'"
14821 (which "git")
14822 "'")))
14823 (substitute* '("dulwich/tests/test_repository.py"
14824 "dulwich/tests/test_hooks.py")
14825 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14826 (setenv "TEST_RUNNER" "unittest")
14827 (setenv "PYTHONHASHSEED" "random")
14828 #t)))))
14829 (propagated-inputs
14830 `(("python-fastimport" ,python-fastimport)
14831 ("python-urllib3" ,python-urllib3)))
14832 (native-inputs
14833 `(("python-mock" ,python-mock)
14834 ("python-geventhttpclient" ,python-geventhttpclient)
14835 ("git" ,git)))
14836 (home-page "https://www.dulwich.io/")
14837 (synopsis "Git implementation in Python")
14838 (description "Dulwich is an implementation of the Git file formats and
14839 protocols written in pure Python.")
14840 ;; Can be used with either license.
14841 (license (list license:asl2.0 license:gpl2+))))
14842
14843 (define-public python2-dulwich
14844 (package-with-python2 python-dulwich))
14845
14846 (define-public python-pbkdf2
14847 (package
14848 (name "python-pbkdf2")
14849 (version "1.3")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "pbkdf2" version))
14854 (sha256
14855 (base32
14856 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14857 (build-system python-build-system)
14858 (arguments
14859 '(#:phases
14860 (modify-phases %standard-phases
14861 (replace 'check
14862 (lambda _
14863 (setenv "PYTHONPATH"
14864 (string-append (getcwd) "/build/lib:"
14865 (getenv "PYTHONPATH")))
14866 (invoke "python" "test/test_pbkdf2.py"))))))
14867 (propagated-inputs
14868 `(("python-pycrypto" ,python-pycrypto))) ; optional
14869 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14870 (synopsis "Password-based key derivation")
14871 (description "This module implements the password-based key derivation
14872 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14873
14874 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14875 is part of the RSA Public Key Cryptography Standards series. The provided
14876 implementation takes a password or a passphrase and a salt value (and
14877 optionally a iteration count, a digest module, and a MAC module) and provides
14878 a file-like object from which an arbitrarily-sized key can be read.")
14879 (license license:expat)))
14880
14881 (define-public python2-pbkdf2
14882 (package-with-python2 python-pbkdf2))
14883
14884 (define-public python-qrcode
14885 (package
14886 (name "python-qrcode")
14887 (version "6.1")
14888 (source
14889 (origin
14890 (method url-fetch)
14891 (uri (pypi-uri "qrcode" version))
14892 (sha256
14893 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14894 (build-system python-build-system)
14895 (arguments
14896 ;; FIXME: Tests require packaging 'pymaging'.
14897 '(#:tests? #f))
14898 (propagated-inputs
14899 `(("python-lxml" ,python-lxml) ; for SVG output
14900 ("python-pillow" ,python-pillow) ; for PNG output
14901 ("python-six" ,python-six)))
14902 (home-page "https://github.com/lincolnloop/python-qrcode")
14903 (synopsis "QR Code image generator")
14904 (description "This package provides a pure Python QR Code generator
14905 module. It uses the Python Imaging Library (PIL) to allow for the generation
14906 of QR Codes.
14907
14908 In addition this package provides a command line tool to generate QR codes and
14909 either write these QR codes to a file or do the output as ascii art at the
14910 console.")
14911 (license license:bsd-3)))
14912
14913 (define-public python2-qrcode
14914 (package-with-python2 python-qrcode))
14915
14916 (define-public python-rst2ansi
14917 (package
14918 (name "python-rst2ansi")
14919 (version "0.1.5")
14920 (source
14921 (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "rst2ansi" version))
14924 (sha256
14925 (base32
14926 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14927 (build-system python-build-system)
14928 (propagated-inputs
14929 `(("python-docutils" ,python-docutils)))
14930 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14931 (synopsis "Convert RST to ANSI-decorated console output")
14932 (description
14933 "Python module dedicated to rendering RST (reStructuredText) documents
14934 to ansi-escaped strings suitable for display in a terminal.")
14935 (license license:expat)))
14936
14937 (define-public python-ansi2html
14938 (package
14939 (name "python-ansi2html")
14940 (version "1.2.0")
14941 (source
14942 (origin
14943 (method url-fetch)
14944 (uri (pypi-uri "ansi2html" version))
14945 (sha256
14946 (base32
14947 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14948 (build-system python-build-system)
14949 (native-inputs
14950 `(("python-mock" ,python-mock)
14951 ("python-nose" ,python-nose)))
14952 (propagated-inputs
14953 `(("python-six" ,python-six)))
14954 (home-page "https://github.com/ralphbean/ansi2html")
14955 (synopsis "Convert ANSI-decorated console output to HTML")
14956 (description
14957 "@command{ansi2html} is a Python library and command line utility for
14958 converting text with ANSI color codes to HTML or LaTeX.")
14959 (license license:gpl3+)))
14960
14961 (define-public python2-ansi2html
14962 (package-with-python2 python-ansi2html))
14963
14964 (define-public python-ddt
14965 (package
14966 (name "python-ddt")
14967 (version "1.4.1")
14968 (source
14969 (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "ddt" version))
14972 (sha256
14973 (base32
14974 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14975 (build-system python-build-system)
14976 (native-inputs
14977 `(("python-pytest" ,python-pytest)))
14978 (propagated-inputs
14979 `(("python-pyyaml" ,python-pyyaml)))
14980 (home-page "https://github.com/datadriventests/ddt")
14981 (synopsis "Data-Driven Tests")
14982 (description
14983 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14984 running it with different test data, and make it appear as multiple test
14985 cases.")
14986 (license license:expat)))
14987
14988 (define-public python-pycountry
14989 (package
14990 (name "python-pycountry")
14991 (version "18.5.26")
14992 (source
14993 (origin
14994 (method url-fetch)
14995 (uri (pypi-uri "pycountry" version))
14996 (sha256
14997 (base32
14998 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14999 (build-system python-build-system)
15000 (home-page "https://bitbucket.org/flyingcircus/pycountry")
15001 (synopsis "ISO databases for languages, countries, currencies, etc.")
15002 (description
15003 "@code{pycountry} provides the ISO databases for the standards:
15004 @enumerate
15005 @item 639-3 (Languages)
15006 @item 3166 (Countries)
15007 @item 3166-3 (Deleted Countries)
15008 @item 3166-2 (Subdivisions of countries)
15009 @item 4217 (Currencies)
15010 @item 15924 (Scripts)
15011 @end enumerate
15012 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
15013 through a Python API.")
15014 (license license:lgpl2.1+)))
15015
15016 (define-public python2-pycountry
15017 (package-with-python2 python-pycountry))
15018
15019 (define-public python-pycosat
15020 (package
15021 (name "python-pycosat")
15022 (version "0.6.3")
15023 (source
15024 (origin
15025 (method url-fetch)
15026 (uri (pypi-uri "pycosat" version ".zip"))
15027 (sha256
15028 (base32
15029 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
15030 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
15031 (build-system python-build-system)
15032 (native-inputs
15033 `(("unzip" ,unzip)))
15034 (home-page "https://github.com/ContinuumIO/pycosat")
15035 (synopsis "Bindings to picosat (a SAT solver)")
15036 (description
15037 "This package provides efficient Python bindings to @code{picosat} on
15038 the C level. When importing pycosat, the @code{picosat} solver becomes part
15039 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
15040 Problem} (SAT) solver.")
15041 (license license:expat)))
15042
15043 (define-public python2-pycosat
15044 (package-with-python2 python-pycosat))
15045
15046 (define-public python2-ruamel.ordereddict
15047 (package
15048 (name "python2-ruamel.ordereddict")
15049 (version "0.4.9")
15050 (source
15051 (origin
15052 (method url-fetch)
15053 (uri (pypi-uri "ruamel.ordereddict" version))
15054 (sha256
15055 (base32
15056 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
15057 (build-system python-build-system)
15058 (arguments
15059 `(#:python ,python-2
15060 #:phases
15061 (modify-phases %standard-phases
15062 (delete 'check)
15063 (add-after 'install 'check
15064 (lambda* (#:key inputs outputs #:allow-other-keys)
15065 (add-installed-pythonpath inputs outputs)
15066 (invoke "python" "test/testordereddict.py"))))))
15067 (home-page "https://bitbucket.org/ruamel/ordereddict")
15068 (synopsis "Version of dict that keeps keys in insertion order")
15069 (description
15070 "This is an implementation of an ordered dictionary with @dfn{Key
15071 Insertion Order} (KIO: updates of values do not affect the position of the
15072 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
15073 removed and put at the back). The standard library module @code{OrderedDict},
15074 implemented later, implements a subset of @code{ordereddict} functionality.
15075 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
15076 Order} (KSO, no sorting function can be specified, but a transform can be
15077 specified to apply on the key before comparison (e.g. @code{string.lower})).")
15078 (license license:expat)))
15079
15080 (define-public python-pypeg2
15081 (package
15082 (name "python-pypeg2")
15083 (version "2.15.2")
15084 (source
15085 (origin
15086 (method url-fetch)
15087 (uri (pypi-uri "pyPEG2" version))
15088 (sha256
15089 (base32
15090 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
15091 (build-system python-build-system)
15092 (propagated-inputs `(("python-lxml" ,python-lxml)))
15093 (arguments
15094 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
15095 '(#:tests? #f))
15096 (home-page "https://fdik.org/pyPEG/")
15097 (synopsis "Parsering Expression Grammars in Python")
15098 (description "PyPEG is an intrinsic parser interpreter framework for
15099 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
15100 parse many formal languages.")
15101 (license license:gpl2)))
15102
15103 (define-public python-incremental
15104 (package
15105 (name "python-incremental")
15106 (version "17.5.0")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "incremental" version))
15111 (sha256
15112 (base32
15113 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
15114 (build-system python-build-system)
15115 (home-page "https://github.com/hawkowl/incremental")
15116 (synopsis "Library for versioning Python projects")
15117 (description "Incremental is a small library that versions your Python
15118 projects.")
15119 (license license:expat)))
15120
15121 (define-public python2-incremental
15122 (package-with-python2 python-incremental))
15123
15124 (define-public python-invoke
15125 (package
15126 (name "python-invoke")
15127 (home-page "https://www.pyinvoke.org/")
15128 (version "1.4.1")
15129 (source (origin
15130 (method url-fetch)
15131 (uri (pypi-uri "invoke" version))
15132 (sha256
15133 (base32
15134 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
15135 (build-system python-build-system)
15136 (arguments
15137 ;; XXX: Requires many dependencies that are not yet in Guix.
15138 `(#:tests? #f))
15139 (synopsis "Pythonic task execution")
15140 (description
15141 "Invoke is a Python task execution tool and library, drawing inspiration
15142 from various sources to arrive at a powerful and clean feature set. It is
15143 evolved from the Fabric project, but focuses on local and abstract concerns
15144 instead of servers and network commands.")
15145 (license license:bsd-3)))
15146
15147 (define-public python2-invoke
15148 (package-with-python2 python-invoke))
15149
15150 (define-public python-automat
15151 (package
15152 (name "python-automat")
15153 (version "20.2.0")
15154 (source (origin
15155 (method url-fetch)
15156 (uri (pypi-uri "Automat" version))
15157 (sha256
15158 (base32
15159 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15160 (build-system python-build-system)
15161 ;; We disable the tests because they require python-twisted, while
15162 ;; python-twisted depends on python-automat. Twisted is optional, but the
15163 ;; tests fail if it is not available. Also see
15164 ;; <https://github.com/glyph/automat/issues/71>.
15165 (arguments '(#:tests? #f))
15166 (native-inputs
15167 `(("python-m2r" ,python-m2r)
15168 ("python-setuptools-scm" ,python-setuptools-scm)
15169 ("python-graphviz" ,python-graphviz)))
15170 (propagated-inputs
15171 `(("python-six" ,python-six)
15172 ("python-attrs" ,python-attrs)))
15173 (home-page "https://github.com/glyph/Automat")
15174 (synopsis "Self-service finite-state machines")
15175 (description "Automat is a library for concise, idiomatic Python
15176 expression of finite-state automata (particularly deterministic finite-state
15177 transducers).")
15178 (license license:expat)))
15179
15180 (define-public python2-automat
15181 (package-with-python2 python-automat))
15182
15183 (define-public python-m2r
15184 (package
15185 (name "python-m2r")
15186 (version "0.2.1")
15187 (source (origin
15188 (method url-fetch)
15189 (uri (pypi-uri "m2r" version))
15190 (sha256
15191 (base32
15192 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15193 (build-system python-build-system)
15194 (propagated-inputs
15195 `(("python-docutils" ,python-docutils)
15196 ("python-mistune" ,python-mistune)))
15197 (native-inputs
15198 `(("python-pygments" ,python-pygments)
15199 ("python-mock" ,python-mock)))
15200 (home-page "https://github.com/miyakogi/m2r")
15201 (synopsis "Markdown to reStructuredText converter")
15202 (description "M2R converts a markdown file including reST markups to valid
15203 reST format.")
15204 (license license:expat)))
15205
15206 (define-public python2-m2r
15207 (package-with-python2 python-m2r))
15208
15209 (define-public python-constantly
15210 (package
15211 (name "python-constantly")
15212 (version "15.1.0")
15213 (source (origin
15214 (method url-fetch)
15215 (uri (pypi-uri "constantly" version))
15216 (sha256
15217 (base32
15218 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15219 (build-system python-build-system)
15220 (home-page "https://github.com/twisted/constantly")
15221 (synopsis "Symbolic constants in Python")
15222 (description "Constantly is a Python library that provides symbolic
15223 constant support. It includes collections and constants with text, numeric,
15224 and bit flag values.")
15225 (license license:expat)))
15226
15227 (define-public python2-constantly
15228 (package-with-python2 python-constantly))
15229
15230 (define-public python-attrs
15231 (package
15232 (name "python-attrs")
15233 (version "19.3.0")
15234 (source (origin
15235 (method url-fetch)
15236 (uri (pypi-uri "attrs" version))
15237 (sha256
15238 (base32
15239 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15240 (build-system python-build-system)
15241 (arguments
15242 `(#:modules ((guix build utils)
15243 (guix build python-build-system)
15244 (ice-9 ftw)
15245 (srfi srfi-1)
15246 (srfi srfi-26))
15247 #:phases (modify-phases %standard-phases
15248 (replace 'check
15249 (lambda _
15250 (let ((cwd (getcwd)))
15251 (setenv "PYTHONPATH"
15252 (string-append
15253 cwd "/build/"
15254 (find (cut string-prefix? "lib" <>)
15255 (scandir (string-append cwd "/build")))
15256 ":"
15257 (getenv "PYTHONPATH")))
15258 (invoke "python" "-m" "pytest")))))))
15259 (native-inputs
15260 `(("python-coverage" ,python-coverage)
15261 ("python-hypothesis" ,python-hypothesis)
15262 ("python-pympler" ,python-pympler)
15263 ("python-pytest" ,python-pytest)
15264 ("python-six" ,python-six)
15265 ("python-sphinx" ,python-sphinx)
15266 ("python-zope-interface" ,python-zope-interface)))
15267 (home-page "https://github.com/python-attrs/attrs/")
15268 (synopsis "Attributes without boilerplate")
15269 (description "@code{attrs} is a Python package with class decorators that
15270 ease the chores of implementing the most common attribute-related object
15271 protocols.")
15272 (license license:expat)))
15273
15274 (define-public python2-attrs
15275 (package-with-python2 python-attrs))
15276
15277 (define-public python-attrs-bootstrap
15278 (package
15279 (inherit python-attrs)
15280 (name "python-attrs-bootstrap")
15281 (native-inputs `())
15282 (arguments `(#:tests? #f))))
15283
15284 (define-public python2-attrs-bootstrap
15285 (package-with-python2 python-attrs-bootstrap))
15286
15287 (define-public python2-cliapp
15288 (package
15289 (name "python2-cliapp")
15290 (version "1.20180812.1")
15291 (source
15292 (origin
15293 (method url-fetch)
15294 (uri (string-append
15295 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15296 version ".tar.gz"))
15297 (sha256
15298 (base32
15299 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15300 (build-system python-build-system)
15301 (arguments
15302 `(#:python ,python-2
15303 #:phases
15304 (modify-phases %standard-phases
15305 ;; check phase needs to be run before the build phase. If not,
15306 ;; coverage-test-runner looks for tests for the built source files,
15307 ;; and fails.
15308 (delete 'check)
15309 (add-before 'build 'check
15310 (lambda _
15311 ;; Disable python3 tests
15312 (substitute* "check"
15313 (("python3") "# python3"))
15314 (invoke "./check"))))))
15315 (native-inputs
15316 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15317 ("python2-pep8" ,python2-pep8)))
15318 (propagated-inputs
15319 `(("python2-pyaml" ,python2-pyaml)))
15320 (home-page "https://liw.fi/cliapp/")
15321 (synopsis "Python framework for command line programs")
15322 (description "@code{python2-cliapp} is a python framework for
15323 command line programs. It contains the typical stuff such programs
15324 need to do, such as parsing the command line for options, and
15325 iterating over input files.")
15326 (license license:gpl2+)))
15327
15328 (define-public python2-ttystatus
15329 (package
15330 (name "python2-ttystatus")
15331 (version "0.38")
15332 (source
15333 (origin
15334 (method git-fetch)
15335 (uri (git-reference
15336 (url "http://git.liw.fi/ttystatus")
15337 ;; There are no tags after ttystatus-0.36.
15338 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15339 (sha256
15340 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15341 (file-name (git-file-name name version))))
15342 (build-system python-build-system)
15343 (native-inputs
15344 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15345 ("python2-pep8" ,python2-pep8)))
15346 (arguments
15347 `(#:python ,python-2
15348 #:phases
15349 (modify-phases %standard-phases
15350 ;; check phase needs to be run before the build phase. If not,
15351 ;; coverage-test-runner looks for tests for the built source files,
15352 ;; and fails.
15353 (delete 'check)
15354 (add-before 'build 'check
15355 (lambda _ (invoke "make" "check"))))))
15356 (home-page "https://liw.fi/ttystatus/")
15357 (synopsis "Python library for showing progress reporting and
15358 status updates on terminals")
15359 (description "@code{python2-ttystatus} is a python library for
15360 showing progress reporting and status updates on terminals, for
15361 command line programs. Output is automatically adapted to the width
15362 of the terminal: truncated if it does not fit, and resized if the
15363 terminal size changes.")
15364 (license license:gpl3+)))
15365
15366 (define-public python2-tracing
15367 (package
15368 (name "python2-tracing")
15369 (version "0.10")
15370 (source
15371 (origin
15372 (method url-fetch)
15373 (uri (string-append
15374 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15375 version ".tar.gz"))
15376 (sha256
15377 (base32
15378 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15379 (build-system python-build-system)
15380 (arguments
15381 `(#:python ,python-2))
15382 (home-page "https://liw.fi/tracing/")
15383 (synopsis "Python debug logging helper")
15384 (description "@code{python2-tracing} is a python library for
15385 logging debug messages. It provides a way to turn debugging messages
15386 on and off, based on the filename they occur in. It is much faster
15387 than using @code{logging.Filter} to accomplish the same thing, which
15388 matters when code is run in production mode. The actual logging still
15389 happens using the @code{logging} library.")
15390 (license license:gpl3+)))
15391
15392 (define-public python2-larch
15393 (package
15394 (name "python2-larch")
15395 (version "1.20151025")
15396 (source
15397 (origin
15398 (method url-fetch)
15399 (uri (string-append
15400 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15401 version ".tar.gz"))
15402 (patches (search-patches
15403 "python2-larch-coverage-4.0a6-compatibility.patch"))
15404 (sha256
15405 (base32
15406 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15407 (build-system python-build-system)
15408 (arguments
15409 `(#:python ,python-2
15410 #:phases
15411 (modify-phases %standard-phases
15412 ;; check phase needs to be run before the build phase. If not,
15413 ;; coverage-test-runner looks for tests for the built source files,
15414 ;; and fails.
15415 (delete 'check)
15416 (add-before 'build 'check
15417 (lambda _ (invoke "make" "check"))))))
15418 (native-inputs
15419 `(("cmdtest" ,cmdtest)
15420 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15421 (propagated-inputs
15422 `(("python2-tracing" ,python2-tracing)))
15423 (home-page "https://liw.fi/larch/")
15424 (synopsis "Python copy-on-write B-tree library")
15425 (description "@code{python2-larch} is an implementation of
15426 particular kind of B-tree, based on research by Ohad Rodeh. See
15427 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15428 on the data structure.
15429
15430 The distinctive feature of this B-tree is that a node is never
15431 (conceptually) modified. Instead, all updates are done by
15432 copy-on-write. This makes it easy to clone a tree, and modify only the
15433 clone, while other processes access the original tree.")
15434 (license license:gpl3+)))
15435
15436 (define-public python-astroid
15437 (package
15438 (name "python-astroid")
15439 (version "2.4.2")
15440 (source
15441 (origin
15442 (method url-fetch)
15443 (uri (pypi-uri "astroid" version))
15444 (sha256
15445 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15446 (modules '((guix build utils)))
15447 (snippet
15448 '(begin
15449 ;; Check to see if the version pinning has been removed.
15450 (substitute* "astroid/__pkginfo__.py"
15451 (("==1\\.4\\.\\*") ">=1.4.0"))
15452 #t))))
15453 (build-system python-build-system)
15454 (propagated-inputs
15455 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15456 ("python-six" ,python-six)
15457 ("python-wrapt" ,python-wrapt)))
15458 (native-inputs
15459 `(("python-dateutil" ,python-dateutil)
15460 ("python-pytest" ,python-pytest)
15461 ("python-pytest-runner" ,python-pytest-runner)))
15462 (home-page "https://github.com/PyCQA/astroid")
15463 (synopsis "Common base representation of python source code for pylint and
15464 other projects")
15465 (description "@code{python-astroid} provides a common base representation
15466 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15467
15468 It provides a compatible representation which comes from the _ast module. It
15469 rebuilds the tree generated by the builtin _ast module by recursively walking
15470 down the AST and building an extended ast. The new node classes have
15471 additional methods and attributes for different usages. They include some
15472 support for static inference and local name scopes. Furthermore, astroid
15473 builds partial trees by inspecting living objects.")
15474 (license license:lgpl2.1+)
15475 (properties `((python2-variant . ,(delay python2-astroid))))))
15476
15477 (define-public python2-astroid
15478 (let ((base (package-with-python2
15479 (strip-python2-variant python-astroid))))
15480 (package (inherit base)
15481 ;; Version 2.x removes python2 support.
15482 (version "1.6.5")
15483 (source
15484 (origin
15485 (method url-fetch)
15486 (uri (pypi-uri "astroid" version))
15487 (sha256
15488 (base32
15489 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15490 (arguments
15491 (substitute-keyword-arguments (package-arguments base)
15492 ((#:phases phases)
15493 `(modify-phases ,phases
15494 (add-after 'unpack 'remove-spurious-test
15495 (lambda _
15496 ;; https://github.com/PyCQA/astroid/issues/276
15497 (delete-file "astroid/tests/unittest_brain.py")
15498 #t))
15499 (replace 'check
15500 (lambda _
15501 (invoke"python" "-m" "unittest" "discover"
15502 "-p" "unittest*.py")))))))
15503 (native-inputs `())
15504 (propagated-inputs
15505 `(("python2-backports-functools-lru-cache"
15506 ,python2-backports-functools-lru-cache)
15507 ("python2-enum34" ,python2-enum34)
15508 ("python2-singledispatch" ,python2-singledispatch)
15509 ,@(alist-delete "python-typed-ast"
15510 (package-propagated-inputs base)))))))
15511
15512 (define-public python-isbnlib
15513 (package
15514 (name "python-isbnlib")
15515 (version "3.10.4")
15516 (source
15517 (origin
15518 (method url-fetch)
15519 (uri (pypi-uri "isbnlib" version))
15520 (sha256
15521 (base32
15522 "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
15523 (build-system python-build-system)
15524 (arguments '(#:tests? #f)) ; No test
15525 (home-page "https://github.com/xlcnd/isbnlib")
15526 (synopsis "Python library to work with ISBN strings")
15527 (description "@code{python-isbnlib} is a (pure) python library that provides
15528 several useful methods and functions to validate, clean, transform, hyphenate and
15529 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15530 version, is suitable to be include as a dependency in other projects.")
15531 (license license:lgpl3+)))
15532
15533 (define-public python-isort
15534 (package
15535 (name "python-isort")
15536 (version "4.3.4")
15537 (source
15538 (origin
15539 (method git-fetch)
15540 (uri (git-reference
15541 ;; Tests pass only from the Github sources
15542 (url "https://github.com/timothycrosley/isort")
15543 (commit version)))
15544 (file-name (git-file-name name version))
15545 (sha256
15546 (base32
15547 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15548 (build-system python-build-system)
15549 (native-inputs
15550 `(("python-mock" ,python-mock)
15551 ("python-pytest" ,python-pytest)))
15552 (home-page "https://github.com/timothycrosley/isort")
15553 (synopsis "Python utility/library to sort python imports")
15554 (description "@code{python-isort} is a python utility/library to sort
15555 imports alphabetically, and automatically separated into sections. It
15556 provides a command line utility, a python library and plugins for various
15557 editors.")
15558 (license license:expat)
15559 (properties `((python2-variant . ,(delay python2-isort))))))
15560
15561 (define-public python2-isort
15562 (let ((base (package-with-python2
15563 (strip-python2-variant python-isort))))
15564 (package (inherit base)
15565 (native-inputs
15566 `(("python2-futures" ,python2-futures)
15567 ,@(package-native-inputs base))))))
15568
15569 (define-public python2-backports-functools-lru-cache
15570 (package
15571 (name "python2-backports-functools-lru-cache")
15572 (version "1.6.1")
15573 (source
15574 (origin
15575 (method url-fetch)
15576 ;; only the pypi tarballs contain the necessary metadata
15577 (uri (pypi-uri "backports.functools_lru_cache" version))
15578 (sha256
15579 (base32
15580 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15581 (build-system python-build-system)
15582 (native-inputs
15583 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15584 (arguments
15585 `(#:python ,python-2))
15586 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15587 (synopsis "Backport of functools.lru_cache from Python 3.3")
15588 (description "@code{python2-backports-functools-lru-cache} is a backport
15589 of @code{functools.lru_cache} from python 3.3.")
15590 (license license:expat)))
15591
15592 (define-public python-configparser
15593 (package
15594 (name "python-configparser")
15595 (version "4.0.2")
15596 (source
15597 (origin
15598 (method url-fetch)
15599 (uri (pypi-uri "configparser" version))
15600 (sha256
15601 (base32
15602 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15603 (native-inputs
15604 `(("python-setuptools_scm" ,python-setuptools-scm)))
15605 (build-system python-build-system)
15606 (home-page "https://github.com/jaraco/configparser/")
15607 (synopsis "Backport of configparser from python 3.5")
15608 (description "@code{python-configparser} is a backport of
15609 @code{configparser} from Python 3.5 so that it can be used directly
15610 in other versions.")
15611 (license license:expat)))
15612
15613 (define-public python2-configparser
15614 (package-with-python2 python-configparser))
15615
15616 (define-public python-iniconfig
15617 (package
15618 (name "python-iniconfig")
15619 (version "1.1.1")
15620 (source
15621 (origin
15622 (method url-fetch)
15623 (uri (pypi-uri "iniconfig" version))
15624 (sha256
15625 (base32
15626 "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
15627 (build-system python-build-system)
15628 (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
15629 (synopsis "Simple INI-file parser")
15630 (description "The @code{iniconfig} package provides a small and simple
15631 INI-file parser module having a unique set of features; @code{iniconfig}
15632 @itemize
15633 @item maintains the order of sections and entries;
15634 @item supports multi-line values with or without line-continuations;
15635 @item supports \"#\" comments everywhere;
15636 @item raises errors with proper line-numbers;
15637 @item raises an error when two sections have the same name.
15638 @end itemize")
15639 (license license:expat)))
15640
15641 (define-public python-mamba
15642 (package
15643 (name "python-mamba")
15644 (version "0.11.2")
15645 (source (origin
15646 (method url-fetch)
15647 (uri (pypi-uri "mamba" version))
15648 (sha256
15649 (base32
15650 "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
15651 (build-system python-build-system)
15652 (arguments `(#:tests? #f)) ; No test
15653 (propagated-inputs
15654 `(("python-clint" ,python-clint)
15655 ("python-coverage" ,python-coverage)))
15656 (home-page "https://nestorsalceda.com/mamba/")
15657 (synopsis "Test runner for Python")
15658 (description
15659 "Mamba is a Behaviour-Driven Development tool for Python developers.
15660 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15661 (license license:expat)))
15662
15663 (define-public python-mando
15664 (package
15665 (name "python-mando")
15666 (version "0.6.4")
15667 (source (origin
15668 (method url-fetch)
15669 (uri (pypi-uri "mando" version))
15670 (sha256
15671 (base32
15672 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15673 (build-system python-build-system)
15674 (propagated-inputs
15675 `(("python-rst2ansi" ,python-rst2ansi)
15676 ("python-six" ,python-six)))
15677 (native-inputs
15678 `(("python-pytest" ,python-pytest)))
15679 (home-page "https://mando.readthedocs.org/")
15680 (synopsis
15681 "Wrapper around argparse, allowing creation of complete CLI applications")
15682 (description
15683 "This package is a wrapper around argparse, allowing you to write complete CLI
15684 applications in seconds while maintaining all the flexibility.")
15685 (license license:expat)))
15686
15687 (define-public python2-mando
15688 (package-with-python2 python-mando))
15689
15690 (define-public python2-argparse
15691 (package
15692 (name "python2-argparse")
15693 (version "1.4.0")
15694 (source
15695 (origin
15696 (method url-fetch)
15697 (uri (pypi-uri "argparse" version))
15698 (sha256
15699 (base32
15700 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15701 (build-system python-build-system)
15702 (arguments
15703 `(#:python ,python-2))
15704 (home-page "https://github.com/ThomasWaldmann/argparse/")
15705 (synopsis "Python command-line parsing library")
15706 (description
15707 "This package is mostly for people who want to have @code{argparse} on
15708 older Pythons because it was not part of the standard library back then.")
15709 (license license:psfl)))
15710
15711 (define-public python-fudge
15712 (package
15713 (name "python-fudge")
15714 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15715 ;; package, which is currently the only use of this package.
15716 (version "0.9.6")
15717 (source
15718 (origin
15719 (method url-fetch)
15720 (uri (pypi-uri "fudge" version))
15721 (sha256
15722 (base32
15723 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15724 (build-system python-build-system)
15725 (arguments
15726 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15727 (home-page "https://github.com/fudge-py/fudge")
15728 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15729 (description
15730 "Fudge is a Python module for using fake objects (mocks and stubs) to
15731 test real ones.
15732
15733 In readable Python code, you declare the methods available on your fake object
15734 and how they should be called. Then you inject that into your application and
15735 start testing. This declarative approach means you don’t have to record and
15736 playback actions and you don’t have to inspect your fakes after running code.
15737 If the fake object was used incorrectly then you’ll see an informative
15738 exception message with a traceback that points to the culprit.")
15739 (license license:expat)))
15740
15741 (define-public python2-fudge
15742 (package-with-python2 python-fudge))
15743
15744 (define-public python-mwclient
15745 (package
15746 (name "python-mwclient")
15747 (version "0.10.1")
15748 (source
15749 (origin
15750 (method git-fetch)
15751 ;; The PyPI version wouldn't contain tests.
15752 (uri (git-reference
15753 (url "https://github.com/mwclient/mwclient")
15754 (commit (string-append "v" version))))
15755 (file-name (git-file-name name version))
15756 (sha256
15757 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15758 (build-system python-build-system)
15759 (propagated-inputs
15760 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15761 ("python-six" ,python-six)))
15762 (native-inputs
15763 `(("python-mock" ,python-mock)
15764 ("python-pytest" ,python-pytest)
15765 ("python-pytest-cov" ,python-pytest-cov)
15766 ("python-pytest-runner" ,python-pytest-runner)
15767 ("python-responses" ,python-responses)))
15768 (home-page "https://github.com/btongminh/mwclient")
15769 (synopsis "MediaWiki API client")
15770 (description "This package provides a MediaWiki API client.")
15771 (license license:expat)))
15772
15773 (define-public python2-mwclient
15774 (package-with-python2 python-mwclient))
15775
15776 (define-public python-utils
15777 (package
15778 (name "python-utils")
15779 (version "2.4.0")
15780 (source (origin
15781 (method url-fetch)
15782 (uri (pypi-uri "python-utils" version))
15783 (sha256
15784 (base32
15785 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15786 (build-system python-build-system)
15787 (arguments
15788 `(#:phases
15789 (modify-phases %standard-phases
15790 (replace 'check
15791 (lambda* (#:key inputs outputs #:allow-other-keys)
15792 (add-installed-pythonpath inputs outputs)
15793 (delete-file "pytest.ini")
15794 (invoke "pytest" "-vv"))))))
15795 (native-inputs
15796 `(("pytest-runner" ,python-pytest-runner)
15797 ("pytest" ,python-pytest)
15798 ("six" ,python-six)))
15799 (home-page "https://github.com/WoLpH/python-utils")
15800 (synopsis "Convenient utilities not included with the standard Python install")
15801 (description
15802 "Python Utils is a collection of small Python functions and classes which
15803 make common patterns shorter and easier.")
15804 (license license:bsd-2)))
15805
15806 (define-public python2-utils
15807 (package-with-python2 python-utils))
15808
15809 (define-public python-diff-match-patch
15810 (package
15811 (name "python-diff-match-patch")
15812 (version "20121119")
15813 (source
15814 (origin
15815 (method url-fetch)
15816 (uri (pypi-uri "diff-match-patch" version))
15817 (sha256
15818 (base32
15819 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15820 (build-system python-build-system)
15821 (home-page "https://code.google.com/p/google-diff-match-patch")
15822 (synopsis "Synchronize plain text")
15823 (description "Diff Match and Patch libraries offer robust algorithms to
15824 perform the operations required for synchronizing plain text.")
15825 (license license:asl2.0)))
15826
15827 (define-public python2-diff-match-patch
15828 (package-with-python2 python-diff-match-patch))
15829
15830 (define-public python-dirsync
15831 (package
15832 (name "python-dirsync")
15833 (version "2.2.5")
15834 (source
15835 (origin
15836 (method url-fetch)
15837 (uri (pypi-uri "dirsync" version))
15838 (sha256
15839 (base32
15840 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15841 (build-system python-build-system)
15842 (propagated-inputs
15843 `(("six" ,python-six)))
15844 (home-page "https://github.com/tkhyn/dirsync")
15845 (synopsis "Advanced directory tree synchronisation tool")
15846 (description "Advanced directory tree synchronisation tool.")
15847 (license license:expat)))
15848
15849 (define-public python2-dirsync
15850 (package-with-python2 python-dirsync))
15851
15852 (define-public python-levenshtein
15853 (package
15854 (name "python-levenshtein")
15855 (version "0.12.0")
15856 (source
15857 (origin
15858 (method url-fetch)
15859 (uri (pypi-uri "python-Levenshtein" version))
15860 (sha256
15861 (base32
15862 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15863 (build-system python-build-system)
15864 (home-page "https://github.com/ztane/python-Levenshtein")
15865 (synopsis "Fast computation of Levenshtein distance and string similarity")
15866 (description
15867 "The Levenshtein Python C extension module contains functions for fast computation of
15868 @enumerate
15869 @item Levenshtein (edit) distance, and edit operations
15870 @item string similarity
15871 @item approximate median strings, and generally string averaging
15872 @item string sequence and set similarity
15873 @end enumerate
15874 It supports both normal and Unicode strings.")
15875 (license license:gpl2+)))
15876
15877 (define-public python2-levenshtein
15878 (package-with-python2 python-levenshtein))
15879
15880 (define-public python-scandir
15881 (package
15882 (name "python-scandir")
15883 (version "1.10.0")
15884 (source
15885 (origin
15886 (method url-fetch)
15887 (uri (pypi-uri "scandir" version))
15888 (sha256
15889 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15890 (build-system python-build-system)
15891 (arguments
15892 `(#:phases (modify-phases %standard-phases
15893 (replace 'check
15894 (lambda _
15895 (invoke "python" "test/run_tests.py"))))))
15896 (home-page "https://github.com/benhoyt/scandir")
15897 (synopsis "Directory iteration function")
15898 (description
15899 "Directory iteration function like os.listdir(), except that instead of
15900 returning a list of bare filenames, it yields DirEntry objects that include
15901 file type and stat information along with the name. Using scandir() increases
15902 the speed of os.walk() by 2-20 times (depending on the platform and file
15903 system) by avoiding unnecessary calls to os.stat() in most cases.
15904
15905 This package is part of the Python standard library since version 3.5.")
15906 (license license:bsd-3)))
15907
15908 (define-public python2-scandir
15909 (package-with-python2 python-scandir))
15910
15911 (define-public python2-stemming
15912 (package
15913 (name "python2-stemming")
15914 (version "1.0.1")
15915 (source
15916 (origin
15917 (method url-fetch)
15918 (uri (pypi-uri "stemming" version))
15919 (sha256
15920 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15921 (build-system python-build-system)
15922 (arguments
15923 `(#:python ,python-2))
15924 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15925 (synopsis "Python implementations of various stemming algorithms")
15926 (description
15927 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15928 stemming algorithms for English. These implementations are straightforward and
15929 efficient, unlike some Python versions of the same algorithms available on the
15930 Web. This package is an extraction of the stemming code included in the Whoosh
15931 search engine.")
15932 (license license:public-domain)))
15933
15934 (define-public python-factory-boy
15935 (package
15936 (name "python-factory-boy")
15937 (version "2.8.1")
15938 (source
15939 (origin
15940 (method url-fetch)
15941 (uri (pypi-uri "factory_boy" version))
15942 (sha256
15943 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15944 (build-system python-build-system)
15945 (arguments
15946 ;; Tests are not included in the tarball.
15947 `(#:tests? #f))
15948 (propagated-inputs
15949 `(("faker" ,python-faker)))
15950 (home-page "https://github.com/benhoyt/scandir")
15951 (synopsis "Versatile test fixtures replacement")
15952 (description
15953 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15954
15955 As a fixtures replacement tool, it aims to replace static, hard to maintain
15956 fixtures with easy-to-use factories for complex object.
15957
15958 Instead of building an exhaustive test setup with every possible combination
15959 of corner cases, factory_boy allows you to use objects customized for the
15960 current test, while only declaring the test-specific fields")
15961 (license license:expat)))
15962
15963 (define-public python2-factory-boy
15964 (package-with-python2 python-factory-boy))
15965
15966 (define-public python-translate-toolkit
15967 (package
15968 (name "python-translate-toolkit")
15969 (version "2.1.0")
15970 (source
15971 (origin
15972 (method url-fetch)
15973 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15974 (sha256
15975 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15976 (build-system python-build-system)
15977 (native-inputs
15978 `(("python-pytest" ,python-pytest)
15979 ("python-sphinx" ,python-sphinx)))
15980 (propagated-inputs
15981 `(("python-babel" ,python-babel)
15982 ("python-beautifulsoup4" ,python-beautifulsoup4)
15983 ("python-chardet" ,python-chardet)
15984 ("python-diff-match-patch" ,python-diff-match-patch)
15985 ("python-levenshtein" ,python-levenshtein)
15986 ("python-lxml" ,python-lxml)
15987 ("python-six" ,python-six)
15988 ("python-vobject" ,python-vobject)
15989 ("python-pyyaml" ,python-pyyaml)))
15990 (arguments
15991 ;; TODO: tests are not run, because they end with
15992 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15993 ;; 'parse_funcs'
15994 ;; during test setup.
15995 `(#:tests? #f))
15996 (home-page "https://toolkit.translatehouse.org")
15997 (synopsis "Tools and API for translation and localization engineering")
15998 (description
15999 "Tools and API for translation and localization engineering. It contains
16000 several utilities, as well as an API for building localization tools.")
16001 (license license:gpl2+)))
16002
16003 (define-public python2-translate-toolkit
16004 (package-with-python2 python-translate-toolkit))
16005
16006 (define-public python-packaging
16007 (package
16008 (name "python-packaging")
16009 (version "20.0")
16010 (source
16011 (origin
16012 (method url-fetch)
16013 (uri (pypi-uri "packaging" version))
16014 ;; XXX: The URL in the patch file is wrong, it should be
16015 ;; <https://github.com/pypa/packaging/pull/256>.
16016 (patches (search-patches "python-packaging-test-arch.patch"))
16017 (sha256
16018 (base32
16019 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
16020 (build-system python-build-system)
16021 (arguments
16022 `(#:phases (modify-phases %standard-phases
16023 (replace 'check
16024 (lambda* (#:key tests? #:allow-other-keys)
16025 (if tests?
16026 (invoke "py.test" "-vv")
16027 (format #t "test suite not run~%"))
16028 #t)))))
16029 (native-inputs
16030 `(("python-pretend" ,python-pretend)
16031 ("python-pytest" ,python-pytest)))
16032 (propagated-inputs
16033 `(("python-pyparsing" ,python-pyparsing)
16034 ("python-six" ,python-six)))
16035 (home-page "https://github.com/pypa/packaging")
16036 (synopsis "Core utilities for Python packages")
16037 (description "Packaging is a Python module for dealing with Python packages.
16038 It offers an interface for working with package versions, names, and dependency
16039 information.")
16040 ;; From 'LICENSE': This software is made available under the terms of
16041 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
16042 ;; Contributions to this software is made under the terms of *both* these
16043 ;; licenses.
16044 (license (list license:asl2.0 license:bsd-2))))
16045
16046 (define-public python2-packaging
16047 (package-with-python2 python-packaging))
16048
16049 ;; Variants with minimal dependencies, for bootstrapping Pytest.
16050 (define-public python-packaging-bootstrap
16051 (hidden-package
16052 (package/inherit
16053 python-packaging
16054 (name "python-packaging-bootstrap")
16055 (native-inputs '())
16056 (propagated-inputs
16057 `(("python-pyparsing" ,python-pyparsing)))
16058 (arguments '(#:tests? #f)))))
16059
16060 (define-public python2-packaging-bootstrap
16061 (hidden-package
16062 (package/inherit
16063 python2-packaging
16064 (name "python2-packaging-bootstrap")
16065 (native-inputs '())
16066 (propagated-inputs
16067 `(("python-pyparsing" ,python2-pyparsing)))
16068 (arguments
16069 `(#:tests? #f
16070 ,@(package-arguments python2-packaging))))))
16071
16072 (define-public python-relatorio
16073 (package
16074 (name "python-relatorio")
16075 (version "0.8.0")
16076 (source
16077 (origin
16078 (method url-fetch)
16079 (uri (pypi-uri "relatorio" version))
16080 (sha256
16081 (base32
16082 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
16083 (build-system python-build-system)
16084 (propagated-inputs
16085 `(("python-lxml" ,python-lxml)
16086 ("python-genshi" ,python-genshi)))
16087 (native-inputs
16088 `(("python-magic" ,python-magic)))
16089 (home-page "https://relatorio.tryton.org/")
16090 (synopsis "Templating library able to output ODT and PDF files")
16091 (description "Relatorio is a templating library which provides a way to
16092 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
16093 for more filetypes can be easily added by creating plugins for them.")
16094 (license license:gpl3+)))
16095
16096 (define-public python2-relatorio
16097 (package-with-python2 python-relatorio))
16098
16099 (define-public python-radon
16100 (package
16101 (name "python-radon")
16102 (version "4.1.0")
16103 (source
16104 (origin
16105 (method url-fetch)
16106 (uri (pypi-uri "radon" version))
16107 (sha256
16108 (base32
16109 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
16110 (build-system python-build-system)
16111 (arguments
16112 `(#:phases (modify-phases %standard-phases
16113 (replace 'check
16114 (lambda _
16115 (invoke "python" "radon/tests/run.py"))))))
16116 (propagated-inputs
16117 `(("python-colorama" ,python-colorama)
16118 ("python-flake8-polyfill" ,python-flake8-polyfill)
16119 ("python-mando" ,python-mando)))
16120 (native-inputs
16121 `(("python-pytest" ,python-pytest)
16122 ("python-pytest-mock" ,python-pytest-mock)))
16123 (home-page "https://radon.readthedocs.org/")
16124 (synopsis "Code Metrics in Python")
16125 (description "Radon is a Python tool which computes various code metrics.
16126 Supported metrics are:
16127 @itemize @bullet
16128 @item raw metrics: SLOC, comment lines, blank lines, &c.
16129 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
16130 @item Halstead metrics (all of them)
16131 @item the Maintainability Index (a Visual Studio metric)
16132 @end itemize")
16133 (properties `((python2-variant . ,(delay python2-radon))))
16134 (license license:expat)))
16135
16136 (define-public python2-radon
16137 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
16138 (package
16139 (inherit base)
16140 (propagated-inputs
16141 `(("python-configparser" ,python2-configparser)
16142 ("python-future" ,python2-future)
16143 ,@(package-propagated-inputs base))))))
16144
16145 (define-public python-sure
16146 (package
16147 (name "python-sure")
16148 (version "1.4.11")
16149 (source
16150 (origin
16151 (method url-fetch)
16152 (uri (pypi-uri "sure" version))
16153 (sha256
16154 (base32
16155 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
16156 (build-system python-build-system)
16157 (propagated-inputs
16158 `(("python-mock" ,python-mock)
16159 ("python-six" ,python-six)))
16160 (native-inputs
16161 `(("python-nose" ,python-nose)))
16162 (home-page "https://github.com/gabrielfalcao/sure")
16163 (synopsis "Automated testing library in python for python")
16164 (description
16165 "Sure is a python library that leverages a DSL for writing assertions.
16166 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
16167 (license license:gpl3+)))
16168
16169 (define-public python2-sure
16170 (package-with-python2 python-sure))
16171
16172 (define-public python2-couleur
16173 ;; This package does not seem to support python3 at all, hence,
16174 ;; only the python2 variant definition is provided.
16175 (package
16176 (name "python2-couleur")
16177 (version "0.6.2")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "couleur" version))
16182 (sha256
16183 (base32
16184 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16185 (build-system python-build-system)
16186 (arguments
16187 `(#:python ,python-2))
16188 (home-page "https://github.com/gabrielfalcao/couleur")
16189 (synopsis
16190 "ANSI terminal tool for python, colored shell and other handy fancy features")
16191 (description
16192 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16193 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16194 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16195 ;; https://github.com/gabrielfalcao/couleur/issues/11
16196 (license license:lgpl3+)))
16197
16198 (define-public python-misaka
16199 (package
16200 (name "python-misaka")
16201 (version "2.1.1")
16202 (source
16203 (origin
16204 (method url-fetch)
16205 (uri (pypi-uri "misaka" version))
16206 (sha256
16207 (base32
16208 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16209 (build-system python-build-system)
16210 (arguments
16211 `(;; Line 37 of setup.py calls self.run_command('develop')
16212 ;; in the 'check' phase. This command seems to be trying
16213 ;; to write to
16214 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16215 ;; for which it does not have the permission to write.
16216 #:tests? #f))
16217 (propagated-inputs
16218 `(("python-cffi" ,python-cffi)))
16219 (home-page "https://github.com/FSX/misaka")
16220 (synopsis "Python binding for Hoedown")
16221 (description
16222 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16223 library written in C. It features a fast HTML renderer and functionality to make custom
16224 renderers (e.g. man pages or LaTeX).")
16225 (license license:expat)))
16226
16227 (define-public python2-misaka
16228 (package-with-python2 python-misaka))
16229
16230 (define-public python2-steadymark
16231 ;; This is forced into being a python2 only variant
16232 ;; due to its dependence on couleur that has no support
16233 ;; for python3
16234 (package
16235 (name "python2-steadymark")
16236 (version "0.7.3")
16237 (source
16238 (origin
16239 (method url-fetch)
16240 (uri (pypi-uri "steadymark" version))
16241 (sha256
16242 (base32
16243 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16244 (build-system python-build-system)
16245 (native-inputs
16246 `(("python-couleur" ,python2-couleur)
16247 ("python-sure" ,python2-sure)
16248 ("python-misaka" ,python2-misaka)))
16249 (arguments
16250 `(#:python ,python-2
16251 #:phases
16252 (modify-phases %standard-phases
16253 (add-before 'build 'patch-setup-py
16254 (lambda _
16255 ;; Update requirements from dependency==version
16256 ;; to dependency>=version
16257 (substitute* "setup.py"
16258 (("==") ">="))
16259 #t)))))
16260 (home-page "https://github.com/gabrielfalcao/steadymark")
16261 (synopsis "Markdown-based test runner for python")
16262 (description
16263 "@code{Steadymark} allows documentation to be written in github-flavoured
16264 markdown. The documentation may contain snippets of code surrounded by python
16265 code blocks and @code{Steadymark} will find these snippets and run them, making
16266 sure that there are no old malfunctional examples in the documentation examples.")
16267 (license license:expat)))
16268
16269 (define-public python-jsonpointer
16270 (package
16271 (name "python-jsonpointer")
16272 (version "1.10")
16273 (source
16274 (origin
16275 (method url-fetch)
16276 (uri (pypi-uri "jsonpointer" version))
16277 (sha256
16278 (base32
16279 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16280 (build-system python-build-system)
16281 (home-page "https://github.com/stefankoegl/python-json-pointer")
16282 (synopsis "Identify specific nodes in a JSON document")
16283 (description "@code{jsonpointer} allows you to access specific nodes
16284 by path in a JSON document (see RFC 6901).")
16285 (license license:bsd-3)))
16286
16287 (define-public python2-jsonpointer
16288 (package-with-python2 python-jsonpointer))
16289
16290 (define-public python-jsonpatch
16291 (package
16292 (name "python-jsonpatch")
16293 (version "1.16")
16294 (source
16295 (origin
16296 (method git-fetch)
16297 ;; pypi version lacks tests.js
16298 (uri (git-reference
16299 (url "https://github.com/stefankoegl/python-json-patch")
16300 (commit (string-append "v" version))))
16301 (file-name (git-file-name name version))
16302 (sha256
16303 (base32
16304 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16305 (build-system python-build-system)
16306 (propagated-inputs
16307 `(("python-jsonpointer" ,python-jsonpointer)))
16308 (home-page "https://github.com/stefankoegl/python-json-patch")
16309 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16310 (description "@code{jsonpatch} is a library and program that allows
16311 applying JSON Patches according to RFC 6902.")
16312 (license license:bsd-3)))
16313
16314 (define-public python2-jsonpatch
16315 (package-with-python2 python-jsonpatch))
16316
16317 (define-public python-jsonpatch-0.4
16318 (package (inherit python-jsonpatch)
16319 (name "python-jsonpatch")
16320 (version "0.4")
16321 (source
16322 (origin
16323 (method git-fetch)
16324 (uri (git-reference
16325 (url "https://github.com/stefankoegl/python-json-patch")
16326 (commit (string-append "v" version))))
16327 (file-name (git-file-name name version))
16328 (sha256
16329 (base32
16330 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16331
16332 (define-public python2-jsonpatch-0.4
16333 (package-with-python2 python-jsonpatch-0.4))
16334
16335 (define-public python-rfc3986
16336 (package
16337 (name "python-rfc3986")
16338 (version "1.4.0")
16339 (source (origin
16340 (method url-fetch)
16341 (uri (pypi-uri "rfc3986" version))
16342 (sha256
16343 (base32
16344 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16345 (build-system python-build-system)
16346 (arguments
16347 `(#:modules ((guix build utils)
16348 (guix build python-build-system)
16349 (ice-9 ftw)
16350 (srfi srfi-1)
16351 (srfi srfi-26))
16352 #:phases
16353 (modify-phases %standard-phases
16354 (replace 'check
16355 (lambda _
16356 (let ((cwd (getcwd)))
16357 (setenv "PYTHONPATH"
16358 (string-append cwd "/build/"
16359 (find (cut string-prefix? "lib" <>)
16360 (scandir (string-append cwd "/build")))
16361 ":"
16362 (getenv "PYTHONPATH")))
16363 (invoke "pytest" "-v")))))))
16364 (native-inputs
16365 `(("python-pytest" ,python-pytest)))
16366 (home-page "https://rfc3986.readthedocs.io/")
16367 (synopsis "Parse and validate URI references")
16368 (description
16369 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16370 validation and authority parsing. This module also supports RFC@tie{}6874
16371 which adds support for zone identifiers to IPv6 addresses.")
16372 (license license:asl2.0)))
16373
16374 (define-public python2-rfc3986
16375 (package-with-python2 python-rfc3986))
16376
16377 (define-public python-rfc3987
16378 (package
16379 (name "python-rfc3987")
16380 (version "1.3.7")
16381 (source
16382 (origin
16383 (method url-fetch)
16384 (uri (pypi-uri "rfc3987" version))
16385 (sha256
16386 (base32
16387 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16388 (build-system python-build-system)
16389 (home-page "https://pypi.org/project/rfc3987/")
16390 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16391 (description "@code{rfc3987} provides routines for parsing and
16392 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16393 (license license:gpl3+)))
16394
16395 (define-public python2-rfc3987
16396 (package-with-python2 python-rfc3987))
16397
16398 ;; The latest commit contains fixes for building with both python3 and python2.
16399 (define-public python-rfc6555
16400 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16401 (revision "1"))
16402 (package
16403 (name "python-rfc6555")
16404 (version (git-version "0.0.0" revision commit))
16405 (source (origin
16406 (method git-fetch)
16407 (uri (git-reference
16408 (url "https://github.com/sethmlarson/rfc6555")
16409 (commit commit)))
16410 (file-name (git-file-name name version))
16411 (sha256
16412 (base32
16413 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16414 (build-system python-build-system)
16415 (arguments
16416 '(#:phases
16417 (modify-phases %standard-phases
16418 (replace 'check
16419 (lambda* (#:key tests? #:allow-other-keys)
16420 (if tests?
16421 ;; Other tests require network access.
16422 (invoke "pytest" "tests/test_ipv6.py")
16423 #t))))))
16424 (native-inputs
16425 `(("python-pytest" ,python-pytest)))
16426 (home-page "https://pypi.org/project/rfc6555/")
16427 (synopsis "Python implementation of RFC 6555")
16428 (description
16429 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16430 6555. Provided with a single file and dead-simple API to allow easy vendoring
16431 and integration into other projects.")
16432 (properties `((python2-variant . ,(delay python2-rfc6555))))
16433 (license license:asl2.0))))
16434
16435 (define-public python2-rfc6555
16436 (let ((base (package-with-python2
16437 (strip-python2-variant python-rfc6555))))
16438 (package
16439 (inherit base)
16440 (propagated-inputs
16441 `(("python2-selectors2" ,python2-selectors2))))))
16442
16443 (define-public python-bagit
16444 (package
16445 (name "python-bagit")
16446 (version "1.7.0")
16447 (source
16448 (origin
16449 (method url-fetch)
16450 (uri (pypi-uri "bagit" version))
16451 (sha256
16452 (base32
16453 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16454 (build-system python-build-system)
16455 (native-inputs
16456 `(("python-setuptools-scm" ,python-setuptools-scm)
16457 ("python-coverage" ,python-coverage)
16458 ("python-mock" ,python-mock)))
16459 (home-page "https://libraryofcongress.github.io/bagit-python/")
16460 (synopsis "Create and validate BagIt packages")
16461 (description "Bagit is a Python library and command line utility for working
16462 with BagIt style packages. BagIt is a minimalist packaging format for digital
16463 preservation.")
16464 (license license:cc0)))
16465
16466 (define-public python-prov
16467 (package
16468 (name "python-prov")
16469 (version "2.0.0")
16470 (source
16471 (origin
16472 (method url-fetch)
16473 (uri (pypi-uri "prov" version))
16474 (sha256
16475 (base32
16476 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16477 (build-system python-build-system)
16478 (propagated-inputs
16479 `(("python-dateutil" ,python-dateutil)
16480 ("python-lxml" ,python-lxml)
16481 ("python-networkx" ,python-networkx)
16482 ("python-rdflib" ,python-rdflib)))
16483 (native-inputs
16484 `(("graphviz" ,graphviz)
16485 ("python-pydot" ,python-pydot)))
16486 (home-page "https://github.com/trungdong/prov")
16487 (synopsis
16488 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16489 (description
16490 "This package provides a library for W3C Provenance Data Model supporting
16491 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16492 (license license:expat)))
16493
16494 (define-public python-arcp
16495 (package
16496 (name "python-arcp")
16497 (version "0.2.1")
16498 (source
16499 (origin
16500 (method url-fetch)
16501 (uri (pypi-uri "arcp" version))
16502 (sha256
16503 (base32
16504 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16505 (build-system python-build-system)
16506 (native-inputs
16507 `(("python-pytest" ,python-pytest)))
16508 (home-page "http://arcp.readthedocs.io/")
16509 (synopsis
16510 "Archive and Package URI parser and generator")
16511 (description
16512 "@acronym{arcp, Archive and Package} provides functions for creating
16513 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16514 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16515 consume or reference hypermedia resources bundled inside a file archive or an
16516 application package, as well as to resolve URIs for archive resources within a
16517 programmatic framework. This URI scheme provides mechanisms to generate a
16518 unique base URI to represent the root of the archive, so that relative URI
16519 references in a bundled resource can be resolved within the archive without
16520 having to extract the archive content on the local file system. An arcp URI can
16521 be used for purposes of isolation (e.g. when consuming multiple archives),
16522 security constraints (avoiding \"climb out\" from the archive), or for
16523 externally identiyfing sub-resources referenced by hypermedia formats.")
16524 (license license:asl2.0)))
16525
16526 (define-public python-shellescape
16527 (package
16528 (name "python-shellescape")
16529 (version "3.8.1")
16530 (source
16531 (origin
16532 (method git-fetch)
16533 (uri (git-reference
16534 (url "https://github.com/chrissimpkins/shellescape")
16535 (commit (string-append "v" version))))
16536 (file-name (git-file-name name version))
16537 (sha256
16538 (base32
16539 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16540 (build-system python-build-system)
16541 (arguments
16542 '(#:phases
16543 (modify-phases %standard-phases
16544 (replace 'check
16545 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16546 (when tests?
16547 (add-installed-pythonpath inputs outputs)
16548 (invoke "python" "tests/test_shellescape.py"))
16549 #t)))))
16550 (native-inputs
16551 `(("python-pytest" ,python-pytest)))
16552 (home-page "https://github.com/chrissimpkins/shellescape")
16553 (synopsis
16554 "Shell escape a string to safely use it as a token in a shell command")
16555 (description
16556 "The shellescape Python module defines the @code{shellescape.quote()}
16557 function that returns a shell-escaped version of a Python string. This is a
16558 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16559 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16560 (license license:expat)))
16561
16562 (define-public python-validators
16563 (package
16564 (name "python-validators")
16565 (version "0.14.2")
16566 (source (origin
16567 (method url-fetch)
16568 (uri (pypi-uri "validators" version))
16569 (sha256
16570 (base32
16571 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16572 (build-system python-build-system)
16573 (arguments
16574 '(#:phases (modify-phases %standard-phases
16575 (replace 'check
16576 (lambda _
16577 (invoke "pytest" "-vv"))))))
16578 (propagated-inputs
16579 `(("python-decorator" ,python-decorator)
16580 ("python-six" ,python-six)))
16581 (native-inputs
16582 `(("python-flake8" ,python-flake8)
16583 ("python-isort" ,python-isort)
16584 ("python-pytest" ,python-pytest)))
16585 (home-page "https://github.com/kvesteri/validators")
16586 (synopsis "Data validation library")
16587 (description
16588 "This package contains validators for different things such as email
16589 addresses, IP addresses, URLs, hashes and more. It has been designed to
16590 be easy to use and not require defining a schema or form just to validate
16591 some input.")
16592 (license license:expat)))
16593
16594 (define-public python2-validators
16595 (package-with-python2 python-validators))
16596
16597 (define-public python-validate-email
16598 (package
16599 (name "python-validate-email")
16600 (version "1.3")
16601 (source
16602 (origin
16603 (method url-fetch)
16604 (uri (pypi-uri "validate_email" version))
16605 (sha256
16606 (base32
16607 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16608 (build-system python-build-system)
16609 (home-page "https://github.com/syrusakbary/validate_email")
16610 (synopsis "Verifies if an email address is valid and really exists")
16611 (description "@code{validate_email} can be used to verify if an email
16612 address is valid and really exists.")
16613 (license license:lgpl3+)))
16614
16615 (define-public python2-validate-email
16616 (package-with-python2 python-validate-email))
16617
16618 (define-public python-flex
16619 (package
16620 (name "python-flex")
16621 (version "6.10.0")
16622 (source
16623 (origin
16624 (method url-fetch)
16625 (uri (pypi-uri "flex" version))
16626 (sha256
16627 (base32
16628 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16629 (build-system python-build-system)
16630 (propagated-inputs
16631 `(("python-click" ,python-click)
16632 ("python-iso8601" ,python-iso8601)
16633 ("python-jsonpointer" ,python-jsonpointer)
16634 ("python-pyyaml" ,python-pyyaml)
16635 ("python-requests" ,python-requests)
16636 ("python-rfc3987" ,python-rfc3987)
16637 ("python-six" ,python-six)
16638 ("python-validate-email" ,python-validate-email)))
16639 (home-page "https://github.com/pipermerriam/flex")
16640 (synopsis "Validates Swagger schemata")
16641 (description "@code{flex} can be used to validate Swagger schemata.")
16642 (license license:bsd-3)))
16643
16644 (define-public python2-flex
16645 (package-with-python2 python-flex))
16646
16647 (define-public python-marshmallow
16648 (package
16649 (name "python-marshmallow")
16650 (version "3.9.1")
16651 (source
16652 (origin
16653 (method url-fetch)
16654 (uri (pypi-uri "marshmallow" version))
16655 (sha256
16656 (base32
16657 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16658 (build-system python-build-system)
16659 (propagated-inputs
16660 `(("python-dateutil" ,python-dateutil)
16661 ("python-simplejson" ,python-simplejson)))
16662 (native-inputs
16663 `(("python-pytest" ,python-pytest)
16664 ("python-pytz" ,python-pytz)))
16665 (home-page "https://github.com/marshmallow-code/marshmallow")
16666 (synopsis "Convert complex datatypes to and from native
16667 Python datatypes.")
16668 (description "@code{marshmallow} provides a library for converting
16669 complex datatypes to and from native Python datatypes.")
16670 (license license:expat)))
16671
16672 (define-public python-apispec
16673 (package
16674 (name "python-apispec")
16675 (version "4.0.0")
16676 (source
16677 (origin
16678 (method url-fetch)
16679 (uri (pypi-uri "apispec" version))
16680 (sha256
16681 (base32
16682 "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
16683 (build-system python-build-system)
16684 (arguments
16685 '(#:phases (modify-phases %standard-phases
16686 (add-after 'unpack 'disable-prance-tests
16687 (lambda _
16688 ;; Disable validation tests since they require the
16689 ;; optional 'prance' library which is not yet in Guix.
16690 (substitute* "tests/test_ext_marshmallow_openapi.py"
16691 (("def test_openapi_tools_validate.*" all)
16692 (string-append "@pytest.mark.xfail\n" all)))))
16693 (replace 'check
16694 (lambda _
16695 (setenv "PYTHONPATH"
16696 (string-append "./build/lib:"
16697 (getenv "PYTHONPATH")))
16698 (invoke "pytest" "-vv"))))))
16699 (propagated-inputs
16700 `(("python-pyyaml" ,python-pyyaml)))
16701 (native-inputs
16702 `(("python-pytest" ,python-pytest)
16703 ("python-marshmallow" ,python-marshmallow)))
16704 (home-page "https://github.com/marshmallow-code/apispec")
16705 (synopsis "Swagger/OpenAPI specification generator")
16706 (description "@code{python-apispec} is a pluggable API specification
16707 generator. It currently supports the OpenAPI specification, formerly known
16708 as Swagger.")
16709 (license license:expat)))
16710
16711 (define-public python-flasgger
16712 (package
16713 (name "python-flasgger")
16714 (version "0.6.3")
16715 (source
16716 (origin
16717 (method git-fetch)
16718 (uri (git-reference
16719 (url "https://github.com/rochacbruno/flasgger")
16720 (commit version)))
16721 (file-name (git-file-name name version))
16722 (sha256
16723 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16724 (build-system python-build-system)
16725 (arguments
16726 `(#:phases
16727 (modify-phases %standard-phases
16728 (replace 'check
16729 (lambda* (#:key inputs outputs #:allow-other-keys)
16730 (substitute* "Makefile"
16731 (("flake8 flasgger --ignore=F403")
16732 "flake8 flasgger --ignore=E731,F403"))
16733 (setenv "PYTHONPATH" (string-append (getcwd)
16734 ":"
16735 (getenv "PYTHONPATH")))
16736 (invoke "py.test"))))))
16737 (propagated-inputs
16738 `(("python-flask" ,python-flask)
16739 ("python-pyyaml" ,python-pyyaml)
16740 ("python-jsonschema" ,python-jsonschema)
16741 ("python-mistune" ,python-mistune)
16742 ("python-six" ,python-six)))
16743 (native-inputs
16744 `(("python-decorator" ,python-decorator)
16745 ("python-flake8" ,python-flake8)
16746 ("python-flask-restful" ,python-flask-restful)
16747 ("python-flex" ,python-flex)
16748 ("python-pytest" ,python-pytest)
16749 ("python-pytest-cov" ,python-pytest-cov)
16750 ("python-marshmallow" ,python-marshmallow)
16751 ("python-apispec" ,python-apispec)))
16752 (home-page "https://github.com/rochacbruno/flasgger/")
16753 (synopsis "Extract Swagger specs from your Flask project")
16754 (description "@code{python-flasgger} allows extracting Swagger specs
16755 from your Flask project. It is a fork of Flask-Swagger.")
16756 (license license:expat)))
16757
16758 (define-public python-swagger-spec-validator
16759 (package
16760 (name "python-swagger-spec-validator")
16761 (version "2.4.3")
16762 (source
16763 (origin
16764 (method url-fetch)
16765 (uri (pypi-uri "swagger-spec-validator" version))
16766 (sha256
16767 (base32
16768 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16769 (build-system python-build-system)
16770 (propagated-inputs
16771 `(("python-jsonschema" ,python-jsonschema)
16772 ("python-pyyaml" ,python-pyyaml)
16773 ("python-six" ,python-six)))
16774 (home-page
16775 "https://github.com/Yelp/swagger_spec_validator")
16776 (synopsis "Validation of Swagger specifications")
16777 (description "@code{swagger_spec_validator} provides a library for
16778 validating Swagger API specifications.")
16779 (license license:asl2.0)))
16780
16781 (define-public python2-swagger-spec-validator
16782 (package-with-python2 python-swagger-spec-validator))
16783
16784 (define-public python-apache-libcloud
16785 (package
16786 (name "python-apache-libcloud")
16787 (version "3.1.0")
16788 (source
16789 (origin
16790 (method url-fetch)
16791 (uri (pypi-uri "apache-libcloud" version))
16792 (sha256
16793 (base32
16794 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16795 (build-system python-build-system)
16796 (arguments
16797 `(#:phases
16798 (modify-phases %standard-phases
16799 (add-after 'unpack 'patch-ssh
16800 (lambda* (#:key inputs #:allow-other-keys)
16801 (substitute* "libcloud/compute/ssh.py"
16802 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16803 "/bin/ssh" "'")))
16804 #t))
16805 (add-after 'unpack 'patch-tests
16806 (lambda _
16807 (substitute* "libcloud/test/compute/test_ssh_client.py"
16808 (("class ShellOutSSHClientTests")
16809 "@unittest.skip(\"Guix container doesn't have ssh service\")
16810 class ShellOutSSHClientTests"))
16811 #t))
16812 (add-before 'check 'copy-secret
16813 (lambda _
16814 (copy-file "libcloud/test/secrets.py-dist"
16815 "libcloud/test/secrets.py")
16816 #t)))))
16817 (inputs
16818 `(("openssh" ,openssh)))
16819 (propagated-inputs
16820 `(("python-paramiko" ,python-paramiko)
16821 ("python-requests" ,python-requests)))
16822 (native-inputs
16823 `(("python-lockfile" ,python-lockfile)
16824 ("python-mock" ,python-mock)
16825 ("python-pytest" ,python-pytest)
16826 ("python-pytest-runner" ,python-pytest-runner)
16827 ("python-requests-mock" ,python-requests-mock)))
16828 (home-page "https://libcloud.apache.org/")
16829 (synopsis "Unified Cloud API")
16830 (description "@code{libcloud} is a Python library for interacting with
16831 many of the popular cloud service providers using a unified API.")
16832 (license license:asl2.0)))
16833
16834 (define-public python2-apache-libcloud
16835 (package-with-python2 python-apache-libcloud))
16836
16837 (define-public python-smmap
16838 (package
16839 (name "python-smmap")
16840 (version "3.0.1")
16841 (source
16842 (origin
16843 (method url-fetch)
16844 (uri (pypi-uri "smmap" version))
16845 (sha256
16846 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16847 (build-system python-build-system)
16848 (native-inputs
16849 `(("python-nosexcover" ,python-nosexcover)))
16850 (home-page "https://github.com/Byron/smmap")
16851 (synopsis "Python sliding window memory map manager")
16852 (description "@code{smmap} is a pure Python implementation of a sliding
16853 window memory map manager.")
16854 (license license:bsd-3)))
16855
16856 (define-public python-smmap2
16857 (deprecated-package "python-smmap2" python-smmap))
16858
16859 (define-public python2-smmap
16860 (package-with-python2 python-smmap))
16861
16862 (define-public python2-smmap2
16863 (deprecated-package "python2-smmap2" python2-smmap))
16864
16865 (define-public python-regex
16866 (package
16867 (name "python-regex")
16868 (version "2020.6.8")
16869 (source (origin
16870 (method url-fetch)
16871 (uri (pypi-uri "regex" version))
16872 (sha256
16873 (base32
16874 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16875 (build-system python-build-system)
16876 (arguments
16877 '(#:phases
16878 (modify-phases %standard-phases
16879 (replace 'check
16880 (lambda* (#:key inputs outputs #:allow-other-keys)
16881 (add-installed-pythonpath inputs outputs)
16882 (invoke "python" "-c"
16883 "from regex.test_regex import test_main; test_main()"))))))
16884 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16885 (synopsis "Alternative regular expression module")
16886 (description "This regular expression implementation is backwards-
16887 compatible with the standard @code{re} module, but offers additional
16888 functionality like full case-folding for case-insensitive matches in Unicode.")
16889 (license license:psfl)))
16890
16891 (define-public python2-regex
16892 (package-with-python2 python-regex))
16893
16894 (define-public python-pyopengl
16895 (package
16896 (name "python-pyopengl")
16897 (version "3.1.5")
16898 (source
16899 (origin
16900 (method url-fetch)
16901 (uri (pypi-uri "PyOpenGL" version))
16902 (sha256
16903 (base32
16904 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16905 (build-system python-build-system)
16906 (inputs
16907 `(("mesa" ,mesa)
16908 ("freeglut" ,freeglut)
16909 ("glu" ,glu)))
16910 (arguments
16911 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16912 ;attribute 'OSMesa'
16913 #:phases
16914 (modify-phases %standard-phases
16915 (add-before 'build 'fix-paths
16916 (lambda* (#:key inputs outputs #:allow-other-keys)
16917 (substitute* '("OpenGL/platform/ctypesloader.py")
16918 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16919 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16920 (("'GL'")
16921 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16922 (("'GLU'")
16923 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16924 (("'glut',")
16925 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16926 (("'GLESv1_CM'")
16927 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16928 (("'GLESv2'")
16929 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16930 ;; Not providing libgle. It seems to be very old.
16931 #t)))))
16932 (home-page "http://pyopengl.sourceforge.net")
16933 (synopsis "Standard OpenGL bindings for Python")
16934 (description
16935 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16936 related APIs. The binding is created using the standard @code{ctypes}
16937 library.")
16938 (license license:bsd-3)))
16939
16940 (define-public python-pyopengl-accelerate
16941 (package
16942 (inherit python-pyopengl)
16943 (name "python-pyopengl-accelerate")
16944 (version "3.1.5")
16945 (source
16946 (origin
16947 (method url-fetch)
16948 (uri (pypi-uri "PyOpenGL-accelerate" version))
16949 (sha256
16950 (base32
16951 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16952 (inputs
16953 `(("mesa" ,mesa)
16954 ("python-numpy" ,python-numpy))) ; for cython module
16955 ; numpy_formathandler, thus not propagated
16956 (arguments
16957 `(#:tests? #f
16958 #:phases
16959 (modify-phases %standard-phases
16960 (delete 'fix-paths))))
16961 (synopsis "Acceleration code for PyOpenGL")
16962 (description
16963 "This is the Cython-coded accelerator module for PyOpenGL.")))
16964
16965 (define-public python-rencode
16966 (package
16967 (name "python-rencode")
16968 (version "1.0.5")
16969 (source
16970 (origin
16971 (method url-fetch)
16972 (uri (pypi-uri "rencode" version))
16973 (sha256
16974 (base32
16975 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16976 (build-system python-build-system)
16977 (arguments
16978 `(#:phases
16979 (modify-phases %standard-phases
16980 (add-before 'check 'delete-bogus-test
16981 ;; This test requires /home/aresch/Downloads, which is not provided by
16982 ;; the build environment.
16983 (lambda _
16984 (delete-file "rencode/t.py")
16985 #t)))))
16986 (native-inputs `(("pkg-config" ,pkg-config)
16987 ("python-cython" ,python-cython)))
16988 (home-page "https://github.com/aresch/rencode")
16989 (synopsis "Serialization of heterogeneous data structures")
16990 (description
16991 "The @code{rencode} module is a data structure serialization library,
16992 similar to @code{bencode} from the BitTorrent project. For complex,
16993 heterogeneous data structures with many small elements, r-encoding stake up
16994 significantly less space than b-encodings. This version of rencode is a
16995 complete rewrite in Cython to attempt to increase the performance over the
16996 pure Python module.")
16997 (license license:bsd-3)))
16998
16999 (define-public python2-rencode
17000 (package-with-python2 python-rencode))
17001
17002 (define-public python-xenon
17003 (package
17004 (name "python-xenon")
17005 (version "0.7.0")
17006 (source
17007 (origin
17008 (method url-fetch)
17009 (uri (pypi-uri "xenon" version))
17010 (sha256
17011 (base32
17012 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
17013 (build-system python-build-system)
17014 (native-inputs
17015 `(("python-pyyaml" ,python-pyyaml)
17016 ("python-radon" ,python-radon)
17017 ("python-requests" ,python-requests)
17018 ("python-flake8" ,python-flake8)
17019 ("python-tox" ,python-tox)))
17020 (arguments
17021 `(#:tests? #f ;test suite not shipped with the PyPI archive
17022 #:phases
17023 (modify-phases %standard-phases
17024 (add-before 'build 'patch-test-requirements
17025 (lambda _
17026 ;; Remove httpretty dependency for tests.
17027 (substitute* "setup.py"
17028 (("httpretty") ""))
17029 #t)))))
17030 (home-page "https://xenon.readthedocs.org/")
17031 (synopsis "Monitor code metrics for Python on your CI server")
17032 (description
17033 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
17034 Ideally, @code{xenon} is run every time code is committed. Through command
17035 line options, various thresholds can be set for the complexity of code. It
17036 will fail (i.e. it will exit with a non-zero exit code) when any of these
17037 requirements is not met.")
17038 (license license:expat)))
17039
17040 (define-public python2-xenon
17041 (package-with-python2 python-xenon))
17042
17043 (define-public python-pysocks
17044 (package
17045 (name "python-pysocks")
17046 (version "1.7.1")
17047 (source
17048 (origin
17049 (method url-fetch)
17050 (uri (pypi-uri "PySocks" version))
17051 (sha256
17052 (base32
17053 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
17054 (build-system python-build-system)
17055 (arguments `(#:tests? #f))
17056 (home-page "https://github.com/Anorov/PySocks")
17057 (synopsis "SOCKS client module")
17058 (description "@code{pysocks} is an updated and semi-actively maintained
17059 version of @code{SocksiPy} with bug fixes and extra features.")
17060 (license license:bsd-3)))
17061
17062 (define-public python2-pysocks
17063 (package-with-python2 python-pysocks))
17064
17065 (define-public python-pydiff
17066 (package
17067 (name "python-pydiff")
17068 (version "0.2")
17069 (source
17070 (origin
17071 (method url-fetch)
17072 (uri (pypi-uri "pydiff" version))
17073 (sha256
17074 (base32
17075 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
17076 (build-system python-build-system)
17077 (home-page "https://github.com/myint/pydiff")
17078 (synopsis "Library to diff two Python files at the bytecode level")
17079 (description
17080 "@code{pydiff} makes it easy to look for actual code changes while
17081 ignoring formatting changes.")
17082 (license license:expat)))
17083
17084 (define-public python2-pydiff
17085 (package-with-python2 python-pydiff))
17086
17087 (define-public python-pydub
17088 (package
17089 (name "python-pydub")
17090 (version "0.24.1")
17091 (source
17092 (origin
17093 (method url-fetch)
17094 (uri (pypi-uri "pydub" version))
17095 (sha256
17096 (base32
17097 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
17098 (build-system python-build-system)
17099 (arguments
17100 `(#:phases
17101 (modify-phases %standard-phases
17102 (add-after 'unpack 'fix-ffmpeg-path
17103 (lambda* (#:key inputs #:allow-other-keys)
17104 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
17105 (substitute* '("pydub/utils.py")
17106 (("return \"ffmpeg\"")
17107 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
17108 (("return \"ffplay\"")
17109 (string-append "return \"" ffmpeg "/bin/ffplay\""))
17110 (("return \"ffprobe\"")
17111 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
17112 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
17113 #t))))))
17114 (home-page "https://pydub.com")
17115 (inputs
17116 `(("ffmpeg" ,ffmpeg)))
17117 (propagated-inputs
17118 `(("python-scipy" ,python-scipy)))
17119 (synopsis "Manipulate audio with a high level interface in Python")
17120 (description
17121 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
17122 @code{ffmpeg} to open various audio formats.")
17123 (license license:expat))) ; MIT license
17124
17125 (define-public python-tqdm
17126 (package
17127 (name "python-tqdm")
17128 (version "4.43.0")
17129 (source
17130 (origin
17131 (method url-fetch)
17132 (uri (pypi-uri "tqdm" version))
17133 (sha256
17134 (base32
17135 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
17136 (build-system python-build-system)
17137 (arguments
17138 '(#:phases (modify-phases %standard-phases
17139 (replace 'check
17140 (lambda* (#:key inputs outputs #:allow-other-keys)
17141 (add-installed-pythonpath inputs outputs)
17142 ;; This invokation is taken from tox.ini.
17143 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
17144 "-d" "-v" "tqdm/"))))))
17145 (native-inputs
17146 `(("python-nose" ,python-nose)))
17147 (home-page "https://github.com/tqdm/tqdm")
17148 (synopsis "Fast, extensible progress meter")
17149 (description
17150 "Make loops show a progress bar on the console by just wrapping any
17151 iterable with @code{|tqdm(iterable)|}. Offers many options to define
17152 design and layout.")
17153 (license (list license:mpl2.0 license:expat))))
17154
17155 (define-public python2-tqdm
17156 (package-with-python2 python-tqdm))
17157
17158 (define-public python-pkginfo
17159 (package
17160 (name "python-pkginfo")
17161 (version "1.4.2")
17162 (source
17163 (origin
17164 (method url-fetch)
17165 (uri (pypi-uri "pkginfo" version))
17166 (sha256
17167 (base32
17168 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
17169 (build-system python-build-system)
17170 (arguments
17171 ;; The tests are broken upstream.
17172 '(#:tests? #f))
17173 (home-page
17174 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17175 (synopsis
17176 "Query metadatdata from sdists, bdists, and installed packages")
17177 (description
17178 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17179 source distriubtion (an sdist) or a binary distribution (e.g., created by
17180 running bdist_egg). It can also query the EGG-INFO directory of an installed
17181 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17182 created by running @code{python setup.py develop}).")
17183 (license license:expat)))
17184
17185 (define-public python2-pkginfo
17186 (package-with-python2 python-pkginfo))
17187
17188 (define-public python-twine
17189 (package
17190 (name "python-twine")
17191 (version "1.15.0")
17192 (source
17193 (origin
17194 (method url-fetch)
17195 (uri (pypi-uri "twine" version))
17196 (sha256
17197 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17198 (build-system python-build-system)
17199 (propagated-inputs
17200 `(("python-tqdm" ,python-tqdm)
17201 ("python-packaging" ,python-packaging)
17202 ("python-pkginfo" ,python-pkginfo)
17203 ("python-readme-renderer" ,python-readme-renderer)
17204 ("python-requests" ,python-requests)
17205 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17206 (home-page "https://github.com/pypa/twine")
17207 (synopsis "Collection of utilities for interacting with PyPI")
17208 (description
17209 "@code{twine} currently supports registering projects and uploading
17210 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17211 their files and supports any packaging format (including wheels).")
17212 (license license:asl2.0)))
17213
17214 (define-public python2-twine
17215 (package-with-python2 python-twine))
17216
17217 (define-public python-linecache2
17218 (package
17219 (name "python-linecache2")
17220 (version "1.0.0")
17221 (source
17222 (origin
17223 (method url-fetch)
17224 (uri (pypi-uri "linecache2" version))
17225 (sha256
17226 (base32
17227 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17228 (build-system python-build-system)
17229 (arguments
17230 `(;; The tests depend on unittest2, and our version is a bit too old.
17231 #:tests? #f))
17232 (native-inputs
17233 `(("python-pbr" ,python-pbr-minimal)))
17234 (home-page
17235 "https://github.com/testing-cabal/linecache2")
17236 (synopsis "Backports of the linecache module")
17237 (description
17238 "The linecache module allows one to get any line from any file, while
17239 attempting to optimize internally, using a cache, the common case where many
17240 lines are read from a single file.")
17241 (license license:psfl)))
17242
17243 (define-public python2-linecache2
17244 (package-with-python2 python-linecache2))
17245
17246 (define-public python-traceback2
17247 (package
17248 (name "python-traceback2")
17249 (version "1.4.0")
17250 (source
17251 (origin
17252 (method url-fetch)
17253 (uri (pypi-uri "traceback2" version))
17254 (sha256
17255 (base32
17256 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17257 (build-system python-build-system)
17258 (arguments
17259 `(;; python-traceback2 and python-unittest2 depend on one another.
17260 #:tests? #f))
17261 (native-inputs
17262 `(("python-pbr" ,python-pbr-minimal)))
17263 (propagated-inputs
17264 `(("python-linecache2" ,python-linecache2)))
17265 (home-page
17266 "https://github.com/testing-cabal/traceback2")
17267 (synopsis "Backports of the traceback module")
17268 (description
17269 "This module provides a standard interface to extract, format and print
17270 stack traces of Python programs. It exactly mimics the behavior of the Python
17271 interpreter when it prints a stack trace.")
17272 (license license:psfl)))
17273
17274 (define-public python2-traceback2
17275 (package-with-python2 python-traceback2))
17276
17277 (define-public python-ratelimiter
17278 (package
17279 (name "python-ratelimiter")
17280 (version "1.2.0")
17281 (source
17282 (origin
17283 (method url-fetch)
17284 (uri (pypi-uri "ratelimiter" version))
17285 (sha256
17286 (base32
17287 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17288 (build-system python-build-system)
17289 (arguments
17290 '(#:tests? #f)) ; There are no tests in the pypi archive.
17291 (home-page "https://github.com/RazerM/ratelimiter")
17292 (synopsis "Simple rate limiting object")
17293 (description
17294 "The @code{ratelimiter} module ensures that an operation will not be
17295 executed more than a given number of times during a given period.")
17296 (license license:asl2.0)))
17297
17298 (define-public python2-ratelimiter
17299 (package-with-python2 python-ratelimiter))
17300
17301 (define-public python-dukpy
17302 (package
17303 (name "python-dukpy")
17304 (version "0.3")
17305 (source
17306 (origin
17307 (method git-fetch)
17308 (uri (git-reference
17309 (url "https://github.com/kovidgoyal/dukpy")
17310 (commit (string-append "v" version))))
17311 (file-name (git-file-name name version))
17312 (sha256
17313 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17314 (build-system python-build-system)
17315 (home-page "https://github.com/kovidgoyal/dukpy")
17316 (synopsis "Run JavaScript in python")
17317 (description
17318 "dukpy is a JavaScript runtime environment for Python using the duktape
17319 embeddable JavaScript engine.")
17320 ;; Dukpy is licensed under MIT like the embedded duktape library,
17321 ;; with 'errors.c' as GPL3.
17322 (license (list license:expat license:gpl3))))
17323
17324 (define-public python2-dukpy
17325 (package-with-python2 python-dukpy))
17326
17327 (define-public python-jsonrpclib-pelix
17328 (package
17329 (name "python-jsonrpclib-pelix")
17330 (version "0.3.2")
17331 (source
17332 (origin
17333 (method url-fetch)
17334 (uri (pypi-uri "jsonrpclib-pelix" version))
17335 (sha256
17336 (base32
17337 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17338 (build-system python-build-system)
17339 (arguments
17340 `(#:tests? #f)) ; no tests in PyPI tarball
17341 (home-page "https://github.com/tcalmant/jsonrpclib/")
17342 (synopsis "JSON-RPC 2.0 client library for Python")
17343 (description
17344 "This library implements the JSON-RPC v2.0
17345 specification (backwards-compatible) as a client library for Python. This
17346 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17347 services.")
17348 (license license:asl2.0)))
17349
17350 (define-public python2-jsonrpclib-pelix
17351 (package-with-python2 python-jsonrpclib-pelix))
17352
17353 (define-public python-setuptools-scm-git-archive
17354 (package
17355 (name "python-setuptools-scm-git-archive")
17356 (version "1.0")
17357 (source
17358 (origin
17359 (method url-fetch)
17360 (uri (pypi-uri "setuptools_scm_git_archive" version))
17361 (sha256
17362 (base32
17363 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17364 (build-system python-build-system)
17365 (native-inputs
17366 `(("python-pytest" ,python-pytest)))
17367 (propagated-inputs
17368 `(("python-setuptools-scm" ,python-setuptools-scm)))
17369 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17370 (synopsis "Setuptools_scm plugin for git archives")
17371 (description
17372 "The setuptools_scm_git_archive package is a plugin to
17373 setuptools_scm, which supports obtaining versions from git archives that
17374 belong to tagged versions.")
17375 (license license:expat)))
17376
17377 (define-public python2-setuptools-scm-git-archive
17378 (package-with-python2 python-setuptools-scm-git-archive))
17379
17380 (define-public python-setuptools-git
17381 (package
17382 (name "python-setuptools-git")
17383 (version "1.2")
17384 (source
17385 (origin
17386 (method url-fetch)
17387 (uri (pypi-uri "setuptools-git" version))
17388 (sha256
17389 (base32
17390 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17391 (build-system python-build-system)
17392 (arguments
17393 `(#:phases
17394 (modify-phases %standard-phases
17395 ;; This is needed for tests.
17396 (add-after 'unpack 'configure-git
17397 (lambda _
17398 (setenv "HOME" "/tmp")
17399 (invoke "git" "config" "--global" "user.email" "guix")
17400 (invoke "git" "config" "--global" "user.name" "guix")
17401 #t)))))
17402 (native-inputs
17403 `(("git" ,git-minimal)))
17404 (home-page "https://github.com/msabramo/setuptools-git")
17405 (synopsis "Setuptools revision control system plugin for Git")
17406 (description
17407 "This package provides a plugin for Setuptools for revision control with
17408 Git.")
17409 (license license:bsd-3)))
17410
17411 (define-public python-pyclipper
17412 (package
17413 (name "python-pyclipper")
17414 (version "1.1.0.post3")
17415 (source
17416 (origin
17417 (method url-fetch)
17418 (uri (pypi-uri "pyclipper" version ".zip"))
17419 (sha256
17420 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17421 (modules '((guix build utils)))
17422 (snippet
17423 '(begin
17424 ;; This file is generated by Cython.
17425 (delete-file "pyclipper/pyclipper.cpp") #t))))
17426 (build-system python-build-system)
17427 (arguments
17428 `(#:phases
17429 (modify-phases %standard-phases
17430 (add-before 'build 'cythonize-sources
17431 (lambda _
17432 (with-directory-excursion "pyclipper"
17433 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17434 (propagated-inputs
17435 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17436 (native-inputs
17437 `(("python-cython" ,python-cython)
17438 ("python-pytest" ,python-pytest)
17439 ("python-pytest-runner" ,python-pytest-runner)
17440 ("python-unittest2" ,python-unittest2)
17441 ("unzip" ,unzip)))
17442 (home-page "https://github.com/greginvm/pyclipper")
17443 (synopsis "Wrapper for Angus Johnson's Clipper library")
17444 (description
17445 "Pyclipper is a Cython wrapper for the C++ translation of the
17446 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17447 (license license:expat)))
17448
17449 (define-public python2-pyclipper
17450 (package-with-python2 python-pyclipper))
17451
17452 (define-public python2-booleanoperations
17453 (package
17454 (name "python2-booleanoperations")
17455 (version "0.7.1")
17456 (source
17457 (origin
17458 (method url-fetch)
17459 (uri (pypi-uri "booleanOperations" version ".zip"))
17460 (sha256
17461 (base32
17462 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17463 (build-system python-build-system)
17464 (arguments
17465 `(#:python ,python-2))
17466 (native-inputs
17467 `(("unzip" ,unzip)
17468 ("python2-pytest" ,python2-pytest)
17469 ("python2-pytest-runner" ,python2-pytest-runner)))
17470 (propagated-inputs
17471 `(("python-fonttools" ,python2-fonttools)
17472 ("python-pyclipper" ,python2-pyclipper)
17473 ("python-ufolib" ,python2-ufolib)))
17474 (home-page "https://github.com/typemytype/booleanOperations")
17475 (synopsis "Boolean operations on paths")
17476 (description
17477 "BooleanOperations provides a Python library that enables
17478 boolean operations on paths.")
17479 (license license:expat)))
17480
17481 (define-public python-tempdir
17482 (package
17483 (name "python-tempdir")
17484 (version "0.7.1")
17485 (source
17486 (origin
17487 (method url-fetch)
17488 (uri (pypi-uri "tempdir" version))
17489 (sha256
17490 (base32
17491 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17492 (build-system python-build-system)
17493 (home-page "https://pypi.org/project/tempdir/")
17494 (arguments
17495 ;; the package has no tests
17496 '(#:tests? #f))
17497 (synopsis "Python library for managing temporary directories")
17498 (description
17499 "This library manages temporary directories that are automatically
17500 deleted with all their contents when they are no longer needed. It is
17501 particularly convenient for use in tests.")
17502 (license license:expat)))
17503
17504 (define-public python2-tempdir
17505 (package-with-python2 python-tempdir))
17506
17507 (define-public python-activepapers
17508 (package
17509 (name "python-activepapers")
17510 (version "0.2.2")
17511 (source
17512 (origin
17513 (method url-fetch)
17514 (uri (pypi-uri "ActivePapers.Py" version))
17515 (sha256
17516 (base32
17517 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17518 (build-system python-build-system)
17519 (arguments
17520 `(#:modules ((ice-9 ftw)
17521 (srfi srfi-1)
17522 (guix build utils)
17523 (guix build python-build-system))
17524
17525 #:phases
17526 (modify-phases %standard-phases
17527 (add-after 'unpack 'delete-python2-code
17528 (lambda _
17529 (for-each delete-file
17530 '("lib/activepapers/builtins2.py"
17531 "lib/activepapers/standardlib2.py"
17532 "lib/activepapers/utility2.py"))))
17533 (replace 'check
17534 (lambda _
17535 ;; Deactivate the test cases that download files
17536 (setenv "NO_NETWORK_ACCESS" "1")
17537 ;; For some strange reason, some tests fail if nosetests runs all
17538 ;; test modules in a single execution. They pass if each test
17539 ;; module is run individually.
17540 (for-each (lambda (filename)
17541 (invoke "nosetests"
17542 (string-append "tests/" filename)))
17543 (scandir "tests"
17544 (lambda (filename)
17545 (string-suffix? ".py" filename)))))))))
17546 (native-inputs
17547 `(("python-tempdir" ,python-tempdir)
17548 ("python-nose" ,python-nose)))
17549 (propagated-inputs
17550 `(("python-h5py" ,python-h5py)))
17551 (home-page "https://www.activepapers.org/")
17552 (synopsis "Executable papers for scientific computing")
17553 (description
17554 "ActivePapers is a tool for working with executable papers, which
17555 combine data, code, and documentation in single-file packages,
17556 suitable for publication as supplementary material or on repositories
17557 such as figshare or Zenodo.")
17558 (properties `((python2-variant . ,(delay python2-activepapers))))
17559 (license license:bsd-3)))
17560
17561 (define-public python2-activepapers
17562 (let ((base (package-with-python2
17563 (strip-python2-variant python-activepapers))))
17564 (package
17565 (inherit base)
17566 (arguments
17567 (substitute-keyword-arguments (package-arguments base)
17568 ((#:phases phases)
17569 `(modify-phases ,phases
17570 (delete 'delete-python2-code)
17571 (add-after 'unpack 'delete-python3-code
17572 (lambda _
17573 (for-each delete-file
17574 '("lib/activepapers/builtins3.py"
17575 "lib/activepapers/standardlib3.py"
17576 "lib/activepapers/utility3.py")))))))))))
17577
17578 (define-public python-semver
17579 (package
17580 (name "python-semver")
17581 (version "2.9.0")
17582 (source
17583 (origin
17584 (method url-fetch)
17585 (uri (pypi-uri "semver" version))
17586 (sha256
17587 (base32
17588 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17589 (build-system python-build-system)
17590 (arguments
17591 `(#:phases (modify-phases %standard-phases
17592 (replace 'check
17593 (lambda _
17594 (delete-file "setup.cfg")
17595 (invoke "py.test"))))))
17596 (native-inputs
17597 `(("python-pytest" ,python-pytest)))
17598 (home-page "https://github.com/k-bx/python-semver")
17599 (synopsis "Python helper for Semantic Versioning")
17600 (description "This package provides a Python library for
17601 @url{Semantic Versioning, http://semver.org/}.")
17602 (license license:bsd-3)))
17603
17604 (define-public python2-semver
17605 (package-with-python2 python-semver))
17606
17607 (define-public python-pyro4
17608 (package
17609 (name "python-pyro4")
17610 (version "4.77")
17611 (source
17612 (origin
17613 (method url-fetch)
17614 (uri (pypi-uri "Pyro4" version))
17615 (sha256
17616 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17617 (build-system python-build-system)
17618 (arguments
17619 '(#:tests? #f)) ;FIXME: Some tests require network access.
17620 (native-inputs
17621 `(("python-cloudpickle" ,python-cloudpickle)
17622 ("python-dill" ,python-dill)
17623 ("python-msgpack" ,python-msgpack)))
17624 (propagated-inputs
17625 `(("python-serpent" ,python-serpent)))
17626 (home-page "https://pyro4.readthedocs.io")
17627 (synopsis "Distributed object middleware for Python")
17628 (description
17629 "Pyro enables you to build applications in which objects can talk to each
17630 other over the network. You can just use normal Python method calls to call
17631 objects on other machines, also known as remote procedure calls (RPC).")
17632 (license license:expat)))
17633
17634 (define-public python2-pyro
17635 (package
17636 (name "python2-pyro")
17637 (version "3.16")
17638 (source
17639 (origin
17640 (method url-fetch)
17641 (uri (pypi-uri "Pyro" version))
17642 (file-name (string-append "Pyro-" version ".tar.gz"))
17643 (sha256
17644 (base32
17645 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17646 (build-system python-build-system)
17647 (arguments
17648 ;; Pyro is not compatible with Python 3
17649 `(#:python ,python-2
17650 ;; Pyro has no test cases for automatic execution
17651 #:tests? #f))
17652 (home-page "https://pythonhosted.org/Pyro/")
17653 (synopsis "Distributed object manager for Python")
17654 (description "Pyro is a Distributed Object Technology system
17655 written in Python that is designed to be easy to use. It resembles
17656 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17657 which is a system and language independent Distributed Object Technology
17658 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17659 longer maintained. New projects should use Pyro4 instead, which
17660 is the new Pyro version that is actively developed.")
17661 (license license:expat)))
17662
17663 (define-public python2-scientific
17664 (package
17665 (name "python2-scientific")
17666 (version "2.9.4")
17667 (source
17668 (origin
17669 (method git-fetch)
17670 (uri (git-reference
17671 (url "https://github.com/khinsen/ScientificPython")
17672 (commit (string-append "rel" version))))
17673 (file-name (git-file-name name version))
17674 (sha256
17675 (base32
17676 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17677 (build-system python-build-system)
17678 (inputs
17679 `(("netcdf" ,netcdf)))
17680 (propagated-inputs
17681 `(("python-numpy" ,python2-numpy-1.8)
17682 ("python-pyro" ,python2-pyro)))
17683 (arguments
17684 ;; ScientificPython is not compatible with Python 3
17685 `(#:python ,python-2
17686 #:tests? #f ; No test suite
17687 #:phases
17688 (modify-phases %standard-phases
17689 (replace 'build
17690 (lambda* (#:key inputs #:allow-other-keys)
17691 (invoke "python" "setup.py" "build"
17692 (string-append "--netcdf_prefix="
17693 (assoc-ref inputs "netcdf"))))))))
17694 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17695 (synopsis "Python modules for scientific computing")
17696 (description "ScientificPython is a collection of Python modules that are
17697 useful for scientific computing. Most modules are rather general (Geometry,
17698 physical units, automatic derivatives, ...) whereas others are more
17699 domain-specific (e.g. netCDF and PDB support). The library is currently
17700 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17701 (license license:cecill-c)))
17702
17703 (define-public python2-mmtk
17704 (package
17705 (name "python2-mmtk")
17706 (version "2.7.12")
17707 (source
17708 (origin
17709 (method git-fetch)
17710 (uri (git-reference
17711 (url "https://github.com/khinsen/MMTK")
17712 (commit (string-append "rel" version))))
17713 (file-name (git-file-name name version))
17714 (sha256
17715 (base32
17716 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17717 (build-system python-build-system)
17718 (native-inputs
17719 `(("netcdf" ,netcdf)))
17720 (propagated-inputs
17721 `(("python-scientific" ,python2-scientific)
17722 ("python-tkinter" ,python-2 "tk")))
17723 (arguments
17724 `(#:python ,python-2
17725 #:tests? #f
17726 #:phases
17727 (modify-phases %standard-phases
17728 (add-before 'build 'includes-from-scientific
17729 (lambda* (#:key inputs #:allow-other-keys)
17730 (mkdir-p "Include/Scientific")
17731 (copy-recursively
17732 (string-append
17733 (assoc-ref inputs "python-scientific")
17734 "/include/python2.7/Scientific")
17735 "Include/Scientific"))))))
17736 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17737 (synopsis "Python library for molecular simulation")
17738 (description "MMTK is a library for molecular simulations with an emphasis
17739 on biomolecules. It provides widely used methods such as Molecular Dynamics
17740 and normal mode analysis, but also basic routines for implementing new methods
17741 for simulation and analysis. The library is currently not actively maintained
17742 and works only with Python 2 and NumPy < 1.9.")
17743 (license license:cecill-c)))
17744
17745 (define-public python-phonenumbers
17746 (package
17747 (name "python-phonenumbers")
17748 (version "8.9.1")
17749 (source
17750 (origin
17751 (method url-fetch)
17752 (uri (pypi-uri "phonenumbers" version))
17753 (sha256
17754 (base32
17755 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17756 (build-system python-build-system)
17757 (home-page
17758 "https://github.com/daviddrysdale/python-phonenumbers")
17759 (synopsis
17760 "Python library for dealing with international phone numbers")
17761 (description
17762 "This package provides a Python port of Google's libphonenumber library.")
17763 (license license:asl2.0)))
17764
17765 (define-public python2-phonenumbers
17766 (package-with-python2 python-phonenumbers))
17767
17768 (define-public python-send2trash
17769 (package
17770 (name "python-send2trash")
17771 (version "1.5.0")
17772 (source
17773 (origin (method git-fetch)
17774 ;; Source tarball on PyPI doesn't include tests.
17775 (uri (git-reference
17776 (url "https://github.com/hsoft/send2trash")
17777 (commit version)))
17778 (file-name (git-file-name name version))
17779 (sha256
17780 (base32
17781 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17782 (build-system python-build-system)
17783 (arguments
17784 '(#:phases
17785 (modify-phases %standard-phases
17786 (add-before 'check 'pre-check
17787 (lambda _
17788 (mkdir-p "/tmp/foo")
17789 (setenv "HOME" "/tmp/foo")
17790 #t)))))
17791 (home-page "https://github.com/hsoft/send2trash")
17792 (synopsis "Send files to the user's @file{~/Trash} directory")
17793 (description "This package provides a Python library to send files to the
17794 user's @file{~/Trash} directory.")
17795 (properties `((python2-variant . ,(delay python2-send2trash))))
17796 (license license:bsd-3)))
17797
17798 (define-public python2-send2trash
17799 (package
17800 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17801 (arguments
17802 (substitute-keyword-arguments (package-arguments python-send2trash)
17803 ((#:phases phases)
17804 `(modify-phases ,phases
17805 (add-before 'check 'setenv
17806 (lambda _
17807 (setenv "PYTHONPATH"
17808 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17809 #t))))))))
17810
17811 (define-public python-pyfavicon
17812 (package
17813 (name "python-pyfavicon")
17814 (version "0.1.1")
17815 (source
17816 (origin
17817 (method url-fetch)
17818 (uri (pypi-uri "pyfavicon" version))
17819 (sha256
17820 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17821 (build-system python-build-system)
17822 (arguments
17823 ;; There are no tests in the PyPI tarball and the tests from the
17824 ;; repository require online data.
17825 '(#:tests? #f))
17826 (propagated-inputs
17827 `(("python-aiohttp" ,python-aiohttp)
17828 ("python-beautifulsoup4" ,python-beautifulsoup4)
17829 ("python-pillow" ,python-pillow)))
17830 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17831 (synopsis "Async favicon fetcher")
17832 (description
17833 "@code{pyfavicon} is an async favicon fetcher.")
17834 (license license:expat)))
17835
17836 (define-public python-yapf
17837 (package
17838 (name "python-yapf")
17839 (version "0.29.0")
17840 (source
17841 (origin
17842 (method url-fetch)
17843 (uri (pypi-uri "yapf" version))
17844 (sha256
17845 (base32
17846 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17847 (build-system python-build-system)
17848 (home-page "https://github.com/google/yapf")
17849 (synopsis "Formatter for Python code")
17850 (description "YAPF is a formatter for Python code. It's based off of
17851 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17852 takes the code and reformats it to the best formatting that conforms to the
17853 style guide, even if the original code didn't violate the style guide.")
17854 (license license:asl2.0)))
17855
17856 (define-public python2-yapf
17857 (package-with-python2 python-yapf))
17858
17859 (define-public python-yq
17860 (package
17861 (name "python-yq")
17862 (version "2.11.1")
17863 (source
17864 (origin
17865 (method url-fetch)
17866 (uri (pypi-uri "yq" version))
17867 (sha256
17868 (base32
17869 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17870 (build-system python-build-system)
17871 (arguments
17872 '(#:phases
17873 (modify-phases %standard-phases
17874 (add-after 'unpack 'patch
17875 (lambda* (#:key inputs #:allow-other-keys)
17876 (substitute* "yq/__init__.py"
17877 (("Popen\\(\\[\"jq")
17878 (string-append
17879 "Popen([\""
17880 (assoc-ref inputs "jq")
17881 "/bin/jq")))
17882 #t)))))
17883 (inputs
17884 `(("python-argcomplete" ,python-argcomplete)
17885 ("python-pyyaml" ,python-pyyaml)
17886 ("python-xmltodict" ,python-xmltodict)
17887 ("jq" ,jq)))
17888 (native-inputs
17889 `(("python-coverage" ,python-coverage)
17890 ("python-flake8" ,python-flake8)
17891 ("python-wheel" ,python-wheel)))
17892 (home-page "https://github.com/kislyuk/yq")
17893 (synopsis "Command-line YAML/XML processor")
17894 (description
17895 "This package provides @command{yq} and @command{xq} for processing YAML
17896 and XML respectively. The processing is done through @{jq}, @command{jq}
17897 filters can be used to process the data as it passes through.")
17898 (license license:asl2.0)))
17899
17900 (define-public python-gyp
17901 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17902 (revision "0"))
17903 (package
17904 (name "python-gyp")
17905 ;; Google does not release versions,
17906 ;; based on second most recent commit date.
17907 (version (git-version "0.0.0" revision commit))
17908 (source
17909 (origin
17910 ;; Google does not release tarballs,
17911 ;; git checkout is needed.
17912 (method git-fetch)
17913 (uri (git-reference
17914 (url "https://chromium.googlesource.com/external/gyp")
17915 (commit commit)))
17916 (file-name (git-file-name name version))
17917 (sha256
17918 (base32
17919 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17920 (build-system python-build-system)
17921 (home-page "https://gyp.gsrc.io/")
17922 (synopsis "GYP is a Meta-Build system")
17923 (description
17924 "GYP builds build systems for large, cross platform applications.
17925 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17926 files, and Makefiles.")
17927 (license license:bsd-3))))
17928
17929 (define-public python2-gyp
17930 (package-with-python2 python-gyp))
17931
17932 (define-public python-whatever
17933 (package
17934 (name "python-whatever")
17935 (version "0.6")
17936 (source
17937 (origin
17938 (method git-fetch)
17939 (uri (git-reference
17940 (url "https://github.com/Suor/whatever")
17941 (commit version)))
17942 (file-name (git-file-name name version))
17943 (sha256
17944 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17945 (build-system python-build-system)
17946 (arguments
17947 `(#:phases
17948 (modify-phases %standard-phases
17949 (replace 'check
17950 (lambda _
17951 (invoke "py.test"))))))
17952 (native-inputs
17953 `(("python-pytest" ,python-pytest)))
17954 (home-page "https://github.com/Suor/whatever")
17955 (synopsis "Make anonymous functions by partial application of operators")
17956 (description "@code{whatever} provides an easy way to make anonymous
17957 functions by partial application of operators.")
17958 (license license:bsd-3)))
17959
17960 (define-public python2-whatever
17961 (package-with-python2 python-whatever))
17962
17963 (define-public python-funcy
17964 (package
17965 (name "python-funcy")
17966 (version "1.11")
17967 (source
17968 (origin
17969 (method git-fetch)
17970 (uri (git-reference
17971 (url "https://github.com/Suor/funcy")
17972 (commit version)))
17973 (sha256
17974 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17975 (file-name (git-file-name name version))))
17976 (build-system python-build-system)
17977 (arguments
17978 `(#:phases
17979 (modify-phases %standard-phases
17980 (replace 'check
17981 (lambda _
17982 (invoke "py.test"))))))
17983 (native-inputs
17984 `(("python-pytest" ,python-pytest)
17985 ("python-whatever" ,python-whatever)))
17986 (home-page "https://github.com/Suor/funcy")
17987 (synopsis "Functional tools")
17988 (description "@code{funcy} is a library that provides functional tools.
17989 Examples are:
17990 @enumerate
17991 @item merge - Merges collections of the same type
17992 @item walk - Type-preserving map
17993 @item select - Selects a part of a collection
17994 @item take - Takes the first n items of a collection
17995 @item first - Takes the first item of a collection
17996 @item remove - Predicated-removes items of a collection
17997 @item concat - Concatenates two collections
17998 @item flatten - Flattens a collection with subcollections
17999 @item distinct - Returns only distinct items
18000 @item split - Predicated-splits a collection
18001 @item split_at - Splits a collection at a given item
18002 @item group_by - Groups items by group
18003 @item pairwise - Pairs off adjacent items
18004 @item partial - Partially-applies a function
18005 @item curry - Curries a function
18006 @item compose - Composes functions
18007 @item complement - Complements a predicate
18008 @item all_fn - \"all\" with predicate
18009 @end enumerate")
18010 (license license:bsd-3)))
18011
18012 (define-public python2-funcy
18013 (package-with-python2 python-funcy))
18014
18015 (define-public python-isoweek
18016 (package
18017 (name "python-isoweek")
18018 (version "1.3.3")
18019 (source
18020 (origin
18021 (method url-fetch)
18022 (uri (pypi-uri "isoweek" version))
18023 (sha256
18024 (base32
18025 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
18026 (build-system python-build-system)
18027 (home-page "https://github.com/gisle/isoweek")
18028 (synopsis "Objects representing a week")
18029 (description "The @code{isoweek} module provide the class Week that
18030 implements the week definition of ISO 8601. This standard also defines
18031 a notation for identifying weeks; yyyyWww (where the W is a literal).
18032 Week instances stringify to this form.")
18033 (license license:bsd-3)))
18034
18035 (define-public python2-isoweek
18036 (package-with-python2 python-isoweek))
18037
18038 (define-public python-pyzbar
18039 (package
18040 (name "python-pyzbar")
18041 (version "0.1.8")
18042 (source
18043 (origin
18044 ;; There's no source tarball on PyPI.
18045 (method git-fetch)
18046 (uri (git-reference
18047 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
18048 (commit (string-append "v" version))))
18049 (file-name (git-file-name name version))
18050 (sha256
18051 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
18052 (build-system python-build-system)
18053 (arguments
18054 `(#:phases
18055 (modify-phases %standard-phases
18056 (add-after 'unpack 'remove-failing-test
18057 (lambda _
18058 ;; This tests if find_library was called once, but we remove
18059 ;; the call in the stage below to make the library find libzbar.
18060 (delete-file "pyzbar/tests/test_zbar_library.py")
18061 #t))
18062 (add-before 'build 'set-library-file-name
18063 (lambda* (#:key inputs #:allow-other-keys)
18064 (let ((libzbar (assoc-ref inputs "zbar")))
18065 (substitute* "pyzbar/zbar_library.py"
18066 (("find_library\\('zbar'\\)")
18067 (string-append "'" libzbar "/lib/libzbar.so.0'")))
18068 #t))))))
18069 (native-inputs
18070 `(("pkg-config" ,pkg-config)
18071 ("python-numpy" ,python-numpy)
18072 ("python-pillow" ,python-pillow)))
18073 (inputs
18074 `(("zbar" ,zbar)))
18075 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
18076 (synopsis "Read one-dimensional barcodes and QR codes")
18077 (description
18078 "Read one-dimensional barcodes and QR codes using the zbar library.
18079
18080 Features:
18081
18082 @itemize
18083 @item Pure python
18084 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
18085 @item Decodes locations of barcodes
18086 @item No dependencies, other than the zbar library itself
18087 @end itemize")
18088 (license license:expat)))
18089
18090 (define-public python-tokenize-rt
18091 (package
18092 (name "python-tokenize-rt")
18093 (version "2.0.1")
18094 (source
18095 (origin
18096 (method url-fetch)
18097 (uri (pypi-uri "tokenize-rt" version))
18098 (sha256
18099 (base32
18100 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
18101 (build-system python-build-system)
18102 (home-page "https://github.com/asottile/tokenize-rt")
18103 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
18104 (description
18105 "This Python library is a wrapper around @code{tokenize} from the Python
18106 standard library. It provides two additional tokens @code{ESCAPED_NL} and
18107 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
18108 and @code{tokens_to_src} to roundtrip.")
18109 (license license:expat)))
18110
18111 (define-public python-future-fstrings
18112 (package
18113 (name "python-future-fstrings")
18114 (version "0.4.1")
18115 (source
18116 (origin
18117 (method url-fetch)
18118 (uri (pypi-uri "future_fstrings" version))
18119 (sha256
18120 (base32
18121 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
18122 (build-system python-build-system)
18123 (propagated-inputs
18124 `(("python-tokenize-rt" ,python-tokenize-rt)))
18125 (home-page "https://github.com/asottile/future-fstrings")
18126 (synopsis "Backport of fstrings to Python < 3.6")
18127 (description
18128 "This package provides a UTF-8 compatible encoding
18129 @code{future_fstrings}, which performs source manipulation. It decodes the
18130 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
18131 @code{f} strings.")
18132 (license license:expat)))
18133
18134 (define-public python-typed-ast
18135 (package
18136 (name "python-typed-ast")
18137 (version "1.4.0")
18138 (source
18139 (origin
18140 (method git-fetch)
18141 (uri (git-reference
18142 (url "https://github.com/python/typed_ast")
18143 (commit version)))
18144 (sha256
18145 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
18146 (file-name (git-file-name name version))))
18147 (build-system python-build-system)
18148 (arguments
18149 `(#:modules ((guix build utils)
18150 (guix build python-build-system)
18151 (ice-9 ftw)
18152 (srfi srfi-1)
18153 (srfi srfi-26))
18154 #:phases
18155 (modify-phases %standard-phases
18156 (replace 'check
18157 (lambda _
18158 (let ((cwd (getcwd)))
18159 (setenv "PYTHONPATH"
18160 (string-append cwd "/build/"
18161 (find (cut string-prefix? "lib" <>)
18162 (scandir (string-append cwd "/build")))
18163 ":"
18164 (getenv "PYTHONPATH"))))
18165 (invoke "pytest")
18166 #t)))))
18167 (native-inputs `(("python-pytest" ,python-pytest)))
18168 (home-page "https://github.com/python/typed_ast")
18169 (synopsis "Fork of Python @code{ast} modules with type comment support")
18170 (description "This package provides a parser similar to the standard
18171 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
18172 include PEP 484 type comments and are independent of the version of Python
18173 under which they are run. The @code{typed_ast} parsers produce the standard
18174 Python AST (plus type comments), and are both fast and correct, as they are
18175 based on the CPython 2.7 and 3.7 parsers.")
18176 ;; See the file "LICENSE" for the details.
18177 (license (list license:psfl
18178 license:asl2.0
18179 license:expat)))) ;ast27/Parser/spark.py
18180
18181 (define-public python-typing
18182 (package
18183 (name "python-typing")
18184 (version "3.7.4.3")
18185 (source
18186 (origin
18187 (method url-fetch)
18188 (uri (pypi-uri "typing" version))
18189 (sha256
18190 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18191 (build-system python-build-system)
18192 (home-page "https://docs.python.org/3/library/typing.html")
18193 (synopsis "Type hints for Python")
18194 (description "This is a backport of the standard library @code{typing}
18195 module to Python versions older than 3.5. Typing defines a standard notation
18196 for Python function and variable type annotations. The notation can be used
18197 for documenting code in a concise, standard format, and it has been designed
18198 to also be used by static and runtime type checkers, static analyzers, IDEs
18199 and other tools.")
18200 (license license:psfl)))
18201
18202 (define-public python2-typing
18203 (package-with-python2 python-typing))
18204
18205 (define-public python-typing-extensions
18206 (package
18207 (name "python-typing-extensions")
18208 (version "3.7.4.3")
18209 (source
18210 (origin
18211 (method url-fetch)
18212 (uri (pypi-uri "typing_extensions" version))
18213 (sha256
18214 (base32
18215 "0356ljrrplm917dqgpn8wjkw6j3mpp916gwxas7jhc3xc4xhgm4r"))))
18216 (build-system python-build-system)
18217 (home-page
18218 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18219 (synopsis "Experimental type hints for Python")
18220 (description
18221 "The typing_extensions module contains additional @code{typing} hints not
18222 yet present in the of the @code{typing} standard library.
18223 Included are implementations of:
18224 @enumerate
18225 @item ClassVar
18226 @item ContextManager
18227 @item Counter
18228 @item DefaultDict
18229 @item Deque
18230 @item NewType
18231 @item NoReturn
18232 @item overload
18233 @item Protocol
18234 @item runtime
18235 @item Text
18236 @item Type
18237 @item TYPE_CHECKING
18238 @item AsyncGenerator
18239 @end enumerate\n")
18240 (license license:psfl)))
18241
18242 (define-public bpython
18243 (package
18244 (name "bpython")
18245 (version "0.18")
18246 (source
18247 (origin
18248 (method url-fetch)
18249 (uri (pypi-uri "bpython" version))
18250 (sha256
18251 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18252 (build-system python-build-system)
18253 (arguments
18254 `(#:phases
18255 (modify-phases %standard-phases
18256 (add-after 'unpack 'remove-failing-test
18257 (lambda _
18258 ;; Remove failing test. FIXME: make it pass
18259 (delete-file "bpython/test/test_args.py")
18260 #t))
18261 (add-after 'wrap 'add-aliases
18262 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18263 (lambda* (#:key outputs #:allow-other-keys)
18264 (let ((out (assoc-ref outputs "out")))
18265 (for-each
18266 (lambda (old new)
18267 (symlink old (string-append out "/bin/" new)))
18268 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18269 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18270 #t)))))
18271 (propagated-inputs
18272 `(("python-pygments" ,python-pygments)
18273 ("python-requests" ,python-requests)
18274 ("python-babel" ,python-babel) ; optional, for internationalization
18275 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18276 ("python-greenlet" ,python-greenlet)
18277 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18278 ("python-six" ,python-six)))
18279 (native-inputs
18280 `(("python-sphinx" ,python-sphinx)
18281 ("python-mock" ,python-mock)))
18282 (home-page "https://bpython-interpreter.org/")
18283 (synopsis "Fancy interface to the Python interpreter")
18284 (description "Bpython is a fancy interface to the Python
18285 interpreter. bpython's main features are
18286
18287 @enumerate
18288 @item in-line syntax highlighting,
18289 @item readline-like autocomplete with suggestions displayed as you type,
18290 @item expected parameter list for any Python function,
18291 @item \"rewind\" function to pop the last line of code from memory and
18292 re-evaluate,
18293 @item send the code you've entered off to a pastebin,
18294 @item save the code you've entered to a file, and
18295 @item auto-indentation.
18296 @end enumerate")
18297 (license license:expat)))
18298
18299 (define-public bpython2
18300 (let ((base (package-with-python2
18301 (strip-python2-variant bpython))))
18302 (package (inherit base)
18303 (name "bpython2")
18304 (arguments
18305 `(#:python ,python-2
18306 #:phases
18307 (modify-phases %standard-phases
18308 (add-after 'unpack 'remove-failing-test
18309 (lambda _
18310 ;; Remove failing test. FIXME: make it pass
18311 (delete-file "bpython/test/test_args.py")
18312 ;; Disable failing test-cases (renaming inhibits they are
18313 ;; discovered)
18314 (substitute* "bpython/test/test_curtsies_repl.py"
18315 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
18316 (string-append a "xxx_off_" b))
18317 (("^(\\s*def )(test_complex\\W)" _ a b)
18318 (string-append a "xxx_off_" b)))
18319 #t))
18320 (add-before 'build 'rename-scripts
18321 ;; rename the scripts to bypthon2, bpdb2, etc.
18322 (lambda _
18323 (substitute* "setup.py"
18324 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
18325 (string-append name "2" rest "\n"))
18326 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
18327 (string-append name "2" (or sub "") rest "\n")))
18328 #t))))))))
18329
18330 (define-public python-pyinotify
18331 (package
18332 (name "python-pyinotify")
18333 (version "0.9.6")
18334 (source (origin
18335 (method url-fetch)
18336 (uri (pypi-uri "pyinotify" version))
18337 (sha256
18338 (base32
18339 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18340 (build-system python-build-system)
18341 (arguments `(#:tests? #f)) ;no tests
18342 (home-page "https://github.com/seb-m/pyinotify")
18343 (synopsis "Python library for monitoring inotify events")
18344 (description
18345 "@code{pyinotify} provides a Python interface for monitoring
18346 file system events on Linux.")
18347 (license license:expat)))
18348
18349 (define-public python2-pyinotify
18350 (package-with-python2 python-pyinotify))
18351
18352 ;; Ada parser uses this version.
18353 (define-public python2-quex-0.67.3
18354 (package
18355 (name "python2-quex")
18356 (version "0.67.3")
18357 (source
18358 (origin
18359 (method url-fetch)
18360 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18361 (version-major+minor version)
18362 "/quex-" version ".zip"))
18363 (sha256
18364 (base32
18365 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18366 (build-system python-build-system)
18367 (native-inputs
18368 `(("unzip" ,unzip)))
18369 (arguments
18370 `(#:python ,python-2
18371 #:tests? #f
18372 #:phases
18373 (modify-phases %standard-phases
18374 (delete 'configure)
18375 (delete 'build)
18376 (replace 'install
18377 (lambda* (#:key outputs #:allow-other-keys)
18378 (let* ((out (assoc-ref outputs "out"))
18379 (share/quex (string-append out "/share/quex"))
18380 (bin (string-append out "/bin")))
18381 (copy-recursively "." share/quex)
18382 (mkdir-p bin)
18383 (symlink (string-append share/quex "/quex-exe.py")
18384 (string-append bin "/quex"))
18385 #t))))))
18386 (native-search-paths
18387 (list (search-path-specification
18388 (variable "QUEX_PATH")
18389 (files '("share/quex")))))
18390 (home-page "http://quex.sourceforge.net/")
18391 (synopsis "Lexical analyzer generator in Python")
18392 (description "@code{quex} is a lexical analyzer generator in Python.")
18393 (license license:lgpl2.1+))) ; Non-military
18394
18395 (define-public python2-quex
18396 (package (inherit python2-quex-0.67.3)
18397 (name "python2-quex")
18398 (version "0.68.1")
18399 (source
18400 (origin
18401 (method url-fetch)
18402 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18403 (sha256
18404 (base32
18405 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18406 (file-name (string-append name "-" version ".tar.gz"))))))
18407
18408 (define-public python-more-itertools
18409 (package
18410 (name "python-more-itertools")
18411 (version "8.2.0")
18412 (source
18413 (origin
18414 (method url-fetch)
18415 (uri (pypi-uri "more-itertools" version))
18416 (sha256
18417 (base32
18418 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18419 (build-system python-build-system)
18420 (home-page "https://github.com/erikrose/more-itertools")
18421 (synopsis "More routines for operating on iterables, beyond itertools")
18422 (description "Python's built-in @code{itertools} module implements a
18423 number of iterator building blocks inspired by constructs from APL, Haskell,
18424 and SML. @code{more-itertools} includes additional building blocks for
18425 working with iterables.")
18426 (properties `((python2-variant . ,(delay python2-more-itertools))))
18427 (license license:expat)))
18428
18429 ;; The 5.x series are the last versions supporting Python 2.7.
18430 (define-public python2-more-itertools
18431 (package
18432 (inherit python-more-itertools)
18433 (name "python2-more-itertools")
18434 (version "5.0.0")
18435 (source (origin
18436 (method url-fetch)
18437 (uri (pypi-uri "more-itertools" version))
18438 (sha256
18439 (base32
18440 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18441 (arguments
18442 `(#:python ,python-2))
18443 (propagated-inputs
18444 `(("python2-six" ,python2-six-bootstrap)))))
18445
18446 (define-public python-latexcodec
18447 (package
18448 (name "python-latexcodec")
18449 (version "1.0.7")
18450 (source
18451 (origin
18452 (method url-fetch)
18453 (uri (pypi-uri "latexcodec" version))
18454 (sha256
18455 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18456 (build-system python-build-system)
18457 (inputs
18458 `(("python-six" ,python-six)))
18459 (home-page "https://readthedocs.org/projects/latexcodec/")
18460 (synopsis "Work with LaTeX code in Python")
18461 (description "Lexer and codec to work with LaTeX code in Python.")
18462 (license license:expat)))
18463
18464 (define-public python-pybtex
18465 (package
18466 (name "python-pybtex")
18467 (version "0.22.2")
18468 (source
18469 (origin
18470 (method url-fetch)
18471 (uri (pypi-uri "pybtex" version))
18472 (sha256
18473 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18474 (build-system python-build-system)
18475 (native-inputs
18476 `(("python-nose" ,python-nose)))
18477 (inputs
18478 `(("python-latexcodec" ,python-latexcodec)
18479 ("python-pyyaml" ,python-pyyaml)
18480 ("python-six" ,python-six)))
18481 (arguments
18482 `(#:test-target "nosetests"))
18483 (home-page "https://pybtex.org/")
18484 (synopsis "BibTeX-compatible bibliography processor")
18485 (description "Pybtex is a BibTeX-compatible bibliography processor written
18486 in Python. You can simply type pybtex instead of bibtex.")
18487 (license license:expat)))
18488
18489 (define-public python-onetimepass
18490 (package
18491 (name "python-onetimepass")
18492 (version "1.0.1")
18493 (source
18494 (origin
18495 (method url-fetch)
18496 (uri (pypi-uri "onetimepass" version))
18497 (sha256
18498 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18499 (build-system python-build-system)
18500 (propagated-inputs `(("python-six" ,python-six)))
18501 (home-page "https://github.com/tadeck/onetimepass/")
18502 (synopsis "One-time password library")
18503 (description "Python one-time password library for HMAC-based (HOTP) and
18504 time-based (TOTP) passwords.")
18505 (license license:expat)))
18506
18507 (define-public python-parso
18508 (package
18509 (name "python-parso")
18510 (version "0.7.1")
18511 (source
18512 (origin
18513 (method url-fetch)
18514 (uri (pypi-uri "parso" version))
18515 (sha256
18516 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18517 (native-inputs
18518 `(("python-pytest" ,python-pytest)))
18519 (build-system python-build-system)
18520 (arguments
18521 `(#:phases (modify-phases %standard-phases
18522 (replace 'check
18523 (lambda _ (invoke "pytest" "-vv"))))))
18524 (home-page "https://github.com/davidhalter/parso")
18525 (synopsis "Python Parser")
18526 (description "Parso is a Python parser that supports error recovery and
18527 round-trip parsing for different Python versions (in multiple Python versions).
18528 Parso is also able to list multiple syntax errors in your Python file.")
18529 (license license:expat)))
18530
18531 (define-public python2-parso
18532 (package-with-python2 python-parso))
18533
18534 (define-public python-async-generator
18535 (package
18536 (name "python-async-generator")
18537 (version "1.10")
18538 (source
18539 (origin
18540 (method url-fetch)
18541 (uri (pypi-uri "async_generator" version))
18542 (sha256
18543 (base32
18544 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18545 (build-system python-build-system)
18546 (native-inputs
18547 `(("python-pytest" ,python-pytest)))
18548 (home-page "https://github.com/python-trio/async_generator")
18549 (synopsis "Async generators and context managers for Python 3.5+")
18550 (description "@code{async_generator} back-ports Python 3.6's native async
18551 generators and Python 3.7's context managers into Python 3.5.")
18552 ;; Dual licensed.
18553 (license (list license:expat license:asl2.0))))
18554
18555 (define-public python-async-timeout
18556 (package
18557 (name "python-async-timeout")
18558 (version "3.0.1")
18559 (source
18560 (origin
18561 (method url-fetch)
18562 (uri (pypi-uri "async-timeout" version))
18563 (sha256
18564 (base32
18565 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18566 (build-system python-build-system)
18567 (home-page "https://github.com/aio-libs/async_timeout/")
18568 (synopsis "Timeout context manager for asyncio programs")
18569 (description "@code{async-timeout} provides a timeout timeout context
18570 manager compatible with @code{asyncio}.")
18571 (license license:asl2.0)))
18572
18573 (define-public python-glob2
18574 (package
18575 (name "python-glob2")
18576 (version "0.7")
18577 (source
18578 (origin
18579 (method git-fetch)
18580 (uri (git-reference
18581 (url "https://github.com/miracle2k/python-glob2")
18582 (commit (string-append "v" version))))
18583 (file-name (git-file-name name version))
18584 (sha256
18585 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18586 (build-system python-build-system)
18587 (home-page "https://github.com/miracle2k/python-glob2/")
18588 (synopsis "Extended Version of the python buildin glob module")
18589 (description "This is an extended version of the Python
18590 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18591 adds:
18592
18593 @itemize
18594 @item The ability to capture the text matched by glob patterns, and return
18595 those matches alongside the file names.
18596 @item A recursive @code{**} globbing syntax, akin for example to the
18597 @code{globstar} option of Bash.
18598 @item The ability to replace the file system functions used, in order to glob
18599 on virtual file systems.
18600 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18601 @end itemize
18602
18603 Glob2 currently based on the glob code from Python 3.3.1.")
18604 (license license:bsd-2)))
18605
18606 (define-public python2-glob2
18607 (package-with-python2 python-glob2))
18608
18609 (define-public python-gipc
18610 (package
18611 (name "python-gipc")
18612 (version "0.6.0")
18613 (source
18614 (origin
18615 (method url-fetch)
18616 (uri (pypi-uri "gipc" version ".zip"))
18617 (sha256
18618 (base32
18619 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18620 (build-system python-build-system)
18621 (native-inputs
18622 `(("unzip" ,unzip)))
18623 (propagated-inputs
18624 `(("python-gevent" ,python-gevent)))
18625 (home-page "https://gehrcke.de/gipc/")
18626 (synopsis "Child process management in the context of gevent")
18627 (description "Usage of Python's multiprocessing package in a
18628 gevent-powered application may raise problems. With @code{gipc},
18629 process-based child processes can safely be created anywhere within a
18630 gevent-powered application.")
18631 (license license:expat)))
18632
18633 (define-public python2-gipc
18634 (package-with-python2 python-gipc))
18635
18636 (define-public python-beautifultable
18637 (package
18638 (name "python-beautifultable")
18639 (version "1.0.0")
18640 (source
18641 (origin
18642 (method url-fetch)
18643 (uri (pypi-uri "beautifultable" version))
18644 (sha256
18645 (base32
18646 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18647 (build-system python-build-system)
18648 (propagated-inputs
18649 `(("python-wcwidth" ,python-wcwidth)))
18650 (arguments
18651 `(#:phases
18652 (modify-phases %standard-phases
18653 (add-after 'unpack 'patch-setup.py
18654 (lambda _
18655 (substitute* "setup.py"
18656 (("setup\\(")
18657 "setup(\n test_suite=\"test\",")))))))
18658 (home-page "https://github.com/pri22296/beautifultable")
18659 (synopsis "Print ASCII tables for terminals")
18660 (description "@code{python-beautifultable} provides a class for easily
18661 printing tabular data in a visually appealing ASCII format to a terminal.
18662
18663 Features include, but are not limited to:
18664 @itemize
18665 @item Full customization of the look and feel of the table
18666 @item Row and column accessors.
18667 @item Full support for colors using ANSI sequences or any library.
18668 @item Plenty of predefined styles and option to create custom ones.
18669 @item Support for Unicode characters.
18670 @item Supports streaming table when data is slow to retrieve.
18671 @end itemize")
18672 (license license:expat)))
18673
18674 (define-public python-globber
18675 (package
18676 (name "python-globber")
18677 (version "0.2.1")
18678 (source
18679 (origin
18680 (method git-fetch)
18681 (uri (git-reference
18682 (url "https://github.com/asharov/globber")
18683 (commit version)))
18684 (file-name (git-file-name name version))
18685 (sha256
18686 (base32
18687 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18688 (build-system python-build-system)
18689 (home-page "https://github.com/asharov/globber")
18690 (synopsis "Library for string matching with glob patterns")
18691 (description
18692 "Globber is a Python library for matching file names against glob patterns.
18693 In contrast to other glob-matching libraries, it matches arbitrary strings and
18694 doesn't require the matched names to be existing files. In addition, it
18695 supports the globstar @code{**} operator to match an arbitrary number of
18696 path components.")
18697 (license license:asl2.0)))
18698
18699 (define-public python-git-hammer
18700 (package
18701 (name "python-git-hammer")
18702 (version "0.3.1")
18703 (source
18704 (origin
18705 (method git-fetch)
18706 (uri (git-reference
18707 (url "https://github.com/asharov/git-hammer")
18708 (commit version)))
18709 (file-name (git-file-name name version))
18710 (sha256
18711 (base32
18712 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18713 (build-system python-build-system)
18714 (arguments
18715 `(#:phases
18716 (modify-phases %standard-phases
18717 (add-after 'unpack 'patch-setup.py
18718 (lambda _
18719 (substitute* "setup.py"
18720 (("setup\\(")
18721 "setup(\n test_suite=\"test\",")))))))
18722 (propagated-inputs
18723 `(("python-beautifultable" ,python-beautifultable)
18724 ("python-dateutil" ,python-dateutil)
18725 ("python-gitpython" ,python-gitpython)
18726 ("python-globber" ,python-globber)
18727 ("python-matplotlib" ,python-matplotlib)
18728 ("python-sqlalchemy" ,python-sqlalchemy)
18729 ("python-sqlalchemy-utils"
18730 ,python-sqlalchemy-utils)))
18731 (home-page "https://github.com/asharov/git-hammer")
18732 (synopsis "Provide statistics for git repositories")
18733 (description
18734 "Git Hammer is a statistics tool for projects in git repositories.
18735 Its major feature is tracking the number of lines authored by each person for every
18736 commit, but it also includes some other useful statistics.")
18737 (license license:asl2.0)))
18738
18739 (define-public python-fusepy
18740 (package
18741 (name "python-fusepy")
18742 (version "2.0.4")
18743 (source
18744 (origin
18745 (method url-fetch)
18746 (uri (pypi-uri "fusepy" version))
18747 (sha256
18748 (base32
18749 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18750 (build-system python-build-system)
18751 (arguments
18752 `(#:phases
18753 (modify-phases %standard-phases
18754 (add-before 'build 'set-library-file-name
18755 (lambda* (#:key inputs #:allow-other-keys)
18756 (let ((fuse (assoc-ref inputs "fuse")))
18757 (substitute* "fuse.py"
18758 (("find_library\\('fuse'\\)")
18759 (string-append "'" fuse "/lib/libfuse.so'")))
18760 #t))))))
18761 (propagated-inputs
18762 `(("fuse" ,fuse)))
18763 (home-page "https://github.com/fusepy/fusepy")
18764 (synopsis "Simple ctypes bindings for FUSE")
18765 (description "Python module that provides a simple interface to FUSE and
18766 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18767 (license license:isc)))
18768
18769 (define-public python2-fusepy
18770 (package-with-python2 python-fusepy))
18771
18772 (define-public python-fusepyng
18773 (package
18774 (name "python-fusepyng")
18775 (version "1.0.7")
18776 (source
18777 (origin
18778 (method url-fetch)
18779 (uri (pypi-uri "fusepyng" version))
18780 (sha256
18781 (base32
18782 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18783 (build-system python-build-system)
18784 (arguments
18785 '(#:phases
18786 (modify-phases %standard-phases
18787 (add-after 'unpack 'set-libfuse-path
18788 (lambda* (#:key inputs #:allow-other-keys)
18789 (let ((fuse (assoc-ref inputs "fuse")))
18790 (substitute* "fusepyng.py"
18791 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18792 (string-append "\"" fuse "/lib/libfuse.so\""))))
18793 #t)))))
18794 (inputs
18795 `(("fuse" ,fuse)))
18796 (propagated-inputs
18797 `(("python-paramiko" ,python-paramiko)))
18798 (home-page "https://github.com/rianhunter/fusepyng")
18799 (synopsis "Simple ctypes bindings for FUSE")
18800 (description "@code{fusepyng} is a Python module that provides a simple
18801 interface to FUSE on various operating systems. It's just one file and is
18802 implemented using @code{ctypes}.")
18803 (license license:isc)))
18804
18805 (define-public python2-gdrivefs
18806 (package
18807 (name "python2-gdrivefs")
18808 (version "0.14.9")
18809 (source
18810 (origin
18811 (method url-fetch)
18812 (uri (pypi-uri "gdrivefs" version))
18813 (sha256
18814 (base32
18815 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18816 (build-system python-build-system)
18817 (arguments
18818 `(#:python ,python-2
18819 #:phases
18820 (modify-phases %standard-phases
18821 (add-before 'build 'patch-setup-py
18822 (lambda _
18823 ;; Update requirements from dependency==version
18824 ;; to dependency>=version
18825 (substitute* "gdrivefs/resources/requirements.txt"
18826 (("==") ">="))
18827 #t)))))
18828 (native-inputs
18829 `(("python2-gipc" ,python2-gipc)
18830 ("python2-gevent" ,python2-gevent)
18831 ("python2-greenlet" ,python2-greenlet)
18832 ("python2-httplib2" ,python2-httplib2)
18833 ("python2-uritemplate" ,python2-uritemplate)
18834 ("python2-oauth2client" ,python2-oauth2client)
18835 ("python2-six" ,python2-six)))
18836 (propagated-inputs
18837 `(("python2-dateutil" ,python2-dateutil)
18838 ("python2-fusepy" ,python2-fusepy)
18839 ("python2-google-api-client" ,python2-google-api-client)))
18840 (home-page "https://github.com/dsoprea/GDriveFS")
18841 (synopsis "Mount Google Drive as a local file system")
18842 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18843 under Python 2.7.")
18844 (license license:gpl2)))
18845
18846 (define-public python-userspacefs
18847 (package
18848 (name "python-userspacefs")
18849 (version "1.0.13")
18850 (source
18851 (origin
18852 (method url-fetch)
18853 (uri (pypi-uri "userspacefs" version))
18854 (sha256
18855 (base32
18856 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18857 (build-system python-build-system)
18858 (propagated-inputs
18859 `(("python-fusepyng" ,python-fusepyng)))
18860 (home-page "https://github.com/rianhunter/userspacefs")
18861 (synopsis "User-space file systems for Python")
18862 (description
18863 "@code{userspacefs} is a library that allows you to easily write
18864 user-space file systems in Python.")
18865 (license license:gpl3+)))
18866
18867 (define-public pybind11
18868 (package
18869 (name "pybind11")
18870 (version "2.4.3")
18871 (source (origin
18872 (method git-fetch)
18873 (uri (git-reference
18874 (url "https://github.com/pybind/pybind11")
18875 (commit (string-append "v" version))))
18876 (sha256
18877 (base32
18878 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18879 (file-name (git-file-name name version))))
18880 (build-system cmake-build-system)
18881 (native-inputs
18882 `(("python" ,python-wrapper)
18883
18884 ;; The following dependencies are used for tests.
18885 ("python-pytest" ,python-pytest)
18886 ("catch" ,catch-framework2-1)
18887 ("eigen" ,eigen)))
18888 (arguments
18889 `(#:configure-flags
18890 (list (string-append "-DCATCH_INCLUDE_DIR="
18891 (assoc-ref %build-inputs "catch")
18892 "/include/catch"))
18893
18894 #:phases (modify-phases %standard-phases
18895 (add-after 'install 'install-python
18896 (lambda* (#:key outputs #:allow-other-keys)
18897 (let ((out (assoc-ref outputs "out")))
18898 (with-directory-excursion "../source"
18899 (setenv "PYBIND11_USE_CMAKE" "yes")
18900 (invoke "python" "setup.py" "install"
18901 "--single-version-externally-managed"
18902 "--root=/"
18903 (string-append "--prefix=" out)))))))
18904
18905 #:test-target "check"))
18906 (home-page "https://github.com/pybind/pybind11/")
18907 (synopsis "Seamless operability between C++11 and Python")
18908 (description
18909 "@code{pybind11} is a lightweight header-only library that exposes C++
18910 types in Python and vice versa, mainly to create Python bindings of existing
18911 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18912 library: to minimize boilerplate code in traditional extension modules by
18913 inferring type information using compile-time introspection.")
18914 (license license:bsd-3)))
18915
18916 (define-public python-fasteners
18917 (package
18918 (name "python-fasteners")
18919 (version "0.15")
18920 (source
18921 (origin
18922 (method url-fetch)
18923 (uri (pypi-uri "fasteners" version))
18924 (sha256
18925 (base32
18926 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18927 (build-system python-build-system)
18928 (propagated-inputs
18929 `(("python-monotonic" ,python-monotonic)
18930 ("python-six" ,python-six)))
18931 (native-inputs
18932 `(("python-testtools" ,python-testtools)))
18933 (home-page "https://github.com/harlowja/fasteners")
18934 (synopsis "Python package that provides useful locks")
18935 (description
18936 "This package provides a Python program that provides following locks:
18937
18938 @itemize
18939 @item Locking decorator
18940 @item Reader-writer locks
18941 @item Inter-process locks
18942 @item Generic helpers
18943 @end itemize\n")
18944 (properties `((python2-variant . ,(delay python2-fasteners))))
18945 (license license:asl2.0)))
18946
18947 (define-public python2-fasteners
18948 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18949 (package
18950 (inherit base)
18951 (propagated-inputs
18952 `(("python2-futures" ,python2-futures)
18953 ,@(package-propagated-inputs base))))))
18954
18955 (define-public python-requests-file
18956 (package
18957 (name "python-requests-file")
18958 (version "1.4.3")
18959 (source
18960 (origin
18961 (method url-fetch)
18962 (uri (pypi-uri "requests-file" version))
18963 (sha256
18964 (base32
18965 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18966 (build-system python-build-system)
18967 (propagated-inputs
18968 `(("python-requests" ,python-requests)
18969 ("python-six" ,python-six)))
18970 (home-page
18971 "https://github.com/dashea/requests-file")
18972 (synopsis "File transport adapter for Requests")
18973 (description
18974 "Requests-File is a transport adapter for use with the Requests Python
18975 library to allow local file system access via @code{file://} URLs.")
18976 (license license:asl2.0)))
18977
18978 (define-public python2-requests-file
18979 (package-with-python2 python-requests-file))
18980
18981 (define-public python-identify
18982 (package
18983 (name "python-identify")
18984 (version "1.4.25")
18985 (source
18986 (origin
18987 ;; There are no tests in the PyPI tarball.
18988 (method git-fetch)
18989 (uri (git-reference
18990 (url "https://github.com/chriskuehl/identify")
18991 (commit (string-append "v" version))))
18992 (file-name (git-file-name name version))
18993 (sha256
18994 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18995 (build-system python-build-system)
18996 (arguments
18997 `(#:phases
18998 (modify-phases %standard-phases
18999 (replace 'check
19000 (lambda _
19001 (invoke "pytest" "-vv"))))))
19002 (native-inputs
19003 `(("python-coverage" ,python-coverage)
19004 ("python-pytest" ,python-pytest)))
19005 (propagated-inputs
19006 `(("python-editdistance" ,python-editdistance)))
19007 (home-page "https://github.com/chriskuehl/identify")
19008 (synopsis "File identification library for Python")
19009 (description
19010 "@code{identify} is a file identification library for Python. Given
19011 a file (or some information about a file), return a set of standardized tags
19012 identifying what the file is.")
19013 (license license:expat)))
19014
19015 (define-public python-tldextract
19016 (package
19017 (name "python-tldextract")
19018 (version "2.2.0")
19019 (source
19020 (origin
19021 (method url-fetch)
19022 (uri (pypi-uri "tldextract" version))
19023 (sha256
19024 (base32
19025 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
19026 (build-system python-build-system)
19027 (native-inputs
19028 `(("python-pytest" ,python-pytest)
19029 ("python-responses" ,python-responses)))
19030 (propagated-inputs
19031 `(("python-idna" ,python-idna)
19032 ("python-requests" ,python-requests)
19033 ("python-requests-file" ,python-requests-file)))
19034 (home-page
19035 "https://github.com/john-kurkowski/tldextract")
19036 (synopsis
19037 "Separate the TLD from the registered domain and subdomains of a URL")
19038 (description
19039 "TLDExtract accurately separates the TLD from the registered domain and
19040 subdomains of a URL, using the Public Suffix List. By default, this includes
19041 the public ICANN TLDs and their exceptions. It can optionally support the
19042 Public Suffix List's private domains as well.")
19043 (license license:bsd-3)))
19044
19045 (define-public python2-tldextract
19046 (package-with-python2 python-tldextract))
19047
19048 (define-public python-nodeenv
19049 (package
19050 (name "python-nodeenv")
19051 (version "1.4.0")
19052 (source
19053 (origin
19054 ;; There's no tarball in PyPI.
19055 (method git-fetch)
19056 (uri (git-reference
19057 (url "https://github.com/ekalinin/nodeenv")
19058 (commit version)))
19059 (file-name (git-file-name name version))
19060 (sha256
19061 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
19062 (build-system python-build-system)
19063 (arguments
19064 `(#:phases
19065 (modify-phases %standard-phases
19066 (replace 'check
19067 (lambda _
19068 ;; This test fails. It tries to open a network socket.
19069 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
19070 (native-inputs
19071 `(("python-coverage" ,python-coverage)
19072 ("python-mock" ,python-mock)
19073 ("python-pytest" ,python-pytest)))
19074 (home-page "https://ekalinin.github.io/nodeenv/")
19075 (synopsis "Create isolated node.js environments")
19076 (description
19077 "Nodeenv (node.js virtual environment) is a tool to create isolated
19078 node.js environments. It creates an environment that has its own installation
19079 directories, that doesn't share libraries with other node.js virtual
19080 environments.")
19081 (license license:bsd-3)))
19082
19083 (define-public python-pynamecheap
19084 (package
19085 (name "python-pynamecheap")
19086 (version "0.0.3")
19087 (source
19088 (origin
19089 (method url-fetch)
19090 (uri (pypi-uri "PyNamecheap" version))
19091 (sha256
19092 (base32
19093 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
19094 (build-system python-build-system)
19095 (propagated-inputs
19096 `(("python-requests" ,python-requests)))
19097 (home-page
19098 "https://github.com/Bemmu/PyNamecheap")
19099 (synopsis
19100 "Namecheap API client in Python")
19101 (description
19102 "PyNamecheap is a Namecheap API client in Python.")
19103 (license license:expat)))
19104
19105 (define-public python2-pynamecheap
19106 (package-with-python2 python-pynamecheap))
19107
19108 (define-public python-dns-lexicon
19109 (package
19110 (name "python-dns-lexicon")
19111 (version "2.4.0")
19112 (source
19113 (origin
19114 (method url-fetch)
19115 (uri (pypi-uri "dns-lexicon" version))
19116 (sha256
19117 (base32
19118 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
19119 (build-system python-build-system)
19120 (arguments
19121 `(#:tests? #f)) ;requires internet access
19122 (propagated-inputs
19123 `(("python-future" ,python-future)
19124 ("python-pynamecheap" ,python-pynamecheap)
19125 ("python-requests" ,python-requests)
19126 ("python-tldextract" ,python-tldextract)
19127 ("python-urllib3" ,python-urllib3)))
19128 (home-page "https://github.com/AnalogJ/lexicon")
19129 (synopsis
19130 "Manipulate DNS records on various DNS providers")
19131 (description
19132 "Lexicon provides a way to manipulate DNS records on multiple DNS
19133 providers in a standardized way. It has a CLI but it can also be used as a
19134 Python library. It was designed to be used in automation, specifically with
19135 Let's Encrypt.")
19136 (license license:expat)))
19137
19138 (define-public python2-dns-lexicon
19139 (package-with-python2 python-dns-lexicon))
19140
19141 (define-public python-cfgv
19142 (package
19143 (name "python-cfgv")
19144 (version "3.1.0")
19145 (source
19146 (origin
19147 ;; There are no tests in the PyPI tarball.
19148 (method git-fetch)
19149 (uri (git-reference
19150 (url "https://github.com/asottile/cfgv")
19151 (commit (string-append "v" version))))
19152 (file-name (git-file-name name version))
19153 (sha256
19154 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
19155 (build-system python-build-system)
19156 (arguments
19157 `(#:phases
19158 (modify-phases %standard-phases
19159 (replace 'check
19160 (lambda _
19161 (invoke "pytest" "-vv"))))))
19162 (native-inputs
19163 `(("python-covdefaults" ,python-covdefaults)
19164 ("python-coverage" ,python-coverage)
19165 ("python-pytest" ,python-pytest)))
19166 (home-page "https://github.com/asottile/cfgv")
19167 (synopsis "Configuration validation library")
19168 (description
19169 "This library helps to validate configuration files and produce human
19170 readable error messages.")
19171 (license license:expat)))
19172
19173 (define-public python-commandlines
19174 (package
19175 (name "python-commandlines")
19176 (version "0.4.1")
19177 (source
19178 (origin
19179 (method url-fetch)
19180 (uri (pypi-uri "commandlines" version))
19181 (sha256
19182 (base32
19183 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19184 (build-system python-build-system)
19185 (home-page "https://github.com/chrissimpkins/commandlines")
19186 (synopsis "Command line argument to object parsing library")
19187 (description
19188 "@code{Commandlines} is a Python library for command line application
19189 development that supports command line argument parsing, command string
19190 validation testing and application logic.")
19191 (license license:expat)))
19192
19193 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19194 ;; python-numba. They have a very unflexible relationship.
19195 (define-public python-numba
19196 (package
19197 (name "python-numba")
19198 (version "0.51.2")
19199 (source
19200 (origin
19201 (method url-fetch)
19202 (uri (pypi-uri "numba" version))
19203 (sha256
19204 (base32
19205 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19206 (build-system python-build-system)
19207 (arguments
19208 `(#:phases
19209 (modify-phases %standard-phases
19210 (add-after 'unpack 'disable-proprietary-features
19211 (lambda _
19212 (setenv "NUMBA_DISABLE_HSA" "1")
19213 (setenv "NUMBA_DISABLE_CUDA" "1")
19214 #t))
19215 (replace 'check
19216 (lambda* (#:key inputs outputs #:allow-other-keys)
19217 (add-installed-pythonpath inputs outputs)
19218 ;; Something is wrong with the PYTHONPATH when running the
19219 ;; tests from the build directory, as it complains about not being
19220 ;; able to import certain modules.
19221 (with-directory-excursion "/tmp"
19222 (setenv "HOME" (getcwd))
19223 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19224 (propagated-inputs
19225 `(("python-llvmlite" ,python-llvmlite)
19226 ("python-numpy" ,python-numpy)
19227 ("python-singledispatch" ,python-singledispatch)))
19228 (native-inputs ;for tests
19229 `(("python-jinja2" ,python-jinja2)
19230 ("python-pygments" ,python-pygments)))
19231 (home-page "https://numba.pydata.org")
19232 (synopsis "Compile Python code using LLVM")
19233 (description "Numba gives you the power to speed up your applications with
19234 high performance functions written directly in Python. With a few
19235 annotations, array-oriented and math-heavy Python code can be just-in-time
19236 compiled to native machine instructions, similar in performance to C, C++ and
19237 Fortran, without having to switch languages or Python interpreters.
19238
19239 Numba works by generating optimized machine code using the LLVM compiler
19240 infrastructure at import time, runtime, or statically (using the included pycc
19241 tool).")
19242 (license license:bsd-3)))
19243
19244 (define-public python-numcodecs
19245 (package
19246 (name "python-numcodecs")
19247 (version "0.6.4")
19248 (source
19249 (origin
19250 (method url-fetch)
19251 (uri (pypi-uri "numcodecs" version))
19252 (sha256
19253 (base32
19254 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19255 (build-system python-build-system)
19256 (propagated-inputs
19257 `(("python-numpy" ,python-numpy)
19258 ("python-msgpack" ,python-msgpack)))
19259 (native-inputs
19260 `(("python-pytest" ,python-pytest)
19261 ("python-setuptools-scm" ,python-setuptools-scm)))
19262 (home-page "https://github.com/zarr-developers/numcodecs")
19263 (synopsis "Buffer compression and transformation codecs")
19264 (description
19265 "This Python package provides buffer compression and transformation
19266 codecs for use in data storage and communication applications.")
19267 (license license:expat)))
19268
19269 (define-public python-asciitree
19270 (package
19271 (name "python-asciitree")
19272 (version "0.3.3")
19273 (source
19274 (origin
19275 (method url-fetch)
19276 (uri (pypi-uri "asciitree" version))
19277 (sha256
19278 (base32
19279 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19280 (build-system python-build-system)
19281 (home-page "https://github.com/mbr/asciitree")
19282 (synopsis "Draws ASCII trees")
19283 (description "This package draws tree structures using characters.")
19284 (license license:expat)))
19285
19286 (define-public python-zarr
19287 (package
19288 (name "python-zarr")
19289 (version "2.4.0")
19290 (source
19291 (origin
19292 (method url-fetch)
19293 (uri (pypi-uri "zarr" version))
19294 (sha256
19295 (base32
19296 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19297 (build-system python-build-system)
19298 (arguments
19299 `(#:phases
19300 (modify-phases %standard-phases
19301 (add-after 'unpack 'disable-service-tests
19302 (lambda _
19303 (setenv "ZARR_TEST_ABS" "0")
19304 (setenv "ZARR_TEST_MONGO" "0")
19305 (setenv "ZARR_TEST_REDIS" "0")
19306 #t))
19307 (replace 'check
19308 (lambda _
19309 (invoke "pytest" "-vv" "-k" "not lmdb")
19310 #t)))))
19311 (propagated-inputs
19312 `(("python-asciitree" ,python-asciitree)
19313 ("python-fasteners" ,python-fasteners)
19314 ("python-numcodecs" ,python-numcodecs)
19315 ("python-numpy" ,python-numpy)))
19316 (native-inputs
19317 `(("python-pytest" ,python-pytest)
19318 ("python-setuptools-scm" ,python-setuptools-scm)))
19319 (home-page "https://github.com/zarr-developers/zarr-python")
19320 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19321 (description
19322 "This package provides an implementation of chunked, compressed,
19323 N-dimensional arrays for Python.")
19324 (license license:expat)))
19325
19326 (define-public python-anndata
19327 (package
19328 (name "python-anndata")
19329 (version "0.7.1")
19330 (source
19331 (origin
19332 (method url-fetch)
19333 (uri (pypi-uri "anndata" version))
19334 (sha256
19335 (base32
19336 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19337 (build-system python-build-system)
19338 (arguments
19339 `(#:phases
19340 (modify-phases %standard-phases
19341 (add-after 'unpack 'delete-inconvenient-tests
19342 (lambda _
19343 ;; This test depends on python-scikit-learn.
19344 (delete-file "anndata/tests/test_inplace_subset.py")
19345 #t))
19346 (delete 'check)
19347 (add-after 'install 'check
19348 (lambda* (#:key inputs outputs #:allow-other-keys)
19349 (add-installed-pythonpath inputs outputs)
19350 (invoke "pytest" "-vv"))))))
19351 (propagated-inputs
19352 `(("python-h5py" ,python-h5py)
19353 ("python-importlib-metadata" ,python-importlib-metadata)
19354 ("python-natsort" ,python-natsort)
19355 ("python-numcodecs" ,python-numcodecs)
19356 ("python-packaging" ,python-packaging)
19357 ("python-pandas" ,python-pandas)
19358 ("python-scipy" ,python-scipy)
19359 ("python-zarr" ,python-zarr)))
19360 (native-inputs
19361 `(("python-joblib" ,python-joblib)
19362 ("python-pytest" ,python-pytest)
19363 ("python-setuptools-scm" ,python-setuptools-scm)))
19364 (home-page "https://github.com/theislab/anndata")
19365 (synopsis "Annotated data for data analysis pipelines")
19366 (description "Anndata is a package for simple (functional) high-level APIs
19367 for data analysis pipelines. In this context, it provides an efficient,
19368 scalable way of keeping track of data together with learned annotations and
19369 reduces the code overhead typically encountered when using a mostly
19370 object-oriented library such as @code{scikit-learn}.")
19371 (license license:bsd-3)))
19372
19373 (define-public python-dill
19374 (package
19375 (name "python-dill")
19376 (version "0.3.1.1")
19377 (source
19378 (origin
19379 (method url-fetch)
19380 (uri (pypi-uri "dill" version))
19381 (sha256
19382 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19383 (build-system python-build-system)
19384 (arguments
19385 `(#:phases
19386 (modify-phases %standard-phases
19387 (replace 'check
19388 (lambda _
19389 (with-directory-excursion "/tmp"
19390 (invoke "nosetests" "-v"))
19391 #t)))))
19392 (native-inputs
19393 `(("python-nose" ,python-nose)))
19394 (home-page "https://pypi.org/project/dill/")
19395 (synopsis "Serialize all of Python")
19396 (description "Dill extends Python's @code{pickle} module for serializing
19397 and de-serializing Python objects to the majority of the built-in Python
19398 types. Dill provides the user the same interface as the @code{pickle} module,
19399 and also includes some additional features. In addition to pickling Python
19400 objects, @code{dill} provides the ability to save the state of an interpreter
19401 session in a single command. Hence, it would be feasible to save a
19402 interpreter session, close the interpreter, ship the pickled file to another
19403 computer, open a new interpreter, unpickle the session and thus continue from
19404 the saved state of the original interpreter session.")
19405 (license license:bsd-3)))
19406
19407 (define-public python-multiprocess
19408 (package
19409 (name "python-multiprocess")
19410 (version "0.70.9")
19411 (source
19412 (origin
19413 (method url-fetch)
19414 (uri (pypi-uri "multiprocess" version))
19415 (sha256
19416 (base32
19417 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19418 (build-system python-build-system)
19419 (arguments
19420 `(#:phases
19421 (modify-phases %standard-phases
19422 (add-after 'unpack 'disable-broken-tests
19423 (lambda _
19424 ;; This test is broken as there is no keyboard interrupt.
19425 (substitute* "py3.7/multiprocess/tests/__init__.py"
19426 (("^(.*)def test_wait_result"
19427 line indent)
19428 (string-append indent
19429 "@unittest.skip(\"Disabled by Guix\")\n"
19430 line)))
19431 #t))
19432 ;; Tests must be run after installation.
19433 (delete 'check)
19434 (add-after 'install 'check
19435 (lambda* (#:key inputs outputs #:allow-other-keys)
19436 (add-installed-pythonpath inputs outputs)
19437 (invoke "python" "-m" "multiprocess.tests")
19438 #t)))))
19439 (propagated-inputs
19440 `(("python-dill" ,python-dill)))
19441 (home-page "https://pypi.org/project/multiprocess/")
19442 (synopsis "Multiprocessing and multithreading in Python")
19443 (description
19444 "This package is a fork of the multiprocessing Python package, a package
19445 which supports the spawning of processes using the API of the standard
19446 library's @code{threading} module.")
19447 (license license:bsd-3)))
19448
19449 (define-public python-toolz
19450 (package
19451 (name "python-toolz")
19452 (version "0.9.0")
19453 (source
19454 (origin
19455 (method url-fetch)
19456 (uri (pypi-uri "toolz" version))
19457 (sha256
19458 (base32
19459 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19460 (build-system python-build-system)
19461 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19462 ;; unregistered loader type"
19463 (arguments '(#:tests? #f))
19464 (home-page "https://github.com/pytoolz/toolz/")
19465 (synopsis "List processing tools and functional utilities")
19466 (description
19467 "This package provides a set of utility functions for iterators,
19468 functions, and dictionaries.")
19469 (license license:bsd-3)))
19470
19471 (define-public python2-toolz
19472 (package-with-python2 python-toolz))
19473
19474 (define-public python-cytoolz
19475 (package
19476 (name "python-cytoolz")
19477 (version "0.9.0.1")
19478 (source
19479 (origin
19480 (method url-fetch)
19481 (uri (pypi-uri "cytoolz" version))
19482 (sha256
19483 (base32
19484 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19485 (build-system python-build-system)
19486 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19487 ;; 'exceptions'"
19488 (arguments '(#:tests? #f))
19489 (propagated-inputs
19490 `(("python-toolz" ,python-toolz)))
19491 (native-inputs
19492 `(("python-cython" ,python-cython)))
19493 (home-page "https://github.com/pytoolz/cytoolz")
19494 (synopsis "High performance functional utilities")
19495 (description
19496 "The cytoolz package implements the same API as provided by toolz. The
19497 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19498 that is accessible to other projects developed in Cython.")
19499 (license license:bsd-3)))
19500
19501 (define-public python-sortedcontainers
19502 (package
19503 (name "python-sortedcontainers")
19504 (version "2.1.0")
19505 (source
19506 (origin
19507 (method url-fetch)
19508 (uri (pypi-uri "sortedcontainers" version))
19509 (sha256
19510 (base32
19511 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19512 (build-system python-build-system)
19513 (arguments
19514 ;; FIXME: Tests require many extra dependencies, and would introduce
19515 ;; a circular dependency on hypothesis, which uses this package.
19516 '(#:tests? #f))
19517 (propagated-inputs
19518 `(("python-appdirs" ,python-appdirs)
19519 ("python-distlib" ,python-distlib)
19520 ("python-filelock" ,python-filelock)
19521 ("python-six" ,python-six-bootstrap)))
19522 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19523 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19524 (description
19525 "This package provides a sorted collections library, written in
19526 pure-Python.")
19527 (license license:asl2.0)))
19528
19529 (define-public python2-sortedcontainers
19530 (package-with-python2 python-sortedcontainers))
19531
19532 (define-public python-cloudpickle
19533 (package
19534 (name "python-cloudpickle")
19535 (version "1.3.0")
19536 (source
19537 (origin
19538 (method url-fetch)
19539 (uri (pypi-uri "cloudpickle" version))
19540 (sha256
19541 (base32
19542 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19543 (build-system python-build-system)
19544 (arguments
19545 '(#:phases (modify-phases %standard-phases
19546 (add-before 'check 'do-not-override-PYTHONPATH
19547 (lambda _
19548 ;; Append to PYTHONPATH instead of overriding it so
19549 ;; that dependencies from Guix can be found.
19550 (substitute* "tests/testutils.py"
19551 (("env\\['PYTHONPATH'\\] = pythonpath")
19552 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19553 #t))
19554 (replace 'check
19555 (lambda* (#:key tests? #:allow-other-keys)
19556 (if tests?
19557 (invoke "pytest" "-s" "-vv")
19558 (format #t "test suite not run~%"))
19559 #t)))))
19560 (native-inputs
19561 `(;; For tests.
19562 ("python-psutil" ,python-psutil)
19563 ("python-pytest" ,python-pytest)
19564 ("python-tornado" ,python-tornado)))
19565 (home-page "https://github.com/cloudpipe/cloudpickle")
19566 (synopsis "Extended pickling support for Python objects")
19567 (description
19568 "Cloudpickle makes it possible to serialize Python constructs not
19569 supported by the default pickle module from the Python standard library. It
19570 is especially useful for cluster computing where Python expressions are
19571 shipped over the network to execute on remote hosts, possibly close to the
19572 data.")
19573 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19574 (license license:bsd-3)))
19575
19576 (define-public python2-cloudpickle
19577 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19578 (package
19579 (inherit base)
19580 (native-inputs
19581 `(("python-mock" ,python2-mock)
19582 ,@(package-native-inputs base)))
19583 (propagated-inputs
19584 `(("python-futures" ,python2-futures)
19585 ,@(package-propagated-inputs base))))))
19586
19587 (define-public python-locket
19588 (package
19589 (name "python-locket")
19590 (version "0.2.0")
19591 (source
19592 (origin
19593 (method url-fetch)
19594 (uri (pypi-uri "locket" version))
19595 (sha256
19596 (base32
19597 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19598 (build-system python-build-system)
19599 (home-page "https://github.com/mwilliamson/locket.py")
19600 (synopsis "File-based locks for Python")
19601 (description
19602 "Locket implements a lock that can be used by multiple processes provided
19603 they use the same path.")
19604 (license license:bsd-2)))
19605
19606 (define-public python2-locket
19607 (package-with-python2 python-locket))
19608
19609 (define-public python-blosc
19610 (package
19611 (name "python-blosc")
19612 (version "1.5.1")
19613 (source
19614 (origin
19615 (method url-fetch)
19616 (uri (pypi-uri "blosc" version))
19617 (sha256
19618 (base32
19619 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19620 (build-system python-build-system)
19621 ;; FIXME: all tests pass, but then this error is printed:
19622 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19623 (arguments '(#:tests? #f))
19624 (propagated-inputs
19625 `(("python-numpy" ,python-numpy)))
19626 (home-page "https://github.com/blosc/python-blosc")
19627 (synopsis "Python wrapper for the Blosc data compressor library")
19628 (description "Blosc is a high performance compressor optimized for binary
19629 data. It has been designed to transmit data to the processor cache faster
19630 than the traditional, non-compressed, direct memory fetch approach via a
19631 @code{memcpy()} system call.
19632
19633 Blosc works well for compressing numerical arrays that contains data with
19634 relatively low entropy, like sparse data, time series, grids with
19635 regular-spaced values, etc.
19636
19637 This Python package wraps the Blosc library.")
19638 (license license:bsd-3)))
19639
19640 (define-public python2-blosc
19641 (package-with-python2 python-blosc))
19642
19643 (define-public python-partd
19644 (package
19645 (name "python-partd")
19646 (version "0.3.9")
19647 (source
19648 (origin
19649 (method url-fetch)
19650 (uri (pypi-uri "partd" version))
19651 (sha256
19652 (base32
19653 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19654 (build-system python-build-system)
19655 (propagated-inputs
19656 `(("python-blosc" ,python-blosc)
19657 ("python-locket" ,python-locket)
19658 ("python-numpy" ,python-numpy)
19659 ("python-pandas" ,python-pandas)
19660 ("python-pyzmq" ,python-pyzmq)
19661 ("python-toolz" ,python-toolz)))
19662 (home-page "https://github.com/dask/partd/")
19663 (synopsis "Appendable key-value storage")
19664 (description "Partd stores key-value pairs. Values are raw bytes. We
19665 append on old values. Partd excels at shuffling operations.")
19666 (license license:bsd-3)))
19667
19668 (define-public python2-partd
19669 (package-with-python2 python-partd))
19670
19671 (define-public python-fsspec
19672 (package
19673 (name "python-fsspec")
19674 (version "0.6.1")
19675 (source
19676 (origin
19677 (method url-fetch)
19678 (uri (pypi-uri "fsspec" version))
19679 (sha256
19680 (base32
19681 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19682 (build-system python-build-system)
19683 (arguments '(#:tests? #f)) ; there are none
19684 (home-page "https://github.com/intake/filesystem_spec")
19685 (synopsis "File-system specification")
19686 (description "The purpose of this package is to produce a template or
19687 specification for a file-system interface, that specific implementations
19688 should follow, so that applications making use of them can rely on a common
19689 behavior and not have to worry about the specific internal implementation
19690 decisions with any given backend.")
19691 (license license:bsd-3)))
19692
19693 (define-public python-dask
19694 (package
19695 (name "python-dask")
19696 (version "2.14.0")
19697 (source
19698 (origin
19699 (method url-fetch)
19700 (uri (pypi-uri "dask" version))
19701 (sha256
19702 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19703 (build-system python-build-system)
19704 (arguments
19705 `(#:phases
19706 (modify-phases %standard-phases
19707 (add-after 'unpack 'disable-broken-tests
19708 (lambda _
19709 ;; This test is marked as xfail when pytest-xdist is used.
19710 (substitute* "dask/tests/test_threaded.py"
19711 (("def test_interrupt\\(\\)" m)
19712 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19713 m)))
19714 ;; This one fails with a type error:
19715 ;; TypeError: Already tz-aware, use tz_convert to convert.
19716 (substitute* "dask/dataframe/tests/test_shuffle.py"
19717 (("def test_set_index_timestamp\\(\\)" m)
19718 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19719 m)))
19720 #t))
19721 (replace 'check
19722 (lambda _ (invoke "pytest" "-vv"))))))
19723 (propagated-inputs
19724 `(("python-cloudpickle" ,python-cloudpickle)
19725 ("python-fsspec" ,python-fsspec)
19726 ("python-numpy" ,python-numpy)
19727 ("python-packaging" ,python-packaging)
19728 ("python-pandas" ,python-pandas)
19729 ("python-partd" ,python-partd)
19730 ("python-toolz" ,python-toolz)
19731 ("python-pyyaml" ,python-pyyaml)))
19732 (native-inputs
19733 `(("python-pytest" ,python-pytest)
19734 ("python-pytest-runner" ,python-pytest-runner)))
19735 (home-page "https://github.com/dask/dask/")
19736 (synopsis "Parallel computing with task scheduling")
19737 (description
19738 "Dask is a flexible parallel computing library for analytics. It
19739 consists of two components: dynamic task scheduling optimized for computation,
19740 and large data collections like parallel arrays, dataframes, and lists that
19741 extend common interfaces like NumPy, Pandas, or Python iterators to
19742 larger-than-memory or distributed environments. These parallel collections
19743 run on top of the dynamic task schedulers. ")
19744 (license license:bsd-3)))
19745
19746 (define-public python-ilinkedlist
19747 (package
19748 (name "python-ilinkedlist")
19749 (version "0.4.0")
19750 (source
19751 (origin
19752 (method url-fetch)
19753 (uri (pypi-uri "ilinkedlist" version))
19754 (sha256
19755 (base32
19756 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19757 (build-system python-build-system)
19758 (native-inputs `(("python-pytest" ,python-pytest)))
19759 (inputs `(("python" ,python)))
19760 (home-page "https://github.com/luther9/ilinkedlist-py")
19761 (synopsis "Immutable linked list library")
19762 (description
19763 "This is a implementation of immutable linked lists for Python. It
19764 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19765 Since a linked list is treated as immutable, it is hashable, and its length
19766 can be retrieved in constant time. Some of the terminology is inspired by
19767 LISP. It is possible to create an improper list by creating a @code{Pair}
19768 with a non-list @code{cdr}.")
19769 (license license:gpl3+)))
19770
19771 (define-public python-readlike
19772 (package
19773 (name "python-readlike")
19774 (version "0.1.3")
19775 (source
19776 (origin
19777 (method url-fetch)
19778 (uri (pypi-uri "readlike" version))
19779 (sha256
19780 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19781 (build-system python-build-system)
19782 (home-page "https://github.com/jangler/readlike")
19783 (synopsis "GNU Readline-like line editing module")
19784 (description
19785 "This Python module provides line editing functions similar to the default
19786 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19787 @code{readline} package, this one allows access to those capabilities in settings
19788 outside of a standard command-line interface. It is especially well-suited to
19789 interfacing with Urwid, due to a shared syntax for describing key inputs.
19790
19791 Currently, all stateless Readline commands are implemented. Yanking and history
19792 are not supported.")
19793 (license license:expat)))
19794
19795 (define-public python2-readlike
19796 (package-with-python2 python-readlike))
19797
19798 (define-public python-reparser
19799 (package
19800 (name "python-reparser")
19801 (version "1.4.3")
19802 (source
19803 (origin
19804 (method url-fetch)
19805 (uri (pypi-uri "ReParser" version))
19806 (sha256
19807 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19808 (build-system python-build-system)
19809 (home-page "https://github.com/xmikos/reparser")
19810 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19811 (description
19812 "This Python library provides a simple lexer/parser for inline markup based
19813 on regular expressions.")
19814 (license license:expat)))
19815
19816 (define-public python2-reparser
19817 (let ((reparser (package-with-python2
19818 (strip-python2-variant python-reparser))))
19819 (package (inherit reparser)
19820 (propagated-inputs
19821 `(("python2-enum34" ,python2-enum34)
19822 ,@(package-propagated-inputs reparser))))))
19823
19824 (define-public python-retrying
19825 (package
19826 (name "python-retrying")
19827 (version "1.3.3")
19828 (source
19829 (origin
19830 (method git-fetch)
19831 (uri (git-reference
19832 (url "https://github.com/rholder/retrying")
19833 (commit (string-append "v" version))))
19834 (file-name (git-file-name name version))
19835 (sha256
19836 (base32
19837 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19838 (build-system python-build-system)
19839 (propagated-inputs
19840 `(("python-six" ,python-six)))
19841 (home-page "https://github.com/rholder/retrying")
19842 (synopsis "Library for adding retry behavior")
19843 (description "Retrying is a general-purpose retrying library to simplify
19844 the task of adding retry behavior to just about anything.
19845
19846 Features:
19847
19848 @itemize
19849 @item Generic Decorator API.
19850 @item Specify stop condition (i.e. limit by number of attempts).
19851 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19852 @item Customize retrying on Exceptions.
19853 @item Customize retrying on expected returned result.
19854 @end itemize")
19855 (license license:asl2.0)))
19856
19857 (define-public python-precis-i18n
19858 (package
19859 (name "python-precis-i18n")
19860 (version "1.0.0")
19861 (source
19862 (origin
19863 (method url-fetch)
19864 (uri (pypi-uri "precis_i18n" version))
19865 (sha256
19866 (base32
19867 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19868 (build-system python-build-system)
19869 (home-page "https://github.com/byllyfish/precis_i18n")
19870 (synopsis "Implementation of the PRECIS framework")
19871 (description
19872 "This module implements the PRECIS Framework as described in RFC 8264,
19873 RFC 8265 and RFC 8266.")
19874 (license license:expat)))
19875
19876 (define-public python-absl-py
19877 (package
19878 (name "python-absl-py")
19879 (version "0.6.1")
19880 (source
19881 (origin
19882 (method url-fetch)
19883 (uri (pypi-uri "absl-py" version))
19884 (sha256
19885 (base32
19886 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19887 (build-system python-build-system)
19888 (propagated-inputs
19889 `(("python-six" ,python-six)))
19890 (home-page "https://github.com/abseil/abseil-py")
19891 (synopsis "Abseil Python common libraries")
19892 (description
19893 "This package provides the Abseil Python Common Libraries, a collection
19894 of Python libraries for building Python applications.")
19895 (license license:asl2.0)))
19896
19897 (define-public python-astor
19898 (package
19899 (name "python-astor")
19900 (version "0.7.1")
19901 (source
19902 (origin
19903 (method url-fetch)
19904 (uri (pypi-uri "astor" version))
19905 (sha256
19906 (base32
19907 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19908 (build-system python-build-system)
19909 ;; FIXME: There are two errors and two test failures.
19910 (arguments `(#:tests? #f))
19911 (home-page "https://github.com/berkerpeksag/astor")
19912 (synopsis "Read and write Python ASTs")
19913 (description "Astor is designed to allow easy manipulation of Python
19914 source via the Abstract Syntax Tree.")
19915 (license license:bsd-3)))
19916
19917 (define-public python2-astor
19918 (package-with-python2 python-astor))
19919
19920 (define-public python-astunparse
19921 (package
19922 (name "python-astunparse")
19923 (version "1.6.2")
19924 (source
19925 (origin
19926 (method url-fetch)
19927 (uri (pypi-uri "astunparse" version))
19928 (sha256
19929 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19930 (build-system python-build-system)
19931 (arguments '(#:tests? #f)) ; there are none
19932 (propagated-inputs
19933 `(("python-six" ,python-six)
19934 ("python-wheel" ,python-wheel)))
19935 (home-page "https://github.com/simonpercivall/astunparse")
19936 (synopsis "AST unparser for Python")
19937 (description "This package provides an AST unparser for Python. It is a
19938 factored out version of @code{unparse} found in the Python source
19939 distribution.")
19940 (license license:bsd-3)))
19941
19942 (define-public python-gast
19943 (package
19944 (name "python-gast")
19945 (version "0.3.3")
19946 (source
19947 (origin
19948 (method url-fetch)
19949 (uri (pypi-uri "gast" version))
19950 (sha256
19951 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19952 (build-system python-build-system)
19953 (propagated-inputs
19954 `(("python-astunparse" ,python-astunparse)))
19955 (home-page "https://pypi.org/project/gast/")
19956 (synopsis "Generic Python AST that abstracts the underlying Python version")
19957 (description
19958 "GAST provides a compatibility layer between the AST of various Python
19959 versions, as produced by @code{ast.parse} from the standard @code{ast}
19960 module.")
19961 (license license:bsd-3)))
19962
19963 (define-public python-wikidata
19964 (package
19965 (name "python-wikidata")
19966 (version "0.6.1")
19967 (source
19968 (origin
19969 (method url-fetch)
19970 (uri (pypi-uri "Wikidata" version))
19971 (sha256
19972 (base32
19973 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19974 (build-system python-build-system)
19975 (propagated-inputs
19976 `(("python-babel" ,python-babel)))
19977 (home-page "https://github.com/dahlia/wikidata")
19978 (synopsis "Wikidata client library")
19979 (description
19980 "This package provides a Python interface to
19981 @url{https://www.wikidata.org/, Wikidata}.")
19982 (properties '((upstream-name . "Wikidata")))
19983 (license license:gpl3+)))
19984
19985 (define-public python-doctest-ignore-unicode
19986 (package
19987 (name "python-doctest-ignore-unicode")
19988 (version "0.1.2")
19989 (source
19990 (origin
19991 (method url-fetch)
19992 (uri (pypi-uri "doctest-ignore-unicode" version))
19993 (sha256
19994 (base32
19995 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19996 (build-system python-build-system)
19997 (native-inputs
19998 `(("python-nose" ,python-nose)))
19999 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
20000 (synopsis "Ignore Unicode literal prefixes in doctests")
20001 (description
20002 "This package adds support for a flag to ignore Unicode literal prefixes
20003 in doctests.")
20004 (license license:asl2.0)))
20005
20006 (define-public python-attr
20007 (package
20008 (name "python-attr")
20009 (version "0.3.1")
20010 (source
20011 (origin
20012 (method url-fetch)
20013 (uri (pypi-uri "attr" version))
20014 (sha256
20015 (base32
20016 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
20017 (build-system python-build-system)
20018 (home-page "https://github.com/denis-ryzhkov/attr")
20019 (synopsis "Decorator for attributes of target function or class")
20020 (description "Simple decorator to set attributes of target function or
20021 class in a @acronym{DRY, Don't Repeat Yourself} way.")
20022 (license license:expat)))
20023
20024 (define-public python-construct
20025 (package
20026 (name "python-construct")
20027 (version "2.10.56")
20028 (source
20029 (origin
20030 (method url-fetch)
20031 (uri (pypi-uri "construct" version))
20032 (sha256
20033 (base32
20034 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
20035 (build-system python-build-system)
20036 (arguments
20037 `(#:tests? #f)) ; No tests exist.
20038 (propagated-inputs
20039 `(("python-extras" ,python-extras)
20040 ("python-arrow" ,python-arrow)
20041 ("python-numpy" ,python-numpy)
20042 ("python-ruamel.yaml" ,python-ruamel.yaml)))
20043 (home-page "https://construct.readthedocs.io")
20044 (synopsis "Declarative and symmetrical parser and builder for binary data")
20045 (description
20046 "This package provides both simple, atomic constructs (such as
20047 integers of various sizes), as well as composite ones which allow you
20048 form hierarchical and sequential structures of increasing complexity.
20049 It features bit and byte granularity, easy debugging and testing, an
20050 easy-to-extend subclass system, and lots of primitive constructs to
20051 make your work easier.")
20052 (license license:expat)))
20053
20054 (define-public python-outcome
20055 (package
20056 (name "python-outcome")
20057 (version "1.0.1")
20058 (source
20059 (origin
20060 (method url-fetch)
20061 (uri (pypi-uri "outcome" version))
20062 (sha256
20063 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
20064 (build-system python-build-system)
20065 (arguments
20066 `(#:phases
20067 (modify-phases %standard-phases
20068 (replace 'check
20069 (lambda* (#:key inputs outputs #:allow-other-keys)
20070 (add-installed-pythonpath inputs outputs)
20071 (invoke "pytest" "-vv"))))))
20072 (native-inputs
20073 `(("python-pytest" ,python-pytest)
20074 ("python-pytest-cov" ,python-pytest-cov)
20075 ("python-pytest-asyncio" ,python-pytest-asyncio)))
20076 (propagated-inputs
20077 `(("python-async-generator" ,python-async-generator)
20078 ("python-attrs" ,python-attrs)))
20079 (home-page "https://github.com/python-trio/outcome")
20080 (synopsis "Capture the outcome of Python function calls")
20081 (description
20082 "Capture the outcome of Python function calls. Extracted from the Trio
20083 project.")
20084 ;; Either license applies.
20085 (license (list license:expat license:asl2.0))))
20086
20087 (define-public python-trio
20088 (package
20089 (name "python-trio")
20090 (version "0.17.0")
20091 (source
20092 (origin
20093 (method url-fetch)
20094 (uri (pypi-uri "trio" version))
20095 (sha256
20096 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
20097 (build-system python-build-system)
20098 (arguments
20099 `(#:phases
20100 (modify-phases %standard-phases
20101 (add-before 'check 'change-home
20102 (lambda _
20103 ;; Tests require a writable home.
20104 (setenv "HOME" "/tmp")
20105 #t))
20106 (replace 'check
20107 (lambda _
20108 (invoke "pytest" "-vv" "-k"
20109 (string-append
20110 ;; This test times out.
20111 "not test_ki_protection_works"
20112 ;; Assertion errors.
20113 " and not test_guest_mode_ki"
20114 " and not test_run_in_trio_thread_ki"
20115 ;; These try to raise KeyboardInterrupt which does not work
20116 ;; in the build environment.
20117 " and not test_ki_self"
20118 " and not test_ki_wakes_us_up"
20119 ;; Failure in name resolution.
20120 " and not test_getnameinfo"
20121 " and not test_SocketType_resolve"
20122 ;; OSError: protocol not found.
20123 " and not test_getprotobyname")))))))
20124 (native-inputs
20125 `(("python-astor" ,python-astor)
20126 ("python-ipython" ,python-ipython)
20127 ("python-jedi" ,python-jedi)
20128 ("python-pylint" ,python-pylint)
20129 ("python-pyopenssl" ,python-pyopenssl)
20130 ("python-pytest" ,python-pytest)
20131 ("python-pytest-cov" ,python-pytest-cov)
20132 ("python-trustme" ,python-trustme)))
20133 (propagated-inputs
20134 `(("python-attrs" ,python-attrs)
20135 ("python-idna" ,python-idna)
20136 ("python-outcome" ,python-outcome)
20137 ("python-sniffio" ,python-sniffio)
20138 ("python-sortedcontainers"
20139 ,python-sortedcontainers)))
20140 (home-page "https://github.com/python-trio/trio")
20141 (synopsis "Friendly Python library for async concurrency and I/O")
20142 (description
20143 "Trio strives to be a production-quality, async/await-native I/O library
20144 for Python. Like all async libraries, its main purpose is to help you write
20145 programs that do multiple things at the same time with parallelized I/O.")
20146 ;; Either license applies.
20147 (license (list license:expat license:asl2.0))))
20148
20149 (define-public python-trio-typing
20150 (package
20151 (name "python-trio-typing")
20152 (version "0.5.0")
20153 (source
20154 (origin
20155 (method url-fetch)
20156 (uri (pypi-uri "trio-typing" version))
20157 (sha256
20158 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
20159 (build-system python-build-system)
20160 (arguments
20161 `(#:phases
20162 (modify-phases %standard-phases
20163 (replace 'check
20164 (lambda _
20165 (invoke "pytest" "-vv"))))))
20166 (native-inputs
20167 `(("python-attrs" ,python-attrs)
20168 ("python-pytest" ,python-pytest)))
20169 (propagated-inputs
20170 `(("python-mypy" ,python-mypy)
20171 ("python-mypy-extensions"
20172 ,python-mypy-extensions)
20173 ("python-trio" ,python-trio)
20174 ("python-typing-extensions"
20175 ,python-typing-extensions)))
20176 (home-page "https://github.com/python-trio/trio-typing")
20177 (synopsis "Static type checking support for Trio and related projects")
20178 (description
20179 "This package provides:
20180
20181 @itemize
20182 @item PEP 561 typing stubs packages for the Trio project packages:
20183
20184 @itemize
20185 @item trio (@code{trio-stubs})
20186 @item outcome (@code{outcome-stubs})
20187 @item async_generator (@code{async_generator-stubs})
20188 @end itemize
20189
20190 @item A package @code{trio_typing} containing types that Trio programs often
20191 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20192 a mypy plugin that smooths over some limitations in the basic type hints.
20193 @end itemize")
20194 ;; Either license applies.
20195 (license (list license:expat license:asl2.0))))
20196
20197 (define-public python-humanize
20198 (package
20199 (name "python-humanize")
20200 (version "0.5.1")
20201 (source
20202 (origin
20203 (method url-fetch)
20204 (uri (pypi-uri "humanize" version))
20205 (sha256
20206 (base32
20207 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20208 (arguments
20209 '(#:tests? #f)) ; tests not in pypi archive
20210 (build-system python-build-system)
20211 (home-page "https://github.com/jmoiron/humanize")
20212 (synopsis "Print numerical information in a human-readable form")
20213 (description "This package provides a Python module that displays numbers
20214 and dates in \"human readable\" forms. For example, it would display
20215 \"12345591313\" as \"12.3 billion\".")
20216 (license license:expat)))
20217
20218 (define-public python-txaio
20219 (package
20220 (name "python-txaio")
20221 (version "18.8.1")
20222 (source
20223 (origin
20224 (method url-fetch)
20225 (uri (pypi-uri "txaio" version))
20226 (sha256
20227 (base32
20228 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20229 (build-system python-build-system)
20230 (propagated-inputs
20231 `(("python-twisted" ,python-twisted)
20232 ("python-six" ,python-six)))
20233 (home-page "https://github.com/crossbario/txaio")
20234 (synopsis "Compatibility layer between Python asyncio and Twisted")
20235 (description "Txaio provides a compatibility layer between the Python
20236 @code{asyncio} module and @code{Twisted}.")
20237 (license license:expat)))
20238
20239 (define-public python-toolshed
20240 (package
20241 (name "python-toolshed")
20242 (version "0.4.6")
20243 (source
20244 (origin
20245 (method url-fetch)
20246 (uri (pypi-uri "toolshed" version))
20247 (sha256
20248 (base32
20249 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20250 (build-system python-build-system)
20251 (native-inputs
20252 `(("python-nose" ,python-nose)))
20253 (home-page "https://github.com/brentp/toolshed/")
20254 (synopsis "Collection of modules and functions for working with data")
20255 (description "This is a collection of well-tested, simple modules and
20256 functions that aim to reduce boilerplate when working with data.")
20257 (license license:bsd-2)))
20258
20259 (define-public python-annoy
20260 (package
20261 (name "python-annoy")
20262 (version "1.15.1")
20263 (source
20264 (origin
20265 (method url-fetch)
20266 (uri (pypi-uri "annoy" version))
20267 (sha256
20268 (base32
20269 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20270 (build-system python-build-system)
20271 (native-inputs
20272 `(("python-nose" ,python-nose)))
20273 (home-page "https://github.com/spotify/annoy/")
20274 (synopsis "Approximate nearest neighbors library")
20275 (description
20276 "Annoy is a C++ library with Python bindings to search for points in
20277 space that are close to a given query point. It also creates large read-only
20278 file-based data structures that are @code{mmap}ped into memory so that many
20279 processes may share the same data.")
20280 (license license:asl2.0)))
20281
20282 (define-public python-croniter
20283 (package
20284 (name "python-croniter")
20285 (version "0.3.34")
20286 (source (origin
20287 (method url-fetch)
20288 (uri (pypi-uri "croniter" version))
20289 (sha256
20290 (base32
20291 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20292 (build-system python-build-system)
20293 (propagated-inputs
20294 `(("python-dateutil" ,python-dateutil)
20295 ("python-natsort" ,python-natsort)))
20296 (home-page "https://github.com/kiorky/croniter")
20297 (synopsis "Iterate datetime objects with cron-like syntax")
20298 (description
20299 "@code{croniter} provides iteration for datetime object with cron-like
20300 format.")
20301 (license license:expat)))
20302
20303 (define-public python-pylzma
20304 (package
20305 (name "python-pylzma")
20306 (version "0.5.0")
20307 (source
20308 (origin
20309 (method url-fetch)
20310 (uri (pypi-uri "pylzma" version))
20311 (sha256
20312 (base32
20313 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20314 (build-system python-build-system)
20315 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20316 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20317 (description "This package provides Python bindings for the LZMA library
20318 by Igor Pavlov.")
20319 (license license:lgpl2.1+)))
20320
20321 (define-public python2-pylzma
20322 (package-with-python2 python-pylzma))
20323
20324 (define-public python2-zeroconf
20325 (package
20326 (name "python2-zeroconf")
20327
20328 ;; This is the last version that supports Python 2.x.
20329 (version "0.19.1")
20330 (source
20331 (origin
20332 (method url-fetch)
20333 (uri (pypi-uri "zeroconf" version))
20334 (sha256
20335 (base32
20336 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20337 (build-system python-build-system)
20338 (arguments
20339 `(#:python ,python-2
20340 #:phases
20341 (modify-phases %standard-phases
20342 (add-after 'unpack 'patch-requires
20343 (lambda* (#:key inputs #:allow-other-keys)
20344 (substitute* "setup.py"
20345 (("enum-compat")
20346 "enum34"))
20347 #t)))))
20348 (native-inputs
20349 `(("python2-six" ,python2-six)
20350 ("python2-enum32" ,python2-enum34)
20351 ("python2-netifaces" ,python2-netifaces)
20352 ("python2-typing" ,python2-typing)))
20353 (home-page "https://github.com/jstasiak/python-zeroconf")
20354 (synopsis "Pure Python mDNS service discovery")
20355 (description
20356 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20357 compatible).")
20358 (license license:lgpl2.1+)))
20359
20360 (define-public python-bsddb3
20361 (package
20362 (name "python-bsddb3")
20363 (version "6.2.6")
20364 (source
20365 (origin
20366 (method url-fetch)
20367 (uri (pypi-uri "bsddb3" version))
20368 (sha256
20369 (base32
20370 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20371 (build-system python-build-system)
20372 (inputs
20373 `(("bdb" ,bdb)))
20374 (arguments
20375 '(#:phases
20376 (modify-phases %standard-phases
20377 (add-after 'unpack 'configure-locations
20378 (lambda* (#:key inputs #:allow-other-keys)
20379 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20380 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20381 #t))
20382 (replace 'check
20383 (lambda _
20384 (invoke "python3" "test3.py" "-v"))))))
20385 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20386 (synopsis "Python bindings for Oracle Berkeley DB")
20387 (description
20388 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20389 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20390 Transaction objects, and each of these is exposed as a Python type in the
20391 bsddb3.db module. The database objects can use various access methods: btree,
20392 hash, recno, and queue. Complete support of Berkeley DB distributed
20393 transactions. Complete support for Berkeley DB Replication Manager.
20394 Complete support for Berkeley DB Base Replication. Support for RPC.")
20395 (license license:bsd-3)))
20396
20397 (define-public python-dbfread
20398 (package
20399 (name "python-dbfread")
20400 (version "2.0.7")
20401 (source (origin
20402 (method url-fetch)
20403 (uri (pypi-uri "dbfread" version))
20404 (sha256
20405 (base32
20406 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20407 (build-system python-build-system)
20408 (native-inputs
20409 `(("python-pytest" ,python-pytest)))
20410 (home-page "https://dbfread.readthedocs.io")
20411 (synopsis "Read DBF Files with Python")
20412 (description
20413 "This library reads DBF files and returns the data as native Python data
20414 types for further processing. It is primarily intended for batch jobs and
20415 one-off scripts.")
20416 (license license:expat)))
20417
20418 (define-public python-cached-property
20419 (package
20420 (name "python-cached-property")
20421 (version "1.5.1")
20422 (source
20423 (origin
20424 (method url-fetch)
20425 (uri (pypi-uri "cached-property" version))
20426 (sha256
20427 (base32
20428 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20429 (build-system python-build-system)
20430 (arguments
20431 `(#:phases
20432 (modify-phases %standard-phases
20433 ;; https://github.com/pydanny/cached-property/issues/131
20434 ;; recent versions of freezegun break one test
20435 (add-after 'unpack 'disable-broken-test
20436 (lambda _
20437 (substitute* "tests/test_cached_property.py"
20438 (("def test_threads_ttl_expiry\\(self\\)" m)
20439 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20440 " " m)))
20441 #t)))))
20442 (native-inputs
20443 `(("python-freezegun" ,python-freezegun)))
20444 (home-page
20445 "https://github.com/pydanny/cached-property")
20446 (synopsis
20447 "Decorator for caching properties in classes")
20448 (description
20449 "This package provides a decorator which makes caching
20450 time-or-computationally-expensive properties quick and easy and works in Python
20451 2 or 3.")
20452 (license license:bsd-3)))
20453
20454 (define-public python-folium
20455 (package
20456 (name "python-folium")
20457 (version "0.11.0")
20458 (source
20459 (origin
20460 (method url-fetch)
20461 (uri (pypi-uri "folium" version))
20462 (sha256
20463 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20464 (build-system python-build-system)
20465 (propagated-inputs
20466 `(("python-branca" ,python-branca)
20467 ("python-jinja2" ,python-jinja2)
20468 ("python-numpy" ,python-numpy)
20469 ("python-requests" ,python-requests)))
20470 (native-inputs
20471 `(("python-pytest" ,python-pytest)))
20472 (home-page "https://github.com/python-visualization/folium")
20473 (synopsis "Make beautiful maps with Leaflet.js & Python")
20474 (description "@code{folium} makes it easy to visualize data that’s been
20475 manipulated in Python on an interactive leaflet map. It enables both the
20476 binding of data to a map for @code{choropleth} visualizations as well as
20477 passing rich vector/raster/HTML visualizations as markers on the map.
20478
20479 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20480 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20481 supports Image, Video, GeoJSON and TopoJSON overlays.")
20482 (license license:expat)))
20483
20484 (define-public jube
20485 (package
20486 ;; This is a command-line tool, so no "python-" prefix.
20487 (name "jube")
20488 (version "2.2.2")
20489 (source (origin
20490 (method url-fetch)
20491 (uri (string-append
20492 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20493 version))
20494 (sha256
20495 (base32
20496 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20497 (file-name (string-append "jube-" version ".tar.gz"))))
20498 (build-system python-build-system)
20499 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20500 (synopsis "Benchmarking environment")
20501 (description
20502 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20503 benchmarked application, benchmark data is stored in a format that allows JUBE
20504 to deduct the desired information. This data can be parsed by automatic pre-
20505 and post-processing scripts that draw information and store it more densely
20506 for manual interpretation.")
20507 (license license:gpl3+)))
20508
20509 (define-public python-pyroutelib3
20510 (package
20511 (name "python-pyroutelib3")
20512 (version "1.3.post1")
20513 (source
20514 (origin
20515 (method url-fetch)
20516 (uri (pypi-uri "pyroutelib3" version))
20517 (sha256
20518 (base32
20519 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20520 (build-system python-build-system)
20521 (propagated-inputs
20522 `(("python-dateutil" ,python-dateutil)))
20523 (home-page "https://github.com/MKuranowski/pyroutelib3")
20524 (synopsis "Library for simple routing on OSM data")
20525 (description "Library for simple routing on OSM data")
20526 (license license:gpl3+)))
20527
20528 (define-public python-bibtexparser
20529 (package
20530 (name "python-bibtexparser")
20531 (version "1.1.0")
20532 (source
20533 (origin
20534 (method url-fetch)
20535 (uri (pypi-uri "bibtexparser" version))
20536 (sha256
20537 (base32
20538 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20539 (build-system python-build-system)
20540 (propagated-inputs
20541 `(("python-pyparsing" ,python-pyparsing)))
20542 (native-inputs
20543 `(("python-future" ,python-future)))
20544 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20545 (synopsis "Python library to parse BibTeX files")
20546 (description "BibtexParser is a Python library to parse BibTeX files.")
20547 (license (list license:bsd-3 license:lgpl3))))
20548
20549 (define-public python-distro
20550 (package
20551 (name "python-distro")
20552 (version "1.4.0")
20553 (source
20554 (origin
20555 (method url-fetch)
20556 (uri (pypi-uri "distro" version))
20557 (sha256
20558 (base32
20559 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20560 (build-system python-build-system)
20561 (native-inputs
20562 `(("python-pytest" ,python-pytest)))
20563 (home-page "https://github.com/nir0s/distro")
20564 (synopsis
20565 "OS platform information API")
20566 (description
20567 "@code{distro} provides information about the OS distribution it runs on,
20568 such as a reliable machine-readable ID, or version information.
20569
20570 It is the recommended replacement for Python's original
20571 `platform.linux_distribution` function (which will be removed in Python 3.8).
20572 @code{distro} also provides a command-line interface to output the platform
20573 information in various formats.")
20574 (license license:asl2.0)))
20575
20576 (define-public python-cairosvg
20577 (package
20578 (name "python-cairosvg")
20579 (version "2.5.0")
20580 (source
20581 (origin
20582 (method url-fetch)
20583 (uri (pypi-uri "CairoSVG" version))
20584 (sha256
20585 (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
20586 (build-system python-build-system)
20587 (arguments
20588 `(#:phases
20589 (modify-phases %standard-phases
20590 (replace 'check
20591 (lambda _ (invoke "pytest"))))))
20592 (propagated-inputs
20593 `(("python-cairocffi" ,python-cairocffi)
20594 ("python-cssselect2" ,python-cssselect2)
20595 ("python-defusedxml" ,python-defusedxml)
20596 ("python-pillow" ,python-pillow)
20597 ("python-tinycss2" ,python-tinycss2)))
20598 (native-inputs
20599 `(("python-pytest-flake8" ,python-pytest-flake8)
20600 ("python-pytest-isort" ,python-pytest-isort)
20601 ("python-pytest-runner" ,python-pytest-runner)))
20602 (home-page "https://cairosvg.org/")
20603 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20604 (description "CairoSVG is a SVG converter based on Cairo. It can export
20605 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20606 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20607 parsed, the result is drawn to a Cairo surface that can be exported to
20608 qvarious formats: PDF, PostScript, PNG and even SVG.")
20609 (license license:lgpl3+)))
20610
20611 (define-public python-pyphen
20612 (package
20613 (name "python-pyphen")
20614 (version "0.10.0")
20615 (source
20616 (origin
20617 (method url-fetch)
20618 (uri (pypi-uri "Pyphen" version))
20619 (sha256
20620 (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
20621 (build-system python-build-system)
20622 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20623 ;; embedded set provided by upstream - like Debian does.
20624 (home-page "https://github.com/Kozea/Pyphen")
20625 (synopsis "Pure Python module to hyphenate text")
20626 (description "Pyphen is a pure Python module to hyphenate text using
20627 existing Hunspell hyphenation dictionaries.")
20628 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20629
20630 (define-public python-intelhex
20631 (package
20632 (name "python-intelhex")
20633 (version "2.2.1")
20634 (source
20635 (origin
20636 (method url-fetch)
20637 (uri (pypi-uri "intelhex" version))
20638 (sha256
20639 (base32
20640 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20641 (build-system python-build-system)
20642 (arguments '(#:tests? #f)) ;issue with version
20643 (home-page "https://pypi.org/project/IntelHex/")
20644 (synopsis "Python library for Intel HEX files manipulations")
20645 (description "The Intel HEX file format is widely used in microprocessors
20646 and microcontrollers area (embedded systems etc.) as the de facto standard for
20647 representation of code to be programmed into microelectronic devices. This
20648 package provides an intelhex Python library to read, write, create from
20649 scratch and manipulate data from Intel HEX file format. It also includes
20650 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20651 converters and more, those based on the library itself.")
20652 (license license:bsd-3)))
20653
20654 (define-public python-pykwalify
20655 (package
20656 (name "python-pykwalify")
20657 (version "1.7.0")
20658 (source
20659 (origin
20660 (method url-fetch)
20661 (uri (pypi-uri "pykwalify" version))
20662 (sha256
20663 (base32
20664 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20665 (build-system python-build-system)
20666 (arguments '(#:tests? #f)) ;missing dependencies
20667 (propagated-inputs
20668 `(("python-dateutil" ,python-dateutil)
20669 ("python-docopt" ,python-docopt)
20670 ("python-pyyaml" ,python-pyyaml)))
20671 (home-page "https://github.com/grokzen/pykwalify")
20672 (synopsis
20673 "Python lib/cli for JSON/YAML schema validation")
20674 (description
20675 "This package provides a parser, schema validator, and data binding tool
20676 for YAML and JSON.")
20677 (license license:expat)))
20678
20679 (define-public python-dbusmock
20680 (package
20681 (name "python-dbusmock")
20682 (version "0.18.3")
20683 (source
20684 (origin
20685 (method url-fetch)
20686 (uri (pypi-uri "python-dbusmock" version))
20687 (sha256
20688 (base32
20689 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20690 (build-system python-build-system)
20691 (arguments
20692 '(#:phases
20693 (modify-phases %standard-phases
20694 (add-after 'unpack 'patch-shell-path
20695 (lambda _
20696 (substitute* "tests/test_code.py"
20697 (("/bin/bash") (which "bash")))
20698 #t)))))
20699 (native-inputs
20700 `(;; For tests.
20701 ("dbus" ,dbus) ; for dbus-daemon
20702 ("python-nose" ,python-nose)
20703 ("which" ,which)))
20704 (propagated-inputs
20705 `(("python-dbus" ,python-dbus)
20706 ("python-pygobject" ,python-pygobject)))
20707 (home-page "https://github.com/martinpitt/python-dbusmock")
20708 (synopsis "Python library for mock D-Bus objects")
20709 (description "python-dbusmock allows for the easy creation of mock objects on
20710 D-Bus. This is useful for writing tests for software which talks to D-Bus
20711 services such as upower, systemd, logind, gnome-session or others, and it is
20712 hard (or impossible without root privileges) to set the state of the real
20713 services to what you expect in your tests.")
20714 (license license:lgpl3+)))
20715
20716 (define-public python-jsonplus
20717 (package
20718 (name "python-jsonplus")
20719 (version "0.8.0")
20720 (home-page "https://github.com/randomir/jsonplus")
20721 (source (origin
20722 (method url-fetch)
20723 (uri (pypi-uri "jsonplus" version))
20724 (sha256
20725 (base32
20726 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20727 (build-system python-build-system)
20728 ;; XXX: No tests on PyPI, and the repository has no tags.
20729 (arguments '(#:tests? #f))
20730 (propagated-inputs
20731 `(("python-dateutil" ,python-dateutil)
20732 ("python-simplejson" ,python-simplejson)
20733 ("python-sortedcontainers" ,python-sortedcontainers)))
20734 (synopsis "Serialize Python types to/from JSON")
20735 (description
20736 "This package provides functionality to serialize arbitrary data types
20737 to and from JSON. Common data types are implemented and it is easy to
20738 register custom encoders and decoders.")
20739 (license license:expat)))
20740
20741 (define-public python-ujson
20742 (package
20743 (name "python-ujson")
20744 (version "4.0.1")
20745 (source
20746 (origin
20747 (method url-fetch)
20748 (uri (pypi-uri "ujson" version))
20749 (sha256
20750 (base32
20751 "1lr9lbm76y3ah1463jggwg2hjcb709mpns5f752wxxbgnd0n5kr6"))
20752 (modules '((guix build utils)))
20753 (snippet
20754 '(begin (delete-file-recursively "deps") #t))))
20755 (build-system python-build-system)
20756 (arguments
20757 `(#:phases
20758 (modify-phases %standard-phases
20759 (add-after 'unpack 'link-to-system-double-conversion
20760 (lambda* (#:key inputs #:allow-other-keys)
20761 (let ((d-c (assoc-ref inputs "double-conversion")))
20762 (substitute* "setup.py"
20763 (("./deps/double-conversion/double-conversion\"")
20764 (string-append d-c "/include/double-conversion\""))
20765 (("-lstdc++" stdc)
20766 (string-append "-L" d-c "/lib\","
20767 " \"-ldouble-conversion\","
20768 " \"" stdc)))
20769 #t)))
20770 (replace 'check
20771 (lambda* (#:key inputs outputs #:allow-other-keys)
20772 (add-installed-pythonpath inputs outputs)
20773 (invoke "pytest"))))))
20774 (native-inputs
20775 `(("double-conversion" ,double-conversion)
20776 ("python-setuptools-scm" ,python-setuptools-scm)
20777 ("python-pytest" ,python-pytest)))
20778 (home-page "https://github.com/ultrajson/ultrajson")
20779 (synopsis "Ultra fast JSON encoder and decoder for Python")
20780 (description
20781 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20782 bindings for Python 3.")
20783 (license license:bsd-3)))
20784
20785 (define-public python-iocapture
20786 ;; The latest release is more than a year older than this commit.
20787 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20788 (revision "1"))
20789 (package
20790 (name "python-iocapture")
20791 (version "0.1.2")
20792 (source
20793 (origin
20794 (method git-fetch)
20795 (uri (git-reference
20796 (url "https://github.com/oinume/iocapture")
20797 (commit commit)))
20798 (file-name (git-file-name name version))
20799 (sha256
20800 (base32
20801 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20802 (build-system python-build-system)
20803 (arguments
20804 `(#:phases
20805 (modify-phases %standard-phases
20806 (delete 'check)
20807 (add-after 'install 'check
20808 (lambda* (#:key inputs outputs #:allow-other-keys)
20809 (add-installed-pythonpath inputs outputs)
20810 (invoke "py.test" "-v" "tests")
20811 #t)))))
20812 (propagated-inputs
20813 `(("python-flexmock" ,python-flexmock)
20814 ("python-pytest" ,python-pytest)
20815 ("python-pytest-cov" ,python-pytest-cov)
20816 ("python-six" ,python-six)))
20817 (home-page "https://github.com/oinume/iocapture")
20818 (synopsis "Python capturing tool for stdout and stderr")
20819 (description
20820 "This package helps you to capture the standard out (stdout) and the
20821 standard error channel (stderr) in your program.")
20822 (license license:expat))))
20823
20824 (define-public python-argh
20825 ;; There are 21 commits since the latest release containing important
20826 ;; improvements.
20827 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20828 (revision "1"))
20829 (package
20830 (name "python-argh")
20831 (version (git-version "0.26.2" revision commit))
20832 (source
20833 (origin
20834 (method git-fetch)
20835 (uri (git-reference
20836 (url "https://github.com/neithere/argh")
20837 (commit commit)))
20838 (file-name (git-file-name name version))
20839 (sha256
20840 (base32
20841 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20842 (build-system python-build-system)
20843 (propagated-inputs
20844 `(("python-iocapture" ,python-iocapture)
20845 ("python-mock" ,python-mock)
20846 ("python-pytest" ,python-pytest)
20847 ("python-pytest-cov" ,python-pytest-cov)
20848 ("python-pytest-xdist" ,python-pytest-xdist)
20849 ("python-tox" ,python-tox)))
20850 (home-page "https://github.com/neithere/argh/")
20851 (synopsis "Argparse wrapper with natural syntax")
20852 (description
20853 "python-argh is a small library that provides several layers of
20854 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20855 always possible to declare a command with the highest possible (and least
20856 flexible) layer and then tune the behaviour with any of the lower layers
20857 including the native API of @code{python-argparse}.")
20858 (license license:lgpl3+))))
20859
20860 (define-public python-ppft
20861 (package
20862 (name "python-ppft")
20863 (version "1.6.6.1")
20864 (source
20865 (origin
20866 (method url-fetch)
20867 (uri (pypi-uri "ppft" version))
20868 (sha256
20869 (base32
20870 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20871 (build-system python-build-system)
20872 (arguments '(#:tests? #f)) ; there are none
20873 (propagated-inputs
20874 `(("python-six" ,python-six)))
20875 (home-page "https://pypi.org/project/ppft/")
20876 (synopsis "Fork of Parallel Python")
20877 (description
20878 "This package is a fork of Parallel Python. The Parallel Python
20879 module (@code{pp}) provides an easy and efficient way to create
20880 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20881 computers and clusters. It features cross-platform portability and dynamic
20882 load balancing.")
20883 (license license:bsd-3)))
20884
20885 (define-public python-pox
20886 (package
20887 (name "python-pox")
20888 (version "0.2.7")
20889 (source
20890 (origin
20891 (method url-fetch)
20892 (uri (pypi-uri "pox" version))
20893 (sha256
20894 (base32
20895 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20896 (build-system python-build-system)
20897 (arguments
20898 `(#:phases
20899 (modify-phases %standard-phases
20900 (replace 'check
20901 (lambda _
20902 (mkdir-p "/tmp/guix")
20903 (setenv "SHELL" "bash")
20904 (setenv "USERNAME" "guix")
20905 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20906 (invoke "py.test" "-vv")
20907 #t)))))
20908 (native-inputs
20909 `(("python-pytest" ,python-pytest)
20910 ("which" ,which)))
20911 (home-page "https://pypi.org/project/pox/")
20912 (synopsis "Python utilities for file system exploration and automated builds")
20913 (description
20914 "Pox provides a collection of utilities for navigating and manipulating
20915 file systems. This module is designed to facilitate some of the low-level
20916 operating system interactions that are useful when exploring a file system on a
20917 remote host. Pox provides Python equivalents of several shell commands such
20918 as @command{which} and @command{find}. These commands allow automated
20919 discovery of what has been installed on an operating system, and where the
20920 essential tools are located.")
20921 (license license:bsd-3)))
20922
20923 (define-public python-pathos
20924 (package
20925 (name "python-pathos")
20926 (version "0.2.5")
20927 (source
20928 (origin
20929 (method url-fetch)
20930 (uri (pypi-uri "pathos" version))
20931 (sha256
20932 (base32
20933 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20934 (build-system python-build-system)
20935 (arguments
20936 '(#:phases
20937 (modify-phases %standard-phases
20938 (replace 'check
20939 (lambda _
20940 (setenv "PYTHONPATH"
20941 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20942 (invoke "python" "./tests/__main__.py"))))))
20943 (propagated-inputs
20944 `(("python-dill" ,python-dill)
20945 ("python-multiprocess" ,python-multiprocess)
20946 ("python-pox" ,python-pox)
20947 ("python-ppft" ,python-ppft)))
20948 (native-inputs
20949 `(("python-pytest" ,python-pytest)))
20950 (home-page "https://pypi.org/project/pathos/")
20951 (synopsis
20952 "Parallel graph management and execution in heterogeneous computing")
20953 (description
20954 "Python-pathos is a framework for heterogeneous computing. It provides a
20955 consistent high-level interface for configuring and launching parallel
20956 computations across heterogeneous resources. Python-pathos provides configurable
20957 launchers for parallel and distributed computing, where each launcher contains
20958 the syntactic logic to configure and launch jobs in an execution environment.")
20959 (license license:bsd-3)))
20960
20961 (define-public python-flit
20962 (package
20963 (name "python-flit")
20964 (version "3.0.0")
20965 (source
20966 (origin
20967 (method url-fetch)
20968 (uri (pypi-uri "flit" version))
20969 (sha256
20970 (base32
20971 "14q8qa48bli2mniznc8b54qkwvhbik4kw99y01fi5gzzl620zzml"))))
20972 (build-system python-build-system)
20973 (arguments
20974 `(#:tests? #f)) ; XXX: Check requires network access.
20975 (home-page "https://flit.readthedocs.io/")
20976 (synopsis
20977 "Simple packaging tool for simple packages")
20978 (description
20979 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20980 packages a single importable module or package at a time, using the import
20981 name as the name on PyPI. All subpackages and data files within a package
20982 are included automatically.")
20983 (license license:bsd-3)))
20984
20985 (define-public python-pathtools
20986 (package
20987 (name "python-pathtools")
20988 (version "0.1.2")
20989 (source
20990 (origin
20991 (method url-fetch)
20992 (uri (pypi-uri "pathtools" version))
20993 (sha256
20994 (base32
20995 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20996 (build-system python-build-system)
20997 (home-page
20998 "https://github.com/gorakhargosh/pathtools")
20999 (synopsis "Path utilities for Python")
21000 (description "Pattern matching and various utilities for file systems
21001 paths.")
21002 (license license:expat)))
21003
21004 (define-public python-fastentrypoints
21005 (package
21006 (name "python-fastentrypoints")
21007 (version "0.12")
21008 (source
21009 (origin
21010 (method url-fetch)
21011 (uri (pypi-uri "fastentrypoints" version))
21012 (sha256
21013 (base32
21014 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
21015 (build-system python-build-system)
21016 (home-page
21017 "https://github.com/ninjaaron/fast-entry_points")
21018 (synopsis
21019 "Makes entry_points specified in setup.py load more quickly")
21020 (description
21021 "Using entry_points in your setup.py makes scripts that start really
21022 slowly because it imports pkg_resources. This package allows such setup
21023 scripts to load entry points more quickly.")
21024 (license license:bsd-3)))
21025
21026 (define-public python-funcparserlib
21027 (package
21028 (name "python-funcparserlib")
21029 (version "0.3.6")
21030 (source
21031 (origin
21032 (method url-fetch)
21033 (uri (pypi-uri "funcparserlib" version))
21034 (sha256
21035 (base32
21036 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
21037 (native-inputs
21038 `(("python-tox" ,python-tox)))
21039 (arguments
21040 `(#:phases
21041 (modify-phases %standard-phases
21042 (replace 'check
21043 (lambda _
21044 (invoke "tox"))))))
21045 (build-system python-build-system)
21046 (home-page
21047 "https://github.com/vlasovskikh/funcparserlib")
21048 (synopsis
21049 "Recursive descent parsing library based on functional combinators")
21050 (description
21051 "This package is a recursive descent parsing library for Python based on
21052 functional combinators. Parser combinators are just higher-order functions
21053 that take parsers as their arguments and return them as result values.")
21054 (license license:expat)))
21055
21056 (define-public python-speg
21057 (package
21058 (name "python-speg")
21059 (version "0.3")
21060 (source
21061 (origin
21062 (method url-fetch)
21063 (uri (pypi-uri "speg" version ".zip"))
21064 (sha256
21065 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
21066 (arguments
21067 `(#:tests? #f)) ;FIXME: tests fail, not sure why
21068 (native-inputs
21069 `(("unzip" ,unzip)))
21070 (build-system python-build-system)
21071 (home-page "https://github.com/avakar/speg")
21072 (synopsis "PEG-based parser interpreter with memoization")
21073 (description "This package is a PEG-based parser and interpreter with
21074 memoization.")
21075 (license license:expat)))
21076
21077 (define-public python-cson
21078 (package
21079 (name "python-cson")
21080 (version "0.8")
21081 (source
21082 (origin
21083 (method url-fetch)
21084 (uri (pypi-uri "cson" version))
21085 (sha256
21086 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
21087 (build-system python-build-system)
21088 (propagated-inputs
21089 `(("python-speg" ,python-speg)))
21090 (home-page "https://github.com/avakar/pycson")
21091 (synopsis "Parser for Coffeescript Object Notation (CSON)")
21092 (description "This package is a parser for Coffeescript Object
21093 Notation (CSON).")
21094 (license license:expat)))
21095
21096 (define-public python-asynctest
21097 (package
21098 (name "python-asynctest")
21099 (version "0.13.0")
21100 (source
21101 (origin
21102 (method url-fetch)
21103 (uri (pypi-uri "asynctest" version))
21104 (sha256
21105 (base32
21106 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
21107 (build-system python-build-system)
21108 (arguments
21109 '(#:phases
21110 (modify-phases %standard-phases
21111 (replace 'check
21112 (lambda _
21113 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
21114 (add-after 'unpack 'disable-tests
21115 (lambda* _
21116 ;; XXX: 7 tests fail out of 220. Disable them for now.
21117 (substitute* (list "test/test_selector.py"
21118 "test/test_mock.py")
21119 (("def test_events_watched_outside_test_are_ignored")
21120 "@unittest.skip('disabled by guix')
21121 def test_events_watched_outside_test_are_ignored")
21122 (("def test_awaited_from_autospec_mock.*" line)
21123 (string-append line " return True\n"))
21124 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
21125 (string-append line " return True\n"))
21126 (("def test_patch_coroutine_with_multiple_scopes.*" line)
21127 (string-append line " return True\n"))
21128 (("def test_multiple_patches_on_coroutine.*" line)
21129 (string-append line " return True\n"))
21130 (("def test_patch_coroutine_only_when_running.*" line)
21131 (string-append line " return True\n")))
21132 #t)))))
21133 (home-page "https://github.com/Martiusweb/asynctest")
21134 (synopsis "Extension of unittest for testing asyncio libraries")
21135 (description
21136 "The package asynctest is built on top of the standard unittest module
21137 and cuts down boilerplate code when testing libraries for asyncio.")
21138 (license license:asl2.0)))
21139
21140 (define-public python-aionotify
21141 (package
21142 (name "python-aionotify")
21143 (version "0.2.0")
21144 (source
21145 (origin
21146 ;; Source tarball on PyPi lacks tests
21147 (method git-fetch)
21148 (uri (git-reference
21149 (url "https://github.com/rbarrois/aionotify")
21150 (commit (string-append "v" version))))
21151 (file-name (git-file-name name version))
21152 (sha256
21153 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21154 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21155 (build-system python-build-system)
21156 (home-page "https://github.com/rbarrois/aionotify")
21157 (synopsis "Asyncio-powered inotify library")
21158 (description
21159 "@code{aionotify} is a simple, asyncio-based inotify library.")
21160 (license license:bsd-3)))
21161
21162 (define-public python-forbiddenfruit
21163 (package
21164 (name "python-forbiddenfruit")
21165 (version "0.1.3")
21166 (source
21167 (origin
21168 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21169 (method git-fetch)
21170 (uri (git-reference
21171 (url "https://github.com/clarete/forbiddenfruit")
21172 (commit version)))
21173 (file-name (git-file-name name version))
21174 (sha256
21175 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21176 (build-system python-build-system)
21177 (arguments
21178 '(#:phases
21179 (modify-phases %standard-phases
21180 (replace 'check
21181 (lambda _
21182 (invoke "make" "SKIP_DEPS=1"))))))
21183 (native-inputs
21184 `(("python-nose" ,python-nose)
21185 ("python-coverage" ,python-coverage)))
21186 (home-page "https://github.com/clarete/forbiddenfruit")
21187 (synopsis "Patch python built-in objects")
21188 (description "This project allows Python code to extend built-in types.")
21189 (license (list license:gpl3+ license:expat))))
21190
21191 (define-public python-shouldbe
21192 (package
21193 (name "python-shouldbe")
21194 (version "0.1.2")
21195 (source
21196 (origin
21197 (method url-fetch)
21198 (uri (pypi-uri "shouldbe" version))
21199 (sha256
21200 (base32
21201 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21202 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21203 (build-system python-build-system)
21204 (propagated-inputs
21205 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21206 (native-inputs
21207 `(("python-nose" ,python-nose)))
21208 (home-page "https://github.com/directxman12/should_be")
21209 (synopsis "Python Assertion Helpers inspired by Shouldly")
21210 (description
21211 "Python Assertion Helpers inspired by Shouldly.")
21212 (license license:isc)))
21213
21214 (define-public python-k5test
21215 (package
21216 (name "python-k5test")
21217 (version "0.9.2")
21218 (source
21219 (origin
21220 (method url-fetch)
21221 (uri (pypi-uri "k5test" version))
21222 (sha256
21223 (base32
21224 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21225 (build-system python-build-system)
21226 (propagated-inputs
21227 `(("python-six" ,python-six)
21228 ;; `which`, `kadmin.local` binaries called inside library
21229 ("which" ,which)
21230 ("mit-krb5" ,mit-krb5)))
21231 (native-inputs `(("mit-krb5" ,mit-krb5)))
21232 (arguments
21233 '(#:phases
21234 (modify-phases %standard-phases
21235 (add-after 'unpack 'patch-paths
21236 (lambda* _
21237 (substitute* "k5test/realm.py"
21238 (("'kadmin_local'") "'kadmin.local'")))))))
21239 (home-page "https://github.com/pythongssapi/k5test")
21240 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21241 (description
21242 "@code{k5test} is a library for setting up self-contained Kerberos 5
21243 environments, and running Python unit tests inside those environments. It is
21244 based on the file of the same name found alongside the MIT Kerberos 5 unit
21245 tests.")
21246 (license license:isc)))
21247
21248 (define-public python-gssapi
21249 (package
21250 (name "python-gssapi")
21251 (version "1.6.9")
21252 (source
21253 (origin
21254 (method url-fetch)
21255 (uri (pypi-uri "gssapi" version))
21256 (sha256
21257 (base32
21258 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21259 (build-system python-build-system)
21260 (arguments
21261 `(#:phases
21262 (modify-phases %standard-phases
21263 ;; Work around
21264 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21265 (add-before 'check 'disable-failing-tests
21266 (lambda _
21267 (let ((reason "Disabled failing test (see: \
21268 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21269 (substitute* "gssapi/tests/test_high_level.py"
21270 ((".*def test_add_with_impersonate.*" all)
21271 (string-append all " self.skipTest('" reason "')\n")))
21272 (substitute* "gssapi/tests/test_raw.py"
21273 ((".*def test_.*impersonate_name.*" all)
21274 (string-append all " self.skipTest('" reason "')\n")))
21275 #t))))))
21276 (propagated-inputs
21277 `(("python-decorator" ,python-decorator)
21278 ("python-six" ,python-six)))
21279 (inputs
21280 `(("mit-krb5" ,mit-krb5)))
21281 ;; for tests
21282 (native-inputs
21283 `(("python-shouldbe" ,python-shouldbe)
21284 ("python-parameterized" ,python-parameterized)
21285 ("python-k5test" ,python-k5test)
21286 ("python-nose" ,python-nose)))
21287 (home-page "https://github.com/pythongssapi/python-gssapi")
21288 (synopsis "Python GSSAPI Wrapper")
21289 (description
21290 "Python-GSSAPI provides both low-level and high level wrappers around the
21291 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21292 also be usable with other GSSAPI mechanisms.")
21293 (license license:isc)))
21294
21295 (define-public python-check-manifest
21296 (package
21297 (name "python-check-manifest")
21298 (version "0.37")
21299 (source
21300 (origin
21301 (method url-fetch)
21302 (uri (pypi-uri "check-manifest" version))
21303 (sha256
21304 (base32
21305 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21306 (build-system python-build-system)
21307 (native-inputs
21308 `(("python-mock" ,python-mock)
21309 ("git" ,git)))
21310 (home-page "https://github.com/mgedmin/check-manifest")
21311 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21312 (description "Python package can include a MANIFEST.in file to help with
21313 sending package files to the Python Package Index. This package checks that
21314 file to ensure it completely and accurately describes your project.")
21315 (license license:expat)))
21316
21317 (define-public python-android-stringslib
21318 (package
21319 (name "python-android-stringslib")
21320 (version "0.1.2")
21321 (source
21322 (origin
21323 (method git-fetch)
21324 (uri (git-reference
21325 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21326 (commit (string-append "v" version))))
21327 (file-name (git-file-name name version))
21328 (sha256
21329 (base32
21330 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21331 (build-system python-build-system)
21332 (arguments
21333 `(#:tests? #f))
21334 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21335 (synopsis "Android strings.xml support")
21336 (description "Android Strings Lib provides support for android's strings.xml
21337 files. These files are used to translate strings in android apps.")
21338 (license license:expat)))
21339
21340 (define-public python-watchdog
21341 (package
21342 (name "python-watchdog")
21343 (version "0.9.0")
21344 (source
21345 (origin
21346 (method url-fetch)
21347 (uri (pypi-uri "watchdog" version))
21348 (sha256
21349 (base32
21350 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21351 (build-system python-build-system)
21352 (arguments
21353 `(#:phases
21354 (modify-phases %standard-phases
21355 (add-before 'check 'remove-failing
21356 (lambda _
21357 (delete-file "tests/test_inotify_buffer.py")
21358 (delete-file "tests/test_snapshot_diff.py")
21359 #t)))))
21360 (propagated-inputs
21361 `(("python-argh" ,python-argh)
21362 ("python-pathtools" ,python-pathtools)
21363 ("python-pyyaml" ,python-pyyaml)))
21364 (native-inputs
21365 `(("python-pytest-cov" ,python-pytest-cov)
21366 ("python-pytest-timeout" ,python-pytest-timeout)))
21367 (home-page "https://github.com/gorakhargosh/watchdog")
21368 (synopsis "File system events monitoring")
21369 (description "This package provides a way to monitor file system events
21370 such as a file modification and trigger an action. This is similar to inotify,
21371 but portable.")
21372 (license license:asl2.0)))
21373
21374 (define-public python-watchgod
21375 (package
21376 (name "python-watchgod")
21377 (version "0.6")
21378 (source
21379 (origin
21380 ;; There are no tests in the PyPI tarball.
21381 (method git-fetch)
21382 (uri (git-reference
21383 (url "https://github.com/samuelcolvin/watchgod")
21384 (commit (string-append "v" version))))
21385 (file-name (git-file-name name version))
21386 (sha256
21387 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21388 (build-system python-build-system)
21389 (arguments
21390 `(#:phases
21391 (modify-phases %standard-phases
21392 (replace 'check
21393 (lambda _
21394 (invoke "pytest" "-vv"))))))
21395 (native-inputs
21396 `(("python-coverage" ,python-coverage)
21397 ("python-docutils" ,python-docutils)
21398 ("python-flake8" ,python-flake8)
21399 ("python-isort" ,python-isort)
21400 ("python-pycodestyle" ,python-pycodestyle)
21401 ("python-pyflakes" ,python-pyflakes)
21402 ("python-pygments" ,python-pygments)
21403 ("python-pytest" ,python-pytest)
21404 ("python-pytest-cov" ,python-pytest-cov)
21405 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21406 ("python-pytest-mock" ,python-pytest-mock)
21407 ("python-pytest-sugar" ,python-pytest-sugar)
21408 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21409 (home-page "https://github.com/samuelcolvin/watchgod")
21410 (synopsis "Simple, modern file watching and code reload in Python")
21411 (description
21412 "Simple, modern file watching and code reload in Python inspired by
21413 @code{watchdog}. Among the differences are a unified approach for each
21414 operating systems and an elegant approach to concurrency using threading.")
21415 (license license:expat)))
21416
21417 (define-public python-wget
21418 (package
21419 (name "python-wget")
21420 (version "3.2")
21421 (source
21422 (origin
21423 (method url-fetch)
21424 (uri (pypi-uri "wget" version ".zip"))
21425 (sha256
21426 (base32
21427 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21428 (build-system python-build-system)
21429 (native-inputs `(("unzip" ,unzip)))
21430 (home-page "https://bitbucket.org/techtonik/python-wget/")
21431 (synopsis "Pure Python download utility")
21432 (description "The python-wget library provides an API to download files
21433 with features similar to the @command{wget} utility.")
21434 (license license:unlicense)))
21435
21436 (define-public offlate
21437 (package
21438 (name "offlate")
21439 (version "0.5")
21440 (source
21441 (origin
21442 (method git-fetch)
21443 (uri (git-reference
21444 (url "https://framagit.org/tyreunom/offlate")
21445 (commit version)))
21446 (file-name (git-file-name name version))
21447 (sha256
21448 (base32
21449 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21450 (build-system python-build-system)
21451 (arguments
21452 ;; No tests
21453 `(#:tests? #f))
21454 (propagated-inputs
21455 `(("python-android-stringslib" ,python-android-stringslib)
21456 ("python-dateutil" ,python-dateutil)
21457 ("python-gitlab" ,python-gitlab)
21458 ("python-lxml" ,python-lxml)
21459 ("python-polib" ,python-polib)
21460 ("python-pyenchant" ,python-pyenchant)
21461 ("python-pygit2" ,python-pygit2)
21462 ("python-pygithub" ,python-pygithub)
21463 ("python-pyqt" ,python-pyqt)
21464 ("python-requests" ,python-requests)
21465 ("python-ruamel.yaml" ,python-ruamel.yaml)
21466 ("python-translation-finder" ,python-translation-finder)
21467 ("python-watchdog" ,python-watchdog)))
21468 (native-inputs
21469 `(("qttools" ,qttools)))
21470 (home-page "https://framagit.org/tyreunom/offlate")
21471 (synopsis "Offline translation interface for online translation tools")
21472 (description "Offlate offers a unified interface for different translation
21473 file formats, as well as many different online translation platforms. You can
21474 use it to get work from online platforms, specialized such as the Translation
21475 Project, or not such a gitlab instance when your upstream doesn't use any
21476 dedicated platform. The tool proposes a unified interface for any format and
21477 an upload option to send your work back to the platform.")
21478 (license license:gpl3+)))
21479
21480 (define-public python-titlecase
21481 (package
21482 (name "python-titlecase")
21483 (version "0.12.0")
21484 (source
21485 (origin
21486 (method url-fetch)
21487 (uri (pypi-uri "titlecase" version))
21488 (sha256
21489 (base32
21490 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21491 (build-system python-build-system)
21492 (native-inputs
21493 `(("python-nose" ,python-nose)))
21494 (home-page "https://github.com/ppannuto/python-titlecase")
21495 (synopsis "Capitalize strings similar to book titles")
21496 (description
21497 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21498 It capitalizes (predominantly English) strings in a way that is similar to
21499 book titles, using the New York Times Manual of Style to leave certain words
21500 lowercase.")
21501 (license license:expat)))
21502
21503 (define-public python-pypng
21504 (package
21505 (name "python-pypng")
21506 (version "0.0.20")
21507 (source
21508 (origin
21509 (method url-fetch)
21510 (uri (pypi-uri "pypng" version))
21511 (sha256
21512 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21513 (build-system python-build-system)
21514 (home-page "https://github.com/drj11/pypng")
21515 (synopsis "Pure Python PNG image encoder/decoder")
21516 (description
21517 "The PyPNG module implements support for PNG images. It reads and writes
21518 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21519 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21520 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21521 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21522 A number of optional chunks can be specified (when writing) and
21523 understood (when reading): tRNS, bKGD, gAMA.
21524
21525 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21526 aim at being a replacement or competitor. Its strength lies in fine-grained
21527 extensive support of PNG features. It can also read and write Netpbm PAM
21528 files, with a focus on its use as an intermediate format for implementing
21529 custom PNG processing.")
21530 (license license:expat)))
21531
21532 (define-public python-fuzzywuzzy
21533 (package
21534 (name "python-fuzzywuzzy")
21535 (version "0.18.0")
21536 (source
21537 (origin
21538 (method url-fetch)
21539 (uri (pypi-uri "fuzzywuzzy" version))
21540 (sha256
21541 (base32
21542 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21543 (build-system python-build-system)
21544 (native-inputs
21545 `(("python-hypothesis" ,python-hypothesis)
21546 ("python-pycodestyle" ,python-pycodestyle)
21547 ("python-pytest" ,python-pytest)))
21548 (propagated-inputs
21549 `(("python-levenshtein" ,python-levenshtein)))
21550 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21551 (synopsis "Fuzzy string matching in Python")
21552 (description "Approximate string matching using
21553 @emph{Levenshtein Distance} to calculate the differences between
21554 sequences.")
21555 (license license:gpl2)))
21556
21557 (define-public python2-fuzzywuzzy
21558 (package-with-python2 python-fuzzywuzzy))
21559
21560 (define-public python-block-tracing
21561 (package
21562 (name "python-block-tracing")
21563 (version "1.0.1")
21564 (source
21565 (origin
21566 (method url-fetch)
21567 (uri (pypi-uri "block_tracing" version))
21568 (sha256
21569 (base32
21570 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21571 (build-system python-build-system)
21572 (arguments '(#:tests? #f)) ; no tests
21573 (home-page "https://github.com/rianhunter/block_tracing")
21574 (synopsis "Protect process memory")
21575 (description
21576 "@code{block_tracing} is a tiny Python library that can be used to
21577 prevent debuggers and other applications from inspecting the memory within
21578 your process.")
21579 (license license:expat)))
21580
21581 (define-public python-gcovr
21582 (package
21583 (name "python-gcovr")
21584 (version "4.2")
21585 (source
21586 (origin
21587 (method url-fetch)
21588 (uri (pypi-uri "gcovr" version))
21589 (sha256
21590 (base32
21591 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21592 (build-system python-build-system)
21593 (propagated-inputs
21594 `(("python-lxml" ,python-lxml)
21595 ("python-jinja2" ,python-jinja2)))
21596 (home-page "https://gcovr.com/")
21597 (synopsis "Utility for generating code coverage results")
21598 (description
21599 "Gcovr provides a utility for managing the use of the GNU gcov
21600 utility and generating summarized code coverage results. It is inspired
21601 by the Python coverage.py package, which provides a similar utility for
21602 Python.")
21603 (license license:bsd-3)))
21604
21605 (define-public python-owslib
21606 (package
21607 (name "python-owslib")
21608 (version "0.19.2")
21609 (source
21610 (origin
21611 (method url-fetch)
21612 (uri (pypi-uri "OWSLib" version))
21613 (sha256
21614 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21615 (build-system python-build-system)
21616 (arguments
21617 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21618 (synopsis "Interface for Open Geospatial Consortium web service")
21619 (description
21620 "OWSLib is a Python package for client programming with Open Geospatial
21621 Consortium (OGC) web service (hence OWS) interface standards, and their related
21622 content models.")
21623 (home-page "https://geopython.github.io/OWSLib/")
21624 (license license:bsd-3)))
21625
21626 (define-public python-docusign-esign
21627 (package
21628 (name "python-docusign-esign")
21629 (version "3.1.0")
21630 (source (origin
21631 (method url-fetch)
21632 (uri (pypi-uri "docusign_esign" version))
21633 (sha256
21634 (base32
21635 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21636 (build-system python-build-system)
21637 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21638 (arguments `(#:tests? #f))
21639 (propagated-inputs
21640 `(("python-certifi" ,python-certifi)
21641 ("python-six" ,python-six)
21642 ("python-dateutil" ,python-dateutil)
21643 ("python-urllib3" ,python-urllib3)
21644 ("python-pyjwt" ,python-pyjwt)
21645 ("python-cryptography" ,python-cryptography)
21646 ("python-nose" ,python-nose)))
21647 (synopsis "DocuSign Python Client")
21648 (description "The Official DocuSign Python Client Library used to interact
21649 with the eSign REST API. Send, sign, and approve documents using this client.")
21650 (home-page "https://www.docusign.com/devcenter")
21651 (license license:expat)))
21652
21653 (define-public python-xattr
21654 (package
21655 (name "python-xattr")
21656 (version "0.9.7")
21657 (source
21658 (origin
21659 (method url-fetch)
21660 (uri (pypi-uri "xattr" version))
21661 (sha256
21662 (base32
21663 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21664 (build-system python-build-system)
21665 (propagated-inputs
21666 `(("python-cffi" ,python-cffi)))
21667 (home-page "https://github.com/xattr/xattr")
21668 (synopsis
21669 "Python wrapper for extended file system attributes")
21670 (description "This package provides a Python wrapper for using extended
21671 file system attributes. Extended attributes extend the basic attributes of files
21672 and directories in the file system. They are stored as name:data pairs
21673 associated with file system objects (files, directories, symlinks, etc).")
21674 (license license:expat)))
21675
21676 (define-public python-json-logger
21677 (package
21678 (name "python-json-logger")
21679 (version "0.1.11")
21680 (source
21681 (origin
21682 (method url-fetch)
21683 (uri (pypi-uri "python-json-logger" version))
21684 (sha256
21685 (base32
21686 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21687 (build-system python-build-system)
21688 (home-page
21689 "https://github.com/madzak/python-json-logger")
21690 (synopsis "JSON log formatter in Python")
21691 (description "This library allows standard Python logging to output log data
21692 as JSON objects. With JSON we can make our logs more readable by machines and
21693 we can stop writing custom parsers for syslog-type records.")
21694 (license license:bsd-3)))
21695
21696 (define-public python-daiquiri
21697 (package
21698 (name "python-daiquiri")
21699 (version "2.1.1")
21700 (source
21701 (origin
21702 (method url-fetch)
21703 (uri (pypi-uri "daiquiri" version))
21704 (sha256
21705 (base32
21706 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21707 (build-system python-build-system)
21708 (propagated-inputs
21709 `(("python-json-logger" ,python-json-logger)))
21710 (native-inputs
21711 `(("python-mock" ,python-mock)
21712 ("python-pytest" ,python-pytest)
21713 ("python-setuptools-scm" ,python-setuptools-scm)
21714 ("python-six" ,python-six)))
21715 (home-page "https://github.com/jd/daiquiri")
21716 (synopsis
21717 "Library to configure Python logging easily")
21718 (description "The daiquiri library provides an easy way to configure
21719 logging in Python. It also provides some custom formatters and handlers.")
21720 (license license:asl2.0)))
21721
21722 (define-public python-pifpaf
21723 (package
21724 (name "python-pifpaf")
21725 (version "2.5.0")
21726 (source
21727 (origin
21728 (method url-fetch)
21729 (uri (pypi-uri "pifpaf" version))
21730 (sha256
21731 (base32
21732 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21733 (build-system python-build-system)
21734 (arguments
21735 '(#:phases
21736 (modify-phases %standard-phases
21737 (replace 'check
21738 (lambda _
21739 (invoke "python" "setup.py" "testr" "--slowest"
21740 "--testr-args=until-failure"))))))
21741 (propagated-inputs
21742 `(("python-click" ,python-click)
21743 ("python-daiquiri" ,python-daiquiri)
21744 ("python-fixtures" ,python-fixtures)
21745 ("python-jinja2" ,python-jinja2)
21746 ("python-pbr" ,python-pbr)
21747 ("python-psutil" ,python-psutil)
21748 ("python-six" ,python-six)
21749 ("python-xattr" ,python-xattr)))
21750 (native-inputs
21751 `(("python-mock" ,python-mock)
21752 ("python-os-testr" ,python-os-testr)
21753 ("python-requests" ,python-requests)
21754 ("python-testrepository" ,python-testrepository)
21755 ("python-testtools" ,python-testtools)))
21756 (home-page "https://github.com/jd/pifpaf")
21757 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21758 (description "Pifpaf is a suite of fixtures and a command-line tool that
21759 starts and stops daemons for a quick throw-away usage. This is typically
21760 useful when needing these daemons to run integration testing. It originally
21761 evolved from its precursor @code{overtest}.")
21762 (license license:asl2.0)))
21763
21764 (define-public python-pytest-check-links
21765 (package
21766 (name "python-pytest-check-links")
21767 (version "0.3.0")
21768 (source
21769 (origin
21770 (method url-fetch)
21771 ;; URI uses underscores
21772 (uri (pypi-uri "pytest_check_links" version))
21773 (sha256
21774 (base32
21775 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21776 (build-system python-build-system)
21777 (propagated-inputs
21778 `(("python-docutils" ,python-docutils)
21779 ("python-html5lib" ,python-html5lib)
21780 ("python-nbconvert" ,python-nbconvert)
21781 ("python-nbformat" ,python-nbformat)
21782 ("python-pytest" ,python-pytest)
21783 ("python-six" ,python-six)))
21784 (native-inputs
21785 `(("python-pbr-minimal" ,python-pbr-minimal)))
21786 (home-page "https://github.com/minrk/pytest-check-links")
21787 (synopsis "Check links in files")
21788 (description "This package provides a pytest plugin that checks URLs for
21789 HTML-containing files.")
21790 (license license:bsd-3)))
21791
21792 (define-public python-json5
21793 (package
21794 (name "python-json5")
21795 (version "0.8.5")
21796 (source
21797 (origin
21798 ;; sample.json5 is missing from PyPi source tarball
21799 (method git-fetch)
21800 (uri (git-reference
21801 (url "https://github.com/dpranke/pyjson5")
21802 (commit (string-append "v" version))))
21803 (file-name (git-file-name name version))
21804 (sha256
21805 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21806 (build-system python-build-system)
21807 (home-page "https://github.com/dpranke/pyjson5")
21808 (synopsis
21809 "Python implementation of the JSON5 data format")
21810 (description
21811 "JSON5 extends the JSON data interchange format to make it slightly more
21812 usable as a configuration language. This Python package implements parsing and
21813 dumping of JSON5 data structures.")
21814 (license license:asl2.0)))
21815
21816 (define-public python-frozendict
21817 (package
21818 (name "python-frozendict")
21819 (version "1.2")
21820 (source
21821 (origin
21822 (method url-fetch)
21823 (uri (pypi-uri "frozendict" version))
21824 (sha256
21825 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21826 (build-system python-build-system)
21827 (home-page "https://github.com/slezica/python-frozendict")
21828 (synopsis "Simple immutable mapping for Python")
21829 (description
21830 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21831 implements the complete mapping interface. It can be used as a drop-in
21832 replacement for dictionaries where immutability is desired.")
21833 (license license:expat)))
21834
21835 (define-public python-unpaddedbase64
21836 (package
21837 (name "python-unpaddedbase64")
21838 (version "1.1.0")
21839 (source
21840 (origin
21841 (method git-fetch)
21842 (uri (git-reference
21843 (url "https://github.com/matrix-org/python-unpaddedbase64")
21844 (commit (string-append "v" version))))
21845 (file-name (git-file-name name version))
21846 (sha256
21847 (base32
21848 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21849 (build-system python-build-system)
21850 (home-page "https://pypi.org/project/unpaddedbase64/")
21851 (synopsis "Encode and decode Base64 without “=” padding")
21852 (description
21853 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21854 using “=” characters. However this conveys no benefit so many protocols
21855 choose to use Base64 without the “=” padding.")
21856 (license license:asl2.0)))
21857
21858 (define-public python-py-cpuinfo
21859 (package
21860 (name "python-py-cpuinfo")
21861 (version "5.0.0")
21862 (source
21863 (origin
21864 (method url-fetch)
21865 (uri (pypi-uri "py-cpuinfo" version))
21866 (sha256
21867 (base32
21868 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21869 (build-system python-build-system)
21870 (home-page "https://github.com/workhorsy/py-cpuinfo")
21871 (synopsis "Get CPU info with Python")
21872 (description
21873 "This Python module returns the CPU info by using the best sources of
21874 information for your operating system.")
21875 (license license:expat)))
21876
21877 (define-public python-canonicaljson
21878 (package
21879 (name "python-canonicaljson")
21880 (version "1.4.0")
21881 (source
21882 (origin
21883 (method url-fetch)
21884 (uri (pypi-uri "canonicaljson" version))
21885 (sha256
21886 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21887 (build-system python-build-system)
21888 (propagated-inputs
21889 `(("python-six" ,python-six)
21890 ("python-frozendict" ,python-frozendict)
21891 ("python-simplejson" ,python-simplejson)))
21892 (home-page "https://github.com/matrix-org/python-canonicaljson")
21893 (synopsis "Canonical JSON")
21894 (description
21895 "Deterministically encode JSON.
21896
21897 @itemize
21898 @item Encodes objects and arrays as RFC 7159 JSON.
21899 @item Sorts object keys so that you get the same result each time.
21900 @item Has no insignificant whitespace to make the output as small as possible.
21901 @item Escapes only the characters that must be escaped, U+0000 to
21902 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21903 @item Uses the shortest escape sequence for each escaped character.
21904 @item Encodes the JSON as UTF-8.
21905 @item Can encode frozendict immutable dictionaries.
21906 @end itemize")
21907 (license license:asl2.0)))
21908
21909 (define-public python-signedjson
21910 (package
21911 (name "python-signedjson")
21912 (version "1.1.1")
21913 (source
21914 (origin
21915 (method url-fetch)
21916 (uri (pypi-uri "signedjson" version))
21917 (sha256
21918 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21919 (build-system python-build-system)
21920 (propagated-inputs
21921 `(("python-canonicaljson" ,python-canonicaljson)
21922 ("python-importlib-metadata" ,python-importlib-metadata)
21923 ("python-pynacl" ,python-pynacl)
21924 ("python-typing-extensions" ,python-typing-extensions)
21925 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21926 (native-inputs
21927 `(("python-setuptools-scm" ,python-setuptools-scm)))
21928 (home-page "https://github.com/matrix-org/python-signedjson")
21929 (synopsis "Sign JSON objects with ED25519 signatures")
21930 (description
21931 "Sign JSON objects with ED25519 signatures.
21932
21933 @itemize
21934 @item More than one entity can sign the same object.
21935 @item Each entity can sign the object with more than one key making it easier to
21936 rotate keys
21937 @item ED25519 can be replaced with a different algorithm.
21938 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21939 key.
21940 @end itemize")
21941 (license license:asl2.0)))
21942
21943 (define-public python-daemonize
21944 (package
21945 (name "python-daemonize")
21946 (version "2.5.0")
21947 (source
21948 (origin
21949 (method url-fetch)
21950 (uri (pypi-uri "daemonize" version))
21951 (sha256
21952 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21953 (build-system python-build-system)
21954 (home-page "https://github.com/thesharp/daemonize")
21955 (synopsis "Library for writing system daemons in Python")
21956 (description "Daemonize is a library for writing system daemons in Python.")
21957 (license license:expat)))
21958
21959 (define-public python-pymacaroons
21960 (package
21961 (name "python-pymacaroons")
21962 (version "0.13.0")
21963 (source
21964 (origin
21965 (method url-fetch)
21966 (uri (pypi-uri "pymacaroons" version))
21967 (sha256
21968 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21969 (build-system python-build-system)
21970 (propagated-inputs
21971 `(("python-six" ,python-six)
21972 ("python-pynacl" ,python-pynacl)))
21973 (home-page "https://github.com/ecordell/pymacaroons")
21974 (synopsis "Python Macaroon Library")
21975 (description
21976 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21977 tokens, macaroons embed caveats that define specific authorization
21978 requirements for the target service, the service that issued the root macaroon
21979 and which is capable of verifying the integrity of macaroons it receives.
21980
21981 Macaroons allow for delegation and attenuation of authorization. They are
21982 simple and fast to verify, and decouple authorization policy from the
21983 enforcement of that policy.")
21984 (license license:expat)))
21985
21986 (define-public python-ldap3
21987 (package
21988 (name "python-ldap3")
21989 (version "2.7")
21990 (home-page "https://github.com/cannatag/ldap3")
21991 (source
21992 (origin
21993 (method git-fetch)
21994 (uri (git-reference (url home-page)
21995 (commit (string-append "v" version))))
21996 (file-name (git-file-name name version))
21997 (sha256
21998 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21999 (build-system python-build-system)
22000 (arguments
22001 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
22002 #:phases (modify-phases %standard-phases
22003 (replace 'check
22004 (lambda* (#:key tests? #:allow-other-keys)
22005 (when tests?
22006 (invoke "nosetests" "-s" "test"))
22007 #t)))))
22008 (native-inputs
22009 `(("python-nose" ,python-nose)))
22010 (propagated-inputs
22011 `(("python-gssapi" ,python-gssapi)
22012 ("python-pyasn1" ,python-pyasn1)))
22013 (synopsis "Python LDAP client")
22014 (description
22015 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
22016 library.")
22017 (license license:lgpl3+)))
22018
22019 (define-public python-boltons
22020 (package
22021 (name "python-boltons")
22022 (version "20.0.0")
22023 (source
22024 (origin
22025 (method url-fetch)
22026 (uri (pypi-uri "boltons" version))
22027 (sha256
22028 (base32
22029 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
22030 (build-system python-build-system)
22031 (home-page "https://github.com/mahmoud/boltons")
22032 (synopsis "Extensions to the Python standard library")
22033 (description
22034 "Boltons is a set of over 230 pure-Python utilities in the same spirit
22035 as — and yet conspicuously missing from — the standard library, including:
22036
22037 @itemize
22038 @item Atomic file saving, bolted on with fileutils
22039 @item A highly-optimized OrderedMultiDict, in dictutils
22040 @item Two types of PriorityQueue, in queueutils
22041 @item Chunked and windowed iteration, in iterutils
22042 @item Recursive data structure iteration and merging, with iterutils.remap
22043 @item Exponential backoff functionality, including jitter, through
22044 iterutils.backoff
22045 @item A full-featured TracebackInfo type, for representing stack traces, in
22046 tbutils
22047 @end itemize")
22048 (license license:bsd-3)))
22049
22050 (define-public python-eliot
22051 (package
22052 (name "python-eliot")
22053 (version "1.12.0")
22054 (source
22055 (origin
22056 (method url-fetch)
22057 (uri (pypi-uri "eliot" version))
22058 (sha256
22059 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
22060 (build-system python-build-system)
22061 (arguments
22062 `(#:phases
22063 (modify-phases %standard-phases
22064 (add-after 'unpack 'remove-journald-support
22065 (lambda _
22066 (for-each delete-file
22067 '("eliot/tests/test_journald.py"
22068 "eliot/journald.py"))
22069 #t))
22070 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
22071 ;; remove command-line tool's tests. TODO eliot-prettyprint should
22072 ;; be installed and these tests should pass.
22073 (lambda _
22074 (delete-file "eliot/tests/test_prettyprint.py")
22075 #t)))))
22076 (propagated-inputs
22077 `(("python-boltons" ,python-boltons)
22078 ("python-pyrsistent" ,python-pyrsistent)
22079 ("python-six" ,python-six)
22080 ("python-zope-interface" ,python-zope-interface)))
22081 (native-inputs
22082 `(("python-black" ,python-black)
22083 ("python-coverage" ,python-coverage)
22084 ("python-dask" ,python-dask)
22085 ("python-flake8" ,python-flake8)
22086 ("python-hypothesis" ,python-hypothesis)
22087 ("python-pytest" ,python-pytest)
22088 ("python-setuptools" ,python-setuptools)
22089 ("python-sphinx" ,python-sphinx)
22090 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22091 ("python-testtools" ,python-testtools)
22092 ("python-twine" ,python-twine)
22093 ("python-twisted" ,python-twisted)))
22094 (home-page "https://github.com/itamarst/eliot/")
22095 (synopsis "Eliot: the logging system that tells you why it happened")
22096 (description
22097 "@dfn{eliot} is a Python logging system that outputs causal chains of
22098 actions: actions can spawn other actions, and eventually they either succeed
22099 or fail. The resulting logs tell you the story of what your software did: what
22100 happened, and what caused it.")
22101 (license license:asl2.0)))
22102
22103 (define-public python-pem
22104 (package
22105 (name "python-pem")
22106 (version "20.1.0")
22107 (source
22108 (origin
22109 (method url-fetch)
22110 (uri (pypi-uri "pem" version))
22111 (sha256
22112 (base32
22113 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
22114 (build-system python-build-system)
22115 (native-inputs
22116 `(("python-certifi" ,python-certifi)
22117 ("python-coverage" ,python-coverage)
22118 ("python-pretend" ,python-pretend)
22119 ("python-pyopenssl" ,python-pyopenssl)
22120 ("python-pytest" ,python-pytest)
22121 ("python-sphinx" ,python-sphinx)
22122 ("python-twisted" ,python-twisted)))
22123 (home-page "https://pem.readthedocs.io/")
22124 (synopsis "Easy PEM file parsing in Python")
22125 (description
22126 "This package provides a Python module for parsing and splitting PEM files.")
22127 (license license:expat)))
22128
22129 (define-public python-txsni
22130 ;; We need a few commits on top of 0.1.9 for compatibility with newer
22131 ;; Python and OpenSSL.
22132 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
22133 (revision "0"))
22134 (package
22135 (name "python-txsni")
22136 (version (git-version "0.1.9" revision commit))
22137 (home-page "https://github.com/glyph/txsni")
22138 (source
22139 (origin
22140 (method git-fetch)
22141 (uri (git-reference (url home-page) (commit commit)))
22142 (file-name (git-file-name name version))
22143 (sha256
22144 (base32
22145 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
22146 (build-system python-build-system)
22147 (propagated-inputs
22148 `(("python-pyopenssl" ,python-pyopenssl)
22149 ("python-service-identity" ,python-service-identity)
22150 ("python-twisted" ,python-twisted)))
22151 (synopsis "Run TLS servers with Twisted")
22152 (description
22153 "This package provides an easy-to-use SNI endpoint for use
22154 with the Twisted web framework.")
22155 (license license:expat))))
22156
22157 (define-public python-txacme
22158 (package
22159 (name "python-txacme")
22160 (version "0.9.2")
22161 (source
22162 (origin
22163 (method url-fetch)
22164 (uri (pypi-uri "txacme" version))
22165 (sha256
22166 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22167 (build-system python-build-system)
22168 (propagated-inputs
22169 `(("python-acme" ,python-acme)
22170 ("python-attrs" ,python-attrs)
22171 ("python-eliot" ,python-eliot)
22172 ("python-josepy" ,python-josepy)
22173 ("python-pem" ,python-pem)
22174 ("python-treq" ,python-treq)
22175 ("python-twisted" ,python-twisted)
22176 ("python-txsni" ,python-txsni)))
22177 (native-inputs
22178 `(("python-fixtures" ,python-fixtures)
22179 ("python-hypothesis" ,python-hypothesis)
22180 ("python-mock" ,python-mock)
22181 ("python-service-identity"
22182 ,python-service-identity)
22183 ("python-testrepository" ,python-testrepository)
22184 ("python-testscenarios" ,python-testscenarios)
22185 ("python-testtools" ,python-testtools)))
22186 (home-page "https://github.com/twisted/txacme")
22187 (synopsis "Twisted implexmentation of the ACME protocol")
22188 (description
22189 "ACME is Automatic Certificate Management Environment, a protocol that
22190 allows clients and certificate authorities to automate verification and
22191 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22192 Certificate Authority.
22193
22194 txacme is an implementation of the protocol for Twisted, the event-driven
22195 networking engine for Python.")
22196 (license license:expat)))
22197
22198 (define-public python-pysaml2
22199 (package
22200 (name "python-pysaml2")
22201 (version "5.0.0")
22202 (source
22203 (origin
22204 (method url-fetch)
22205 (uri (pypi-uri "pysaml2" version))
22206 (sha256
22207 (base32
22208 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22209 (build-system python-build-system)
22210 (propagated-inputs
22211 `(("python-cryptography" ,python-cryptography)
22212 ("python-dateutil" ,python-dateutil)
22213 ("python-defusedxml" ,python-defusedxml)
22214 ("python-pyopenssl" ,python-pyopenssl)
22215 ("python-pytz" ,python-pytz)
22216 ("python-requests" ,python-requests)
22217 ("python-six" ,python-six)))
22218 (home-page "https://idpy.org")
22219 (synopsis "Python implementation of SAML Version 2 Standard")
22220 (description
22221 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22222 It contains all necessary pieces for building a SAML2 service provider or
22223 an identity provider. The distribution contains examples of both.
22224
22225 This package was originally written to work in a WSGI environment, but
22226 there are extensions that allow you to use it with other frameworks.")
22227 (license license:asl2.0)))
22228
22229 (define-public python-click-plugins
22230 (package
22231 (name "python-click-plugins")
22232 (version "1.1.1")
22233 (source
22234 (origin
22235 (method url-fetch)
22236 (uri (pypi-uri "click-plugins" version))
22237 (sha256
22238 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22239 (build-system python-build-system)
22240 (native-inputs
22241 `(("python-pytest" ,python-pytest)))
22242 (propagated-inputs
22243 `(("python-click" ,python-click)))
22244 (synopsis "Extension for Click to register external CLI commands")
22245 (description "This package provides n extension module for Click to
22246 register external CLI commands via setuptools entry-points.")
22247 (home-page "https://github.com/click-contrib/click-plugins")
22248 (license license:bsd-3)))
22249
22250 (define-public python-diceware
22251 (package
22252 (name "python-diceware")
22253 (version "0.9.6")
22254 (source
22255 (origin
22256 (method url-fetch)
22257 (uri (pypi-uri "diceware" version))
22258 (sha256
22259 (base32
22260 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22261 (build-system python-build-system)
22262 (native-inputs
22263 `(("python-coverage" ,python-coverage)
22264 ("python-pytest" ,python-pytest)
22265 ("python-pytest-runner" ,python-pytest-runner)))
22266 (home-page "https://github.com/ulif/diceware/")
22267 (synopsis "Generates memorable passphrases")
22268 (description "This package generates passphrases by concatenating words
22269 randomly picked from wordlists. It supports several sources of
22270 randomness (including real life dice) and different wordlists (including
22271 cryptographically signed ones).")
22272 (license license:gpl3+)))
22273
22274 (define-public python-dictdiffer
22275 (package
22276 (name "python-dictdiffer")
22277 (version "0.8.1")
22278 (source (origin
22279 (method url-fetch)
22280 (uri (pypi-uri "dictdiffer" version))
22281 (sha256
22282 (base32
22283 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22284 (build-system python-build-system)
22285 (native-inputs
22286 `(("python-check-manifest" ,python-check-manifest)
22287 ("python-coverage" ,python-coverage)
22288 ("python-isort" ,python-isort)
22289 ("python-mock" ,python-mock)
22290 ("python-pydoctstyle" ,python-pydocstyle)
22291 ("python-pytest-cache" ,python-pytest-cache)
22292 ("python-pytest-cov" ,python-pytest-cov)
22293 ("python-pytest-pep8" ,python-pytest-pep8)
22294 ("python-pytest-runner" ,python-pytest-runner)
22295 ("python-pytest" ,python-pytest)
22296 ("python-setuptools-scm" ,python-setuptools-scm)
22297 ("python-tox" ,python-tox)))
22298 (home-page "https://github.com/inveniosoftware/dictdiffer")
22299 (synopsis "Diff and patch Python dictionary objects")
22300 (description
22301 "Dictdiffer is a Python module that helps you to diff and patch
22302 dictionaries.")
22303 (license license:expat)))
22304
22305 (define-public pyzo
22306 (package
22307 (name "pyzo")
22308 (version "4.11.2")
22309 (source
22310 (origin
22311 (method url-fetch)
22312 (uri (pypi-uri "pyzo" version))
22313 (sha256
22314 (base32 "1jk5f79lj09vnsdk9h01w21p9h49z2hhf8xhkx8471pjbg9vrlzr"))))
22315 (build-system python-build-system)
22316 (arguments
22317 `(#:phases
22318 (modify-phases %standard-phases
22319 (add-before 'check 'fix-home-directory
22320 (lambda _
22321 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22322 (setenv "HOME" "/tmp")
22323 #t)))
22324 ;; Tests fail with "Uncaught Python exception: python: undefined
22325 ;; symbol: objc_getClass".
22326 #:tests? #f))
22327 (propagated-inputs
22328 `(("python-pyqt" ,python-pyqt)))
22329 (home-page "https://pyzo.org")
22330 (synopsis
22331 "Python IDE for scientific computing")
22332 (description
22333 "Pyzo is a Python IDE focused on interactivity and introspection,
22334 which makes it very suitable for scientific computing. Its practical
22335 design is aimed at simplicity and efficiency.
22336
22337 It consists of two main components, the editor and the shell, and uses
22338 a set of pluggable tools to help the programmer in various ways. Some
22339 example tools are source structure, project manager, interactive help,
22340 workspace...")
22341 (license license:bsd-2)))
22342
22343 (define-public python-osc
22344 (package
22345 (name "python-osc")
22346 (version "1.7.4")
22347 (source
22348 (origin
22349 (method url-fetch)
22350 (uri (pypi-uri "python-osc" version))
22351 (sha256
22352 (base32
22353 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22354 (build-system python-build-system)
22355 (home-page "https://github.com/attwad/python-osc")
22356 (synopsis "Open Sound Control server and client implementations")
22357 (description
22358 "@code{python-osc} is a pure Python library with no external
22359 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22360 Open Sound Control 1.0} specification.")
22361 (license license:unlicense)))
22362
22363 (define-public python-voluptuous
22364 (package
22365 (name "python-voluptuous")
22366 (version "0.11.7")
22367 (source
22368 (origin
22369 (method url-fetch)
22370 (uri (pypi-uri "voluptuous" version))
22371 (sha256
22372 (base32
22373 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22374 (build-system python-build-system)
22375 (native-inputs
22376 `(("python-nose" ,python-nose)))
22377 (home-page "https://github.com/alecthomas/voluptuous")
22378 (synopsis "Python data validation library")
22379 (description
22380 "Voluptuous is a Python data validation library. It is primarily
22381 intended for validating data coming into Python as JSON, YAML, etc.")
22382 (license license:bsd-3)))
22383
22384 (define-public python-cmd2
22385 (package
22386 (name "python-cmd2")
22387 (version "1.0.2")
22388 (source
22389 (origin
22390 (method url-fetch)
22391 (uri (pypi-uri "cmd2" version))
22392 (sha256
22393 (base32
22394 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22395 (build-system python-build-system)
22396 (propagated-inputs
22397 `(("python-attrs" ,python-attrs)
22398 ("python-colorama" ,python-colorama)
22399 ("python-pyperclip" ,python-pyperclip)
22400 ("python-wcwidth" ,python-wcwidth)))
22401 (native-inputs
22402 `(("python-codecov" ,python-codecov)
22403 ("python-coverage" ,python-coverage)
22404 ("python-doc8" ,python-doc8)
22405 ("python-flake8" ,python-flake8)
22406 ("python-invoke" ,python-invoke)
22407 ("python-mock" ,python-mock)
22408 ("python-pytest" ,python-pytest)
22409 ("python-pytest-cov" ,python-pytest-cov)
22410 ("python-pytest-mock" ,python-pytest-mock)
22411 ("python-setuptools-scm" ,python-setuptools-scm)
22412 ("python-sphinx" ,python-sphinx)
22413 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22414 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22415 ("python-tox" ,python-tox)
22416 ("python-twine" ,python-twine)
22417 ("which" ,which)))
22418 (home-page "https://github.com/python-cmd2/cmd2")
22419 (synopsis "Tool for building interactive command line applications")
22420 (description
22421 "Cmd2 is a tool for building interactive command line applications in
22422 Python. Its goal is to make it quick and easy for developers to build
22423 feature-rich and user-friendly interactive command line applications. It
22424 provides a simple API which is an extension of Python's built-in @code{cmd}
22425 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22426 make your life easier and eliminates much of the boilerplate code which would
22427 be necessary when using @code{cmd}.")
22428 (license license:expat)))
22429
22430 (define-public python-pytidylib
22431 (package
22432 (name "python-pytidylib")
22433 (version "0.3.2")
22434 (source (origin
22435 (method url-fetch)
22436 (uri (pypi-uri "pytidylib" version))
22437 (sha256
22438 (base32
22439 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22440 (build-system python-build-system)
22441 (arguments
22442 '(#:phases
22443 (modify-phases %standard-phases
22444 (add-before 'build 'qualify-libtidy
22445 (lambda* (#:key inputs #:allow-other-keys)
22446 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22447 "/lib/libtidy.so")))
22448 (substitute* "tidylib/tidy.py"
22449 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22450 (format #f "'~a'" libtidy)))
22451 #t))))))
22452 (inputs `(("tidy" ,tidy)))
22453 (home-page "https://github.com/countergram/pytidylib")
22454 (synopsis "Python wrapper for HTML Tidy library")
22455 (description
22456 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22457 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22458 (license license:expat)))
22459
22460 (define-public python2-pytidylib
22461 (package-with-python2 python-pytidylib))
22462
22463 (define-public python-mujson
22464 (package
22465 (name "python-mujson")
22466 (version "1.4")
22467 (source
22468 (origin
22469 (method url-fetch)
22470 (uri (pypi-uri "mujson" version))
22471 (sha256
22472 (base32
22473 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22474 (build-system python-build-system)
22475 (home-page "https://github.com/mattgiles/mujson")
22476 (synopsis "Use the fastest JSON functions available at import time")
22477 (description "This package selects the fastest JSON functions available
22478 at import time.")
22479 (license license:expat)))
22480
22481 (define-public python-bashlex
22482 (package
22483 (name "python-bashlex")
22484 (version "0.14")
22485 (source
22486 (origin
22487 (method url-fetch)
22488 (uri (pypi-uri "bashlex" version))
22489 (sha256
22490 (base32
22491 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22492 (build-system python-build-system)
22493 (arguments
22494 `(#:phases
22495 (modify-phases %standard-phases
22496 (add-before 'build 'pregenerate-yacc-tables
22497 (lambda _
22498 ;; parser.py caches tables, which attempts to write to site lib
22499 ;; see https://github.com/idank/bashlex/issues/51
22500 (invoke "python" "-c" "import bashlex"))))))
22501 (home-page
22502 "https://github.com/idank/bashlex")
22503 (synopsis "Python parser for bash")
22504 (description "@code{bashlex} is a Python port of the parser used
22505 internally by GNU bash.
22506
22507 For the most part it's transliterated from C, the major differences are:
22508
22509 @itemize
22510 @item it does not execute anything
22511 @item it is reentrant
22512 @item it generates a complete AST
22513 @end itemize
22514 ")
22515 (license license:gpl3+)))
22516
22517 (define-public python-jinxed
22518 (package
22519 (name "python-jinxed")
22520 (version "1.0.0")
22521 (source
22522 (origin
22523 (method url-fetch)
22524 (uri (pypi-uri "jinxed" version))
22525 (sha256
22526 (base32
22527 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22528 (build-system python-build-system)
22529 (arguments
22530 '(#:phases
22531 (modify-phases %standard-phases
22532 (add-before 'check 'set-environment-variables
22533 (lambda* (#:key inputs #:allow-other-keys)
22534 (let ((ncurses (assoc-ref inputs "ncurses")))
22535 (setenv "TERM" "LINUX")
22536 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22537 #t))))
22538 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22539 (native-inputs
22540 `(("ncurses" ,ncurses)))
22541 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22542 (synopsis "Jinxed Terminal Library")
22543 (description
22544 "Jinxed is an implementation of a subset of the Python curses library.")
22545 (license license:mpl2.0)))
22546
22547 (define-public python-blessed
22548 (package
22549 (name "python-blessed")
22550 (version "1.17.8")
22551 (source
22552 (origin
22553 (method url-fetch)
22554 (uri (pypi-uri "blessed" version))
22555 (sha256
22556 (base32
22557 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22558 (modules '((guix build utils)))
22559 (snippet
22560 '(begin
22561 ;; Don't get hung up on Windows test failures.
22562 (delete-file "blessed/win_terminal.py") #t))))
22563 (build-system python-build-system)
22564 (propagated-inputs
22565 `(("python-jinxed" ,python-jinxed)
22566 ("python-six" ,python-six)
22567 ("python-wcwidth" ,python-wcwidth)))
22568 (native-inputs
22569 `(("python-mock" ,python-mock)
22570 ("python-pytest" ,python-pytest)))
22571 (home-page "https://github.com/jquast/blessed")
22572 (synopsis "Wrapper around terminal capabilities")
22573 (description
22574 "Blessed is a thin, practical wrapper around terminal styling, screen
22575 positioning, and keyboard input.")
22576 (license license:expat)))
22577
22578 (define-public python-readme-renderer
22579 (package
22580 (name "python-readme-renderer")
22581 (version "26.0")
22582 (source
22583 (origin
22584 (method url-fetch)
22585 (uri (pypi-uri "readme_renderer" version))
22586 (sha256
22587 (base32
22588 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22589 (build-system python-build-system)
22590 (propagated-inputs
22591 `(("python-bleach" ,python-bleach)
22592 ("python-docutils" ,python-docutils)
22593 ("python-pygments" ,python-pygments)
22594 ("python-six" ,python-six)))
22595 (native-inputs
22596 `(("python-mock" ,python-mock)
22597 ("python-pytest" ,python-pytest)))
22598 (home-page "https://github.com/pypa/readme_renderer")
22599 (synopsis "Render README files in Warehouse")
22600 (description
22601 "Readme Renderer is a library that will safely render arbitrary README
22602 files into HTML. It is designed to be used in Warehouse to render the
22603 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22604 and plain text.")
22605 (license license:asl2.0)))
22606
22607 (define-public python-lazr-delegates
22608 (package
22609 (name "python-lazr-delegates")
22610 (version "2.0.4")
22611 (source
22612 (origin
22613 (method url-fetch)
22614 (uri (pypi-uri "lazr.delegates" version))
22615 (sha256
22616 (base32
22617 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22618 (build-system python-build-system)
22619 (arguments
22620 '(#:phases
22621 (modify-phases %standard-phases
22622 (replace 'check
22623 (lambda _
22624 (invoke "python" "setup.py" "nosetests"))))))
22625 (native-inputs
22626 `(("python-nose" ,python-nose)))
22627 (propagated-inputs
22628 `(("python-zope-interface" ,python-zope-interface)))
22629 (home-page "https://launchpad.net/lazr.delegates")
22630 (synopsis "Easily write objects that delegate behavior")
22631 (description
22632 "The @code{lazr.delegates} package makes it easy to write objects that
22633 delegate behavior to another object. The new object adds some property or
22634 behavior on to the other object, while still providing the underlying interface,
22635 and delegating behavior.")
22636 (license license:lgpl3)))
22637
22638 (define-public python-lazr-config
22639 (package
22640 (name "python-lazr-config")
22641 (version "2.2.2")
22642 (source
22643 (origin
22644 (method url-fetch)
22645 (uri (pypi-uri "lazr.config" version))
22646 (sha256
22647 (base32
22648 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22649 (build-system python-build-system)
22650 (arguments
22651 '(#:phases
22652 (modify-phases %standard-phases
22653 (replace 'check
22654 (lambda _
22655 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22656 (native-inputs
22657 `(("python-nose" ,python-nose)))
22658 (propagated-inputs
22659 `(("python-lazr-delegates" ,python-lazr-delegates)
22660 ("python-zope-interface" ,python-zope-interface)))
22661 (home-page "https://launchpad.net/lazr.config")
22662 (synopsis "Create configuration schemas and process and validate configurations")
22663 (description
22664 "The LAZR config system is typically used to manage process configuration.
22665 Process configuration is for saying how things change when we run systems on
22666 different machines, or under different circumstances. This system uses ini-like
22667 file format of section, keys, and values. The config file supports inheritance
22668 to minimize duplication of information across files. The format supports schema
22669 validation.")
22670 (license license:lgpl3)))
22671
22672 (define-public python-flufl-bounce
22673 (package
22674 (name "python-flufl-bounce")
22675 (version "3.0.1")
22676 (source
22677 (origin
22678 (method url-fetch)
22679 (uri (pypi-uri "flufl.bounce" version))
22680 (sha256
22681 (base32
22682 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22683 (build-system python-build-system)
22684 (propagated-inputs
22685 `(("python-atpublic" ,python-atpublic)
22686 ("python-zope-interface" ,python-zope-interface)))
22687 (native-inputs
22688 `(("python-nose2" ,python-nose2)))
22689 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22690 (synopsis "Email bounce detectors")
22691 (description "The @code{flufl.bounce} library provides a set of heuristics
22692 and an API for detecting the original bouncing email addresses from a bounce
22693 message. Many formats found in the wild are supported, as are VERP and
22694 RFC 3464.")
22695 (license (list license:asl2.0
22696 license:lgpl3)))) ; only for setup_headers.py
22697
22698 (define-public python-flufl-i18n
22699 (package
22700 (name "python-flufl-i18n")
22701 (version "3.0")
22702 (source
22703 (origin
22704 (method url-fetch)
22705 (uri (pypi-uri "flufl.i18n" version))
22706 (sha256
22707 (base32
22708 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22709 (build-system python-build-system)
22710 (propagated-inputs
22711 `(("python-atpublic" ,python-atpublic)))
22712 (home-page "https://flufli18n.readthedocs.io")
22713 (synopsis "API for Python internationalization")
22714 (description
22715 "This package provides a high-level, convenient API for managing
22716 internationalization/translation contexts in Python applications. There is a
22717 simple API for single-context applications, such as command line scripts which
22718 only need to translate into one language during the entire course of their
22719 execution. There is a more flexible, but still convenient API for multi-context
22720 applications, such as servers, which may need to switch language contexts for
22721 different tasks.")
22722 (license license:asl2.0)))
22723
22724 (define-public python-flufl-lock
22725 (package
22726 (name "python-flufl-lock")
22727 (version "4.0")
22728 (source
22729 (origin
22730 (method url-fetch)
22731 (uri (pypi-uri "flufl.lock" version))
22732 (sha256
22733 (base32
22734 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22735 (build-system python-build-system)
22736 (propagated-inputs
22737 `(("python-atpublic" ,python-atpublic)
22738 ("python-psutil" ,python-psutil)))
22739 (home-page "https://flufllock.readthedocs.io")
22740 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22741 (description
22742 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22743 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22744 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22745 and have a maximum lifetime built-in.")
22746 (license (list license:asl2.0
22747 license:lgpl3)))) ; only for setup_helpers.py
22748
22749 (define-public python-flufl-testing
22750 (package
22751 (name "python-flufl-testing")
22752 (version "0.8")
22753 (source
22754 (origin
22755 (method url-fetch)
22756 (uri (pypi-uri "flufl.testing" version))
22757 (sha256
22758 (base32
22759 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22760 (build-system python-build-system)
22761 (native-inputs
22762 `(("python-nose2" ,python-nose2)))
22763 (home-page "https://gitlab.com/warsaw/flufl.testing")
22764 (synopsis "Collection of test tool plugins")
22765 (description
22766 "This package contains a small collection of test tool plugins for
22767 @code{nose2} and @code{flake8}.")
22768 (license license:asl2.0)))
22769
22770 (define-public python-devtools
22771 (package
22772 (name "python-devtools")
22773 (version "0.6")
22774 (source
22775 (origin
22776 (method git-fetch)
22777 (uri (git-reference
22778 (url "https://github.com/samuelcolvin/python-devtools")
22779 (commit (string-append "v" version))))
22780 (file-name (git-file-name name version))
22781 (sha256
22782 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22783 (build-system python-build-system)
22784 (native-inputs
22785 `(("python-pytest" ,python-pytest)
22786 ("python-pytest-mock" ,python-pytest-mock)))
22787 (propagated-inputs
22788 `(("python-pygments" ,python-pygments)))
22789 (arguments
22790 `(#:phases (modify-phases %standard-phases
22791 (replace 'check
22792 (lambda _
22793 (invoke "pytest")
22794 #t)))))
22795 (home-page "https://github.com/samuelcolvin/python-devtools")
22796 (synopsis "Debug command and development tools")
22797 (description
22798 "This package provides a debug print command and other development tools.
22799 It adds a simple and readable way to print stuff during development.")
22800 (license license:expat)))
22801
22802 (define-public python-dateparser
22803 (package
22804 (name "python-dateparser")
22805 (version "0.7.6")
22806 (source
22807 (origin
22808 (method url-fetch)
22809 (uri (pypi-uri "dateparser" version))
22810 (sha256
22811 (base32
22812 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22813 (build-system python-build-system)
22814 (propagated-inputs
22815 `(("python-dateutil" ,python-dateutil)
22816 ("python-pytz" ,python-pytz)
22817 ("python-regex" ,python-regex)
22818 ("python-ruamel.yaml" ,python-ruamel.yaml)
22819 ("python-tzlocal" ,python-tzlocal)))
22820 (native-inputs
22821 `(("python-mock" ,python-mock)
22822 ("python-parameterized" ,python-parameterized)
22823 ("tzdata" ,tzdata-for-tests)))
22824 (arguments
22825 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22826 #:tests? #f
22827 #:phases
22828 (modify-phases %standard-phases
22829 (add-before 'check 'set-check-environment
22830 (lambda* (#:key inputs #:allow-other-keys)
22831 (setenv "TZ" "UTC")
22832 (setenv "TZDIR"
22833 (string-append (assoc-ref inputs "tzdata")
22834 "/share/zoneinfo"))
22835 #t)))))
22836 (home-page "https://github.com/scrapinghub/dateparser")
22837 (synopsis
22838 "Date parsing library designed to parse dates from HTML pages")
22839 (description
22840 "@code{python-dateparser} provides modules to easily parse localized
22841 dates in almost any string formats commonly found on web pages.")
22842 (license license:bsd-3)))
22843
22844 (define-public python-dparse
22845 (package
22846 (name "python-dparse")
22847 (version "0.5.1")
22848 (source
22849 (origin
22850 (method url-fetch)
22851 (uri (pypi-uri "dparse" version))
22852 (sha256
22853 (base32
22854 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22855 (build-system python-build-system)
22856 (native-inputs
22857 `(("python-pytest" ,python-pytest)))
22858 (propagated-inputs
22859 `(("python-packaging" ,python-packaging)
22860 ("python-pyyaml" ,python-pyyaml)
22861 ("python-toml" ,python-toml)))
22862 (home-page "https://github.com/pyupio/dparse")
22863 (synopsis "Parser for Python dependency files")
22864 (description "This package provides a parser for Python dependency files.")
22865 (license license:expat)))
22866
22867 (define-public python-dpath
22868 (package
22869 (name "python-dpath")
22870 (version "2.0.1")
22871 (source
22872 (origin
22873 (method url-fetch)
22874 (uri (pypi-uri "dpath" version))
22875 (sha256
22876 (base32
22877 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22878 (build-system python-build-system)
22879 (native-inputs
22880 `(("python-hypothesis" ,python-hypothesis)
22881 ("python-mock" ,python-mock)
22882 ("python-nose" ,python-nose)))
22883 (arguments
22884 '(#:phases
22885 (modify-phases %standard-phases
22886 (replace 'check
22887 (lambda* (#:key inputs outputs #:allow-other-keys)
22888 (add-installed-pythonpath inputs outputs)
22889 ;; This invokation is taken from tox.ini.
22890 (invoke "nosetests" "-d" "-v" "tests/"))))))
22891 (home-page "https://github.com/akesterson/dpath-python")
22892 (synopsis "Filesystem-like pathing and searching for dictionaries")
22893 (description
22894 "@code{python-dpath} is a library for accessing and searching
22895 dictionaries via /slashed/paths ala xpath.
22896
22897 Basically it lets you glob over a dictionary as if it were a filesystem. It
22898 allows you to specify globs (ala the bash eglob syntax, through some advanced
22899 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22900 facility for filtering those results.")
22901 (license license:expat)))
22902
22903 (define-public python-safety
22904 (package
22905 (name "python-safety")
22906 (version "1.9.0")
22907 (source
22908 (origin
22909 (method url-fetch)
22910 (uri (pypi-uri "safety" version))
22911 (sha256
22912 (base32
22913 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22914 (build-system python-build-system)
22915 (arguments
22916 `(#:phases
22917 (modify-phases %standard-phases
22918 (add-after 'unpack 'disable-tests
22919 (lambda _
22920 (substitute* "tests/test_safety.py"
22921 ;; requires network
22922 (("def test_check_live") "def _test_check_live"))
22923 #t)))))
22924 (propagated-inputs
22925 `(("python-click" ,python-click)
22926 ("python-dparse" ,python-dparse)
22927 ("python-packaging" ,python-packaging)
22928 ("python-requests" ,python-requests)))
22929 (home-page "https://github.com/pyupio/safety")
22930 (synopsis "Check installed dependencies for known vulnerabilities")
22931 (description "Safety checks installed dependencies for known vulnerabilities.
22932 By default it uses the open Python vulnerability database Safety DB.")
22933 (license license:expat)))
22934
22935 (define-public python-pypandoc
22936 (package
22937 (name "python-pypandoc")
22938 (version "1.5")
22939 (source
22940 (origin
22941 (method url-fetch)
22942 (uri (pypi-uri "pypandoc" version))
22943 (sha256
22944 (base32
22945 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22946 (build-system python-build-system)
22947 (inputs
22948 `(("pandoc" ,pandoc)
22949 ("pandoc-citeproc" ,pandoc-citeproc)))
22950 (propagated-inputs
22951 `(("wheel" ,python-wheel)))
22952 (native-inputs
22953 `(("texlive" ,(texlive-union (list texlive-amsfonts
22954 texlive-fonts-ec
22955 texlive-latex-hyperref
22956 texlive-latex-oberdiek
22957 texlive-lm
22958 texlive-xcolor)))))
22959 (arguments
22960 `(#:phases
22961 (modify-phases %standard-phases
22962 (add-before 'check 'disable-tests
22963 (lambda _
22964 ;; Disable test requiring network access
22965 (substitute* "tests.py"
22966 (("test_basic_conversion_from_http_url")
22967 "skip_test_basic_conversion_from_http_url"))
22968 ;; Needed by texlive-union to generate fonts
22969 (setenv "HOME" "/tmp")
22970 #t)))))
22971 (home-page "https://github.com/bebraw/pypandoc")
22972 (synopsis "Python wrapper for pandoc")
22973 (description "pypandoc is a thin Python wrapper around pandoc
22974 and pandoc-citeproc.")
22975 (license license:expat)))
22976
22977 (define-public python-rnc2rng
22978 (package
22979 (name "python-rnc2rng")
22980 (version "2.6.4")
22981 (source
22982 (origin
22983 (method url-fetch)
22984 (uri (pypi-uri "rnc2rng" version))
22985 (sha256
22986 (base32
22987 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22988 (build-system python-build-system)
22989 (propagated-inputs
22990 `(("python-rply" ,python-rply)))
22991 (arguments
22992 `(#:phases (modify-phases %standard-phases
22993 (replace 'check
22994 (lambda _
22995 (invoke "python" "test.py"))))))
22996 (home-page "https://github.com/djc/rnc2rng")
22997 (synopsis "Convert RELAX NG Compact to regular syntax")
22998 (description
22999 "This package provides the @command{rnc2rng} command-line tool as well as
23000 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
23001 equivalent schemata in the XML-based default RELAX NG syntax.")
23002 (license license:expat)))
23003
23004 (define-public python-telethon
23005 (package
23006 (name "python-telethon")
23007 (version "1.17.5")
23008 (source
23009 (origin
23010 (method git-fetch)
23011 (uri (git-reference
23012 (url "https://github.com/LonamiWebs/Telethon")
23013 (commit (string-append "v" version))))
23014 (file-name (git-file-name name version))
23015 (sha256
23016 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
23017 (build-system python-build-system)
23018 (arguments
23019 '(#:phases
23020 (modify-phases %standard-phases
23021 (replace 'check
23022 (lambda* (#:key tests? #:allow-other-keys)
23023 (when tests?
23024 (invoke "py.test" "-v"))
23025 #t)))))
23026 (propagated-inputs
23027 `(("python-rsa" ,python-rsa)
23028 ("python-pyaes" ,python-pyaes)))
23029 (native-inputs
23030 `(("python-pytest" ,python-pytest)
23031 ("python-pytest-asyncio" ,python-pytest-asyncio)
23032 ("python-pytest-trio" ,python-pytest-trio)))
23033 (home-page "https://docs.telethon.dev")
23034 (synopsis "Full-featured Telegram client library for Python 3")
23035 (description "This library is designed to make it easy to write Python
23036 programs that can interact with Telegram.")
23037 (license license:expat)))
23038
23039 (define-public python-citeproc-py
23040 (package
23041 (name "python-citeproc-py")
23042 (version "0.5.1")
23043 (source
23044 (origin
23045 (method url-fetch)
23046 (uri (pypi-uri "citeproc-py" version))
23047 (sha256
23048 (base32
23049 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
23050 (build-system python-build-system)
23051 (propagated-inputs
23052 `(("python-lxml" ,python-lxml)
23053 ("python-rnc2rng" ,python-rnc2rng)))
23054 (home-page
23055 "https://github.com/brechtm/citeproc-py")
23056 (synopsis "Citations and bibliography formatter")
23057 (description
23058 "Citeproc-py is a CSL processor for Python. It aims to implement the
23059 CSL 1.0.1 specification. citeproc-py can output styled citations and
23060 bibliographies in a number of different output formats. Currently supported
23061 are plain text, reStructuredText and HTML.")
23062 (license license:bsd-2)))
23063
23064 (define-public python-inform
23065 (package
23066 (name "python-inform")
23067 (version "1.23.0")
23068 (source
23069 (origin
23070 (method url-fetch)
23071 (uri (pypi-uri "inform" version))
23072 (sha256
23073 (base32
23074 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
23075 (build-system python-build-system)
23076 (arguments
23077 `(#:tests? #f)) ; PyPI tarball lacks tests
23078 (native-inputs
23079 `(("python-hypothesis" ,python-hypothesis)
23080 ("python-pytest-cov" ,python-pytest-cov)
23081 ("python-pytest-runner" ,python-pytest-runner)))
23082 (propagated-inputs
23083 `(("python-arrow" ,python-arrow)
23084 ("python-six" ,python-six)))
23085 (home-page "https://inform.readthedocs.io")
23086 (synopsis "Print & logging utilities for communicating with user")
23087 (description
23088 "Inform is designed to display messages from programs that are typically run from
23089 a console. It provides a collection of ‘print’ functions that allow you to simply and
23090 cleanly print different types of messages.")
23091 (license license:gpl3+)))
23092
23093 (define-public python-nestedtext
23094 (package
23095 (name "python-nestedtext")
23096 (version "1.0.0")
23097 (source
23098 (origin
23099 (method url-fetch)
23100 (uri (pypi-uri "nestedtext" version))
23101 (sha256
23102 (base32
23103 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
23104 (build-system python-build-system)
23105 (arguments
23106 `(#:tests? #f)) ; PyPI tarball lacks tests
23107 (propagated-inputs
23108 `(("python-inform" ,python-inform)))
23109 (home-page "https://nestedtext.org")
23110 (synopsis "Human readable and writable data interchange format")
23111 (description
23112 "NestedText is a file format for holding data that is to be entered, edited, or
23113 viewed by people. It allows data to be organized into a nested collection of
23114 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
23115 without the complexity and risk of YAML and without the syntatic clutter of JSON.
23116 NestedText is both simple and natural. Only a small number of concepts and rules must
23117 be kept in mind when creating it. It is easily created, modified, or viewed with
23118 a text editor and easily understood and used by both programmers and non-programmers.")
23119 (license license:expat))) ; MIT license
23120
23121 (define-public python-parallel
23122 (package
23123 (name "python-parallel")
23124 (version "1.6.4.4")
23125 (source
23126 (origin
23127 (method url-fetch)
23128 (uri (string-append
23129 "https://www.parallelpython.com/downloads/pp/pp-"
23130 version ".zip"))
23131 (sha256
23132 (base32
23133 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
23134 (native-inputs
23135 `(("unzip" ,unzip)))
23136 (build-system python-build-system)
23137 (arguments '(#:tests? #f)) ; No test suite.
23138 (home-page "https://www.parallelpython.com")
23139 (synopsis "Parallel and distributed programming for Python")
23140 (description "Parallel Python module (PP) provides an easy and efficient
23141 way to create parallel-enabled applications for SMP computers and clusters.
23142 PP module features cross-platform portability and dynamic load balancing.
23143 Thus applications written with PP will parallelize efficiently even on
23144 heterogeneous and multi-platform clusters (including clusters running other
23145 applications with variable CPU loads).")
23146 (license license:bsd-3)))
23147
23148 (define-public python2-parallel
23149 (package-with-python2 python-parallel))
23150
23151 (define-public python-djvulibre
23152 (package
23153 (name "python-djvulibre")
23154 (version "0.8.5")
23155 (source
23156 (origin
23157 (method url-fetch)
23158 (uri (pypi-uri "python-djvulibre" version))
23159 (sha256
23160 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23161 (build-system python-build-system)
23162 (native-inputs
23163 `(("ghostscript" ,ghostscript)
23164 ("pkg-config" ,pkg-config)
23165 ("python-nose" ,python-nose)))
23166 (inputs
23167 `(("djvulibre" ,djvulibre)
23168 ("python-cython" ,python-cython)))
23169 (arguments
23170 `(#:phases
23171 (modify-phases %standard-phases
23172 (add-after 'unpack 'fix-tests
23173 (lambda _
23174 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23175 ;; doesn't make sense on GNU/Linux.
23176 (delete-file "djvu/dllpath.py")
23177 #t)))))
23178 (synopsis "Python bindings for DjVuLibre")
23179 (description "This is a set of Python bindings for the DjVuLibre library.")
23180 (home-page "https://jwilk.net/software/python-djvulibre")
23181 (license license:gpl2)))
23182
23183 (define-public python2-djvulibre
23184 (package-with-python2 python-djvulibre))
23185
23186 (define-public python-versioneer
23187 (package
23188 (name "python-versioneer")
23189 (version "0.19")
23190 (source
23191 (origin
23192 (method url-fetch)
23193 (uri (pypi-uri "versioneer" version))
23194 (sha256
23195 (base32
23196 "1bmg8y78am371rd9b4clf11b8g1h7xvq8q58z03jvgdwpsdx7zm4"))))
23197 (build-system python-build-system)
23198 (home-page
23199 "https://github.com/python-versioneer/python-versioneer")
23200 (synopsis
23201 "Version-string management for VCS-controlled trees")
23202 (description
23203 "@code{versioneer} is a tool for managing a recorded version number in
23204 distutils-based python projects. The goal is to remove the tedious and
23205 error-prone \"update the embedded version string\" step from your release
23206 process.")
23207 (license license:public-domain)))
23208
23209 (define-public python2-gamera
23210 (package
23211 (name "python2-gamera")
23212 (version "3.4.4")
23213 (source
23214 (origin
23215 (method url-fetch)
23216 (uri (string-append "https://gamera.informatik.hsnr.de/download/"
23217 "gamera-" version ".tar.gz"))
23218 (sha256
23219 (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
23220 (modules '((guix build utils)))
23221 (snippet
23222 '(begin
23223 ;; Remove bundled libraries.
23224 (for-each delete-file-recursively
23225 '("src/libpng-1.2.5"
23226 "src/libtiff"
23227 "src/zlib-1.2.8"))))))
23228 (build-system python-build-system)
23229 (inputs
23230 `(("libpng" ,libpng)
23231 ("libtiff" ,libtiff)
23232 ("python2-wxpython" ,python2-wxpython)
23233 ("zlib" ,zlib)))
23234 (arguments
23235 `(#:python ,python-2))
23236 (synopsis "Framework for building document analysis applications")
23237 (description
23238 "Gamera is a toolkit for building document image recognition systems.")
23239 (home-page "https://gamera.informatik.hsnr.de/")
23240 (license license:gpl2+)))