gnu: gnupg: Update to 2.2.25.
[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 base)
188 #:use-module (gnu packages xml)
189 #:use-module (gnu packages xorg)
190 #:use-module (gnu packages xdisorg)
191 #:use-module (gnu packages tcl)
192 #:use-module (gnu packages bdw-gc)
193 #:use-module (gnu packages serialization)
194 #:use-module (guix packages)
195 #:use-module (guix download)
196 #:use-module (guix git-download)
197 #:use-module (guix hg-download)
198 #:use-module (guix utils)
199 #:use-module (guix build-system gnu)
200 #:use-module (guix build-system cmake)
201 #:use-module (guix build-system python)
202 #:use-module (guix build-system trivial)
203 #:use-module (srfi srfi-1)
204 #:use-module (srfi srfi-26))
205
206 (define-public python-slixmpp
207 (package
208 (name "python-slixmpp")
209 (version "1.5.2")
210 (source
211 (origin
212 (method git-fetch)
213 (uri
214 (git-reference
215 (url "https://lab.louiz.org/poezio/slixmpp.git")
216 (commit
217 (string-append "slix-" version))))
218 (file-name
219 (git-file-name name version))
220 (sha256
221 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
222 (build-system python-build-system)
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch
227 (lambda _
228 (substitute* "setup.py"
229 (("'CC', 'cc'")
230 "'CC', 'gcc'"))
231 #t)))))
232 (native-inputs
233 `(("cython" ,python-cython)
234 ("gnupg" ,gnupg)
235 ("pkg-config" ,pkg-config)))
236 (propagated-inputs
237 `(("python-aiodns" ,python-aiodns)
238 ("python-aiohttp" ,python-aiohttp)
239 ("python-pyasn1" ,python-pyasn1)
240 ("python-pyasn1-modules" ,python-pyasn1-modules)))
241 (inputs
242 `(("libidn" ,libidn)
243 ("python" ,python))) ; We are building a Python extension.
244 (synopsis "XMPP library without threads")
245 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
246 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
247 socket handling, the timers, the events dispatching) in order to remove all
248 threads.")
249 (home-page "https://lab.louiz.org/poezio/slixmpp")
250 (license license:expat)))
251
252 (define-public python-tenacity
253 (package
254 (name "python-tenacity")
255 (version "6.1.0")
256 (source (origin
257 (method url-fetch)
258 (uri (pypi-uri "tenacity" version))
259 (sha256
260 (base32
261 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
262 (build-system python-build-system)
263 (native-inputs
264 `(("python-setuptools-scm" ,python-setuptools-scm)
265 ("python-sphinx" ,python-sphinx)
266 ("python-tornado" ,python-tornado)
267 ("python-pytest" ,python-pytest)))
268 (propagated-inputs
269 `(("python-six" ,python-six)))
270 (arguments
271 `(#:phases (modify-phases %standard-phases
272 (replace 'check
273 (lambda _
274 (invoke "pytest")
275 #t)))))
276 (home-page "https://github.com/jd/tenacity")
277 (synopsis "Retrying library for python")
278 (description "Tenacity is a general-purpose python library to simplify the
279 task of adding retry behavior to just about anything.")
280 (license license:asl2.0)))
281
282 (define-public python-colorlog
283 (package
284 (name "python-colorlog")
285 (version "4.1.0")
286 (source (origin
287 (method url-fetch)
288 (uri (pypi-uri "colorlog" version))
289 (sha256
290 (base32
291 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
292 (build-system python-build-system)
293 (native-inputs
294 `(("python-pytest" ,python-pytest)))
295 (arguments
296 `(#:phases (modify-phases %standard-phases
297 (replace 'check
298 (lambda _
299 ;; Extend PYTHONPATH so the built package will be found.
300 (setenv "PYTHONPATH"
301 (string-append (getcwd) "/build/lib:"
302 (getenv "PYTHONPATH")))
303 (invoke "pytest" "-p" "no:logging")
304 #t)))))
305 (home-page "https://github.com/borntyping/python-colorlog")
306 (synopsis "Log formatting with colors for python")
307 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
308 with Python's logging module that outputs records using terminal colors.")
309 (license license:expat)))
310
311 (define-public python-pyprind
312 (package
313 (name "python-pyprind")
314 (version "2.11.2")
315 (source (origin
316 (method url-fetch)
317 (uri (pypi-uri "PyPrind" version))
318 (sha256
319 (base32
320 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
321 (build-system python-build-system)
322 (propagated-inputs
323 `(("python-psutil" ,python-psutil)))
324 (home-page "https://github.com/rasbt/pyprind")
325 (synopsis "Python Progress Bar and Percent Indicator Utility")
326 (description "The PyPrind (Python Progress Indicator) module provides a
327 progress bar and a percentage indicator object that let you track the progress
328 of a loop structure or other iterative computation.")
329 (license license:bsd-3)))
330
331 (define-public python-gphoto2
332 (package
333 (name "python-gphoto2")
334 (version "2.2.1")
335 (source (origin
336 (method url-fetch)
337 (uri (pypi-uri "gphoto2" version))
338 (sha256
339 (base32
340 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
341 (build-system python-build-system)
342 (native-inputs
343 `(("pkg-config" ,pkg-config)))
344 (inputs
345 `(("libgphoto2" ,libgphoto2)))
346 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
347 (synopsis "Python interface to libgphoto2")
348 (description "@code{python-gphoto2} is a comprehensive Python interface
349 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
350 automatically generate the interface code.")
351 (license license:gpl3+)))
352
353 (define-public python-colour
354 (package
355 (name "python-colour")
356 (version "0.1.5")
357 (source (origin
358 (method url-fetch)
359 (uri (pypi-uri "colour" version))
360 (sha256
361 (base32
362 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
363 (build-system python-build-system)
364 (native-inputs
365 `(("python-d2to1" ,python-d2to1)))
366 (home-page "https://github.com/vaab/colour")
367 (synopsis "Convert and manipulate various color representations")
368 (description "Pythonic way to manipulate color representations (HSL, RVB,
369 web, X11, ...).")
370 (license license:expat)))
371
372 (define-public python-d2to1
373 (package
374 (name "python-d2to1")
375 (version "0.2.12.post1")
376 (source (origin
377 (method url-fetch)
378 (uri (pypi-uri "d2to1" version))
379 (sha256
380 (base32
381 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
382 (build-system python-build-system)
383 (native-inputs
384 `(("python-nose" ,python-nose)))
385 (home-page "https://github.com/embray/d2to1")
386 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
387 in python")
388 (description "The python package d2to1 (the d is for distutils) allows
389 using distutils2-like setup.cfg files for a package's metadata with a
390 distribute/setuptools setup.py script.")
391 (license license:bsd-2)))
392
393 (define-public python-rawkit
394 (package
395 (name "python-rawkit")
396 (version "0.6.0")
397 (source (origin
398 (method url-fetch)
399 (uri (pypi-uri "rawkit" version))
400 (sha256
401 (base32
402 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
403 (build-system python-build-system)
404 (native-inputs
405 `(("python-pytest" ,python-pytest)
406 ("python-mock" ,python-mock)))
407 (inputs
408 `(("libraw" ,libraw)))
409 (home-page "https://rawkit.readthedocs.io")
410 (synopsis "Ctypes-based LibRaw binding for Python")
411 (description "The rawkit package provides two modules: rawkit and libraw.
412 The rawkit module provides a high-level Pythonic interface for developing raw
413 photos, while the libraw module provides a CTypes based interface for
414 interacting with the low-level LibRaw C APIs.")
415 (license license:expat)))
416
417 (define-public python-easygui
418 (package
419 (name "python-easygui")
420 (version "0.98.1")
421 (source (origin
422 (method url-fetch)
423 (uri (pypi-uri "easygui" version))
424 (sha256
425 (base32
426 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
427 (build-system python-build-system)
428 (propagated-inputs
429 `(("python-tkinter" ,python "tk")))
430 (home-page "https://github.com/robertlugg/easygui")
431 (synopsis "GUI programming module for Python")
432 (description "EasyGUI is a module for very simple, very easy GUI
433 programming in Python. EasyGUI is different from other GUI generators in that
434 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
435 simple function calls.")
436 (license license:bsd-3)))
437
438 (define-public python-pymediainfo
439 (package
440 (name "python-pymediainfo")
441 (version "4.1")
442 (source
443 (origin
444 (method url-fetch)
445 (uri (pypi-uri "pymediainfo" version))
446 (sha256
447 (base32
448 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
449 (build-system python-build-system)
450 (native-inputs
451 `(("python-setuptools-scm" ,python-setuptools-scm)
452 ("python-pytest" ,python-pytest)))
453 (inputs
454 `(("libmediainfo" ,libmediainfo)))
455 (arguments
456 `(#:phases
457 (modify-phases %standard-phases
458 (add-after 'unpack 'patch-libmediainfo
459 (lambda _
460 (substitute* "pymediainfo/__init__.py"
461 (("libmediainfo.so.0")
462 (string-append (assoc-ref %build-inputs "libmediainfo")
463 "/lib/libmediainfo.so.0")))
464 #t))
465 (replace 'check
466 (lambda _
467 ;; Extend PYTHONPATH so the built package will be found.
468 (setenv "PYTHONPATH"
469 (string-append (getcwd) "/build/lib:"
470 (getenv "PYTHONPATH")))
471 ;; Skip the only failing test "test_parse_url"
472 (invoke "pytest" "-vv" "-k" "not test_parse_url")
473 #t)))))
474 (home-page
475 "https://github.com/sbraz/pymediainfo")
476 (synopsis
477 "Python wrapper for the mediainfo library")
478 (description
479 "Python wrapper for the mediainfo library to access the technical and tag
480 data for video and audio files.")
481 (license license:expat)))
482
483 (define-public python-psutil
484 (package
485 (name "python-psutil")
486 (version "5.7.2")
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "psutil" version))
491 (sha256
492 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
493 (build-system python-build-system)
494 (arguments
495 ;; FIXME: some tests do not return and time out. Some tests fail because
496 ;; some processes survive kill().
497 '(#:tests? #f))
498 (home-page "https://www.github.com/giampaolo/psutil")
499 (synopsis "Library for retrieving information on running processes")
500 (description
501 "psutil (Python system and process utilities) is a library for retrieving
502 information on running processes and system utilization (CPU, memory, disks,
503 network) in Python. It is useful mainly for system monitoring, profiling and
504 limiting process resources and management of running processes. It implements
505 many functionalities offered by command line tools such as: ps, top, lsof,
506 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
507 pidof, tty, taskset, pmap.")
508 (properties `((python2-variant . ,(delay python2-psutil))))
509 (license license:bsd-3)))
510
511 (define-public python2-psutil
512 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
513 (package
514 (inherit base)
515 (propagated-inputs
516 `(("python2-enum34" ,python2-enum34) ;optional
517 ,@(package-propagated-inputs base))))))
518
519 (define-public python-shapely
520 (package
521 (name "python-shapely")
522 (version "1.7.1")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (pypi-uri "Shapely" version))
527 (sha256
528 (base32
529 "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
530 (modules '((guix build utils)))
531 (snippet
532 '(begin
533 (delete-file "shapely/speedups/_speedups.c")
534 (delete-file "shapely/vectorized/_vectorized.c")
535 #t))))
536 (build-system python-build-system)
537 (native-inputs
538 `(("python-cython" ,python-cython)
539 ("python-matplotlib" ,python-matplotlib)
540 ("python-pytest" ,python-pytest)
541 ("python-pytest-cov" ,python-pytest-cov)))
542 (inputs
543 `(("geos" ,geos)))
544 (propagated-inputs
545 `(("python-numpy" ,python-numpy)))
546 (arguments
547 `(#:phases
548 (modify-phases %standard-phases
549 (add-after 'unpack 'patch-geos-path
550 (lambda* (#:key inputs #:allow-other-keys)
551 (let ((geos (assoc-ref inputs "geos"))
552 (glibc (assoc-ref inputs ,(if (%current-target-system)
553 "cross-libc" "libc"))))
554 (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
555 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
556 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
557 geos "/lib/libgeos_c.so'])"))
558 (("free = load_dll\\('c'\\)\\.free")
559 (string-append "free = load_dll('c', fallbacks=['"
560 glibc "/lib/libc.so.6']).free"))
561 (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
562 (string-append "free = load_dll('c', fallbacks=['"
563 glibc "/lib/libc.so.6']).free"))))
564 #t)))))
565 (home-page "https://github.com/Toblerity/Shapely")
566 (synopsis "Library for the manipulation and analysis of geometric objects")
567 (description "Shapely is a Python package for manipulation and analysis of
568 planar geometric objects. It is based on the @code{GEOS} library.")
569 (license license:bsd-3)))
570
571 (define-public python-shortuuid
572 (package
573 (name "python-shortuuid")
574 (version "0.5.0")
575 (source
576 (origin
577 (method url-fetch)
578 (uri (pypi-uri "shortuuid" version))
579 (sha256
580 (base32
581 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
582 (build-system python-build-system)
583 (native-inputs
584 `(("python-pep8" ,python-pep8)))
585 (home-page "https://github.com/skorokithakis/shortuuid")
586 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
587 (description
588 "@code{shortuuid} is a Python library for generating concise, unambiguous
589 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
590 module and then similar looking characters are removed.")
591 (license license:bsd-3)))
592
593 (define-public python-logwrap
594 (package
595 (name "python-logwrap")
596 (version "3.2.1")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (pypi-uri "logwrap" version ".zip"))
601 (sha256
602 (base32
603 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
604 (build-system python-build-system)
605 (propagated-inputs
606 `(("python-six" ,python-six)
607 ("python-typing" ,python-typing)))
608 (native-inputs
609 `(("unzip" ,unzip)
610 ("python-cython" ,python-cython)
611 ("python-pytest" ,python-pytest)
612 ("python-pytest-cov" ,python-pytest-cov)
613 ("python-pytest-runner" ,python-pytest-runner)))
614 (home-page "https://github.com/penguinolog/logwrap")
615 (synopsis "Decorator for logging function arguments")
616 (description "This package provides a decorator to log function arguments
617 and function call return values in a human-readable way.")
618 (license license:asl2.0)))
619
620 (define-public python2-shapely
621 (package-with-python2 python-shapely))
622
623 (define-public python-clyent
624 (package
625 (name "python-clyent")
626 (version "1.2.1")
627 (source
628 (origin
629 (method url-fetch)
630 (uri (pypi-uri "clyent" version))
631 (sha256
632 (base32
633 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
634 (build-system python-build-system)
635 (native-inputs
636 `(("python-mock" ,python-mock)))
637 (home-page "https://github.com/Anaconda-Platform/clyent")
638 (synopsis "Command line client library")
639 (description "Clyent is a Python command line utility library. It is used
640 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
641 (license license:bsd-3)))
642
643 (define-public python2-clyent
644 (package-with-python2 python-clyent))
645
646 (define-public python-babel
647 (package
648 (name "python-babel")
649 (version "2.8.0")
650 (source
651 (origin
652 (method url-fetch)
653 (uri (pypi-uri "Babel" version))
654 (sha256
655 (base32
656 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
657 (build-system python-build-system)
658 (native-inputs
659 `(("python-freezegun" ,python-freezegun)
660 ("python-pytest" ,python-pytest)))
661 (propagated-inputs
662 `(("python-pytz" ,python-pytz)))
663 (arguments
664 `(#:phases (modify-phases %standard-phases
665 (replace 'check
666 (lambda _
667 (invoke "pytest" "-vv" "-k"
668 (string-append
669 ;; XXX: These tests fail when using Pytest 4.x and
670 ;; Babel 2.6.0. Try removing this for later versions.
671 "not test_no_inherit_metazone_marker_never_in_output"
672 " and not test_smoke_dates"
673 " and not test_smoke_numbers")))))))
674 (home-page "http://babel.pocoo.org/")
675 (synopsis
676 "Tools for internationalizing Python applications")
677 (description
678 "Babel is composed of two major parts:
679 - tools to build and work with gettext message catalogs
680 - a Python interface to the CLDR (Common Locale Data Repository), providing
681 access to various locale display names, localized number and date formatting,
682 etc. ")
683 (license license:bsd-3)))
684
685 (define-public python2-babel
686 (package-with-python2 python-babel))
687
688 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
689 (define-public python2-babel-2.6
690 (package
691 (inherit python2-babel)
692 (version "2.6.0")
693 (source (origin
694 (method url-fetch)
695 (uri (pypi-uri "Babel" version))
696 (sha256
697 (base32
698 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
699
700 (define-public python2-backport-ssl-match-hostname
701 (package
702 (name "python2-backport-ssl-match-hostname")
703 (version "3.5.0.1")
704 (source
705 (origin
706 (method url-fetch)
707 (uri (pypi-uri "backports.ssl_match_hostname" version))
708 (sha256
709 (base32
710 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
711 (build-system python-build-system)
712 (arguments
713 `(#:python ,python-2
714 #:tests? #f)) ; no test target
715 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
716 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
717 (description
718 "This backport brings the ssl.match_hostname() function to users of
719 earlier versions of Python. The function checks the hostname in the
720 certificate returned by the server to which a connection has been established,
721 and verifies that it matches the intended target hostname.")
722 (license license:psfl)))
723
724 (define-public python-bitarray
725 (package
726 (name "python-bitarray")
727 (version "1.4.0")
728 (source (origin
729 (method url-fetch)
730 (uri (pypi-uri "bitarray" version))
731 (sha256
732 (base32
733 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
734 (build-system python-build-system)
735 (home-page "https://github.com/ilanschnell/bitarray")
736 (synopsis "Efficient arrays of booleans")
737 (description "This package provides an object type which efficiently
738 represents an array of booleans. Bitarrays are sequence types and behave very
739 much like usual lists. Eight bits are represented by one byte in a contiguous
740 block of memory. The user can select between two representations:
741 little-endian and big-endian. All of the functionality is implemented in C.
742 Methods for accessing the machine representation are provided. This can be
743 useful when bit level access to binary files is required, such as portable
744 bitmap image files. Also, when dealing with compressed data which uses
745 variable bit length encoding, you may find this module useful.")
746 (license license:psfl)))
747
748 (define-public python-boolean.py
749 (package
750 (name "python-boolean.py")
751 (version "3.6")
752 (source
753 (origin
754 ;; There's no source tarball on PyPI.
755 (method git-fetch)
756 (uri (git-reference
757 (url "https://github.com/bastikr/boolean.py")
758 (commit (string-append "v" version))))
759 (file-name (git-file-name name version))
760 (sha256
761 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
762 (build-system python-build-system)
763 (home-page "https://github.com/bastikr/boolean.py")
764 (synopsis "Boolean algebra in one Python module")
765 (description
766 "This is a small Python library that implements boolean algebra.
767 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
768 @code{Symbol} class that can take on one of these two values. Calculations
769 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
770 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
771 Expressions are constructed from parsed strings or directly in Python.")
772 (license license:bsd-2)))
773
774 (define-public python-hdf4
775 (package
776 (name "python-hdf4")
777 (version "0.9")
778 (source
779 (origin
780 (method url-fetch)
781 (uri (pypi-uri name version))
782 (sha256
783 (base32
784 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
785 (build-system python-build-system)
786 (native-inputs `(("nose" ,python-nose)))
787 (propagated-inputs `(("numpy" ,python-numpy)))
788 (inputs
789 `(("hdf4" ,hdf4)
790 ("libjpeg" ,libjpeg-turbo)
791 ("zlib" ,zlib)))
792 (arguments
793 `(#:phases
794 (modify-phases %standard-phases
795 (replace 'check
796 (lambda _
797 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
798 ;; on to import numpy. Somehow this works on their CI system.
799 ;; Let's just manage PYTHONPATH here instead.
800 (substitute* "runexamples.sh"
801 (("export PYTHONPATH=.*") ""))
802 (setenv "PYTHONPATH"
803 (string-append (getcwd) ":"
804 (getenv "PYTHONPATH")))
805 (invoke "./runexamples.sh")
806 (invoke "nosetests" "-v"))))))
807 (home-page "https://github.com/fhs/python-hdf4")
808 (synopsis "Python interface to the NCSA HDF4 library")
809 (description
810 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
811 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
812 NetCDF files can also be read and modified. Python-HDF4 is a fork of
813 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
814 (license license:expat)))
815
816 (define-public python2-hdf4
817 (package-with-python2 python-hdf4))
818
819 (define-public python-h5py
820 (package
821 (name "python-h5py")
822 (version "2.10.0")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (pypi-uri "h5py" version))
827 (sha256
828 (base32
829 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
830 (build-system python-build-system)
831 (arguments
832 `(#:tests? #f ; no test target
833 #:phases
834 (modify-phases %standard-phases
835 (add-after 'unpack 'fix-hdf5-paths
836 (lambda* (#:key inputs #:allow-other-keys)
837 (let ((prefix (assoc-ref inputs "hdf5")))
838 (substitute* "setup_build.py"
839 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
840 (string-append "['" prefix "/lib" "']"))
841 (("'/opt/local/include', '/usr/local/include'")
842 (string-append "'" prefix "/include" "'")))
843 (substitute* "setup_configure.py"
844 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
845 (string-append "['" prefix "/lib" "']")))
846 #t))))))
847 (propagated-inputs
848 `(("python-six" ,python-six)
849 ("python-numpy" ,python-numpy)))
850 (inputs
851 `(("hdf5" ,hdf5-1.10)))
852 (native-inputs
853 `(("python-cython" ,python-cython)
854 ("python-pkgconfig" ,python-pkgconfig)
855 ("pkg-config" ,pkg-config)))
856 (home-page "https://www.h5py.org/")
857 (synopsis "Read and write HDF5 files from Python")
858 (description
859 "The h5py package provides both a high- and low-level interface to the
860 HDF5 library from Python. The low-level interface is intended to be a
861 complete wrapping of the HDF5 API, while the high-level component supports
862 access to HDF5 files, datasets and groups using established Python and NumPy
863 concepts.")
864 (license license:bsd-3)))
865
866 (define-public python2-h5py
867 (package-with-python2 python-h5py))
868
869 (define-public python-sh
870 (package
871 (name "python-sh")
872 (version "1.12.14")
873 (source
874 (origin
875 (method url-fetch)
876 (uri (pypi-uri "sh" version))
877 (sha256
878 (base32
879 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
880 (build-system python-build-system)
881 (arguments
882 '(#:phases
883 (modify-phases %standard-phases
884 (replace 'check
885 (lambda _
886 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
887 (setenv "HOME" "/tmp")
888 (invoke "python" "sh.py" "test"))))))
889 (native-inputs
890 `(("python-coverage" ,python-coverage)))
891 (home-page "https://github.com/amoffat/sh")
892 (synopsis "Python subprocess replacement")
893 (description "This package provides a replacement for Python's
894 @code{subprocess} feature.")
895 (license license:expat)))
896
897 (define-public python2-sh
898 (package-with-python2 python-sh))
899
900 (define-public python-cftime
901 (package
902 (name "python-cftime")
903 (version "1.0.4.2")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "cftime" version))
908 (sha256
909 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
910 (build-system python-build-system)
911 (propagated-inputs
912 `(("python-numpy" ,python-numpy)))
913 (native-inputs
914 `(("python-coveralls" ,python-coveralls)
915 ("python-cython" ,python-cython)
916 ("python-pytest-cov" ,python-pytest-cov)))
917 (home-page "https://github.com/Unidata/cftime")
918 (synopsis "Library for time handling")
919 (description
920 "This package provides time-handling functionality that used to be part
921 of the netcdf4 package before.")
922 ;; This package claims to include code under the GPLv3 but is released
923 ;; under ISC.
924 (license (list license:isc license:gpl3+))))
925
926 (define-public python-netcdf4
927 (package
928 (name "python-netcdf4")
929 (version "1.5.3")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "netCDF4" version))
934 (sha256
935 (base32
936 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
937 (build-system python-build-system)
938 (arguments
939 '(#:phases
940 (modify-phases %standard-phases
941 (add-after 'unpack 'configure-locations
942 (lambda* (#:key inputs #:allow-other-keys)
943 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
944 #t)))))
945 (native-inputs
946 `(("python-cython" ,python-cython)))
947 (propagated-inputs
948 `(("python-numpy" ,python-numpy)
949 ("python-cftime" ,python-cftime)))
950 (inputs
951 `(("netcdf" ,netcdf)
952 ("hdf4" ,hdf4)
953 ("hdf5" ,hdf5)))
954 (home-page "https://github.com/Unidata/netcdf4-python")
955 (synopsis "Python/numpy interface to the netCDF library")
956 (description "Netcdf4-python is a Python interface to the netCDF C
957 library. netCDF version 4 has many features not found in earlier
958 versions of the library and is implemented on top of HDF5. This module
959 can read and write files in both the new netCDF 4 and the old netCDF 3
960 format, and can create files that are readable by HDF5 clients. The
961 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
962 to users of that module.")
963 ;; The software is mainly ISC, but includes some files covered
964 ;; by the Expat license.
965 (license (list license:isc license:expat))))
966
967 (define-public python-license-expression
968 (package
969 (name "python-license-expression")
970 (version "0.999")
971 (source
972 (origin
973 (method url-fetch)
974 (uri (pypi-uri "license-expression" version))
975 (sha256
976 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
977 (build-system python-build-system)
978 (propagated-inputs
979 `(("python-boolean.py" ,python-boolean.py)))
980 (home-page "https://github.com/nexB/license-expression")
981 (synopsis "Apply boolean logic to license expressions")
982 (description
983 "This Python module defines a tiny language to evaluate and compare
984 license expressions using boolean logic. Logical combinations of licenses can
985 be tested for equality, containment, and equivalence. They can be normalised
986 and simplified. It supports SPDX license expressions as well as other naming
987 conventions and aliases in the same expression.")
988 (license license:gpl2+)))
989
990 (define-public python-lockfile
991 (package
992 (name "python-lockfile")
993 (version "0.12.2")
994 (source
995 (origin
996 (method url-fetch)
997 (uri (pypi-uri "lockfile" version))
998 (sha256
999 (base32
1000 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
1001 (build-system python-build-system)
1002 (arguments '(#:test-target "check"))
1003 (native-inputs
1004 `(("python-pbr" ,python-pbr)))
1005 (home-page "https://launchpad.net/pylockfile")
1006 (synopsis "Platform-independent file locking module")
1007 (description
1008 "The lockfile package exports a LockFile class which provides a simple
1009 API for locking files.")
1010 (license license:expat)))
1011
1012 (define-public python2-lockfile
1013 (package-with-python2 python-lockfile))
1014
1015 (define-public python-filelock
1016 (package
1017 (name "python-filelock")
1018 (version "3.0.12")
1019 (source
1020 (origin
1021 (method url-fetch)
1022 (uri (pypi-uri "filelock" version))
1023 (sha256
1024 (base32
1025 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1026 (build-system python-build-system)
1027 (home-page
1028 "https://github.com/benediktschmitt/py-filelock")
1029 (synopsis "Platform independent file lock")
1030 (description "@code{filelock} contains a single module implementing
1031 a platform independent file lock in Python, which provides a simple way of
1032 inter-process communication.")
1033 (license license:unlicense)))
1034
1035 (define-public python-semantic-version
1036 (package
1037 (name "python-semantic-version")
1038 (version "2.6.0")
1039 (source
1040 (origin
1041 (method url-fetch)
1042 (uri (pypi-uri "semantic_version" version))
1043 (sha256
1044 (base32
1045 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1046 (build-system python-build-system)
1047 (arguments
1048 `(#:tests? #f)) ; PyPI tarball lacks tests
1049 (home-page "https://github.com/rbarrois/python-semanticversion")
1050 (synopsis "Semantic versioning module for Python")
1051 (description
1052 "The @code{semantic_version} class is a small library for handling
1053 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1054
1055 It can compare versions, generate a new version that represents a bump in one of
1056 the version levels, and check whether any given string is a proper semantic
1057 version identifier.")
1058 (license license:bsd-3)))
1059
1060 (define-public python2-semantic-version
1061 (package-with-python2 python-semantic-version))
1062
1063 (define-public python-serpent
1064 (package
1065 (name "python-serpent")
1066 (version "1.28")
1067 (source
1068 (origin
1069 (method url-fetch)
1070 (uri (pypi-uri "serpent" version))
1071 (sha256
1072 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1073 (build-system python-build-system)
1074 (native-inputs
1075 `(("python-attrs" ,python-attrs)
1076 ("python-pytz" ,python-pytz)))
1077 (home-page "https://github.com/irmen/Serpent")
1078 (synopsis "Serializer for literal Python expressions")
1079 (description
1080 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1081 serialization. It serializes an object tree into bytes (an utf-8 encoded
1082 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1083 to rebuild the original object tree.
1084
1085 Because only safe literals are encoded, it is safe to send serpent data to
1086 other machines, such as over the network.")
1087 (properties `((python2-variant . ,(delay python2-serpent))))
1088 (license license:expat)))
1089
1090 (define-public python2-serpent
1091 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1092 (package
1093 (inherit base)
1094 (propagated-inputs
1095 `(("python-enum34" ,python2-enum34)
1096 ,@(package-propagated-inputs base))))))
1097
1098 (define-public python-setuptools
1099 (package
1100 (name "python-setuptools")
1101 (version "41.0.1")
1102 (source
1103 (origin
1104 (method url-fetch)
1105 (uri (pypi-uri "setuptools" version ".zip"))
1106 (sha256
1107 (base32
1108 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1109 (modules '((guix build utils)))
1110 (snippet
1111 '(begin
1112 ;; Remove included binaries which are used to build self-extracting
1113 ;; installers for Windows.
1114 ;; TODO: Find some way to build them ourself so we can include them.
1115 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1116 #t))))
1117 (build-system python-build-system)
1118 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1119 ;; One could bootstrap with an internal untested setuptools.
1120 (arguments
1121 `(#:tests? #f))
1122 (home-page "https://pypi.org/project/setuptools/")
1123 (synopsis
1124 "Library designed to facilitate packaging Python projects")
1125 (description
1126 "Setuptools is a fully-featured, stable library designed to facilitate
1127 packaging Python projects, where packaging includes:
1128 Python package and module definitions,
1129 distribution package metadata,
1130 test hooks,
1131 project installation,
1132 platform-specific details,
1133 Python 3 support.")
1134 ;; TODO: setuptools now bundles the following libraries:
1135 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1136 (license (list license:psfl ; setuptools itself
1137 license:expat ; six, appdirs, pyparsing
1138 license:asl2.0 ; packaging is dual ASL2/BSD-2
1139 license:bsd-2))))
1140
1141 (define-public python2-setuptools
1142 (package-with-python2 python-setuptools))
1143
1144 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1145 (define-public python-setuptools-for-tensorflow
1146 (hidden-package
1147 (package
1148 (inherit python-setuptools)
1149 (version "39.1.0")
1150 (source (origin
1151 (inherit (package-source python-setuptools))
1152 (uri (pypi-uri "setuptools" version ".zip"))
1153 (sha256
1154 (base32
1155 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1156
1157 (define-public python-uniseg
1158 (package
1159 (name "python-uniseg")
1160 (version "0.7.1")
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "uniseg" version ".zip"))
1165 (sha256
1166 (base32
1167 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1168 (build-system python-build-system)
1169 (arguments
1170 '(#:tests? #f)) ; The test suite requires network access.
1171 (native-inputs
1172 `(("unzip" ,unzip)))
1173 (home-page
1174 "https://bitbucket.org/emptypage/uniseg-python")
1175 (synopsis
1176 "Python library to determine Unicode text segmentations")
1177 (description
1178 "Uniseg is a Python package used to determine Unicode text segmentations.
1179 Supported segmentations include:
1180 @enumerate
1181 @item @dfn{Code point} (any value in the Unicode codespace)
1182 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1183 multiple Unicode code points, e.g. \"G\" + acute-accent)
1184 @item Word break
1185 @item Sentence break
1186 @item Line break
1187 @end enumerate")
1188 (license license:expat)))
1189
1190 (define-public python2-uniseg
1191 (package-with-python2 python-uniseg))
1192
1193 (define-public python-humanfriendly
1194 (package
1195 (name "python-humanfriendly")
1196 (version "8.2")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "humanfriendly" version))
1201 (sha256
1202 (base32
1203 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1204 (build-system python-build-system)
1205 (arguments
1206 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1207 #:tests? #f))
1208 (home-page "https://humanfriendly.readthedocs.io")
1209 (synopsis "Human-friendly input and output in Python")
1210 (description
1211 "The functions and classes in @code{humanfriendly} can be used to make
1212 text interfaces more user-friendly. It includes tools to parse and format
1213 numbers, file sizes, and timespans, timers for long-running operations, menus
1214 to allow the user to choose from a list of options, and terminal interaction
1215 helpers.")
1216 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1217 (license license:expat)))
1218
1219 (define-public python2-humanfriendly
1220 (let ((base (package-with-python2
1221 (strip-python2-variant python-humanfriendly))))
1222 (package (inherit base)
1223 (propagated-inputs
1224 `(("python2-monotonic" ,python2-monotonic)
1225 ,@(package-propagated-inputs base))))))
1226
1227 (define-public python-textparser
1228 (package
1229 (name "python-textparser")
1230 (version "0.23.0")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "textparser" version))
1235 (sha256
1236 (base32
1237 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1238 (build-system python-build-system)
1239 (home-page "https://github.com/eerimoq/textparser")
1240 (synopsis "Fast text parser for Python")
1241 (description "This library provides a text parser written in the Python
1242 language. It aims to be fast.")
1243 (license license:expat)))
1244
1245 (define-public python-aenum
1246 (package
1247 (name "python-aenum")
1248 (version "2.2.4")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri (pypi-uri "aenum" version))
1253 (sha256
1254 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1255 (build-system python-build-system)
1256 (arguments
1257 `(#:phases (modify-phases %standard-phases
1258 (replace 'check
1259 (lambda _
1260 (format #t "current working dir ~s~%" (getcwd))
1261 (setenv "PYTHONPATH"
1262 (string-append ".:" (getenv "PYTHONPATH")))
1263 ;; We must run the test suite module directly, as it
1264 ;; fails to define the 'tempdir' variable in scope for
1265 ;; the tests otherwise
1266 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1267 ;; issues/32/running-tests-with-python-setuppy-test).
1268 (invoke "python3" "aenum/test.py")
1269 ;; This one fails with "NameError: name
1270 ;; 'test_pickle_dump_load' is not defined" (see:
1271 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1272 ;; /error-running-the-test_v3py-test-suite).
1273 ;; (invoke "python3" "aenum/test_v3.py")
1274 #t)))))
1275 (home-page "https://bitbucket.org/stoneleaf/aenum")
1276 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1277 (description "The aenum library includes an @code{Enum} base class, a
1278 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1279 class.")
1280 (license license:bsd-3)))
1281
1282 (define-public python-can
1283 (package
1284 (name "python-can")
1285 (version "3.3.3")
1286 (source
1287 (origin
1288 (method url-fetch)
1289 (uri (pypi-uri "python-can" version))
1290 (sha256
1291 (base32
1292 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1293 (build-system python-build-system)
1294 (arguments
1295 `(#:phases (modify-phases %standard-phases
1296 (add-after 'unpack 'relax-version-requirements
1297 (lambda _
1298 (substitute* "setup.py"
1299 (("mock~=2\\.0") "mock")
1300 (("coverage<5") "coverage")
1301 (("pytest~=4\\.3") "pytest")
1302 (("hypothesis~=4\\.56") "hypothesis"))
1303 #t))
1304 (add-after 'unpack 'fix-broken-tests
1305 ;; The tests try to run two scripts it expects should be
1306 ;; in PATH, but they aren't at this time (see:
1307 ;; https://github.com/hardbyte/python-can/issues/805).
1308 (lambda _
1309 (substitute* "test/test_scripts.py"
1310 (("\"can_logger\\.py --help\"") "")
1311 (("\"can_player\\.py --help\"") ""))
1312 #t)))))
1313 (propagated-inputs
1314 `(("python-aenum" ,python-aenum)
1315 ("python-wrapt" ,python-wrapt)))
1316 (native-inputs
1317 `(("python-codecov" ,python-codecov)
1318 ("python-coverage" ,python-coverage)
1319 ("python-future" ,python-future)
1320 ("python-hypothesis" ,python-hypothesis)
1321 ("python-mock" ,python-mock)
1322 ("python-pyserial" ,python-pyserial)
1323 ("python-pytest" ,python-pytest)
1324 ("python-pytest-cov" ,python-pytest-cov)
1325 ("python-pytest-runner" ,python-pytest-runner)
1326 ("python-pytest-timeout" ,python-pytest-timeout)))
1327 (home-page "https://github.com/hardbyte/python-can")
1328 (synopsis "Controller Area Network (CAN) interface module for Python")
1329 (description "This package defines the @code{can} module, which provides
1330 controller area network (CAN) support for Python developers; providing common
1331 abstractions to different hardware devices, and a suite of utilities for
1332 sending and receiving messages on a CAN bus.")
1333 (license license:lgpl3+)))
1334
1335 (define-public python-diskcache
1336 (package
1337 (name "python-diskcache")
1338 (version "4.1.0")
1339 (source
1340 (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "diskcache" version))
1343 (sha256
1344 (base32
1345 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1346 (build-system python-build-system)
1347 (arguments
1348 `(#:tests? #f)) ;test suite not included in the release
1349 (home-page "http://www.grantjenks.com/docs/diskcache/")
1350 (synopsis "Disk and file backed cache library")
1351 (description "DiskCache is a disk and file backed persistent cache.")
1352 (license license:asl2.0)))
1353
1354 (define-public python-bitstruct
1355 (package
1356 (name "python-bitstruct")
1357 (version "8.9.0")
1358 (source
1359 (origin
1360 (method url-fetch)
1361 (uri (pypi-uri "bitstruct" version))
1362 (sha256
1363 (base32
1364 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1365 (build-system python-build-system)
1366 (home-page "https://github.com/eerimoq/bitstruct")
1367 (synopsis "Python values to and C bit field structs converter")
1368 (description "This module performs conversions between Python values and C
1369 bit field structs represented as Python byte strings. It is intended to have
1370 a similar interface as the @code{struct} module from Python, but working on
1371 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1372 (license license:expat)))
1373
1374 (define-public python-cantools
1375 (package
1376 (name "python-cantools")
1377 (version "33.1.1")
1378 (source
1379 (origin
1380 ;; We take the sources from the Git repository as the documentation is
1381 ;; not included with the PyPI archive.
1382 (method git-fetch)
1383 (uri (git-reference
1384 (url "https://github.com/eerimoq/cantools")
1385 (commit version)))
1386 (file-name (git-file-name name version))
1387 (sha256
1388 (base32
1389 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:phases
1393 (modify-phases %standard-phases
1394 (add-after 'build 'build-doc
1395 (lambda _
1396 ;; See: https://github.com/eerimoq/cantools/issues/190.
1397 (substitute* "README.rst"
1398 (("https://github.com/eerimoq/cantools/raw/master\
1399 /docs/monitor.png")
1400 "monitor.png"))
1401 (with-directory-excursion "docs"
1402 (invoke "make" "man" "info"))))
1403 (add-after 'install 'install-doc
1404 (lambda* (#:key outputs #:allow-other-keys)
1405 (let* ((out (assoc-ref outputs "out"))
1406 (info (string-append out "/share/info"))
1407 (man1 (string-append out "/share/man/man1")))
1408 (format #t "CWD: ~s~%" (getcwd))
1409 (install-file "docs/_build/texinfo/cantools.info" info)
1410 (install-file "docs/_build/man/cantools.1" man1)
1411 #t))))))
1412 (native-inputs
1413 `(("sphinx" ,python-sphinx)
1414 ("texinfo" ,texinfo)))
1415 (propagated-inputs
1416 `(("python-bitstruct" ,python-bitstruct)
1417 ("python-can" ,python-can)
1418 ("python-diskcache" ,python-diskcache)
1419 ("python-textparser" ,python-textparser)))
1420 (home-page "https://github.com/eerimoq/cantools")
1421 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1422 (description "This package includes Controller Area Network (CAN) related
1423 tools that can be used to:
1424 @itemize
1425 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1426 @item encode and decode CAN messages
1427 @item multiplex simple and extended signals
1428 @item diagnose DID encoding and decoding
1429 @item dump the CAN decoder output
1430 @item test CAN nodes
1431 @item generate C source code
1432 @item monitor the CAN bus
1433 @end itemize")
1434 (license license:expat)))
1435
1436 (define-public python-capturer
1437 (package
1438 (name "python-capturer")
1439 (version "2.4")
1440 (source
1441 (origin
1442 (method url-fetch)
1443 (uri (pypi-uri "capturer" version))
1444 (sha256
1445 (base32
1446 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1447 (build-system python-build-system)
1448 (arguments
1449 `(#:tests? #f))
1450 (propagated-inputs
1451 `(("python-humanfriendly" ,python-humanfriendly)))
1452 (home-page "https://capturer.readthedocs.io")
1453 (synopsis "Capture stdout and stderr streams of the current process")
1454 (description
1455 "The capturer package makes it easy to capture the stdout and stderr
1456 streams of the current process and subprocesses. Output can be relayed
1457 to the terminal in real time but is also available to the Python program
1458 for additional processing.")
1459 (license license:expat)))
1460
1461 (define-public python2-capturer
1462 (package-with-python2 python-capturer))
1463
1464 (define-public python-case
1465 (package
1466 (name "python-case")
1467 (version "1.5.3")
1468 (source
1469 (origin
1470 (method url-fetch)
1471 (uri (pypi-uri "case" version))
1472 (sha256
1473 (base32
1474 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1475 (build-system python-build-system)
1476 (propagated-inputs
1477 `(("python-mock" ,python-mock)
1478 ("python-nose" ,python-nose)
1479 ("python-six" ,python-six)
1480 ("python-unittest2" ,python-unittest2)))
1481 (native-inputs
1482 `(("python-coverage" ,python-coverage)))
1483 (home-page "https://github.com/celery/case")
1484 (synopsis "Unittest utilities and convenience methods")
1485 (description
1486 "The @code{case} package provides utilities on top of unittest, including
1487 some helpful Python 2 compatibility convenience methods.")
1488 (license license:bsd-3)))
1489
1490 (define-public python-verboselogs
1491 (package
1492 (name "python-verboselogs")
1493 (version "1.7")
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "verboselogs" version))
1498 (sha256
1499 (base32
1500 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1501 (build-system python-build-system)
1502 (arguments
1503 `(#:phases
1504 (modify-phases %standard-phases
1505 (replace 'check
1506 (lambda _
1507 ;; Do not run pylint plugin test, as astroid is an old
1508 ;; unsupported version.
1509 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1510 "verboselogs/tests.py"))))))
1511 (native-inputs
1512 `(("python-mock" ,python-mock)
1513 ("python-pytest" ,python-pytest)))
1514 (home-page "https://verboselogs.readthedocs.io")
1515 (synopsis "Verbose logging level for Python's logging module")
1516 (description
1517 "The @code{verboselogs} package extends Python's @code{logging} module to
1518 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1519 (license license:expat)))
1520
1521 (define-public python2-verboselogs
1522 (package-with-python2 python-verboselogs))
1523
1524 (define-public python-coloredlogs
1525 (package
1526 (name "python-coloredlogs")
1527 (version "10.0")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "coloredlogs" version))
1532 (sha256
1533 (base32
1534 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(;Tests require some updated modules
1538 #:tests? #f))
1539 (propagated-inputs
1540 `(("python-capturer" ,python-capturer)))
1541 (home-page "https://coloredlogs.readthedocs.io")
1542 (synopsis "Colored stream handler for Python's logging module")
1543 (description
1544 "The @code{coloredlogs} package enables colored terminal output for
1545 Python's logging module. The @code{ColoredFormatter} class inherits from
1546 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1547 messages in color.")
1548 (license license:expat)))
1549
1550 (define-public python2-coloredlogs
1551 (package-with-python2 python-coloredlogs))
1552
1553 (define-public python-editorconfig
1554 (package
1555 (name "python-editorconfig")
1556 (version "0.12.2")
1557 (source
1558 (origin
1559 (method url-fetch)
1560 (uri (pypi-uri "EditorConfig" version))
1561 (sha256
1562 (base32
1563 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1564 (build-system python-build-system)
1565 (home-page "https://editorconfig.org/")
1566 (synopsis "EditorConfig bindings for python")
1567 (description "The EditorConfig project consists of a file format for
1568 defining coding styles and a collection of text editor plugins that enable
1569 editors to read the file format and adhere to defined styles. EditorConfig
1570 files are easily readable and they work nicely with version control systems.")
1571 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1572 (license (list license:bsd-2 license:psfl))))
1573
1574 (define-public dosage
1575 (package
1576 (name "dosage")
1577 (version "2.17")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "dosage" version))
1582 (sha256
1583 (base32
1584 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1585 (build-system python-build-system)
1586 (propagated-inputs
1587 `(("python2-backports-functools-lru-cache"
1588 ,python2-backports-functools-lru-cache)
1589 ("python2-backports-shutil-get-terminal-size"
1590 ,python2-backports-shutil-get-terminal-size)
1591 ("python-cached-property" ,python-cached-property)
1592 ("python-colorama" ,python-colorama)
1593 ("python-imagesize" ,python-imagesize)
1594 ("python-importlib-metadata" ,python-importlib-metadata)
1595 ("python-lxml" ,python-lxml)
1596 ("python-requests" ,python-requests)
1597 ("python-six" ,python-six)))
1598 (native-inputs
1599 `(("python-pytest-cov" ,python-pytest-cov)
1600 ("python-pytest-xdist" ,python-pytest-xdist)
1601 ("python-responses" ,python-responses)
1602 ("python-setuptools-scm" ,python-setuptools-scm)))
1603 (home-page "https://github.com/webcomics/dosage")
1604 (synopsis "Comic strip downloader and archiver")
1605 (description "Dosage is designed to keep a local copy of specific webcomics and other
1606 picture-based content such as Picture of the Day sites. With the @command{dosage}
1607 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1608 downloaded, or download a strip for a particular date or index, if possible.")
1609 (license license:expat)))
1610
1611 (define-public python-et-xmlfile
1612 (package
1613 (name "python-et-xmlfile")
1614 (version "1.0.1")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (pypi-uri "et_xmlfile" version))
1619 (sha256
1620 (base32
1621 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:phases (modify-phases %standard-phases
1625 (replace 'check
1626 (lambda _
1627 (invoke "pytest"))))))
1628 (native-inputs
1629 `(("python-pytest" ,python-pytest)
1630 ("python-lxml" ,python-lxml))) ;used for the tests
1631 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1632 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1633 (description "This Python library is based upon the @code{xmlfile} module
1634 from @code{lxml}. It aims to provide a low memory, compatible implementation
1635 of @code{xmlfile}.")
1636 (license license:expat)))
1637
1638 (define-public python2-et-xmlfile
1639 (package-with-python2 python-et-xmlfile))
1640
1641 (define-public python-openpyxl
1642 (package
1643 (name "python-openpyxl")
1644 (version "3.0.5")
1645 (source
1646 (origin
1647 ;; We use the upstream repository, as the tests are not included in the
1648 ;; PyPI releases.
1649 (method hg-fetch)
1650 (uri (hg-reference
1651 (url "https://foss.heptapod.net/openpyxl/openpyxl")
1652 (changeset version)))
1653 (file-name (string-append name "-" version "-checkout"))
1654 (sha256
1655 (base32 "0s6fgwwkcfz1bnrp5gjd4g2lcbl4a76147ylkrmkbabi2nf4xlli"))))
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 ;; For the test suite.
1664 `(("python-lxml" ,python-lxml)
1665 ("python-pillow" ,python-pillow)
1666 ("python-pytest" ,python-pytest)))
1667 (propagated-inputs
1668 `(("python-et-xmlfile" ,python-et-xmlfile)
1669 ("python-jdcal" ,python-jdcal)))
1670 (home-page "https://openpyxl.readthedocs.io")
1671 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1672 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1673 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1674 standard.")
1675 (properties `((python2-variant . ,(delay python2-openpyxl))))
1676 (license license:expat)))
1677
1678 (define-public python2-openpyxl
1679 (let ((base (package-with-python2
1680 (strip-python2-variant python-openpyxl))))
1681 (package
1682 (inherit base)
1683 ;; This is the latest version that has python2 support
1684 (version "2.6.4")
1685 (source
1686 (origin
1687 (method url-fetch)
1688 (uri (pypi-uri "openpyxl" version))
1689 (sha256
1690 (base32
1691 "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
1692 (arguments '(#:tests? #f))))) ; No test suite.
1693
1694 (define-public python-eventlet
1695 (package
1696 (name "python-eventlet")
1697 (version "0.25.1")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "eventlet" version))
1702 (sha256
1703 (base32
1704 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1705 (build-system python-build-system)
1706 (propagated-inputs
1707 `(("python-greenlet" ,python-greenlet)))
1708 (arguments
1709 ;; TODO: Requires unpackaged 'enum-compat'.
1710 '(#:tests? #f))
1711 (home-page "https://eventlet.net")
1712 (synopsis "Concurrent networking library for Python")
1713 (description
1714 "Eventlet is a concurrent networking library for Python that
1715 allows you to change how you run your code, not how you write it.
1716 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1717 Coroutines ensure that the developer uses a blocking style of programming
1718 that is similar to threading, but provide the benefits of non-blocking I/O.
1719 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1720 from the Python interpreter, or as a small part of a larger application.")
1721 (license license:expat)))
1722
1723 (define-public python2-eventlet
1724 (let ((base (package-with-python2
1725 (strip-python2-variant python-eventlet))))
1726 (package (inherit base)
1727 (propagated-inputs
1728 `(("python2-enum34" ,python2-enum34)
1729 ,@(package-propagated-inputs base))))))
1730
1731 (define-public python-six
1732 (package
1733 (name "python-six")
1734 (version "1.14.0")
1735 (source
1736 (origin
1737 (method url-fetch)
1738 (uri (pypi-uri "six" version))
1739 (sha256
1740 (base32
1741 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1742 (build-system python-build-system)
1743 (arguments
1744 `(#:phases
1745 (modify-phases %standard-phases
1746 (replace 'check
1747 (lambda _
1748 (invoke "py.test" "-v"))))))
1749 (native-inputs
1750 `(("python-pytest" ,python-pytest-bootstrap)))
1751 (home-page "https://pypi.org/project/six/")
1752 (synopsis "Python 2 and 3 compatibility utilities")
1753 (description
1754 "Six is a Python 2 and 3 compatibility library. It provides utility
1755 functions for smoothing over the differences between the Python versions with
1756 the goal of writing Python code that is compatible on both Python versions.
1757 Six supports every Python version since 2.5. It is contained in only one
1758 Python file, so it can be easily copied into your project.")
1759 (license license:x11)))
1760
1761 (define-public python2-six
1762 (package-with-python2 python-six))
1763
1764 (define-public python-six-bootstrap
1765 (package
1766 (inherit python-six)
1767 (name "python-six-bootstrap")
1768 (native-inputs `())
1769 (arguments `(#:tests? #f))))
1770
1771 (define-public python2-six-bootstrap
1772 (package-with-python2 python-six-bootstrap))
1773
1774 (define-public python-schedule
1775 (package
1776 (name "python-schedule")
1777 (version "0.4.3")
1778 (source
1779 (origin
1780 (method url-fetch)
1781 (uri (pypi-uri "schedule" version))
1782 (sha256
1783 (base32
1784 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1785 (build-system python-build-system)
1786 (native-inputs
1787 `(("python-pytest" ,python-pytest)
1788 ("python-mock" ,python-mock)))
1789 (home-page "https://github.com/dbader/schedule")
1790 (synopsis "Schedule periodic function calls in Python")
1791 (description
1792 "Schedule is an in-process scheduler for periodic jobs that uses the
1793 builder pattern for configuration. Schedule lets you run Python functions (or
1794 any other callable) periodically at pre-determined intervals using a simple,
1795 human-friendly syntax.")
1796 (license license:expat)))
1797
1798 (define-public python2-schedule
1799 (package-with-python2 python-schedule))
1800
1801 (define-public python-scour
1802 (package
1803 (name "python-scour")
1804 (version "038.1")
1805 (source
1806 (origin
1807 (method git-fetch)
1808 (uri
1809 (git-reference
1810 (url "https://github.com/scour-project/scour")
1811 (commit
1812 (string-append "v" version))))
1813 (file-name (git-file-name name version))
1814 (sha256
1815 (base32 "0rgiypb9ig8x4rl3hfzpy7kwnx1q3064nvlrv4fk0dnp84girn0v"))))
1816 (propagated-inputs
1817 `(("python-six" ,python-six)))
1818 (build-system python-build-system)
1819 (home-page "https://github.com/scour-project/scour")
1820 (synopsis "Scour is an SVG optimizer/cleaner written in Python")
1821 (description "The goal of Scour is to output a file that renderes
1822 identically at a fraction of the size by removing a lot of redundant
1823 information created by most SVG editors. Optimization options are typically
1824 lossless but can be tweaked for more aggressive cleaning.")
1825 (license license:asl2.0)))
1826
1827 (define-public python-mechanize
1828 (package
1829 (name "python-mechanize")
1830 (version "0.4.5")
1831 (source
1832 (origin
1833 (method url-fetch)
1834 (uri (pypi-uri "mechanize" version))
1835 (sha256
1836 (base32
1837 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1838 (build-system python-build-system)
1839 (propagated-inputs
1840 `(("python-html5lib" ,python-html5lib)))
1841 (home-page "https://github.com/python-mechanize/mechanize")
1842 (synopsis
1843 "Stateful programmatic web browsing in Python")
1844 (description
1845 "Mechanize implements stateful programmatic web browsing in Python,
1846 after Andy Lester’s Perl module WWW::Mechanize.")
1847 (license license:bsd-3)))
1848
1849 (define-public python2-mechanize
1850 (package-with-python2 python-mechanize))
1851
1852 (define-public python-simpleaudio
1853 (package
1854 (name "python-simpleaudio")
1855 (version "1.0.4")
1856 (source
1857 (origin
1858 (method url-fetch)
1859 (uri (pypi-uri "simpleaudio" version))
1860 (sha256
1861 (base32
1862 "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
1863 (build-system python-build-system)
1864 (arguments
1865 `(#:tests? #f))
1866 (inputs
1867 `(("alsa-lib" ,alsa-lib)))
1868 (home-page
1869 "https://github.com/hamiltron/py-simple-audio")
1870 (synopsis "Simple, asynchronous audio playback for Python 3")
1871 (description
1872 "The @code{simplaudio} package provides cross-platform, dependency-free
1873 audio playback capability for Python 3 on OSX, Windows, and Linux.")
1874 (license license:expat))) ; MIT license
1875
1876 (define-public python-simplejson
1877 (package
1878 (name "python-simplejson")
1879 (version "3.17.0")
1880 (source
1881 (origin
1882 (method url-fetch)
1883 (uri (pypi-uri "simplejson" version))
1884 (sha256
1885 (base32
1886 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1887 (build-system python-build-system)
1888 (home-page "http://simplejson.readthedocs.org/en/latest/")
1889 (synopsis
1890 "Json library for Python")
1891 (description
1892 "JSON (JavaScript Object Notation) is a subset of JavaScript
1893 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1894 format.
1895
1896 Simplejson exposes an API familiar to users of the standard library marshal
1897 and pickle modules. It is the externally maintained version of the json
1898 library contained in Python 2.6, but maintains compatibility with Python 2.5
1899 and (currently) has significant performance advantages, even without using
1900 the optional C extension for speedups. Simplejson is also supported on
1901 Python 3.3+.")
1902 (license license:x11)))
1903
1904 (define-public python2-simplejson
1905 (package-with-python2 python-simplejson))
1906
1907
1908 (define-public python-pyicu
1909 (package
1910 (name "python-pyicu")
1911 (version "2.4.3")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "PyICU" version))
1916 (sha256
1917 (base32
1918 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1919 (build-system python-build-system)
1920 (inputs
1921 `(("icu4c" ,icu4c)))
1922 (native-inputs
1923 `(("python-pytest" ,python-pytest)
1924 ("python-six" ,python-six)))
1925 (home-page "https://github.com/ovalhub/pyicu")
1926 (synopsis "Python extension wrapping the ICU C++ API")
1927 (description
1928 "PyICU is a python extension wrapping the ICU C++ API.")
1929 (license license:x11)))
1930
1931 (define-public python2-pyicu
1932 (package-with-python2 python-pyicu))
1933
1934 (define-public python-dogtail
1935 (package
1936 (name "python-dogtail")
1937 (version "0.9.11")
1938 (source (origin
1939 (method url-fetch)
1940 (uri
1941 (string-append
1942 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1943 "dogtail-" version ".tar.gz"))
1944 (sha256
1945 (base32
1946 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1947 (build-system python-build-system)
1948 (arguments
1949 `(#:tests? #f ; TODO Launching dbus for the tests
1950 ; fails
1951 #:phases
1952 (modify-phases %standard-phases
1953 (replace 'check
1954 (lambda* (#:key tests? #:allow-other-keys)
1955 (when tests?
1956 (system "Xvfb :1 &")
1957 (setenv "DISPLAY" ":1")
1958 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1959 #t)))))
1960 (propagated-inputs
1961 `(("python-pygobject" ,python-pygobject)
1962 ("python-pycairo" ,python-pycairo)
1963 ("python-pyatspi" ,python-pyatspi)))
1964 (native-inputs
1965 `(("python-nose" ,python-nose)
1966 ("gtk+" ,gtk+)
1967 ("xvfb" ,xorg-server)
1968 ("dbus" ,dbus)
1969 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1970 ("gobject-introspection" ,gobject-introspection)))
1971 (home-page "https://gitlab.com/dogtail/dogtail/")
1972 (synopsis "GUI test tool and automation framework written in Python")
1973 (description
1974 "Dogtail is a GUI test tool and automation framework written in Python.
1975 It uses Accessibility (a11y) technologies to communicate with desktop
1976 applications. dogtail scripts are written in Python and executed like any
1977 other Python program.")
1978 (license license:gpl2+)))
1979
1980 (define-public python2-dogtail
1981 (package-with-python2 python-dogtail))
1982
1983 (define-public python-empy
1984 (package
1985 (name "python-empy")
1986 (version "3.3.3")
1987 (source (origin
1988 (method url-fetch)
1989 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1990 version ".tar.gz"))
1991 (sha256
1992 (base32
1993 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1994 (build-system python-build-system)
1995 (arguments
1996 `(#:tests? #f)) ; python2 only
1997 (home-page "http://www.alcyone.com/software/empy/")
1998 (synopsis "Templating system for Python")
1999 (description
2000 "EmPy is a system for embedding Python expressions and statements in
2001 template text; it takes an EmPy source file, processes it, and produces
2002 output. This is accomplished via expansions, which are special signals to the
2003 EmPy system and are set off by a special prefix (by default the at sign, @@).
2004 EmPy can expand arbitrary Python expressions and statements in this way, as
2005 well as a variety of special forms. Textual data not explicitly delimited in
2006 this way is sent unaffected to the output, allowing Python to be used in
2007 effect as a markup language. Also supported are callbacks via hooks,
2008 recording and playback via diversions, and dynamic, chainable filters. The
2009 system is highly configurable via command line options and embedded
2010 commands.")
2011 (license license:lgpl2.1+)))
2012
2013 (define-public python2-empy
2014 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
2015 (package
2016 (inherit base)
2017 (arguments `(,@(package-arguments base)
2018 #:tests? #t)))))
2019
2020 (define-public python2-element-tree
2021 (package
2022 (name "python2-element-tree")
2023 (version "1.2.6")
2024 (source (origin
2025 (method url-fetch)
2026 (uri (string-append
2027 "http://effbot.org/media/downloads/elementtree-"
2028 version "-20050316.tar.gz"))
2029 (sha256
2030 (base32
2031 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
2032 (build-system python-build-system)
2033 (arguments
2034 `(#:python ,python-2 ; seems to be part of Python 3
2035 #:tests? #f)) ; no 'test' sub-command
2036 (synopsis "Toolkit for XML processing in Python")
2037 (description
2038 "ElementTree is a Python library supporting lightweight XML processing.")
2039 (home-page "https://effbot.org/zone/element-index.htm")
2040 (license (license:x11-style
2041 "http://docs.python.org/2/license.html"
2042 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
2043
2044 (define-public python2-pybugz
2045 (package
2046 (name "python2-pybugz")
2047 (version "0.6.11")
2048 (source (origin
2049 (method url-fetch)
2050 (uri (string-append
2051 "http://bits.liquidx.net/projects/pybugz/pybugz-"
2052 version ".tar.gz"))
2053 (sha256
2054 (base32
2055 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
2056 (patches (search-patches "pybugz-stty.patch"
2057 "pybugz-encode-error.patch"))))
2058 (build-system python-build-system)
2059 (arguments
2060 `(#:python ,python-2 ; SyntaxError with Python 3
2061 #:tests? #f)) ; no 'test' sub-command
2062 (propagated-inputs
2063 `(("element-tree" ,python2-element-tree)))
2064 (synopsis "Python and command-line interface to Bugzilla")
2065 (description
2066 "PyBugz is a Python library and command-line tool to query the Bugzilla
2067 bug tracking system. It is meant as an aid to speed up interaction with the
2068 bug tracker.")
2069 (home-page "http://www.liquidx.net/pybugz/")
2070 (license license:gpl2)))
2071
2072 (define-public python2-enum
2073 (package
2074 (name "python2-enum")
2075 (version "0.4.6")
2076 (source (origin
2077 (method url-fetch)
2078 (uri (pypi-uri "enum" version))
2079 (sha256
2080 (base32
2081 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
2082 (build-system python-build-system)
2083 (arguments
2084 `(#:python ,python-2))
2085 (home-page "https://pypi.org/project/enum/")
2086 (synopsis "Robust enumerated type support in Python")
2087 (description
2088 "This provides a module for robust enumerations in Python. It has
2089 been superseded by the Python standard library and is provided only for
2090 compatibility.")
2091 ;; Choice of either license.
2092 (license (list license:gpl3+ license:psfl))))
2093
2094 (define-public python-enum34
2095 (package
2096 (name "python-enum34")
2097 (version "1.1.6")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "enum34" version))
2102 (sha256
2103 (base32
2104 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2105 (build-system python-build-system)
2106 (home-page "https://pypi.org/project/enum34/")
2107 (synopsis "Backported Python 3.4 Enum")
2108 (description
2109 "Enum34 is the new Python stdlib enum module available in Python 3.4
2110 backported for previous versions of Python from 2.4 to 3.3.")
2111 (license license:bsd-3)))
2112
2113 (define-public python2-enum34
2114 (package-with-python2 python-enum34))
2115
2116 (define-public python-parse-type
2117 (package
2118 (name "python-parse-type")
2119 (version "0.4.2")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (pypi-uri "parse_type" version))
2124 (sha256
2125 (base32
2126 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2127 (build-system python-build-system)
2128 (propagated-inputs
2129 `(("python-six" ,python-six)
2130 ("python-parse" ,python-parse)))
2131 (native-inputs
2132 `(("python-pytest" ,python-pytest)
2133 ("python-pytest-runner" ,python-pytest-runner)))
2134 (home-page "https://github.com/jenisys/parse_type")
2135 (synopsis "Extended parse module")
2136 (description
2137 "Parse_type extends the python parse module.")
2138 (properties
2139 `((python2-variant . ,(delay python2-parse-type))))
2140 (license license:bsd-3)))
2141
2142 (define-public python2-parse-type
2143 (let ((base (package-with-python2
2144 (strip-python2-variant python-parse-type))))
2145 (package (inherit base)
2146 (propagated-inputs
2147 `(("python2-enum34" ,python2-enum34)
2148 ,@(package-propagated-inputs base))))))
2149
2150 (define-public python-parse
2151 (package
2152 (name "python-parse")
2153 (version "1.8.4")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "parse" version))
2158 (sha256
2159 (base32
2160 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2161 (build-system python-build-system)
2162 (arguments
2163 `(#:phases
2164 (modify-phases %standard-phases
2165 (replace 'check
2166 (lambda _ (invoke "python" "test_parse.py"))))))
2167 (home-page "https://github.com/r1chardj0n3s/parse")
2168 (synopsis "Parse strings")
2169 (description
2170 "Parse strings using a specification based on the Python @code{format()}
2171 syntax.")
2172 (license license:x11)))
2173
2174 (define-public python-polib
2175 (package
2176 (name "python-polib")
2177 (version "1.0.8")
2178 (source (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "polib" version))
2181 (sha256
2182 (base32
2183 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2184 (build-system python-build-system)
2185 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2186 (synopsis "Manipulate, create and modify gettext files")
2187 (description "Polib can manipulate any gettext format (po, pot and mo)
2188 files. It can be used to create po files from scratch or to modify
2189 existing ones.")
2190 (license license:expat)))
2191
2192 (define-public python2-polib
2193 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2194 (package
2195 (inherit base)
2196 (arguments `(,@(package-arguments base)
2197 ;; Tests don't work with python2.
2198 #:tests? #f)))))
2199
2200 (define-public python-poyo
2201 (package
2202 (name "python-poyo")
2203 (version "0.5.0")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "poyo" version))
2208 (sha256
2209 (base32
2210 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2211 (build-system python-build-system)
2212 (home-page "https://github.com/hackebrot/poyo")
2213 (synopsis "Lightweight YAML Parser for Python")
2214 (description
2215 "This package provides a lightweight YAML Parser for Python. It supports
2216 only a chosen subset of the YAML format that is required to parse cookiecutter
2217 user configuration files. It does not have support for serializing into YAML
2218 and is not compatible with JSON.")
2219 (license license:expat)))
2220
2221 (define-public scons
2222 (package
2223 (name "scons")
2224 (version "3.0.4")
2225 (source (origin
2226 (method git-fetch)
2227 (uri (git-reference
2228 (url "https://github.com/SCons/scons")
2229 (commit version)))
2230 (file-name (git-file-name name version))
2231 (sha256
2232 (base32
2233 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2234 (build-system python-build-system)
2235 (arguments
2236 `(#:use-setuptools? #f ; still relies on distutils
2237 #:tests? #f ; no 'python setup.py test' command
2238 #:phases
2239 (modify-phases %standard-phases
2240 (add-before 'build 'bootstrap
2241 (lambda _
2242 (substitute* "src/engine/SCons/compat/__init__.py"
2243 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2244 "sys.modules[new] = __import__(old)"))
2245 (substitute* "src/engine/SCons/Platform/__init__.py"
2246 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2247 "mod = __import__(full_name)"))
2248 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2249 (chdir "build/scons")
2250 #t)))))
2251 (home-page "https://scons.org/")
2252 (synopsis "Software construction tool written in Python")
2253 (description
2254 "SCons is a software construction tool. Think of SCons as an improved,
2255 cross-platform substitute for the classic Make utility with integrated
2256 functionality similar to autoconf/automake and compiler caches such as ccache.
2257 In short, SCons is an easier, more reliable and faster way to build
2258 software.")
2259 (license license:x11)))
2260
2261 (define-public scons-python2
2262 (package
2263 (inherit (package-with-python2 scons))
2264 (name "scons-python2")))
2265
2266 (define-public python-extras
2267 (package
2268 (name "python-extras")
2269 (version "1.0.0")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (pypi-uri "extras" version))
2274 (sha256
2275 (base32
2276 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2277 (build-system python-build-system)
2278 (arguments
2279 ;; FIXME: Circular dependency on testtools.
2280 '(#:tests? #f))
2281 (home-page "https://github.com/testing-cabal/extras")
2282 (synopsis "Useful extensions to the Python standard library")
2283 (description
2284 "Extras is a set of extensions to the Python standard library.")
2285 (license license:expat)))
2286
2287 (define-public python2-extras
2288 (package-with-python2 python-extras))
2289
2290 (define-public python-mimeparse
2291 (package
2292 (name "python-mimeparse")
2293 (version "1.6.0")
2294 (source
2295 (origin
2296 (method url-fetch)
2297 (uri (pypi-uri "python-mimeparse" version))
2298 (sha256
2299 (base32
2300 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2301 (build-system python-build-system)
2302 (arguments
2303 '(#:phases
2304 (modify-phases %standard-phases
2305 (replace 'check
2306 (lambda _
2307 (invoke "./mimeparse_test.py"))))))
2308 (home-page
2309 "https://github.com/dbtsai/python-mimeparse")
2310 (synopsis "Python library for parsing MIME types")
2311 (description
2312 "Mimeparse provides basic functions for parsing MIME type names and
2313 matching them against a list of media-ranges.")
2314 (license license:expat)))
2315
2316 (define-public python2-mimeparse
2317 (package-with-python2 python-mimeparse))
2318
2319 (define-public python-miniboa
2320 (package
2321 (name "python-miniboa")
2322 (version "1.0.7")
2323 (source
2324 (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "miniboa" version))
2327 (sha256
2328 (base32
2329 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2330 (build-system python-build-system)
2331 (home-page "https://github.com/shmup/miniboa")
2332 (synopsis "Simple, single-threaded Telnet server")
2333 (description
2334 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2335 server.")
2336 (license license:asl2.0)))
2337
2338 (define-public python2-miniboa
2339 (package-with-python2 python-miniboa))
2340
2341 (define-public python-pafy
2342 (package
2343 (name "python-pafy")
2344 (version "0.5.3.1")
2345 (source
2346 (origin
2347 (method url-fetch)
2348 (uri (pypi-uri "pafy" version))
2349 (sha256
2350 (base32
2351 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2352 (build-system python-build-system)
2353 (arguments
2354 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2355 (propagated-inputs
2356 ;; Youtube-dl is a python package which is imported in the file
2357 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2358 `(("youtube-dl" ,youtube-dl)))
2359 (home-page "https://np1.github.io/pafy/")
2360 (synopsis "Retrieve YouTube content and metadata")
2361 (description
2362 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2363 (license license:lgpl3+)))
2364
2365 (define-public python2-funcsigs
2366 (package
2367 (name "python2-funcsigs")
2368 (version "1.0.2")
2369 (source (origin
2370 (method url-fetch)
2371 (uri (pypi-uri "funcsigs" version))
2372 (sha256
2373 (base32
2374 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2375 (build-system python-build-system)
2376 (arguments
2377 `(#:python ,python-2))
2378 (native-inputs
2379 `(("python2-unittest2" ,python2-unittest2)))
2380 (home-page "http://funcsigs.readthedocs.org")
2381 (synopsis "Python function signatures from PEP362")
2382 (description
2383 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2384 (license license:asl2.0)))
2385
2386 (define-public python2-funcsigs-bootstrap
2387 (package
2388 (inherit python2-funcsigs)
2389 (name "python2-funcsigs-bootstrap")
2390 (native-inputs `())
2391 (arguments
2392 `(#:tests? #f
2393 ,@(package-arguments python2-funcsigs)))))
2394
2395 (define-public python-py
2396 (package
2397 (name "python-py")
2398 (version "1.8.1")
2399 (source
2400 (origin
2401 (method url-fetch)
2402 (uri (pypi-uri "py" version))
2403 (sha256
2404 (base32
2405 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2406 (build-system python-build-system)
2407 (arguments
2408 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2409 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2410 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2411 ;; Is this module globally installed?"
2412 '(#:tests? #f))
2413 (native-inputs
2414 `(("python-setuptools-scm" ,python-setuptools-scm)))
2415 (home-page "https://github.com/pytest-dev/py")
2416 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2417 (description
2418 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2419 code introspection, and logging.")
2420 (license license:expat)))
2421
2422 (define-public python2-py
2423 (package-with-python2 python-py))
2424
2425 ;; Recent versions of python-fixtures and python-testrepository need
2426 ;; python-pbr for packaging, which itself needs these two packages for
2427 ;; testing.
2428 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2429 ;; same source, just without any test dependencies and with tests disabled.
2430 ;; python-pbr-minmal is then used to package python-fixtures and
2431 ;; python-testrepository.
2432 ;; Strictly speaking we currently could remove the test-requirements from the
2433 ;; normal python-pbr package (and save this package) since test are disabled
2434 ;; there anyway. But this may change in future.
2435 (define-public python-pbr-minimal
2436 (package
2437 (name "python-pbr-minimal")
2438 (version "3.0.1")
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (pypi-uri "pbr" version))
2443 (sha256
2444 (base32
2445 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2446 (build-system python-build-system)
2447 (arguments
2448 `(#:tests? #f))
2449 (home-page "https://docs.openstack.org/pbr/latest/")
2450 (synopsis "Minimal build of python-pbr used for bootstrapping")
2451 (description
2452 "Used only for bootstrapping python2-pbr, you should not need this.")
2453 (license license:asl2.0)))
2454
2455 (define-public python2-pbr-minimal
2456 (package-with-python2 python-pbr-minimal))
2457
2458 (define-public python-pbr
2459 (package
2460 (inherit python-pbr-minimal)
2461 (name "python-pbr")
2462 (arguments
2463 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2464 (propagated-inputs
2465 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2466 (native-inputs
2467 `(("python-fixtures" ,python-fixtures-bootstrap)
2468 ;; discover, coverage, hacking, subunit
2469 ("python-mock" ,python-mock)
2470 ("python-six" ,python-six)
2471 ("python-sphinx" ,python-sphinx)
2472 ("python-testrepository" ,python-testrepository-bootstrap)
2473 ("python-testresources" ,python-testresources-bootstrap)
2474 ("python-testscenarios" ,python-testscenarios-bootstrap)
2475 ("python-testtools" ,python-testtools-bootstrap)
2476 ("python-virtualenv" ,python-virtualenv)))
2477 (synopsis "Enhance the default behavior of Python’s setuptools")
2478 (description
2479 "Python Build Reasonableness (PBR) is a library that injects some useful
2480 and sensible default behaviors into your setuptools run. It will set
2481 versions, process requirements files and generate AUTHORS and ChangeLog file
2482 from git information.
2483 ")))
2484
2485 (define-public python2-pbr
2486 (package-with-python2 python-pbr))
2487
2488 (define-public python-pyrsistent
2489 (package
2490 (name "python-pyrsistent")
2491 (version "0.16.0")
2492 (home-page "https://github.com/tobgu/pyrsistent")
2493 (source (origin
2494 (method url-fetch)
2495 (uri (pypi-uri "pyrsistent" version))
2496 (sha256
2497 (base32
2498 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2499 (build-system python-build-system)
2500 (arguments
2501 '(#:phases (modify-phases %standard-phases
2502 ;; The package works fine with newer Pytest and Hypothesis, but
2503 ;; has pinned older versions to stay compatible with Python 2.
2504 (add-before 'check 'loosen-pytest-requirement
2505 (lambda _
2506 (substitute* "setup.py"
2507 (("pytest<5") "pytest")
2508 (("hypothesis<5") "hypothesis"))
2509 #t)))))
2510 (native-inputs
2511 `(("python-hypothesis" ,python-hypothesis)
2512 ("python-pytest" ,python-pytest)
2513 ("python-pytest-runner" ,python-pytest-runner)))
2514 (propagated-inputs
2515 `(("python-six" ,python-six)))
2516 (synopsis "Persistent data structures for Python")
2517 (description
2518 "Pyrsistent is a number of persistent collections (by some referred to as
2519 functional data structures). Persistent in the sense that they are immutable.
2520
2521 All methods on a data structure that would normally mutate it instead return a
2522 new copy of the structure containing the requested updates. The original
2523 structure is left untouched.")
2524 (license license:expat)))
2525
2526 (define-public python2-pyrsistent
2527 (package-with-python2 python-pyrsistent))
2528
2529 (define-public python-exif-read
2530 (package
2531 (name "python-exif-read")
2532 (version "2.1.2")
2533 (source (origin
2534 (method url-fetch)
2535 (uri (pypi-uri "ExifRead" version))
2536 (sha256
2537 (base32
2538 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2539 (build-system python-build-system)
2540 (arguments `(#:tests? #f)) ; no tests
2541 (home-page "https://github.com/ianare/exif-py")
2542 (synopsis "Python library to extract EXIF data from image files")
2543 (description
2544 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2545 files.")
2546 (license license:bsd-3)))
2547
2548 (define-public python2-exif-read
2549 (package-with-python2 python-exif-read))
2550
2551 (define-public python-pyld
2552 (package
2553 (name "python-pyld")
2554 (version "1.0.5")
2555 (source (origin
2556 (method url-fetch)
2557 (uri (pypi-uri "PyLD" version))
2558 (sha256
2559 (base32
2560 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2561 (build-system python-build-system)
2562 (home-page "https://github.com/digitalbazaar/pyld")
2563 (synopsis "Python implementation of the JSON-LD specification")
2564 (description
2565 "PyLD is an implementation of the JSON-LD specification.")
2566 (license license:bsd-3)))
2567
2568 (define-public python2-pyld
2569 (package-with-python2 python-pyld))
2570
2571 (define-public python-cli-helpers
2572 (package
2573 (name "python-cli-helpers")
2574 (version "2.0.1")
2575 (source
2576 (origin
2577 ;; There's no source tarball on PyPI.
2578 (method git-fetch)
2579 (uri (git-reference
2580 (url "https://github.com/dbcli/cli_helpers")
2581 (commit (string-append "v" version))))
2582 (file-name (git-file-name name version))
2583 (sha256
2584 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2585 (build-system python-build-system)
2586 (native-inputs
2587 `(("python-pytest" ,python-pytest)))
2588 (propagated-inputs
2589 `(("python-wcwidth" ,python-wcwidth)
2590 ("python-configobj" ,python-configobj)
2591 ("python-tabulate" ,python-tabulate)
2592 ("python-terminaltables" ,python-terminaltables)))
2593 (home-page "https://github.com/dbcli/cli_helpers")
2594 (synopsis "Helpers for building command-line apps")
2595 (description
2596 "CLI Helpers is a Python package that makes it easy to perform common
2597 tasks when building command-line apps. It's a helper library for command-line
2598 interfaces.")
2599 (license license:bsd-3)))
2600
2601 (define-public python-click
2602 (package
2603 (name "python-click")
2604 (version "7.1.2")
2605 (source
2606 (origin
2607 (method url-fetch)
2608 (uri (pypi-uri "click" version))
2609 (sha256
2610 (base32
2611 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2612 (build-system python-build-system)
2613 (arguments
2614 `(#:phases
2615 (modify-phases %standard-phases
2616 (add-after 'unpack 'fix-paths
2617 (lambda* (#:key inputs #:allow-other-keys)
2618 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2619 "cross-libc" "libc"))))
2620 (substitute* "src/click/_unicodefun.py"
2621 (("'locale'")
2622 (string-append "'" glibc "/bin/locale'"))))
2623 #t))
2624 (replace 'check
2625 (lambda _
2626 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2627 (invoke "python" "-m" "pytest"))))))
2628 (native-inputs
2629 `(("python-pytest" ,python-pytest)))
2630 (home-page "https://palletsprojects.com/p/click/")
2631 (synopsis "Command line library for Python")
2632 (description
2633 "Click is a Python package for creating command line interfaces in a
2634 composable way with as little code as necessary. Its name stands for
2635 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2636 with sensible defaults out of the box.")
2637 (license license:bsd-3)))
2638
2639 (define-public python2-click
2640 (package-with-python2 python-click))
2641
2642 (define-public python-click-5
2643 (package (inherit python-click)
2644 (name "python-click")
2645 (version "5.1")
2646 (source
2647 (origin
2648 (method url-fetch)
2649 (uri (pypi-uri "click" version))
2650 (sha256
2651 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2652 (arguments `())))
2653
2654 (define-public python-wheel
2655 (package
2656 (name "python-wheel")
2657 (version "0.33.6")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (pypi-uri "wheel" version))
2662 (sha256
2663 (base32
2664 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2665 (build-system python-build-system)
2666 (arguments
2667 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2668 ;; fails to find the newly-built bdist_wheel library, even though it is
2669 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2670 '(#:tests? #f))
2671 (home-page "https://bitbucket.org/pypa/wheel/")
2672 (synopsis "Format for built Python packages")
2673 (description
2674 "A wheel is a ZIP-format archive with a specially formatted filename and
2675 the @code{.whl} extension. It is designed to contain all the files for a PEP
2676 376 compatible install in a way that is very close to the on-disk format. Many
2677 packages will be properly installed with only the @code{Unpack} step and the
2678 unpacked archive preserves enough information to @code{Spread} (copy data and
2679 scripts to their final locations) at any later time. Wheel files can be
2680 installed with a newer @code{pip} or with wheel's own command line utility.")
2681 (license license:expat)))
2682
2683 (define-public python2-wheel
2684 (package-with-python2 python-wheel))
2685
2686 (define-public python-vcversioner
2687 (package
2688 (name "python-vcversioner")
2689 (version "2.16.0.0")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "vcversioner" version))
2694 (sha256
2695 (base32
2696 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2697 (build-system python-build-system)
2698 (synopsis "Python library for version number discovery")
2699 (description "Vcversioner is a Python library that inspects tagging
2700 information in a variety of version control systems in order to discover
2701 version numbers.")
2702 (home-page "https://github.com/habnabit/vcversioner")
2703 (license license:isc)))
2704
2705 (define-public python2-vcversioner
2706 (package-with-python2 python-vcversioner))
2707
2708 (define-public python-jdcal
2709 (package
2710 (name "python-jdcal")
2711 (version "1.4")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "jdcal" version))
2716 (sha256
2717 (base32
2718 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2719 (build-system python-build-system)
2720 (arguments
2721 `(#:phases (modify-phases %standard-phases
2722 (replace 'check
2723 (lambda _
2724 (invoke "pytest"))))))
2725 (native-inputs
2726 `(("python-pytest" ,python-pytest)))
2727 (home-page "https://github.com/phn/jdcal")
2728 (synopsis "Functions to convert between Julian dates Gregorian dates")
2729 (description "This Python library provides functions for converting
2730 between Julian dates and Gregorian dates.")
2731 (license license:bsd-2)))
2732
2733 (define-public python2-jdcal
2734 (package-with-python2 python-jdcal))
2735
2736 (define-public python-jsondiff
2737 (package
2738 (name "python-jsondiff")
2739 (version "1.2.0")
2740 (source
2741 (origin
2742 (method url-fetch)
2743 (uri (pypi-uri "jsondiff" version))
2744 (sha256
2745 (base32
2746 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2747 (build-system python-build-system)
2748 (native-inputs
2749 `(("python-nose" ,python-nose)
2750 ("python-nose-random" ,python-nose-random)))
2751 (home-page
2752 "https://github.com/fzumstein/jsondiff")
2753 (synopsis "Compare JSON and JSON-like structures in Python")
2754 (description "@code{jsondiff} is a Python library which lets you
2755 compare, diff, and patch JSON and JSON-like structures in Python.")
2756 (license license:expat)))
2757
2758 (define-public python-jsonschema
2759 (package
2760 (name "python-jsonschema")
2761 (version "3.2.0")
2762 (source (origin
2763 (method url-fetch)
2764 (uri (pypi-uri "jsonschema" version))
2765 (sha256
2766 (base32
2767 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2768 (build-system python-build-system)
2769 (arguments
2770 '(#:phases
2771 (modify-phases %standard-phases
2772 (replace 'check
2773 (lambda* (#:key inputs outputs #:allow-other-keys)
2774 (add-installed-pythonpath inputs outputs)
2775 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2776 (invoke "trial" "jsonschema"))))))
2777 (native-inputs
2778 `(("python-setuptools_scm" ,python-setuptools-scm)
2779 ("python-twisted" ,python-twisted)))
2780 (propagated-inputs
2781 `(("python-attrs" ,python-attrs)
2782 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2783 ("python-pyrsistent" ,python-pyrsistent)
2784 ("python-six" ,python-six)))
2785 (home-page "https://github.com/Julian/jsonschema")
2786 (synopsis "Implementation of JSON Schema for Python")
2787 (description
2788 "Jsonschema is an implementation of JSON Schema for Python.")
2789 (license license:expat)
2790 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2791
2792 (define-public python2-jsonschema
2793 (let ((jsonschema (package-with-python2
2794 (strip-python2-variant python-jsonschema))))
2795 (package (inherit jsonschema)
2796 (propagated-inputs
2797 `(("python2-functools32" ,python2-functools32)
2798 ,@(package-propagated-inputs jsonschema))))))
2799
2800 (define-public python-schema
2801 (package
2802 (name "python-schema")
2803 (version "0.6.6")
2804 (source
2805 (origin
2806 (method url-fetch)
2807 (uri (pypi-uri "schema" version))
2808 (sha256
2809 (base32
2810 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2811 (build-system python-build-system)
2812 (native-inputs
2813 `(("python-pytest" ,python-pytest)))
2814 (home-page "https://github.com/keleshev/schema")
2815 (synopsis "Simple data validation library")
2816 (description
2817 "@code{python-schema} is a library for validating Python data
2818 structures, such as those obtained from config-files, forms, external
2819 services or command-line parsing, converted from JSON/YAML (or
2820 something else) to Python data-types.")
2821 (license license:psfl)))
2822
2823 (define-public python2-schema
2824 (package-with-python2 python-schema))
2825
2826 (define-public python-schema-0.5
2827 (package (inherit python-schema)
2828 (version "0.5.0")
2829 (source
2830 (origin
2831 (method url-fetch)
2832 (uri (pypi-uri "schema" version))
2833 (sha256
2834 (base32
2835 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2836
2837 (define-public python2-schema-0.5
2838 (package-with-python2 python-schema-0.5))
2839
2840 (define-public python-kitchen
2841 (package
2842 (name "python-kitchen")
2843 (version "1.2.5")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "kitchen" version))
2848 (sha256
2849 (base32
2850 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2851 (build-system python-build-system)
2852 (propagated-inputs
2853 `(("python-chardet" ,python-chardet)))
2854 (home-page "https://github.com/fedora-infra/kitchen")
2855 (synopsis "Python API for snippets")
2856 (description "@code{kitchen} module provides a python API for all sorts of
2857 little useful snippets of code that everybody ends up writing for their projects
2858 but never seem big enough to build an independent release. Use kitchen and stop
2859 cutting and pasting that code over and over.")
2860 (license (list license:lgpl2.1+
2861 ;; subprocess.py, test_subprocess.py,
2862 ;; kitchen/pycompat25/defaultdict.py:
2863 license:psfl))))
2864
2865 (define-public python2-kitchen
2866 (package-with-python2 python-kitchen))
2867
2868 (define-public python-unidecode
2869 (package
2870 (name "python-unidecode")
2871 (version "1.1.1")
2872 (source (origin
2873 (method url-fetch)
2874 (uri (pypi-uri "Unidecode" version))
2875 (sha256
2876 (base32
2877 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2878 (build-system python-build-system)
2879 (home-page "https://pypi.org/project/Unidecode/")
2880 (synopsis "ASCII transliterations of Unicode text")
2881 (description
2882 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2883 useful when integrating with legacy code that doesn't support Unicode, or for
2884 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2885 machine identifiers from human-readable Unicode strings that should still be
2886 somewhat intelligible.")
2887 (license license:gpl2+)))
2888
2889 (define-public python2-unidecode
2890 (package-with-python2 python-unidecode))
2891
2892 (define-public python-text-unidecode
2893 (package
2894 (name "python-text-unidecode")
2895 (version "1.3")
2896 (source (origin
2897 (method url-fetch)
2898 (uri (pypi-uri "text-unidecode" version))
2899 (sha256
2900 (base32
2901 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2902 (build-system python-build-system)
2903 (arguments
2904 '(#:phases (modify-phases %standard-phases
2905 (replace 'check
2906 (lambda _
2907 (setenv "PYTHONPATH"
2908 (string-append "./build/lib:"
2909 (getenv "PYTHONPATH")))
2910 (invoke "pytest" "-vv"))))))
2911 (native-inputs
2912 `(("python-pytest" ,python-pytest)))
2913 (home-page "https://github.com/kmike/text-unidecode/")
2914 (synopsis "Decode Unicode data")
2915 (description
2916 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2917 Perl library. It can create ASCII representations of Unicode data. In general
2918 users should prefer the @code{python-unidecode} package which offers better
2919 memory usage and transliteration quality.")
2920 ;; The user can choose either license.
2921 (license (list license:clarified-artistic license:gpl2+))))
2922
2923 (define-public python2-text-unidecode
2924 (package-with-python2 python-text-unidecode))
2925
2926 (define-public python-pyjwt
2927 (package
2928 (name "python-pyjwt")
2929 (version "1.7.1")
2930 (source
2931 (origin
2932 (method url-fetch)
2933 (uri (pypi-uri "PyJWT" version))
2934 (sha256
2935 (base32
2936 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2937 (modules '((guix build utils)))
2938 (snippet
2939 '(begin
2940 (for-each delete-file-recursively
2941 (find-files "." "\\.pyc$"))
2942 #t))))
2943 (build-system python-build-system)
2944 (arguments
2945 '(#:phases (modify-phases %standard-phases
2946 (replace 'check
2947 (lambda _
2948 ;; Mimic upstream commit 3a20892442b34c7 to get
2949 ;; rid of dependency on pytest-runner < 5.0.
2950 ;; Remove substitution for PyJWT > 1.7.1.
2951 (substitute* "setup.py"
2952 ((".*pytest-runner.*")
2953 ""))
2954 (invoke "pytest" "-vv"))))))
2955 (native-inputs
2956 `(("python-pytest" ,python-pytest)
2957 ("python-pytest-cov" ,python-pytest-cov)))
2958 (home-page "https://github.com/progrium/pyjwt")
2959 (synopsis "JSON Web Token implementation in Python")
2960 (description
2961 "PyJWT is a JSON Web Token implementation written in Python.")
2962 (license license:expat)))
2963
2964 (define-public python2-pyjwt
2965 (package-with-python2 python-pyjwt))
2966
2967 (define-public python-pykka
2968 (package
2969 (name "python-pykka")
2970 (version "1.2.1")
2971 (source
2972 (origin
2973 (method url-fetch)
2974 (uri (pypi-uri "Pykka" version))
2975 (sha256
2976 (base32
2977 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2978 (build-system python-build-system)
2979 (native-inputs
2980 `(("python-mock" ,python-mock)
2981 ("python-nose" ,python-nose)
2982 ("python-gevent" ,python-gevent)
2983 ("python-eventlet" ,python-eventlet)))
2984 (home-page "https://www.pykka.org/")
2985 (synopsis "Pykka is a Python implementation of the actor model")
2986 (description
2987 "Pykka is a Python implementation of the actor model.
2988 The actor model introduces some simple rules to control the sharing
2989 of state and cooperation between execution units, which makes it
2990 easier to build concurrent applications.")
2991 (license license:asl2.0)))
2992
2993 (define-public python2-pykka
2994 (package-with-python2 python-pykka))
2995
2996 (define-public python-pymsgbox
2997 (package
2998 (name "python-pymsgbox")
2999 (version "1.0.6")
3000 (source
3001 (origin
3002 (method git-fetch)
3003 (uri (git-reference
3004 ;; LICENSE.txt is not present on pypi
3005 (url "https://github.com/asweigart/PyMsgBox")
3006 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
3007 (file-name (git-file-name name version))
3008 (sha256
3009 (base32
3010 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
3011 (arguments
3012 ;; Circular dependency to run tests:
3013 ;; Tests need pyautogui, which depends on pymsgbox.
3014 '(#:tests? #f))
3015 (build-system python-build-system)
3016 (home-page "https://github.com/asweigart/PyMsgBox")
3017 (synopsis "Python module for JavaScript-like message boxes")
3018 (description
3019 "PyMsgBox is a simple, cross-platform, pure Python module for
3020 JavaScript-like message boxes. Types of dialog boxes include:
3021 @enumerate
3022 @item alert
3023 @item confirm
3024 @item prompt
3025 @item password
3026 @end enumerate
3027 ")
3028 (license license:bsd-3)))
3029
3030 (define-public python-pympler
3031 (package
3032 (name "python-pympler")
3033 (home-page "https://pythonhosted.org/Pympler/")
3034 (version "0.8")
3035 (source (origin
3036 (method url-fetch)
3037 (uri (pypi-uri "Pympler" version))
3038 (sha256
3039 (base32
3040 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
3041 (build-system python-build-system)
3042 (arguments
3043 `(#:phases (modify-phases %standard-phases
3044 (delete 'check)
3045 (add-after 'install 'check
3046 (lambda* (#:key inputs outputs #:allow-other-keys)
3047 (add-installed-pythonpath inputs outputs)
3048 (invoke "python" "setup.py" "test"))))))
3049 (synopsis "Measure, monitor and analyze memory behavior")
3050 (description
3051 "Pympler is a development tool to measure, monitor and analyze
3052 the memory behavior of Python objects in a running Python application.
3053
3054 By pympling a Python application, detailed insight in the size and the
3055 lifetime of Python objects can be obtained. Undesirable or unexpected
3056 runtime behavior like memory bloat and other @samp{pymples} can easily
3057 be identified.
3058
3059 A web profiling frontend exposes process statistics, garbage
3060 visualisation and class tracker statistics.")
3061 (license license:asl2.0)))
3062
3063 (define-public python2-pympler
3064 (package-with-python2 python-pympler))
3065
3066 (define-public python-itsdangerous
3067 (package
3068 (name "python-itsdangerous")
3069 (version "1.1.0")
3070 (source
3071 (origin
3072 (method url-fetch)
3073 (uri (pypi-uri "itsdangerous" version))
3074 (sha256
3075 (base32
3076 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
3077 (build-system python-build-system)
3078 (home-page "https://palletsprojects.com/p/itsdangerous/")
3079 (synopsis "Python library for passing data to/from untrusted environments")
3080 (description
3081 "Itsdangerous provides various helpers to pass trusted data to untrusted
3082 environments and back.")
3083 (license license:bsd-3)))
3084
3085 (define-public python2-itsdangerous
3086 (package-with-python2 python-itsdangerous))
3087
3088 (define-public python-pyyaml
3089 (package
3090 (name "python-pyyaml")
3091 (version "5.3.1")
3092 (source
3093 (origin
3094 (method url-fetch)
3095 (uri (pypi-uri "PyYAML" version))
3096 (sha256
3097 (base32
3098 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3099 (build-system python-build-system)
3100 (inputs
3101 `(("libyaml" ,libyaml)))
3102 (home-page "https://pyyaml.org")
3103 (synopsis "YAML parser and emitter for Python")
3104 (description
3105 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3106 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3107 API, and sensible error messages. PyYAML supports standard YAML tags and
3108 provides Python-specific tags that represent an arbitrary Python object.")
3109 (license license:expat)))
3110
3111 (define-public python2-pyyaml
3112 (package-with-python2 python-pyyaml))
3113
3114 (define-public python-vine
3115 (package
3116 (name "python-vine")
3117 (version "1.1.4")
3118 (source
3119 (origin
3120 (method url-fetch)
3121 (uri (pypi-uri "vine" version))
3122 (sha256
3123 (base32
3124 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3125 (build-system python-build-system)
3126 (native-inputs
3127 `(("python-pytest" ,python-pytest)
3128 ("python-case" ,python-case)))
3129 (home-page "https://github.com/celery/vine")
3130 (synopsis "Promises for Python")
3131 (description
3132 "@code{vine} provides a special implementation of promises in that it can
3133 be used both for \"promise of a value\" and lazy evaluation. The biggest
3134 upside for this is that everything in a promise can also be a promise,
3135 e.g. filters, callbacks and errbacks can all be promises.")
3136 (license license:bsd-3)))
3137
3138 (define-public python-virtualenv
3139 (package
3140 (name "python-virtualenv")
3141 (version "20.0.10")
3142 (source
3143 (origin
3144 (method url-fetch)
3145 (uri (pypi-uri "virtualenv" version))
3146 (sha256
3147 (base32
3148 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3149 (build-system python-build-system)
3150 (native-inputs
3151 `(("python-mock" ,python-mock)
3152 ("python-pytest" ,python-pytest)
3153 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3154 ;; be an input at all". However, removing the input makes the build error:
3155 ;; File "setup.py", line 4, in <module>
3156 ;; raise RuntimeError("setuptools >= 41 required to build")
3157 ("python-setuptools" ,python-setuptools)
3158 ("python-setuptools-scm" ,python-setuptools-scm)))
3159 (propagated-inputs
3160 `(("python-appdirs" ,python-appdirs)
3161 ("python-distlib" ,python-distlib)
3162 ("python-filelock" ,python-filelock)
3163 ("python-six" ,python-six)
3164 ("python-importlib-metadata" ,python-importlib-metadata)))
3165 (home-page "https://virtualenv.pypa.io/")
3166 (synopsis "Virtual Python environment builder")
3167 (description
3168 "Virtualenv is a tool to create isolated Python environments.")
3169 (properties `((python2-variant . ,(delay python2-virtualenv))))
3170 (license license:expat)))
3171
3172 (define-public python2-virtualenv
3173 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3174 (package
3175 (inherit base)
3176 (arguments
3177 `(#:python ,python-2
3178 #:phases
3179 (modify-phases %standard-phases
3180 (add-after 'set-paths 'adjust-PYTHONPATH
3181 (lambda* (#:key inputs #:allow-other-keys)
3182 (let* ((python (assoc-ref inputs "python"))
3183 (python-sitedir (string-append python "/lib/python2.7"
3184 "/site-packages")))
3185 ;; XXX: 'python2' always comes first on PYTHONPATH
3186 ;; and shadows the 'setuptools' input. Move python2
3187 ;; last: this should be fixed in python-build-system
3188 ;; in a future rebuild cycle.
3189 (setenv "PYTHONPATH"
3190 (string-append (string-join (delete python-sitedir
3191 (string-split
3192 (getenv "PYTHONPATH")
3193 #\:))
3194 ":")
3195 ":" python-sitedir))
3196 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3197 (getenv "PYTHONPATH"))
3198 #t))))))
3199 (propagated-inputs
3200 `(("python-contextlib2" ,python2-contextlib2)
3201 ,@(package-propagated-inputs base))))))
3202
3203 (define-public python-markupsafe
3204 (package
3205 (name "python-markupsafe")
3206 (version "1.1.1")
3207 (source
3208 (origin
3209 (method url-fetch)
3210 (uri (pypi-uri "MarkupSafe" version))
3211 (sha256
3212 (base32
3213 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3214 (build-system python-build-system)
3215 (arguments
3216 `(#:modules ((ice-9 ftw)
3217 (srfi srfi-1)
3218 (srfi srfi-26)
3219 (guix build utils)
3220 (guix build python-build-system))
3221 #:phases (modify-phases %standard-phases
3222 (replace 'check
3223 (lambda _
3224 (let ((cwd (getcwd))
3225 (libdir (find (cut string-prefix? "lib." <>)
3226 (scandir "build"))))
3227 (setenv "PYTHONPATH"
3228 (string-append cwd "/build/" libdir ":"
3229 (getenv "PYTHONPATH")))
3230 (invoke "pytest" "-vv")))))))
3231 (native-inputs
3232 `(("python-pytest" ,python-pytest)))
3233 (home-page "https://github.com/mitsuhiko/markupsafe")
3234 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3235 (description
3236 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3237 for Python.")
3238 (license license:bsd-3)))
3239
3240 (define-public python2-markupsafe
3241 (package-with-python2 python-markupsafe))
3242
3243 (define-public python-jinja2
3244 (package
3245 (name "python-jinja2")
3246 (version "2.11.2")
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (pypi-uri "Jinja2" version))
3251 (sha256
3252 (base32
3253 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3254 (build-system python-build-system)
3255 (arguments
3256 '(#:phases (modify-phases %standard-phases
3257 (replace 'check
3258 (lambda* (#:key tests? #:allow-other-keys)
3259 (if tests?
3260 (begin
3261 (setenv "PYTHONPATH"
3262 (string-append "./build/lib:"
3263 (getenv "PYTHONPATH")))
3264 (invoke "pytest" "-vv"))
3265 (format #t "test suite not run~%"))
3266 #t)))))
3267 (native-inputs
3268 `(("python-pytest" ,python-pytest)))
3269 (propagated-inputs
3270 `(("python-markupsafe" ,python-markupsafe)))
3271 (home-page "http://jinja.pocoo.org/")
3272 (synopsis "Python template engine")
3273 (description
3274 "Jinja2 is a small but fast and easy to use stand-alone template engine
3275 written in pure Python.")
3276 (license license:bsd-3)))
3277
3278 (define-public python2-jinja2
3279 (package-with-python2 python-jinja2))
3280
3281 (define-public python-jinja2-time
3282 (package
3283 (name "python-jinja2-time")
3284 (version "0.2.0")
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (pypi-uri "jinja2-time" version))
3289 (sha256
3290 (base32
3291 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3292 (build-system python-build-system)
3293 (propagated-inputs
3294 `(("python-arrow" ,python-arrow)
3295 ("python-jinja2" ,python-jinja2)))
3296 (home-page
3297 "https://github.com/hackebrot/jinja2-time")
3298 (synopsis "Jinja2 Extension for Dates and Times")
3299 (description
3300 "This package provides an extension for the template engine Jinja2. It
3301 adds a 'now' tag providing a convenient access to the arrow.now() API from
3302 templates. A format string can be provided to control the output.")
3303 (license license:expat)))
3304
3305 (define-public python-pystache
3306 (package
3307 (name "python-pystache")
3308 (version "0.5.4")
3309 (source (origin
3310 (method url-fetch)
3311 (uri (pypi-uri "pystache" version))
3312 (sha256
3313 (base32
3314 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3315 (build-system python-build-system)
3316 (arguments
3317 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3318 (home-page "http://defunkt.io/pystache/")
3319 (synopsis "Python logic-less template engine")
3320 (description
3321 "Pystache is a Python implementation of the framework agnostic,
3322 logic-free templating system Mustache.")
3323 (license license:expat)
3324 (properties `((python2-variant . ,(delay python2-pystache))))))
3325
3326 (define-public python2-pystache
3327 (package (inherit (package-with-python2
3328 (strip-python2-variant python-pystache)))
3329 (arguments
3330 `(#:python ,python-2
3331 #:phases
3332 (modify-phases %standard-phases
3333 (replace 'check
3334 (lambda _
3335 (invoke "python" "test_pystache.py"))))))))
3336
3337 (define-public python-joblib
3338 (package
3339 (name "python-joblib")
3340 (version "0.14.1")
3341 (source (origin
3342 (method url-fetch)
3343 (uri (pypi-uri "joblib" version))
3344 (sha256
3345 (base32
3346 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3347 (build-system python-build-system)
3348 (arguments
3349 `(#:phases
3350 (modify-phases %standard-phases
3351 (replace 'check
3352 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3353 (native-inputs
3354 `(("python-pytest" ,python-pytest)))
3355 (home-page "https://joblib.readthedocs.io/")
3356 (synopsis "Using Python functions as pipeline jobs")
3357 (description
3358 "Joblib is a set of tools to provide lightweight pipelining in Python.
3359 In particular, joblib offers: transparent disk-caching of the output values
3360 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3361 logging and tracing of the execution.")
3362 (license license:bsd-3)))
3363
3364 (define-public python2-joblib
3365 (package-with-python2 python-joblib))
3366
3367 (define-public python-daemon
3368 (package
3369 (name "python-daemon")
3370 (version "2.2.3")
3371 (source
3372 (origin
3373 (method url-fetch)
3374 (uri (pypi-uri "python-daemon" version))
3375 (sha256
3376 (base32
3377 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3378 (build-system python-build-system)
3379 (arguments
3380 `(#:phases
3381 (modify-phases %standard-phases
3382 (add-before 'check 'disable-tests
3383 (lambda _
3384 ;; FIXME: Determine why test fails
3385 (substitute* "test/test_daemon.py"
3386 (("test_detaches_process_context")
3387 "skip_test_detaches_process_context"))
3388 #t)))))
3389 (propagated-inputs
3390 `(("python-lockfile" ,python-lockfile)))
3391 (native-inputs
3392 `(("python-unittest2" ,python-unittest2)
3393 ("python-testtools" ,python-testtools)
3394 ("python-testscenarios" ,python-testscenarios)
3395 ("python-mock" ,python-mock)
3396 ("python-docutils" ,python-docutils)))
3397 (home-page "https://pagure.io/python-daemon/")
3398 (synopsis "Python library for making a Unix daemon process")
3399 (description "Python-daemon is a library that assists a Python program to
3400 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3401
3402 This library provides a @code{DaemonContext} class that manages the following
3403 important tasks for becoming a daemon process:
3404 @enumerate
3405 @item Detach the process into its own process group.
3406 @item Set process environment appropriate for running inside a chroot.
3407 @item Renounce suid and sgid privileges.
3408 @item Close all open file descriptors.
3409 @item Change the working directory, uid, gid, and umask.
3410 @item Set appropriate signal handlers.
3411 @item Open new file descriptors for stdin, stdout, and stderr.
3412 @item Manage a specified PID lock file.
3413 @item Register cleanup functions for at-exit processing.
3414 @end enumerate")
3415 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3416 (license (list license:asl2.0 license:gpl3+))))
3417
3418 (define-public python-anytree
3419 (package
3420 (name "python-anytree")
3421 (version "2.8.0")
3422 (source (origin
3423 (method url-fetch)
3424 (uri (pypi-uri "anytree" version))
3425 (sha256
3426 (base32
3427 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3428 (build-system python-build-system)
3429 (propagated-inputs
3430 `(("python-six" ,python-six)))
3431 (native-inputs
3432 `(;; For tests.
3433 ("graphviz" ,graphviz) ;for 'dot'
3434 ("python-nose" ,python-nose)))
3435 (home-page "https://github.com/c0fec0de/anytree")
3436 (synopsis "Lightweight tree data library")
3437 (description
3438 "@code{anytree} is a simple, lightweight, and extensible tree data
3439 structure for Python.")
3440 (license license:asl2.0)))
3441
3442 (define-public python-docutils
3443 (package
3444 (name "python-docutils")
3445 (version "0.16")
3446 (source
3447 (origin
3448 (method url-fetch)
3449 (uri (pypi-uri "docutils" version))
3450 (sha256
3451 (base32
3452 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3453 (build-system python-build-system)
3454 (arguments
3455 '(#:phases (modify-phases %standard-phases
3456 (replace 'check
3457 (lambda* (#:key tests? #:allow-other-keys)
3458 (if tests?
3459 (invoke "python" "test/alltests.py")
3460 (format #t "test suite not run~%"))
3461 #t)))))
3462 (home-page "http://docutils.sourceforge.net/")
3463 (synopsis "Python Documentation Utilities")
3464 (description
3465 "Docutils is a modular system for processing documentation into useful
3466 formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
3467 easy to use markup language, for input.
3468
3469 This package provides tools for converting @file{.rst} files to other formats
3470 via commands such as @command{rst2man}, as well as supporting Python code.")
3471 ;; Most of the source code is public domain, but some source files are
3472 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3473 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3474
3475 (define-public python2-docutils
3476 (package-with-python2 python-docutils))
3477
3478 ;; python2-sphinx fails its test suite with newer versions.
3479 (define-public python2-docutils-0.14
3480 (package
3481 (inherit python2-docutils)
3482 (version "0.14")
3483 (source (origin
3484 (method url-fetch)
3485 (uri (pypi-uri "docutils" version))
3486 (sha256
3487 (base32
3488 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3489
3490 (define-public python-restructuredtext-lint
3491 (package
3492 (name "python-restructuredtext-lint")
3493 (version "1.3.0")
3494 (source
3495 (origin
3496 (method url-fetch)
3497 (uri (pypi-uri "restructuredtext-lint" version))
3498 (sha256
3499 (base32
3500 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3501 (build-system python-build-system)
3502 (arguments
3503 `(#:phases
3504 (modify-phases %standard-phases
3505 (delete 'check)
3506 (add-after 'install 'check
3507 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3508 (when tests?
3509 (add-installed-pythonpath inputs outputs)
3510 (invoke "nosetests" "-v"))
3511 #t)))))
3512 (propagated-inputs
3513 `(("python-docutils" ,python-docutils)))
3514 (native-inputs
3515 `(("python-nose" ,python-nose)))
3516 (home-page "https://github.com/twolfson/restructuredtext-lint")
3517 (synopsis "reStructuredText linter")
3518 (description "This package provides a linter for the reStructuredText
3519 format.")
3520 (license license:unlicense)))
3521
3522 (define-public python-doc8
3523 (package
3524 (name "python-doc8")
3525 (version "0.8.0")
3526 (source
3527 (origin
3528 (method url-fetch)
3529 (uri (pypi-uri "doc8" version))
3530 (sha256
3531 (base32
3532 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3533 (build-system python-build-system)
3534 (arguments
3535 `(#:phases
3536 (modify-phases %standard-phases
3537 (delete 'check)
3538 (add-after 'install 'check
3539 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3540 (when tests?
3541 (add-installed-pythonpath inputs outputs)
3542 (invoke "pytest" "-v"))
3543 #t)))))
3544 (propagated-inputs
3545 `(("python-chardet" ,python-chardet)
3546 ("python-docutils" ,python-docutils)
3547 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3548 ("python-six" ,python-six)
3549 ("python-stevedore" ,python-stevedore)))
3550 (native-inputs
3551 `(("python-testtools" ,python-testtools)
3552 ("python-pytest" ,python-pytest)))
3553 (home-page "https://launchpad.net/doc8")
3554 (synopsis
3555 "Style checker for Sphinx (or other) RST documentation")
3556 (description
3557 "Doc8 is an opinionated style checker for reStructured Text and plain
3558 text styles of documentation.")
3559 (license license:asl2.0)))
3560
3561 (define-public python-pygments
3562 (package
3563 (name "python-pygments")
3564 (version "2.6.1")
3565 (source
3566 (origin
3567 (method url-fetch)
3568 (uri (pypi-uri "Pygments" version))
3569 (sha256
3570 (base32
3571 "0i4gnd4q0mgkq0dp5wymn7ca8zjd8fgp63139svs6jf2c6h48wv4"))))
3572 (build-system python-build-system)
3573 (arguments
3574 ;; FIXME: Tests require sphinx, which depends on this.
3575 '(#:tests? #f))
3576 (home-page "https://pygments.org/")
3577 (synopsis "Syntax highlighting")
3578 (description
3579 "Pygments is a syntax highlighting package written in Python.")
3580 (license license:bsd-2)
3581 (properties `((python2-variant . ,(delay python2-pygments))))))
3582
3583 ;; Pygments 2.6 and later does not support Python 2.
3584 (define-public python2-pygments
3585 (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
3586 (package
3587 (inherit base)
3588 (version "2.5.2")
3589 (source (origin
3590 (method url-fetch)
3591 (uri (pypi-uri "Pygments" version))
3592 (sha256
3593 (base32
3594 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
3595
3596 (define-public python-bumpversion
3597 (package
3598 (name "python-bumpversion")
3599 (version "0.5.3")
3600 (source
3601 (origin
3602 (method url-fetch)
3603 (uri (pypi-uri "bumpversion" version))
3604 (sha256
3605 (base32
3606 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3607 (build-system python-build-system)
3608 (home-page "https://github.com/peritus/bumpversion")
3609 (synopsis "Tool to bump software version")
3610 (description "This tool provides a command-line interface (CLI) to bump a
3611 software version simply.")
3612 (license license:expat)))
3613
3614 (define-public python-deprecated
3615 (package
3616 (name "python-deprecated")
3617 (version "1.2.5")
3618 (source
3619 (origin
3620 (method git-fetch)
3621 (uri (git-reference
3622 (url "https://github.com/tantale/deprecated")
3623 (commit (string-append "v" version))))
3624 (file-name (git-file-name name version))
3625 (sha256
3626 (base32
3627 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3628 (build-system python-build-system)
3629 (arguments
3630 `(#:phases (modify-phases %standard-phases
3631 (replace 'check
3632 (lambda _
3633 (invoke "pytest"))))))
3634 (propagated-inputs
3635 `(("python-wrapt" ,python-wrapt)))
3636 (native-inputs
3637 `(("python-bumpversion" ,python-bumpversion)
3638 ("python-pytest" ,python-pytest)
3639 ("python-pytest-cov" ,python-pytest-cov)
3640 ("python-sphinx" ,python-sphinx)
3641 ("python-tox" ,python-tox)))
3642 (home-page "https://github.com/tantale/deprecated")
3643 (synopsis "Python decorator to deprecate classes, functions or methods")
3644 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3645 to deprecate classes, functions or methods.")
3646 (license license:expat)))
3647
3648 (define-public python-pygithub
3649 (package
3650 (name "python-pygithub")
3651 (version "1.43.8")
3652 (source
3653 ;; We fetch from the Git repo because there are no tests in the PyPI
3654 ;; archive.
3655 (origin
3656 (method git-fetch)
3657 (uri (git-reference
3658 (url "https://github.com/PyGithub/PyGithub")
3659 (commit (string-append "v" version))))
3660 (file-name (git-file-name name version))
3661 (sha256
3662 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3663 (build-system python-build-system)
3664 (arguments
3665 `(#:phases (modify-phases %standard-phases
3666 ;; Some tests rely on the network.
3667 (add-after 'unpack 'disable-failing-tests
3668 (lambda _
3669 (substitute* "tests/Issue142.py"
3670 (("testDecodeJson") "disabled_testDecodeJson"))
3671 #t))
3672 (add-before 'check 'prepare-for-tests
3673 (lambda _
3674 (for-each (lambda (f)
3675 (chmod f #o666))
3676 (find-files "./tests"))
3677 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3678 (setenv "PYTHONPATH"
3679 (string-append "./tests:" (getenv "PYTHONPATH")))
3680 #t)))))
3681 (propagated-inputs
3682 `(("python-deprecated" ,python-deprecated)
3683 ("python-pyjwt" ,python-pyjwt)
3684 ("python-requests" ,python-requests)))
3685 (native-inputs `(("python-httpretty" ,python-httpretty)))
3686 (home-page "https://pygithub.readthedocs.io/en/latest/")
3687 (synopsis "Python library for the GitHub API")
3688 (description "This library allows managing GitHub resources such as
3689 repositories, user profiles, and organizations in your Python applications,
3690 using version 3 of the GitHub application programming interface (API).")
3691 (license license:lgpl3+)))
3692
3693 (define-public python-rellu
3694 (package
3695 (name "python-rellu")
3696 (version "0.7")
3697 (source
3698 (origin
3699 (method url-fetch)
3700 (uri (pypi-uri "rellu" version))
3701 (sha256
3702 (base32
3703 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3704 (build-system python-build-system)
3705 (propagated-inputs
3706 `(("python-invoke" ,python-invoke)
3707 ("python-pygithub" ,python-pygithub)))
3708 (home-page "https://github.com/robotframework/rellu")
3709 (synopsis "Utilities to create PyPI releases")
3710 (description "This collection of utilities contains tooling and templates
3711 to assist in creating releases on GitHub and publishing them on PyPI. It is
3712 designed to be used by Robot Framework and tools and libraries in its
3713 ecosystem, but can naturally be used also by other projects.")
3714 (license license:asl2.0)))
3715
3716 (define-public python-robotframework
3717 (package
3718 (name "python-robotframework")
3719 (version "3.2.2")
3720 ;; There are no tests in the PyPI archive.
3721 (source
3722 (origin
3723 (method git-fetch)
3724 (uri (git-reference
3725 (url "https://github.com/robotframework/robotframework")
3726 (commit (string-append "v" version))))
3727 (file-name (git-file-name name version))
3728 (sha256
3729 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3730 (patches (search-patches
3731 "python-robotframework-source-date-epoch.patch"))))
3732 (build-system python-build-system)
3733 (arguments
3734 `(#:phases (modify-phases %standard-phases
3735 (add-before 'build 'build-and-install-doc
3736 (lambda* (#:key outputs #:allow-other-keys)
3737 (let* ((doc-output (assoc-ref outputs "doc"))
3738 (doc (string-append doc-output "/share/"
3739 ,name "-" ,version "/")))
3740 (invoke "invoke" "library-docs" "all")
3741 (mkdir-p doc)
3742 (copy-recursively "doc/libraries"
3743 (string-append doc "/libraries"))
3744 #t)))
3745 (replace 'check
3746 (lambda* (#:key inputs #:allow-other-keys)
3747 ;; Some tests require timezone data. Otherwise, they
3748 ;; look up /etc/localtime, which doesn't exist, and fail
3749 ;; with:
3750 ;;
3751 ;; OverflowError: mktime argument out of range
3752 (setenv "TZDIR"
3753 (string-append (assoc-ref inputs "tzdata")
3754 "/share/zoneinfo"))
3755 (setenv "TZ" "Europe/Paris")
3756
3757 (invoke "python" "utest/run.py"))))))
3758 (native-inputs
3759 `(("python-invoke" ,python-invoke)
3760 ("python-rellu" ,python-rellu)
3761 ("python:tk" ,python "tk") ;used when building the HTML doc
3762 ("tzdata" ,tzdata-for-tests)))
3763 (outputs '("out" "doc"))
3764 (home-page "https://robotframework.org")
3765 (synopsis "Generic automation framework")
3766 (description "Robot Framework is a generic automation framework for
3767 acceptance testing, acceptance test driven development (ATDD), and robotic
3768 process automation (RPA).")
3769 (license license:asl2.0)))
3770
3771 (define-public python-robotframework-lint
3772 ;; There is no properly tagged release; the commit below seems to correspond
3773 ;; to the 0.9 stable release available from PyPI. The tests are not
3774 ;; included in the PyPI archive, so we fetch the sources from the upstream
3775 ;; Git repo.
3776 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3777 (revision "0"))
3778 (package
3779 (name "python-robotframework-lint")
3780 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3781 revision commit))
3782 (source
3783 (origin
3784 (method git-fetch)
3785 (uri (git-reference
3786 (url "https://github.com/boakley/robotframework-lint")
3787 (commit commit)))
3788 (file-name (git-file-name name version))
3789 (sha256
3790 (base32
3791 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3792 (build-system python-build-system)
3793 (arguments
3794 `(#:phases
3795 (modify-phases %standard-phases
3796 (replace 'check
3797 (lambda _
3798 (invoke "python" "-m" "robot" "-A"
3799 "tests/conf/default.args" "tests"))))))
3800 (propagated-inputs
3801 `(("python-robotframework" ,python-robotframework)))
3802 (home-page "https://github.com/boakley/robotframework-lint/")
3803 (synopsis "Static analysis tool (linter) for Robot Framework")
3804 (description "This package provides the @code{rflint} command-line
3805 utility, a static analysis tool (linter) for Robot Framework source files.")
3806 (license license:asl2.0))))
3807
3808 (define-public python-robotframework-sshlibrary
3809 (package
3810 (name "python-robotframework-sshlibrary")
3811 (version "3.3.0")
3812 ;; There are no tests in the PyPI archive.
3813 (source
3814 (origin
3815 (method git-fetch)
3816 (uri (git-reference
3817 (url "https://github.com/robotframework/SSHLibrary")
3818 (commit (string-append "v" version))))
3819 (file-name (git-file-name name version))
3820 (sha256
3821 (base32
3822 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3823 (build-system python-build-system)
3824 (arguments
3825 `(#:phases
3826 (modify-phases %standard-phases
3827 (add-before 'build 'build-and-install-doc
3828 (lambda* (#:key outputs #:allow-other-keys)
3829 (let* ((doc-output (assoc-ref outputs "doc"))
3830 (doc (string-append doc-output "/share/"
3831 ,name "-" ,version "/")))
3832 (invoke "chmod" "-R" "+w" "docs")
3833 (invoke "invoke" "kw-docs" "project-docs")
3834 (mkdir-p doc)
3835 (for-each delete-file (find-files "docs" "\\.rst"))
3836 (copy-recursively "docs" doc)
3837 #t)))
3838 (replace 'check
3839 (lambda _
3840 ;; Some tests require an SSH server; we remove them.
3841 (delete-file "utest/test_client_api.py")
3842 (delete-file "utest/test_scp.py")
3843 (invoke "python" "utest/run.py"))))))
3844 (propagated-inputs
3845 `(("python-robotframework" ,python-robotframework)
3846 ("python-paramiko" ,python-paramiko)
3847 ("python-scp" ,python-scp)))
3848 (native-inputs
3849 `(("openssh" ,openssh)
3850 ("which" ,which)
3851 ;; To generate the documentation
3852 ("python-docutils" ,python-docutils)
3853 ("python-invoke" ,python-invoke)
3854 ("python-pygments" ,python-pygments)
3855 ("python-rellu" ,python-rellu)))
3856 (outputs '("out" "doc"))
3857 (home-page "https://github.com/robotframework/SSHLibrary")
3858 (synopsis "Robot Framework library for SSH and SFTP")
3859 (description "SSHLibrary is a Robot Framework library providing support
3860 for SSH and SFTP. It has the following main usages:
3861 @itemize @bullet
3862 @item Executing commands on the remote machine, either blocking or non-blocking.
3863 @item Writing and reading in an interactive shell.
3864 @item Transferring files and directories over SFTP.
3865 @item Ensuring that files and directories exist on the remote machine.
3866 @end itemize")
3867 (license license:asl2.0)))
3868
3869 (define-public python-rstr
3870 (package
3871 (name "python-rstr")
3872 (version "2.2.6")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (pypi-uri "rstr" version))
3877 (sha256
3878 (base32
3879 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3880 (build-system python-build-system)
3881 (home-page
3882 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3883 (synopsis "Generate random strings in Python")
3884 (description "This package provides a python module for generating
3885 random strings of various types. It could be useful for fuzz testing,
3886 generating dummy data, or other applications. It has no dependencies
3887 outside the standard library.")
3888 (license license:bsd-3)))
3889
3890 (define-public python-scp
3891 (package
3892 (name "python-scp")
3893 (version "0.13.3")
3894 (source
3895 (origin
3896 (method url-fetch)
3897 (uri (pypi-uri "scp" version))
3898 (sha256
3899 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3900 (build-system python-build-system)
3901 (arguments
3902 '(#:tests? #f)) ;tests require an SSH server
3903 (propagated-inputs
3904 `(("python-paramiko" ,python-paramiko)))
3905 (home-page "https://github.com/jbardin/scp.py")
3906 (synopsis "SCP protocol module for Python and Paramiko")
3907 (description "The scp module extends the Paramiko library to send and
3908 receive files via the SCP1 protocol, as implemented by the OpenSSH
3909 @command{scp} program.")
3910 (license license:gpl2+)))
3911
3912 (define-public python-rst.linker
3913 (package
3914 (name "python-rst.linker")
3915 (version "1.11")
3916 (source
3917 (origin
3918 (method url-fetch)
3919 (uri (pypi-uri "rst.linker" version))
3920 (sha256
3921 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3922 (build-system python-build-system)
3923 (propagated-inputs
3924 `(("python-dateutil" ,python-dateutil)
3925 ("python-six" ,python-six)))
3926 (native-inputs
3927 `(("python-setuptools-scm" ,python-setuptools-scm)))
3928 ;; Test would require path.py, which would introduce a cyclic dependence.
3929 (arguments `(#:tests? #f))
3930 ;; Note: As of version 1.7 the documentation is not worth building.
3931 (home-page "https://github.com/jaraco/rst.linker")
3932 (synopsis "Sphinx plugin to add links and timestamps")
3933 (description "rst.linker automatically replaces text by a
3934 reStructuredText external reference or timestamps. It's primary purpose is to
3935 augment the changelog, but it can be used for other documents, too.")
3936 (license license:expat)))
3937
3938 (define-public python2-rst.linker
3939 (package-with-python2 python-rst.linker))
3940
3941 (define-public python-sshpubkeys
3942 (package
3943 (name "python-sshpubkeys")
3944 (version "3.1.0")
3945 (home-page "https://github.com/ojarva/python-sshpubkeys")
3946 (source (origin
3947 (method git-fetch)
3948 (uri (git-reference
3949 (url home-page)
3950 (commit (string-append "v" version))))
3951 (file-name (git-file-name name version))
3952 (sha256
3953 (base32
3954 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
3955 (build-system python-build-system)
3956 (propagated-inputs
3957 `(("python-cryptography" ,python-cryptography)
3958 ("python-ecdsa" ,python-ecdsa)))
3959 (synopsis "OpenSSH public key parser")
3960 (description
3961 "This package provides a library for parsing and validating OpenSSH
3962 public key files.")
3963 (license license:bsd-3)))
3964
3965 (define-public python-feedgenerator
3966 (package
3967 (name "python-feedgenerator")
3968 (version "1.9")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 (uri (pypi-uri "feedgenerator" version))
3973 (sha256
3974 (base32
3975 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3976 (modules '((guix build utils)))
3977 (snippet
3978 '(begin
3979 ;; Remove pre-compiled .pyc files from source.
3980 (for-each delete-file-recursively
3981 (find-files "." "__pycache__" #:directories? #t))
3982 (for-each delete-file (find-files "." "\\.pyc$"))
3983 #t))))
3984 (build-system python-build-system)
3985 (propagated-inputs
3986 `(("python-pytz" ,python-pytz)
3987 ("python-six" ,python-six)))
3988 (home-page "https://github.com/getpelican/feedgenerator")
3989 (synopsis
3990 "Standalone version of Django's Atom/RSS feed generator")
3991 (description
3992 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3993 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3994 (license license:bsd-3)))
3995
3996 (define-public python2-feedgenerator
3997 (package-with-python2 python-feedgenerator))
3998
3999 (define-public python-toml
4000 (package
4001 (name "python-toml")
4002 (version "0.10.1")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (pypi-uri "toml" version))
4007 (sha256
4008 (base32
4009 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
4010 (build-system python-build-system)
4011 (arguments
4012 `(#:tests? #f)) ;no tests suite in release
4013 (home-page "https://github.com/uiri/toml")
4014 (synopsis "Library for TOML")
4015 (description
4016 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4017 Language (TOML) configuration files.")
4018 (license license:expat)))
4019
4020 (define-public python-jsonrpc-server
4021 (package
4022 (name "python-jsonrpc-server")
4023 (version "0.3.4")
4024 (source
4025 (origin
4026 (method url-fetch)
4027 (uri (pypi-uri "python-jsonrpc-server" version))
4028 (sha256
4029 (base32
4030 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
4031 (build-system python-build-system)
4032 (propagated-inputs
4033 `(("python-mock" ,python-mock)
4034 ("python-pytest" ,python-pytest)
4035 ("python-ujson" ,python-ujson-1)))
4036 (home-page
4037 "https://github.com/palantir/python-jsonrpc-server")
4038 (synopsis "JSON RPC 2.0 server library")
4039 (description
4040 "This package provides a JSON RPC 2.0 server library for Python.")
4041 (license license:expat)))
4042
4043 (define-public python-pydantic
4044 (package
4045 (name "python-pydantic")
4046 (version "1.6.1")
4047 (source
4048 (origin
4049 (method git-fetch)
4050 (uri (git-reference
4051 (url "https://github.com/samuelcolvin/pydantic")
4052 (commit (string-append "v" version))))
4053 (file-name (git-file-name name version))
4054 (sha256
4055 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4056 (build-system python-build-system)
4057 (arguments
4058 '(#:phases
4059 (modify-phases %standard-phases
4060 ;; Reported upstream:
4061 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4062 ;; Disable the faulty test as the fix is unclear.
4063 (add-before 'check 'disable-test
4064 (lambda _
4065 (substitute* "tests/test_validators.py"
4066 (("test_assert_raises_validation_error")
4067 "_test_assert_raises_validation_error"))
4068 #t))
4069 (replace 'check
4070 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4071 (native-inputs
4072 `(("python-pytest" ,python-pytest)))
4073 (home-page "https://github.com/samuelcolvin/pydantic")
4074 (synopsis "Python data validation and settings management")
4075 (description
4076 "Pydantic enforces type hints at runtime, and provides user friendly
4077 errors when data is invalid.")
4078 (license license:expat)))
4079
4080 (define-public python-pydocstyle
4081 (package
4082 (name "python-pydocstyle")
4083 (version "3.0.0")
4084 (source
4085 (origin
4086 (method url-fetch)
4087 (uri (pypi-uri "pydocstyle" version))
4088 (sha256
4089 (base32
4090 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4091 (build-system python-build-system)
4092 (propagated-inputs
4093 `(("python-six" ,python-six)
4094 ("python-snowballstemmer" ,python-snowballstemmer)))
4095 (home-page
4096 "https://github.com/PyCQA/pydocstyle/")
4097 (synopsis "Python docstring style checker")
4098 (description
4099 "This package provides a style checker for the Python Language
4100 Server (PLS).")
4101 (license license:expat)))
4102
4103 (define-public python-language-server
4104 (package
4105 (name "python-language-server")
4106 (version "0.34.1")
4107 (source
4108 (origin
4109 (method url-fetch)
4110 (uri (pypi-uri "python-language-server" version))
4111 (sha256
4112 (base32
4113 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4114 (build-system python-build-system)
4115 (propagated-inputs
4116 `(("python-pluggy" ,python-pluggy)
4117 ("python-jsonrpc-server" ,python-jsonrpc-server)
4118 ("python-jedi" ,python-jedi)
4119 ("python-yapf" ,python-yapf)
4120 ("python-pyflakes" ,python-pyflakes)
4121 ("python-pydocstyle" ,python-pydocstyle)
4122 ("python-pycodestyle" ,python-pycodestyle)
4123 ("python-mccabe" ,python-mccabe)
4124 ("python-rope" ,python-rope)
4125 ("python-autopep8" ,python-autopep8)
4126 ("python-flake8" ,python-flake8)
4127 ("python-pylint" ,python-pylint)))
4128 (home-page "https://github.com/palantir/python-language-server")
4129 (synopsis "Python implementation of the Language Server Protocol")
4130 (description
4131 "The Python Language Server (pyls) is an implementation of the Python 3
4132 language specification for the Language Server Protocol (LSP). This tool is
4133 used in text editing environments to provide a complete and integrated
4134 feature-set for programming Python effectively.")
4135 (license license:expat)))
4136
4137 (define-public python-pathspec
4138 (package
4139 (name "python-pathspec")
4140 (version "0.7.0")
4141 (source
4142 (origin
4143 (method url-fetch)
4144 (uri (pypi-uri "pathspec" version))
4145 (sha256
4146 (base32
4147 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4148 (build-system python-build-system)
4149 (home-page "https://github.com/cpburnz/python-path-specification")
4150 (synopsis "Utility library for gitignore style pattern matching of file paths")
4151 (description
4152 "This package provides a utility library for gitignore style pattern
4153 matching of file paths.")
4154 (license license:mpl2.0)))
4155
4156 (define-public python-black
4157 (package
4158 (name "python-black")
4159 (version "20.8b1")
4160 (source
4161 (origin
4162 (method url-fetch)
4163 (uri (pypi-uri "black" version))
4164 (sha256
4165 (base32
4166 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4167 (build-system python-build-system)
4168 (arguments
4169 `(#:phases
4170 (modify-phases %standard-phases
4171 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4172 (lambda _
4173 (let ((python3 (which "python3")))
4174 (substitute* '("tests/data/fmtonoff.py"
4175 "tests/data/string_prefixes.py"
4176 "tests/data/function.py"
4177 "tests/data/python37.py")
4178 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4179 (string-append "#!" python3 (if (string? minor-version)
4180 minor-version
4181 "")))))
4182 #t))
4183 (add-after 'unpack 'disable-broken-tests
4184 (lambda* (#:key outputs inputs #:allow-other-keys)
4185 ;; Make installed package available for running the tests
4186 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4187 ":" (getenv "PATH")))
4188
4189 ;; These tests are supposed to be skipped when the blackd
4190 ;; dependencies are missing, but this doesn't quite work.
4191 (substitute* "tests/test_black.py"
4192 (("( *)class BlackDTestCase.*" match indent)
4193 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4194 indent "class BlackDTestCase(unittest.TestCase):\n"))
4195 (("web.Application") "False")
4196 (("@unittest_run_loop") ""))
4197
4198 ;; Patching the above file breaks the self test
4199 (substitute* "tests/test_black.py"
4200 (("( *)def test_self" match indent)
4201 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4202
4203 (substitute* "tests/test_black.py"
4204 (("( *)def test_python38" match indent)
4205 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4206 #t)))))
4207 (propagated-inputs
4208 `(("python-click" ,python-click)
4209 ("python-attrs" ,python-attrs)
4210 ("python-appdirs" ,python-appdirs)
4211 ("python-pathspec" ,python-pathspec)
4212 ("python-mypy-extensions" ,python-mypy-extensions)
4213 ("python-regex" ,python-regex)
4214 ("python-toml" ,python-toml)
4215 ("python-typed-ast" ,python-typed-ast)
4216 ("python-typing-extensions" ,python-typing-extensions)))
4217 (native-inputs
4218 `(("python-setuptools-scm" ,python-setuptools-scm)))
4219 (home-page "https://github.com/ambv/black")
4220 (synopsis "The uncompromising code formatter")
4221 (description "Black is the uncompromising Python code formatter.")
4222 (license license:expat)))
4223
4224 (define-public python-black-macchiato
4225 (package
4226 (name "python-black-macchiato")
4227 (version "1.3.0")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "black-macchiato" version))
4232 (sha256
4233 (base32
4234 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4235 (build-system python-build-system)
4236 (propagated-inputs
4237 `(("python-black" ,python-black)))
4238 (home-page "https://github.com/wbolster/black-macchiato")
4239 (synopsis "Partial @code{python-black} formatting")
4240 (description
4241 "This package is built on top the @{python-black} code formatter to
4242 enable formatting of partial files.")
4243 (license license:bsd-3)))
4244
4245 (define-public python-blinker
4246 (package
4247 (name "python-blinker")
4248 (version "1.4")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "blinker" version))
4253 (sha256
4254 (base32
4255 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4256 (build-system python-build-system)
4257 (home-page "https://pythonhosted.org/blinker/")
4258 (synopsis "Fast, simple object-to-object and broadcast signaling")
4259 (description
4260 "Blinker provides a fast dispatching system that allows any number of
4261 interested parties to subscribe to events, or \"signals\".")
4262 (license license:expat)))
4263
4264 (define-public python2-blinker
4265 (package-with-python2 python-blinker))
4266
4267 (define-public pelican
4268 (package
4269 (name "pelican")
4270 (version "4.2.0")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (pypi-uri "pelican" version))
4275 (sha256
4276 (base32
4277 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4278 (build-system python-build-system)
4279 (propagated-inputs
4280 `(("python-blinker" ,python-blinker)
4281 ("python-dateutil" ,python-dateutil)
4282 ("python-docutils" ,python-docutils)
4283 ("python-feedgenerator" ,python-feedgenerator)
4284 ("python-jinja2" ,python-jinja2)
4285 ("python-markdown" ,python-markdown)
4286 ("python-pygments" ,python-pygments)
4287 ("python-pytz" ,python-pytz)
4288 ("python-six" ,python-six)
4289 ("python-unidecode" ,python-unidecode)))
4290 (home-page "https://getpelican.com/")
4291 (arguments
4292 `(;; XXX Requires a lot more packages to do unit tests :P
4293 #:tests? #f))
4294 (synopsis "Python-based static site publishing system")
4295 (description
4296 "Pelican is a tool to generate a static blog from reStructuredText,
4297 Markdown input files, and more. Pelican uses Jinja2 for templating
4298 and is very extensible.")
4299 (license license:agpl3+)))
4300
4301 (define-public mallard-ducktype
4302 (package
4303 (name "mallard-ducktype")
4304 (version "1.0.2")
4305 (source
4306 (origin
4307 (method git-fetch)
4308 ;; git-reference because tests are not included in pypi source tarball
4309 ;; https://issues.guix.gnu.org/issue/36755#2
4310 (uri (git-reference
4311 (url "https://github.com/projectmallard/mallard-ducktype")
4312 (commit version)))
4313 (file-name (git-file-name name version))
4314 (sha256
4315 (base32
4316 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4317 (build-system python-build-system)
4318 (arguments
4319 '(#:phases
4320 (modify-phases %standard-phases
4321 (replace 'check
4322 (lambda _
4323 (with-directory-excursion "tests"
4324 (invoke "sh" "runtests")))))))
4325 (home-page "http://projectmallard.org")
4326 (synopsis "Convert Ducktype to Mallard documentation markup")
4327 (description
4328 "Ducktype is a lightweight syntax that can represent all the semantics
4329 of the Mallard XML documentation system. Ducktype files can be converted to
4330 Mallard using the @command{ducktype} tool. The yelp-tools package
4331 provides additional functionality on the produced Mallard documents.")
4332 (license license:expat)))
4333
4334 (define-public python-cython
4335 (package
4336 (name "python-cython")
4337 (version "0.29.21")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (pypi-uri "Cython" version))
4342 (sha256
4343 (base32
4344 "1bcwpra7c6k30yvic3sw2v3rq2dr40ypc4zqif6kr52mpn4wnyp5"))))
4345 (build-system python-build-system)
4346 ;; we need the full python package and not just the python-wrapper
4347 ;; because we need libpython3.3m.so
4348 (inputs
4349 `(("python" ,python)))
4350 (arguments
4351 `(#:phases
4352 (modify-phases %standard-phases
4353 (add-before 'check 'set-HOME
4354 ;; some tests require access to "$HOME/.cython"
4355 (lambda _ (setenv "HOME" "/tmp") #t))
4356 (replace 'check
4357 (lambda _
4358 ;; Disable compiler optimizations to greatly reduce the running
4359 ;; time of the test suite.
4360 (setenv "CFLAGS" "-O0")
4361
4362 (invoke "python" "runtests.py" "-vv"
4363 "-j" (number->string (parallel-job-count))
4364 ;; XXX: On 32-bit architectures, running the parallel tests
4365 ;; fails on many-core systems, see
4366 ;; <https://github.com/cython/cython/issues/2807>.
4367 ,@(if (not (target-64bit?))
4368 '("-x" "run.parallel")
4369 '())))))))
4370 (home-page "https://cython.org/")
4371 (synopsis "C extensions for Python")
4372 (description "Cython is an optimising static compiler for both the Python
4373 programming language and the extended Cython programming language. It makes
4374 writing C extensions for Python as easy as Python itself.")
4375 (license license:asl2.0)
4376 (properties `((python2-variant . ,(delay python2-cython))))))
4377
4378 (define-public python2-cython
4379 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4380 (package
4381 (inherit base)
4382 (name "python2-cython")
4383 (inputs
4384 `(("python-2" ,python-2))) ;this is not automatically changed
4385 (arguments
4386 (substitute-keyword-arguments (package-arguments base)
4387 ((#:phases phases)
4388 `(modify-phases ,phases
4389 (add-before 'check 'adjust-test_embed
4390 (lambda _
4391 (substitute* "runtests.py"
4392 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4393 ;; so it can give the right -L flag to GCC when embedding static
4394 ;; builds of Python. It is unaware that the Python "config"
4395 ;; directory (where the static library lives) was renamed in
4396 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4397 ;; which works fine, because that is where the shared library is.
4398 ;;
4399 ;; It also appears to be unaware that the Makefile in Demos/embed
4400 ;; already unconditionally pass the static library location to GCC,
4401 ;; after checking sysconfig.get_config_var('LIBPL).
4402 ;;
4403 ;; The effect is that the linker is unable to resolve libexpat
4404 ;; symbols when building for Python 2, because neither the Python 2
4405 ;; shared library nor Expat is available. To fix it, we can either
4406 ;; add Expat as an input and make it visible to the linker, or just
4407 ;; prevent it from overriding the Python shared library location.
4408 ;; The end result is identical, so we take the easy route.
4409 ((" or libname not in os\\.listdir\\(libdir\\)")
4410 ""))
4411 #t)))))))))
4412
4413 ;; The RPython toolchain currently does not support Python 3.
4414 (define-public python2-rpython
4415 (package
4416 (name "python2-rpython")
4417 (version "0.2.1")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (pypi-uri "rpython" version))
4422 (sha256
4423 (base32
4424 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4425 (build-system python-build-system)
4426 (arguments `(#:python ,python-2))
4427 (native-inputs
4428 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4429 (home-page "https://rpython.readthedocs.org")
4430 (synopsis "Framework for implementing interpreters and virtual machines")
4431 (description "RPython is a translation and support framework for
4432 producing implementations of dynamic languages, emphasizing a clean separation
4433 between language specification and implementation aspects.")
4434 (license license:expat)))
4435
4436 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4437 ;; python-scipy still build, as these three packages are often used together.
4438 (define-public python-numpy
4439 (package
4440 (name "python-numpy")
4441 (version "1.17.3")
4442 (source
4443 (origin
4444 (method url-fetch)
4445 (uri (string-append
4446 "https://github.com/numpy/numpy/releases/download/v"
4447 version "/numpy-" version ".tar.gz"))
4448 (sha256
4449 (base32
4450 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4451 (build-system python-build-system)
4452 (inputs
4453 `(("openblas" ,openblas)
4454 ("lapack" ,lapack)))
4455 (native-inputs
4456 `(("python-cython" ,python-cython)
4457 ("python-pytest" ,python-pytest)
4458 ("gfortran" ,gfortran)))
4459 (arguments
4460 `(#:phases
4461 (modify-phases %standard-phases
4462 (add-before 'build 'configure-blas-lapack
4463 (lambda* (#:key inputs #:allow-other-keys)
4464 (call-with-output-file "site.cfg"
4465 (lambda (port)
4466 (format port
4467 "[openblas]
4468 libraries = openblas
4469 library_dirs = ~a/lib
4470 include_dirs = ~a/include
4471
4472 # backslash-n to make emacs happy
4473 \n[lapack]
4474 lapack_libs = lapack
4475 library_dirs = ~a/lib
4476 include_dirs = ~a/include
4477 "
4478 (assoc-ref inputs "openblas")
4479 (assoc-ref inputs "openblas")
4480 (assoc-ref inputs "lapack")
4481 (assoc-ref inputs "lapack"))))
4482 #t))
4483 (add-before 'build 'fix-executable-paths
4484 (lambda* (#:key inputs #:allow-other-keys)
4485 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4486 ;; instead of /bin/sh.
4487 (substitute* "numpy/distutils/exec_command.py"
4488 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4489 (string-append match-start (assoc-ref inputs "bash") match-end)))
4490 ;; Use "gcc" executable, not "cc".
4491 (substitute* "numpy/distutils/system_info.py"
4492 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4493 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4494 #t))
4495 ;; Tests can only be run after the library has been installed and not
4496 ;; within the source directory.
4497 (delete 'check)
4498 (add-after 'install 'check
4499 (lambda* (#:key outputs inputs #:allow-other-keys)
4500 ;; Make installed package available for running the tests
4501 (add-installed-pythonpath inputs outputs)
4502 ;; Make sure "f2py" etc is found.
4503 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4504 ":" (getenv "PATH")))
4505 (with-directory-excursion "/tmp"
4506 (invoke "python" "-c"
4507 "import numpy; numpy.test(verbose=2)")))))))
4508 (home-page "https://numpy.org")
4509 (synopsis "Fundamental package for scientific computing with Python")
4510 (description "NumPy is the fundamental package for scientific computing
4511 with Python. It contains among other things: a powerful N-dimensional array
4512 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4513 and Fortran code, useful linear algebra, Fourier transform, and random number
4514 capabilities.")
4515 (properties `((python2-variant . ,(delay python2-numpy))))
4516 (license license:bsd-3)))
4517
4518 ;; Numpy 1.16.x are the last versions that support Python 2.
4519 (define-public python2-numpy
4520 (let ((numpy (package-with-python2
4521 (strip-python2-variant python-numpy))))
4522 (package/inherit
4523 numpy
4524 (version "1.16.5")
4525 (source (origin
4526 (method url-fetch)
4527 (uri (string-append
4528 "https://github.com/numpy/numpy/releases/download/v"
4529 version "/numpy-" version ".tar.gz"))
4530 (sha256
4531 (base32
4532 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4533
4534 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4535 ;; interest only for legacy code going back to NumPy's predecessor
4536 ;; Numeric.
4537 (define-public python2-numpy-1.8
4538 (package (inherit python2-numpy)
4539 (version "1.8.2")
4540 (source
4541 (origin
4542 (method git-fetch)
4543 (uri (git-reference
4544 (url "https://github.com/numpy/numpy")
4545 (commit (string-append "v" version))))
4546 (file-name (git-file-name "numpy" version))
4547 (sha256
4548 (base32
4549 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4550 (arguments
4551 (substitute-keyword-arguments (package-arguments python2-numpy)
4552 ((#:phases phases)
4553 `(modify-phases ,phases
4554 (replace 'configure-blas-lapack
4555 (lambda* (#:key inputs #:allow-other-keys)
4556 (call-with-output-file "site.cfg"
4557 (lambda (port)
4558 (format port
4559 "[openblas]
4560 libraries = openblas,lapack
4561 library_dirs = ~a/lib:~a/lib
4562 include_dirs = ~a/include:~a/include
4563 "
4564 (assoc-ref inputs "openblas")
4565 (assoc-ref inputs "lapack")
4566 (assoc-ref inputs "openblas")
4567 (assoc-ref inputs "lapack"))))
4568 #t))))))
4569 (native-inputs
4570 `(("python2-nose" ,python2-nose)))
4571 (description "NumPy is the fundamental package for scientific computing
4572 with Python. It contains among other things: a powerful N-dimensional array
4573 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4574 and Fortran code, useful linear algebra, Fourier transform, and random number
4575 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4576 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4577 Numeric.")
4578 (license license:bsd-3)))
4579
4580 (define-public python-munch
4581 (package
4582 (name "python-munch")
4583 (version "2.0.4")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (pypi-uri "munch" version))
4588 (sha256
4589 (base32
4590 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4591 (build-system python-build-system)
4592 (home-page "https://github.com/Infinidat/munch")
4593 (synopsis "Dot-accessible dictionary")
4594 (description "Munch is a dot-accessible dictionary similar to JavaScript
4595 objects.")
4596 (license license:expat)))
4597
4598 (define-public python2-munch
4599 (package-with-python2 python-munch))
4600
4601 (define-public python-colormath
4602 (package
4603 (name "python-colormath")
4604 (version "3.0.0")
4605 (source
4606 (origin
4607 (method url-fetch)
4608 (uri (pypi-uri "colormath" version))
4609 (sha256
4610 (base32
4611 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4612 (build-system python-build-system)
4613 (propagated-inputs
4614 `(("python-networkx" ,python-networkx)
4615 ("python-numpy" ,python-numpy)))
4616 (home-page "https://github.com/gtaylor/python-colormath")
4617 (synopsis "Color math and conversion library")
4618 (description
4619 "This is a Python library for color math and conversions.")
4620 (license license:bsd-3)))
4621
4622 (define-public python2-colormath
4623 (package-with-python2 python-colormath))
4624
4625 (define-public python-spectra
4626 (package
4627 (name "python-spectra")
4628 (version "0.0.11")
4629 (source
4630 (origin
4631 (method url-fetch)
4632 (uri (pypi-uri "spectra" version))
4633 (sha256
4634 (base32
4635 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4636 (build-system python-build-system)
4637 (arguments
4638 `(#:phases
4639 (modify-phases %standard-phases
4640 (replace 'check
4641 (lambda _ (invoke "nosetests" "-v"))))))
4642 (propagated-inputs
4643 `(("python-colormath" ,python-colormath)))
4644 (native-inputs
4645 `(("python-nose" ,python-nose)))
4646 (home-page "https://github.com/jsvine/spectra")
4647 (synopsis "Color scales and color conversion")
4648 (description
4649 "This package provides a Python library intended to make color math,
4650 color scales, and color space conversion easy. It has support for:
4651
4652 @enumerate
4653 @item Color scales
4654 @item Color ranges
4655 @item Color blending
4656 @item Brightening/darkening colors
4657 @item Saturating/desaturating colors
4658 @item Conversion to/from multiple color spaces.
4659 @end enumerate\n")
4660 (license license:expat)))
4661
4662 (define-public python2-spectra
4663 (package-with-python2 python-spectra))
4664
4665 (define-public python-numpy-documentation
4666 (package
4667 (name "python-numpy-documentation")
4668 (version (package-version python-numpy))
4669 (source (package-source python-numpy))
4670 (build-system python-build-system)
4671 (native-inputs
4672 `(("python-matplotlib" ,python-matplotlib)
4673 ("python-numpy" ,python-numpy)
4674 ("pkg-config" ,pkg-config)
4675 ("python-sphinx" ,python-sphinx)
4676 ("python-numpydoc" ,python-numpydoc)
4677 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4678 texlive-fonts-ec
4679 texlive-generic-ifxetex
4680 texlive-generic-pdftex
4681 texlive-amsfonts
4682 texlive-latex-capt-of
4683 texlive-latex-cmap
4684 texlive-latex-environ
4685 texlive-latex-eqparbox
4686 texlive-latex-etoolbox
4687 texlive-latex-expdlist
4688 texlive-latex-fancyhdr
4689 texlive-latex-fancyvrb
4690 texlive-latex-fncychap
4691 texlive-latex-float
4692 texlive-latex-framed
4693 texlive-latex-geometry
4694 texlive-latex-graphics
4695 texlive-latex-hyperref
4696 texlive-latex-mdwtools
4697 texlive-latex-multirow
4698 texlive-latex-needspace
4699 texlive-latex-oberdiek
4700 texlive-latex-parskip
4701 texlive-latex-preview
4702 texlive-latex-tabulary
4703 texlive-latex-threeparttable
4704 texlive-latex-titlesec
4705 texlive-latex-trimspaces
4706 texlive-latex-ucs
4707 texlive-latex-upquote
4708 texlive-latex-url
4709 texlive-latex-varwidth
4710 texlive-latex-wrapfig)))
4711 ("texinfo" ,texinfo)
4712 ("perl" ,perl)
4713 ("scipy-sphinx-theme"
4714 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4715 (method git-fetch)
4716 (uri (git-reference
4717 (url "https://github.com/scipy/scipy-sphinx-theme")
4718 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4719 (sha256
4720 (base32
4721 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4722 ,@(package-native-inputs python-numpy)))
4723 (arguments
4724 `(#:tests? #f ; we're only generating the documentation
4725 #:phases
4726 (modify-phases %standard-phases
4727 (delete 'build)
4728 (replace 'install
4729 (lambda* (#:key inputs outputs #:allow-other-keys)
4730 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4731 (doc (string-append
4732 data "/doc/" ,name "-"
4733 ,(package-version python-numpy)))
4734 (info-reader (string-append data "/info"))
4735 (html (string-append doc "/html"))
4736 (scipy-sphinx-theme "scipy-sphinx-theme")
4737 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4738 (pyver ,(string-append "PYVER=")))
4739
4740 ;; FIXME: this is needed to for texlive-union to generate
4741 ;; fonts, which are not found.
4742 (setenv "HOME" "/tmp")
4743
4744 (with-directory-excursion "doc"
4745 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4746 (mkdir-p html)
4747 (invoke "make" "html" pyver)
4748 (invoke "make" "latex" "PAPER=a4" pyver)
4749 (invoke "make" "-C" "build/latex"
4750 "all-pdf" "PAPER=a4" pyver)
4751 ;; FIXME: Generation of the info file fails.
4752 ;; (invoke "make" "info" pyver)
4753 ;; (mkdir-p info)
4754 ;; (copy-file "build/texinfo/numpy.info"
4755 ;; (string-append info "/numpy.info"))
4756 (for-each (lambda (file)
4757 (copy-file (string-append "build/latex" file)
4758 (string-append doc file)))
4759 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4760 (with-directory-excursion "build/html"
4761 (for-each (lambda (file)
4762 (let* ((dir (dirname file))
4763 (tgt-dir (string-append html "/" dir)))
4764 (unless (equal? "." dir)
4765 (mkdir-p tgt-dir))
4766 (install-file file html)))
4767 (find-files "." ".*")))))
4768 #t)))))
4769 (home-page (package-home-page python-numpy))
4770 (synopsis "Documentation for the python-numpy package")
4771 (description (package-description python-numpy))
4772 (license (package-license python-numpy))))
4773
4774 (define-public python2-numpy-documentation
4775 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4776 (package
4777 (inherit numpy-documentation)
4778 (native-inputs `(("python2-functools32" ,python2-functools32)
4779 ,@(package-native-inputs numpy-documentation))))))
4780
4781 (define-public python-pygit2
4782 (package
4783 (name "python-pygit2")
4784 (version "1.1.0")
4785 (source
4786 (origin
4787 (method url-fetch)
4788 (uri (pypi-uri "pygit2" version))
4789 (sha256
4790 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4791 (build-system python-build-system)
4792 (arguments
4793 '(#:tests? #f)) ; tests don't run correctly in our environment
4794 (propagated-inputs
4795 `(("python-cached-property" ,python-cached-property)
4796 ("python-cffi" ,python-cffi)
4797 ("libgit2" ,libgit2)))
4798 (native-inputs
4799 `(("python-pytest" ,python-pytest)))
4800 (home-page "https://github.com/libgit2/pygit2")
4801 (synopsis "Python bindings for libgit2")
4802 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4803 library, libgit2 implements Git plumbing.")
4804 ;; GPL2.0 only, with linking exception.
4805 (license license:gpl2)))
4806
4807 (define-public python-patiencediff
4808 (package
4809 (name "python-patiencediff")
4810 (version "0.2.0")
4811 (source
4812 (origin
4813 (method url-fetch)
4814 (uri (pypi-uri "patiencediff" version))
4815 (sha256
4816 (base32
4817 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4818 (build-system python-build-system)
4819 (home-page "https://www.breezy-vcs.org/")
4820 (synopsis "Python implementation of the patiencediff algorithm")
4821 (description
4822 "This package contains a Python implementation of the @code{patiencediff}
4823 algorithm. Patiencediff provides a good balance of performance, nice output for
4824 humans, and implementation simplicity.")
4825 (license license:gpl2)))
4826
4827 (define-public python-pyparsing
4828 (package
4829 (name "python-pyparsing")
4830 (version "2.4.6")
4831 (source
4832 (origin
4833 (method url-fetch)
4834 (uri (pypi-uri "pyparsing" version))
4835 (sha256
4836 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4837 (build-system python-build-system)
4838 (outputs '("out" "doc"))
4839 (arguments
4840 `(#:tests? #f ; no test target
4841 #:phases
4842 (modify-phases %standard-phases
4843 (add-after 'install 'install-doc
4844 (lambda* (#:key outputs #:allow-other-keys)
4845 (let* ((doc (string-append (assoc-ref outputs "doc")
4846 "/share/doc/" ,name "-" ,version))
4847 (html-doc (string-append doc "/html"))
4848 (examples (string-append doc "/examples")))
4849 (mkdir-p html-doc)
4850 (mkdir-p examples)
4851 (for-each
4852 (lambda (dir tgt)
4853 (map (lambda (file)
4854 (install-file file tgt))
4855 (find-files dir ".*")))
4856 (list "docs" "htmldoc" "examples")
4857 (list doc html-doc examples))
4858 #t))))))
4859 (home-page "https://github.com/pyparsing/pyparsing")
4860 (synopsis "Python parsing class library")
4861 (description
4862 "The pyparsing module is an alternative approach to creating and
4863 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4864 of regular expressions. The pyparsing module provides a library of classes
4865 that client code uses to construct the grammar directly in Python code.")
4866 (license license:expat)))
4867
4868 (define-public python2-pyparsing
4869 (package-with-python2 python-pyparsing))
4870
4871 (define-public python-pyparsing-2.4.7
4872 (package
4873 (inherit python-pyparsing)
4874 (version "2.4.7")
4875 (source
4876 (origin
4877 (method url-fetch)
4878 (uri (pypi-uri "pyparsing" version))
4879 (sha256
4880 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4881
4882 (define-public python-numpydoc
4883 (package
4884 (name "python-numpydoc")
4885 (version "0.8.0")
4886 (source
4887 (origin
4888 (method url-fetch)
4889 (uri (pypi-uri "numpydoc" version))
4890 (sha256
4891 (base32
4892 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4893 (build-system python-build-system)
4894 (propagated-inputs
4895 `(("python-sphinx" ,python-sphinx)))
4896 (native-inputs
4897 `(("python-nose" ,python-nose)))
4898 (home-page "https://pypi.org/project/numpydoc/")
4899 (synopsis
4900 "Numpy's Sphinx extensions")
4901 (description
4902 "Sphinx extension to support docstrings in Numpy format.")
4903 (license license:bsd-2)))
4904
4905 (define-public python2-numpydoc
4906 (package-with-python2 python-numpydoc))
4907
4908 (define-public python-numexpr
4909 (package
4910 (name "python-numexpr")
4911 (version "2.6.5")
4912 (source
4913 (origin
4914 (method url-fetch)
4915 (uri (pypi-uri "numexpr" version))
4916 (sha256
4917 (base32
4918 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4919 (build-system python-build-system)
4920 (arguments `(#:tests? #f)) ; no tests included
4921 (propagated-inputs
4922 `(("python-numpy" ,python-numpy)))
4923 (home-page "https://github.com/pydata/numexpr")
4924 (synopsis "Fast numerical expression evaluator for NumPy")
4925 (description
4926 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4927 expressions that operate on arrays are accelerated and use less memory than
4928 doing the same calculation in Python. In addition, its multi-threaded
4929 capabilities can make use of all your cores, which may accelerate
4930 computations, most specially if they are not memory-bounded (e.g. those using
4931 transcendental functions).")
4932 (license license:expat)))
4933
4934 (define-public python2-numexpr
4935 (package-with-python2 python-numexpr))
4936
4937 (define-public python-cycler
4938 (package
4939 (name "python-cycler")
4940 (version "0.10.0")
4941 (source (origin
4942 (method url-fetch)
4943 (uri (pypi-uri "cycler" version))
4944 (sha256
4945 (base32
4946 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4947 (build-system python-build-system)
4948 (arguments
4949 ;; XXX: The current version requires 'coveralls' which we don't have.
4950 ;; Enable this for the next release which uses 'python-pytest'.
4951 '(#:tests? #f))
4952 (propagated-inputs
4953 `(("python-six" ,python-six)))
4954 (home-page "http://matplotlib.org/cycler/")
4955 (synopsis "Composable keyword argument iterator")
4956 (description
4957 "When using @code{matplotlib} and plotting more than one line, it is
4958 common to want to be able to want to be able to cycle over one or more artist
4959 styles; but the plotting logic can quickly become involved.
4960 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4961 @code{Cycler} class was developed.")
4962 (license license:bsd-3)))
4963
4964 (define-public python2-cycler
4965 (package-with-python2 python-cycler))
4966
4967 (define-public python-colorspacious
4968 (package
4969 (name "python-colorspacious")
4970 (version "1.1.2")
4971 (source
4972 (origin
4973 (method git-fetch)
4974 (uri (git-reference
4975 (url "https://github.com/njsmith/colorspacious")
4976 (commit (string-append "v" version))))
4977 (file-name (git-file-name name version))
4978 (sha256
4979 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4980 (build-system python-build-system)
4981 (propagated-inputs
4982 `(("python-numpy" ,python-numpy)))
4983 (native-inputs
4984 `(("python-nose" ,python-nose)))
4985 (arguments
4986 `(#:phases
4987 (modify-phases %standard-phases
4988 (replace 'check
4989 (lambda _
4990 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4991 (home-page "https://github.com/njsmith/colorspacious")
4992 (synopsis "Python library for colorspace conversions")
4993 (description "@code{colorspacious} is a Python library that lets you
4994 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4995 (license license:expat)))
4996
4997 (define-public python2-colorspacious
4998 (package-with-python2 python-colorspacious))
4999
5000 (define-public python-matplotlib
5001 (package
5002 (name "python-matplotlib")
5003 (version "3.1.2")
5004 (source
5005 (origin
5006 (method url-fetch)
5007 (uri (pypi-uri "matplotlib" version))
5008 (sha256
5009 (base32
5010 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5011 (build-system python-build-system)
5012 (propagated-inputs ; the following packages are all needed at run time
5013 `(("python-cycler" ,python-cycler)
5014 ("python-kiwisolver" ,python-kiwisolver)
5015 ("python-pyparsing" ,python-pyparsing)
5016 ("python-pygobject" ,python-pygobject)
5017 ("gobject-introspection" ,gobject-introspection)
5018 ("python-tkinter" ,python "tk")
5019 ("python-dateutil" ,python-dateutil)
5020 ("python-numpy" ,python-numpy)
5021 ("python-pillow" ,python-pillow)
5022 ("python-pytz" ,python-pytz)
5023 ("python-six" ,python-six)
5024 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5025 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5026 ;; object. For this reason we need to import both libraries.
5027 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5028 ("python-pycairo" ,python-pycairo)
5029 ("python-cairocffi" ,python-cairocffi)))
5030 (inputs
5031 `(("libpng" ,libpng)
5032 ("freetype" ,freetype)
5033 ("cairo" ,cairo)
5034 ("glib" ,glib)
5035 ;; FIXME: Add backends when available.
5036 ;("python-wxpython" ,python-wxpython)
5037 ("tcl" ,tcl)
5038 ("tk" ,tk)))
5039 (native-inputs
5040 `(("pkg-config" ,pkg-config)
5041 ("python-pytest" ,python-pytest)
5042 ("python-mock" ,python-mock)
5043 ("unzip" ,unzip)
5044 ("jquery-ui"
5045 ,(origin
5046 (method url-fetch)
5047 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5048 (sha256
5049 (base32
5050 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5051 (arguments
5052 `(#:phases
5053 (modify-phases %standard-phases
5054 ;; XXX We disable all image comparison tests because we're using a
5055 ;; newer version of FreeType than matplotlib expects. This leads to
5056 ;; minor differences throughout the tests.
5057 (add-after 'unpack 'fix-and-disable-failing-tests
5058 (lambda _
5059 (substitute* (append (find-files "lib/matplotlib/tests/"
5060 "test_.*\\.py$")
5061 (find-files "lib/mpl_toolkits/tests"
5062 "test_.*\\.py$"))
5063 (("^from matplotlib" match)
5064 (string-append "import pytest\n" match))
5065 (("( *)@image_comparison" match indent)
5066 (string-append indent
5067 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5068 match)))
5069 (substitute* "lib/matplotlib/tests/test_animation.py"
5070 (("/bin/sh") (which "sh")))
5071 (for-each delete-file
5072 ;; test_normal_axes, test_get_tightbbox_polar
5073 '("lib/matplotlib/tests/test_axes.py"
5074 ;; We don't use the webagg backend and this test forces it.
5075 "lib/matplotlib/tests/test_backend_webagg.py"
5076 ;; test_outward_ticks
5077 "lib/matplotlib/tests/test_tightlayout.py"
5078 ;; test_hidden_axes fails with minor extent
5079 ;; differences, possibly due to the use of a
5080 ;; different version of FreeType.
5081 "lib/matplotlib/tests/test_constrainedlayout.py"
5082 ;; Fontconfig returns no fonts.
5083 "lib/matplotlib/tests/test_font_manager.py"))
5084 #t))
5085 (add-before 'install 'install-jquery-ui
5086 (lambda* (#:key outputs inputs #:allow-other-keys)
5087 (let ((dir (string-append (assoc-ref outputs "out")
5088 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5089 (mkdir-p dir)
5090 (invoke "unzip"
5091 (assoc-ref inputs "jquery-ui")
5092 "-d" dir))
5093 #t))
5094 (replace 'check
5095 (lambda* (#:key outputs inputs #:allow-other-keys)
5096 (add-installed-pythonpath inputs outputs)
5097 (invoke "python" "tests.py" "-v"
5098 "-m" "not network and not webagg")))
5099 (add-before 'build 'configure-environment
5100 (lambda* (#:key outputs inputs #:allow-other-keys)
5101 (let ((cairo (assoc-ref inputs "cairo")))
5102 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5103 ;; has not effect.
5104 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5105 (setenv "HOME" (getcwd))
5106 ;; Fix rounding errors when using the x87 FPU.
5107 (when (string-prefix? "i686" ,(%current-system))
5108 (setenv "CFLAGS" "-ffloat-store"))
5109 (call-with-output-file "setup.cfg"
5110 (lambda (port)
5111 (format port "[directories]~%
5112 basedirlist = ~a,~a~%
5113 [packages]~%
5114 tests = True~%"
5115 (assoc-ref inputs "tcl")
5116 (assoc-ref inputs "tk")))))
5117 #t)))))
5118 (home-page "https://matplotlib.org/")
5119 (synopsis "2D plotting library for Python")
5120 (description
5121 "Matplotlib is a Python 2D plotting library which produces publication
5122 quality figures in a variety of hardcopy formats and interactive environments
5123 across platforms. Matplotlib can be used in Python scripts, the python and
5124 ipython shell, web application servers, and six graphical user interface
5125 toolkits.")
5126 (license license:psfl)
5127 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5128
5129 (define-public python2-matplotlib
5130 (let ((matplotlib (package-with-python2
5131 (strip-python2-variant python-matplotlib))))
5132 (package (inherit matplotlib)
5133 (version "2.2.4")
5134 (source
5135 (origin
5136 (method url-fetch)
5137 (uri (pypi-uri "matplotlib" version))
5138 (sha256
5139 (base32
5140 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5141 (arguments
5142 (substitute-keyword-arguments (package-arguments matplotlib)
5143 ((#:phases phases)
5144 `(modify-phases ,phases
5145 (replace 'install-jquery-ui
5146 (lambda* (#:key outputs inputs #:allow-other-keys)
5147 (let ((dir (string-append (assoc-ref outputs "out")
5148 "/lib/python2.7/site-packages/"
5149 "matplotlib/backends/web_backend/")))
5150 (mkdir-p dir)
5151 (invoke "unzip"
5152 (assoc-ref inputs "jquery-ui")
5153 "-d" dir))
5154 #t))
5155 (delete 'fix-and-disable-failing-tests)
5156 (delete 'check))))) ; These tests weren't run the the past.
5157 ;; Make sure to use special packages for Python 2 instead
5158 ;; of those automatically rewritten by package-with-python2.
5159 (propagated-inputs
5160 `(("python2-pycairo" ,python2-pycairo)
5161 ("python2-backports-functools-lru-cache"
5162 ,python2-backports-functools-lru-cache)
5163 ("python2-functools32" ,python2-functools32)
5164 ("python2-pygobject-2" ,python2-pygobject-2)
5165 ("python2-subprocess32" ,python2-subprocess32)
5166 ("python2-tkinter" ,python-2 "tk")
5167 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5168 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5169
5170 (define-public python-matplotlib-documentation
5171 (package
5172 (name "python-matplotlib-documentation")
5173 (version (package-version python-matplotlib))
5174 (source (package-source python-matplotlib))
5175 (build-system python-build-system)
5176 (native-inputs
5177 `(("python-matplotlib" ,python-matplotlib)
5178 ("python-colorspacious" ,python-colorspacious)
5179 ("python-sphinx" ,python-sphinx)
5180 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5181 ("python-sphinx-gallery" ,python-sphinx-gallery)
5182 ("python-numpydoc" ,python-numpydoc)
5183 ("python-ipython" ,python-ipython)
5184 ("python-ipykernel" ,python-ipykernel)
5185 ("python-mock" ,python-mock)
5186 ("graphviz" ,graphviz)
5187 ("texlive" ,(texlive-union (list texlive-amsfonts
5188 texlive-latex-amsmath
5189 texlive-latex-enumitem
5190 texlive-latex-expdlist
5191 texlive-latex-geometry
5192 texlive-latex-preview
5193 texlive-latex-type1cm
5194 texlive-latex-ucs
5195
5196 texlive-generic-pdftex
5197
5198 texlive-fonts-ec
5199 texlive-fonts-adobe-times
5200 texlive-fonts-txfonts)))
5201 ("texinfo" ,texinfo)
5202 ,@(package-native-inputs python-matplotlib)))
5203 (arguments
5204 `(#:tests? #f ; we're only generating documentation
5205 #:phases
5206 (modify-phases %standard-phases
5207 ;; The tests in python-matplotlib are run after the install phase, so
5208 ;; we need to delete the extra phase here.
5209 (delete 'check)
5210 (replace 'build
5211 (lambda _
5212 (chdir "doc")
5213 (setenv "PYTHONPATH"
5214 (string-append (getenv "PYTHONPATH")
5215 ":" (getcwd) "/../examples/units"))
5216 (substitute* "conf.py"
5217 ;; Don't use git.
5218 (("^SHA = check_output.*")
5219 (string-append "SHA = \"" ,version "\"\n"))
5220 ;; Don't fetch intersphinx files from the Internet
5221 (("^explicit_order_folders" m)
5222 (string-append "intersphinx_mapping = {}\n" m))
5223 (("'sphinx.ext.intersphinx',") "")
5224 ;; Disable URL embedding which requires internet access.
5225 (("'https://docs.scipy.org/doc/numpy'") "None")
5226 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5227 (invoke "make"
5228 "SPHINXBUILD=sphinx-build"
5229 "SPHINXOPTS=" ; don't abort on warnings
5230 "html" "texinfo")))
5231 (replace 'install
5232 (lambda* (#:key inputs outputs #:allow-other-keys)
5233 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5234 (doc (string-append data "/doc/python-matplotlib-" ,version))
5235 (info (string-append data "/info"))
5236 (html (string-append doc "/html")))
5237 (mkdir-p html)
5238 (mkdir-p info)
5239 (copy-recursively "build/html" html)
5240 (symlink (string-append html "/_images")
5241 (string-append info "/matplotlib-figures"))
5242 (with-directory-excursion "build/texinfo"
5243 (substitute* "matplotlib.texi"
5244 (("@image\\{([^,]*)" all file)
5245 (string-append "@image{matplotlib-figures/" file)))
5246 (symlink (string-append html "/_images")
5247 "./matplotlib-figures")
5248 (invoke "makeinfo" "--no-split"
5249 "-o" "matplotlib.info" "matplotlib.texi"))
5250 (install-file "build/texinfo/matplotlib.info" info))
5251 #t)))))
5252 (home-page (package-home-page python-matplotlib))
5253 (synopsis "Documentation for the python-matplotlib package")
5254 (description (package-description python-matplotlib))
5255 (license (package-license python-matplotlib))))
5256
5257 (define-public python2-matplotlib-documentation
5258 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5259 (package
5260 (inherit parent)
5261 (native-inputs
5262 (alist-delete "python-sphinx-copybutton"
5263 (package-native-inputs parent))))))
5264
5265 (define-public python-matplotlib-venn
5266 (package
5267 (name "python-matplotlib-venn")
5268 (version "0.11.5")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5273 (sha256
5274 (base32
5275 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5276 (build-system python-build-system)
5277 (arguments '(#:tests? #f)) ; tests are not included
5278 (propagated-inputs
5279 `(("python-matplotlib" ,python-matplotlib)
5280 ("python-numpy" ,python-numpy)
5281 ("python-scipy" ,python-scipy)))
5282 (native-inputs
5283 `(("unzip" ,unzip)))
5284 (home-page "https://github.com/konstantint/matplotlib-venn")
5285 (synopsis "Plot area-proportional Venn diagrams")
5286 (description
5287 "This package provides tools for plotting area-proportional two- and
5288 three-way Venn diagrams in @code{matplotlib}.")
5289 (license license:expat)))
5290
5291 (define-public python-pysnptools
5292 (package
5293 (name "python-pysnptools")
5294 (version "0.4.11")
5295 (source
5296 (origin
5297 (method url-fetch)
5298 (uri (pypi-uri "pysnptools" version))
5299 (sha256
5300 (base32
5301 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5302 (build-system python-build-system)
5303 (arguments
5304 `(#:tests? #f ; no test data are included
5305 #:phases
5306 (modify-phases %standard-phases
5307 (replace 'check
5308 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5309 (if tests?
5310 (begin
5311 (add-installed-pythonpath inputs outputs)
5312 (invoke "python3" "pysnptools/test.py"))
5313 #t))))))
5314 (propagated-inputs
5315 `(("python-dill" ,python-dill)
5316 ("python-h5py" ,python-h5py)
5317 ("python-numpy" ,python-numpy)
5318 ("python-pandas" ,python-pandas)
5319 ("python-psutil" ,python-psutil)
5320 ("python-scipy" ,python-scipy)))
5321 (native-inputs
5322 `(("python-cython" ,python-cython)))
5323 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5324 (synopsis "Library for reading and manipulating genetic data")
5325 (description
5326 "PySnpTools is a library for reading and manipulating genetic data. It
5327 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5328 those files. It can also efficiently manipulate ranges of integers using set
5329 operators such as union, intersection, and difference.")
5330 (license license:asl2.0)))
5331
5332 (define-public python2-pysnptools
5333 (package-with-python2 python-pysnptools))
5334
5335 (define-public python-wurlitzer
5336 (package
5337 (name "python-wurlitzer")
5338 (version "2.0.1")
5339 (source
5340 (origin
5341 (method url-fetch)
5342 (uri (pypi-uri "wurlitzer" version))
5343 (sha256
5344 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5345 (build-system python-build-system)
5346 (arguments
5347 '(#:phases
5348 (modify-phases %standard-phases
5349 (replace 'check
5350 (lambda _
5351 (invoke "pytest" "-vv" "test.py"))))))
5352 (native-inputs
5353 `(("python-mock" ,python-mock)
5354 ("python-pytest" ,python-pytest)))
5355 (home-page "https://github.com/minrk/wurlitzer")
5356 (synopsis "Capture C-level output in context managers")
5357 (description
5358 "This library helps to redirect @code{sys.stdout} to a stream or a file
5359 while executing some piece of code, including C code running within a Python
5360 process.")
5361 (license license:expat)))
5362
5363 (define-public python-socksipy-branch
5364 (package
5365 (name "python-socksipy-branch")
5366 (version "1.01")
5367 (source
5368 (origin
5369 (method url-fetch)
5370 (uri (pypi-uri "SocksiPy-branch" version))
5371 (sha256
5372 (base32
5373 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5374 (build-system python-build-system)
5375 (arguments
5376 `(#:tests? #f)) ; There are no tests
5377 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5378 (synopsis "Python SOCKS module")
5379 (description
5380 "SocksiPy - A Python SOCKS client module. It provides a
5381 socket-like interface that supports connections to any TCP
5382 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5383 The original version was developed by Dan Haim, this is a
5384 branch created by Mario Vilas to address some open issues,
5385 as the original project seems to have been abandoned circa 2007.")
5386 (license license:bsd-3)))
5387
5388 (define-public python2-socksipy-branch
5389 (package-with-python2 python-socksipy-branch))
5390
5391 (define-public python-socksipychain
5392 (package
5393 (name "python-socksipychain")
5394 (version "2.1.2")
5395 (source
5396 (origin
5397 (method git-fetch)
5398 (uri (git-reference
5399 (url "https://github.com/pagekite/PySocksipyChain")
5400 (commit (string-append "v" version))))
5401 (file-name (git-file-name name version))
5402 (sha256
5403 (base32
5404 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5405 (build-system python-build-system)
5406 (arguments
5407 `(#:tests? #f)) ; Tests try to access the network.
5408 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5409 (synopsis "Python SOCKS module with chained proxies support")
5410 (description
5411 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5412 adds support for arbitrary chaining of proxy servers and various modes of
5413 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5414 a simple netcat replacement with chaining support.")
5415 (license license:bsd-3)))
5416
5417 (define-public python-pycodestyle
5418 (package
5419 (name "python-pycodestyle")
5420 (version "2.6.0")
5421 (source
5422 (origin
5423 (method url-fetch)
5424 (uri (pypi-uri "pycodestyle" version))
5425 (sha256
5426 (base32
5427 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5428 (build-system python-build-system)
5429 (arguments
5430 `(#:phases
5431 (modify-phases %standard-phases
5432 (replace 'check
5433 (lambda _
5434 (invoke "pytest" "-vv"))))))
5435 (native-inputs
5436 `(("python-pytest" ,python-pytest)))
5437 (home-page "https://pycodestyle.readthedocs.io/")
5438 (synopsis "Python style guide checker")
5439 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5440 Python code against some of the style conventions in
5441 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5442 (license license:expat)))
5443
5444 (define-public python2-pycodestyle
5445 (package-with-python2 python-pycodestyle))
5446
5447 (define-public python-multidict
5448 (package
5449 (name "python-multidict")
5450 (version "4.7.5")
5451 (source
5452 (origin
5453 (method url-fetch)
5454 (uri (pypi-uri "multidict" version))
5455 (sha256
5456 (base32
5457 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5458 (build-system python-build-system)
5459 (arguments
5460 '(#:modules ((ice-9 ftw)
5461 (srfi srfi-1)
5462 (srfi srfi-26)
5463 (guix build utils)
5464 (guix build python-build-system))
5465 #:phases (modify-phases %standard-phases
5466 (replace 'check
5467 (lambda* (#:key tests? #:allow-other-keys)
5468 (if tests?
5469 (begin
5470 (let ((libdir (find (cut string-prefix? "lib." <>)
5471 (scandir "build"))))
5472 (setenv "PYTHONPATH"
5473 (string-append "./build/" libdir ":"
5474 (getenv "PYTHONPATH")))
5475 (invoke "pytest" "-vv")))
5476 (format #t "test suite not run~%"))
5477 #t)))))
5478 (native-inputs
5479 `(("python-pytest" ,python-pytest)
5480 ("python-pytest-cov" ,python-pytest-cov)))
5481 (home-page "https://github.com/aio-libs/multidict/")
5482 (synopsis "Multidict implementation")
5483 (description "Multidict is dict-like collection of key-value pairs
5484 where key might be occurred more than once in the container.")
5485 (license license:asl2.0)))
5486
5487 (define-public python-orderedmultidict
5488 (package
5489 (name "python-orderedmultidict")
5490 (version "1.0")
5491 (source
5492 (origin
5493 (method url-fetch)
5494 (uri (pypi-uri "orderedmultidict" version))
5495 (sha256
5496 (base32
5497 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5498 (build-system python-build-system)
5499 (arguments
5500 `(#:phases
5501 (modify-phases %standard-phases
5502 (add-after 'unpack 'fix-tests
5503 (lambda _
5504 ;; The package uses nosetest for running the tests.
5505 ;; Adding this initfile allows to run the test suite
5506 ;; without requiring nosetest.
5507 (with-output-to-file "tests/__init__.py" newline)
5508 #t)))))
5509 (propagated-inputs
5510 `(("python-six" ,python-six)))
5511 (native-inputs
5512 `(("python-pycodestyle" ,python-pycodestyle)))
5513 (home-page "https://github.com/gruns/orderedmultidict")
5514 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5515 (description "This package contains a library for ordered multivalue
5516 dictionaries. A multivalue dictionary is a dictionary that can store
5517 multiple values for the same key. An ordered multivalue dictionary is a
5518 multivalue dictionary that retains the order of insertions and deletions.")
5519 (license license:unlicense)))
5520
5521 (define-public python2-orderedmultidict
5522 (package-with-python2 python-orderedmultidict))
5523
5524 (define-public python-autopep8
5525 (package
5526 (name "python-autopep8")
5527 (version "1.5.3")
5528 (source
5529 (origin
5530 (method url-fetch)
5531 (uri (pypi-uri "autopep8" version))
5532 (sha256
5533 (base32
5534 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5535 (build-system python-build-system)
5536 (propagated-inputs
5537 `(("python-pycodestyle" ,python-pycodestyle)
5538 ("python-toml" ,python-toml)))
5539 (home-page "https://github.com/hhatto/autopep8")
5540 (synopsis "Format Python code according to the PEP 8 style guide")
5541 (description
5542 "@code{autopep8} automatically formats Python code to conform to
5543 the PEP 8 style guide. It uses the pycodestyle utility to determine
5544 what parts of the code needs to be formatted. @code{autopep8} is
5545 capable of fixing most of the formatting issues that can be reported
5546 by pycodestyle.")
5547 (license (license:non-copyleft
5548 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5549
5550 (define-public python2-autopep8
5551 (package-with-python2 python-autopep8))
5552
5553 (define-public python-distlib
5554 (package
5555 (name "python-distlib")
5556 (version "0.3.0")
5557 (source
5558 (origin
5559 (method url-fetch)
5560 (uri (pypi-uri "distlib" version ".zip"))
5561 (sha256
5562 (base32
5563 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5564 (build-system python-build-system)
5565 (arguments
5566 `(#:phases
5567 (modify-phases %standard-phases
5568 (add-before 'build 'no-/bin/sh
5569 (lambda _
5570 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5571 (("/bin/sh") (which "sh")))
5572 #t))
5573 (add-before 'check 'prepare-test-env
5574 (lambda _
5575 (setenv "HOME" "/tmp")
5576 ;; NOTE: Any value works, the variable just has to be present.
5577 (setenv "SKIP_ONLINE" "1")
5578 #t)))))
5579 (native-inputs `(("unzip" ,unzip)))
5580 (home-page "https://bitbucket.org/pypa/distlib")
5581 (synopsis "Distribution utilities")
5582 (description "Distlib is a library which implements low-level functions that
5583 relate to packaging and distribution of Python software. It is intended to be
5584 used as the basis for third-party packaging tools.")
5585 (license license:psfl)))
5586
5587 (define-public python-distutils-extra
5588 (package
5589 (name "python-distutils-extra")
5590 (version "2.38")
5591 (source
5592 (origin
5593 (method url-fetch)
5594 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5595 version "/+download/python-distutils-extra-"
5596 version ".tar.gz"))
5597 (sha256
5598 (base32
5599 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5600 (build-system python-build-system)
5601 (home-page "https://launchpad.net/python-distutils-extra/")
5602 (synopsis "Enhancements to Python's distutils")
5603 (description
5604 "The python-distutils-extra module enables you to easily integrate
5605 gettext support, themed icons, and scrollkeeper-based documentation into
5606 Python's distutils.")
5607 (license license:gpl2)))
5608
5609 (define-public python2-distutils-extra
5610 (package-with-python2 python-distutils-extra))
5611
5612 (define-public python2-elib.intl
5613 (package
5614 (name "python2-elib.intl")
5615 (version "0.0.3")
5616 (source
5617 (origin
5618 ;; This project doesn't tag releases or publish tarballs, so we take
5619 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5620 (method git-fetch)
5621 (uri (git-reference
5622 (url "https://github.com/dieterv/elib.intl")
5623 (commit "d09997cfef")))
5624 (file-name (string-append name "-" version "-checkout"))
5625 (sha256
5626 (base32
5627 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5628 (build-system python-build-system)
5629 (arguments
5630 ;; incompatible with Python 3 (exception syntax)
5631 `(#:python ,python-2
5632 #:tests? #f))
5633 (home-page "https://github.com/dieterv/elib.intl")
5634 (synopsis "Enhanced internationalization for Python")
5635 (description
5636 "The elib.intl module provides enhanced internationalization (I18N)
5637 services for your Python modules and applications.")
5638 (license license:lgpl3+)))
5639
5640 (define-public python-olefile
5641 (package
5642 (name "python-olefile")
5643 (version "0.46")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5648 "download/v" version "/olefile-" version ".tar.gz"))
5649 (file-name (string-append name "-" version ".tar.gz"))
5650 (sha256
5651 (base32
5652 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5653 (build-system python-build-system)
5654 (home-page "https://www.decalage.info/python/olefileio")
5655 (synopsis "Read and write Microsoft OLE2 files.")
5656 (description
5657 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5658 Storage or Compound Document, Microsoft Office). It is an improved version of
5659 the OleFileIO module from PIL, the Python Image Library.")
5660 (license license:bsd-3)))
5661
5662 (define-public python2-olefile
5663 (package-with-python2 python-olefile))
5664
5665 (define-public python-pillow
5666 (package
5667 (name "python-pillow")
5668 (version "8.0.1")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (pypi-uri "Pillow" version))
5673 (sha256
5674 (base32
5675 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5676 (build-system python-build-system)
5677 (native-inputs
5678 `(("python-pytest" ,python-pytest)))
5679 (inputs
5680 `(("freetype" ,freetype)
5681 ("lcms" ,lcms)
5682 ("libjpeg" ,libjpeg-turbo)
5683 ("libtiff" ,libtiff)
5684 ("libwebp" ,libwebp)
5685 ("openjpeg" ,openjpeg)
5686 ("zlib" ,zlib)))
5687 (propagated-inputs
5688 `(("python-olefile" ,python-olefile)))
5689 (arguments
5690 `(#:phases
5691 (modify-phases %standard-phases
5692 (add-after 'unpack 'patch-ldconfig
5693 (lambda _
5694 (substitute* "setup.py"
5695 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5696 (replace 'check
5697 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5698 (if tests?
5699 (begin
5700 (setenv "HOME" (getcwd))
5701 ;; Make installed package available for running the tests.
5702 (add-installed-pythonpath inputs outputs)
5703 (invoke "python" "selftest.py" "--installed")
5704 (invoke "python" "-m" "pytest" "-vv"))
5705 #t))))))
5706 (home-page "https://python-pillow.org")
5707 (synopsis "Fork of the Python Imaging Library")
5708 (description
5709 "The Python Imaging Library adds image processing capabilities to your
5710 Python interpreter. This library provides extensive file format support, an
5711 efficient internal representation, and fairly powerful image processing
5712 capabilities. The core image library is designed for fast access to data
5713 stored in a few basic pixel formats. It should provide a solid foundation for
5714 a general image processing tool.")
5715 (properties `((python2-variant . ,(delay python2-pillow))))
5716 (license (license:x11-style
5717 "http://www.pythonware.com/products/pil/license.htm"
5718 "The PIL Software License"))))
5719
5720 (define-public python2-pillow
5721 (package-with-python2
5722 (package
5723 (inherit (strip-python2-variant python-pillow))
5724 ;; Version 6 is the last series with Python 2 support.
5725 (version "6.2.2")
5726 (source
5727 (origin
5728 (method url-fetch)
5729 (uri (pypi-uri "Pillow" version))
5730 (sha256
5731 (base32
5732 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5733
5734 (define-public python-pillow-2.9
5735 (package
5736 (inherit python-pillow)
5737 (version "2.9.0")
5738 (source
5739 (origin
5740 (method url-fetch)
5741 (uri (pypi-uri "Pillow" version))
5742 (sha256
5743 (base32
5744 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5745 (arguments
5746 (substitute-keyword-arguments (package-arguments python-pillow)
5747 ((#:tests? _ #f) #f)))
5748 (properties '((hidden? #t)))))
5749
5750 (define-public python-roifile
5751 (package
5752 (name "python-roifile")
5753 (version "2020.5.28")
5754 (source
5755 (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "roifile" version))
5758 (sha256
5759 (base32
5760 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5761 (build-system python-build-system)
5762 (arguments `(#:tests? #f)) ; there are none
5763 (propagated-inputs
5764 `(("python-numpy" ,python-numpy)))
5765 (home-page "https://www.lfd.uci.edu/~gohlke/")
5766 (synopsis "Read and write ImageJ ROI format")
5767 (description "Roifile is a Python library to read, write, create, and plot
5768 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5769 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5770 (license license:bsd-3)))
5771
5772 (define-public python-tifffile
5773 (package
5774 (name "python-tifffile")
5775 (version "2020.6.3")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (pypi-uri "tifffile" version))
5780 (sha256
5781 (base32
5782 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5783 (build-system python-build-system)
5784 ;; Tests require lfdfiles, which depends on tifffile
5785 (arguments `(#:tests? #f))
5786 (propagated-inputs
5787 `(("python-numpy" ,python-numpy)
5788 ;;("python-lfdfiles" ,python-lfdfiles)
5789 ("python-roifile" ,python-roifile)))
5790 (home-page "https://www.lfd.uci.edu/~gohlke/")
5791 (synopsis "Read and write TIFF(r) files")
5792 (description "This package lets you read image and metadata from many
5793 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5794 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5795 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5796 (license license:bsd-3)))
5797
5798 (define-public python-lfdfiles
5799 (package
5800 (name "python-lfdfiles")
5801 (version "2020.1.1")
5802 (source
5803 (origin
5804 (method url-fetch)
5805 (uri (pypi-uri "lfdfiles" version))
5806 (sha256
5807 (base32
5808 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5809 (build-system python-build-system)
5810 (propagated-inputs
5811 `(("python-click" ,python-click)
5812 ("python-numpy" ,python-numpy)
5813 ("python-tifffile" ,python-tifffile)))
5814 (home-page "https://www.lfd.uci.edu/~gohlke/")
5815 (synopsis "Work with LFD data files")
5816 (description
5817 "Lfdfiles is a Python library and console script for reading, writing,
5818 converting, and viewing many of the proprietary file formats used to store
5819 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5820 (license license:bsd-3)))
5821
5822 (define-public python-imageio
5823 (package
5824 (name "python-imageio")
5825 (version "2.8.0")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (pypi-uri "imageio" version))
5830 (sha256
5831 (base32
5832 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5833 (build-system python-build-system)
5834 (arguments
5835 `(#:tests? #f ; many tests require online data
5836 #:phases
5837 (modify-phases %standard-phases
5838 (replace 'check
5839 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5840 (if tests?
5841 (begin
5842 ;; Make installed package available for running the tests.
5843 (add-installed-pythonpath inputs outputs)
5844 (invoke "pytest" "-vv"))
5845 #t))))))
5846 (propagated-inputs
5847 `(("python-numpy" ,python-numpy)
5848 ("python-pillow" ,python-pillow)
5849 ("python-psutil" ,python-psutil)))
5850 (native-inputs
5851 `(("python-pytest" ,python-pytest)))
5852 (home-page "https://imageio.github.io/")
5853 (synopsis "Library for reading and writing a wide range of image data")
5854 (description
5855 "Imageio is a Python library that provides an easy interface to read and
5856 write a wide range of image data, including animated images, video, volumetric
5857 data, and scientific formats.")
5858 (license license:bsd-2)))
5859
5860 (define-public python-pycparser
5861 (package
5862 (name "python-pycparser")
5863 (version "2.20")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "pycparser" version))
5868 (sha256
5869 (base32
5870 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5871 (outputs '("out" "doc"))
5872 (build-system python-build-system)
5873 (native-inputs
5874 `(("pkg-config" ,pkg-config)))
5875 (arguments
5876 `(#:phases
5877 (modify-phases %standard-phases
5878 (replace 'check
5879 (lambda _
5880 (with-directory-excursion "tests"
5881 (invoke "python" "all_tests.py"))
5882 #t))
5883 (add-after 'install 'install-doc
5884 (lambda* (#:key outputs #:allow-other-keys)
5885 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5886 (doc (string-append data "/doc/" ,name "-" ,version))
5887 (examples (string-append doc "/examples")))
5888 (mkdir-p examples)
5889 (for-each (lambda (file)
5890 (copy-file (string-append "." file)
5891 (string-append doc file)))
5892 '("/README.rst" "/CHANGES" "/LICENSE"))
5893 (copy-recursively "examples" examples)
5894 #t))))))
5895 (home-page "https://github.com/eliben/pycparser")
5896 (synopsis "C parser in Python")
5897 (description
5898 "Pycparser is a complete parser of the C language, written in pure Python
5899 using the PLY parsing library. It parses C code into an AST and can serve as
5900 a front-end for C compilers or analysis tools.")
5901 (license license:bsd-3)))
5902
5903 (define-public python2-pycparser
5904 (package-with-python2 python-pycparser))
5905
5906 (define-public python-pywavelets
5907 (package
5908 (name "python-pywavelets")
5909 (version "1.1.1")
5910 (home-page "https://github.com/PyWavelets/pywt")
5911 (source (origin
5912 (method url-fetch)
5913 (uri (pypi-uri "PyWavelets" version))
5914 (sha256
5915 (base32
5916 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5917 (build-system python-build-system)
5918 (arguments
5919 '(#:modules ((ice-9 ftw)
5920 (srfi srfi-1)
5921 (srfi srfi-26)
5922 (guix build utils)
5923 (guix build python-build-system))
5924 #:phases
5925 (modify-phases %standard-phases
5926 (replace 'check
5927 (lambda _
5928 (let ((cwd (getcwd))
5929 (libdir (find (cut string-prefix? "lib." <>)
5930 (scandir "build"))))
5931 (with-directory-excursion (string-append cwd "/build/" libdir)
5932 (invoke "pytest" "-vv"))))))))
5933 (native-inputs
5934 `(("python-matplotlib" ,python-matplotlib) ;for tests
5935 ("python-pytest" ,python-pytest)))
5936 (propagated-inputs
5937 `(("python-numpy" ,python-numpy)))
5938 (synopsis "Wavelet transforms in Python")
5939 (description
5940 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5941 mathematical basis functions that are localized in both time and frequency.
5942 Wavelet transforms are time-frequency transforms employing wavelets. They are
5943 similar to Fourier transforms, the difference being that Fourier transforms are
5944 localized only in frequency instead of in time and frequency.")
5945 (license license:expat)))
5946
5947 (define-public python-pywinrm
5948 (package
5949 (name "python-pywinrm")
5950 (version "0.4.1")
5951 (source
5952 (origin
5953 (method url-fetch)
5954 (uri (pypi-uri "pywinrm" version))
5955 (sha256
5956 (base32
5957 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5958 (build-system python-build-system)
5959 (propagated-inputs
5960 `(("python-six" ,python-six)
5961 ("python-requests_ntlm" ,python-requests_ntlm)
5962 ("python-xmltodict" ,python-xmltodict)
5963 ("python-kerberos" ,python-kerberos)))
5964 (native-inputs
5965 `(("python-mock" ,python-mock)
5966 ("python-pytest" ,python-pytest)))
5967 (home-page "https://github.com/diyan/pywinrm/")
5968 (synopsis
5969 "Python library for Windows Remote Management (WinRM)")
5970 (description
5971 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5972 service. It allows you to invoke commands on target Windows machines from
5973 any machine that can run Python.")
5974 (license license:expat)))
5975
5976 (define-public python-xcffib
5977 (package
5978 (name "python-xcffib")
5979 (version "0.6.0")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "xcffib" version))
5984 (sha256
5985 (base32
5986 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5987 (build-system python-build-system)
5988 (inputs
5989 `(("libxcb" ,libxcb)))
5990 (propagated-inputs
5991 `(("python-cffi" ,python-cffi) ; used at run time
5992 ("python-six" ,python-six)))
5993 (arguments
5994 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5995 #:tests? #f
5996 #:phases
5997 (modify-phases %standard-phases
5998 (add-after 'unpack 'fix-libxcb-path
5999 (lambda* (#:key inputs #:allow-other-keys)
6000 (let ((libxcb (assoc-ref inputs "libxcb")))
6001 (substitute* '("xcffib/__init__.py")
6002 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
6003 #t)))
6004 (add-after 'install 'install-doc
6005 (lambda* (#:key outputs #:allow-other-keys)
6006 (let ((doc (string-append (assoc-ref outputs "out") "/share"
6007 "/doc/" ,name "-" ,version)))
6008 (mkdir-p doc)
6009 (copy-file "README.md"
6010 (string-append doc "/README.md"))
6011 #t))))))
6012 (home-page "https://github.com/tych0/xcffib")
6013 (synopsis "XCB Python bindings")
6014 (description
6015 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6016 support for Python 3 and PyPy. It is based on cffi.")
6017 (license license:expat)))
6018
6019 (define-public python2-xcffib
6020 (package-with-python2 python-xcffib))
6021
6022 (define-public python-cairocffi
6023 (package
6024 (name "python-cairocffi")
6025 (version "0.9.0")
6026 (source
6027 (origin
6028 (method url-fetch)
6029 (uri (pypi-uri "cairocffi" version))
6030 (sha256
6031 (base32
6032 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
6033 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
6034 (build-system python-build-system)
6035 (outputs '("out" "doc"))
6036 (inputs
6037 `(("glib" ,glib)
6038 ("gtk+" ,gtk+)
6039 ("gdk-pixbuf" ,gdk-pixbuf)
6040 ("cairo" ,cairo)
6041 ("pango" ,pango)))
6042 (native-inputs
6043 `(("pkg-config" ,pkg-config)
6044 ("python-pytest" ,python-pytest)
6045 ("python-pytest-cov" ,python-pytest-cov)
6046 ("python-pytest-runner" ,python-pytest-runner)
6047 ("python-sphinx" ,python-sphinx)
6048 ("python-docutils" ,python-docutils)))
6049 (propagated-inputs
6050 `(("python-xcffib" ,python-xcffib))) ; used at run time
6051 (arguments
6052 `(#:phases
6053 (modify-phases %standard-phases
6054 (add-after 'unpack 'patch-paths
6055 (lambda* (#:key inputs outputs #:allow-other-keys)
6056 (substitute* (find-files "." "\\.py$")
6057 (("dlopen\\(ffi, 'cairo'")
6058 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
6059 "/lib/libcairo.so.2'"))
6060 (("dlopen\\(ffi, 'gdk-3'")
6061 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
6062 "/lib/libgtk-3.so.0'"))
6063 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
6064 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
6065 "/lib/libgdk_pixbuf-2.0.so.0'"))
6066 (("dlopen\\(ffi, 'glib-2.0'")
6067 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6068 "/lib/libglib-2.0.so.0'"))
6069 (("dlopen\\(ffi, 'gobject-2.0'")
6070 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6071 "/lib/libgobject-2.0.so.0'"))
6072 (("dlopen\\(ffi, 'pangocairo-1.0'")
6073 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6074 "/lib/libpangocairo-1.0.so.0'"))
6075 (("dlopen\\(ffi, 'pango-1.0'")
6076 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6077 "/lib/libpango-1.0.so.0'")))
6078 #t))
6079 (add-after 'install 'install-doc
6080 (lambda* (#:key inputs outputs #:allow-other-keys)
6081 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6082 (doc (string-append data "/doc/" ,name "-" ,version))
6083 (html (string-append doc "/html")))
6084 (setenv "LD_LIBRARY_PATH"
6085 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6086 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6087 (setenv "LANG" "en_US.UTF-8")
6088 (mkdir-p html)
6089 (for-each (lambda (file)
6090 (copy-file (string-append "." file)
6091 (string-append doc file)))
6092 '("/README.rst" "/CHANGES" "/LICENSE"))
6093 (system* "python" "setup.py" "build_sphinx")
6094 (copy-recursively "docs/_build/html" html)
6095 #t))))))
6096 (home-page "https://github.com/Kozea/cairocffi")
6097 (synopsis "Python bindings and object-oriented API for Cairo")
6098 (description
6099 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6100 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6101 graphics library with support for multiple backends including image buffers,
6102 PNG, PostScript, PDF, and SVG file output.")
6103 (license license:bsd-3)))
6104
6105 (define-public python2-cairocffi
6106 (package-with-python2 python-cairocffi))
6107
6108 (define-public python-decorator
6109 (package
6110 (name "python-decorator")
6111 (version "4.3.0")
6112 (source
6113 (origin
6114 (method url-fetch)
6115 (uri (pypi-uri "decorator" version))
6116 (sha256
6117 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6118 (build-system python-build-system)
6119 (home-page "https://pypi.org/project/decorator/")
6120 (synopsis "Python module to simplify usage of decorators")
6121 (description
6122 "The aim of the decorator module is to simplify the usage of decorators
6123 for the average programmer, and to popularize decorators usage giving examples
6124 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6125 etc. The core of this module is a decorator factory.")
6126 (license license:expat)))
6127
6128 (define-public python2-decorator
6129 (package-with-python2 python-decorator))
6130
6131 (define-public python-drmaa
6132 (package
6133 (name "python-drmaa")
6134 (version "0.7.7")
6135 (source
6136 (origin
6137 (method url-fetch)
6138 (uri (pypi-uri "drmaa" version))
6139 (sha256
6140 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6141 (build-system python-build-system)
6142 ;; The test suite requires libdrmaa which is provided by the cluster
6143 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6144 ;; should be set to the path of the libdrmaa library.
6145 (arguments '(#:tests? #f))
6146 (native-inputs
6147 `(("python-nose" ,python-nose)))
6148 (home-page "https://pypi.org/project/drmaa/")
6149 (synopsis "Python bindings for the DRMAA library")
6150 (description
6151 "A Python package for Distributed Resource Management (DRM) job
6152 submission and control. This package is an implementation of the DRMAA 1.0
6153 Python language binding specification.")
6154 (license license:bsd-3)))
6155
6156 (define-public python2-drmaa
6157 (package-with-python2 python-drmaa))
6158
6159 (define-public python-grako
6160 (package
6161 (name "python-grako")
6162 (version "3.99.9")
6163 (source
6164 (origin
6165 (method url-fetch)
6166 (uri
6167 (pypi-uri "grako" version ".zip"))
6168 (sha256
6169 (base32
6170 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6171 (build-system python-build-system)
6172 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6173 (native-inputs
6174 `(("unzip" ,unzip)
6175 ("python-pytest" ,python-pytest)
6176 ("python-pytest-runner" ,python-pytest-runner)))
6177 (home-page "https://bitbucket.org/neogeny/grako")
6178 (synopsis "EBNF parser generator")
6179 (description
6180 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6181 memoizing PEG/Packrat parser in Python.")
6182 (license license:bsd-3)))
6183
6184 (define-public python2-grako
6185 (package-with-python2 python-grako))
6186
6187 (define-public python-grandalf
6188 (package
6189 (name "python-grandalf")
6190 (version "0.7")
6191 (source
6192 (origin
6193 ;; There's no source tarball on PyPI.
6194 (method git-fetch)
6195 (uri (git-reference
6196 (url "https://github.com/bdcht/grandalf")
6197 (commit (string-append "v" version))))
6198 (file-name (git-file-name name version))
6199 (sha256
6200 (base32
6201 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6202 (build-system python-build-system)
6203 (arguments
6204 '(#:phases
6205 (modify-phases %standard-phases
6206 (replace 'check
6207 (lambda _
6208 (invoke "python" "setup.py" "pytest"))))))
6209 (native-inputs
6210 `(("python-pytest" ,python-pytest)
6211 ("python-pytest-runner" ,python-pytest-runner)))
6212 (propagated-inputs
6213 `(("python-numpy" ,python-numpy)
6214 ("python-ply" ,python-ply)))
6215 (home-page "https://github.com/bdcht/grandalf")
6216 (synopsis "Graph and drawing algorithms framework")
6217 (description
6218 "Grandalf is a Python package made for experimentations with graphs
6219 drawing algorithms. It is written in pure Python, and currently implements
6220 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6221 minimization approach. While not as fast or featured as graphviz or other
6222 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6223 than thousands of nodes, while keeping the source code simple enough to tweak
6224 and hack any part of it for experimental purpose. With a total of about 1500
6225 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6226 in less than 600 lines. The energy minimization approach is comprised of only
6227 250 lines!
6228
6229 Grandalf does only 2 not-so-simple things:
6230 @itemize
6231 @item computing the nodes (x,y) coordinates (based on provided nodes
6232 dimensions, and a chosen layout)
6233 @item routing the edges with lines or nurbs
6234 @end itemize
6235
6236 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6237 will help you find where to draw things like nodes and edges, but it’s up to
6238 you to actually draw things with your favorite toolkit.")
6239 ;; The user can choose either license.
6240 (license (list license:gpl2 license:epl1.0))))
6241
6242 (define-public python-gridmap
6243 (package
6244 (name "python-gridmap")
6245 (version "0.14.0")
6246 (source
6247 (origin
6248 (method git-fetch)
6249 (uri (git-reference
6250 (url "https://github.com/pygridtools/gridmap")
6251 (commit (string-append "v" version))))
6252 (file-name (git-file-name name version))
6253 (sha256
6254 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6255 (build-system python-build-system)
6256 (arguments
6257 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6258 (propagated-inputs
6259 `(("python-psutil" ,python-psutil)
6260 ("python-drmaa" ,python-drmaa)
6261 ("python-pyzmq" ,python-pyzmq)))
6262 (home-page "https://github.com/pygridtools/gridmap")
6263 (synopsis "Create jobs on a cluster directly from Python")
6264 (description
6265 "Gridmap is a Python package to allow you to easily create jobs on the
6266 cluster directly from Python. You can directly map Python functions onto the
6267 cluster without needing to write any wrapper code yourself.")
6268 (license license:gpl3+)))
6269
6270 (define-public python2-gridmap
6271 (package-with-python2 python-gridmap))
6272
6273 (define-public python-honcho
6274 (package
6275 (name "python-honcho")
6276 (version "1.0.1")
6277 (source
6278 (origin
6279 (method git-fetch)
6280 (uri (git-reference
6281 (url "https://github.com/nickstenning/honcho")
6282 (commit (string-append "v" version))))
6283 (file-name (git-file-name name version))
6284 (sha256
6285 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6286 (build-system python-build-system)
6287 (native-inputs
6288 `(("python-pytest" ,python-pytest)
6289 ("python-mock" ,python-mock)
6290 ("python-tox" ,python-tox)
6291 ("which" ,which))) ;for tests
6292 (propagated-inputs
6293 `(("python-jinja2" ,python-jinja2)))
6294 (arguments
6295 `(#:phases
6296 (modify-phases %standard-phases
6297 (delete 'check)
6298 (add-after 'install 'check
6299 (lambda* (#:key outputs inputs #:allow-other-keys)
6300 ;; fix honcho path in testsuite
6301 (substitute* "tests/conftest.py"
6302 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6303 "/bin/honcho" "'")))
6304 ;; It's easier to run tests after install.
6305 ;; Make installed package available for running the tests
6306 (add-installed-pythonpath inputs outputs)
6307 (invoke "py.test" "-v"))))))
6308 (home-page "https://github.com/nickstenning/honcho")
6309 (synopsis "Manage Procfile-based applications")
6310 (description
6311 "A Procfile is a file which describes how to run an application
6312 consisting of several processes. honcho starts all listed processes.
6313 The output of all running processes is collected by honcho and
6314 displayed.")
6315 (license license:expat)))
6316
6317 (define-public python2-honcho
6318 (package-with-python2 python-honcho))
6319
6320 (define-public python-pexpect
6321 (package
6322 (name "python-pexpect")
6323 (version "4.8.0")
6324 (source
6325 (origin
6326 (method url-fetch)
6327 (uri (pypi-uri "pexpect" version))
6328 (sha256
6329 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6330 (build-system python-build-system)
6331 (arguments
6332 `(#:phases
6333 (modify-phases %standard-phases
6334 (add-before 'check 'prepare-tests
6335 (lambda _
6336 (substitute* (find-files "tests")
6337 (("/bin/ls") (which "ls"))
6338 (("/bin/echo") (which "echo"))
6339 (("/bin/which") (which "which"))
6340 ;; Many tests try to use the /bin directory which
6341 ;; is not present in the build environment.
6342 ;; Use one that's non-empty and unlikely to change.
6343 (("/bin'") "/dev'")
6344 ;; Disable failing test. See upstream bug report
6345 ;; https://github.com/pexpect/pexpect/issues/568
6346 (("def test_bash") "def _test_bash"))
6347 ;; XXX: Socket connection test gets "Connection reset by peer".
6348 ;; Why does it not work? Delete for now.
6349 (delete-file "tests/test_socket.py")
6350 #t))
6351 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6352 (native-inputs
6353 `(("python-nose" ,python-nose)
6354 ("python-pytest" ,python-pytest)
6355 ("man-db" ,man-db)
6356 ("which" ,which)
6357 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6358 (propagated-inputs
6359 `(("python-ptyprocess" ,python-ptyprocess)))
6360 (home-page "http://pexpect.readthedocs.org/")
6361 (synopsis "Controlling interactive console applications")
6362 (description
6363 "Pexpect is a pure Python module for spawning child applications;
6364 controlling them; and responding to expected patterns in their output.
6365 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6366 child application and control it as if a human were typing commands.")
6367 (license license:isc)))
6368
6369 (define-public python2-pexpect
6370 (package-with-python2 python-pexpect))
6371
6372 (define-public python-setuptools-scm
6373 (package
6374 (name "python-setuptools-scm")
6375 (version "3.4.3")
6376 (source (origin
6377 (method url-fetch)
6378 (uri (pypi-uri "setuptools_scm" version))
6379 (sha256
6380 (base32
6381 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6382 (build-system python-build-system)
6383 (home-page "https://github.com/pypa/setuptools_scm/")
6384 (synopsis "Manage Python package versions in SCM metadata")
6385 (description
6386 "Setuptools_scm handles managing your Python package versions in
6387 @dfn{software configuration management} (SCM) metadata instead of declaring
6388 them as the version argument or in a SCM managed file.")
6389 (license license:expat)))
6390
6391 (define-public python2-setuptools-scm
6392 (package-with-python2 python-setuptools-scm))
6393
6394 (define-public python-sexpdata
6395 (package
6396 (name "python-sexpdata")
6397 (version "0.0.3")
6398 (source
6399 (origin
6400 (method url-fetch)
6401 (uri (pypi-uri "sexpdata" version))
6402 (sha256
6403 (base32
6404 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6405 (build-system python-build-system)
6406 (home-page "https://github.com/jd-boyd/sexpdata")
6407 (synopsis "S-expression parser for Python")
6408 (description
6409 "Sexpdata is an S-expression parser/serializer. It has load and dump
6410 functions like pickle, json or PyYAML module.")
6411 (license license:bsd-3)))
6412
6413 (define-public python-pathlib2
6414 (package
6415 (name "python-pathlib2")
6416 (version "2.3.3")
6417 (source
6418 (origin
6419 (method url-fetch)
6420 (uri (pypi-uri "pathlib2" version))
6421 (sha256
6422 (base32
6423 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6424 (build-system python-build-system)
6425 (propagated-inputs
6426 `(("python-scandir" ,python-scandir)
6427 ("python-six" ,python-six)))
6428 (home-page "https://pypi.org/project/pathlib2/")
6429 (synopsis "Object-oriented file system paths")
6430 (description "The goal of pathlib2 is to provide a backport of the
6431 standard @code{pathlib} module which tracks the standard library module, so
6432 all the newest features of the standard @code{pathlib} can be used also on
6433 older Python versions.")
6434 (license license:expat)))
6435
6436 (define-public python-importlib-resources
6437 (package
6438 (name "python-importlib-resources")
6439 (version "3.0.0")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "importlib_resources" version))
6444 (sha256
6445 (base32
6446 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6447 (build-system python-build-system)
6448 (native-inputs
6449 `(("python-setuptools-scm" ,python-setuptools-scm)
6450 ("python-toml" ,python-toml)))
6451 (home-page "http://importlib-resources.readthedocs.io/")
6452 (synopsis "Read resources from Python packages")
6453 (description
6454 "@code{importlib_resources} is a backport of Python 3's standard library
6455 @code{importlib.resources} module for Python 2.7, and Python 3.")
6456 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6457 (license license:asl2.0)))
6458
6459 (define-public python2-importlib-resources
6460 (package
6461 (name "python2-importlib-resources")
6462 (version "1.0.2")
6463 (source (origin
6464 (method url-fetch)
6465 (uri (pypi-uri "importlib_resources" version))
6466 (sha256
6467 (base32
6468 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6469 (build-system python-build-system)
6470 (arguments
6471 `(#:python ,python-2
6472 #:phases (modify-phases %standard-phases
6473 ;; The build system tests for python-wheel, but it is
6474 ;; not required for Guix nor the test suite. Just drop
6475 ;; it to make bootstrapping pytest easier.
6476 (add-after 'unpack 'drop-wheel-dependency
6477 (lambda _
6478 (substitute* "setup.cfg"
6479 (("^[[:blank:]]+wheel")
6480 ""))
6481 #t)))))
6482 (propagated-inputs
6483 `(("python-pathlib2" ,python2-pathlib2)
6484 ("python-typing" ,python2-typing)))
6485 (home-page "https://gitlab.com/python-devs/importlib_resources")
6486 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6487 (description
6488 "This package provides an implementation of @code{importlib.resources}
6489 for older versions of Python.")
6490 (license license:asl2.0)))
6491
6492 ;; For importlib-metadata-bootstrap below.
6493 (define-public python2-importlib-resources-bootstrap
6494 (hidden-package
6495 (package/inherit
6496 python2-importlib-resources
6497 (name "python2-importlib-resources-bootstrap")
6498 (propagated-inputs
6499 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6500 ("python-typing" ,python2-typing))))))
6501
6502 (define-public python-importlib-metadata
6503 (package
6504 (name "python-importlib-metadata")
6505 (version "1.5.0")
6506 (source
6507 (origin
6508 (method url-fetch)
6509 (uri (pypi-uri "importlib_metadata" version))
6510 (sha256
6511 (base32
6512 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6513 (build-system python-build-system)
6514 (propagated-inputs
6515 `(("python-zipp" ,python-zipp)))
6516 (native-inputs
6517 `(("python-setuptools-scm" ,python-setuptools-scm)
6518 ("python-pyfakefs" ,python-pyfakefs)
6519 ("python-packaging" ,python-packaging)))
6520 (home-page "https://importlib-metadata.readthedocs.io/")
6521 (synopsis "Read metadata from Python packages")
6522 (description
6523 "@code{importlib_metadata} is a library which provides an API for
6524 accessing an installed Python package's metadata, such as its entry points or
6525 its top-level name. This functionality intends to replace most uses of
6526 @code{pkg_resources} entry point API and metadata API. Along with
6527 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6528 need to use the older and less efficient @code{pkg_resources} package.")
6529 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6530 (license license:asl2.0)))
6531
6532 (define-public python2-importlib-metadata
6533 (let ((base (package-with-python2 (strip-python2-variant
6534 python-importlib-metadata))))
6535 (package/inherit
6536 base
6537 (name "python2-importlib-metadata")
6538 (native-inputs
6539 `(("python-setuptools-scm" ,python2-setuptools-scm)
6540 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6541 ("python-packaging" ,python2-packaging-bootstrap)))
6542 (propagated-inputs
6543 `(("python-configparser" ,python2-configparser)
6544 ("python-contextlib2" ,python2-contextlib2)
6545 ("python-importlib-resources" ,python2-importlib-resources)
6546 ("python-pathlib2" ,python2-pathlib2)
6547 ,@(package-propagated-inputs base))))))
6548
6549 ;; This package is used by python2-pytest, and thus must not depend on it.
6550 (define-public python2-importlib-metadata-bootstrap
6551 (hidden-package
6552 (package/inherit
6553 python2-importlib-metadata
6554 (name "python2-importlib-metadata-bootstrap")
6555 (arguments
6556 `(#:tests? #f
6557 ,@(package-arguments python2-importlib-metadata)))
6558 (propagated-inputs
6559 `(("python-zipp" ,python2-zipp-bootstrap)
6560 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6561 ("python-configparser" ,python2-configparser)
6562 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6563 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6564
6565 (define-public python-importmagic
6566 (package
6567 (name "python-importmagic")
6568 (version "0.1.7")
6569 (source
6570 (origin
6571 (method url-fetch)
6572 (uri (pypi-uri "importmagic" version))
6573 (sha256
6574 (base32
6575 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6576 (build-system python-build-system)
6577 (home-page "https://github.com/alecthomas/importmagic")
6578 (synopsis "Library for adding, removing and managing Python imports")
6579 (description
6580 "Importmagic is a Python library for automatically managing imports by
6581 finding unresolved symbols in Python code and their corresponding imports.")
6582 (license license:bsd-3)))
6583
6584 (define-public python-jaraco-packaging
6585 (package
6586 (name "python-jaraco-packaging")
6587 (version "6.1")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (pypi-uri "jaraco.packaging" version))
6592 (sha256
6593 (base32
6594 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6595 (build-system python-build-system)
6596 (propagated-inputs
6597 `(("python-pytest" ,python-pytest)
6598 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6599 ("python-pytest-flake8" ,python-pytest-flake8)
6600 ("python-rst.linker" ,python-rst.linker)
6601 ("python-setuptools" ,python-setuptools)
6602 ("python-setuptools-scm" ,python-setuptools-scm)
6603 ("python-six" ,python-six)
6604 ("python-sphinx" ,python-sphinx)))
6605 (home-page "https://github.com/jaraco/jaraco.packaging")
6606 (synopsis "Tools to supplement packaging Python releases")
6607 (description
6608 "This package provides various tools to supplement packaging Python
6609 releases.")
6610 (license license:expat)))
6611
6612 (define-public python-pathpy
6613 (package
6614 (name "python-pathpy")
6615 (version "11.5.1")
6616 (source
6617 (origin
6618 (method url-fetch)
6619 (uri (pypi-uri "path.py" version))
6620 (sha256
6621 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6622 (outputs '("out" "doc"))
6623 (build-system python-build-system)
6624 (propagated-inputs
6625 `(("python-appdirs" ,python-appdirs)
6626 ("python-importlib-metadata" ,python-importlib-metadata)))
6627 (native-inputs
6628 `(("python-setuptools-scm" ,python-setuptools-scm)
6629 ("python-sphinx" ,python-sphinx)
6630 ("python-rst.linker" ,python-rst.linker)
6631 ("python-pytest" ,python-pytest)
6632 ("python-pytest-runner" ,python-pytest-runner)
6633 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6634 (arguments
6635 `(#:phases
6636 (modify-phases %standard-phases
6637 (add-after 'build 'build-doc
6638 (lambda _
6639 (setenv "LANG" "en_US.UTF-8")
6640 (invoke "python" "setup.py" "build_sphinx")))
6641 (add-after 'install 'install-doc
6642 (lambda* (#:key outputs #:allow-other-keys)
6643 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6644 (doc (string-append data "/doc/" ,name "-" ,version))
6645 (html (string-append doc "/html")))
6646 (mkdir-p html)
6647 (for-each (lambda (file)
6648 (copy-file file (string-append doc "/" file)))
6649 '("README.rst" "CHANGES.rst"))
6650 (copy-recursively "build/sphinx/html" html)
6651 #t)))
6652 (replace 'check
6653 (lambda _
6654 ;; The import time test aborts if an import takes longer than
6655 ;; 100ms. It may very well take a little longer than that.
6656 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6657 (home-page "https://github.com/jaraco/path.py")
6658 (synopsis "Python module wrapper for built-in os.path")
6659 (description
6660 "@code{path.py} implements path objects as first-class entities, allowing
6661 common operations on files to be invoked on those path objects directly.")
6662 (license license:expat)))
6663
6664 (define-public python2-pathpy
6665 (package-with-python2 python-pathpy))
6666
6667 (define-public python-simplegeneric
6668 (package
6669 (name "python-simplegeneric")
6670 (version "0.8.1")
6671 (source
6672 (origin
6673 (method url-fetch)
6674 (uri (pypi-uri "simplegeneric" version ".zip"))
6675 (sha256
6676 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6677 (build-system python-build-system)
6678 (native-inputs
6679 `(("unzip" ,unzip)))
6680 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6681 (synopsis "Python module for simple generic functions")
6682 (description
6683 "The simplegeneric module lets you define simple single-dispatch generic
6684 functions, akin to Python’s built-in generic functions like @code{len()},
6685 @code{iter()} and so on. However, instead of using specially-named methods,
6686 these generic functions use simple lookup tables, akin to those used by
6687 e.g. @code{pickle.dump()} and other generic functions found in the Python
6688 standard library.")
6689 (license license:zpl2.1)))
6690
6691 (define-public python2-simplegeneric
6692 (package-with-python2 python-simplegeneric))
6693
6694 (define-public python-ipython-genutils
6695 ;; TODO: This package is retired, check if can be removed, see description.
6696 (package
6697 (name "python-ipython-genutils")
6698 (version "0.1.0")
6699 (source
6700 (origin
6701 (method url-fetch)
6702 (uri (pypi-uri "ipython_genutils" version))
6703 (sha256
6704 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6705 (build-system python-build-system)
6706 (arguments `(#:tests? #f)) ; no tests
6707 (home-page "https://ipython.org")
6708 (synopsis "Vestigial utilities from IPython")
6709 (description
6710 "This package provides retired utilities from IPython. No packages
6711 outside IPython/Jupyter should depend on it.
6712
6713 This package shouldn't exist. It contains some common utilities shared by
6714 Jupyter and IPython projects during The Big Split. As soon as possible, those
6715 packages will remove their dependency on this, and this package will go
6716 away.")
6717 (license license:bsd-3)))
6718
6719 (define-public python2-ipython-genutils
6720 (package-with-python2 python-ipython-genutils))
6721
6722 (define-public python-ipyparallel
6723 (package
6724 (name "python-ipyparallel")
6725 (version "6.2.4")
6726 (source
6727 (origin
6728 (method url-fetch)
6729 (uri (pypi-uri "ipyparallel" version))
6730 (sha256
6731 (base32
6732 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6733 (build-system python-build-system)
6734 (arguments
6735 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6736 #:phases
6737 (modify-phases %standard-phases
6738 (add-before 'check 'prepare-for-tests
6739 (lambda _
6740 (setenv "HOME" (getcwd))
6741 #t)))))
6742 (propagated-inputs
6743 `(("python-dateutil" ,python-dateutil)
6744 ("python-decorator" ,python-decorator)
6745 ("python-ipykernel" ,python-ipykernel)
6746 ("python-ipython" ,python-ipython)
6747 ("python-ipython-genutils" ,python-ipython-genutils)
6748 ("python-jupyter-client" ,python-jupyter-client)
6749 ("python-pyzmq" ,python-pyzmq)
6750 ("python-tornado" ,python-tornado)
6751 ("python-traitlets" ,python-traitlets)))
6752 (native-inputs
6753 `(("python-ipython" ,python-ipython)
6754 ("python-mock" ,python-mock)
6755 ("python-nose" ,python-nose)
6756 ("python-pytest" ,python-pytest)
6757 ("python-pytest-cov" ,python-pytest-cov)
6758 ("python-testpath" ,python-testpath)))
6759 (home-page "https://ipython.org/")
6760 (synopsis "Interactive Parallel Computing with IPython")
6761 (description
6762 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6763 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6764 CLI scripts:
6765 @enumerate
6766 @item ipcluster - start/stop a cluster
6767 @item ipcontroller - start a scheduler
6768 @item ipengine - start an engine
6769 @end enumerate")
6770 (license license:bsd-3)))
6771
6772 (define-public python2-ipyparallel
6773 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6774 (package
6775 (inherit ipyparallel)
6776 (propagated-inputs
6777 `(("python2-futures" ,python2-futures)
6778 ,@(package-propagated-inputs ipyparallel))))))
6779
6780 (define-public python-ipython-cluster-helper
6781 (package
6782 (name "python-ipython-cluster-helper")
6783 (version "0.6.4")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri "ipython-cluster-helper" version))
6788 (sha256
6789 (base32
6790 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6791 (modules '((guix build utils)))
6792 (snippet
6793 '(begin (substitute* "requirements.txt"
6794 (("ipython.*") "ipython\n"))
6795 #t))))
6796 (build-system python-build-system)
6797 (arguments
6798 `(#:tests? #f ; Test suite can't find IPython.
6799 #:phases
6800 (modify-phases %standard-phases
6801 (replace 'check
6802 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6803 (if tests?
6804 (begin
6805 (setenv "HOME" (getcwd))
6806 (add-installed-pythonpath inputs outputs)
6807 (invoke "python" "example/example.py" "--local"))
6808 #t))))))
6809 (propagated-inputs
6810 `(("python-ipyparallel" ,python-ipyparallel)
6811 ("python-ipython" ,python-ipython)
6812 ("python-netifaces" ,python-netifaces)
6813 ("python-pyzmq" ,python-pyzmq)
6814 ("python-setuptools" ,python-setuptools)
6815 ("python-six" ,python-six)))
6816 (home-page "https://github.com/roryk/ipython-cluster-helper")
6817 (synopsis
6818 "Simplify IPython cluster start up and use for multiple schedulers")
6819 (description
6820 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6821 profile, launches a cluster and returns a view. On program exit it shuts the
6822 cluster down and deletes the throwaway profile.")
6823 (license license:expat)))
6824
6825 (define-public python2-ipython-cluster-helper
6826 (package-with-python2 python-ipython-cluster-helper))
6827
6828 (define-public python-traitlets
6829 (package
6830 (name "python-traitlets")
6831 (version "4.3.3")
6832 (source
6833 (origin
6834 (method url-fetch)
6835 (uri (pypi-uri "traitlets" version))
6836 (sha256
6837 (base32
6838 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6839 (build-system python-build-system)
6840 (arguments
6841 `(#:phases
6842 (modify-phases %standard-phases
6843 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6844 (propagated-inputs
6845 `(("python-ipython-genutils" ,python-ipython-genutils)
6846 ("python-decorator" ,python-decorator)))
6847 (native-inputs
6848 `(("python-pytest" ,python-pytest)))
6849 (properties `((python2-variant . ,(delay python2-traitlets))))
6850 (home-page "https://ipython.org")
6851 (synopsis "Configuration system for Python applications")
6852 (description
6853 "Traitlets is a framework that lets Python classes have attributes with
6854 type checking, dynamically calculated default values, and ‘on change’
6855 callbacks. The package also includes a mechanism to use traitlets for
6856 configuration, loading values from files or from command line arguments. This
6857 is a distinct layer on top of traitlets, so you can use traitlets in your code
6858 without using the configuration machinery.")
6859 (license license:bsd-3)))
6860
6861 (define-public python2-traitlets
6862 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6863 (package
6864 (inherit traitlets)
6865 (propagated-inputs
6866 `(("python2-enum34" ,python2-enum34)
6867 ,@(package-propagated-inputs traitlets))))))
6868
6869 (define-public python-jupyter-core
6870 (package
6871 (name "python-jupyter-core")
6872 (version "4.4.0")
6873 (source
6874 (origin
6875 (method url-fetch)
6876 (uri (string-append (pypi-uri "jupyter_core" version)))
6877 (sha256
6878 (base32
6879 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6880 (build-system python-build-system)
6881 ;; FIXME: not sure how to run the tests
6882 (arguments `(#:tests? #f))
6883 (propagated-inputs
6884 `(("python-traitlets" ,python-traitlets)))
6885 (home-page "http://jupyter.org/")
6886 (synopsis "Jupyter base package")
6887 (description
6888 "Jupyter core is the base package on which Jupyter projects rely.")
6889 (license license:bsd-3)))
6890
6891 (define-public python2-jupyter-core
6892 (package-with-python2 python-jupyter-core))
6893
6894 (define-public python-jupyter-client
6895 (package
6896 (name "python-jupyter-client")
6897 (version "5.2.4")
6898 (source
6899 (origin
6900 (method url-fetch)
6901 (uri (pypi-uri "jupyter_client" version))
6902 (sha256
6903 (base32
6904 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6905 (build-system python-build-system)
6906 ;; Tests fail because of missing native python kernel which I assume is
6907 ;; provided by the ipython package, which we cannot use because it would
6908 ;; cause a dependency cycle.
6909 (arguments
6910 `(#:tests? #f
6911
6912 #:phases (modify-phases %standard-phases
6913 (add-after 'unpack 'set-tool-file-names
6914 (lambda* (#:key inputs #:allow-other-keys)
6915 (let ((iproute (assoc-ref inputs "iproute")))
6916 (substitute* "jupyter_client/localinterfaces.py"
6917 (("'ip'")
6918 (string-append "'" iproute "/sbin/ip'")))
6919 #t))))))
6920 (inputs
6921 `(("iproute" ,iproute)))
6922 (propagated-inputs
6923 `(("python-pyzmq" ,python-pyzmq)
6924 ("python-traitlets" ,python-traitlets)
6925 ("python-jupyter-core" ,python-jupyter-core)))
6926 (home-page "http://jupyter.org/")
6927 (synopsis "Jupyter protocol implementation and client libraries")
6928 (description
6929 "The @code{jupyter_client} package contains the reference implementation
6930 of the Jupyter protocol. It also provides client and kernel management APIs
6931 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6932 installing @code{kernelspec}s for use with Jupyter frontends.")
6933 (license license:bsd-3)))
6934
6935 (define-public python2-jupyter-client
6936 (package-with-python2 python-jupyter-client))
6937
6938 (define-public python-ipykernel
6939 (package
6940 (name "python-ipykernel")
6941 (version "5.1.3")
6942 (source
6943 (origin
6944 (method url-fetch)
6945 (uri (pypi-uri "ipykernel" version))
6946 (sha256
6947 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6948 (build-system python-build-system)
6949 (arguments
6950 `(#:phases
6951 (modify-phases %standard-phases
6952 (replace 'check
6953 (lambda _
6954 (setenv "HOME" "/tmp")
6955 (invoke "pytest" "-v")
6956 #t))
6957 (add-after 'install 'set-python-file-name
6958 (lambda* (#:key outputs #:allow-other-keys)
6959 ;; Record the absolute file name of the 'python' executable in
6960 ;; 'kernel.json'.
6961 (let ((out (assoc-ref outputs "out")))
6962 (substitute* (string-append out "/share/jupyter"
6963 "/kernels/python3/kernel.json")
6964 (("\"python\"")
6965 (string-append "\"" (which "python") "\"")))
6966 #t))))))
6967 (propagated-inputs
6968 `(("python-ipython" ,python-ipython)
6969 ;; imported at runtime during connect
6970 ("python-jupyter-client" ,python-jupyter-client)))
6971 (native-inputs
6972 `(("python-flaky" ,python-flaky)
6973 ("python-nose" ,python-nose)
6974 ("python-pytest" ,python-pytest)))
6975 (home-page "https://ipython.org")
6976 (synopsis "IPython Kernel for Jupyter")
6977 (description
6978 "This package provides the IPython kernel for Jupyter.")
6979 (properties `((python2-variant . ,(delay python2-ipykernel))))
6980 (license license:bsd-3)))
6981
6982 ;; Version 5.x and above no longer support Python 2.
6983 (define-public python2-ipykernel
6984 (package
6985 (name "python2-ipykernel")
6986 (version "4.10.1")
6987 (source
6988 (origin
6989 (method url-fetch)
6990 (uri (pypi-uri "ipykernel" version))
6991 (sha256
6992 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6993 (build-system python-build-system)
6994 (arguments
6995 `(#:python ,python-2))
6996 (propagated-inputs
6997 `(("python2-ipython" ,python2-ipython)
6998 ;; imported at runtime during connect
6999 ("python2-jupyter-client" ,python2-jupyter-client)
7000 ("python2-tornado" ,python2-tornado)
7001 ("python2-traitlets" ,python2-traitlets)))
7002 (native-inputs
7003 `(("python2-mock" ,python2-mock)
7004 ("python2-nose" ,python2-nose)
7005 ("python2-pytest" ,python2-pytest)
7006 ("python2-pytest-cov" ,python2-pytest-cov)))
7007 (home-page "https://ipython.org")
7008 (synopsis "IPython Kernel for Jupyter")
7009 (description
7010 "This package provides the IPython kernel for Jupyter.")
7011 (license license:bsd-3)))
7012
7013 (define-public python-pari-jupyter
7014 (package
7015 (name "python-pari-jupyter")
7016 (version "1.3.2")
7017 (source
7018 (origin
7019 (method url-fetch)
7020 (uri (pypi-uri "pari_jupyter" version))
7021 (sha256
7022 (base32
7023 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7024 (build-system python-build-system)
7025 (propagated-inputs
7026 `(("python-ipykernel" ,python-ipykernel)))
7027 (inputs
7028 `(("pari-gp" ,pari-gp)
7029 ("readline" ,readline)))
7030 (arguments
7031 `(#:tests? #f)) ; no test suite
7032 (home-page
7033 "https://github.com/jdemeyer/pari_jupyter")
7034 (synopsis "A Jupyter kernel for PARI/GP")
7035 (description "The package provides a PARI/GP kernel for Jupyter.")
7036 (license license:gpl3+)))
7037
7038 (define-public python-backcall
7039 (package
7040 (name "python-backcall")
7041 (version "0.1.0")
7042 (source
7043 (origin
7044 (method url-fetch)
7045 (uri (pypi-uri "backcall" version))
7046 (sha256
7047 (base32
7048 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7049 (build-system python-build-system)
7050 (home-page "https://github.com/takluyver/backcall/")
7051 (synopsis "Specifications for callback functions passed in to an API")
7052 (description
7053 "If your code lets other people supply callback functions, it's important
7054 to specify the function signature you expect, and check that functions support
7055 that. Adding extra parameters later would break other peoples code unless
7056 you're careful. The @code{backcall} package provides a way of specifying the
7057 callback signature using a prototype function.")
7058 (license license:bsd-3)))
7059
7060 (define-public python-ipython
7061 (package
7062 (name "python-ipython")
7063 (version "7.9.0")
7064 (source
7065 (origin
7066 (method url-fetch)
7067 (uri (pypi-uri "ipython" version ".tar.gz"))
7068 (sha256
7069 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7070 (build-system python-build-system)
7071 (propagated-inputs
7072 `(("python-backcall" ,python-backcall)
7073 ("python-pyzmq" ,python-pyzmq)
7074 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7075 ("python-terminado" ,python-terminado)
7076 ("python-matplotlib" ,python-matplotlib)
7077 ("python-numpy" ,python-numpy)
7078 ("python-numpydoc" ,python-numpydoc)
7079 ("python-jedi" ,python-jedi)
7080 ("python-jinja2" ,python-jinja2)
7081 ("python-mistune" ,python-mistune)
7082 ("python-pexpect" ,python-pexpect)
7083 ("python-pickleshare" ,python-pickleshare)
7084 ("python-simplegeneric" ,python-simplegeneric)
7085 ("python-jsonschema" ,python-jsonschema)
7086 ("python-traitlets" ,python-traitlets)
7087 ("python-nbformat" ,python-nbformat)
7088 ("python-pygments" ,python-pygments)))
7089 (inputs
7090 `(("readline" ,readline)
7091 ("which" ,which)))
7092 (native-inputs
7093 `(("graphviz" ,graphviz)
7094 ("pkg-config" ,pkg-config)
7095 ("python-requests" ,python-requests) ;; for tests
7096 ("python-testpath" ,python-testpath)
7097 ("python-nose" ,python-nose)))
7098 (arguments
7099 `(#:phases
7100 (modify-phases %standard-phases
7101 (add-after 'unpack 'make-docs-reproducible
7102 (lambda _
7103 (substitute* "IPython/sphinxext/ipython_directive.py"
7104 ((".*import datetime") "")
7105 ((".*datetime.datetime.now\\(\\)") "")
7106 (("%timeit") "# %timeit"))
7107 #t))
7108 ;; Tests can only be run after the library has been installed and not
7109 ;; within the source directory.
7110 (delete 'check)
7111 (add-after 'install 'check
7112 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7113 (if tests?
7114 (begin
7115 ;; Make installed package available for running the tests
7116 (add-installed-pythonpath inputs outputs)
7117 (setenv "HOME" "/tmp/") ;; required by a test
7118 ;; We only test the core because one of the other tests
7119 ;; tries to import ipykernel.
7120 (invoke "python" "IPython/testing/iptest.py"
7121 "-v" "IPython/core/tests"))
7122 #t)))
7123 (add-before 'check 'fix-tests
7124 (lambda* (#:key inputs #:allow-other-keys)
7125 (substitute* "./IPython/utils/_process_posix.py"
7126 (("/usr/bin/env', 'which") (which "which")))
7127 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7128 (("#!/usr/bin/env python")
7129 (string-append "#!" (which "python"))))
7130 ;; This test introduces a circular dependency on ipykernel
7131 ;; (which depends on ipython).
7132 (delete-file "IPython/core/tests/test_display.py")
7133 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7134 (delete-file "IPython/core/tests/test_interactiveshell.py")
7135 #t)))))
7136 (home-page "https://ipython.org")
7137 (synopsis "IPython is a tool for interactive computing in Python")
7138 (description
7139 "IPython provides a rich architecture for interactive computing with:
7140 Powerful interactive shells, a browser-based notebook, support for interactive
7141 data visualization, embeddable interpreters and tools for parallel
7142 computing.")
7143 (properties `((python2-variant . ,(delay python2-ipython))))
7144 (license license:bsd-3)))
7145
7146 ;; This is the latest release of the LTS version of ipython with support for
7147 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7148 ;; dropped support for Python 2.7.
7149 (define-public python2-ipython
7150 (package
7151 (name "python2-ipython")
7152 (version "5.8.0")
7153 (source
7154 (origin
7155 (method url-fetch)
7156 (uri (pypi-uri "ipython" version ".tar.gz"))
7157 (sha256
7158 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7159 (build-system python-build-system)
7160 (propagated-inputs
7161 `(("python2-backports-shutil-get-terminal-size"
7162 ,python2-backports-shutil-get-terminal-size)
7163 ("python2-pathlib2" ,python2-pathlib2)
7164 ("python2-pyzmq" ,python2-pyzmq)
7165 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7166 ("python2-terminado" ,python2-terminado)
7167 ("python2-matplotlib" ,python2-matplotlib)
7168 ("python2-numpy" ,python2-numpy)
7169 ("python2-numpydoc" ,python2-numpydoc)
7170 ("python2-jinja2" ,python2-jinja2)
7171 ("python2-mistune" ,python2-mistune)
7172 ("python2-pexpect" ,python2-pexpect)
7173 ("python2-pickleshare" ,python2-pickleshare)
7174 ("python2-simplegeneric" ,python2-simplegeneric)
7175 ("python2-jsonschema" ,python2-jsonschema)
7176 ("python2-traitlets" ,python2-traitlets)
7177 ("python2-nbformat" ,python2-nbformat)
7178 ("python2-pygments" ,python2-pygments)))
7179 (inputs
7180 `(("readline" ,readline)
7181 ("which" ,which)))
7182 (native-inputs
7183 `(("graphviz" ,graphviz)
7184 ("pkg-config" ,pkg-config)
7185 ("python2-requests" ,python2-requests) ;; for tests
7186 ("python2-testpath" ,python2-testpath)
7187 ("python2-mock" ,python2-mock)
7188 ("python2-nose" ,python2-nose)))
7189 (arguments
7190 `(#:python ,python-2
7191 #:phases
7192 (modify-phases %standard-phases
7193 (add-before 'check 'delete-broken-tests
7194 (lambda* (#:key inputs #:allow-other-keys)
7195 ;; These tests throw errors for unknown reasons.
7196 (delete-file "IPython/core/tests/test_displayhook.py")
7197 (delete-file "IPython/core/tests/test_magic_terminal.py")
7198 (delete-file "IPython/core/tests/test_profile.py")
7199 #t)))))
7200 (home-page "https://ipython.org")
7201 (synopsis "IPython is a tool for interactive computing in Python")
7202 (description
7203 "IPython provides a rich architecture for interactive computing with:
7204 Powerful interactive shells, a browser-based notebook, support for interactive
7205 data visualization, embeddable interpreters and tools for parallel
7206 computing.")
7207 (license license:bsd-3)))
7208
7209 (define-public python-ipython-documentation
7210 (package
7211 (inherit python-ipython)
7212 (name "python-ipython-documentation")
7213 (version (package-version python-ipython))
7214 (arguments
7215 `(#:phases
7216 (modify-phases %standard-phases
7217 (delete 'build)
7218 (delete 'check)
7219 (replace 'install
7220 (lambda* (#:key outputs #:allow-other-keys)
7221 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7222 (doc (string-append data "/doc/" ,name "-" ,version))
7223 (html (string-append doc "/html"))
7224 (man1 (string-append data "/man/man1"))
7225 (info (string-append data "/info"))
7226 (examples (string-append doc "/examples"))
7227 (python-arg (string-append "PYTHON=" (which "python"))))
7228 (setenv "LANG" "en_US.utf8")
7229 (with-directory-excursion "docs"
7230 ;; FIXME: pdf fails to build
7231 ;;(system* "make" "pdf" "PAPER=a4")
7232 (system* "make" python-arg "html")
7233 ;; FIXME: the generated texi file contains ^@^@, which trips
7234 ;; up the parser.
7235 ;; (system* "make" python-arg "info")
7236 )
7237 (copy-recursively "docs/man" man1)
7238 (copy-recursively "examples" examples)
7239 (copy-recursively "docs/build/html" html)
7240 ;; (copy-file "docs/build/latex/ipython.pdf"
7241 ;; (string-append doc "/ipython.pdf"))
7242 (mkdir-p info)
7243 ;; (copy-file "docs/build/texinfo/ipython.info"
7244 ;; (string-append info "/ipython.info"))
7245 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7246 #t)))))
7247 (inputs
7248 `(("python-ipython" ,python-ipython)
7249 ("python-ipykernel" ,python-ipykernel)))
7250 (native-inputs
7251 `(("python-sphinx" ,python-sphinx)
7252 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7253 ;; FIXME: It's possible that a smaller union would work just as well.
7254 ("texlive" ,(texlive-union (list texlive-amsfonts
7255 texlive-fonts-ec
7256 texlive-generic-ifxetex
7257 texlive-generic-pdftex
7258 texlive-latex-capt-of
7259 texlive-latex-cmap
7260 texlive-latex-environ
7261 texlive-latex-eqparbox
7262 texlive-latex-etoolbox
7263 texlive-latex-expdlist
7264 texlive-latex-fancyhdr
7265 texlive-latex-fancyvrb
7266 texlive-latex-fncychap
7267 texlive-latex-float
7268 texlive-latex-framed
7269 texlive-latex-geometry
7270 texlive-latex-graphics
7271 texlive-latex-hyperref
7272 texlive-latex-mdwtools
7273 texlive-latex-multirow
7274 texlive-latex-needspace
7275 texlive-latex-oberdiek
7276 texlive-latex-parskip
7277 texlive-latex-preview
7278 texlive-latex-tabulary
7279 texlive-latex-threeparttable
7280 texlive-latex-titlesec
7281 texlive-latex-trimspaces
7282 texlive-latex-ucs
7283 texlive-latex-upquote
7284 texlive-latex-url
7285 texlive-latex-varwidth
7286 texlive-latex-wrapfig)))
7287 ("texinfo" ,texinfo)))))
7288
7289 (define-public python-urwid
7290 (package
7291 (name "python-urwid")
7292 (version "2.1.0")
7293 (source
7294 (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "urwid" version))
7297 (sha256
7298 (base32
7299 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7300 (build-system python-build-system)
7301 (home-page "http://urwid.org")
7302 (synopsis "Console user interface library for Python")
7303 (description
7304 "Urwid is a curses-based UI/widget library for Python. It includes many
7305 features useful for text console applications.")
7306 (license license:lgpl2.1+)))
7307
7308 (define-public python2-urwid
7309 (package-with-python2 python-urwid))
7310
7311 (define-public python-urwidtrees
7312 (package
7313 (name "python-urwidtrees")
7314 (version "1.0.2")
7315 (source
7316 (origin
7317 (method git-fetch)
7318 ;; package author intends on distributing via github rather than pypi:
7319 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7320 (uri (git-reference
7321 (url "https://github.com/pazz/urwidtrees")
7322 (commit version)))
7323 (file-name (git-file-name name version))
7324 (sha256
7325 (base32
7326 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7327 (build-system python-build-system)
7328 (arguments
7329 '(#:use-setuptools? #f
7330 #:tests? #f)) ; no tests
7331 (propagated-inputs `(("python-urwid" ,python-urwid)))
7332 (home-page "https://github.com/pazz/urwidtrees")
7333 (synopsis "Tree widgets for urwid")
7334 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7335 toolkit. Use it to build trees of widgets.")
7336 (license license:gpl3+)))
7337
7338 (define-public python2-urwidtrees
7339 (package-with-python2 python-urwidtrees))
7340
7341 (define-public python-ua-parser
7342 (package
7343 (name "python-ua-parser")
7344 (version "0.8.0")
7345 (source
7346 (origin
7347 (method url-fetch)
7348 (uri (pypi-uri "ua-parser" version))
7349 (sha256
7350 (base32
7351 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7352 (build-system python-build-system)
7353 (arguments
7354 `(#:tests? #f)) ;no test suite in release
7355 (native-inputs
7356 `(("python-pyyaml" ,python-pyyaml)))
7357 (home-page "https://github.com/ua-parser/uap-python")
7358 (synopsis "User agent parser")
7359 (description
7360 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7361 (license license:asl2.0)))
7362
7363 (define-public python2-ua-parser
7364 (package-with-python2 python-ua-parser))
7365
7366 (define-public python-user-agents
7367 (package
7368 (name "python-user-agents")
7369 (version "1.1.0")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "user-agents" version))
7374 (sha256
7375 (base32
7376 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7377 (build-system python-build-system)
7378 (arguments
7379 `(#:tests? #f)) ;missing devices.json test file in release
7380 (propagated-inputs
7381 `(("python-ua-parser" ,python-ua-parser)))
7382 (home-page "https://github.com/selwin/python-user-agents")
7383 (synopsis "User Agent strings parsing library")
7384 (description
7385 "A library to identify devices (phones, tablets) and their capabilities by
7386 parsing (browser/HTTP) user agent strings.")
7387 (license license:expat)))
7388
7389 (define-public python2-user-agents
7390 (package-with-python2 python-user-agents))
7391
7392 (define-public python-dbus
7393 (package
7394 (name "python-dbus")
7395 (version "1.2.16")
7396 (source
7397 (origin
7398 (method url-fetch)
7399 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7400 "dbus-python-" version ".tar.gz"))
7401 (sha256
7402 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7403 (build-system gnu-build-system)
7404 (native-inputs
7405 `(("pkg-config" ,pkg-config)))
7406 (inputs
7407 `(("python" ,python-wrapper)
7408 ("dbus-glib" ,dbus-glib)))
7409 (synopsis "Python bindings for D-bus")
7410 (description "python-dbus provides bindings for libdbus, the reference
7411 implementation of D-Bus.")
7412 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7413 (license license:expat)))
7414
7415 (define-public python2-dbus
7416 (package (inherit python-dbus)
7417 (name "python2-dbus")
7418 (inputs `(("python" ,python-2)
7419 ,@(alist-delete "python"
7420 (package-inputs python-dbus)
7421 equal?)))))
7422
7423 (define-public python-notify2
7424 (package
7425 (name "python-notify2")
7426 (version "0.3.1")
7427 (source
7428 (origin
7429 (method url-fetch)
7430 (uri (pypi-uri "notify2" version))
7431 (sha256
7432 (base32
7433 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7434 (build-system python-build-system)
7435 (arguments `(#:tests? #f)) ; tests depend on system state
7436 (native-inputs
7437 `(("python-dbus" ,python-dbus)))
7438 (home-page "https://bitbucket.org/takluyver/pynotify2")
7439 (synopsis "Python interface to D-Bus notifications")
7440 (description
7441 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7442 It is a reimplementation of pynotify in pure Python, and an alternative to
7443 the GObject Introspection bindings to libnotify for non-GTK applications.")
7444 (license (list license:bsd-2
7445 license:lgpl2.1+))))
7446
7447 (define-public python2-notify2
7448 (package-with-python2 python-notify2))
7449
7450 ;; beautifulsoup4 has a totally different namespace than 3.x,
7451 ;; and pypi seems to put it under its own name, so I guess we should too
7452 (define-public python-beautifulsoup4
7453 (package
7454 (name "python-beautifulsoup4")
7455 (version "4.9.1")
7456 (source
7457 (origin
7458 (method url-fetch)
7459 (uri (pypi-uri "beautifulsoup4" version))
7460 (sha256
7461 (base32
7462 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7463 (build-system python-build-system)
7464 (arguments
7465 `(#:phases
7466 (modify-phases %standard-phases
7467 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7468 ;; must use this conversion script when building with Python 3. The
7469 ;; conversion script also runs the tests.
7470 ;; For more information, see the file 'convert-py3k' in the source
7471 ;; distribution.
7472 (replace 'check
7473 (lambda _ (invoke "./convert-py3k"))))))
7474 (propagated-inputs
7475 `(("python-soupsieve" ,python-soupsieve)))
7476 (home-page
7477 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7478 (synopsis
7479 "Python screen-scraping library")
7480 (description
7481 "Beautiful Soup is a Python library designed for rapidly setting up
7482 screen-scraping projects. It offers Pythonic idioms for navigating,
7483 searching, and modifying a parse tree, providing a toolkit for
7484 dissecting a document and extracting what you need. It automatically
7485 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7486 (license license:expat)
7487 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7488
7489 (define-public python2-beautifulsoup4
7490 (package
7491 (inherit (package-with-python2
7492 (strip-python2-variant python-beautifulsoup4)))
7493 (arguments `(#:python ,python-2))))
7494
7495 (define-public python-soupsieve
7496 (package
7497 (name "python-soupsieve")
7498 (version "2.0.1")
7499 (source
7500 (origin
7501 (method url-fetch)
7502 (uri (pypi-uri "soupsieve" version))
7503 (sha256
7504 (base32
7505 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7506 (build-system python-build-system)
7507 (arguments `(#:tests? #f))
7508 ;;XXX: 2 tests fail currently despite claming they were to be
7509 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7510 ;;don't want to create a circular dependency.
7511 (home-page "https://github.com/facelessuser/soupsieve")
7512 (synopsis "CSS selector library")
7513 (description
7514 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7515 Soup 4. It aims to provide selecting, matching, and filtering using modern
7516 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7517 specifications up through the latest CSS level 4 drafts and beyond (though
7518 some are not yet implemented).")
7519 (properties `((python2-variant . ,(delay python2-soupsieve))))
7520 (license license:expat)))
7521
7522 ;; This is the last version that supports python-2
7523 (define-public python2-soupsieve
7524 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7525 (package
7526 (inherit base)
7527 (version "1.9.6")
7528 (source
7529 (origin
7530 (method url-fetch)
7531 (uri (pypi-uri "soupsieve" version))
7532 (sha256
7533 (base32
7534 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7535 (propagated-inputs
7536 `(("python2-backports-functools-lru-cache"
7537 ,python2-backports-functools-lru-cache)
7538 ,@(package-propagated-inputs base))))))
7539
7540 (define-public python-netifaces
7541 (package
7542 (name "python-netifaces")
7543 (version "0.10.9")
7544 (source
7545 (origin
7546 (method url-fetch)
7547 (uri (pypi-uri "netifaces" version))
7548 (sha256
7549 (base32
7550 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7551 (build-system python-build-system)
7552 (home-page "https://github.com/al45tair/netifaces")
7553 (synopsis
7554 "Python module for portable network interface information")
7555 (description
7556 "Netifaces is a Python module providing information on network
7557 interfaces in an easy and portable manner.")
7558 (license license:expat)))
7559
7560 (define-public python2-netifaces
7561 (package-with-python2 python-netifaces))
7562
7563 (define-public python-networkx
7564 (package
7565 (name "python-networkx")
7566 (version "2.5")
7567 (source
7568 (origin
7569 (method url-fetch)
7570 (uri (pypi-uri "networkx" version))
7571 (sha256
7572 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7573 (build-system python-build-system)
7574 (arguments
7575 '(#:phases (modify-phases %standard-phases
7576 (replace 'check
7577 (lambda* (#:key tests? #:allow-other-keys)
7578 (if tests?
7579 (invoke "pytest" "-vv" "--pyargs" "networkx")
7580 (format #t "test suite not run~%"))
7581 #t)))))
7582 ;; python-decorator is needed at runtime.
7583 (propagated-inputs
7584 `(("python-decorator" ,python-decorator)))
7585 (native-inputs
7586 `(("python-pytest" ,python-pytest)))
7587 (home-page "https://networkx.github.io/")
7588 (synopsis "Python module for creating and manipulating graphs and networks")
7589 (description
7590 "NetworkX is a Python package for the creation, manipulation, and study
7591 of the structure, dynamics, and functions of complex networks.")
7592 (properties `((python2-variant . ,(delay python2-networkx))))
7593 (license license:bsd-3)))
7594
7595 ;; NetworkX 2.2 is the last version with support for Python 2.
7596 (define-public python2-networkx
7597 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7598 (package
7599 (inherit base)
7600 (version "2.2")
7601 (source (origin
7602 (method url-fetch)
7603 (uri (pypi-uri "networkx" version ".zip"))
7604 (sha256
7605 (base32
7606 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7607 (arguments
7608 `(#:python ,python-2))
7609 (native-inputs
7610 `(("python-nose" ,python2-nose)
7611 ("unzip" ,unzip))))))
7612
7613 (define-public python-datrie
7614 (package
7615 (name "python-datrie")
7616 (version "0.8.2")
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (pypi-uri "datrie" version))
7621 (sha256
7622 (base32
7623 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7624 (build-system python-build-system)
7625 (native-inputs
7626 `(("python-cython" ,python-cython)
7627 ("python-hypothesis" ,python-hypothesis)
7628 ("python-pytest" ,python-pytest)
7629 ("python-pytest-runner" ,python-pytest-runner)))
7630 (home-page "https://github.com/kmike/datrie")
7631 (synopsis "Fast, efficiently stored trie for Python")
7632 (description
7633 "This package provides a fast, efficiently stored trie implementation for
7634 Python.")
7635 (license license:lgpl2.1+)))
7636
7637 (define-public snakemake
7638 (package
7639 (name "snakemake")
7640 (version "5.7.1")
7641 (source
7642 (origin
7643 (method url-fetch)
7644 (uri (pypi-uri "snakemake" version))
7645 (sha256
7646 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7647 (build-system python-build-system)
7648 (arguments
7649 ;; TODO: Package missing test dependencies.
7650 '(#:tests? #f
7651 #:phases
7652 (modify-phases %standard-phases
7653 ;; For cluster execution Snakemake will call Python. Since there is
7654 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7655 ;; this by calling the snakemake wrapper instead.
7656 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7657 (lambda* (#:key outputs #:allow-other-keys)
7658 (substitute* "snakemake/executors.py"
7659 (("\\{sys.executable\\} -m snakemake")
7660 (string-append (assoc-ref outputs "out")
7661 "/bin/snakemake")))
7662 #t)))))
7663 (propagated-inputs
7664 `(("python-appdirs" ,python-appdirs)
7665 ("python-configargparse" ,python-configargparse)
7666 ("python-datrie" ,python-datrie)
7667 ("python-docutils" ,python-docutils)
7668 ("python-gitpython" ,python-gitpython)
7669 ("python-jinja2" ,python-jinja2)
7670 ("python-jsonschema" ,python-jsonschema)
7671 ("python-networkx" ,python-networkx)
7672 ("python-psutil" ,python-psutil)
7673 ("python-pyyaml" ,python-pyyaml)
7674 ("python-ratelimiter" ,python-ratelimiter)
7675 ("python-requests" ,python-requests)
7676 ("python-wrapt" ,python-wrapt)))
7677 (home-page "https://snakemake.readthedocs.io")
7678 (synopsis "Python-based execution environment for make-like workflows")
7679 (description
7680 "Snakemake aims to reduce the complexity of creating workflows by
7681 providing a clean and modern domain specific specification language (DSL) in
7682 Python style, together with a fast and comfortable execution environment.")
7683 (license license:expat)))
7684
7685 (define-public python-pyqrcode
7686 (package
7687 (name "python-pyqrcode")
7688 (version "1.2.1")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "PyQRCode" version))
7693 (sha256
7694 (base32
7695 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7696 (build-system python-build-system)
7697 (home-page
7698 "https://github.com/mnooner256/pyqrcode")
7699 (synopsis "QR code generator")
7700 (description
7701 "Pyqrcode is a QR code generator written purely in Python with
7702 SVG, EPS, PNG and terminal output.")
7703 (license license:bsd-3)))
7704
7705 (define-public python-seaborn
7706 (package
7707 (name "python-seaborn")
7708 (version "0.10.0")
7709 (source
7710 (origin
7711 (method url-fetch)
7712 (uri (pypi-uri "seaborn" version))
7713 (sha256
7714 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7715 (build-system python-build-system)
7716 (arguments
7717 `(#:phases
7718 (modify-phases %standard-phases
7719 (add-before 'check 'start-xserver
7720 (lambda* (#:key inputs #:allow-other-keys)
7721 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7722 ;; There must be a running X server and make check doesn't
7723 ;; start one. Therefore we must do it.
7724 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7725 (setenv "DISPLAY" ":1")
7726 #t)))
7727 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7728 (propagated-inputs
7729 `(("python-pandas" ,python-pandas)
7730 ("python-matplotlib" ,python-matplotlib)
7731 ("python-numpy" ,python-numpy)
7732 ("python-scipy" ,python-scipy)))
7733 (native-inputs
7734 `(("python-pytest" ,python-pytest)
7735 ("xorg-server" ,xorg-server-for-tests)))
7736 (home-page "https://seaborn.pydata.org/")
7737 (synopsis "Statistical data visualization")
7738 (description
7739 "Seaborn is a library for making attractive and informative statistical
7740 graphics in Python. It is built on top of matplotlib and tightly integrated
7741 with the PyData stack, including support for numpy and pandas data structures
7742 and statistical routines from scipy and statsmodels.")
7743 (properties `((python2-variant . ,(delay python2-seaborn))))
7744 (license license:bsd-3)))
7745
7746 ;; 0.9.1 is the last release with support for Python 2.
7747 (define-public python2-seaborn
7748 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7749 (package
7750 (inherit base)
7751 (version "0.9.1")
7752 (source (origin
7753 (method url-fetch)
7754 (uri (pypi-uri "seaborn" version))
7755 (sha256
7756 (base32
7757 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7758
7759 (define-public python-mpmath
7760 (package
7761 (name "python-mpmath")
7762 (version "1.1.0")
7763 (source (origin
7764 (method url-fetch)
7765 (uri (pypi-uri "mpmath" version))
7766 (file-name (git-file-name name version))
7767 (sha256
7768 (base32
7769 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7770 (build-system python-build-system)
7771 (native-inputs
7772 `(("python-pytest" ,python-pytest)))
7773 (arguments
7774 '(#:phases
7775 (modify-phases %standard-phases
7776 (replace 'check
7777 (lambda _
7778 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7779 (home-page "http://mpmath.org")
7780 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7781 (description
7782 "@code{mpmath} can be used as an arbitrary-precision substitute for
7783 Python's float/complex types and math/cmath modules, but also does much
7784 more advanced mathematics.")
7785 (license license:bsd-3)))
7786
7787 (define-public python2-mpmath
7788 (package-with-python2 python-mpmath))
7789
7790 (define-public python-bigfloat
7791 (package
7792 (name "python-bigfloat")
7793 (version "0.3.0")
7794 (source
7795 (origin
7796 (method url-fetch)
7797 (uri (pypi-uri "bigfloat" version))
7798 (sha256
7799 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7800 (build-system python-build-system)
7801 (inputs
7802 `(("mpfr" ,mpfr)))
7803 (home-page "https://github.com/mdickinson/bigfloat")
7804 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7805 (description
7806 "This package provides a Python interface to the MPFR library for
7807 multiprecision arithmetic.")
7808 (license license:lgpl3+)))
7809
7810 (define-public python2-bigfloat
7811 (package-with-python2 python-bigfloat))
7812
7813 (define-public python-sympy
7814 (package
7815 (name "python-sympy")
7816 (version "1.6.2")
7817 (source
7818 (origin
7819 (method url-fetch)
7820 (uri (pypi-uri "sympy" version))
7821 (sha256
7822 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7823 (build-system python-build-system)
7824 (arguments
7825 `(#:phases
7826 (modify-phases %standard-phases
7827 (replace 'check
7828 (lambda* (#:key outputs #:allow-other-keys)
7829 (invoke
7830 (or (which "python3") (which "python"))
7831 "-c" "import sympy; sympy.test(\"/core\")"))))))
7832 (propagated-inputs
7833 `(("python-mpmath" ,python-mpmath)))
7834 (home-page "https://www.sympy.org/")
7835 (synopsis "Python library for symbolic mathematics")
7836 (description
7837 "SymPy is a Python library for symbolic mathematics. It aims to become a
7838 full-featured computer algebra system (CAS) while keeping the code as simple
7839 as possible in order to be comprehensible and easily extensible.")
7840 (license license:bsd-3)))
7841
7842 (define-public python2-sympy
7843 (package
7844 (inherit (package-with-python2 python-sympy))
7845 (version "1.5.1") ; last release for python2
7846 (source
7847 (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "sympy" version))
7850 (sha256
7851 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7852
7853 (define-public python-q
7854 (package
7855 (name "python-q")
7856 (version "2.6")
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (pypi-uri "q" version))
7861 (sha256
7862 (base32
7863 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7864 (build-system python-build-system)
7865 (home-page "https://github.com/zestyping/q")
7866 (synopsis "Quick-and-dirty debugging output for tired programmers")
7867 (description
7868 "q is a Python module for \"print\" style of debugging Python code. It
7869 provides convenient short API for print out of values, tracebacks, and
7870 falling into the Python interpreter.")
7871 (license license:asl2.0)))
7872
7873 (define-public python2-q
7874 (package-with-python2 python-q))
7875
7876 (define-public python-xlib
7877 (package
7878 (name "python-xlib")
7879 (version "0.27")
7880 (source
7881 (origin
7882 (method git-fetch)
7883 (uri (git-reference
7884 (url "https://github.com/python-xlib/python-xlib")
7885 (commit version)))
7886 (file-name (git-file-name name version))
7887 (sha256
7888 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7889 (build-system python-build-system)
7890 (arguments
7891 `(#:phases
7892 (modify-phases %standard-phases
7893 (add-before 'check 'start-xserver
7894 (lambda* (#:key inputs #:allow-other-keys)
7895 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7896 ;; There must be a running X server and make check doesn't
7897 ;; start one. Therefore we must do it.
7898 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7899 (setenv "DISPLAY" ":1")
7900 #t))))))
7901 (native-inputs
7902 `(("python-mock" ,python-mock)
7903 ("python-setuptools-scm" ,python-setuptools-scm)
7904 ("python-six" ,python-six)
7905 ("xorg-server" ,xorg-server)))
7906 (home-page "https://github.com/python-xlib/python-xlib")
7907 (synopsis "Python X11 client library")
7908 (description
7909 "The Python X Library is intended to be a fully functional
7910 X client library for Python programs. It is useful to implement
7911 low-level X clients. It is written entirely in Python.")
7912 (license license:gpl2+)))
7913
7914 (define-public python2-xlib
7915 (package-with-python2 python-xlib))
7916
7917 (define-public python-singledispatch
7918 (package
7919 (name "python-singledispatch")
7920 (version "3.4.0.3")
7921 (source
7922 (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "singledispatch" version))
7925 (sha256
7926 (base32
7927 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7928 (build-system python-build-system)
7929 (native-inputs
7930 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7931 (home-page
7932 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7933 (synopsis "Backport of singledispatch feature from Python 3.4")
7934 (description
7935 "This library brings functools.singledispatch from Python 3.4 to Python
7936 2.6-3.3.")
7937 (license license:expat)))
7938
7939 (define-public python2-singledispatch
7940 (package-with-python2 python-singledispatch))
7941
7942 ;; the python- version can be removed with python-3.5
7943 (define-public python-backports-abc
7944 (package
7945 (name "python-backports-abc")
7946 (version "0.5")
7947 (source
7948 (origin
7949 (method url-fetch)
7950 (uri (pypi-uri "backports_abc" version))
7951 (sha256
7952 (base32
7953 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7954 (build-system python-build-system)
7955 (home-page "https://github.com/cython/backports_abc")
7956 (synopsis "Backport of additions to the 'collections.abc' module")
7957 (description
7958 "Python-backports-abc provides a backport of additions to the
7959 @code{collections.abc} module in Python-3.5.")
7960 (license license:psfl)))
7961
7962 (define-public python2-backports-abc
7963 (package-with-python2 python-backports-abc))
7964
7965 (define-public python-backports-csv
7966 (package
7967 (name "python-backports-csv")
7968 (version "1.0.7")
7969 (source
7970 (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "backports.csv" version))
7973 (sha256
7974 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7975 (build-system python-build-system)
7976 (home-page "https://github.com/ryanhiebert/backports.csv")
7977 (synopsis "Backport of Python 3's csv module for Python 2")
7978 (description
7979 "Provides a backport of Python 3's @code{csv} module for parsing
7980 comma separated values. The API of the @code{csv} module in Python 2
7981 is drastically different from the @code{csv} module in Python 3.
7982 This is due, for the most part, to the difference between str in
7983 Python 2 and Python 3.")
7984 (license license:psfl)))
7985
7986 (define-public python2-backports-csv
7987 (package-with-python2 python-backports-csv))
7988
7989 (define-public python2-backports-shutil-get-terminal-size
7990 (package
7991 (name "python2-backports-shutil-get-terminal-size")
7992 (version "1.0.0")
7993 (source
7994 (origin
7995 (method url-fetch)
7996 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7997 (sha256
7998 (base32
7999 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
8000 (build-system python-build-system)
8001 (arguments
8002 `(#:python ,python-2
8003 #:phases
8004 (modify-phases %standard-phases
8005 (replace 'check
8006 (lambda _
8007 (setenv "PYTHONPATH" (string-append "./build/lib:"
8008 (getenv "PYTHONPATH")))
8009 (invoke "py.test" "-v"))))))
8010 (native-inputs
8011 `(("python2-pytest" ,python2-pytest)))
8012 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8013 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8014 (description
8015 "This package provides a backport of the @code{get_terminal_size
8016 function} from Python 3.3's @code{shutil}.
8017 Unlike the original version it is written in pure Python rather than C,
8018 so it might be a tiny bit slower.")
8019 (license license:expat)))
8020
8021 (define-public python-waf
8022 (package
8023 (name "python-waf")
8024 (version "2.0.19")
8025 (source (origin
8026 (method url-fetch)
8027 (uri (string-append "https://waf.io/"
8028 "waf-" version ".tar.bz2"))
8029 (sha256
8030 (base32
8031 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8032 (build-system python-build-system)
8033 (arguments
8034 '(#:phases
8035 (modify-phases %standard-phases
8036 (replace 'build
8037 (lambda _
8038 ;; XXX: Find a way to add all extra tools.
8039 (let ((tools '("gccdeps"
8040 "clang_compilation_database")))
8041 (invoke "python" "waf-light" "configure" "build"
8042 (string-append "--tools="
8043 (string-join tools ","))))))
8044 (replace 'check
8045 (lambda _
8046 (invoke "python" "waf" "--version")))
8047 (replace 'install
8048 (lambda* (#:key outputs #:allow-other-keys)
8049 (let ((out (assoc-ref outputs "out")))
8050 (install-file "waf" (string-append out "/bin")))
8051 #t))
8052 ;; waf breaks when it is wrapped.
8053 (delete 'wrap))))
8054 (home-page "https://waf.io/")
8055 (synopsis "Python-based build system")
8056 (description
8057 "Waf is a Python-based framework for configuring, compiling and installing
8058 applications.")
8059 (license license:bsd-3)))
8060
8061 (define-public python2-waf
8062 (package-with-python2 python-waf))
8063
8064 (define-public python-pyzmq
8065 (package
8066 (name "python-pyzmq")
8067 (version "17.1.2")
8068 (source
8069 (origin
8070 (method url-fetch)
8071 (uri (pypi-uri "pyzmq" version))
8072 (sha256
8073 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8074 (build-system python-build-system)
8075 (arguments
8076 `(#:configure-flags
8077 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8078 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8079 ;; --inplace' for 'python setup.py test' to work.
8080 #:tests? #f))
8081 (inputs
8082 `(("zeromq" ,zeromq)))
8083 (native-inputs
8084 `(("pkg-config" ,pkg-config)
8085 ("python-nose" ,python-nose)))
8086 (home-page "https://github.com/zeromq/pyzmq")
8087 (synopsis "Python bindings for 0MQ")
8088 (description
8089 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8090 (license license:bsd-4)))
8091
8092 (define-public python2-pyzmq
8093 (package-with-python2 python-pyzmq))
8094
8095 (define-public python-pep8
8096 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8097 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8098 ;; some dependents' test suites, and nothing more.
8099 (package
8100 (name "python-pep8")
8101 (version "1.7.0")
8102 (source
8103 (origin
8104 (method url-fetch)
8105 (uri (pypi-uri "pep8" version))
8106 (sha256
8107 (base32
8108 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8109 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8110 (build-system python-build-system)
8111 (home-page "https://pep8.readthedocs.org/")
8112 (synopsis "Python style guide checker")
8113 (description
8114 "This tools checks Python code against some of the style conventions in
8115 PEP 8.")
8116 (license license:expat)))
8117
8118 (define-public python2-pep8
8119 (package-with-python2 python-pep8))
8120
8121 (define-public python-pep517
8122 (package
8123 (name "python-pep517")
8124 (version "0.8.2")
8125 (source
8126 (origin
8127 (method url-fetch)
8128 (uri (pypi-uri "pep517" version))
8129 (sha256
8130 (base32
8131 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8132 (build-system python-build-system)
8133 (arguments
8134 '(#:phases
8135 (modify-phases %standard-phases
8136 (replace 'check
8137 (lambda* (#:key tests? #:allow-other-keys)
8138 (delete-file "pytest.ini")
8139 ;; This test tries to connect to the internet
8140 (delete-file "tests/test_meta.py")
8141 (if tests?
8142 (invoke "pytest")
8143 #t))))))
8144 (native-inputs
8145 `(("python-mock" ,python-mock)
8146 ("python-pytest" ,python-pytest)
8147 ("python-testpath" ,python-testpath)))
8148 (propagated-inputs
8149 `(("python-toml" ,python-toml)
8150 ("python-wheel" ,python-wheel)))
8151 (home-page "https://github.com/pypa/pep517")
8152 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8153 (description
8154 "Wrappers to build Python packages using PEP 517 hooks.")
8155 (properties `((python2-variant . ,(delay python2-pep517))))
8156 (license license:expat)))
8157
8158 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8159 (define-public python2-pep517
8160 (let ((base (package-with-python2
8161 (strip-python2-variant python-pep517))))
8162 (package
8163 (inherit base)
8164 (name "python2-pep517")
8165 (arguments
8166 `(#:tests? #f
8167 ,@(package-arguments base)))
8168 (native-inputs `()))))
8169
8170 (define-public python-pyflakes
8171 (package
8172 (name "python-pyflakes")
8173 (version "2.2.0")
8174 (source
8175 (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "pyflakes" version))
8178 (sha256
8179 (base32
8180 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8181 (build-system python-build-system)
8182 (home-page
8183 "https://github.com/pyflakes/pyflakes")
8184 (synopsis "Passive checker of Python programs")
8185 (description
8186 "Pyflakes statically checks Python source code for common errors.")
8187 (license license:expat)))
8188
8189 (define-public python2-pyflakes
8190 (package-with-python2 python-pyflakes))
8191
8192 (define-public python-mccabe
8193 (package
8194 (name "python-mccabe")
8195 (version "0.6.1")
8196 (source
8197 (origin
8198 (method url-fetch)
8199 (uri (pypi-uri "mccabe" version))
8200 (sha256
8201 (base32
8202 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8203 (build-system python-build-system)
8204 (native-inputs
8205 `(("python-pytest" ,python-pytest-bootstrap)
8206 ("python-pytest-runner" ,python-pytest-runner)))
8207 (home-page "https://github.com/flintwork/mccabe")
8208 (synopsis "McCabe checker, plugin for flake8")
8209 (description
8210 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8211 complexity of Python source code.")
8212 (license license:expat)))
8213
8214 (define-public python2-mccabe
8215 (package-with-python2 python-mccabe))
8216
8217 (define-public python-flake8
8218 (package
8219 (name "python-flake8")
8220 (version "3.8.4")
8221 (source (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "flake8" version))
8224 (sha256
8225 (base32
8226 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8227 (build-system python-build-system)
8228 (arguments
8229 `(#:phases
8230 (modify-phases %standard-phases
8231 (delete 'check)
8232 (add-after 'install 'check
8233 (lambda* (#:key inputs outputs #:allow-other-keys)
8234 (add-installed-pythonpath inputs outputs)
8235 (invoke "pytest" "-v")
8236 #t)))))
8237 (propagated-inputs
8238 `(("python-pycodestyle" ,python-pycodestyle)
8239 ("python-entrypoints" ,python-entrypoints)
8240 ("python-pyflakes" ,python-pyflakes)
8241 ("python-mccabe" ,python-mccabe)))
8242 (native-inputs
8243 `(("python-mock" ,python-mock)
8244 ("python-pytest" ,python-pytest-bootstrap)))
8245 (home-page "https://gitlab.com/pycqa/flake8")
8246 (synopsis
8247 "The modular source code checker: pep8, pyflakes and co")
8248 (description
8249 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8250 (properties `((python2-variant . ,(delay python2-flake8))))
8251 (license license:expat)))
8252
8253 (define-public python2-flake8
8254 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8255 (package (inherit base)
8256 (propagated-inputs
8257 `(("python2-configparser" ,python2-configparser)
8258 ("python2-enum34" ,python2-enum34)
8259 ("python2-functools32" ,python2-functools32)
8260 ("python2-typing" ,python2-typing)
8261 ,@(package-propagated-inputs base))))))
8262
8263 (define-public python-flake8-bugbear
8264 (package
8265 (name "python-flake8-bugbear")
8266 (version "20.1.4")
8267 (source
8268 (origin
8269 (method url-fetch)
8270 (uri (pypi-uri "flake8-bugbear" version))
8271 (sha256
8272 (base32
8273 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8274 (build-system python-build-system)
8275 (arguments
8276 '(#:phases
8277 (modify-phases %standard-phases
8278 (add-before 'check 'disable-test
8279 (lambda _
8280 ;; This test fails on slow computers.
8281 (substitute* "tests/test_bugbear.py"
8282 (("def test_does_not_crash_on_any_valid_code")
8283 "def _test_does_not_crash_on_any_valid_code")))))))
8284 (native-inputs
8285 `(("python-hypothesis" ,python-hypothesis)
8286 ("python-hypothesmith" ,python-hypothesmith)))
8287 (propagated-inputs
8288 `(("python-attrs" ,python-attrs)
8289 ("python-flake8" ,python-flake8)))
8290 (home-page "https://github.com/PyCQA/flake8-bugbear")
8291 (synopsis
8292 "Flake8 plugin for finding likely bugs and design problems in your program")
8293 (description
8294 "This package contains a plugin for Flake8 finding likely bugs and
8295 design problems in your program. It contains warnings that don't belong
8296 in pyflakes and pycodestyle.")
8297 (license license:expat)))
8298
8299 (define-public python-flake8-polyfill
8300 (package
8301 (name "python-flake8-polyfill")
8302 (version "1.0.2")
8303 (source
8304 (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "flake8-polyfill" version))
8307 (sha256
8308 (base32
8309 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8310 (build-system python-build-system)
8311 (arguments
8312 '(#:phases
8313 (modify-phases %standard-phases
8314 (replace 'check
8315 (lambda _
8316 ;; Be compatible with Pytest 4:
8317 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8318 (substitute* "setup.cfg"
8319 (("\\[pytest\\]")
8320 "[tool:pytest]"))
8321
8322 (setenv "PYTHONPATH"
8323 (string-append (getcwd) "/build/lib:"
8324 (getenv "PYTHONPATH")))
8325 (invoke "py.test" "-v"))))))
8326 (native-inputs
8327 `(("python-flake8" ,python-flake8)
8328 ("python-mock" ,python-mock)
8329 ("python-pep8" ,python-pep8)
8330 ("python-pycodestyle" ,python-pycodestyle)
8331 ("python-pytest" ,python-pytest)))
8332 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8333 (synopsis "Polyfill package for Flake8 plugins")
8334 (description
8335 "This package that provides some compatibility helpers for Flake8
8336 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8337 (license license:expat)))
8338
8339 (define-public python2-flake8-polyfill
8340 (package-with-python2 python-flake8-polyfill))
8341
8342 (define-public python-flake8-pyi
8343 (package
8344 (name "python-flake8-pyi")
8345 (version "20.5.0")
8346 (source
8347 (origin
8348 (method url-fetch)
8349 (uri (pypi-uri "flake8-pyi" version))
8350 (sha256
8351 (base32
8352 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8353 (build-system python-build-system)
8354 (propagated-inputs
8355 `(("python-attrs" ,python-attrs)
8356 ("python-flake8" ,python-flake8)
8357 ("python-pyflakes" ,python-pyflakes)))
8358 (home-page "https://github.com/ambv/flake8-pyi")
8359 (synopsis
8360 "Flake8 plugin that provides specializations for type hinting stub files")
8361 (description
8362 "This package contains a plugin that provides specializations for
8363 type hinting stub files, especially interesting for linting typeshed. It
8364 adds the @file{.pyi} extension to the default value of the @code{--filename}
8365 command-line argument to Flake8. This means stubs are linted by default with
8366 this plugin enabled, without needing to explicitly list every file. It
8367 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8368 expressions after the entire file has been read. This enables support for
8369 first-class forward references that stub files use.")
8370 (license license:expat)))
8371
8372 (define-public python-flake8-pie
8373 (package
8374 (name "python-flake8-pie")
8375 (version "0.5.0")
8376 (source
8377 (origin
8378 (method url-fetch)
8379 (uri (pypi-uri "flake8-pie" version))
8380 (sha256
8381 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8382 (build-system python-build-system)
8383 (home-page "https://github.com/sbdchd/flake8-pie")
8384 (synopsis "Flake8 extension that implements lints")
8385 (description
8386 "This package provides a flake8 extension that implements miscellaneous
8387 lints.")
8388 (license license:bsd-2)))
8389
8390 (define-public python-autoflake
8391 (package
8392 (name "python-autoflake")
8393 (version "1.3.1")
8394 (source
8395 (origin
8396 (method url-fetch)
8397 (uri (pypi-uri "autoflake" version))
8398 (sha256
8399 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8400 (build-system python-build-system)
8401 (propagated-inputs
8402 `(("python-pyflakes" ,python-pyflakes)))
8403 (home-page "https://github.com/myint/autoflake")
8404 (synopsis "Removes unused imports and unused variables")
8405 (description
8406 "@code{autoflake} removes unused imports and unused variables from Python
8407 code as reported by @code{pyflakes}.
8408
8409 By default, it only removes unused imports for modules that are part of the
8410 standard library. Removal of unused variables is also disabled by default.
8411 It also removes useless @code{pass} statements.")
8412 (license license:expat)))
8413
8414 (define-public python-mistune
8415 (package
8416 (name "python-mistune")
8417 (version "0.8.4")
8418 (source
8419 (origin
8420 (method url-fetch)
8421 (uri (pypi-uri "mistune" version))
8422 (sha256
8423 (base32
8424 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8425 (build-system python-build-system)
8426 (native-inputs
8427 `(("python-nose" ,python-nose)
8428 ("python-cython" ,python-cython)))
8429 (home-page "https://github.com/lepture/mistune")
8430 (synopsis "Markdown parser in pure Python")
8431 (description "This package provides a fast markdown parser in pure
8432 Python.")
8433 (license license:bsd-3)))
8434
8435 (define-public python2-mistune
8436 (package-with-python2 python-mistune))
8437
8438 (define-public python-markdown
8439 (package
8440 (name "python-markdown")
8441 (version "3.2.1")
8442 (source
8443 (origin
8444 (method url-fetch)
8445 (uri (pypi-uri "Markdown" version))
8446 (sha256
8447 (base32
8448 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8449 (build-system python-build-system)
8450 (native-inputs
8451 `(("python-nose" ,python-nose)
8452 ("python-pyyaml" ,python-pyyaml)))
8453 (home-page "https://python-markdown.github.io/")
8454 (synopsis "Python implementation of Markdown")
8455 (description
8456 "This package provides a Python implementation of John Gruber's
8457 Markdown. The library features international input, various Markdown
8458 extensions, and several HTML output formats. A command line wrapper
8459 markdown_py is also provided to convert Markdown files to HTML.")
8460 (properties `((python2-variant . ,(delay python2-markdown))))
8461 (license license:bsd-3)))
8462
8463 ;; Markdown 3.2 dropped support for Python 2.
8464 (define-public python2-markdown
8465 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8466 (package/inherit
8467 base
8468 (version "3.1.1")
8469 (source (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "Markdown" version))
8472 (sha256
8473 (base32
8474 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8475
8476 (define-public python-ptyprocess
8477 (package
8478 (name "python-ptyprocess")
8479 (version "0.5.2")
8480 (source
8481 (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "ptyprocess" version))
8484 (sha256
8485 (base32
8486 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8487 (build-system python-build-system)
8488 (native-inputs
8489 `(("python-nose" ,python-nose)))
8490 (arguments
8491 `(#:phases
8492 (modify-phases %standard-phases
8493 (replace 'check
8494 (lambda _ (invoke "nosetests"))))))
8495 (home-page "https://github.com/pexpect/ptyprocess")
8496 (synopsis "Run a subprocess in a pseudo terminal")
8497 (description
8498 "This package provides a Python library used to launch a subprocess in a
8499 pseudo terminal (pty), and interact with both the process and its pty.")
8500 (license license:isc)))
8501
8502 (define-public python2-ptyprocess
8503 (package-with-python2 python-ptyprocess))
8504
8505 (define-public python-cram
8506 (package
8507 (name "python-cram")
8508 (version "0.7")
8509 (home-page "https://bitheap.org/cram/")
8510 (source (origin
8511 (method url-fetch)
8512 (uri (list (string-append home-page "cram-"
8513 version ".tar.gz")
8514 (pypi-uri "cram" version)))
8515 (sha256
8516 (base32
8517 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8518 (arguments
8519 '(#:phases
8520 (modify-phases %standard-phases
8521 (add-after 'unpack 'patch-source
8522 (lambda _
8523 (substitute* (find-files "cram" ".*\\.py$")
8524 ;; Replace default shell path.
8525 (("/bin/sh") (which "sh")))
8526 (substitute* (find-files "tests" ".*\\.t$")
8527 (("md5") "md5sum")
8528 (("/bin/bash") (which "bash"))
8529 (("/bin/sh") (which "sh")))
8530 (substitute* "cram/_test.py"
8531 ;; This hack works around a bug triggered by substituting
8532 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8533 ;; "cram -h", which breaks the output at 80 characters. This
8534 ;; causes the line showing the default shell to break into two
8535 ;; lines, but the test expects a single line...
8536 (("env\\['COLUMNS'\\] = '80'")
8537 "env['COLUMNS'] = '160'"))
8538
8539 (substitute* "Makefile"
8540 ;; Recent versions of python-coverage have caused the test
8541 ;; coverage to decrease (as of version 0.7). Allow that.
8542 (("--fail-under=100")
8543 "--fail-under=90"))
8544
8545 #t))
8546 (replace 'check
8547 ;; The test phase uses the built library and executable.
8548 (lambda* (#:key inputs outputs #:allow-other-keys)
8549 (add-installed-pythonpath inputs outputs)
8550 (setenv "PATH" (string-append (getenv "PATH") ":"
8551 (assoc-ref outputs "out") "/bin"))
8552 (invoke "make" "test"))))))
8553 (build-system python-build-system)
8554 (native-inputs
8555 `(("python-coverage" ,python-coverage)
8556 ("which" ,which)))
8557 (synopsis "Simple testing framework for command line applications")
8558 (description
8559 "Cram is a functional testing framework for command line applications.
8560 Cram tests look like snippets of interactive shell sessions. Cram runs each
8561 command and compares the command output in the test with the command’s actual
8562 output.")
8563 (license license:gpl2+)))
8564
8565 (define-public python2-cram
8566 (package-with-python2 python-cram))
8567
8568 (define-public python-crashtest
8569 (package
8570 (name "python-crashtest")
8571 (version "0.3.1")
8572 (source
8573 (origin
8574 (method url-fetch)
8575 (uri (pypi-uri "crashtest" version))
8576 (sha256
8577 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8578 (build-system python-build-system)
8579 (home-page "https://github.com/sdispater/crashtest")
8580 (synopsis "Manage Python errors with ease")
8581 (description
8582 "Python library that makes exceptions handling and inspection easier.")
8583 (license license:expat)))
8584
8585 (define-public python-straight-plugin
8586 (package
8587 (name "python-straight-plugin")
8588 (version "1.4.1")
8589 (source
8590 (origin
8591 (method url-fetch)
8592 (uri (pypi-uri "straight.plugin" version))
8593 (sha256
8594 (base32
8595 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8596 (build-system python-build-system)
8597 (home-page "https://github.com/ironfroggy/straight.plugin")
8598 (synopsis "Simple namespaced plugin facility")
8599 (description "Straight Plugin provides a type of plugin you can create from
8600 almost any existing Python modules, and an easy way for outside developers to
8601 add functionality and customization to your projects with their own plugins.")
8602 (license license:expat)))
8603
8604 (define-public python2-straight-plugin
8605 (package-with-python2 python-straight-plugin))
8606
8607 (define-public python-fonttools
8608 (package
8609 (name "python-fonttools")
8610 (version "4.6.0")
8611 (source (origin
8612 (method url-fetch)
8613 (uri (pypi-uri "fonttools" version ".zip"))
8614 (sha256
8615 (base32
8616 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8617 (build-system python-build-system)
8618 (native-inputs
8619 `(("unzip" ,unzip)
8620 ("python-pytest" ,python-pytest)
8621 ("python-pytest-runner" ,python-pytest-runner)))
8622 (home-page "https://github.com/fonttools/fonttools")
8623 (synopsis "Tools to manipulate font files")
8624 (description
8625 "FontTools/TTX is a library to manipulate font files from Python. It
8626 supports reading and writing of TrueType/OpenType fonts, reading and writing
8627 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8628 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8629 from an XML-based format.")
8630 (license license:expat)))
8631
8632 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8633 (define-public python2-fonttools
8634 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8635 (package/inherit
8636 base
8637 (version "3.44.0")
8638 (source (origin
8639 (method url-fetch)
8640 (uri (pypi-uri "fonttools" version ".zip"))
8641 (sha256
8642 (base32
8643 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8644
8645 (define-public python-ly
8646 (package
8647 (name "python-ly")
8648 (version "0.9.5")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (pypi-uri name version))
8653 (sha256
8654 (base32
8655 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8656 (build-system python-build-system)
8657 (arguments
8658 ;; FIXME: Some tests need network access.
8659 '(#:tests? #f))
8660 (synopsis "Tool and library for manipulating LilyPond files")
8661 (description "This package provides a Python library to parse, manipulate
8662 or create documents in LilyPond format. A command line program ly is also
8663 provided that can be used to do various manipulations with LilyPond files.")
8664 (home-page "https://pypi.org/project/python-ly/")
8665 (license license:gpl2+)))
8666
8667 (define-public python-appdirs
8668 (package
8669 (name "python-appdirs")
8670 (version "1.4.3")
8671 (source
8672 (origin
8673 (method url-fetch)
8674 (uri (pypi-uri "appdirs" version))
8675 (sha256
8676 (base32
8677 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8678 (build-system python-build-system)
8679 (home-page "https://github.com/ActiveState/appdirs")
8680 (synopsis
8681 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8682 (description
8683 "This module provides a portable way of finding out where user data
8684 should be stored on various operating systems.")
8685 (license license:expat)))
8686
8687 (define-public python2-appdirs
8688 (package-with-python2 python-appdirs))
8689
8690 (define-public python-gorilla
8691 (package
8692 (name "python-gorilla")
8693 (version "0.3.0")
8694 (source (origin
8695 (method url-fetch)
8696 (uri (pypi-uri "gorilla" version))
8697 (sha256
8698 (base32
8699 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8700 (build-system python-build-system)
8701 (home-page "https://github.com/christophercrouzet/gorilla")
8702 (synopsis "Convenient monkey patching with Python")
8703 (description
8704 "Gorilla is a Python library that provides a convenient approach to
8705 monkey patching. Monkey patching is the process of modifying module and
8706 class attributes at runtime with the purpose of replacing or extending
8707 third-party code.")
8708 (license license:expat)))
8709
8710 (define-public python-llfuse
8711 (package
8712 (name "python-llfuse")
8713 (version "1.3.6")
8714 (source (origin
8715 (method url-fetch)
8716 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8717 (sha256
8718 (base32
8719 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8720 (build-system python-build-system)
8721 (inputs
8722 `(("fuse" ,fuse)
8723 ("attr" ,attr)))
8724 (native-inputs
8725 `(("pkg-config" ,pkg-config)))
8726 (synopsis "Python bindings for FUSE")
8727 (description
8728 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8729 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8730 (license license:lgpl2.0+)
8731 (properties `((python2-variant . ,(delay python2-llfuse))))))
8732
8733 (define-public python2-llfuse
8734 (package (inherit (package-with-python2
8735 (strip-python2-variant python-llfuse)))
8736 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8737
8738 ;; For attic-0.16
8739 (define-public python-llfuse-0.41
8740 (package (inherit python-llfuse)
8741 (version "0.41.1")
8742 (source (origin
8743 (method url-fetch)
8744 (uri (string-append
8745 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8746 "llfuse-" version ".tar.bz2"))
8747 (sha256
8748 (base32
8749 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8750 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8751 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8752 (license (list license:expat license:lgpl2.0+))))
8753
8754 (define-public python-msgpack
8755 (package
8756 (name "python-msgpack")
8757 (version "1.0.0")
8758 (source (origin
8759 (method url-fetch)
8760 (uri (pypi-uri "msgpack" version))
8761 (sha256
8762 (base32
8763 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8764 (build-system python-build-system)
8765 (arguments
8766 `(#:modules ((guix build utils)
8767 (guix build python-build-system)
8768 (ice-9 ftw)
8769 (srfi srfi-1)
8770 (srfi srfi-26))
8771 #:phases
8772 (modify-phases %standard-phases
8773 (replace 'check
8774 (lambda _
8775 (let ((cwd (getcwd)))
8776 (setenv "PYTHONPATH"
8777 (string-append cwd "/build/"
8778 (find (cut string-prefix? "lib" <>)
8779 (scandir (string-append cwd "/build")))
8780 ":"
8781 (getenv "PYTHONPATH")))
8782 (invoke "pytest" "-v" "test")))))))
8783 (native-inputs
8784 `(("python-pytest" ,python-pytest)))
8785 (synopsis "MessagePack (de)serializer")
8786 (description "MessagePack is a fast, compact binary serialization format,
8787 suitable for similar data to JSON. This package provides CPython bindings for
8788 reading and writing MessagePack data.")
8789 (home-page "https://pypi.org/project/msgpack/")
8790 (license license:asl2.0)))
8791
8792 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8793 ;; release 0.5. Some packages like borg still call it by the old name for now.
8794 ;; <https://bugs.gnu.org/30662>
8795 (define-public python-msgpack-transitional
8796 (package
8797 (inherit python-msgpack)
8798 (name "python-msgpack-transitional")
8799 (version "0.5.6")
8800 (source (origin
8801 (method url-fetch)
8802 (uri (pypi-uri "msgpack" version))
8803 (sha256
8804 (base32
8805 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8806 (arguments
8807 (substitute-keyword-arguments (package-arguments python-msgpack)
8808 ((#:phases phases)
8809 `(modify-phases ,phases
8810 (add-after 'unpack 'configure-transitional
8811 (lambda _
8812 ;; Keep using the old name.
8813 (substitute* "setup.py"
8814 (("TRANSITIONAL = False")
8815 "TRANSITIONAL = 1"))
8816 #t))))))))
8817
8818 (define-public python2-msgpack
8819 (package-with-python2 python-msgpack))
8820
8821 (define-public python-netaddr
8822 (package
8823 (name "python-netaddr")
8824 (version "0.7.19")
8825 (source
8826 (origin
8827 (method url-fetch)
8828 (uri (pypi-uri "netaddr" version))
8829 (sha256
8830 (base32
8831 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8832 (build-system python-build-system)
8833 (arguments `(#:tests? #f)) ;; No tests.
8834 (home-page "https://github.com/drkjam/netaddr/")
8835 (synopsis "Pythonic manipulation of network addresses")
8836 (description
8837 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8838 and MAC network addresses.")
8839 (license license:bsd-3)))
8840
8841 (define-public python2-netaddr
8842 (package-with-python2 python-netaddr))
8843
8844 (define-public python2-pyroute2
8845 (package
8846 (name "python2-pyroute2")
8847 (version "0.5.6")
8848 (source
8849 (origin
8850 (method url-fetch)
8851 (uri (pypi-uri "pyroute2" version))
8852 (sha256
8853 (base32
8854 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8855 (build-system python-build-system)
8856 (arguments
8857 `(#:python ,python-2)) ;Python 3.x is not supported
8858 (home-page "https://github.com/svinota/pyroute2")
8859 (synopsis "Python netlink library")
8860 (description
8861 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8862 Supported netlink families and protocols include:
8863 @itemize
8864 @item rtnl, network settings - addresses, routes, traffic controls
8865 @item nfnetlink - netfilter API: ipset, nftables, ...
8866 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8867 @item devlink - manage and monitor devlink-enabled hardware
8868 @item generic - generic netlink families
8869 @itemize
8870 @item nl80211 - wireless functions API (basic support)
8871 @item taskstats - extended process statistics
8872 @item acpi_events - ACPI events monitoring
8873 @item thermal_events - thermal events monitoring
8874 @item VFS_DQUOT - disk quota events monitoring
8875 @end itemize
8876 @end itemize")
8877 (license license:gpl2+)))
8878
8879 (define-public python-wrapt
8880 (package
8881 (name "python-wrapt")
8882 (version "1.11.2")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "wrapt" version))
8887 (sha256
8888 (base32
8889 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8890 (build-system python-build-system)
8891 (arguments
8892 ;; Tests are not included in the tarball, they are only available in the
8893 ;; git repository.
8894 `(#:tests? #f))
8895 (home-page "https://github.com/GrahamDumpleton/wrapt")
8896 (synopsis "Module for decorators, wrappers and monkey patching")
8897 (description
8898 "The aim of the wrapt module is to provide a transparent object proxy for
8899 Python, which can be used as the basis for the construction of function
8900 wrappers and decorator functions.")
8901 (license license:bsd-2)))
8902
8903 (define-public python2-wrapt
8904 (package-with-python2 python-wrapt))
8905
8906 (define-public python-xlrd
8907 (package
8908 (name "python-xlrd")
8909 (version "1.2.0")
8910 (source (origin
8911 (method url-fetch)
8912 (uri (pypi-uri "xlrd" version))
8913 (sha256
8914 (base32
8915 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8916 (build-system python-build-system)
8917 (arguments
8918 `(#:phases
8919 (modify-phases %standard-phases
8920 ;; Some tests depend on writing a temporary file to the user's home
8921 ;; directory.
8922 (add-after 'unpack 'fix-tests
8923 (lambda _
8924 (delete-file "tests/test_open_workbook.py")
8925 #t)))))
8926 (home-page "http://www.python-excel.org/")
8927 (synopsis "Library for extracting data from Excel files")
8928 (description "This package provides a library to extract data from
8929 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8930 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8931 Unicode-aware. It is not intended as an end-user tool.")
8932 (license license:bsd-3)))
8933
8934 (define-public python2-xlrd
8935 (package-with-python2 python-xlrd))
8936
8937 (define-public python-immutables
8938 (package
8939 (name "python-immutables")
8940 (version "0.14")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (pypi-uri "immutables" version))
8945 (sha256
8946 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8947 (build-system python-build-system)
8948 (home-page "https://github.com/MagicStack/immutables")
8949 (synopsis "High-performance immutable mapping type for Python")
8950 (description
8951 "An immutable mapping type for Python. The underlying datastructure is a
8952 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8953 functional languages.")
8954 (license license:asl2.0)))
8955
8956 (define-public python-prettytable
8957 (package
8958 (name "python-prettytable")
8959 (version "0.7.2")
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8964 (sha256
8965 (base32
8966 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8967 (build-system python-build-system)
8968 (home-page "https://code.google.com/archive/p/prettytable/")
8969 (synopsis "Display tabular data in an ASCII table format")
8970 (description
8971 "A library designed to represent tabular data in visually appealing ASCII
8972 tables. PrettyTable allows for selection of which columns are to be printed,
8973 independent alignment of columns (left or right justified or centred) and
8974 printing of sub-tables by specifying a row range.")
8975 (license license:bsd-3)))
8976
8977 (define-public python2-prettytable
8978 (package-with-python2 python-prettytable))
8979
8980 (define-public python-curio
8981 (package
8982 (name "python-curio")
8983 (version "1.2")
8984 (source
8985 (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "curio" version))
8988 (sha256
8989 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
8990 (build-system python-build-system)
8991 (arguments
8992 `(#:phases
8993 (modify-phases %standard-phases
8994 (replace 'check
8995 (lambda* (#:key inputs outputs #:allow-other-keys)
8996 (add-installed-pythonpath inputs outputs)
8997 (invoke "pytest" "-vv" "-k"
8998 ;; Tries to open an outgoing connection.
8999 "not test_ssl_outgoing"))))))
9000 (native-inputs
9001 `(("python-pytest" ,python-pytest)))
9002 (home-page "https://github.com/dabeaz/curio")
9003 (synopsis "Coroutine-based library for concurrent Python")
9004 (description
9005 "Curio is a coroutine-based library for concurrent Python systems
9006 programming. It provides standard programming abstractions such as as
9007 tasks, sockets, files, locks, and queues.")
9008 (license license:bsd-3)))
9009
9010 (define-public python-tables
9011 (package
9012 (name "python-tables")
9013 (version "3.6.1")
9014 (source
9015 (origin
9016 (method url-fetch)
9017 (uri (pypi-uri "tables" version))
9018 (sha256
9019 (base32
9020 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9021 (modules '((guix build utils)))
9022 (snippet
9023 '(begin
9024 ;; Remove pre-compiled .pyc files from source.
9025 (for-each delete-file-recursively
9026 (find-files "." "__pycache__" #:directories? #t))
9027 (for-each delete-file (find-files "." "\\.pyc$"))
9028 #t))))
9029 (build-system python-build-system)
9030 (arguments
9031 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9032 ;; or "check", so we must override the build and check phases.
9033 #:phases
9034 (modify-phases %standard-phases
9035 (add-after 'unpack 'use-gcc
9036 (lambda _
9037 (substitute* "setup.py"
9038 (("^( +)compiler = new_compiler\\(\\)" line indent)
9039 (string-append line
9040 "\n"
9041 indent
9042 "compiler.set_executables(compiler='gcc',"
9043 "compiler_so='gcc',"
9044 "linker_exe='gcc',"
9045 "linker_so='gcc -shared')")))
9046 #t))
9047 (add-after 'unpack 'disable-tuning
9048 (lambda _
9049 (substitute* "setup.py"
9050 (("cpu_flags = .*")
9051 "cpu_flags = ['sse2']\n"))
9052 #t))
9053 (replace 'build
9054 (lambda* (#:key inputs #:allow-other-keys)
9055 (invoke "python" "setup.py" "build"
9056 (string-append "--hdf5="
9057 (assoc-ref inputs "hdf5")))))
9058 (replace 'check
9059 (lambda* (#:key inputs #:allow-other-keys)
9060 (invoke "python" "setup.py" "check"
9061 (string-append "--hdf5="
9062 (assoc-ref inputs "hdf5"))))))))
9063 (propagated-inputs
9064 `(("python-numexpr" ,python-numexpr)
9065 ("python-numpy" ,python-numpy)))
9066 (native-inputs
9067 `(("python-cython" ,python-cython)
9068 ("pkg-config" ,pkg-config)))
9069 (inputs
9070 `(("hdf5" ,hdf5-1.10)
9071 ("bzip2" ,bzip2)
9072 ("zlib" ,zlib)))
9073 (home-page "https://www.pytables.org/")
9074 (synopsis "Hierarchical datasets for Python")
9075 (description "PyTables is a package for managing hierarchical datasets and
9076 designed to efficiently cope with extremely large amounts of data.")
9077 (license license:bsd-3)))
9078
9079 (define-public python2-tables
9080 (package-with-python2 python-tables))
9081
9082 (define-public python-sniffio
9083 (package
9084 (name "python-sniffio")
9085 (version "1.1.0")
9086 (source
9087 (origin
9088 (method url-fetch)
9089 (uri (pypi-uri "sniffio" version))
9090 (sha256
9091 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9092 (build-system python-build-system)
9093 (arguments
9094 `(#:phases
9095 (modify-phases %standard-phases
9096 (replace 'check
9097 (lambda _
9098 (invoke "pytest" "-vv"))))))
9099 (native-inputs
9100 `(("python-curio" ,python-curio)
9101 ("python-pytest" ,python-pytest)
9102 ("python-pytest-cov" ,python-pytest-cov)))
9103 (home-page "https://github.com/python-trio/sniffio")
9104 (synopsis "Detect which async library a program is running under")
9105 (description "This package detects which async library a program is
9106 running under. It supports multiple async I/O packages, like Trio, and
9107 asyncio.")
9108 ;; Either license applies.
9109 (license (list license:expat license:asl2.0))))
9110
9111 (define-public python-pytest-black
9112 (package
9113 (name "python-pytest-black")
9114 (version "0.3.8")
9115 (source
9116 (origin
9117 (method url-fetch)
9118 (uri (pypi-uri "pytest-black" version))
9119 (sha256
9120 (base32
9121 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9122 (build-system python-build-system)
9123 (propagated-inputs
9124 `(("python-pytest" ,python-pytest)
9125 ("python-black" ,python-black)
9126 ("python-toml" ,python-toml)))
9127 (native-inputs
9128 `(("python-setuptools-scm" ,python-setuptools-scm)))
9129 (home-page "https://github.com/shopkeep/pytest-black")
9130 (synopsis "Pytest plugin to enable format checking with black")
9131 (description
9132 "This package provides a pytest plugin to enable format checking with the
9133 Python code formatter \"black\".")
9134 (license license:expat)))
9135
9136 (define-public python-get-version
9137 (package
9138 (name "python-get-version")
9139 (version "2.1")
9140 (source
9141 (origin
9142 (method url-fetch)
9143 (uri (pypi-uri "get_version" version))
9144 (sha256
9145 (base32
9146 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9147 (build-system python-build-system)
9148 (propagated-inputs
9149 `(("python-pygments" ,python-pygments)
9150 ("python-pytest" ,python-pytest)
9151 ("python-pytest-black" ,python-pytest-black)
9152 ("python-pytest-cov" ,python-pytest-cov)
9153 ("python-setuptools" ,python-setuptools)
9154 ("python-testpath" ,python-testpath)))
9155 (home-page "https://github.com/flying-sheep/get_version")
9156 (synopsis "Version helper in the spirit of versioneer")
9157 (description
9158 "This package provides a version helper that lets you automatically use
9159 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9160 also supports getting the version from Python source distributions or, once
9161 your package is installed, via @code{pkg_resources} (part of
9162 @code{setuptools}).")
9163 (license license:gpl3+)))
9164
9165 (define-public python-legacy-api-wrap
9166 (package
9167 (name "python-legacy-api-wrap")
9168 (version "1.2")
9169 (source
9170 (origin
9171 (method url-fetch)
9172 (uri (pypi-uri "legacy-api-wrap" version))
9173 (sha256
9174 (base32
9175 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9176 (build-system python-build-system)
9177 (propagated-inputs
9178 `(("python-get-version" ,python-get-version)
9179 ("python-pytest" ,python-pytest)
9180 ("python-pytest-black" ,python-pytest-black)
9181 ("python-pytest-cov" ,python-pytest-cov)
9182 ("python-setuptools" ,python-setuptools)))
9183 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9184 (synopsis "Legacy API wrapper")
9185 (description "This module defines a decorator to wrap legacy APIs. The
9186 primary use case is APIs defined before keyword-only parameters existed.")
9187 (license license:gpl3+)))
9188
9189 (define-public python-pyasn1
9190 (package
9191 (name "python-pyasn1")
9192 (version "0.4.8")
9193 (source
9194 (origin
9195 (method url-fetch)
9196 (uri (pypi-uri "pyasn1" version))
9197 (sha256
9198 (base32
9199 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9200 (build-system python-build-system)
9201 (home-page "http://pyasn1.sourceforge.net/")
9202 (synopsis "ASN.1 types and codecs")
9203 (description
9204 "This is an implementation of ASN.1 types and codecs in Python. It is
9205 suitable for a wide range of protocols based on the ASN.1 specification.")
9206 (license license:bsd-2)))
9207
9208 (define-public python2-pyasn1
9209 (package-with-python2 python-pyasn1))
9210
9211 (define-public python-pyasn1-modules
9212 (package
9213 (name "python-pyasn1-modules")
9214 (version "0.2.2")
9215 (source
9216 (origin
9217 (method url-fetch)
9218 (uri (pypi-uri "pyasn1-modules" version))
9219 (sha256
9220 (base32
9221 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9222 (build-system python-build-system)
9223 (propagated-inputs
9224 `(("python-pyasn1" ,python-pyasn1)))
9225 (home-page "https://sourceforge.net/projects/pyasn1/")
9226 (synopsis "ASN.1 codec implementations")
9227 (description
9228 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9229 implementations of ASN.1-based codecs and protocols.")
9230 (license license:bsd-3)))
9231
9232 (define-public python2-pyasn1-modules
9233 (package-with-python2 python-pyasn1-modules))
9234
9235 (define-public python-ipaddress
9236 (package
9237 (name "python-ipaddress")
9238 (version "1.0.22")
9239 (source (origin
9240 (method url-fetch)
9241 (uri (pypi-uri "ipaddress" version))
9242 (sha256
9243 (base32
9244 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9245 (build-system python-build-system)
9246 (home-page "https://github.com/phihag/ipaddress")
9247 (synopsis "IP address manipulation library")
9248 (description
9249 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9250 in Python. This library is used to create, poke at, and manipulate IPv4 and
9251 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9252 module to older versions of Python.")
9253 (license license:psfl)))
9254
9255 (define-public python2-ipaddress
9256 (package-with-python2 python-ipaddress))
9257
9258 (define-public python2-ipaddr
9259 (package
9260 (name "python2-ipaddr")
9261 (version "2.1.11")
9262 (source
9263 (origin
9264 (method url-fetch)
9265 (uri (pypi-uri "ipaddr" version))
9266 (sha256
9267 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9268 (build-system python-build-system)
9269 (arguments
9270 `(#:python ,python-2 ;version 2 only
9271 #:phases
9272 (modify-phases %standard-phases
9273 (replace 'check
9274 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9275 (home-page "https://github.com/google/ipaddr-py")
9276 (synopsis "IP address manipulation library")
9277 (description
9278 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9279 IPv6 addresses and networks.
9280
9281 For new implementations you may prefer to use the standard module
9282 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9283 versions of Python.")
9284 (license license:asl2.0)))
9285
9286 (define-public python-idna
9287 (package
9288 (name "python-idna")
9289 (version "2.10")
9290 (source
9291 (origin
9292 (method url-fetch)
9293 (uri (pypi-uri "idna" version))
9294 (sha256
9295 (base32
9296 "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
9297 (build-system python-build-system)
9298 (home-page "https://github.com/kjd/idna")
9299 (synopsis "Internationalized domain names in applications")
9300 (description
9301 "This is a library to support the Internationalised Domain Names in
9302 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9303 protocol is often referred to as “IDNA2008” and can produce different results
9304 from the earlier standard from 2003. The library is also intended to act as a
9305 suitable drop-in replacement for the “encodings.idna” module that comes with
9306 the Python standard library but currently only supports the older 2003
9307 specification.")
9308 (license license:bsd-4)))
9309
9310 (define-public python-idna-2.7
9311 (package (inherit python-idna)
9312 (version "2.7")
9313 (source (origin
9314 (method url-fetch)
9315 (uri (pypi-uri "idna" version))
9316 (sha256
9317 (base32
9318 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9319
9320
9321 (define-public python2-idna
9322 (package-with-python2 python-idna))
9323
9324 (define-public python-libsass
9325 (package
9326 (name "python-libsass")
9327 (version "0.20.1")
9328 (source
9329 (origin
9330 ;; PyPI tarball is missing some test files.
9331 (method git-fetch)
9332 (uri (git-reference
9333 (url "https://github.com/sass/libsass-python")
9334 (commit version)))
9335 (file-name (git-file-name name version))
9336 (sha256
9337 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9338 (build-system python-build-system)
9339 (arguments
9340 `(#:phases
9341 (modify-phases %standard-phases
9342 ;; Use Guix package of libsass instead of compiling from a checkout.
9343 (add-before 'build 'set-libsass
9344 (lambda _
9345 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9346 #t))
9347 (replace 'check
9348 (lambda* (#:key inputs outputs #:allow-other-keys)
9349 (add-installed-pythonpath inputs outputs)
9350 (invoke "pytest" "sasstests.py"))))))
9351 (native-inputs
9352 `(("python-pytest" ,python-pytest)
9353 ("python-werkzeug" ,python-werkzeug)))
9354 (inputs
9355 `(("libsass" ,libsass)))
9356 (propagated-inputs
9357 `(("python-six" ,python-six)))
9358 (home-page "https://sass.github.io/libsass-python/")
9359 (synopsis "Straightforward binding of libsass for Python")
9360 (description
9361 "This package provides a simple Python extension module @code{sass} which
9362 is binding LibSass.")
9363 (license license:expat)))
9364
9365 (define-public python-idna-ssl
9366 (package
9367 (name "python-idna-ssl")
9368 (version "1.0.1")
9369 (source
9370 (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "idna-ssl" version))
9373 (sha256
9374 (base32
9375 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9376 (build-system python-build-system)
9377 (arguments
9378 `(#:tests? #f)) ;circular dependency with python-aiohttp
9379 (home-page "https://github.com/aio-libs/idna-ssl")
9380 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9381 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9382 domains support.")
9383 (license license:expat)))
9384
9385 (define-public python-pretend
9386 (package
9387 (name "python-pretend")
9388 (version "1.0.9")
9389 (source
9390 (origin
9391 (method url-fetch)
9392 (uri (pypi-uri "pretend" version))
9393 (sha256
9394 (base32
9395 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9396 (build-system python-build-system)
9397 (home-page "https://github.com/alex/pretend")
9398 (synopsis "Library for stubbing in Python")
9399 (description
9400 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9401 technique for writing tests. You may hear the term mixed up with mocks,
9402 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9403 responses, rather than doing any computation.")
9404 (license license:bsd-3)))
9405
9406 (define-public python2-pretend
9407 (package-with-python2 python-pretend))
9408
9409 (define-public python-pip
9410 (package
9411 (name "python-pip")
9412 (version "20.0.2")
9413 (source
9414 (origin
9415 (method url-fetch)
9416 (uri (pypi-uri "pip" version))
9417 (sha256
9418 (base32
9419 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9420 (build-system python-build-system)
9421 (arguments
9422 '(#:tests? #f)) ; there are no tests in the pypi archive.
9423 (home-page "https://pip.pypa.io/")
9424 (synopsis "Package manager for Python software")
9425 (description
9426 "Pip is a package manager for Python software, that finds packages on the
9427 Python Package Index (PyPI).")
9428 (license license:expat)))
9429
9430 (define-public python2-pip
9431 (package-with-python2 python-pip))
9432
9433 (define-public python-tlsh
9434 (package
9435 (name "python-tlsh")
9436 (version "3.4.5")
9437 (home-page "https://github.com/trendmicro/tlsh")
9438 (source
9439 (origin
9440 (method git-fetch)
9441 (uri (git-reference
9442 (url "https://github.com/trendmicro/tlsh")
9443 (commit (string-append "v" version))))
9444 (file-name (git-file-name name version))
9445 (sha256
9446 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9447 (build-system cmake-build-system)
9448 (arguments
9449 '(#:out-of-source? #f
9450 #:phases (modify-phases %standard-phases
9451 (replace
9452 'install
9453 (lambda* (#:key outputs #:allow-other-keys)
9454 ;; Build and install the Python bindings. The underlying
9455 ;; C++ library is apparently not meant to be installed.
9456 (let ((out (assoc-ref outputs "out")))
9457 (with-directory-excursion "py_ext"
9458 (and (system* "python" "setup.py" "build")
9459 (system* "python" "setup.py" "install"
9460 (string-append "--prefix=" out))))))))))
9461 (inputs `(("python" ,python-wrapper))) ;for the bindings
9462 (synopsis "Fuzzy matching library for Python")
9463 (description
9464 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9465 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9466 value which can be used for similarity comparisons. Similar objects have
9467 similar hash values, which allows for the detection of similar objects by
9468 comparing their hash values. The byte stream should have a sufficient amount
9469 of complexity; for example, a byte stream of identical bytes will not generate
9470 a hash value.")
9471 (license license:asl2.0)))
9472
9473 (define-public python2-tlsh
9474 (package
9475 (inherit python-tlsh)
9476 (name "python2-tlsh")
9477 (inputs `(("python" ,python-2)))))
9478
9479 (define-public python-termcolor
9480 (package
9481 (name "python-termcolor")
9482 (version "1.1.0")
9483 (source
9484 (origin
9485 (method url-fetch)
9486 (uri (pypi-uri "termcolor" version))
9487 (sha256
9488 (base32
9489 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9490 (build-system python-build-system)
9491 (arguments
9492 ;; There are no tests.
9493 `(#:tests? #f))
9494 (home-page "https://pypi.org/project/termcolor/")
9495 (synopsis "ANSII Color formatting for terminal output")
9496 (description
9497 "This package provides ANSII Color formatting for output in terminals.")
9498 (license license:expat)))
9499
9500 (define-public python2-termcolor
9501 (package-with-python2 python-termcolor))
9502
9503 (define-public python-terminaltables
9504 (package
9505 (name "python-terminaltables")
9506 (version "3.1.0")
9507 (source
9508 (origin
9509 (method url-fetch)
9510 (uri (pypi-uri "terminaltables" version))
9511 (sha256
9512 (base32
9513 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9514 (build-system python-build-system)
9515 (home-page "https://github.com/Robpol86/terminaltables")
9516 (synopsis
9517 "Generate simple tables in terminals from a nested list of strings")
9518 (description
9519 "This package makes it easy to draw tables in terminal/console
9520 applications from a list of lists of strings. It supports multi-line rows.")
9521 (license license:expat)))
9522
9523 (define-public python-libarchive-c
9524 (package
9525 (name "python-libarchive-c")
9526 (version "2.9")
9527 (source (origin
9528 (method url-fetch)
9529 (uri (pypi-uri "libarchive-c" version))
9530 (sha256
9531 (base32
9532 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9533 (build-system python-build-system)
9534 (arguments
9535 '(#:phases (modify-phases %standard-phases
9536 (add-before
9537 'build 'reference-libarchive
9538 (lambda* (#:key inputs #:allow-other-keys)
9539 ;; Retain the absolute file name of libarchive.so.
9540 (let ((libarchive (assoc-ref inputs "libarchive")))
9541 (substitute* "libarchive/ffi.py"
9542 (("find_library\\('archive'\\)")
9543 (string-append "'" libarchive
9544 "/lib/libarchive.so'"))))))
9545 (replace 'check
9546 (lambda _ (invoke "pytest" "-vv"))))))
9547 (native-inputs
9548 `(("python-mock" ,python-mock)
9549 ("python-pytest" ,python-pytest)))
9550 (inputs
9551 `(("libarchive" ,libarchive)))
9552 (home-page "https://github.com/Changaco/python-libarchive-c")
9553 (synopsis "Python interface to libarchive")
9554 (description
9555 "This package provides Python bindings to libarchive, a C library to
9556 access possibly compressed archives in many different formats. It uses
9557 Python's @code{ctypes} foreign function interface (FFI).")
9558 (license license:lgpl2.0+)))
9559
9560 (define-public python2-libarchive-c
9561 (package-with-python2 python-libarchive-c))
9562
9563 (define-public python-file
9564 (package
9565 (inherit file)
9566 (name "python-file")
9567 (build-system python-build-system)
9568 (arguments
9569 '(#:tests? #f ;no tests
9570 #:configure-flags '("--single-version-externally-managed" "--root=/")
9571 #:phases (modify-phases %standard-phases
9572 (add-before 'build 'change-directory
9573 (lambda _
9574 (chdir "python")
9575 #t))
9576 (add-before 'build 'set-library-file-name
9577 (lambda* (#:key inputs #:allow-other-keys)
9578 (let ((file (assoc-ref inputs "file")))
9579 (substitute* "magic.py"
9580 (("find_library\\('magic'\\)")
9581 (string-append "'" file "/lib/libmagic.so'")))
9582 #t))))))
9583 (inputs `(("file" ,file)))
9584 (native-inputs (if (%current-target-system)
9585 `(("self" ,this-package))
9586 '()))
9587 (synopsis "Python bindings to the libmagic file type guesser")
9588 (description "This package provides Python bindings to the libmagic file
9589 type guesser.
9590
9591 Note that this module and the @code{python-magic} module both provide a
9592 @file{magic.py} file; these two modules, which are different and were
9593 developed separately, both serve the same purpose: provide Python bindings for
9594 libmagic.")))
9595
9596 (define-public python2-file
9597 (package-with-python2 python-file))
9598
9599 (define-public python-debian
9600 (package
9601 (name "python-debian")
9602 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9603 (version "0.1.36")
9604 (source
9605 (origin
9606 ;; Use git-fetch, as pypi doesn't include test suite.
9607 (method git-fetch)
9608 (uri (git-reference
9609 (url home-page)
9610 (commit version)))
9611 (file-name (git-file-name name version))
9612 (sha256
9613 (base32
9614 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9615 (build-system python-build-system)
9616 (arguments
9617 `(#:phases (modify-phases %standard-phases
9618 (add-after 'unpack 'remove-debian-specific-tests
9619 ;; python-apt, apt and dpkg are not yet available in guix,
9620 ;; and these tests heavily depend on them.
9621 (lambda _
9622 (delete-file "lib/debian/tests/test_deb822.py")
9623 (delete-file "lib/debian/tests/test_debfile.py")
9624 #t)))))
9625 (propagated-inputs
9626 `(("python-six" ,python-six)
9627 ("python-chardet" ,python-chardet)))
9628 (synopsis "Debian package related modules")
9629 (description
9630 ;; XXX: Use @enumerate instead of @itemize to work around
9631 ;; <http://bugs.gnu.org/21772>.
9632 "This package provides Python modules that abstract many formats of
9633 Debian-related files, such as:
9634
9635 @enumerate
9636 @item Debtags information;
9637 @item @file{debian/changelog} files;
9638 @item packages files, pdiffs;
9639 @item control files of single or multiple RFC822-style paragraphs---e.g.
9640 @file{debian/control}, @file{.changes}, @file{.dsc};
9641 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9642 contained files and meta-information.
9643 @end enumerate\n")
9644
9645 ;; Modules are either GPLv2+ or GPLv3+.
9646 (license license:gpl3+)))
9647
9648 (define-public python-nbformat
9649 (package
9650 (name "python-nbformat")
9651 (version "4.4.0")
9652 (source
9653 (origin
9654 (method url-fetch)
9655 (uri (pypi-uri "nbformat" version))
9656 (sha256
9657 (base32
9658 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9659 (build-system python-build-system)
9660 (arguments `(#:tests? #f)) ; no test target
9661 (propagated-inputs
9662 `(("python-ipython-genutils" ,python-ipython-genutils)
9663 ("python-jsonschema" ,python-jsonschema)
9664 ("python-jupyter-core" ,python-jupyter-core)
9665 ("python-traitlets" ,python-traitlets)))
9666 (home-page "http://jupyter.org")
9667 (synopsis "Jupyter Notebook format")
9668 (description "This package provides the reference implementation of the
9669 Jupyter Notebook format and Python APIs for working with notebooks.")
9670 (license license:bsd-3)))
9671
9672 (define-public python2-nbformat
9673 (package-with-python2 python-nbformat))
9674
9675 (define-public python-bleach
9676 (package
9677 (name "python-bleach")
9678 (version "3.1.5")
9679 (source
9680 (origin
9681 (method url-fetch)
9682 (uri (pypi-uri "bleach" version))
9683 (sha256
9684 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9685 (build-system python-build-system)
9686 (propagated-inputs
9687 `(("python-webencodings" ,python-webencodings)
9688 ("python-six" ,python-six)))
9689 (native-inputs
9690 `(("python-datrie" ,python-datrie)
9691 ("python-genshi" ,python-genshi)
9692 ("python-lxml" ,python-lxml)
9693 ("python-pytest" ,python-pytest)))
9694 (home-page "https://github.com/mozilla/bleach")
9695 (synopsis "Whitelist-based HTML-sanitizing tool")
9696 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9697 (license license:asl2.0)))
9698
9699 (define-public python2-bleach
9700 (package-with-python2 python-bleach))
9701
9702 (define-public python-entrypoints
9703 (package
9704 (name "python-entrypoints")
9705 (version "0.3")
9706 (source
9707 (origin
9708 (method url-fetch)
9709 (uri (pypi-uri "entrypoints" version))
9710 (sha256
9711 (base32
9712 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9713 (build-system python-build-system)
9714 ;; The package does not come with a setup.py file, so we have to generate
9715 ;; one ourselves.
9716 (arguments
9717 `(#:tests? #f
9718 #:phases
9719 (modify-phases %standard-phases
9720 (add-after 'unpack 'create-setup.py
9721 (lambda _
9722 (call-with-output-file "setup.py"
9723 (lambda (port)
9724 (format port "\
9725 from setuptools import setup
9726 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9727 " ,version))))))))
9728 (home-page "https://github.com/takluyver/entrypoints")
9729 (synopsis "Discover and load entry points from installed Python packages")
9730 (description "Entry points are a way for Python packages to advertise
9731 objects with some common interface. The most common examples are
9732 @code{console_scripts} entry points, which define shell commands by
9733 identifying a Python function to run. The @code{entrypoints} module contains
9734 functions to find and load entry points.")
9735 (license license:expat)))
9736
9737 (define-public python2-entrypoints
9738 (package-with-python2 python-entrypoints))
9739
9740 (define-public python-epc
9741 (package
9742 (name "python-epc")
9743 (version "0.0.5")
9744 (source
9745 (origin
9746 (method url-fetch)
9747 (uri (pypi-uri "epc" version))
9748 (sha256
9749 (base32
9750 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9751 (build-system python-build-system)
9752 (propagated-inputs
9753 `(("python-sexpdata" ,python-sexpdata)))
9754 (native-inputs
9755 `(("python-nose" ,python-nose)))
9756 (home-page "https://github.com/tkf/python-epc")
9757 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9758 (description
9759 "Python-EPC can call elisp functions from Python and Python functions
9760 from elisp.")
9761 (license license:gpl3)))
9762
9763 (define-public python-forex-python
9764 (package
9765 (name "python-forex-python")
9766 (version "1.5")
9767 (source
9768 (origin
9769 (method url-fetch)
9770 (uri (pypi-uri "forex-python" version))
9771 (sha256
9772 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9773 (build-system python-build-system)
9774 (arguments
9775 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9776 ;; repository require online data.
9777 `(#:tests? #f))
9778 (propagated-inputs
9779 `(("python-requests" ,python-requests)
9780 ("python-simplejson" ,python-simplejson)))
9781 (home-page "https://github.com/MicroPyramid/forex-python")
9782 (synopsis "Foreign exchange rates and currency conversion")
9783 (description
9784 "@code{python-forex-python} can be used to manipulate foreign
9785 exchange rates and to operate currency conversions.
9786
9787 Features:
9788 @itemize
9789 @item List all currency rates.
9790 @item BitCoin price for all currencies.
9791 @item Converting amount to BitCoins.
9792 @item Get historical rates for any day since 1999.
9793 @item Conversion rate for one currency(ex; USD to INR).
9794 @item Convert amount from one currency to other.('USD 10$' to INR).
9795 @item Currency symbols.
9796 @item Currency names.
9797 @end itemize")
9798 (license license:expat)))
9799
9800 (define-public python-simpleeval
9801 (package
9802 (name "python-simpleeval")
9803 (version "0.9.10")
9804 (source
9805 (origin
9806 (method url-fetch)
9807 (uri (pypi-uri "simpleeval" version))
9808 (sha256
9809 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9810 (build-system python-build-system)
9811 (home-page "https://github.com/danthedeckie/simpleeval")
9812 (synopsis "Simple, safe single expression evaluator library")
9813 (description
9814 "This package provides a quick single file library for easily adding
9815 evaluatable expressions into python projects. Say you want to allow a user
9816 to set an alarm volume, which could depend on the time of day, alarm level,
9817 how many previous alarms had gone off, and if there is music playing at the
9818 time.")
9819 (license license:expat)))
9820
9821 (define-public python-nbconvert
9822 (package
9823 (name "python-nbconvert")
9824 (version "5.0.0b1")
9825 (source
9826 (origin
9827 (method url-fetch)
9828 (uri (pypi-uri "nbconvert" version))
9829 (sha256
9830 (base32
9831 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9832 (build-system python-build-system)
9833 (arguments
9834 `(;; The "bdist_egg" target is disabled by default, causing the installation
9835 ;; to fail.
9836 #:configure-flags (list "bdist_egg")
9837 ;; FIXME: 5 failures, 40 errors.
9838 #:tests? #f))
9839 ;; #:phases
9840 ;; (modify-phases %standard-phases
9841 ;; (replace 'check
9842 ;; (lambda _
9843 ;; (zero? (system* "py.test" "-v")))))
9844 (native-inputs
9845 `(("python-pytest" ,python-pytest)))
9846 (propagated-inputs
9847 `(("python-bleach" ,python-bleach)
9848 ("python-entrypoints" ,python-entrypoints)
9849 ("python-jinja2" ,python-jinja2)
9850 ("python-jupyter-core" ,python-jupyter-core)
9851 ("python-mistune" ,python-mistune)
9852 ("python-nbformat" ,python-nbformat)
9853 ("python-pygments" ,python-pygments)
9854 ("python-traitlets" ,python-traitlets)))
9855 (home-page "http://jupyter.org")
9856 (synopsis "Converting Jupyter Notebooks")
9857 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9858 notebooks to various other formats via Jinja templates. It allows you to
9859 convert an @code{.ipynb} notebook file into various static formats including:
9860
9861 @enumerate
9862 @item HTML
9863 @item LaTeX
9864 @item PDF
9865 @item Reveal JS
9866 @item Markdown (md)
9867 @item ReStructured Text (rst)
9868 @item executable script
9869 @end enumerate\n")
9870 (license license:bsd-3)))
9871
9872 (define-public python2-nbconvert
9873 (package-with-python2 python-nbconvert))
9874
9875 (define-public python-notebook
9876 (package
9877 (name "python-notebook")
9878 (version "5.7.4")
9879 (source (origin
9880 (method url-fetch)
9881 (uri (pypi-uri "notebook" version))
9882 (sha256
9883 (base32
9884 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9885 (build-system python-build-system)
9886 (arguments
9887 `(#:phases
9888 (modify-phases %standard-phases
9889 (replace 'check
9890 (lambda _
9891 ;; These tests require a browser
9892 (delete-file-recursively "notebook/tests/selenium")
9893 ;; Some tests need HOME
9894 (setenv "HOME" "/tmp")
9895 ;; This file contains "warningfilters", which are not supported
9896 ;; by this version of nose.
9897 (delete-file "setup.cfg")
9898 (with-directory-excursion "/tmp"
9899 (invoke "nosetests" "-v"))
9900 #t)))))
9901 (propagated-inputs
9902 `(("python-jupyter-core" ,python-jupyter-core)
9903 ("python-nbformat" ,python-nbformat)
9904 ("python-nbconvert" ,python-nbconvert)
9905 ("python-prometheus-client" ,python-prometheus-client)
9906 ("python-send2trash" ,python-send2trash)
9907 ("python-terminado" ,python-terminado)))
9908 (native-inputs
9909 `(("python-nose" ,python-nose)
9910 ("python-sphinx" ,python-sphinx)
9911 ("python-requests" ,python-requests)))
9912 (home-page "http://jupyter.org/")
9913 (synopsis "Web-based notebook environment for interactive computing")
9914 (description
9915 "The Jupyter HTML notebook is a web-based notebook environment for
9916 interactive computing.")
9917 (properties `((python2-variant . ,(delay python2-notebook))))
9918 (license license:bsd-3)))
9919
9920 (define-public python2-notebook
9921 (let ((base (package-with-python2
9922 (strip-python2-variant python-notebook))))
9923 (package (inherit base)
9924 (native-inputs
9925 `(("python2-mock" ,python2-mock)
9926 ,@(package-native-inputs base)))
9927 (arguments
9928 (substitute-keyword-arguments (package-arguments base)
9929 ((#:phases phases)
9930 `(modify-phases ,phases
9931 (add-before 'check 'disable-test-case
9932 ;; The test requires network access to localhost. Curiously it
9933 ;; fails with Python 2 only. Simply make the test-case return
9934 ;; immediately.
9935 (lambda _
9936 (substitute*
9937 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9938 (("formats = self.nbconvert_api") "return #")))))))))))
9939
9940 (define-public python-widgetsnbextension
9941 (package
9942 (name "python-widgetsnbextension")
9943 (version "3.5.1")
9944 (source
9945 (origin
9946 (method url-fetch)
9947 (uri (pypi-uri "widgetsnbextension" version))
9948 (sha256
9949 (base32
9950 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9951 (build-system python-build-system)
9952 (propagated-inputs
9953 `(("python-ipykernel" ,python-ipykernel)
9954 ("python-notebook" ,python-notebook)))
9955 (native-inputs
9956 `(("python-certifi" ,python-certifi)
9957 ("python-nose" ,python-nose)))
9958 (home-page "https://ipython.org")
9959 (synopsis "IPython HTML widgets for Jupyter")
9960 (description "This package provides interactive HTML widgets for Jupyter
9961 notebooks.")
9962 (license license:bsd-3)))
9963
9964 (define-public python2-widgetsnbextension
9965 (package-with-python2 python-widgetsnbextension))
9966
9967 (define-public python-ipywidgets
9968 (package
9969 (name "python-ipywidgets")
9970 (version "7.5.1")
9971 (source
9972 (origin
9973 (method url-fetch)
9974 (uri (pypi-uri "ipywidgets" version))
9975 (sha256
9976 (base32
9977 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9978 (build-system python-build-system)
9979 (propagated-inputs
9980 `(("python-ipython" ,python-ipython)
9981 ("python-traitlets" ,python-traitlets)
9982 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9983 (native-inputs
9984 `(("python-nose" ,python-nose)
9985 ("python-pytest" ,python-pytest)))
9986 (home-page "https://ipython.org")
9987 (synopsis "IPython HTML widgets for Jupyter")
9988 (description "Ipywidgets are interactive HTML widgets for Jupyter
9989 notebooks and the IPython kernel. Notebooks come alive when interactive
9990 widgets are used. Users gain control of their data and can visualize changes
9991 in the data.")
9992 (license license:bsd-3)))
9993
9994 (define-public python2-ipywidgets
9995 (package-with-python2 python-ipywidgets))
9996
9997 (define-public python-jupyter-console
9998 (package
9999 (name "python-jupyter-console")
10000 (version "6.1.0")
10001 (source
10002 (origin
10003 (method url-fetch)
10004 (uri (pypi-uri "jupyter_console" version))
10005 (sha256
10006 (base32
10007 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
10008 (build-system python-build-system)
10009 (propagated-inputs
10010 `(("python-ipykernel" ,python-ipykernel)
10011 ("python-jupyter-client" ,python-jupyter-client)
10012 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10013 ("python-pygments" ,python-pygments)))
10014 (native-inputs
10015 `(("python-nose" ,python-nose)))
10016 (home-page "https://jupyter.org")
10017 (synopsis "Jupyter terminal console")
10018 (description "This package provides a terminal-based console frontend for
10019 Jupyter kernels. It also allows for console-based interaction with non-Python
10020 Jupyter kernels such as IJulia and IRKernel.")
10021 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10022 (license license:bsd-3)))
10023
10024 (define-public python2-jupyter-console
10025 (package
10026 (name "python2-jupyter-console")
10027 (version "5.2.0")
10028 (source
10029 (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "jupyter_console" version))
10032 (sha256
10033 (base32
10034 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10035 (build-system python-build-system)
10036 (arguments
10037 `(#:python ,python-2
10038 #:tests? #f)) ; Tests only run in a TTY.
10039 (propagated-inputs
10040 `(("python2-ipykernel" ,python2-ipykernel)
10041 ("python2-jupyter-client" ,python2-jupyter-client)
10042 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10043 ("python2-pygments" ,python2-pygments)))
10044 (native-inputs
10045 `(("python2-nose" ,python2-nose)))
10046 (home-page "https://jupyter.org")
10047 (synopsis "Jupyter terminal console")
10048 (description "This package provides a terminal-based console frontend for
10049 Jupyter kernels. It also allows for console-based interaction with non-Python
10050 Jupyter kernels such as IJulia and IRKernel.")
10051 (license license:bsd-3)))
10052
10053 ;; The python-ipython and python-jupyter-console require each other. To get
10054 ;; the functionality in both packages working, strip down the
10055 ;; python-jupyter-console package when using it as an input to python-ipython.
10056 (define python-jupyter-console-minimal
10057 (package
10058 (inherit python-jupyter-console)
10059 (name "python-jupyter-console-minimal")
10060 (arguments
10061 (substitute-keyword-arguments
10062 (package-arguments python-jupyter-console)
10063 ((#:phases phases)
10064 `(modify-phases ,phases
10065 (add-after 'install 'delete-bin
10066 (lambda* (#:key outputs #:allow-other-keys)
10067 ;; Delete the bin files, to avoid conflicts in profiles
10068 ;; where python-ipython and python-jupyter-console are
10069 ;; both present.
10070 (delete-file-recursively
10071 (string-append
10072 (assoc-ref outputs "out") "/bin"))))))))
10073 ;; Remove the python-ipython propagated input, to avoid the cycle
10074 (propagated-inputs
10075 (alist-delete
10076 "python-ipython"
10077 (package-propagated-inputs python-jupyter-console)))))
10078
10079 (define-public python-qtconsole
10080 (package
10081 (name "python-qtconsole")
10082 (version "4.4.3")
10083 (source
10084 (origin
10085 (method url-fetch)
10086 (uri (pypi-uri "qtconsole" version))
10087 (sha256
10088 (base32
10089 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10090 (build-system python-build-system)
10091 (arguments
10092 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10093 ;; but we only have the LTS version 5.x. This means that there might be
10094 ;; runtime errors, but since this is a dependency of the Jupyter package,
10095 ;; and Jupyter can be used without the qtconsole we can overlook this for
10096 ;; now.
10097 `(#:tests? #f
10098 #:phases
10099 (modify-phases %standard-phases
10100 (add-before 'check 'pre-check
10101 (lambda _
10102 (setenv "QT_QPA_PLATFORM" "offscreen")
10103 #t)))))
10104 (propagated-inputs
10105 `(("python-ipykernel" ,python-ipykernel)
10106 ("python-ipython" ,python-ipython)))
10107 (native-inputs
10108 `(("python-pytest" ,python-pytest)))
10109 (home-page "http://jupyter.org")
10110 (synopsis "Jupyter Qt console")
10111 (description "This package provides a Qt-based console for Jupyter with
10112 support for rich media output.")
10113 (license license:bsd-3)))
10114
10115 (define-public python-jsbeautifier
10116 (package
10117 (name "python-jsbeautifier")
10118 (version "1.10.2")
10119 (home-page "https://github.com/beautify-web/js-beautify")
10120 (source (origin
10121 (method git-fetch)
10122 (uri (git-reference
10123 (url home-page)
10124 (commit (string-append "v" version))))
10125 (file-name (git-file-name name version))
10126 (sha256
10127 (base32
10128 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10129 (build-system python-build-system)
10130 (arguments
10131 `(#:phases (modify-phases %standard-phases
10132 (add-after 'unpack 'chdir
10133 (lambda _
10134 ;; The upstream Git repository contains all the code,
10135 ;; but this package only builds the python code.
10136 (chdir "python")
10137 #t))
10138 (add-after 'unpack 'patch-python-six-requirements
10139 (lambda _
10140 (substitute* "python/setup.py"
10141 (("six>=1.12.0")
10142 "six>=1.11.0"))
10143 #t)))))
10144 (propagated-inputs
10145 `(("python-editorconfig" ,python-editorconfig)
10146 ("python-six" ,python-six)))
10147 (native-inputs
10148 `(("python-pytest" ,python-pytest)))
10149 (synopsis "JavaScript unobfuscator and beautifier")
10150 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10151 popular online obfuscators.")
10152 (license license:expat)))
10153
10154 (define-public jupyter
10155 (package
10156 (name "jupyter")
10157 (version "1.0.0")
10158 (source
10159 (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "jupyter" version))
10162 (sha256
10163 (base32
10164 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10165 (build-system python-build-system)
10166 (arguments '(#:tests? #f)) ; there are none.
10167 (propagated-inputs
10168 `(("python-ipykernel" ,python-ipykernel)
10169 ("python-ipywidgets" ,python-ipywidgets)
10170 ("python-jupyter-console" ,python-jupyter-console)
10171 ("python-nbconvert" ,python-nbconvert)
10172 ("python-notebook" ,python-notebook)
10173 ("python-qtconsole" ,python-qtconsole)))
10174 (native-search-paths
10175 (list (search-path-specification
10176 (variable "JUPYTER_PATH")
10177 (files '("share/jupyter")))))
10178 (home-page "https://jupyter.org")
10179 (synopsis "Web application for interactive documents")
10180 (description
10181 "The Jupyter Notebook is a web application that allows you to create and
10182 share documents that contain live code, equations, visualizations and
10183 explanatory text. Uses include: data cleaning and transformation, numerical
10184 simulation, statistical modeling, machine learning and much more.")
10185 (license license:bsd-3)))
10186
10187 (define-public python-chardet
10188 (package
10189 (name "python-chardet")
10190 (version "3.0.4")
10191 (source
10192 (origin
10193 (method url-fetch)
10194 (uri (pypi-uri "chardet" version))
10195 (sha256
10196 (base32
10197 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10198 (native-inputs
10199 `(("python-hypothesis" ,python-hypothesis)
10200 ("python-pytest" ,python-pytest)
10201 ("python-pytest-runner" ,python-pytest-runner)))
10202 (build-system python-build-system)
10203 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10204 (arguments `(#:tests? #f))
10205 (home-page "https://github.com/chardet/chardet")
10206 (synopsis "Universal encoding detector for Python 2 and 3")
10207 (description
10208 "This package provides @code{chardet}, a Python module that can
10209 automatically detect a wide range of file encodings.")
10210 (license license:lgpl2.1+)))
10211
10212 (define-public python2-chardet
10213 (package-with-python2 python-chardet))
10214
10215 (define-public python-docopt
10216 (package
10217 (name "python-docopt")
10218 (version "0.6.2")
10219 (source
10220 (origin
10221 (method git-fetch)
10222 ;; The release on PyPI does not include tests.
10223 (uri (git-reference
10224 (url "https://github.com/docopt/docopt")
10225 (commit version)))
10226 (file-name (git-file-name name version))
10227 (sha256
10228 (base32
10229 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10230 (build-system python-build-system)
10231 (native-inputs
10232 `(("python-pytest" ,python-pytest)))
10233 (arguments
10234 `(#:phases
10235 (modify-phases %standard-phases
10236 (replace 'check
10237 (lambda _ (invoke "py.test"))))))
10238 (home-page "http://docopt.org")
10239 (synopsis "Command-line interface description language for Python")
10240 (description "This library allows the user to define a command-line
10241 interface from a program's help message rather than specifying it
10242 programmatically with command-line parsers like @code{getopt} and
10243 @code{argparse}.")
10244 (license license:expat)))
10245
10246 (define-public python2-docopt
10247 (package-with-python2 python-docopt))
10248
10249 (define-public python-pythondialog
10250 (package
10251 (name "python-pythondialog")
10252 (version "3.4.0")
10253 (source
10254 (origin
10255 (method url-fetch)
10256 (uri (pypi-uri "pythondialog" version))
10257 (sha256
10258 (base32
10259 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10260 (build-system python-build-system)
10261 (arguments
10262 `(#:phases
10263 (modify-phases %standard-phases
10264 (add-after 'unpack 'patch-path
10265 (lambda* (#:key inputs #:allow-other-keys)
10266 (let* ((dialog (assoc-ref inputs "dialog")))
10267 ;; Since this library really wants to grovel the search path, we
10268 ;; must hardcode dialog's store path into it.
10269 (substitute* "dialog.py"
10270 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10271 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10272 #t))))
10273 #:tests? #f)) ; no test suite
10274 (propagated-inputs
10275 `(("dialog" ,dialog)))
10276 (home-page "http://pythondialog.sourceforge.net/")
10277 (synopsis "Python interface to the UNIX dialog utility")
10278 (description "A Python wrapper for the dialog utility. Its purpose is to
10279 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10280 This allows one to make simple text-mode user interfaces on Unix-like systems")
10281 (license license:lgpl2.1)
10282 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10283
10284 (define-public python2-pythondialog
10285 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10286 (package
10287 (inherit base)
10288 (version (package-version python-pythondialog))
10289 (source (origin
10290 (method url-fetch)
10291 (uri (pypi-uri "python2-pythondialog" version))
10292 (sha256
10293 (base32
10294 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10295
10296 (define-public python-configobj
10297 (package
10298 (name "python-configobj")
10299 (version "5.0.6")
10300 (source (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "configobj" version))
10303 (sha256
10304 (base32
10305 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10306 ;; Patch setup.py so it looks for python-setuptools, which is
10307 ;; required to parse the keyword 'install_requires' in setup.py.
10308 (patches (search-patches "python-configobj-setuptools.patch"))))
10309 (build-system python-build-system)
10310 (propagated-inputs
10311 `(("python-six" ,python-six)))
10312 (synopsis "Config file reading, writing and validation")
10313 (description "ConfigObj is a simple but powerful config file reader and
10314 writer: an ini file round tripper. Its main feature is that it is very easy to
10315 use, with a straightforward programmer’s interface and a simple syntax for
10316 config files.")
10317 (home-page "https://github.com/DiffSK/configobj")
10318 (license license:bsd-3)))
10319
10320 (define-public python2-configobj
10321 (package-with-python2 python-configobj))
10322
10323 (define-public python-configargparse
10324 (package
10325 (name "python-configargparse")
10326 (version "0.14.0")
10327 (source (origin
10328 (method url-fetch)
10329 (uri (pypi-uri "ConfigArgParse" version))
10330 (sha256
10331 (base32
10332 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10333 (build-system python-build-system)
10334 (native-inputs
10335 `(("python-pyyaml" ,python-pyyaml)))
10336 (arguments
10337 `(#:phases
10338 (modify-phases %standard-phases
10339 (replace 'check
10340 (lambda _
10341 ;; Bypass setuptools-shim because one test relies on "setup.py"
10342 ;; being the first argument passed to the python call.
10343 ;;
10344 ;; NOTE: Many tests do not run because they rely on Python's
10345 ;; built-in test.test_argparse, but we remove the unit tests from
10346 ;; our Python installation.
10347 (invoke "python" "setup.py" "test"))))))
10348 (synopsis "Replacement for argparse")
10349 (description "A drop-in replacement for argparse that allows options to also
10350 be set via config files and/or environment variables.")
10351 (home-page "https://github.com/bw2/ConfigArgParse")
10352 (license license:expat)))
10353
10354 (define-public python2-configargparse
10355 (package-with-python2 python-configargparse))
10356
10357 (define-public python-argparse-manpage
10358 (package
10359 (name "python-argparse-manpage")
10360 (version "1.1")
10361 (source
10362 (origin
10363 (method url-fetch)
10364 (uri (pypi-uri "argparse-manpage" version))
10365 (sha256
10366 (base32
10367 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10368 (build-system python-build-system)
10369 (home-page "https://github.com/praiskup/argparse-manpage")
10370 (synopsis "Build manual page from Python's ArgumentParser object")
10371 (description
10372 "This package provides tools to build manual pages from Python's
10373 @code{ArgumentParser} object.")
10374 (license license:asl2.0)))
10375
10376 (define-public python-contextlib2
10377 (package
10378 (name "python-contextlib2")
10379 (version "0.6.0.post1")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "contextlib2" version))
10384 (sha256
10385 (base32
10386 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10387 (build-system python-build-system)
10388 (home-page "https://contextlib2.readthedocs.org/")
10389 (synopsis "Tools for decorators and context managers")
10390 (description "This module is primarily a backport of the Python
10391 3.2 contextlib to earlier Python versions. Like contextlib, it
10392 provides utilities for common tasks involving decorators and context
10393 managers. It also contains additional features that are not part of
10394 the standard library.")
10395 (properties `((python2-variant . ,(delay python2-contextlib2))))
10396 (license license:psfl)))
10397
10398 (define-public python2-contextlib2
10399 (let ((base (package-with-python2
10400 (strip-python2-variant python-contextlib2))))
10401 (package
10402 (inherit base)
10403 (arguments
10404 (substitute-keyword-arguments (package-arguments base)
10405 ((#:phases phases)
10406 `(modify-phases ,phases
10407 (replace 'check
10408 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10409 (native-inputs
10410 `(("python2-unittest2" ,python2-unittest2))))))
10411
10412 ;; This package is used by python2-pytest via python2-importlib-metadata,
10413 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10414 (define-public python2-contextlib2-bootstrap
10415 (hidden-package
10416 (package/inherit
10417 python2-contextlib2
10418 (name "python2-contextlib2-bootstrap")
10419 (arguments
10420 `(#:tests? #f
10421 ,@(package-arguments python2-contextlib2)))
10422 (native-inputs '()))))
10423
10424 (define-public python-texttable
10425 (package
10426 (name "python-texttable")
10427 (version "1.6.2")
10428 (source
10429 (origin
10430 (method url-fetch)
10431 (uri (pypi-uri "texttable" version))
10432 (sha256
10433 (base32
10434 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10435 (build-system python-build-system)
10436 (arguments
10437 `(#:phases
10438 (modify-phases %standard-phases
10439 (replace 'check
10440 (lambda _ (invoke "pytest" "tests.py"))))))
10441 (native-inputs
10442 `(("python-pytest" ,python-pytest)))
10443 (home-page "https://github.com/foutaise/texttable/")
10444 (synopsis "Python module for creating simple ASCII tables")
10445 (description "Texttable is a Python module for creating simple ASCII
10446 tables.")
10447 (license license:expat)))
10448
10449 (define-public python2-texttable
10450 (package-with-python2 python-texttable))
10451
10452 (define-public python-atomicwrites
10453 (package
10454 (name "python-atomicwrites")
10455 (version "1.3.0")
10456 (source (origin
10457 (method url-fetch)
10458 (uri (pypi-uri "atomicwrites" version))
10459 (sha256
10460 (base32
10461 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10462 (build-system python-build-system)
10463 (synopsis "Atomic file writes in Python")
10464 (description "Library for atomic file writes using platform dependent tools
10465 for atomic file system operations.")
10466 (home-page "https://github.com/untitaker/python-atomicwrites")
10467 (license license:expat)))
10468
10469 (define-public python2-atomicwrites
10470 (package-with-python2 python-atomicwrites))
10471
10472 (define-public python-click-threading
10473 (package
10474 (name "python-click-threading")
10475 (version "0.4.4")
10476 (source (origin
10477 (method url-fetch)
10478 (uri (pypi-uri "click-threading" version))
10479 (sha256
10480 (base32
10481 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10482 (build-system python-build-system)
10483 (propagated-inputs
10484 `(("python-click" ,python-click)))
10485 (synopsis "Utilities for multithreading in Click")
10486 (description "This package provides utilities for multithreading in Click
10487 applications.")
10488 (home-page "https://github.com/click-contrib/click-threading")
10489 (license license:expat)))
10490
10491 (define-public python-click-log
10492 (package
10493 (name "python-click-log")
10494 (version "0.3.2")
10495 (source (origin
10496 (method url-fetch)
10497 (uri (pypi-uri "click-log" version))
10498 (sha256
10499 (base32
10500 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10501 (build-system python-build-system)
10502 (propagated-inputs
10503 `(("python-click" ,python-click)))
10504 (synopsis "Logging for click applications")
10505 (description "This package provides a Python library for logging Click
10506 applications.")
10507 (home-page "https://github.com/click-contrib/click-log")
10508 (license license:expat)))
10509
10510 (define-public python-apipkg
10511 (package
10512 (name "python-apipkg")
10513 (version "1.5")
10514 (source (origin
10515 (method url-fetch)
10516 (uri (pypi-uri "apipkg" version))
10517 (sha256
10518 (base32
10519 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10520 (build-system python-build-system)
10521 (native-inputs
10522 `(("python-pytest" ,python-pytest)
10523 ("python-setuptools-scm" ,python-setuptools-scm)))
10524 (synopsis "Namespace control and lazy-import mechanism")
10525 (description "With apipkg you can control the exported namespace of a Python
10526 package and greatly reduce the number of imports for your users. It is a small
10527 pure Python module that works on virtually all Python versions.")
10528 (home-page "https://github.com/pytest-dev/apipkg")
10529 (license license:expat)))
10530
10531 (define-public python-execnet
10532 (package
10533 (name "python-execnet")
10534 (version "1.4.1")
10535 (source (origin
10536 (method url-fetch)
10537 (uri (pypi-uri "execnet" version))
10538 (sha256
10539 (base32
10540 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10541 (build-system python-build-system)
10542 (arguments
10543 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10544 ;; The two test failures are caused by the lack of an `ssh` executable.
10545 ;; The test suite can be run with pytest after the 'install' phase.
10546 #:tests? #f))
10547 (native-inputs
10548 `(("python-pytest" ,python-pytest)
10549 ("python-setuptools-scm" ,python-setuptools-scm)))
10550 (propagated-inputs
10551 `(("python-apipkg" ,python-apipkg)))
10552 (synopsis "Rapid multi-Python deployment")
10553 (description "Execnet provides a share-nothing model with
10554 channel-send/receive communication for distributing execution across many
10555 Python interpreters across version, platform and network barriers. It has a
10556 minimal and fast API targeting the following uses:
10557 @enumerate
10558 @item distribute tasks to (many) local or remote CPUs
10559 @item write and deploy hybrid multi-process applications
10560 @item write scripts to administer multiple environments
10561 @end enumerate")
10562 (home-page "https://codespeak.net/execnet/")
10563 (license license:expat)))
10564
10565 (define-public python2-execnet
10566 (package-with-python2 python-execnet))
10567
10568 (define-public python-icalendar
10569 (package
10570 (name "python-icalendar")
10571 (version "4.0.5")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "icalendar" version))
10575 (sha256
10576 (base32
10577 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10578 (build-system python-build-system)
10579 (propagated-inputs
10580 `(("python-dateutil" ,python-dateutil)
10581 ("python-pytz" ,python-pytz)))
10582 (synopsis "Python library for parsing iCalendar files")
10583 (description "The icalendar package is a parser/generator of iCalendar
10584 files for use with Python.")
10585 (home-page "https://github.com/collective/icalendar")
10586 (license license:bsd-2)))
10587
10588 (define-public python-args
10589 (package
10590 (name "python-args")
10591 (version "0.1.0")
10592 (source (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "args" version))
10595 (sha256
10596 (base32
10597 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10598 (build-system python-build-system)
10599 (home-page "https://github.com/kennethreitz/args")
10600 (synopsis "Command-line argument parser")
10601 (description
10602 "This library provides a Python module to parse command-line arguments.")
10603 (license license:bsd-3)))
10604
10605 (define-public python2-args
10606 (package-with-python2 python-args))
10607
10608 (define-public python-clint
10609 (package
10610 (name "python-clint")
10611 (version "0.5.1")
10612 (source (origin
10613 (method url-fetch)
10614 (uri (pypi-uri "clint" version))
10615 (sha256
10616 (base32
10617 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10618 (build-system python-build-system)
10619 (arguments
10620 '(#:phases
10621 (modify-phases %standard-phases
10622 (replace 'check
10623 (lambda _ (invoke "py.test" "-v"))))))
10624 (native-inputs
10625 `(("python-pytest" ,python-pytest)))
10626 (propagated-inputs
10627 `(("python-args" ,python-args)))
10628 (home-page "https://github.com/kennethreitz/clint")
10629 (synopsis "Command-line interface tools")
10630 (description
10631 "Clint is a Python module filled with a set of tools for developing
10632 command-line applications, including tools for colored and indented
10633 output, progress bar display, and pipes.")
10634 (license license:isc)))
10635
10636 (define-public python2-clint
10637 (package-with-python2 python-clint))
10638
10639 (define-public python-rply
10640 (package
10641 (name "python-rply")
10642 (version "0.7.5")
10643 (source (origin
10644 (method url-fetch)
10645 (uri (pypi-uri "rply" version))
10646 (sha256
10647 (base32
10648 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10649 (build-system python-build-system)
10650 (propagated-inputs
10651 `(("python-appdirs" ,python-appdirs)))
10652 (home-page "https://github.com/alex/rply")
10653 (synopsis "Parser generator for Python")
10654 (description
10655 "This package provides a pure Python based parser generator, that also
10656 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10657 with a new public API, and RPython support.")
10658 (license license:bsd-3)))
10659
10660 (define-public python2-rply
10661 (package-with-python2 python-rply))
10662
10663 (define-public python-hy
10664 (package
10665 (name "python-hy")
10666 (version "0.18.0")
10667 (source (origin
10668 (method url-fetch)
10669 (uri (pypi-uri "hy" version))
10670 (sha256
10671 (base32
10672 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10673 (build-system python-build-system)
10674 (arguments
10675 '(#:phases
10676 (modify-phases %standard-phases
10677 (add-before 'install 'set-HOME
10678 (lambda _
10679 (setenv "HOME" "/tmp") #t))
10680 (replace 'check
10681 (lambda _
10682 ;; Tests require write access to HOME.
10683 (setenv "HOME" "/tmp")
10684 (invoke "nosetests"))))))
10685 (native-inputs
10686 `(("python-coverage" ,python-coverage)
10687 ("python-nose" ,python-nose)))
10688 (propagated-inputs
10689 `(("python-astor" ,python-astor)
10690 ("python-colorama" ,python-colorama)
10691 ("python-rply" ,python-rply)
10692 ("python-funcparserlib"
10693 ,python-funcparserlib)))
10694 (home-page "http://hylang.org/")
10695 (synopsis "Lisp frontend to Python")
10696 (description
10697 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10698 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10699 Python at your fingertips, in Lisp form.")
10700 (license license:expat)))
10701
10702 (define-public python2-functools32
10703 (package
10704 (name "python2-functools32")
10705 (version "3.2.3-2")
10706 (source
10707 (origin
10708 (method url-fetch)
10709 (uri (pypi-uri "functools32" version))
10710 (sha256
10711 (base32
10712 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10713 (build-system python-build-system)
10714 (arguments
10715 `(#:python ,python-2
10716 #:tests? #f)) ; no test target
10717 (home-page "https://github.com/MiCHiLU/python-functools32")
10718 (synopsis
10719 "Backport of the functools module from Python 3.2.3")
10720 (description
10721 "This package is a backport of the @code{functools} module from Python
10722 3.2.3 for use with older versions of Python and PyPy.")
10723 (license license:expat)))
10724
10725 (define-public python2-subprocess32
10726 (package
10727 (name "python2-subprocess32")
10728 (version "3.2.7")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (pypi-uri "subprocess32" version))
10732 (sha256
10733 (base32
10734 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10735 (patches
10736 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10737 (build-system python-build-system)
10738 (arguments
10739 `(#:python ,python-2
10740 ;; The test suite fails with Python > 2.7.13:
10741 ;; import test.support
10742 ;; ImportError: No module named support
10743 #:tests? #f
10744 #:phases
10745 (modify-phases %standard-phases
10746 (add-after 'unpack 'patch-/bin/sh
10747 (lambda _
10748 (substitute* '("subprocess32.py"
10749 "test_subprocess32.py")
10750 (("/bin/sh") (which "sh")))
10751 #t)))))
10752 (home-page "https://github.com/google/python-subprocess32")
10753 (synopsis "Backport of the subprocess module from Python 3.2")
10754 (description
10755 "This is a backport of the @code{subprocess} standard library module
10756 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10757 new features. On POSIX systems it is guaranteed to be reliable when used
10758 in threaded applications. It includes timeout support from Python 3.3 but
10759 otherwise matches 3.2’s API.")
10760 (license license:psfl)))
10761
10762 (define-public python2-futures
10763 (package
10764 (name "python2-futures")
10765 (version "3.2.0")
10766 (source
10767 (origin
10768 (method url-fetch)
10769 (uri (pypi-uri "futures" version))
10770 (sha256
10771 (base32
10772 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10773 (build-system python-build-system)
10774 (arguments
10775 `(#:python ,python-2
10776 #:phases
10777 (modify-phases %standard-phases
10778 (replace 'check
10779 (lambda _
10780 (invoke "python" "test_futures.py")
10781 #t)))))
10782 (home-page "https://github.com/agronholm/pythonfutures")
10783 (synopsis
10784 "Backport of the concurrent.futures package from Python 3.2")
10785 (description
10786 "The concurrent.futures module provides a high-level interface for
10787 asynchronously executing callables. This package backports the
10788 concurrent.futures package from Python 3.2")
10789 (license license:bsd-3)))
10790
10791 (define-public python-promise
10792 (package
10793 (name "python-promise")
10794 (version "0.4.2")
10795 (source
10796 (origin
10797 (method url-fetch)
10798 (uri (pypi-uri "promise" version))
10799 (sha256
10800 (base32
10801 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10802 (build-system python-build-system)
10803 ;; Tests wants python-futures, which is a python2 only program, and
10804 ;; can't be found by python-promise at test time.
10805 (arguments `(#:tests? #f))
10806 (home-page "https://github.com/syrusakbary/promise")
10807 (synopsis "Promises/A+ implementation for Python")
10808 (description
10809 "Promises/A+ implementation for Python")
10810 (properties `((python2-variant . ,(delay python2-promise))))
10811 (license license:expat)))
10812
10813 (define-public python2-promise
10814 (let ((promise (package-with-python2
10815 (strip-python2-variant python-promise))))
10816 (package (inherit promise)
10817 (arguments (substitute-keyword-arguments (package-arguments promise)
10818 ((#:tests? _) #t)))
10819 (native-inputs
10820 `(("python2-futures" ,python2-futures)
10821 ("python2-pytest" ,python2-pytest)
10822 ,@(package-native-inputs promise))))))
10823
10824 (define-public python-progressbar2
10825 (package
10826 (name "python-progressbar2")
10827 (version "3.51.3")
10828 (source
10829 (origin
10830 (method url-fetch)
10831 (uri (pypi-uri "progressbar2" version))
10832 (sha256
10833 (base32
10834 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10835 (build-system python-build-system)
10836 (propagated-inputs
10837 `(("python-six" ,python-six)
10838 ("python-utils" ,python-utils)))
10839 (native-inputs
10840 `(("python-flake8" ,python-flake8)
10841 ("python-freezegun" ,python-freezegun)
10842 ("python-pycodestyle" ,python-pycodestyle)
10843 ("python-pytest" ,python-pytest)
10844 ("python-pytest-cache" ,python-pytest-cache)
10845 ("python-pytest-cov" ,python-pytest-cov)
10846 ("python-pytest-flakes" ,python-pytest-flakes)
10847 ("python-pytest-pep8" ,python-pytest-pep8)
10848 ("python-sphinx" ,python-sphinx)))
10849 (home-page "https://github.com/WoLpH/python-progressbar")
10850 (synopsis "Text progress bar library for Python")
10851 (description
10852 "This package provides a Python progressbar library to provide
10853 visual (yet text based) progress to long running operations.")
10854 (license license:bsd-3)))
10855
10856 (define-public python-progressbar33
10857 (package
10858 (name "python-progressbar33")
10859 (version "2.4")
10860 (source
10861 (origin
10862 (method url-fetch)
10863 (uri (pypi-uri "progressbar33" version))
10864 (sha256
10865 (base32
10866 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10867 (build-system python-build-system)
10868 (home-page "https://github.com/germangh/python-progressbar")
10869 (synopsis "Text progress bar library for Python")
10870 (description
10871 "This package provides a text progress bar library for Python. This
10872 version only differs from the original @code{progressbar} package in that it
10873 uses relative package imports instead of absolute imports, which is necessary
10874 for the module to work under Python 3.3.")
10875 ;; Either or both of these licenses may be selected.
10876 (license (list license:lgpl2.1+ license:bsd-3))))
10877
10878 (define-public python-colorama
10879 (package
10880 (name "python-colorama")
10881 (version "0.4.4")
10882 (source
10883 (origin
10884 (method url-fetch)
10885 (uri (pypi-uri "colorama" version))
10886 (sha256
10887 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10888 (build-system python-build-system)
10889 (synopsis "Colored terminal text rendering for Python")
10890 (description "Colorama is a Python library for rendering colored terminal
10891 text.")
10892 (home-page "https://pypi.org/project/colorama/")
10893 (license license:bsd-3)))
10894
10895 (define-public python2-colorama
10896 (package-with-python2 python-colorama))
10897
10898 (define-public python-moto
10899 (package
10900 (name "python-moto")
10901 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
10902 (version "1.3.16.dev134")
10903 (source (origin
10904 (method url-fetch)
10905 (uri (pypi-uri "moto" version))
10906 (sha256
10907 (base32
10908 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
10909 (build-system python-build-system)
10910 (arguments
10911 `(#:phases (modify-phases %standard-phases
10912 (add-after 'unpack 'patch-hardcoded-executable-names
10913 (lambda _
10914 (substitute* "moto/batch/models.py"
10915 (("/bin/sh")
10916 (which "sh")))
10917 (substitute* (find-files "tests" "\\.py$")
10918 (("#!/bin/bash")
10919 (string-append "#!" (which "bash"))))
10920 #t))
10921 (replace 'check
10922 (lambda _
10923 (setenv "PYTHONPATH" (string-append "./build/lib:"
10924 (getenv "PYTHONPATH")))
10925 (invoke "pytest" "-vv" "-m" "not network"
10926 ;; These tests require Docker.
10927 "-k" "not test_terminate_job \
10928 and not test_invoke_function_from_sqs_exception"))))))
10929 (native-inputs
10930 `(("python-flask" ,python-flask)
10931 ("python-flask-cors" ,python-flask-cors)
10932 ("python-freezegun" ,python-freezegun)
10933 ("python-parameterized" ,python-parameterized)
10934 ("python-pytest" ,python-pytest)
10935 ("python-sure" ,python-sure)))
10936 (propagated-inputs
10937 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
10938 ("python-boto" ,python-boto)
10939 ("python-boto3" ,python-boto3)
10940 ("python-botocore" ,python-botocore)
10941 ("python-cfn-lint" ,python-cfn-lint)
10942 ("python-cryptography" ,python-cryptography)
10943 ("python-dateutil" ,python-dateutil)
10944 ("python-docker" ,python-docker)
10945 ("python-idna" ,python-idna)
10946 ("python-jinja2" ,python-jinja2)
10947 ("python-jose" ,python-jose)
10948 ("python-jsondiff" ,python-jsondiff)
10949 ("python-mock" ,python-mock)
10950 ("python-pytz" ,python-pytz)
10951 ("python-pyyaml" ,python-pyyaml)
10952 ("python-requests" ,python-requests)
10953 ("python-responses" ,python-responses)
10954 ("python-six" ,python-six)
10955 ("python-sshpubkeys" ,python-sshpubkeys)
10956 ("python-werkzeug" ,python-werkzeug)
10957 ("python-xmltodict" ,python-xmltodict)))
10958 (home-page "https://github.com/spulec/moto")
10959 (synopsis "Mock out the boto library")
10960 (description
10961 "@code{moto} is a library designed to easily mock out the
10962 @code{boto} library.")
10963 (license license:asl2.0)))
10964
10965 (define-public python-rsa
10966 (package
10967 (name "python-rsa")
10968 (version "3.4.2")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (pypi-uri "rsa" version))
10973 (sha256
10974 (base32
10975 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10976 (build-system python-build-system)
10977 (propagated-inputs
10978 `(("python-pyasn1" ,python-pyasn1)))
10979 (synopsis "Pure-Python RSA implementation")
10980 (description "Python-RSA is a pure-Python RSA implementation. It supports
10981 encryption and decryption, signing and verifying signatures, and key
10982 generation according to PKCS#1 version 1.5. It can be used as a Python
10983 library as well as on the command line.")
10984 (home-page "https://stuvel.eu/rsa")
10985 (license license:asl2.0)))
10986
10987 (define-public python2-rsa
10988 (package-with-python2 python-rsa))
10989
10990 (define-public python-pluggy
10991 (package
10992 (name "python-pluggy")
10993 (version "0.13.1")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "pluggy" version))
10998 (sha256
10999 (base32
11000 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
11001 (build-system python-build-system)
11002 (native-inputs
11003 `(("python-setuptools-scm" ,python-setuptools-scm)))
11004 (synopsis "Plugin and hook calling mechanism for Python")
11005 (description "Pluggy is an extraction of the plugin manager as used by
11006 Pytest but stripped of Pytest specific details.")
11007 (home-page "https://pypi.org/project/pluggy/")
11008 (properties `((python2-variant . ,(delay python2-pluggy))))
11009 (license license:expat)))
11010
11011 (define-public python2-pluggy
11012 (let ((base (package-with-python2 (strip-python2-variant
11013 python-pluggy))))
11014 (package/inherit
11015 base
11016 (propagated-inputs
11017 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11018
11019 ;; This package requires python2-importlib-metadata, but that package
11020 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11021 ;; variant to solve the circular dependency.
11022 (define-public python2-pluggy-bootstrap
11023 (hidden-package
11024 (package/inherit
11025 python2-pluggy
11026 (name "python2-pluggy-bootstrap")
11027 (arguments
11028 `(#:tests? #f
11029 ,@(package-arguments python2-pluggy)))
11030 (propagated-inputs
11031 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11032
11033 (define-public python-tox
11034 (package
11035 (name "python-tox")
11036 (version "3.20.0")
11037 (source
11038 (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "tox" version))
11041 (sha256
11042 (base32
11043 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11044 (build-system python-build-system)
11045 (arguments
11046 ;; FIXME: Tests require pytest-timeout, which itself requires
11047 ;; pytest>=2.8.0 for installation.
11048 '(#:tests? #f))
11049 (propagated-inputs
11050 `(("python-filelock" ,python-filelock)
11051 ("python-packaging" ,python-packaging)
11052 ("python-pluggy" ,python-pluggy)
11053 ("python-py" ,python-py)
11054 ("python-six" ,python-six)
11055 ("python-toml" ,python-toml)
11056 ("python-virtualenv" ,python-virtualenv)))
11057 (native-inputs
11058 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11059 ("python-pytest" ,python-pytest) ; >= 2.3.5
11060 ("python-setuptools-scm" ,python-setuptools-scm)))
11061 (home-page "https://tox.readthedocs.io")
11062 (synopsis "Virtualenv-based automation of test activities")
11063 (description "Tox is a generic virtualenv management and test command line
11064 tool. It can be used to check that a package installs correctly with
11065 different Python versions and interpreters, or run tests in each type of
11066 supported environment, or act as a frontend to continuous integration
11067 servers.")
11068 (license license:expat)))
11069
11070 (define-public python2-tox
11071 (package-with-python2 python-tox))
11072
11073 (define-public python-jmespath
11074 (package
11075 (name "python-jmespath")
11076 (version "0.9.4")
11077 (source
11078 (origin
11079 (method url-fetch)
11080 (uri (pypi-uri "jmespath" version))
11081 (sha256
11082 (base32
11083 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11084 (build-system python-build-system)
11085 (native-inputs
11086 `(("python-nose" ,python-nose)))
11087 (synopsis "JSON Matching Expressions")
11088 (description "JMESPath (pronounced “james path”) is a Python library that
11089 allows one to declaratively specify how to extract elements from a JSON
11090 document.")
11091 (home-page "https://github.com/jmespath/jmespath.py")
11092 (license license:expat)))
11093
11094 (define-public python2-jmespath
11095 (package-with-python2 python-jmespath))
11096
11097 (define-public python-symengine
11098 (package
11099 (name "python-symengine")
11100 (version "0.6.1")
11101 (source
11102 (origin
11103 (method url-fetch)
11104 (uri (pypi-uri "symengine" version))
11105 (sha256
11106 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11107 (build-system python-build-system)
11108 (native-inputs
11109 `(("cmake" ,cmake)
11110 ("python-cython" ,python-cython)))
11111 (inputs
11112 `(("symengine" ,symengine)))
11113 (home-page "https://github.com/symengine/symengine.py")
11114 (synopsis "Python library providing wrappers to SymEngine")
11115 (description
11116 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11117 manipulation library.")
11118 (license license:expat)))
11119
11120 (define-public python-boto
11121 (package
11122 (name "python-boto")
11123 (version "2.49.0")
11124 (source (origin
11125 (method url-fetch)
11126 (uri (pypi-uri "boto" version))
11127 (sha256
11128 (base32
11129 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11130 (build-system python-build-system)
11131 (arguments
11132 ;; XXX: This package is unmaintained and has problems with newer versions
11133 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11134 ;; subset of this library, so keep it around for now, but disable tests.
11135 '(#:tests? #f))
11136 (propagated-inputs
11137 `(("python-paramiko" ,python-paramiko)
11138 ("python-requests" ,python-requests)))
11139 (home-page "https://github.com/boto/boto")
11140 (synopsis "Python interfaces for Amazon Web Services")
11141 (description
11142 "This package provides various facilities for interacting with Amazon
11143 Web Services through Python.
11144
11145 This software is unmaintained, and new projects should use @code{boto3} instead.")
11146 (license license:expat)))
11147
11148 (define-public python-botocore
11149 ;; Note: When updating botocore, also make sure that boto3 and awscli
11150 ;; are compatible.
11151 (package
11152 (name "python-botocore")
11153 (version "1.19.22")
11154 (source
11155 (origin
11156 (method url-fetch)
11157 (uri (pypi-uri "botocore" version))
11158 (sha256
11159 (base32
11160 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11161 (build-system python-build-system)
11162 (arguments
11163 ;; FIXME: Many tests are failing.
11164 '(#:tests? #f))
11165 (propagated-inputs
11166 `(("python-dateutil" ,python-dateutil)
11167 ("python-jmespath" ,python-jmespath)
11168 ("python-urllib3" ,python-urllib3)))
11169 (home-page "https://github.com/boto/botocore")
11170 (synopsis "Low-level interface to AWS")
11171 (description "Botocore is a Python library that provides a low-level
11172 interface to the Amazon Web Services (AWS) API.")
11173 (license license:asl2.0)))
11174
11175 (define-public python2-botocore
11176 (package-with-python2 python-botocore))
11177
11178 (define-public python-boto3
11179 (package
11180 (name "python-boto3")
11181 (version "1.16.22")
11182 (home-page "https://github.com/boto/boto3")
11183 (source (origin
11184 (method git-fetch)
11185 (uri (git-reference (url home-page) (commit version)))
11186 (file-name (git-file-name name version))
11187 (sha256
11188 (base32
11189 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11190 (arguments
11191 `(#:phases
11192 (modify-phases %standard-phases
11193 (add-after 'unpack 'delete-network-tests
11194 ;; Deleting integration tests because they are trying to connect to AWS.
11195 (lambda _
11196 (delete-file-recursively "tests/integration")
11197 #t)))))
11198 (build-system python-build-system)
11199 (native-inputs
11200 `(("python-nose" ,python-nose)
11201 ("python-mock" ,python-mock)))
11202 (propagated-inputs
11203 `(("python-botocore" ,python-botocore)
11204 ("python-jmespath" ,python-jmespath)
11205 ("python-s3transfer" ,python-s3transfer)))
11206 (synopsis "AWS SDK for Python")
11207 (description
11208 "Boto3 is a Python library for writing programs that interact with
11209 @acronym{AWS,Amazon Web Services}.")
11210 (license license:asl2.0)))
11211
11212 (define-public python-pyfiglet
11213 (package
11214 (name "python-pyfiglet")
11215 (version "0.8.post1")
11216 (source
11217 (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "pyfiglet" version))
11220 (sha256
11221 (base32
11222 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11223 (build-system python-build-system)
11224 (home-page "https://github.com/pwaller/pyfiglet")
11225 (synopsis "Draw ASCII art big letters in Python")
11226 (description "This module lets you draw large letter from ordinary characters
11227 in pure Python.")
11228 (license license:expat)))
11229
11230 (define-public python-xdo
11231 (package
11232 (name "python-xdo")
11233 (version "0.3")
11234 (source (origin
11235 (method url-fetch)
11236 (uri (string-append
11237 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11238 "python-xdo_" version ".orig.tar.gz"))
11239 (sha256
11240 (base32
11241 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11242 (build-system python-build-system)
11243 (arguments
11244 '(#:phases
11245 (modify-phases %standard-phases
11246 (add-before 'install 'patch-libxdo-path
11247 ;; Hardcode the path of dynamically loaded libxdo library.
11248 (lambda* (#:key inputs #:allow-other-keys)
11249 (let ((libxdo (string-append
11250 (assoc-ref inputs "xdotool")
11251 "/lib/libxdo.so")))
11252 (substitute* "xdo/_xdo.py"
11253 (("find_library\\(\"xdo\"\\)")
11254 (simple-format #f "\"~a\"" libxdo)))
11255 #t))))
11256 #:tests? #f)) ; no tests provided
11257 (propagated-inputs
11258 `(("python-six" ,python-six)))
11259 (inputs
11260 `(("xdotool" ,xdotool)
11261 ("libX11" ,libx11)))
11262 (home-page "https://tracker.debian.org/pkg/python-xdo")
11263 (synopsis "Python library for simulating X11 keyboard/mouse input")
11264 (description "Provides bindings to libxdo for manipulating X11 via simulated
11265 input. (Note that this is mostly a legacy library; you may wish to look at
11266 python-xdo for newer bindings.)")
11267 (license license:bsd-3)))
11268
11269 (define-public python2-xdo
11270 (package-with-python2 python-xdo))
11271
11272 (define-public python-mako
11273 (package
11274 (name "python-mako")
11275 (version "1.1.3")
11276 (source
11277 (origin
11278 (method url-fetch)
11279 (uri (pypi-uri "Mako" version))
11280 (sha256
11281 (base32
11282 "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
11283 (build-system python-build-system)
11284 (arguments
11285 `(#:phases (modify-phases %standard-phases
11286 (replace 'check
11287 (lambda* (#:key tests? #:allow-other-keys)
11288 (if tests?
11289 (invoke "nosetests" "-v")
11290 (format #t "test suite not run~%"))
11291 #t)))))
11292 (propagated-inputs
11293 `(("python-markupsafe" ,python-markupsafe)))
11294 (native-inputs
11295 `(("python-mock" ,python-mock)
11296 ("python-nose" ,python-nose)))
11297 (home-page "https://www.makotemplates.org/")
11298 (synopsis "Templating language for Python")
11299 (description "Mako is a templating language for Python that compiles
11300 templates into Python modules.")
11301 (license license:expat)))
11302
11303 (define-public python2-mako
11304 (package-with-python2 python-mako))
11305
11306 (define-public python-waitress
11307 (package
11308 (name "python-waitress")
11309 (version "1.1.0")
11310 (source
11311 (origin
11312 (method url-fetch)
11313 (uri (pypi-uri "waitress" version))
11314 (patches (search-patches "python-waitress-fix-tests.patch"))
11315 (sha256
11316 (base32
11317 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11318 (build-system python-build-system)
11319 (home-page "https://github.com/Pylons/waitress")
11320 (synopsis "Waitress WSGI server")
11321 (description "Waitress is meant to be a production-quality pure-Python WSGI
11322 server with very acceptable performance.")
11323 (license license:zpl2.1)))
11324
11325 (define-public python2-waitress
11326 (package-with-python2 python-waitress))
11327
11328 (define-public python-whichcraft
11329 (package
11330 (name "python-whichcraft")
11331 (version "0.6.1")
11332 (source
11333 (origin
11334 (method url-fetch)
11335 (uri (pypi-uri "whichcraft" version))
11336 (sha256
11337 (base32
11338 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11339 (build-system python-build-system)
11340 (native-inputs
11341 `(("python-pytest" ,python-pytest)))
11342 (home-page "https://github.com/pydanny/whichcraft")
11343 (synopsis "Cross-platform cross-python shutil.which functionality")
11344 (description
11345 "This package provides a shim of the shutil.which function that's
11346 designed to work across multiple versions of Python.")
11347 (license license:bsd-3)))
11348
11349 (define-public python-cookiecutter
11350 (package
11351 (name "python-cookiecutter")
11352 (version "1.7.2")
11353 (source
11354 (origin
11355 (method url-fetch)
11356 (uri (pypi-uri "cookiecutter" version))
11357 (sha256
11358 (base32
11359 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11360 (build-system python-build-system)
11361 (native-inputs
11362 `(("python-freezegun" ,python-freezegun)
11363 ("python-pytest" ,python-pytest)
11364 ("python-pytest-catchlog" ,python-pytest-catchlog)
11365 ("python-pytest-cov" ,python-pytest-cov)
11366 ("python-pytest-mock" ,python-pytest-mock)))
11367 (propagated-inputs
11368 `(("python-binaryornot" ,python-binaryornot)
11369 ("python-click" ,python-click)
11370 ("python-future" ,python-future)
11371 ("python-jinja2" ,python-jinja2)
11372 ("python-jinja2-time" ,python-jinja2-time)
11373 ("python-poyo" ,python-poyo)
11374 ("python-requests" ,python-requests)
11375 ("python-slugify" ,python-slugify)
11376 ("python-text-unidecode" ,python-text-unidecode)
11377 ("python-whichcraft" ,python-whichcraft)))
11378 (home-page "https://github.com/cookiecutter/cookiecutter")
11379 (synopsis
11380 "Command-line utility that creates projects from project templates")
11381 (description
11382 "This package provides a command-line utility that creates projects from
11383 project templates, e.g. creating a Python package project from a Python package
11384 project template.")
11385 (license license:bsd-3)))
11386
11387 (define-public python-pyquery
11388 (package
11389 (name "python-pyquery")
11390 (version "1.2.17")
11391 (source
11392 (origin
11393 (method url-fetch)
11394 (uri (pypi-uri "pyquery" version))
11395 (sha256
11396 (base32
11397 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11398 (build-system python-build-system)
11399 (native-inputs
11400 `(("python-webob" ,python-webob)
11401 ("python-webtest" ,python-webtest)))
11402 (propagated-inputs
11403 `(("python-lxml" ,python-lxml)
11404 ("python-cssselect" ,python-cssselect)))
11405 (home-page "https://github.com/gawel/pyquery")
11406 (synopsis "Make jQuery-like queries on xml documents")
11407 (description "pyquery allows you to make jQuery queries on xml documents.
11408 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11409 fast xml and html manipulation.")
11410 (license license:bsd-3)))
11411
11412 (define-public python-anyjson
11413 (package
11414 (name "python-anyjson")
11415 (version "0.3.3")
11416 (source
11417 (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "anyjson" version))
11420 (sha256
11421 (base32
11422 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11423 (build-system python-build-system)
11424 (arguments
11425 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11426 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11427 ;; whatever) so this transformation needs to be done before the tests
11428 ;; can be run. Maybe we could add a build step to transform beforehand
11429 ;; but it could be annoying/difficult.
11430 ;; We can enable tests for the Python 2 version, though, and do below.
11431 #:tests? #f))
11432 (home-page "https://bitbucket.org/runeh/anyjson/")
11433 (synopsis
11434 "Wraps best available JSON implementation in a common interface")
11435 (description
11436 "Anyjson loads whichever is the fastest JSON module installed
11437 and provides a uniform API regardless of which JSON implementation is used.")
11438 (license license:bsd-3)
11439 (properties `((python2-variant . ,(delay python2-anyjson))))))
11440
11441 (define-public python2-anyjson
11442 (let ((anyjson (package-with-python2
11443 (strip-python2-variant python-anyjson))))
11444 (package
11445 (inherit anyjson)
11446 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11447 #:tests? #t
11448 ,@(package-arguments anyjson)))
11449 (native-inputs `(("python2-nose" ,python2-nose))))))
11450
11451 (define-public python-amqp
11452 (package
11453 (name "python-amqp")
11454 (version "2.3.2")
11455 (source
11456 (origin
11457 (method url-fetch)
11458 (uri (pypi-uri "amqp" version))
11459 (sha256
11460 (base32
11461 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11462 (build-system python-build-system)
11463 (native-inputs
11464 `(("python-case" ,python-case)
11465 ("python-pytest-sugar" ,python-pytest-sugar)
11466 ("python-mock" ,python-mock)))
11467 (propagated-inputs
11468 `(("python-vine" ,python-vine)))
11469 (home-page "https://github.com/celery/py-amqp")
11470 (synopsis
11471 "Low-level AMQP client for Python (fork of amqplib)")
11472 (description
11473 "This is a fork of amqplib which was originally written by Barry Pederson.
11474 It is maintained by the Celery project, and used by kombu as a pure python
11475 alternative when librabbitmq is not available.")
11476 (license license:lgpl2.1+)
11477 (properties `((python2-variant . ,(delay python2-amqp))))))
11478
11479 (define-public python2-amqp
11480 (let ((amqp (package-with-python2
11481 (strip-python2-variant python-amqp))))
11482 (package
11483 (inherit amqp)
11484 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11485 ;; unmaintained. Weirdly, does not do this on the python 3
11486 ;; version?
11487 #:tests? #f
11488 ,@(package-arguments amqp))))))
11489
11490 (define-public python-txamqp
11491 (package
11492 (name "python-txamqp")
11493 (version "0.8.2")
11494 (source
11495 (origin
11496 (method url-fetch)
11497 (uri (pypi-uri "txAMQP" version))
11498 (sha256
11499 (base32
11500 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11501 (build-system python-build-system)
11502 (propagated-inputs
11503 `(("python-six" ,python-six)
11504 ("python-twisted" ,python-twisted)))
11505 (home-page "https://github.com/txamqp/txamqp")
11506 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11507 (description
11508 "This package provides a Python library for communicating with AMQP peers
11509 and brokers using the asynchronous networking framework Twisted. It contains
11510 all the necessary code to connect, send and receive messages to/from an
11511 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11512 also includes support for using Thrift RPC over AMQP in Twisted
11513 applications.")
11514 (license license:asl2.0)))
11515
11516 (define-public python2-txamqp
11517 (package-with-python2 python-txamqp))
11518
11519 (define-public python-kombu
11520 (package
11521 (name "python-kombu")
11522 (version "4.2.2")
11523 (source
11524 (origin
11525 (method url-fetch)
11526 (uri (pypi-uri "kombu" version))
11527 (sha256
11528 (base32
11529 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11530 (build-system python-build-system)
11531 (native-inputs
11532 `(("python-mock" ,python-mock)
11533 ("python-case" ,python-case)
11534 ("python-pyro4" ,python-pyro4)
11535 ("python-pytest-sugar" ,python-pytest-sugar)
11536 ("python-pytz" ,python-pytz)))
11537 (propagated-inputs
11538 `(("python-anyjson" ,python-anyjson)
11539 ("python-amqp" ,python-amqp)
11540 ("python-redis" ,python-redis)))
11541 (home-page "https://kombu.readthedocs.io")
11542 (synopsis "Message passing library for Python")
11543 (description "The aim of Kombu is to make messaging in Python as easy as
11544 possible by providing an idiomatic high-level interface for the AMQ protocol,
11545 and also provide proven and tested solutions to common messaging problems.
11546 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11547 message orientation, queuing, routing, reliability and security, for which the
11548 RabbitMQ messaging server is the most popular implementation.")
11549 (license license:bsd-3)
11550 (properties `((python2-variant . ,(delay python2-kombu))))))
11551
11552 (define-public python2-kombu
11553 (let ((kombu (package-with-python2
11554 (strip-python2-variant python-kombu))))
11555 (package
11556 (inherit kombu)
11557 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11558 ;; It works fine on the python3 variant.
11559 #:tests? #f
11560 ,@(package-arguments kombu)))
11561 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11562 ,@(package-native-inputs kombu))))))
11563
11564 (define-public python-billiard
11565 (package
11566 (name "python-billiard")
11567 (version "3.5.0.5")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "billiard" version))
11572 (sha256
11573 (base32
11574 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11575 (build-system python-build-system)
11576 (native-inputs
11577 `(("python-case" ,python-case)
11578 ("python-pytest" ,python-pytest)))
11579 (home-page "https://github.com/celery/billiard")
11580 (synopsis
11581 "Python multiprocessing fork with improvements and bugfixes")
11582 (description
11583 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11584 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11585 pyprocessing package. This standalone variant is intended to be compatible with
11586 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11587 (license license:bsd-3)
11588 (properties `((python2-variant . ,(delay python2-billiard))))))
11589
11590 (define-public python2-billiard
11591 (let ((billiard (package-with-python2
11592 (strip-python2-variant python-billiard))))
11593 (package
11594 (inherit billiard)
11595 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11596 ("python2-mock" ,python2-mock)
11597 ,@(package-native-inputs billiard))))))
11598
11599 (define-public python-celery
11600 (package
11601 (name "python-celery")
11602 (version "4.2.1")
11603 (source
11604 (origin
11605 (method url-fetch)
11606 (uri (pypi-uri "celery" version))
11607 (sha256
11608 (base32
11609 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11610 (build-system python-build-system)
11611 (arguments
11612 '(;; TODO The tests fail with Python 3.7
11613 ;; https://github.com/celery/celery/issues/4849
11614 #:tests? #f
11615 #:phases
11616 (modify-phases %standard-phases
11617 (add-after 'unpack 'patch-requirements
11618 (lambda _
11619 (substitute* "requirements/test.txt"
11620 (("pytest>=3\\.0,<3\\.3")
11621 "pytest>=3.0"))
11622 #t)))))
11623 (native-inputs
11624 `(("python-case" ,python-case)
11625 ("python-pytest" ,python-pytest)))
11626 (propagated-inputs
11627 `(("python-pytz" ,python-pytz)
11628 ("python-billiard" ,python-billiard)
11629 ("python-kombu" ,python-kombu)))
11630 (home-page "https://celeryproject.org")
11631 (synopsis "Distributed Task Queue")
11632 (description "Celery is an asynchronous task queue/job queue based on
11633 distributed message passing. It is focused on real-time operation, but
11634 supports scheduling as well. The execution units, called tasks, are executed
11635 concurrently on a single or more worker servers using multiprocessing,
11636 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11637 synchronously (wait until ready).")
11638 (license license:bsd-3)
11639 (properties `((python2-variant . ,(delay python2-celery))))))
11640
11641 (define-public python2-celery
11642 (let ((celery (package-with-python2
11643 (strip-python2-variant python-celery))))
11644 (package
11645 (inherit celery)
11646 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11647 ("python2-mock" ,python2-mock)
11648 ,@(package-native-inputs celery))))))
11649
11650 (define-public python-translitcodec
11651 (package
11652 (name "python-translitcodec")
11653 (version "0.4.0")
11654 (source
11655 (origin
11656 (method url-fetch)
11657 (uri (pypi-uri "translitcodec" version))
11658 (sha256
11659 (base32
11660 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11661 (build-system python-build-system)
11662 (arguments
11663 `(#:tests? #f)) ; no tests provided
11664 (home-page
11665 "https://github.com/claudep/translitcodec")
11666 (synopsis
11667 "Unicode to 8-bit charset transliteration codec")
11668 (description
11669 "This package contains codecs for transliterating ISO 10646 texts into
11670 best-effort representations using smaller coded character sets (ASCII,
11671 ISO 8859, etc.).")
11672 (license license:expat)))
11673
11674 (define-public python2-translitcodec
11675 (package-with-python2 python-translitcodec))
11676
11677 (define-public python-editor
11678 (package
11679 (name "python-editor")
11680 (version "1.0.4")
11681 (source
11682 (origin
11683 (method url-fetch)
11684 (uri (pypi-uri "python-editor" version))
11685 (sha256
11686 (base32
11687 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11688 (build-system python-build-system)
11689 (arguments
11690 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11691 (home-page "https://github.com/fmoo/python-editor")
11692 (synopsis "Programmatically open an editor, capture the result")
11693 (description
11694 "python-editor is a library that provides the editor module for
11695 programmatically interfacing with your system's $EDITOR.")
11696 (license license:asl2.0)))
11697
11698 (define-public python2-editor
11699 (package-with-python2 python-editor))
11700
11701 (define-public python-vobject
11702 (package
11703 (name "python-vobject")
11704 (version "0.9.6.1")
11705 (source (origin
11706 (method url-fetch)
11707 (uri (pypi-uri "vobject" version))
11708 (sha256
11709 (base32
11710 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11711 (build-system python-build-system)
11712 (arguments
11713 '(;; The test suite relies on some non-portable Windows interfaces.
11714 #:tests? #f))
11715 (propagated-inputs
11716 `(("python-dateutil" ,python-dateutil)
11717 ("python-pyicu" ,python-pyicu)))
11718 (synopsis "Parse and generate vCard and vCalendar files")
11719 (description "Vobject is intended to be a full featured Python package for
11720 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11721 are supported and well tested. vCard 3.0 files are supported, and all data
11722 should be imported, but only a few components are understood in a sophisticated
11723 way.")
11724 (home-page "https://eventable.github.io/vobject/")
11725 (license license:asl2.0)))
11726
11727 (define-public python2-vobject
11728 (package-with-python2 python-vobject))
11729
11730 (define-public python-munkres
11731 (package
11732 (name "python-munkres")
11733 (version "1.0.8")
11734 (source (origin
11735 (method url-fetch)
11736 (uri (pypi-uri "munkres" version))
11737 (sha256
11738 (base32
11739 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11740 (build-system python-build-system)
11741 (arguments
11742 '(#:tests? #f)) ; no test suite
11743 (home-page "https://software.clapper.org/munkres/")
11744 (synopsis "Implementation of the Munkres algorithm")
11745 (description "The Munkres module provides an implementation of the Munkres
11746 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11747 useful for solving the Assignment Problem.")
11748 (license license:bsd-3)))
11749
11750 (define-public python2-munkres
11751 (package-with-python2 python-munkres))
11752
11753 (define-public python-whoosh
11754 (package
11755 (name "python-whoosh")
11756 (version "2.7.4")
11757 (source
11758 (origin
11759 (method url-fetch)
11760 (uri (pypi-uri "Whoosh" version))
11761 (sha256
11762 (base32
11763 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11764 (build-system python-build-system)
11765 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11766 (native-inputs
11767 `(("python-pytest" ,python-pytest)))
11768 (home-page "https://bitbucket.org/mchaput/whoosh")
11769 (synopsis "Full text indexing, search, and spell checking library")
11770 (description
11771 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11772 checking library.")
11773 (license license:bsd-2)))
11774
11775 (define-public python2-whoosh
11776 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11777 (package (inherit whoosh)
11778 (propagated-inputs
11779 `(("python2-backport-ssl-match-hostname"
11780 ,python2-backport-ssl-match-hostname)
11781 ,@(package-propagated-inputs whoosh))))))
11782
11783 (define-public python-pathlib
11784 (package
11785 (name "python-pathlib")
11786 (version "1.0.1")
11787 (source (origin
11788 (method url-fetch)
11789 (uri (pypi-uri "pathlib" version))
11790 (sha256
11791 (base32
11792 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11793 (build-system python-build-system)
11794 ;; The tests depend on the internal "test" module, which does not provide
11795 ;; a stable interface.
11796 (arguments `(#:tests? #f))
11797 (home-page "https://pathlib.readthedocs.org/")
11798 (synopsis "Object-oriented file system paths")
11799 (description "Pathlib offers a set of classes to handle file system paths.
11800 It offers the following advantages over using string objects:
11801
11802 @enumerate
11803 @item No more cumbersome use of os and os.path functions. Everything can
11804 be done easily through operators, attribute accesses, and method calls.
11805 @item Embodies the semantics of different path types. For example,
11806 comparing Windows paths ignores casing.
11807 @item Well-defined semantics, eliminating any inconsistencies or
11808 ambiguities (forward vs. backward slashes, etc.).
11809 @end enumerate
11810
11811 Note: In Python 3.4, pathlib is now part of the standard library. For other
11812 Python versions please consider python-pathlib2 instead, which tracks the
11813 standard library module. This module (python-pathlib) isn't maintained
11814 anymore.")
11815 (license license:expat)))
11816
11817 (define-public python2-pathlib
11818 (package-with-python2 python-pathlib))
11819
11820 (define-public python2-pathlib2
11821 (package
11822 (name "python2-pathlib2")
11823 (version "2.3.5")
11824 (source (origin
11825 (method url-fetch)
11826 (uri (pypi-uri "pathlib2" version))
11827 (sha256
11828 (base32
11829 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11830 (build-system python-build-system)
11831 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11832 ;; version is 3.4 which already includes this package as part of the
11833 ;; standard library.
11834 (arguments
11835 `(#:python ,python-2))
11836 (propagated-inputs
11837 `(("python2-scandir" ,python2-scandir)
11838 ("python2-six" ,python2-six)))
11839 (home-page "https://pypi.org/project/pathlib2/")
11840 (synopsis "Object-oriented file system paths - backport of standard
11841 pathlib module")
11842 (description "The goal of pathlib2 is to provide a backport of standard
11843 pathlib module which tracks the standard library module, so all the newest
11844 features of the standard pathlib can be used also on older Python versions.
11845
11846 Pathlib offers a set of classes to handle file system paths. It offers the
11847 following advantages over using string objects:
11848
11849 @enumerate
11850 @item No more cumbersome use of os and os.path functions. Everything can
11851 be done easily through operators, attribute accesses, and method calls.
11852 @item Embodies the semantics of different path types. For example,
11853 comparing Windows paths ignores casing.
11854 @item Well-defined semantics, eliminating any inconsistencies or
11855 ambiguities (forward vs. backward slashes, etc.).
11856 @end enumerate")
11857 (license license:expat)))
11858
11859 (define-public python2-pathlib2-bootstrap
11860 (hidden-package
11861 (package
11862 (inherit python2-pathlib2)
11863 (name "python2-pathlib2-bootstrap")
11864 (propagated-inputs
11865 `(("python2-scandir" ,python2-scandir)
11866 ("python2-six" ,python2-six-bootstrap))))))
11867
11868 (define-public python-jellyfish
11869 (package
11870 (name "python-jellyfish")
11871 (version "0.5.6")
11872 (source (origin
11873 (method url-fetch)
11874 (uri (pypi-uri "jellyfish" version))
11875 (sha256
11876 (base32
11877 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11878 (build-system python-build-system)
11879 (native-inputs
11880 `(("python-pytest" ,python-pytest)))
11881 (home-page "https://github.com/jamesturk/jellyfish")
11882 (synopsis "Approximate and phonetic matching of strings")
11883 (description "Jellyfish uses a variety of string comparison and phonetic
11884 encoding algorithms to do fuzzy string matching.")
11885 (license license:bsd-2)
11886 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11887
11888 (define-public python2-jellyfish
11889 (let ((jellyfish (package-with-python2
11890 (strip-python2-variant python-jellyfish))))
11891 (package (inherit jellyfish)
11892 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11893 ,@(package-native-inputs jellyfish))))))
11894
11895 (define-public python2-unicodecsv
11896 (package
11897 (name "python2-unicodecsv")
11898 (version "0.14.1")
11899 (source (origin
11900 (method git-fetch)
11901 ;; The test suite is not included in the PyPi release.
11902 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11903 (uri (git-reference
11904 (url "https://github.com/jdunck/python-unicodecsv")
11905 (commit version)))
11906 (file-name (git-file-name name version))
11907 (sha256
11908 (base32
11909 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11910 (build-system python-build-system)
11911 (arguments
11912 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11913 #:python ,python-2))
11914 (native-inputs
11915 `(("python2-unittest2" ,python2-unittest2)))
11916 (home-page "https://github.com/jdunck/python-unicodecsv")
11917 (synopsis "Unicode CSV module for Python 2")
11918 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11919 module, adding support for Unicode strings.")
11920 (license license:bsd-2)))
11921
11922 (define-public python-rarfile
11923 (package
11924 (name "python-rarfile")
11925 (version "2.8")
11926 (source (origin
11927 (method url-fetch)
11928 (uri (pypi-uri "rarfile" version))
11929 (sha256
11930 (base32
11931 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11932 (build-system python-build-system)
11933 (arguments
11934 '(#:phases
11935 (modify-phases %standard-phases
11936 (replace 'check
11937 ;; Many tests fail, but the installation proceeds.
11938 (lambda _ (invoke "make" "-C" "test" "test"))))))
11939 (native-inputs
11940 `(("which" ,which))) ; required for tests
11941 (propagated-inputs
11942 `(("libarchive" ,libarchive)))
11943 (home-page "https://github.com/markokr/rarfile")
11944 (synopsis "RAR archive reader for Python")
11945 (description "This is Python module for RAR archive reading. The interface
11946 is made as zipfile like as possible.")
11947 (license license:isc)))
11948
11949 (define-public python2-rarfile
11950 (package-with-python2 python-rarfile))
11951
11952 (define-public python-magic
11953 (package
11954 (name "python-magic")
11955 (version "0.4.15")
11956 (source
11957 (origin
11958 (method url-fetch)
11959 (uri (pypi-uri "python-magic" version))
11960 (sha256
11961 (base32
11962 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11963 (file-name (string-append name "-" version "-checkout"))))
11964 (build-system python-build-system)
11965 (arguments
11966 ;; The tests are unreliable, so don't run them. The tests fail
11967 ;; under Python3 because they were written for Python2 and
11968 ;; contain import statements that do not work in Python3. One of
11969 ;; the tests fails under Python2 because its assertions are
11970 ;; overly stringent; it relies on comparing output strings which
11971 ;; are brittle and can change depending on the version of
11972 ;; libmagic being used and the system on which the test is
11973 ;; running. In my case, under GuixSD 0.10.0, only one test
11974 ;; failed, and it seems to have failed only because the version
11975 ;; of libmagic that is packaged in Guix outputs a slightly
11976 ;; different (but not wrong) string than the one that the test
11977 ;; expected.
11978 '(#:tests? #f
11979 #:phases (modify-phases %standard-phases
11980 ;; Replace a specific method call with a hard-coded
11981 ;; path to the necessary libmagic.so file in the
11982 ;; store. If we don't do this, then the method call
11983 ;; will fail to find the libmagic.so file, which in
11984 ;; turn will cause any application using
11985 ;; python-magic to fail.
11986 (add-before 'build 'hard-code-path-to-libmagic
11987 (lambda* (#:key inputs #:allow-other-keys)
11988 (let ((file (assoc-ref inputs "file")))
11989 (substitute* "magic.py"
11990 (("ctypes.util.find_library\\('magic'\\)")
11991 (string-append "'" file "/lib/libmagic.so'")))
11992 #t)))
11993 (add-before 'install 'disable-egg-compression
11994 (lambda _
11995 (let ((port (open-file "setup.cfg" "a")))
11996 (display "\n[easy_install]\nzip_ok = 0\n"
11997 port)
11998 (close-port port)
11999 #t))))))
12000 (inputs
12001 ;; python-magic needs to be able to find libmagic.so.
12002 `(("file" ,file)))
12003 (home-page
12004 "https://github.com/ahupp/python-magic")
12005 (synopsis
12006 "File type identification using libmagic")
12007 (description
12008 "This module uses ctypes to access the libmagic file type
12009 identification library. It makes use of the local magic database and
12010 supports both textual and MIME-type output. Note that this module and
12011 the python-file module both provide a \"magic.py\" file; these two
12012 modules, which are different and were developed separately, both serve
12013 the same purpose: to provide Python bindings for libmagic.")
12014 (license license:expat)))
12015
12016 (define-public python2-magic
12017 (package-with-python2 python-magic))
12018
12019 (define-public python2-s3cmd
12020 (package
12021 (name "python2-s3cmd")
12022 (version "1.6.1")
12023 (source
12024 (origin
12025 (method url-fetch)
12026 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12027 "s3cmd-" version ".tar.gz"))
12028 (sha256
12029 (base32
12030 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12031 (build-system python-build-system)
12032 (arguments
12033 ;; s3cmd is written for python2 only and contains no tests.
12034 `(#:python ,python-2
12035 #:tests? #f))
12036 (propagated-inputs
12037 `(("python2-dateutil" ,python2-dateutil)
12038 ;; The python-file package also provides a magic.py module.
12039 ;; This is an unfortunate state of affairs; however, s3cmd
12040 ;; fails to install if it cannot find specifically the
12041 ;; python-magic package. Thus we include it, instead of using
12042 ;; python-file. Ironically, s3cmd sometimes works better
12043 ;; without libmagic bindings at all:
12044 ;; https://github.com/s3tools/s3cmd/issues/198
12045 ("python2-magic" ,python2-magic)))
12046 (home-page "https://s3tools.org/s3cmd")
12047 (synopsis "Command line tool for S3-compatible storage services")
12048 (description
12049 "S3cmd is a command line tool for uploading, retrieving and managing data
12050 in storage services that are compatible with the Amazon Simple Storage
12051 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12052 GnuPG encryption, and more. It also supports management of Amazon's
12053 CloudFront content delivery network.")
12054 (license license:gpl2+)))
12055
12056 (define-public python-pkgconfig
12057 (package
12058 (name "python-pkgconfig")
12059 (version "1.3.1")
12060 (source
12061 (origin
12062 (method url-fetch)
12063 (uri (pypi-uri "pkgconfig" version))
12064 (sha256
12065 (base32
12066 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12067 (build-system python-build-system)
12068 (native-inputs
12069 `(("python-nose" ,python-nose)))
12070 (inputs
12071 `(("pkg-config" ,pkg-config)))
12072 (arguments
12073 `(#:phases
12074 (modify-phases %standard-phases
12075 (add-before 'build 'patch
12076 ;; Hard-code the path to pkg-config.
12077 (lambda _
12078 (substitute* "pkgconfig/pkgconfig.py"
12079 (("cmd = 'pkg-config")
12080 (string-append "cmd = '" (which "pkg-config"))))
12081 #t))
12082 (replace 'check
12083 (lambda _
12084 (invoke "nosetests" "test.py"))))))
12085 (home-page "https://github.com/matze/pkgconfig")
12086 (synopsis "Python interface for pkg-config")
12087 (description "This module provides a Python interface to pkg-config. It
12088 can be used to find all pkg-config packages, check if a package exists,
12089 check if a package meets certain version requirements, query CFLAGS and
12090 LDFLAGS and parse the output to build extensions with setup.py.")
12091 (license license:expat)))
12092
12093 (define-public python2-pkgconfig
12094 (package-with-python2 python-pkgconfig))
12095
12096 (define-public python-bz2file
12097 (package
12098 (name "python-bz2file")
12099 (version "0.98")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "bz2file" version))
12104 (sha256
12105 (base32
12106 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12107 (build-system python-build-system)
12108 (arguments
12109 `(#:tests? #f)) ; Tests use deprecated python modules.
12110 (home-page "https://github.com/nvawda/bz2file")
12111 (synopsis "Read and write bzip2-compressed files")
12112 (description
12113 "Bz2file is a Python library for reading and writing bzip2-compressed
12114 files. It contains a drop-in replacement for the I/O interface in the
12115 standard library's @code{bz2} module, including features from the latest
12116 development version of CPython that are not available in older releases.")
12117 (license license:asl2.0)))
12118
12119 (define-public python2-bz2file
12120 (package-with-python2 python-bz2file))
12121
12122 (define-public python-future
12123 (package
12124 (name "python-future")
12125 (version "0.17.1")
12126 (source
12127 (origin
12128 (method url-fetch)
12129 (uri (pypi-uri "future" version))
12130 (sha256
12131 (base32
12132 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12133 (build-system python-build-system)
12134 ;; Many tests connect to the network or are otherwise flawed.
12135 ;; https://github.com/PythonCharmers/python-future/issues/210
12136 (arguments
12137 `(#:tests? #f))
12138 (home-page "https://python-future.org")
12139 (synopsis "Single-source support for Python 3 and 2")
12140 (description
12141 "@code{python-future} is the missing compatibility layer between Python 2 and
12142 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12143 to support both Python 2 and Python 3 with minimal overhead.")
12144 (license license:expat)))
12145
12146 (define-public python2-future
12147 (package-with-python2 python-future))
12148
12149 (define-public python-cysignals
12150 (package
12151 (name "python-cysignals")
12152 (version "1.9.0")
12153 (source
12154 (origin
12155 (method url-fetch)
12156 (uri (pypi-uri "cysignals" version))
12157 (sha256
12158 (base32
12159 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12160 (build-system python-build-system)
12161 (native-inputs
12162 `(("python-cython" ,python-cython)
12163 ("python-sphinx" ,python-sphinx)))
12164 (inputs
12165 `(("pari-gp" ,pari-gp)))
12166 (arguments
12167 `(#:modules ((guix build python-build-system)
12168 ((guix build gnu-build-system) #:prefix gnu:)
12169 (guix build utils))
12170 ;; FIXME: Tests are executed after installation and currently fail
12171 ;; when not installing into standard locations; the author is working
12172 ;; on a fix.
12173 #:tests? #f
12174 #:phases
12175 (modify-phases %standard-phases
12176 (add-before
12177 'build 'configure
12178 (assoc-ref gnu:%standard-phases 'configure)))))
12179 (home-page
12180 "https://github.com/sagemath/cysignals")
12181 (synopsis
12182 "Handling of interrupts and signals for Cython")
12183 (description
12184 "The cysignals package provides mechanisms to handle interrupts (and
12185 other signals and errors) in Cython code, using two related approaches,
12186 for mixed Cython/Python code or external C libraries and pure Cython code,
12187 respectively.")
12188 (license license:lgpl3+)))
12189
12190 (define-public python2-cysignals
12191 (package-with-python2 python-cysignals))
12192
12193 (define-public python2-shedskin
12194 (package
12195 (name "python2-shedskin")
12196 (version "0.9.4")
12197 (source
12198 (origin
12199 (method url-fetch)
12200 (uri (string-append "https://github.com/shedskin/shedskin/"
12201 "releases/download/v" version
12202 "/shedskin-" version ".tgz"))
12203 (sha256
12204 (base32
12205 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12206 (build-system python-build-system)
12207 (arguments
12208 `(#:python ,python-2
12209 #:phases (modify-phases %standard-phases
12210 (add-after 'unpack 'fix-resulting-include-libs
12211 (lambda* (#:key inputs #:allow-other-keys)
12212 (let ((libgc (assoc-ref inputs "libgc"))
12213 (pcre (assoc-ref inputs "pcre")))
12214 (substitute* "shedskin/makefile.py"
12215 (("variable == 'CCFLAGS':[ ]*")
12216 (string-append "variable == 'CCFLAGS':\n"
12217 " line += ' -I " pcre "/include"
12218 " -I " libgc "/include'"))
12219 (("variable == 'LFLAGS':[ ]*")
12220 (string-append "variable == 'LFLAGS':\n"
12221 " line += ' -L" pcre "/lib"
12222 " -L " libgc "/lib'")))
12223 #t))))))
12224 (inputs `(("pcre" ,pcre)
12225 ("libgc" ,libgc)))
12226 (home-page "https://shedskin.github.io/")
12227 (synopsis "Experimental Python-2 to C++ Compiler")
12228 (description (string-append "This is an experimental compiler for a subset of
12229 Python. It generates C++ code and a Makefile."))
12230 (license (list license:gpl3 license:bsd-3 license:expat))))
12231
12232 (define-public python2-rope
12233 (package
12234 (name "python2-rope")
12235 (version "0.11.0")
12236 (source
12237 (origin
12238 (method url-fetch)
12239 (uri (pypi-uri "rope" version))
12240 (sha256
12241 (base32
12242 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12243 (arguments
12244 ;; Rope has only partial python3 support, see `python-rope'
12245 `(#:python ,python-2))
12246 (build-system python-build-system)
12247 (native-inputs
12248 `(("python2-unittest2" ,python2-unittest2)))
12249 (home-page "https://github.com/python-rope/rope")
12250 (synopsis "Refactoring library for Python")
12251 (description "Rope is a refactoring library for Python. It facilitates
12252 the renaming, moving and extracting of attributes, functions, modules, fields
12253 and parameters in Python 2 source code. These refactorings can also be applied
12254 to occurrences in strings and comments.")
12255 (license license:gpl2)))
12256
12257 (define-public python-rope
12258 (package
12259 (inherit python2-rope)
12260 (name "python-rope")
12261 (arguments `(#:python ,python-wrapper
12262 ;; XXX: Only partial python3 support, results in some failing
12263 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12264 #:tests? #f))
12265 (properties `((python2-variant . ,(delay python2-rope))))))
12266
12267 (define-public python-py3status
12268 (package
12269 (name "python-py3status")
12270 (version "3.21")
12271 (source
12272 (origin
12273 (method url-fetch)
12274 (uri (pypi-uri "py3status" version))
12275 (sha256
12276 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12277 (build-system python-build-system)
12278 (inputs
12279 `(("file" ,file)))
12280 (arguments
12281 '(#:phases
12282 (modify-phases %standard-phases
12283 ;; 'file' is used for detection of configuration file encoding
12284 ;; let's make link the dependency to particular input
12285 (add-before 'build 'patch-file-path
12286 (lambda* (#:key inputs #:allow-other-keys)
12287 (let ((file-path (assoc-ref inputs "file")))
12288 (substitute* "py3status/parse_config.py"
12289 (("\\[\"file\", \"-b\"")
12290 (string-append "['" file-path "/bin/file', '-b'")))
12291 #t))))
12292 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12293 (home-page "https://github.com/ultrabug/py3status")
12294 (synopsis "Extensible i3status wrapper written in Python")
12295 (description "py3status is an i3status wrapper which extends i3status
12296 functionality in a modular way, allowing you to extend your panel with your
12297 own code, responding to click events and updating clock every second.")
12298 (license license:bsd-3)))
12299
12300 (define-public python2-selectors2
12301 (package
12302 (name "python2-selectors2")
12303 (version "2.0.1")
12304 (source (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "selectors2" version))
12307 (sha256
12308 (base32
12309 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12310 (build-system python-build-system)
12311 (arguments
12312 `(#:python ,python-2))
12313 (native-inputs
12314 `(("python2-mock" ,python2-mock)
12315 ("python2-psutil" ,python2-psutil)))
12316 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12317 (synopsis "Backport of the selectors module from Python 3.5+")
12318 (description
12319 "This package provides a drop-in replacement for the @code{selectors}
12320 module in Python 3.5 and later.")
12321 (license license:expat)))
12322
12323 (define-public python-tblib
12324 (package
12325 (name "python-tblib")
12326 (version "1.6.0")
12327 (source (origin
12328 (method url-fetch)
12329 (uri (pypi-uri "tblib" version))
12330 (sha256
12331 (base32
12332 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12333 (build-system python-build-system)
12334 (arguments
12335 `(#:phases
12336 (modify-phases %standard-phases
12337 (replace 'check
12338 (lambda _
12339 ;; Upstream runs tests after installation and the package itself
12340 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12341 ;; found.
12342 (setenv "PYTHONPATH"
12343 (string-append (getcwd) "/build/lib:"
12344 (getenv "PYTHONPATH")))
12345 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12346 (native-inputs
12347 `(("python-pytest" ,python-pytest)
12348 ("python-six" ,python-six)))
12349 (home-page "https://github.com/ionelmc/python-tblib")
12350 (synopsis "Traceback serialization library")
12351 (description
12352 "Traceback serialization allows you to:
12353
12354 @enumerate
12355 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12356 different processes. This allows better error handling when running code over
12357 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12358
12359 @item Parse traceback strings and raise with the parsed tracebacks.
12360 @end enumerate\n")
12361 (license license:bsd-3)))
12362
12363 (define-public python2-tblib
12364 (package-with-python2 python-tblib))
12365
12366 (define-public python-greenlet
12367 (package
12368 (name "python-greenlet")
12369 (version "0.4.16")
12370 (source (origin
12371 (method url-fetch)
12372 (uri (pypi-uri "greenlet" version))
12373 (sha256
12374 (base32
12375 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12376 (build-system python-build-system)
12377 (home-page "https://greenlet.readthedocs.io/")
12378 (synopsis "Lightweight in-process concurrent programming")
12379 (description
12380 "Greenlet package is a spin-off of Stackless, a version of CPython
12381 that supports micro-threads called \"tasklets\". Tasklets run
12382 pseudo-concurrently (typically in a single or a few OS-level threads) and
12383 are synchronized with data exchanges on \"channels\".")
12384 (license (list license:psfl license:expat))))
12385
12386 (define-public python2-greenlet
12387 (package-with-python2 python-greenlet))
12388
12389 (define-public python-objgraph
12390 (package
12391 (name "python-objgraph")
12392 (version "3.4.1")
12393 (source
12394 (origin
12395 (method url-fetch)
12396 (uri (pypi-uri "objgraph" version))
12397 (sha256
12398 (base32
12399 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12400 (build-system python-build-system)
12401 (propagated-inputs
12402 `(("python-graphviz" ,python-graphviz)))
12403 (native-inputs
12404 `(("python-mock" ,python-mock)
12405 ("graphviz" ,graphviz)))
12406 (home-page "https://mg.pov.lt/objgraph/")
12407 (synopsis "Draw Python object reference graphs with graphviz")
12408 (description
12409 "This package provides tools to draw Python object reference graphs with
12410 graphviz.")
12411 (license license:expat)))
12412
12413 (define-public python2-objgraph
12414 (package-with-python2 python-objgraph))
12415
12416 (define-public python-gevent
12417 (package
12418 (name "python-gevent")
12419 (version "20.6.2")
12420 (source (origin
12421 (method url-fetch)
12422 (uri (pypi-uri "gevent" version))
12423 (sha256
12424 (base32
12425 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12426 (modules '((guix build utils)))
12427 (snippet
12428 '(begin
12429 ;; unbunding libev and c-ares
12430 (delete-file-recursively "deps")
12431 #t))))
12432 (build-system python-build-system)
12433 (arguments
12434 `(#:modules ((ice-9 ftw)
12435 (ice-9 match)
12436 (srfi srfi-26)
12437 (guix build utils)
12438 (guix build python-build-system))
12439 #:phases (modify-phases %standard-phases
12440 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12441 (lambda _
12442 (substitute* "src/gevent/subprocess.py"
12443 (("/bin/sh") (which "sh")))
12444 (for-each (lambda (file)
12445 (substitute* file
12446 (("/bin/sh") (which "sh"))
12447 (("/bin/true") (which "true"))))
12448 (find-files "src/greentest" "\\.py$"))
12449 #t))
12450 (add-before 'build 'do-not-use-bundled-sources
12451 (lambda _
12452 (setenv "GEVENTSETUP_EMBED" "0")
12453
12454 ;; Prevent building bundled libev.
12455 (substitute* "setup.py"
12456 (("run_make=_BUILDING")
12457 "run_make=False"))
12458 #t))
12459 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12460 (lambda* (#:key inputs #:allow-other-keys)
12461 (let ((greenlet (string-append
12462 (assoc-ref inputs "python-greenlet")
12463 "/include")))
12464 (match (scandir greenlet
12465 (lambda (item)
12466 (string-prefix? "python" item)))
12467 ((python)
12468 (setenv "C_INCLUDE_PATH"
12469 (string-append greenlet "/" python ":"
12470 (or (getenv "C_INCLUDE_PATH")
12471 ""))))))
12472 #t))
12473 (add-before 'check 'pretend-to-be-CI
12474 (lambda _
12475 ;; A few tests are skipped due to network constraints or
12476 ;; get longer timeouts when running in a CI environment.
12477 ;; Piggy-back on that, as we need the same adjustments.
12478 (setenv "TRAVIS" "1")
12479 (setenv "APPVEYOR" "1")
12480 #t))
12481 (add-before 'check 'adjust-tests
12482 (lambda _
12483 (let ((disabled-tests
12484 '(;; These tests rely on networking which is not
12485 ;; available in the build container.
12486 "test_urllib2net.py"
12487 "test__server.py"
12488 "test__server_pywsgi.py"
12489 "test_socket.py"
12490 "test__socket.py"
12491 "test__socket_ssl.py"
12492 "test__socket_dns.py"
12493 "test__socket_dns6.py"
12494 "test___example_servers.py"
12495 "test__getaddrinfo_import.py"
12496 "test__examples.py"
12497 "test_httplib.py"
12498 "test_https.py"
12499 "test_urllib2_localnet.py"
12500 "test_ssl.py"
12501 "test__ssl.py"
12502 ;; XXX: These tests borrow functionality from the
12503 ;; Python builtin 'test' module, but it is not
12504 ;; installed with the Guix Python distribution.
12505 "test_smtpd.py"
12506 "test_wsgiref.py"
12507 "test_urllib2.py"
12508 "test_thread.py"
12509 "test_threading.py"
12510 "test__threading_2.py"
12511 ;; These tests rely on KeyboardInterrupts which do not
12512 ;; work inside the build container for some reason
12513 ;; (lack of controlling terminal?).
12514 "test_subprocess.py"
12515 "test__issues461_471.py"
12516 ;; TODO: Patch out the tests that use getprotobyname, etc
12517 ;; instead of disabling all the tests from these files.
12518 "test__resolver_dnspython.py"
12519 "test__doctests.py"
12520 "test__all__.py"
12521 "test___config.py"
12522 "test__execmodules.py")))
12523 (call-with-output-file "skipped_tests.txt"
12524 (lambda (port)
12525 (format port "~a~%"
12526 (string-join disabled-tests "\n"))))
12527 #t)))
12528 (replace 'check
12529 (lambda _
12530 ;; Make sure the build directory is on PYTHONPATH.
12531 (setenv "PYTHONPATH"
12532 (string-append
12533 (getenv "PYTHONPATH") ":"
12534 (getcwd) "/build/"
12535 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12536
12537 ;; Use the build daemons configured number of workers.
12538 (setenv "NWORKERS" (number->string (parallel-job-count)))
12539
12540 (invoke "python" "-m" "gevent.tests" "--config"
12541 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12542 (propagated-inputs
12543 `(("python-greenlet" ,python-greenlet)
12544 ("python-objgraph" ,python-objgraph)
12545 ("python-zope.event" ,python-zope-event)
12546 ("python-zope.interface" ,python-zope-interface)))
12547 (native-inputs
12548 `(("python-six" ,python-six)
12549
12550 ;; For tests.
12551 ("python-dnspython" ,python-dnspython)
12552 ("python-psutil" ,python-psutil)))
12553 (inputs
12554 `(("c-ares" ,c-ares)
12555 ("libev" ,libev)))
12556 (home-page "http://www.gevent.org/")
12557 (synopsis "Coroutine-based network library")
12558 (description
12559 "gevent is a coroutine-based Python networking library that uses greenlet
12560 to provide a high-level synchronous API on top of the libev event loop.")
12561 (license license:expat)
12562 (properties `((python2-variant . ,(delay python2-gevent))))))
12563
12564 (define-public python2-gevent
12565 (let ((base (package-with-python2
12566 (strip-python2-variant python-gevent))))
12567 (package
12568 (inherit base)
12569 (native-inputs `(,@(package-native-inputs base)
12570 ("python-mock" ,python2-mock)
12571 ("python2-selectors2" ,python2-selectors2))))))
12572
12573 (define-public python-fastimport
12574 (package
12575 (name "python-fastimport")
12576 (version "0.9.8")
12577 (source
12578 (origin
12579 (method url-fetch)
12580 (uri (pypi-uri "fastimport" version))
12581 (sha256
12582 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12583 (build-system python-build-system)
12584 (home-page "https://github.com/jelmer/python-fastimport")
12585 (synopsis "VCS fastimport parser and generator in Python")
12586 (description "This package provides a parser for and generator of the Git
12587 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12588 format.")
12589 (license license:gpl2+)))
12590
12591 (define-public python2-fastimport
12592 (package-with-python2 python-fastimport))
12593
12594 (define-public python-twisted
12595 (package
12596 (name "python-twisted")
12597 (version "19.7.0")
12598 (source (origin
12599 (method url-fetch)
12600 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12601 (sha256
12602 (base32
12603 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12604 (build-system python-build-system)
12605 (arguments
12606 '(#:tests? #f)) ; FIXME: some tests fail
12607 (propagated-inputs
12608 `(("python-zope-interface" ,python-zope-interface)
12609 ("python-pyhamcrest" ,python-pyhamcrest)
12610 ("python-incremental" ,python-incremental)
12611 ("python-hyperlink" ,python-hyperlink)
12612 ("python-constantly" ,python-constantly)
12613 ("python-automat" ,python-automat)))
12614 (home-page "https://twistedmatrix.com/")
12615 (synopsis "Asynchronous networking framework written in Python")
12616 (description
12617 "Twisted is an extensible framework for Python programming, with special
12618 focus on event-based network programming and multiprotocol integration.")
12619 (license license:expat)))
12620
12621 (define-public python2-twisted
12622 (package-with-python2 python-twisted))
12623
12624 (define-public python-pika
12625 (package
12626 (name "python-pika")
12627 (version "0.12.0")
12628 (source
12629 (origin
12630 (method url-fetch)
12631 (uri (pypi-uri "pika" version))
12632 (sha256
12633 (base32
12634 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12635 (build-system python-build-system)
12636 (native-inputs
12637 `(("python-pyev" ,python-pyev)
12638 ("python-tornado" ,python-tornado)
12639 ("python-twisted" ,python-twisted)))
12640 (home-page "https://pika.readthedocs.org")
12641 (synopsis "Pure Python AMQP Client Library")
12642 (description
12643 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12644 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12645 network support library.")
12646 (license license:bsd-3)))
12647
12648 (define-public python2-pika
12649 (package-with-python2 python-pika))
12650
12651 (define-public python-ply
12652 (package
12653 (name "python-ply")
12654 (version "3.11")
12655 (source
12656 (origin
12657 (method url-fetch)
12658 (uri (pypi-uri "ply" version))
12659 (sha256
12660 (base32
12661 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12662 (build-system python-build-system)
12663 (home-page "http://www.dabeaz.com/ply/")
12664 (synopsis "Python Lex & Yacc")
12665 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12666 It uses LR parsing and does extensive error checking.")
12667 (license license:bsd-3)))
12668
12669 (define-public python-tabulate
12670 (package
12671 (name "python-tabulate")
12672 (version "0.8.7")
12673 (source (origin
12674 (method url-fetch)
12675 (uri (pypi-uri "tabulate" version))
12676 (sha256
12677 (base32
12678 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12679 (build-system python-build-system)
12680 (arguments
12681 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12682 ;; and the latest release is not tagged in the upstream repository.
12683 '(#:tests? #f))
12684 (home-page "https://bitbucket.org/astanin/python-tabulate")
12685 (synopsis "Pretty-print tabular data")
12686 (description
12687 "Tabulate is a library and command-line utility to pretty-print tabular
12688 data in Python.")
12689 (license license:expat)))
12690
12691 (define-public python2-tabulate
12692 (package-with-python2 python-tabulate))
12693
12694 (define-public python-kazoo
12695 (package
12696 (name "python-kazoo")
12697 (version "2.4.0")
12698 (source
12699 (origin
12700 (method url-fetch)
12701 (uri (pypi-uri "kazoo" version))
12702 (sha256
12703 (base32
12704 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12705 (build-system python-build-system)
12706 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12707 (propagated-inputs
12708 `(("python-six" ,python-six)))
12709 (home-page "https://kazoo.readthedocs.org")
12710 (synopsis "High-level Zookeeper client library")
12711 (description
12712 "Kazoo is a Python client library for the Apache Zookeeper distributed
12713 application service. It is designed to be easy to use and to avoid common
12714 programming errors.")
12715 (license license:asl2.0)))
12716
12717 (define-public python2-kazoo
12718 (package-with-python2 python-kazoo))
12719
12720 (define-public python-pykafka
12721 (package
12722 (name "python-pykafka")
12723 (version "2.4.0")
12724 (source (origin
12725 (method url-fetch)
12726 (uri (pypi-uri "pykafka" version))
12727 (sha256
12728 (base32
12729 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12730 (build-system python-build-system)
12731 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12732 (propagated-inputs
12733 `(("python-gevent" ,python-gevent)
12734 ("python-kazoo" ,python-kazoo)
12735 ("python-tabulate" ,python-tabulate)))
12736 (inputs
12737 `(("librdkafka" ,librdkafka)))
12738 (home-page "https://pykafka.readthedocs.io/")
12739 (synopsis "Apache Kafka client for Python")
12740 (description
12741 "PyKafka is a client for the Apache Kafka distributed messaging system.
12742 It includes Python implementations of Kafka producers and consumers, which
12743 are optionally backed by a C extension built on librdkafka.")
12744 (license license:asl2.0)))
12745
12746 (define-public python2-pykafka
12747 (package-with-python2 python-pykafka))
12748
12749 (define-public python-wcwidth
12750 (package
12751 (name "python-wcwidth")
12752 (version "0.1.8")
12753 (source (origin
12754 (method url-fetch)
12755 (uri (pypi-uri "wcwidth" version))
12756 (sha256
12757 (base32
12758 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12759 (build-system python-build-system)
12760 (home-page "https://github.com/jquast/wcwidth")
12761 (synopsis "Measure number of terminal column cells of wide-character codes")
12762 (description "Wcwidth measures the number of terminal column cells of
12763 wide-character codes. It is useful for those implementing a terminal emulator,
12764 or programs that carefully produce output to be interpreted by one. It is a
12765 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12766 specified in POSIX.1-2001 and POSIX.1-2008.")
12767 (license license:expat)))
12768
12769 (define-public python2-wcwidth
12770 (package-with-python2 python-wcwidth))
12771
12772 (define-public python2-jsonrpclib
12773 (package
12774 (name "python2-jsonrpclib")
12775 (version "0.1.7")
12776 (source (origin
12777 (method url-fetch)
12778 (uri (pypi-uri "jsonrpclib" version))
12779 (sha256
12780 (base32
12781 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12782 (build-system python-build-system)
12783 (arguments
12784 `(#:tests? #f
12785 #:python ,python-2))
12786 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12787 (synopsis "Implementation of JSON-RPC specification for Python")
12788 (description
12789 "This library is an implementation of the JSON-RPC specification.
12790 It supports both the original 1.0 specification, as well as the
12791 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12792 etc.")
12793 (license license:asl2.0)))
12794
12795 (define-public python-chai
12796 (package
12797 (name "python-chai")
12798 (version "1.1.2")
12799 (source (origin
12800 (method url-fetch)
12801 (uri (pypi-uri "chai" version))
12802 (sha256
12803 (base32
12804 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12805 (build-system python-build-system)
12806 (home-page "https://github.com/agoragames/chai")
12807 (synopsis "Mocking framework for Python")
12808 (description
12809 "Chai provides an api for mocking, stubbing and spying your python
12810 objects, patterned after the Mocha library for Ruby.")
12811 (license license:bsd-3)))
12812
12813 (define-public python2-chai
12814 (package-with-python2 python-chai))
12815
12816 (define-public python-inflection
12817 (package
12818 (name "python-inflection")
12819 (version "0.3.1")
12820 (source
12821 (origin (method url-fetch)
12822 (uri (pypi-uri "inflection" version))
12823 (sha256
12824 (base32
12825 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12826 (build-system python-build-system)
12827 (native-inputs
12828 `(("python-pytest" ,python-pytest)))
12829 (home-page "https://github.com/jpvanhal/inflection")
12830 (synopsis "Python string transformation library")
12831 (description
12832 "Inflection is a string transformation library. It singularizes
12833 and pluralizes English words, and transforms strings from CamelCase to
12834 underscored string.")
12835 (license license:expat)))
12836
12837 (define-public python2-inflection
12838 (package-with-python2 python-inflection))
12839
12840 (define-public python-pylev
12841 (package
12842 (name "python-pylev")
12843 (version "1.3.0")
12844 (source (origin
12845 (method url-fetch)
12846 (uri (pypi-uri "pylev" version))
12847 (sha256
12848 (base32
12849 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12850 (build-system python-build-system)
12851 (home-page "https://github.com/toastdriven/pylev")
12852 (synopsis "Levenshtein distance implementation in Python")
12853 (description "Pure Python Levenshtein implementation, based off the
12854 Wikipedia code samples at
12855 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12856 (license license:bsd-3)))
12857
12858 (define-public python2-pylev
12859 (package-with-python2 python-pylev))
12860
12861 (define-public python-cleo
12862 (package
12863 (name "python-cleo")
12864 (version "0.8.1")
12865 (source (origin
12866 (method url-fetch)
12867 (uri (pypi-uri "cleo" version))
12868 (sha256
12869 (base32
12870 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12871 (build-system python-build-system)
12872 (native-inputs
12873 `( ;; For testing
12874 ("python-mock" ,python-mock)
12875 ("python-pytest-mock" ,python-pytest-mock)
12876 ("python-pytest" ,python-pytest)))
12877 (propagated-inputs
12878 `(("python-backpack" ,python-backpack)
12879 ("python-clikit" ,python-clikit)
12880 ("python-pastel" ,python-pastel)
12881 ("python-pylev" ,python-pylev)))
12882 (home-page "https://github.com/sdispater/cleo")
12883 (synopsis "Command-line arguments library for Python")
12884 (description
12885 "Cleo allows you to create command-line commands with signature in
12886 docstring and colored output.")
12887 (license license:expat)))
12888
12889 (define-public python2-cleo
12890 (package-with-python2 python-cleo))
12891
12892 (define-public python-tomlkit
12893 (package
12894 (name "python-tomlkit")
12895 (version "0.6.0")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "tomlkit" version))
12900 (sha256
12901 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12902 (build-system python-build-system)
12903 (native-inputs
12904 `(("python-pytest" ,python-pytest)))
12905 (home-page "https://github.com/sdispater/tomlkit")
12906 (synopsis "Style-preserving TOML library")
12907 (description
12908 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12909 preserves all comments, indentations, whitespace and internal element ordering,
12910 and makes them accessible and editable via an intuitive API. It can also
12911 create new TOML documents from scratch using the provided helpers. Part of the
12912 implementation has been adapted, improved, and fixed from Molten.")
12913 (license license:expat)))
12914
12915 (define-public python-shellingham
12916 (package
12917 (name "python-shellingham")
12918 (version "1.3.2")
12919 (source
12920 (origin
12921 (method url-fetch)
12922 (uri (pypi-uri "shellingham" version))
12923 (sha256
12924 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12925 (build-system python-build-system)
12926 (arguments
12927 `(#:phases
12928 (modify-phases %standard-phases
12929 (add-after 'unpack 'restore-setup.py
12930 ;; setup.py will return in the next release.
12931 ;; <https://github.com/sarugaku/shellingham/issues/33>
12932 (lambda _
12933 (with-output-to-file "setup.py"
12934 (lambda _
12935 (display "from setuptools import setup\nsetup()\n")))
12936 #t)))))
12937 (home-page "https://github.com/sarugaku/shellingham")
12938 (synopsis "Tool to detect surrounding shell")
12939 (description
12940 "Shellingham detects what shell the current Python executable is
12941 running in.")
12942 (license license:isc)))
12943
12944 (define-public python-memcached
12945 (package
12946 (name "python-memcached")
12947 (version "1.59")
12948 (source
12949 (origin
12950 (method url-fetch)
12951 (uri (pypi-uri "python-memcached" version))
12952 (sha256
12953 (base32
12954 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12955 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12956 (build-system python-build-system)
12957 (propagated-inputs `(("python-six" ,python-six)))
12958 (home-page
12959 "https://github.com/linsomniac/python-memcached")
12960 (synopsis "Pure python memcached client")
12961 (description
12962 "This software is a pure Python interface to the memcached memory cache
12963 daemon. It is the client side software which allows storing values in one or
12964 more, possibly remote, memcached servers.")
12965 (license license:psfl)))
12966
12967 (define-public python-clikit
12968 (package
12969 (name "python-clikit")
12970 (version "0.6.2")
12971 (source
12972 (origin
12973 (method url-fetch)
12974 (uri (pypi-uri "clikit" version))
12975 (sha256
12976 (base32
12977 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12978 (build-system python-build-system)
12979 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12980 (propagated-inputs
12981 `(("python-crashtest" ,python-crashtest)
12982 ("python-pastel" ,python-pastel)
12983 ("python-pylev" ,python-pylev)))
12984 (home-page "https://github.com/sdispater/clikit")
12985 (synopsis "Group of utilities to build command line interfaces")
12986 (description
12987 "CliKit is a group of utilities to build testable command line
12988 interfaces.")
12989 (properties `((python2-variant . ,(delay python2-clikit))))
12990 (license license:expat)))
12991
12992 (define-public python2-clikit
12993 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12994 (package/inherit
12995 base
12996 (propagated-inputs
12997 `(("python-enum34" ,python2-enum34)
12998 ("python-typing" ,python2-typing)
12999 ,@(package-propagated-inputs base))))))
13000
13001 (define-public python-msgpack-python
13002 (package
13003 (name "python-msgpack-python")
13004 (version "0.5.6")
13005 (source
13006 (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "msgpack-python" version))
13009 (sha256
13010 (base32
13011 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13012 (build-system python-build-system)
13013 (home-page "http://msgpack.org/")
13014 (synopsis "Package to deserialize messages in MessagePack binary format")
13015 (description
13016 "MessagePack is an efficient binary serialization format. It lets you
13017 exchange data among multiple languages like JSON. But it's faster and
13018 smaller. Small integers are encoded into a single byte, and typical short
13019 strings require only one extra byte in addition to the strings themselves.")
13020 (license license:asl2.0)))
13021
13022 (define-public python-cachy
13023 (package
13024 (name "python-cachy")
13025 (version "0.3.0")
13026 (source
13027 (origin
13028 (method url-fetch)
13029 (uri (pypi-uri "cachy" version))
13030 (sha256
13031 (base32
13032 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13033 (build-system python-build-system)
13034 (arguments
13035 '(#:phases
13036 (modify-phases %standard-phases
13037 (replace 'check
13038 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13039 "pytest"))))))
13040 (native-inputs
13041 `(("memcached" ,memcached)
13042 ("python-fakeredis" ,python-fakeredis)
13043 ("python-flexmock" ,python-flexmock)
13044 ("python-pifpaf" ,python-pifpaf)
13045 ("python-pytest" ,python-pytest)))
13046 (propagated-inputs
13047 `(("python-memcached" ,python-memcached)
13048 ("python-msgpack-python" ,python-msgpack-python)
13049 ("python-redis" ,python-redis)))
13050 (home-page "https://github.com/sdispater/cachy")
13051 (synopsis "Simple yet effective caching library")
13052 (description
13053 "Cachy provides a simple yet effective caching library. A simple but
13054 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13055 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13056 (license license:expat)))
13057
13058 (define-public poetry
13059 (package
13060 (name "poetry")
13061 (version "1.0.10")
13062 ;; Poetry can only be built from source with Poetry.
13063 (source
13064 (origin
13065 (method url-fetch)
13066 (uri (pypi-uri "poetry" version))
13067 (sha256
13068 (base32
13069 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
13070 (build-system python-build-system)
13071 (arguments
13072 `(#:tests? #f ;; Pypi does not have tests.
13073 #:phases
13074 (modify-phases %standard-phases
13075 (add-before 'build 'patch-setup-py
13076 (lambda _
13077 (substitute* "setup.py"
13078 ;; poetry won't update version as 21.0.0 relies on python > 3.6
13079 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
13080 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
13081 ;; Reported upstream:
13082 ;; <https://github.com/python-poetry/poetry/issues/2752>.
13083 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
13084 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
13085 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
13086 #t)))))
13087 (propagated-inputs
13088 `(("python-cachecontrol" ,python-cachecontrol)
13089 ("python-cachy" ,python-cachy)
13090 ("python-cleo" ,python-cleo)
13091 ("python-clikit" ,python-clikit)
13092 ("python-html5lib" ,python-html5lib)
13093 ("python-jsonschema" ,python-jsonschema)
13094 ("python-keyring" ,python-keyring)
13095 ("python-msgpack-transitional" ,python-msgpack-transitional)
13096 ("python-pexpect" ,python-pexpect)
13097 ("python-pkginfo" ,python-pkginfo)
13098 ("python-pyparsing" ,python-pyparsing)
13099 ("python-pyrsistent" ,python-pyrsistent)
13100 ("python-requests" ,python-requests)
13101 ("python-requests-toolbelt" ,python-requests-toolbelt)
13102 ("python-shellingham" ,python-shellingham)
13103 ("python-tomlkit" ,python-tomlkit)
13104 ("python-virtualenv" ,python-virtualenv)))
13105 (home-page "https://python-poetry.org")
13106 (synopsis "Python dependency management and packaging made easy")
13107 (description "Poetry is a tool for dependency management and packaging
13108 in Python. It allows you to declare the libraries your project depends on and
13109 it will manage (install/update) them for you.")
13110 (license license:expat)))
13111
13112 (define-public python-lark-parser
13113 (package
13114 (name "python-lark-parser")
13115 (version "0.9.0")
13116 (source (origin
13117 (method url-fetch)
13118 (uri (pypi-uri "lark-parser" version))
13119 (sha256
13120 (base32
13121 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13122 (build-system python-build-system)
13123 (home-page "https://github.com/lark-parser/lark")
13124 (synopsis "Multi-language parser for Python")
13125 (description
13126 "Lark is a parser built with a focus on ergonomics, performance and
13127 resilience. Lark can parse all context-free languages. That means it is
13128 capable of parsing almost any programming language out there, and to
13129 some degree most natural languages too.")
13130 (license license:expat)))
13131
13132 (define-public python-libcst
13133 (package
13134 (name "python-libcst")
13135 (version "0.3.8")
13136 (source (origin
13137 (method url-fetch)
13138 (uri (pypi-uri "libcst" version))
13139 (sha256
13140 (base32
13141 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13142 (build-system python-build-system)
13143 (arguments
13144 `(#:phases
13145 (modify-phases %standard-phases
13146 (add-after 'unpack 'remove-failing-tests
13147 (lambda _
13148 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13149 (delete-file "libcst/tests/test_fuzz.py")
13150 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13151 (delete-file "libcst/tests/test_pyre_integration.py")
13152 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13153 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13154 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13155 #t))
13156 (add-before 'check 'generate-test-data
13157 (lambda _
13158 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13159 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13160 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13161 (replace 'check
13162 (lambda _
13163 (invoke "python" "-m" "unittest")
13164 #t)))))
13165 (native-inputs
13166 `(("python-black" ,python-black)
13167 ("python-isort" ,python-isort)))
13168 (propagated-inputs
13169 `(("python-typing-extensions" ,python-typing-extensions)
13170 ("python-typing-inspect" ,python-typing-inspect)
13171 ("python-pyyaml" ,python-pyyaml)))
13172 (home-page "https://github.com/Instagram/LibCST")
13173 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13174 (description
13175 "LibCST parses Python source code as a CST tree that keeps all
13176 formatting details (comments, whitespaces, parentheses, etc). It's useful
13177 for building automated refactoring (codemod) applications and linters.
13178 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13179 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13180 naming node types and fields, LibCST creates a lossless CST that looks and
13181 feels like an AST.")
13182 (license (list license:expat
13183 ;; Some files unde libcst/_parser/ are under Python Software
13184 ;; Foundation license (see LICENSE file for details)
13185 license:psfl
13186 ;; libcst/_add_slots.py
13187 license:asl2.0))))
13188
13189 (define-public python-typing-inspect
13190 (package
13191 (name "python-typing-inspect")
13192 (version "0.6.0")
13193 (source (origin
13194 (method url-fetch)
13195 (uri (pypi-uri "typing_inspect" version))
13196 (sha256
13197 (base32
13198 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13199 (build-system python-build-system)
13200 (propagated-inputs
13201 `(("python-mypy-extensions" ,python-mypy-extensions)
13202 ("python-typing-extensions" ,python-typing-extensions)))
13203 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13204 (synopsis "API for inspection of types in the Python @code{typing} module")
13205 (description
13206 "The @code{typing_inspect} module defines experimental API for runtime
13207 inspection of types defined in the Python standard typing module.")
13208 (license license:expat)))
13209
13210 (define-public python-lazy-object-proxy
13211 (package
13212 (name "python-lazy-object-proxy")
13213 (version "1.5.1")
13214 (source (origin
13215 (method url-fetch)
13216 (uri (pypi-uri "lazy-object-proxy" version))
13217 (sha256
13218 (base32
13219 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13220 (native-inputs
13221 `(("python-setuptools-scm" ,python-setuptools-scm)))
13222 (build-system python-build-system)
13223 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13224 (synopsis "Lazy object proxy for python")
13225 (description
13226 "Lazy object proxy is an object that wraps a callable but defers the call
13227 until the object is actually required, and caches the result of said call.")
13228 (license license:bsd-2)))
13229
13230 (define-public python2-lazy-object-proxy
13231 (package-with-python2 python-lazy-object-proxy))
13232
13233 (define-public python-dnspython
13234 (package
13235 (name "python-dnspython")
13236 (version "1.16.0")
13237 (source (origin
13238 (method url-fetch)
13239 (uri (string-append "http://www.dnspython.org/kits/"
13240 version "/dnspython-" version ".tar.gz"))
13241 (sha256
13242 (base32
13243 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13244 (build-system python-build-system)
13245 (arguments '(#:tests? #f)) ; XXX: requires internet access
13246 (home-page "http://www.dnspython.org")
13247 (synopsis "DNS toolkit for Python")
13248 (description
13249 "dnspython is a DNS toolkit for Python. It supports almost all record
13250 types. It can be used for queries, zone transfers, and dynamic updates.
13251 It supports TSIG authenticated messages and EDNS0.")
13252 (license license:expat)))
13253
13254 (define-public python2-dnspython
13255 (package-with-python2 python-dnspython))
13256
13257 (define-public python-py3dns
13258 (package
13259 (name "python-py3dns")
13260 (version "3.2.1")
13261 (source
13262 (origin
13263 (method url-fetch)
13264 (uri (pypi-uri "py3dns" version))
13265 (sha256
13266 (base32
13267 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13268 (build-system python-build-system)
13269 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13270 ;; removing functionality so we copy from Nix and "just don't build it".
13271 (arguments
13272 `(#:phases
13273 (modify-phases %standard-phases
13274 (add-after 'unpack 'patch-source
13275 (lambda _
13276 (substitute* "setup.py"
13277 (("import DNS") "")
13278 (("DNS.__version__") (string-append "\"" ,version "\"")))
13279 #t)))
13280 #:tests? #f)) ; Also skip the tests.
13281 (home-page "https://launchpad.net/py3dns")
13282 (synopsis "Python 3 DNS library")
13283 (description "This Python 3 module provides a DNS API for looking up DNS
13284 entries from within Python 3 modules and applications. This module is a
13285 simple, lightweight implementation.")
13286 (license license:psfl)))
13287
13288 (define-public python-email-validator
13289 (package
13290 (name "python-email-validator")
13291 (version "1.0.2")
13292 (source
13293 (origin (method url-fetch)
13294 (uri (pypi-uri "email_validator" version))
13295 (sha256
13296 (base32
13297 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13298 (build-system python-build-system)
13299 (arguments
13300 '(#:phases
13301 (modify-phases %standard-phases
13302 (add-before 'build 'use-dnspython
13303 (lambda _
13304 (substitute* "setup.py"
13305 (("dnspython3") "dnspython"))
13306 #t)))))
13307 (propagated-inputs
13308 `(("python-dnspython" ,python-dnspython)
13309 ("python-idna" ,python-idna)))
13310 (home-page "https://github.com/JoshData/python-email-validator")
13311 (synopsis "Email address validation library for Python")
13312 (description
13313 "This library validates email address syntax and deliverability.")
13314 (license license:cc0)))
13315
13316 (define-public python2-email-validator
13317 (package-with-python2 python-email-validator))
13318
13319 (define-public python-ukpostcodeparser
13320 (package
13321 (name "python-ukpostcodeparser")
13322 (version "1.0.3")
13323 (source (origin
13324 (method url-fetch)
13325 (uri (pypi-uri "UkPostcodeParser" version))
13326 (sha256
13327 (base32
13328 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13329 (build-system python-build-system)
13330 (home-page "https://github.com/hamstah/ukpostcodeparser")
13331 (synopsis "UK Postcode parser for Python")
13332 (description
13333 "This library provides the @code{parse_uk_postcode} function for
13334 parsing UK postcodes.")
13335 (license license:expat)))
13336
13337 (define-public python2-ukpostcodeparser
13338 (package-with-python2 python-ukpostcodeparser))
13339
13340 (define-public python-faker
13341 (package
13342 (name "python-faker")
13343 (version "4.0.2")
13344 (source (origin
13345 (method url-fetch)
13346 (uri (pypi-uri "Faker" version))
13347 (sha256
13348 (base32
13349 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13350 (build-system python-build-system)
13351 (arguments
13352 '(#:phases
13353 (modify-phases %standard-phases
13354 (replace 'check
13355 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13356 (native-inputs
13357 `(;; For testing
13358 ("python-freezegun" ,python-freezegun)
13359 ("python-pytest" ,python-pytest)
13360 ("python-random2" ,python-random2)
13361 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13362 ("python-validators" ,python-validators)))
13363 (propagated-inputs
13364 `(("python-dateutil" ,python-dateutil)
13365 ("python-text-unidecode" ,python-text-unidecode)))
13366 (home-page "https://github.com/joke2k/faker")
13367 (synopsis "Python package that generates fake data")
13368 (description
13369 "Faker is a Python package that generates fake data such as names,
13370 addresses, and phone numbers.")
13371 (license license:expat)
13372 (properties `((python2-variant . ,(delay python2-faker))))))
13373
13374 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13375 (define-public python2-faker
13376 (let ((base (package-with-python2 (strip-python2-variant
13377 python-faker))))
13378 (package
13379 (inherit base)
13380 (version "3.0.1")
13381 (source (origin
13382 (method url-fetch)
13383 (uri (pypi-uri "Faker" version))
13384 (sha256
13385 (base32
13386 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13387 (native-inputs
13388 `(("python-mock" ,python2-mock)
13389 ,@(package-native-inputs base)))
13390 (propagated-inputs
13391 `(("python2-ipaddress" ,python2-ipaddress)
13392 ("python2-six" ,python2-six)
13393 ,@(package-propagated-inputs base))))))
13394
13395 (define-public python-pyaml
13396 (package
13397 (name "python-pyaml")
13398 (version "18.11.0")
13399 (source (origin
13400 (method url-fetch)
13401 (uri (pypi-uri "pyaml" version))
13402 (sha256
13403 (base32
13404 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13405 (build-system python-build-system)
13406 (native-inputs
13407 `(("python-unidecode" ,python-unidecode)))
13408 (propagated-inputs
13409 `(("python-pyyaml" ,python-pyyaml)))
13410 (home-page "https://github.com/mk-fg/pretty-yaml")
13411 (synopsis "YAML pretty-print library for Python")
13412 (description
13413 "pyaml is a PyYAML based python module to produce pretty and readable
13414 YAML-serialized data.")
13415 (license license:wtfpl2)))
13416
13417 (define-public python2-pyaml
13418 (package-with-python2 python-pyaml))
13419
13420 (define-public python-backpack
13421 (package
13422 (name "python-backpack")
13423 (version "0.1")
13424 (source
13425 (origin
13426 (method url-fetch)
13427 (uri (pypi-uri "backpack" version))
13428 (sha256
13429 (base32
13430 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13431 (build-system python-build-system)
13432 (native-inputs
13433 `(("python-pytest" ,python-pytest)
13434 ("python-nose" ,python-nose)))
13435 (propagated-inputs
13436 `(("python-simplejson" ,python-simplejson)))
13437 (home-page "https://github.com/sdispater/backpack")
13438 (synopsis "Utilities for working with Python collections")
13439 (description "Backpack provides some useful utilities for working with
13440 collections of data.")
13441 (license license:expat)))
13442
13443 (define-public python2-backpack
13444 (package-with-python2 python-backpack))
13445
13446 (define-public python-prompt-toolkit
13447 (package
13448 (name "python-prompt-toolkit")
13449 (version "3.0.7")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "prompt_toolkit" version))
13454 (sha256
13455 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13456 (build-system python-build-system)
13457 (arguments
13458 `(#:phases
13459 (modify-phases %standard-phases
13460 (delete 'check)
13461 (add-after 'install 'post-install-check
13462 (lambda* (#:key inputs outputs #:allow-other-keys)
13463 ;; HOME is needed for the test
13464 ;; "test_pathcompleter_can_expanduser".
13465 (setenv "HOME" "/tmp")
13466 (add-installed-pythonpath inputs outputs)
13467 (invoke "py.test"))))))
13468 (propagated-inputs
13469 `(("python-wcwidth" ,python-wcwidth)))
13470 (native-inputs
13471 `(("python-pytest" ,python-pytest)))
13472 (home-page
13473 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13474 (synopsis "Library for building command line interfaces in Python")
13475 (description
13476 "Prompt-Toolkit is a library for building interactive command line
13477 interfaces in Python. It's like GNU Readline but it also features syntax
13478 highlighting while typing, out-of-the-box multi-line input editing, advanced
13479 code completion, incremental search, support for Chinese double-width
13480 characters, mouse support, and auto suggestions.")
13481 (license license:bsd-3)
13482 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13483
13484 (define-public python-prompt-toolkit-2
13485 (package (inherit python-prompt-toolkit)
13486 (name "python-prompt-toolkit")
13487 (version "2.0.7")
13488 (source
13489 (origin
13490 (method url-fetch)
13491 (uri (pypi-uri "prompt_toolkit" version))
13492 (sha256
13493 (base32
13494 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13495 (propagated-inputs
13496 `(("python-wcwidth" ,python-wcwidth)
13497 ("python-six" ,python-six)
13498 ("python-pygments" ,python-pygments)))
13499 (properties '())))
13500
13501 (define-public python2-prompt-toolkit
13502 (package-with-python2 python-prompt-toolkit-2))
13503
13504 (define-public python-prompt-toolkit-1
13505 (package (inherit python-prompt-toolkit-2)
13506 (version "1.0.15")
13507 (source
13508 (origin
13509 (method url-fetch)
13510 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13511 (sha256
13512 (base32
13513 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13514
13515 (define-public python2-prompt-toolkit-1
13516 (package-with-python2 python-prompt-toolkit-1))
13517
13518 (define-public python-jedi
13519 (package
13520 (name "python-jedi")
13521 (version "0.17.2")
13522 (source
13523 (origin
13524 (method url-fetch)
13525 (uri (pypi-uri "jedi" version))
13526 (sha256
13527 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13528 (build-system python-build-system)
13529 (arguments
13530 `(#:phases
13531 (modify-phases %standard-phases
13532 (replace 'check
13533 (lambda _
13534 (setenv "HOME" "/tmp")
13535 (invoke "python" "-m" "pytest" "-vv"))))))
13536 (native-inputs
13537 `(("python-pytest" ,python-pytest)
13538 ("python-docopt" ,python-docopt)))
13539 (propagated-inputs
13540 `(("python-parso" ,python-parso)))
13541 (home-page "https://github.com/davidhalter/jedi")
13542 (synopsis "Autocompletion and static analysis library for Python")
13543 (description
13544 "Jedi is a static analysis tool for Python that can be used in Integrated
13545 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13546 on a deeper level than many other static analysis frameworks for Python.
13547
13548 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13549 well.")
13550 (license license:expat)))
13551
13552 (define-public python2-jedi
13553 (package-with-python2 python-jedi))
13554
13555 (define-public ptpython
13556 (package
13557 (name "ptpython")
13558 (version "3.0.5")
13559 (source (origin
13560 (method url-fetch)
13561 (uri (pypi-uri "ptpython" version))
13562 (sha256
13563 (base32
13564 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13565 (build-system python-build-system)
13566 (arguments
13567 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13568 (propagated-inputs
13569 `(("python-appdirs" ,python-appdirs)
13570 ("python-jedi" ,python-jedi)
13571 ("python-prompt-toolkit" ,python-prompt-toolkit)
13572 ("python-pygments" ,python-pygments)))
13573 (home-page "https://github.com/jonathanslenders/ptpython")
13574 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13575 (description
13576 "ptpython is a Python read-eval-print loop with IDE-like features.
13577 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13578 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13579 etc.")
13580 (license license:bsd-3)
13581 (properties `((python2-variant . ,(delay ptpython-2))))))
13582
13583 (define-public ptpython-2
13584 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13585 (package
13586 (inherit base)
13587 (name "ptpython2"))))
13588
13589 (define-public python-stem
13590 (package
13591 (name "python-stem")
13592 (version "1.8.0")
13593 (source
13594 (origin
13595 (method url-fetch)
13596 (uri (pypi-uri "stem" version))
13597 (sha256
13598 (base32
13599 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13600 (build-system python-build-system)
13601 (arguments
13602 `(#:phases
13603 (modify-phases %standard-phases
13604 (replace 'check
13605 (lambda _
13606 (invoke "./run_tests.py" "--unit")
13607 #t)))))
13608 (native-inputs
13609 `(("python-mock" ,python-mock)
13610 ("python-pycodestyle" ,python-pycodestyle)
13611 ("python-pyflakes" ,python-pyflakes)))
13612 (home-page "https://stem.torproject.org/")
13613 (synopsis
13614 "Python controller library that allows applications to interact with Tor")
13615 (description
13616 "Stem is a Python controller library for Tor. With it you can use Tor's
13617 control protocol to script against the Tor process and read descriptor data
13618 relays publish about themselves.")
13619 (license license:lgpl3)))
13620
13621 (define-public python2-stem
13622 (package-with-python2 python-stem))
13623
13624 (define-public python-pyserial
13625 (package
13626 (name "python-pyserial")
13627 (version "3.4")
13628 (source
13629 (origin
13630 (method url-fetch)
13631 (uri (pypi-uri "pyserial" version))
13632 (sha256
13633 (base32
13634 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13635 (build-system python-build-system)
13636 (arguments
13637 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13638 ;; #:phases
13639 ;; (modify-phases %standard-phases
13640 ;; (replace 'check
13641 ;; (lambda _
13642 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13643 (home-page
13644 "https://github.com/pyserial/pyserial")
13645 (synopsis "Python Serial Port Bindings")
13646 (description "@code{pyserial} provide serial port bindings for Python. It
13647 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13648 and/or Xon/Xoff. The port is accessed in RAW mode.")
13649 (license license:bsd-3)))
13650
13651 (define-public python2-pyserial
13652 (package-with-python2 python-pyserial))
13653
13654 (define-public python-kivy
13655 (package
13656 (name "python-kivy")
13657 (version "1.10.1")
13658 (source
13659 (origin
13660 (method url-fetch)
13661 (uri (pypi-uri "Kivy" version))
13662 (file-name (string-append name "-" version ".tar.gz"))
13663 (sha256
13664 (base32
13665 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13666 (build-system python-build-system)
13667 (arguments
13668 `(#:tests? #f ; Tests require many optional packages
13669 #:phases
13670 (modify-phases %standard-phases
13671 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13672 (lambda* (#:key inputs #:allow-other-keys)
13673 (setenv "KIVY_SDL2_PATH"
13674 (string-append (assoc-ref inputs "sdl-union")
13675 "/include/SDL2"))
13676 #t)))))
13677 (native-inputs
13678 `(("pkg-config" ,pkg-config)
13679 ("python-cython" ,python-cython)))
13680 (inputs
13681 `(("gstreamer" ,gstreamer)
13682 ("mesa" ,mesa)
13683 ("sdl-union"
13684 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13685 (home-page "https://kivy.org")
13686 (synopsis
13687 "Multitouch application framework")
13688 (description
13689 "A software library for rapid development of
13690 hardware-accelerated multitouch applications.")
13691 (license license:expat)))
13692
13693 (define-public python2-kivy
13694 (package-with-python2 python-kivy))
13695
13696 (define-public python-binaryornot
13697 (package
13698 (name "python-binaryornot")
13699 (version "0.4.4")
13700 (source (origin
13701 (method url-fetch)
13702 (uri (pypi-uri "binaryornot" version))
13703 (sha256
13704 (base32
13705 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13706 (build-system python-build-system)
13707 (arguments
13708 `(#:phases
13709 (modify-phases %standard-phases
13710 (add-after 'unpack 'patch-tests
13711 (lambda _
13712 ;; TypeError: binary() got an unexpected keyword argument
13713 ;; 'average_size'.
13714 (substitute* "tests/test_check.py"
13715 (("average_size=512") ""))
13716 #t)))))
13717 (propagated-inputs
13718 `(("python-chardet" ,python-chardet)
13719 ("python-hypothesis" ,python-hypothesis)))
13720 (home-page "https://github.com/audreyr/binaryornot")
13721 (synopsis "Package to check if a file is binary or text")
13722 (description "Ultra-lightweight pure Python package to check if a file is
13723 binary or text.")
13724 (license license:bsd-3)
13725 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13726
13727 (define-public python2-binaryornot
13728 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13729 (package (inherit base)
13730 (propagated-inputs
13731 `(("python2-enum34" ,python2-enum34)
13732 ,@(package-propagated-inputs base))))))
13733
13734 (define-public python-binwalk
13735 (package
13736 (name "python-binwalk")
13737 (version "2.2.0")
13738 (source
13739 (origin
13740 (method git-fetch)
13741 (uri (git-reference
13742 (url "https://github.com/ReFirmLabs/binwalk")
13743 (commit (string-append "v" version))))
13744 (file-name (git-file-name name version))
13745 (sha256
13746 (base32
13747 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13748 (build-system python-build-system)
13749 (arguments
13750 `(#:phases
13751 (modify-phases %standard-phases
13752 (add-before 'check 'set-pythonpath
13753 (lambda _
13754 (setenv "PYTHONPATH"
13755 (string-append
13756 (getcwd) "/src/"
13757 ":" (getenv "PYTHONPATH")))
13758 (setenv "HOME" "")
13759 #t)))))
13760 (native-inputs
13761 `(("python-coverage" ,python-coverage)
13762 ("python-nose" ,python-nose)))
13763 (home-page "https://github.com/ReFirmLabs/binwalk")
13764 (synopsis "Firmware analysis tool")
13765 (description "Binwalk is a tool for analyzing, reverse engineering, and
13766 extracting firmware images")
13767 (license license:expat)))
13768
13769 (define-public python-nltk
13770 (package
13771 (name "python-nltk")
13772 (version "3.2.1")
13773 (source (origin
13774 (method url-fetch)
13775 (uri (pypi-uri "nltk" version))
13776 (sha256
13777 (base32
13778 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13779 (build-system python-build-system)
13780 (arguments
13781 '(;; The tests require some extra resources to be downloaded.
13782 ;; TODO Try packaging these resources.
13783 #:tests? #f))
13784 (home-page "http://nltk.org/")
13785 (synopsis "Natural Language Toolkit")
13786 (description "It provides interfaces to over 50 corpora and lexical
13787 resources such as WordNet, along with a suite of text processing libraries
13788 for classification, tokenization, stemming, tagging, parsing, and semantic
13789 reasoning, wrappers for natural language processing libraries.")
13790 (license license:asl2.0)))
13791
13792 (define-public python2-nltk
13793 (package-with-python2 python-nltk))
13794
13795 (define-public python-pymongo
13796 (package
13797 (name "python-pymongo")
13798 (version "3.7.2")
13799 (source (origin
13800 (method url-fetch)
13801 (uri (pypi-uri "pymongo" version))
13802 (sha256
13803 (base32
13804 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13805 (build-system python-build-system)
13806 (propagated-inputs
13807 `(("python-certifi" ,python-certifi)))
13808 (home-page "https://github.com/mongodb/mongo-python-driver")
13809 (synopsis "Python driver for MongoDB")
13810 (description "Python driver for MongoDB.")
13811 (license license:asl2.0)))
13812
13813 (define-public python2-pymongo
13814 (package-with-python2 python-pymongo))
13815
13816 (define-public python-consul
13817 (package
13818 (name "python-consul")
13819 (version "0.6.1")
13820 (source
13821 (origin
13822 (method url-fetch)
13823 (uri (pypi-uri "python-consul" version))
13824 (sha256
13825 (base32
13826 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13827 (build-system python-build-system)
13828 (arguments
13829 '(#:tests? #f)) ; The tests are not distributed
13830 (propagated-inputs
13831 `(("python-requests" ,python-requests)
13832 ("python-six" ,python-six)))
13833 (home-page "https://github.com/cablehead/python-consul")
13834 (synopsis "Python client for Consul")
13835 (description
13836 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13837 discovery, monitoring and configuration.")
13838 (license license:expat)))
13839
13840 (define-public python2-consul
13841 (package-with-python2 python-consul))
13842
13843 (define-public python-schematics
13844 (package
13845 (name "python-schematics")
13846 (version "1.1.1")
13847 (source
13848 (origin
13849 (method git-fetch)
13850 (uri (git-reference
13851 (url "https://github.com/schematics/schematics")
13852 (commit (string-append "v" version))))
13853 (file-name (git-file-name name version))
13854 (sha256
13855 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13856 (build-system python-build-system)
13857 (propagated-inputs
13858 `(("python-six" ,python-six)))
13859 (arguments
13860 ;; The tests require a bunch of not very nice packages with fixed
13861 ;; version requirements (e.g. python-coveralls).
13862 `(#:tests? #f))
13863 (home-page "https://github.com/schematics/schematics")
13864 (synopsis "Python Data Structures for Humans")
13865 (description "Python Data Structures for Humans.")
13866 (license license:bsd-3)))
13867
13868 (define-public python2-schematics
13869 (package-with-python2 python-schematics))
13870
13871 (define-public python-odfpy
13872 (package
13873 (name "python-odfpy")
13874 (version "1.4.1")
13875 (source (origin
13876 (method url-fetch)
13877 (uri (pypi-uri "odfpy" version))
13878 (sha256
13879 (base32
13880 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13881 (arguments
13882 `(#:phases
13883 (modify-phases %standard-phases
13884 (replace 'check
13885 (lambda _
13886 (setenv "PYTHONPATH" (string-append "./build/lib:"
13887 (getenv "PYTHONPATH")))
13888 (invoke "pytest" "-vv"))))))
13889 (build-system python-build-system)
13890 (native-inputs
13891 `(("python-pytest" ,python-pytest)))
13892 (propagated-inputs
13893 `(("python-defusedxml" ,python-defusedxml)))
13894 (home-page "https://github.com/eea/odfpy")
13895 (synopsis "Python API and tools to manipulate OpenDocument files")
13896 (description "Collection of libraries and utility programs written in
13897 Python to manipulate OpenDocument 1.2 files.")
13898 (license
13899 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13900 ;; number of files with other licenses.
13901 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13902
13903 (define-public python2-odfpy
13904 (package-with-python2 python-odfpy))
13905
13906 (define-public python-natsort
13907 (package
13908 (name "python-natsort")
13909 (version "7.0.1")
13910 (source (origin
13911 (method url-fetch)
13912 (uri (pypi-uri "natsort" version))
13913 (sha256
13914 (base32
13915 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13916 (build-system python-build-system)
13917 (arguments
13918 `(#:modules ((guix build utils)
13919 (guix build python-build-system)
13920 (srfi srfi-1)
13921 (srfi srfi-26)
13922 (ice-9 ftw))
13923 #:phases
13924 (modify-phases %standard-phases
13925 (add-before 'check 'set-cachedir
13926 ;; Tests require write access to $HOME by default
13927 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13928 (replace 'check
13929 (lambda _
13930 (let ((cwd (getcwd)))
13931 (setenv "PYTHONPATH"
13932 (string-append
13933 cwd "/build/"
13934 (find (cut string-prefix? "lib" <>)
13935 (scandir (string-append cwd "/build")))
13936 ":"
13937 (getenv "PYTHONPATH")))
13938 (invoke "pytest" "-v")))))))
13939 (native-inputs
13940 `(("python-hypothesis" ,python-hypothesis)
13941 ("python-pytest-cov" ,python-pytest-cov)
13942 ("python-pytest-mock" ,python-pytest-mock)
13943 ("python-pytest" ,python-pytest)))
13944 (propagated-inputs ; TODO: Add python-fastnumbers.
13945 `(("python-pyicu" ,python-pyicu)))
13946 (home-page "https://github.com/SethMMorton/natsort")
13947 (synopsis "Natural sorting for python and shell")
13948 (description
13949 "Natsort lets you apply natural sorting on lists instead of
13950 lexicographical. If you use the built-in @code{sorted} method in python
13951 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13952 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13953 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13954 identifies numbers and sorts them separately from strings. It can also sort
13955 version numbers, real numbers, mixed types and more, and comes with a shell
13956 command @command{natsort} that exposes this functionality in the command line.")
13957 (license license:expat)
13958 (properties `((python2-variant . ,(delay python2-natsort))))))
13959
13960 ;; Natsort 6.x are the last versions with support for Python 2.
13961 (define-public python2-natsort
13962 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13963 (package (inherit base)
13964 (version "6.2.1")
13965 (source (origin
13966 (method url-fetch)
13967 (uri (pypi-uri "natsort" version))
13968 (sha256
13969 (base32
13970 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13971 (native-inputs
13972 `(("python2-pathlib" ,python2-pathlib)
13973 ,@(package-native-inputs base))))))
13974
13975 (define-public glances
13976 (package
13977 (name "glances")
13978 (version "3.1.4")
13979 (source
13980 (origin
13981 (method url-fetch)
13982 (uri (pypi-uri "Glances" version))
13983 (sha256
13984 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13985 (modules '((guix build utils)))
13986 (snippet
13987 '(begin
13988 ;; Glances phones PyPI for weekly update checks by default.
13989 ;; Disable these. The user can re-enable them if desired.
13990 (substitute* "glances/outdated.py"
13991 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13992 (string-append indentation
13993 "self.args.disable_check_update = True\n"
13994 line)))
13995 #t))))
13996 (build-system python-build-system)
13997 (propagated-inputs
13998 `(("python-future" ,python-future)
13999 ("python-psutil" ,python-psutil)))
14000 (home-page "https://github.com/nicolargo/glances")
14001 (synopsis "Cross-platform curses-based monitoring tool")
14002 (description
14003 "Glances is a curses-based monitoring tool for a wide variety of platforms.
14004 Glances uses the PsUtil library to get information from your system. It
14005 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
14006 (license license:lgpl3+)))
14007
14008 (define-public python-glances
14009 (deprecated-package "python-glances" glances))
14010
14011 (define-public python-graphql-core
14012 (package
14013 (name "python-graphql-core")
14014 (version "0.5.3")
14015 (source
14016 (origin
14017 (method url-fetch)
14018 (uri (pypi-uri "graphql-core" version))
14019 (sha256
14020 (base32
14021 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14022 (build-system python-build-system)
14023 (arguments
14024 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14025 #:phases
14026 (modify-phases %standard-phases
14027 (add-after 'unpack 'patch-hardcoded-version
14028 (lambda _ (substitute*
14029 "setup.py"
14030 (("'gevent==1.1rc1'") "'gevent'"))
14031 #t)))))
14032 (native-inputs
14033 `(("python-gevent" ,python-gevent)
14034 ("python-mock" ,python-mock)
14035 ("python-pytest-mock" ,python-pytest-mock)))
14036 (propagated-inputs
14037 `(("python-promise" ,python-promise)
14038 ("python-six" ,python-six)))
14039 (home-page "https://github.com/graphql-python/graphql-core")
14040 (synopsis "GraphQL implementation for Python")
14041 (description
14042 "GraphQL implementation for Python. GraphQL is a data query language and
14043 runtime designed and used to request and deliver data to mobile and web apps.
14044 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14045 to Python.")
14046 (license license:expat)))
14047
14048 (define-public python2-graphql-core
14049 (package-with-python2 python-graphql-core))
14050
14051 (define-public python-graphql-relay
14052 (package
14053 (name "python-graphql-relay")
14054 (version "0.4.5")
14055 (source
14056 (origin
14057 (method url-fetch)
14058 (uri (pypi-uri "graphql-relay" version))
14059 (sha256
14060 (base32
14061 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14062 (build-system python-build-system)
14063 (arguments
14064 '(#:tests? #f)) ; The tests are not distributed
14065 (propagated-inputs
14066 `(("python-graphql-core" ,python-graphql-core)
14067 ("python-promise" ,python-promise)
14068 ("python-six" ,python-six)))
14069 (home-page "https://github.com/graphql-python/graphql-relay-py")
14070 (synopsis "Relay implementation for Python")
14071 (description
14072 "This is a library to allow the easy creation of Relay-compliant servers
14073 using the GraphQL Python reference implementation of a GraphQL server. It
14074 should be noted that the code is a exact port of the original
14075 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14076 from Facebook.")
14077 (license license:expat)))
14078
14079 (define-public python2-graphql-relay
14080 (package-with-python2 python-graphql-relay))
14081
14082 (define-public python-graphene
14083 (package
14084 (name "python-graphene")
14085 (version "0.10.2")
14086 (source
14087 (origin
14088 (method url-fetch)
14089 (uri (pypi-uri "graphene" version))
14090 (sha256
14091 (base32
14092 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14093 (build-system python-build-system)
14094 (propagated-inputs
14095 `(("python-graphql-core" ,python-graphql-core)
14096 ("python-graphql-relay" ,python-graphql-relay)
14097 ("python-iso8601" ,python-iso8601)
14098 ("python-promise" ,python-promise)
14099 ("python-six" ,python-six)))
14100 (arguments
14101 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14102 (home-page "https://graphene-python.org/")
14103 (synopsis "GraphQL Framework for Python")
14104 (description
14105 "Graphene is a Python library for building GraphQL schemas/types.
14106 A GraphQL schema describes your data model, and provides a GraphQL server
14107 with an associated set of resolve methods that know how to fetch data.")
14108 (properties `((python2-variant . ,(delay python2-graphene))))
14109 (license license:expat)))
14110
14111 (define-public python2-graphene
14112 (let ((base (package-with-python2
14113 (strip-python2-variant python-graphene))))
14114 (package (inherit base)
14115 (native-inputs
14116 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14117 ,@(package-native-inputs base))))))
14118
14119 (define-public python-nautilus
14120 (package
14121 (name "python-nautilus")
14122 (version "0.4.9")
14123 (source
14124 (origin
14125 (method url-fetch)
14126 (uri (pypi-uri "nautilus" version))
14127 (sha256
14128 (base32
14129 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14130 (build-system python-build-system)
14131 (arguments `(#:tests? #f)) ; fails to import test modules
14132 (propagated-inputs
14133 `(("python-bcrypt" ,python-bcrypt)
14134 ("python-click" ,python-click)
14135 ("python-consul" ,python-consul)
14136 ("python-graphene" ,python-graphene)
14137 ("python-jinja2" ,python-jinja2)
14138 ("python-peewee" ,python-peewee)
14139 ("python-pika" ,python-pika)
14140 ("python-tornado" ,python-tornado)
14141 ("python-wtforms" ,python-wtforms)))
14142 (native-inputs
14143 `(("python-nose2" ,python-nose2)))
14144 (home-page "https://github.com/AlecAivazis/nautilus")
14145 (synopsis "Library for creating microservice applications")
14146 (description
14147 "Nautilus is a framework for flux based microservices that looks to
14148 provide extendible implementations of common aspects of a cloud so that you can
14149 focus on building massively scalable web applications.")
14150 (license license:expat)))
14151
14152 (define-public python-random2
14153 (package
14154 (name "python-random2")
14155 (version "1.0.1")
14156 (source (origin
14157 (method url-fetch)
14158 (uri (pypi-uri "random2" version ".zip"))
14159 (sha256
14160 (base32
14161 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14162 (build-system python-build-system)
14163 (native-inputs `(("unzip" ,unzip)))
14164 (home-page "http://pypi.python.org/pypi/random2")
14165 (synopsis "Python 3 version of the Python 2 @code{random} module")
14166 (description
14167 "This package provides a Python 3 ported version of Python 2.7’s
14168 @code{random} module. It has also been back-ported to work in Python 2.6.
14169
14170 In Python 3, the implementation of @code{randrange()} was changed, so that
14171 even with the same seed you get different sequences in Python 2 and 3.
14172
14173 This package closes that gap, allowing stable random number generation
14174 between the different Python versions.")
14175 (license license:psfl)))
14176
14177 (define-public python2-random2
14178 (package-with-python2 python-random2))
14179
14180 (define-public python-snowballstemmer
14181 (package
14182 (name "python-snowballstemmer")
14183 (version "2.0.0")
14184 (source (origin
14185 (method url-fetch)
14186 (uri (pypi-uri "snowballstemmer" version))
14187 (sha256
14188 (base32
14189 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14190 (build-system python-build-system)
14191 (arguments
14192 `(;; No tests exist
14193 #:tests? #f))
14194 (home-page "https://github.com/shibukawa/snowball_py")
14195 (synopsis "Snowball stemming library collection for Python")
14196 (description "This package provides 16 word stemmer algorithms generated
14197 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14198 English stemmer.")
14199 (license license:bsd-3)))
14200
14201 (define-public python2-snowballstemmer
14202 (package-with-python2 python-snowballstemmer))
14203
14204 (define-public python-setproctitle
14205 (package
14206 (name "python-setproctitle")
14207 (version "1.1.10")
14208 (source
14209 (origin
14210 (method url-fetch)
14211 (uri (pypi-uri "setproctitle" version))
14212 (sha256
14213 (base32
14214 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14215 (build-system python-build-system)
14216 (arguments
14217 '(#:phases
14218 (modify-phases %standard-phases
14219 (add-before 'check 'patch-Makefile
14220 ;; Stricly this is only required for the python2 variant.
14221 ;; But adding a phase in an inherited package seems to be
14222 ;; cumbersum. So we patch even for python3.
14223 (lambda _
14224 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14225 (when nose
14226 (substitute* "Makefile"
14227 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14228 (string-append nose "/bin/nosetests "))))
14229 #t)))
14230 (replace 'check
14231 (lambda _
14232 (setenv "PYTHON" (or (which "python3") (which "python")))
14233 (setenv "PYCONFIG" (if (which "python3-config")
14234 "python3-config --embed"
14235 "python-config"))
14236 (setenv "CC" "gcc")
14237 ;; No need to extend PYTHONPATH to find the built package, since
14238 ;; the Makefile will build anyway
14239 (invoke "make" "check"))))))
14240 (native-inputs
14241 `(("procps" ,procps))) ; required for tests
14242 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14243 (synopsis
14244 "Setproctitle implementation for Python to customize the process title")
14245 (description "The library allows a process to change its title (as displayed
14246 by system tools such as ps and top).
14247
14248 Changing the title is mostly useful in multi-process systems, for
14249 example when a master process is forked: changing the children's title
14250 allows identifying the task each process is busy with. The technique
14251 is used by PostgreSQL and the OpenSSH Server for example.")
14252 (license license:bsd-3)
14253 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14254
14255 (define-public python2-setproctitle
14256 (let ((base (package-with-python2
14257 (strip-python2-variant python-setproctitle))))
14258 (package
14259 (inherit base)
14260 (native-inputs `(("python2-nose" ,python2-nose)
14261 ,@(package-native-inputs base))))))
14262
14263 (define-public python-validictory
14264 (package
14265 (name "python-validictory")
14266 (version "1.0.1")
14267 (source
14268 (origin
14269 (method url-fetch)
14270 (uri (pypi-uri "validictory" version))
14271 (sha256
14272 (base32
14273 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14274 (build-system python-build-system)
14275 (arguments
14276 '(#:phases
14277 (modify-phases %standard-phases
14278 (add-after 'unpack 'bootstrap
14279 ;; Move the tests out of the package directory to avoid
14280 ;; packaging them.
14281 (lambda* _
14282 (rename-file "validictory/tests" "tests")
14283 (delete-file "tests/__init__.py")))
14284 (replace 'check
14285 (lambda _
14286 ;; Extend PYTHONPATH so the built package will be found.
14287 (setenv "PYTHONPATH"
14288 (string-append (getcwd) "/build/lib:"
14289 (getenv "PYTHONPATH")))
14290 (invoke "py.test" "-vv" ))))))
14291 (native-inputs
14292 `(("python-pytest" ,python-pytest)))
14293 (home-page
14294 "https://github.com/jamesturk/validictory")
14295 (synopsis "General purpose Python data validator")
14296 (description "It allows validation of arbitrary Python data structures.
14297
14298 The schema format is based on the JSON Schema
14299 proposal (http://json-schema.org), so combined with json the library is also
14300 useful as a validator for JSON data.")
14301 (license license:expat)))
14302
14303 (define-public python2-validictory
14304 (package-with-python2 python-validictory))
14305
14306 (define-public python-pyelftools
14307 (package
14308 (name "python-pyelftools")
14309 (version "0.25")
14310 (source
14311 (origin
14312 (method url-fetch)
14313 (uri (pypi-uri "pyelftools" version))
14314 (sha256
14315 (base32
14316 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14317 (build-system python-build-system)
14318 (arguments
14319 `(#:phases
14320 (modify-phases %standard-phases
14321 (add-before 'check 'set-pythonpath
14322 (lambda _
14323 (setenv "PYTHONPATH"
14324 (string-append
14325 (getcwd) "/test/"
14326 ":" (getenv "PYTHONPATH")))
14327 #t)))))
14328 (home-page
14329 "https://github.com/eliben/pyelftools")
14330 (synopsis
14331 "Analyze binary and library file information")
14332 (description "This Python library provides interfaces for parsing and
14333 analyzing two binary and library file formats; the Executable and Linking
14334 Format (ELF), and debugging information in the Debugging With Attributed
14335 Record Format (DWARF).")
14336 (license license:public-domain)))
14337
14338 (define-public python-pyev
14339 (package
14340 (name "python-pyev")
14341 (version "0.9.0")
14342 (source
14343 (origin
14344 (method url-fetch)
14345 (uri (pypi-uri "pyev" version))
14346 (sha256
14347 (base32
14348 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14349 (build-system python-build-system)
14350 (arguments
14351 `(#:tests? #f ; no test suite
14352 #:phases
14353 (modify-phases %standard-phases
14354 (add-after 'unpack 'patch
14355 (lambda* (#:key inputs #:allow-other-keys)
14356 (let ((libev (string-append (assoc-ref inputs "libev")
14357 "/lib/libev.so.4")))
14358 (substitute* "setup.py"
14359 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14360 (string-append "libev_dll_name = \"" libev "\"")))))))))
14361 (inputs
14362 `(("libev" ,libev)))
14363 (home-page "http://pythonhosted.org/pyev/")
14364 (synopsis "Python libev interface")
14365 (description "Pyev provides a Python interface to libev.")
14366 (license license:gpl3)))
14367
14368 (define-public python2-pyev
14369 (package-with-python2 python-pyev))
14370
14371 (define-public python-imagesize
14372 (package
14373 (name "python-imagesize")
14374 (version "1.2.0")
14375 (source
14376 (origin
14377 (method url-fetch)
14378 (uri (pypi-uri "imagesize" version))
14379 (sha256
14380 (base32
14381 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14382 (build-system python-build-system)
14383 (home-page "https://github.com/shibukawa/imagesize_py")
14384 (synopsis "Gets image size of files in various formats in Python")
14385 (description
14386 "This package allows determination of image size from
14387 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14388 (license license:expat)))
14389
14390 (define-public python2-imagesize
14391 (package-with-python2 python-imagesize))
14392
14393 (define-public python-termstyle
14394 (package
14395 (name "python-termstyle")
14396 (version "0.1.11")
14397 (source
14398 (origin
14399 (method url-fetch)
14400 (uri (pypi-uri "termstyle" version))
14401 (sha256
14402 (base32
14403 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14404 (build-system python-build-system)
14405 (arguments
14406 '(#:phases
14407 (modify-phases %standard-phases
14408 (replace 'check
14409 (lambda _
14410 (invoke "python" "test3.py"))))))
14411 (home-page "https://github.com/gfxmonk/termstyle")
14412 (synopsis "Console text coloring for Python")
14413 (description "This package provides console text coloring for Python.")
14414 (license license:bsd-3)))
14415
14416 (define-public python-argcomplete
14417 (package
14418 (name "python-argcomplete")
14419 (version "1.11.1")
14420 (source
14421 (origin
14422 (method url-fetch)
14423 (uri (pypi-uri "argcomplete" version))
14424 (sha256
14425 (base32
14426 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14427 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14428 (build-system python-build-system)
14429 (native-inputs
14430 `(("python-coverage" ,python-coverage)
14431 ("python-flake8" ,python-flake8)
14432 ("python-pexpect" ,python-pexpect)
14433 ("python-wheel" ,python-wheel)
14434 ("tcsh" ,tcsh)
14435 ("fish" ,fish)
14436 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14437 (home-page "https://github.com/kislyuk/argcomplete")
14438 (synopsis "Shell tab completion for Python argparse")
14439 (description "argcomplete provides extensible command line tab completion
14440 of arguments and options for Python scripts using @code{argparse}. It's
14441 particularly useful for programs with many options or sub-parsers that can
14442 dynamically suggest completions; for example, when browsing resources over the
14443 network.")
14444 (license license:asl2.0)))
14445
14446 (define-public python2-argcomplete
14447 (package-with-python2 python-argcomplete))
14448
14449 (define-public python-csscompressor
14450 (package
14451 (name "python-csscompressor")
14452 (version "0.9.5")
14453 (source
14454 (origin
14455 (method url-fetch)
14456 (uri (pypi-uri "csscompressor" version))
14457 (sha256
14458 (base32
14459 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14460 (build-system python-build-system)
14461 (arguments
14462 '(#:phases
14463 (modify-phases %standard-phases
14464 (replace 'check
14465 (lambda _
14466 (invoke "py.test"))))))
14467 (native-inputs
14468 `(("python-pytest" ,python-pytest)))
14469 (home-page "https://github.com/sprymix/csscompressor")
14470 (synopsis "Python port of YUI CSS Compressor")
14471 (description
14472 "This package provides a python port of YUI CSS Compressor.")
14473 (license license:bsd-3)))
14474
14475 (define-public python-rcssmin
14476 (package
14477 (name "python-rcssmin")
14478 (version "1.0.6")
14479 (source
14480 (origin
14481 (method url-fetch)
14482 (uri (pypi-uri "rcssmin" version))
14483 (sha256
14484 (base32
14485 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14486 (build-system python-build-system)
14487 (arguments
14488 '(#:phases
14489 (modify-phases %standard-phases
14490 (replace 'check
14491 (lambda _
14492 (invoke "python" "run_tests.py" "tests"))))))
14493 (home-page "http://opensource.perlig.de/rcssmin/")
14494 (synopsis "CSS Minifier")
14495 (description "The minifier is based on the semantics of the YUI compressor,
14496 which itself is based on the rule list by Isaac Schlueter.")
14497 (license license:asl2.0)))
14498
14499 (define-public python-rjsmin
14500 (package
14501 (name "python-rjsmin")
14502 (version "1.1.0")
14503 (source
14504 (origin
14505 (method url-fetch)
14506 (uri (pypi-uri "rjsmin" version))
14507 (sha256
14508 (base32
14509 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14510 (modules '((guix build utils)))
14511 (snippet
14512 '(begin
14513 (for-each delete-file (find-files "bench" "\\.js$"))
14514 #t))))
14515 (build-system python-build-system)
14516 (arguments
14517 '(#:tests? #f ; Not all test files included.
14518 #:phases
14519 (modify-phases %standard-phases
14520 (replace 'check
14521 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14522 (add-installed-pythonpath inputs outputs)
14523 (if tests?
14524 (invoke "py.test" "-vv" "tests")
14525 #t))))))
14526 (native-inputs
14527 `(("python-pytest" ,python-pytest)))
14528 (home-page "http://opensource.perlig.de/rjsmin/")
14529 (synopsis "Javascript Minifier")
14530 (description "@code{rJSmin} is a javascript minifier written in Python. The
14531 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14532 is a re-implementation aiming for speed, so it can be used at runtime (rather
14533 than during a preprocessing step).")
14534 (license license:asl2.0)))
14535
14536 (define-public python-xopen
14537 (package
14538 (name "python-xopen")
14539 (version "0.5.0")
14540 (source
14541 (origin
14542 (method url-fetch)
14543 (uri (pypi-uri "xopen" version))
14544 (sha256
14545 (base32
14546 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14547 (build-system python-build-system)
14548 (propagated-inputs
14549 `(("python-setuptools-scm" ,python-setuptools-scm)))
14550 (home-page "https://github.com/marcelm/xopen/")
14551 (synopsis "Open compressed files transparently")
14552 (description "This module provides an @code{xopen} function that works like
14553 Python's built-in @code{open} function, but can also deal with compressed files.
14554 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14555 recognized by their file extensions. The focus is on being as efficient as
14556 possible on all supported Python versions.")
14557 (license license:expat)))
14558
14559 (define-public python2-xopen
14560 (let ((base (package-with-python2
14561 (strip-python2-variant python-xopen))))
14562 (package
14563 (inherit base)
14564 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14565 ,@(package-propagated-inputs base))))))
14566
14567 (define-public python-cheetah
14568 (package
14569 (name "python-cheetah")
14570 (version "3.2.4")
14571 (source
14572 (origin
14573 (method url-fetch)
14574 (uri (pypi-uri "Cheetah3" version))
14575 (sha256
14576 (base32
14577 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14578 (build-system python-build-system)
14579 (arguments
14580 `(#:modules ((guix build utils)
14581 (guix build python-build-system)
14582 (ice-9 ftw)
14583 (srfi srfi-1)
14584 (srfi srfi-26))
14585 #:phases (modify-phases %standard-phases
14586 (add-after 'unpack 'use-absolute-python
14587 (lambda _
14588 (substitute* "Cheetah/CheetahWrapper.py"
14589 (("#!/usr/bin/env python")
14590 (string-append "#!" (which "python"))))
14591 #t))
14592 (add-after 'unpack 'fix-tests
14593 (lambda _
14594 (substitute* "Cheetah/Tests/ImportHooks.py"
14595 (("os.path.dirname\\(__file__\\)")
14596 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14597 #t))
14598 (replace 'check
14599 (lambda _
14600 (let ((cwd (getcwd)))
14601 (setenv "PYTHONPATH"
14602 (string-append
14603 cwd "/build/"
14604 (find (cut string-prefix? "lib" <>)
14605 (scandir (string-append cwd "/build")))
14606 ":" (getenv "PYTHONPATH")))
14607 (setenv "PATH"
14608 (string-append (getenv "PATH")
14609 ":" cwd "/bin"))
14610 (setenv "TMPDIR" "/tmp")
14611
14612 (substitute* "Cheetah/Tests/Test.py"
14613 (("unittest.TextTestRunner\\(\\)")
14614 "unittest.TextTestRunner(verbosity=2)"))
14615
14616 (invoke "python" "Cheetah/Tests/Test.py")))))))
14617 (propagated-inputs
14618 `(("python-markdown" ,python-markdown))) ;optional
14619 (home-page "https://cheetahtemplate.org/")
14620 (synopsis "Template engine")
14621 (description "Cheetah is a text-based template engine and Python code
14622 generator.
14623
14624 Cheetah can be used as a standalone templating utility or referenced as
14625 a library from other Python applications. It has many potential uses,
14626 but web developers looking for a viable alternative to ASP, JSP, PHP and
14627 PSP are expected to be its principle user group.
14628
14629 Features:
14630 @enumerate
14631 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14632 text-based format.
14633 @item Cleanly separates content, graphic design, and program code.
14634 @item Blends the power and flexibility of Python with a simple template language
14635 that non-programmers can understand.
14636 @item Gives template writers full access to any Python data structure, module,
14637 function, object, or method in their templates.
14638 @item Makes code reuse easy by providing an object-orientated interface to
14639 templates that is accessible from Python code or other Cheetah templates.
14640 One template can subclass another and selectively reimplement sections of it.
14641 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14642 improve the performance of a dynamic website.
14643 @item Compiles templates into optimized, yet readable, Python code.
14644 @end enumerate")
14645 (license (license:x11-style "file://LICENSE"))))
14646
14647 (define-public python2-cheetah
14648 (package-with-python2 python-cheetah))
14649
14650 (define-public python-dulwich
14651 (package
14652 (name "python-dulwich")
14653 (version "0.19.16")
14654 (source
14655 (origin
14656 (method url-fetch)
14657 (uri (list (string-append "https://www.dulwich.io/releases/"
14658 "dulwich-" version ".tar.gz")
14659 (pypi-uri "dulwich" version)))
14660 (sha256
14661 (base32
14662 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14663 (build-system python-build-system)
14664 (arguments
14665 `(#:phases
14666 (modify-phases %standard-phases
14667 (add-before 'check 'fix-tests
14668 (lambda* (#:key inputs #:allow-other-keys)
14669 ;; The tests use Popen with a custom environment which doesn't
14670 ;; include PATH.
14671 (substitute* "dulwich/tests/compat/utils.py"
14672 (("'git'") (string-append "'"
14673 (which "git")
14674 "'")))
14675 (substitute* '("dulwich/tests/test_repository.py"
14676 "dulwich/tests/test_hooks.py")
14677 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14678 (setenv "TEST_RUNNER" "unittest")
14679 (setenv "PYTHONHASHSEED" "random")
14680 #t)))))
14681 (propagated-inputs
14682 `(("python-fastimport" ,python-fastimport)
14683 ("python-urllib3" ,python-urllib3)))
14684 (native-inputs
14685 `(("python-mock" ,python-mock)
14686 ("python-geventhttpclient" ,python-geventhttpclient)
14687 ("git" ,git)))
14688 (home-page "https://www.dulwich.io/")
14689 (synopsis "Git implementation in Python")
14690 (description "Dulwich is an implementation of the Git file formats and
14691 protocols written in pure Python.")
14692 ;; Can be used with either license.
14693 (license (list license:asl2.0 license:gpl2+))))
14694
14695 (define-public python2-dulwich
14696 (package-with-python2 python-dulwich))
14697
14698 (define-public python-pbkdf2
14699 (package
14700 (name "python-pbkdf2")
14701 (version "1.3")
14702 (source
14703 (origin
14704 (method url-fetch)
14705 (uri (pypi-uri "pbkdf2" version))
14706 (sha256
14707 (base32
14708 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14709 (build-system python-build-system)
14710 (arguments
14711 '(#:phases
14712 (modify-phases %standard-phases
14713 (replace 'check
14714 (lambda _
14715 (setenv "PYTHONPATH"
14716 (string-append (getcwd) "/build/lib:"
14717 (getenv "PYTHONPATH")))
14718 (invoke "python" "test/test_pbkdf2.py"))))))
14719 (propagated-inputs
14720 `(("python-pycrypto" ,python-pycrypto))) ; optional
14721 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14722 (synopsis "Password-based key derivation")
14723 (description "This module implements the password-based key derivation
14724 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14725
14726 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14727 is part of the RSA Public Key Cryptography Standards series. The provided
14728 implementation takes a password or a passphrase and a salt value (and
14729 optionally a iteration count, a digest module, and a MAC module) and provides
14730 a file-like object from which an arbitrarily-sized key can be read.")
14731 (license license:expat)))
14732
14733 (define-public python2-pbkdf2
14734 (package-with-python2 python-pbkdf2))
14735
14736 (define-public python-qrcode
14737 (package
14738 (name "python-qrcode")
14739 (version "6.1")
14740 (source
14741 (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "qrcode" version))
14744 (sha256
14745 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14746 (build-system python-build-system)
14747 (arguments
14748 ;; FIXME: Tests require packaging 'pymaging'.
14749 '(#:tests? #f))
14750 (propagated-inputs
14751 `(("python-lxml" ,python-lxml) ; for SVG output
14752 ("python-pillow" ,python-pillow) ; for PNG output
14753 ("python-six" ,python-six)))
14754 (home-page "https://github.com/lincolnloop/python-qrcode")
14755 (synopsis "QR Code image generator")
14756 (description "This package provides a pure Python QR Code generator
14757 module. It uses the Python Imaging Library (PIL) to allow for the generation
14758 of QR Codes.
14759
14760 In addition this package provides a command line tool to generate QR codes and
14761 either write these QR codes to a file or do the output as ascii art at the
14762 console.")
14763 (license license:bsd-3)))
14764
14765 (define-public python2-qrcode
14766 (package-with-python2 python-qrcode))
14767
14768 (define-public python-rst2ansi
14769 (package
14770 (name "python-rst2ansi")
14771 (version "0.1.5")
14772 (source
14773 (origin
14774 (method url-fetch)
14775 (uri (pypi-uri "rst2ansi" version))
14776 (sha256
14777 (base32
14778 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14779 (build-system python-build-system)
14780 (propagated-inputs
14781 `(("python-docutils" ,python-docutils)))
14782 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14783 (synopsis "Convert RST to ANSI-decorated console output")
14784 (description
14785 "Python module dedicated to rendering RST (reStructuredText) documents
14786 to ansi-escaped strings suitable for display in a terminal.")
14787 (license license:expat)))
14788
14789 (define-public python-ansi2html
14790 (package
14791 (name "python-ansi2html")
14792 (version "1.2.0")
14793 (source
14794 (origin
14795 (method url-fetch)
14796 (uri (pypi-uri "ansi2html" version))
14797 (sha256
14798 (base32
14799 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14800 (build-system python-build-system)
14801 (native-inputs
14802 `(("python-mock" ,python-mock)
14803 ("python-nose" ,python-nose)))
14804 (propagated-inputs
14805 `(("python-six" ,python-six)))
14806 (home-page "https://github.com/ralphbean/ansi2html")
14807 (synopsis "Convert ANSI-decorated console output to HTML")
14808 (description
14809 "@command{ansi2html} is a Python library and command line utility for
14810 converting text with ANSI color codes to HTML or LaTeX.")
14811 (license license:gpl3+)))
14812
14813 (define-public python2-ansi2html
14814 (package-with-python2 python-ansi2html))
14815
14816 (define-public python-ddt
14817 (package
14818 (name "python-ddt")
14819 (version "1.4.1")
14820 (source
14821 (origin
14822 (method url-fetch)
14823 (uri (pypi-uri "ddt" version))
14824 (sha256
14825 (base32
14826 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14827 (build-system python-build-system)
14828 (native-inputs
14829 `(("python-pytest" ,python-pytest)))
14830 (propagated-inputs
14831 `(("python-pyyaml" ,python-pyyaml)))
14832 (home-page "https://github.com/datadriventests/ddt")
14833 (synopsis "Data-Driven Tests")
14834 (description
14835 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14836 running it with different test data, and make it appear as multiple test
14837 cases.")
14838 (license license:expat)))
14839
14840 (define-public python-pycountry
14841 (package
14842 (name "python-pycountry")
14843 (version "18.5.26")
14844 (source
14845 (origin
14846 (method url-fetch)
14847 (uri (pypi-uri "pycountry" version))
14848 (sha256
14849 (base32
14850 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14851 (build-system python-build-system)
14852 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14853 (synopsis "ISO databases for languages, countries, currencies, etc.")
14854 (description
14855 "@code{pycountry} provides the ISO databases for the standards:
14856 @enumerate
14857 @item 639-3 (Languages)
14858 @item 3166 (Countries)
14859 @item 3166-3 (Deleted Countries)
14860 @item 3166-2 (Subdivisions of countries)
14861 @item 4217 (Currencies)
14862 @item 15924 (Scripts)
14863 @end enumerate
14864 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14865 through a Python API.")
14866 (license license:lgpl2.1+)))
14867
14868 (define-public python2-pycountry
14869 (package-with-python2 python-pycountry))
14870
14871 (define-public python-pycosat
14872 (package
14873 (name "python-pycosat")
14874 (version "0.6.3")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "pycosat" version ".zip"))
14879 (sha256
14880 (base32
14881 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14882 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14883 (build-system python-build-system)
14884 (native-inputs
14885 `(("unzip" ,unzip)))
14886 (home-page "https://github.com/ContinuumIO/pycosat")
14887 (synopsis "Bindings to picosat (a SAT solver)")
14888 (description
14889 "This package provides efficient Python bindings to @code{picosat} on
14890 the C level. When importing pycosat, the @code{picosat} solver becomes part
14891 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14892 Problem} (SAT) solver.")
14893 (license license:expat)))
14894
14895 (define-public python2-pycosat
14896 (package-with-python2 python-pycosat))
14897
14898 (define-public python2-ruamel.ordereddict
14899 (package
14900 (name "python2-ruamel.ordereddict")
14901 (version "0.4.9")
14902 (source
14903 (origin
14904 (method url-fetch)
14905 (uri (pypi-uri "ruamel.ordereddict" version))
14906 (sha256
14907 (base32
14908 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14909 (build-system python-build-system)
14910 (arguments
14911 `(#:python ,python-2
14912 #:phases
14913 (modify-phases %standard-phases
14914 (delete 'check)
14915 (add-after 'install 'check
14916 (lambda* (#:key inputs outputs #:allow-other-keys)
14917 (add-installed-pythonpath inputs outputs)
14918 (invoke "python" "test/testordereddict.py"))))))
14919 (home-page "https://bitbucket.org/ruamel/ordereddict")
14920 (synopsis "Version of dict that keeps keys in insertion order")
14921 (description
14922 "This is an implementation of an ordered dictionary with @dfn{Key
14923 Insertion Order} (KIO: updates of values do not affect the position of the
14924 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14925 removed and put at the back). The standard library module @code{OrderedDict},
14926 implemented later, implements a subset of @code{ordereddict} functionality.
14927 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14928 Order} (KSO, no sorting function can be specified, but a transform can be
14929 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14930 (license license:expat)))
14931
14932 (define-public python-pypeg2
14933 (package
14934 (name "python-pypeg2")
14935 (version "2.15.2")
14936 (source
14937 (origin
14938 (method url-fetch)
14939 (uri (pypi-uri "pyPEG2" version))
14940 (sha256
14941 (base32
14942 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14943 (build-system python-build-system)
14944 (propagated-inputs `(("python-lxml" ,python-lxml)))
14945 (arguments
14946 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14947 '(#:tests? #f))
14948 (home-page "https://fdik.org/pyPEG/")
14949 (synopsis "Parsering Expression Grammars in Python")
14950 (description "PyPEG is an intrinsic parser interpreter framework for
14951 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14952 parse many formal languages.")
14953 (license license:gpl2)))
14954
14955 (define-public python-incremental
14956 (package
14957 (name "python-incremental")
14958 (version "17.5.0")
14959 (source
14960 (origin
14961 (method url-fetch)
14962 (uri (pypi-uri "incremental" version))
14963 (sha256
14964 (base32
14965 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14966 (build-system python-build-system)
14967 (home-page "https://github.com/hawkowl/incremental")
14968 (synopsis "Library for versioning Python projects")
14969 (description "Incremental is a small library that versions your Python
14970 projects.")
14971 (license license:expat)))
14972
14973 (define-public python2-incremental
14974 (package-with-python2 python-incremental))
14975
14976 (define-public python-invoke
14977 (package
14978 (name "python-invoke")
14979 (home-page "https://www.pyinvoke.org/")
14980 (version "1.4.1")
14981 (source (origin
14982 (method url-fetch)
14983 (uri (pypi-uri "invoke" version))
14984 (sha256
14985 (base32
14986 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14987 (build-system python-build-system)
14988 (arguments
14989 ;; XXX: Requires many dependencies that are not yet in Guix.
14990 `(#:tests? #f))
14991 (synopsis "Pythonic task execution")
14992 (description
14993 "Invoke is a Python task execution tool and library, drawing inspiration
14994 from various sources to arrive at a powerful and clean feature set. It is
14995 evolved from the Fabric project, but focuses on local and abstract concerns
14996 instead of servers and network commands.")
14997 (license license:bsd-3)))
14998
14999 (define-public python2-invoke
15000 (package-with-python2 python-invoke))
15001
15002 (define-public python-automat
15003 (package
15004 (name "python-automat")
15005 (version "20.2.0")
15006 (source (origin
15007 (method url-fetch)
15008 (uri (pypi-uri "Automat" version))
15009 (sha256
15010 (base32
15011 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15012 (build-system python-build-system)
15013 ;; We disable the tests because they require python-twisted, while
15014 ;; python-twisted depends on python-automat. Twisted is optional, but the
15015 ;; tests fail if it is not available. Also see
15016 ;; <https://github.com/glyph/automat/issues/71>.
15017 (arguments '(#:tests? #f))
15018 (native-inputs
15019 `(("python-m2r" ,python-m2r)
15020 ("python-setuptools-scm" ,python-setuptools-scm)
15021 ("python-graphviz" ,python-graphviz)))
15022 (propagated-inputs
15023 `(("python-six" ,python-six)
15024 ("python-attrs" ,python-attrs)))
15025 (home-page "https://github.com/glyph/Automat")
15026 (synopsis "Self-service finite-state machines")
15027 (description "Automat is a library for concise, idiomatic Python
15028 expression of finite-state automata (particularly deterministic finite-state
15029 transducers).")
15030 (license license:expat)))
15031
15032 (define-public python2-automat
15033 (package-with-python2 python-automat))
15034
15035 (define-public python-m2r
15036 (package
15037 (name "python-m2r")
15038 (version "0.2.1")
15039 (source (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "m2r" version))
15042 (sha256
15043 (base32
15044 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15045 (build-system python-build-system)
15046 (propagated-inputs
15047 `(("python-docutils" ,python-docutils)
15048 ("python-mistune" ,python-mistune)))
15049 (native-inputs
15050 `(("python-pygments" ,python-pygments)
15051 ("python-mock" ,python-mock)))
15052 (home-page "https://github.com/miyakogi/m2r")
15053 (synopsis "Markdown to reStructuredText converter")
15054 (description "M2R converts a markdown file including reST markups to valid
15055 reST format.")
15056 (license license:expat)))
15057
15058 (define-public python2-m2r
15059 (package-with-python2 python-m2r))
15060
15061 (define-public python-constantly
15062 (package
15063 (name "python-constantly")
15064 (version "15.1.0")
15065 (source (origin
15066 (method url-fetch)
15067 (uri (pypi-uri "constantly" version))
15068 (sha256
15069 (base32
15070 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15071 (build-system python-build-system)
15072 (home-page "https://github.com/twisted/constantly")
15073 (synopsis "Symbolic constants in Python")
15074 (description "Constantly is a Python library that provides symbolic
15075 constant support. It includes collections and constants with text, numeric,
15076 and bit flag values.")
15077 (license license:expat)))
15078
15079 (define-public python2-constantly
15080 (package-with-python2 python-constantly))
15081
15082 (define-public python-attrs
15083 (package
15084 (name "python-attrs")
15085 (version "19.3.0")
15086 (source (origin
15087 (method url-fetch)
15088 (uri (pypi-uri "attrs" version))
15089 (sha256
15090 (base32
15091 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15092 (build-system python-build-system)
15093 (arguments
15094 `(#:modules ((guix build utils)
15095 (guix build python-build-system)
15096 (ice-9 ftw)
15097 (srfi srfi-1)
15098 (srfi srfi-26))
15099 #:phases (modify-phases %standard-phases
15100 (replace 'check
15101 (lambda _
15102 (let ((cwd (getcwd)))
15103 (setenv "PYTHONPATH"
15104 (string-append
15105 cwd "/build/"
15106 (find (cut string-prefix? "lib" <>)
15107 (scandir (string-append cwd "/build")))
15108 ":"
15109 (getenv "PYTHONPATH")))
15110 (invoke "python" "-m" "pytest")))))))
15111 (native-inputs
15112 `(("python-coverage" ,python-coverage)
15113 ("python-hypothesis" ,python-hypothesis)
15114 ("python-pympler" ,python-pympler)
15115 ("python-pytest" ,python-pytest)
15116 ("python-six" ,python-six)
15117 ("python-sphinx" ,python-sphinx)
15118 ("python-zope-interface" ,python-zope-interface)))
15119 (home-page "https://github.com/python-attrs/attrs/")
15120 (synopsis "Attributes without boilerplate")
15121 (description "@code{attrs} is a Python package with class decorators that
15122 ease the chores of implementing the most common attribute-related object
15123 protocols.")
15124 (license license:expat)))
15125
15126 (define-public python2-attrs
15127 (package-with-python2 python-attrs))
15128
15129 (define-public python-attrs-bootstrap
15130 (package
15131 (inherit python-attrs)
15132 (name "python-attrs-bootstrap")
15133 (native-inputs `())
15134 (arguments `(#:tests? #f))))
15135
15136 (define-public python2-attrs-bootstrap
15137 (package-with-python2 python-attrs-bootstrap))
15138
15139 (define-public python2-cliapp
15140 (package
15141 (name "python2-cliapp")
15142 (version "1.20180812.1")
15143 (source
15144 (origin
15145 (method url-fetch)
15146 (uri (string-append
15147 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15148 version ".tar.gz"))
15149 (sha256
15150 (base32
15151 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15152 (build-system python-build-system)
15153 (arguments
15154 `(#:python ,python-2
15155 #:phases
15156 (modify-phases %standard-phases
15157 ;; check phase needs to be run before the build phase. If not,
15158 ;; coverage-test-runner looks for tests for the built source files,
15159 ;; and fails.
15160 (delete 'check)
15161 (add-before 'build 'check
15162 (lambda _
15163 ;; Disable python3 tests
15164 (substitute* "check"
15165 (("python3") "# python3"))
15166 (invoke "./check"))))))
15167 (native-inputs
15168 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15169 ("python2-pep8" ,python2-pep8)))
15170 (propagated-inputs
15171 `(("python2-pyaml" ,python2-pyaml)))
15172 (home-page "https://liw.fi/cliapp/")
15173 (synopsis "Python framework for command line programs")
15174 (description "@code{python2-cliapp} is a python framework for
15175 command line programs. It contains the typical stuff such programs
15176 need to do, such as parsing the command line for options, and
15177 iterating over input files.")
15178 (license license:gpl2+)))
15179
15180 (define-public python2-ttystatus
15181 (package
15182 (name "python2-ttystatus")
15183 (version "0.38")
15184 (source
15185 (origin
15186 (method git-fetch)
15187 (uri (git-reference
15188 (url "http://git.liw.fi/ttystatus")
15189 ;; There are no tags after ttystatus-0.36.
15190 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15191 (sha256
15192 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15193 (file-name (git-file-name name version))))
15194 (build-system python-build-system)
15195 (native-inputs
15196 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15197 ("python2-pep8" ,python2-pep8)))
15198 (arguments
15199 `(#:python ,python-2
15200 #:phases
15201 (modify-phases %standard-phases
15202 ;; check phase needs to be run before the build phase. If not,
15203 ;; coverage-test-runner looks for tests for the built source files,
15204 ;; and fails.
15205 (delete 'check)
15206 (add-before 'build 'check
15207 (lambda _ (invoke "make" "check"))))))
15208 (home-page "https://liw.fi/ttystatus/")
15209 (synopsis "Python library for showing progress reporting and
15210 status updates on terminals")
15211 (description "@code{python2-ttystatus} is a python library for
15212 showing progress reporting and status updates on terminals, for
15213 command line programs. Output is automatically adapted to the width
15214 of the terminal: truncated if it does not fit, and resized if the
15215 terminal size changes.")
15216 (license license:gpl3+)))
15217
15218 (define-public python2-tracing
15219 (package
15220 (name "python2-tracing")
15221 (version "0.10")
15222 (source
15223 (origin
15224 (method url-fetch)
15225 (uri (string-append
15226 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15227 version ".tar.gz"))
15228 (sha256
15229 (base32
15230 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15231 (build-system python-build-system)
15232 (arguments
15233 `(#:python ,python-2))
15234 (home-page "https://liw.fi/tracing/")
15235 (synopsis "Python debug logging helper")
15236 (description "@code{python2-tracing} is a python library for
15237 logging debug messages. It provides a way to turn debugging messages
15238 on and off, based on the filename they occur in. It is much faster
15239 than using @code{logging.Filter} to accomplish the same thing, which
15240 matters when code is run in production mode. The actual logging still
15241 happens using the @code{logging} library.")
15242 (license license:gpl3+)))
15243
15244 (define-public python2-larch
15245 (package
15246 (name "python2-larch")
15247 (version "1.20151025")
15248 (source
15249 (origin
15250 (method url-fetch)
15251 (uri (string-append
15252 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15253 version ".tar.gz"))
15254 (patches (search-patches
15255 "python2-larch-coverage-4.0a6-compatibility.patch"))
15256 (sha256
15257 (base32
15258 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15259 (build-system python-build-system)
15260 (arguments
15261 `(#:python ,python-2
15262 #:phases
15263 (modify-phases %standard-phases
15264 ;; check phase needs to be run before the build phase. If not,
15265 ;; coverage-test-runner looks for tests for the built source files,
15266 ;; and fails.
15267 (delete 'check)
15268 (add-before 'build 'check
15269 (lambda _ (invoke "make" "check"))))))
15270 (native-inputs
15271 `(("cmdtest" ,cmdtest)
15272 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15273 (propagated-inputs
15274 `(("python2-tracing" ,python2-tracing)))
15275 (home-page "https://liw.fi/larch/")
15276 (synopsis "Python copy-on-write B-tree library")
15277 (description "@code{python2-larch} is an implementation of
15278 particular kind of B-tree, based on research by Ohad Rodeh. See
15279 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15280 on the data structure.
15281
15282 The distinctive feature of this B-tree is that a node is never
15283 (conceptually) modified. Instead, all updates are done by
15284 copy-on-write. This makes it easy to clone a tree, and modify only the
15285 clone, while other processes access the original tree.")
15286 (license license:gpl3+)))
15287
15288 (define-public python-astroid
15289 (package
15290 (name "python-astroid")
15291 (version "2.4.2")
15292 (source
15293 (origin
15294 (method url-fetch)
15295 (uri (pypi-uri "astroid" version))
15296 (sha256
15297 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15298 (modules '((guix build utils)))
15299 (snippet
15300 '(begin
15301 ;; Check to see if the version pinning has been removed.
15302 (substitute* "astroid/__pkginfo__.py"
15303 (("==1\\.4\\.\\*") ">=1.4.0"))
15304 #t))))
15305 (build-system python-build-system)
15306 (propagated-inputs
15307 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15308 ("python-six" ,python-six)
15309 ("python-wrapt" ,python-wrapt)))
15310 (native-inputs
15311 `(("python-dateutil" ,python-dateutil)
15312 ("python-pytest" ,python-pytest)
15313 ("python-pytest-runner" ,python-pytest-runner)))
15314 (home-page "https://github.com/PyCQA/astroid")
15315 (synopsis "Common base representation of python source code for pylint and
15316 other projects")
15317 (description "@code{python-astroid} provides a common base representation
15318 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15319
15320 It provides a compatible representation which comes from the _ast module. It
15321 rebuilds the tree generated by the builtin _ast module by recursively walking
15322 down the AST and building an extended ast. The new node classes have
15323 additional methods and attributes for different usages. They include some
15324 support for static inference and local name scopes. Furthermore, astroid
15325 builds partial trees by inspecting living objects.")
15326 (license license:lgpl2.1+)
15327 (properties `((python2-variant . ,(delay python2-astroid))))))
15328
15329 (define-public python2-astroid
15330 (let ((base (package-with-python2
15331 (strip-python2-variant python-astroid))))
15332 (package (inherit base)
15333 ;; Version 2.x removes python2 support.
15334 (version "1.6.5")
15335 (source
15336 (origin
15337 (method url-fetch)
15338 (uri (pypi-uri "astroid" version))
15339 (sha256
15340 (base32
15341 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15342 (arguments
15343 (substitute-keyword-arguments (package-arguments base)
15344 ((#:phases phases)
15345 `(modify-phases ,phases
15346 (add-after 'unpack 'remove-spurious-test
15347 (lambda _
15348 ;; https://github.com/PyCQA/astroid/issues/276
15349 (delete-file "astroid/tests/unittest_brain.py")
15350 #t))
15351 (replace 'check
15352 (lambda _
15353 (invoke"python" "-m" "unittest" "discover"
15354 "-p" "unittest*.py")))))))
15355 (native-inputs `())
15356 (propagated-inputs
15357 `(("python2-backports-functools-lru-cache"
15358 ,python2-backports-functools-lru-cache)
15359 ("python2-enum34" ,python2-enum34)
15360 ("python2-singledispatch" ,python2-singledispatch)
15361 ,@(alist-delete "python-typed-ast"
15362 (package-propagated-inputs base)))))))
15363
15364 (define-public python-isbnlib
15365 (package
15366 (name "python-isbnlib")
15367 (version "3.10.3")
15368 (source
15369 (origin
15370 (method url-fetch)
15371 (uri (pypi-uri "isbnlib" version))
15372 (sha256
15373 (base32
15374 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15375 (build-system python-build-system)
15376 (arguments '(#:tests? #f)) ; No test
15377 (home-page "https://github.com/xlcnd/isbnlib")
15378 (synopsis "Python library to work with ISBN strings")
15379 (description "@code{python-isbnlib} is a (pure) python library that provides
15380 several useful methods and functions to validate, clean, transform, hyphenate and
15381 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15382 version, is suitable to be include as a dependency in other projects.")
15383 (license license:lgpl3+)))
15384
15385 (define-public python-isort
15386 (package
15387 (name "python-isort")
15388 (version "4.3.4")
15389 (source
15390 (origin
15391 (method git-fetch)
15392 (uri (git-reference
15393 ;; Tests pass only from the Github sources
15394 (url "https://github.com/timothycrosley/isort")
15395 (commit version)))
15396 (file-name (git-file-name name version))
15397 (sha256
15398 (base32
15399 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15400 (build-system python-build-system)
15401 (native-inputs
15402 `(("python-mock" ,python-mock)
15403 ("python-pytest" ,python-pytest)))
15404 (home-page "https://github.com/timothycrosley/isort")
15405 (synopsis "Python utility/library to sort python imports")
15406 (description "@code{python-isort} is a python utility/library to sort
15407 imports alphabetically, and automatically separated into sections. It
15408 provides a command line utility, a python library and plugins for various
15409 editors.")
15410 (license license:expat)
15411 (properties `((python2-variant . ,(delay python2-isort))))))
15412
15413 (define-public python2-isort
15414 (let ((base (package-with-python2
15415 (strip-python2-variant python-isort))))
15416 (package (inherit base)
15417 (native-inputs
15418 `(("python2-futures" ,python2-futures)
15419 ,@(package-native-inputs base))))))
15420
15421 (define-public python2-backports-functools-lru-cache
15422 (package
15423 (name "python2-backports-functools-lru-cache")
15424 (version "1.6.1")
15425 (source
15426 (origin
15427 (method url-fetch)
15428 ;; only the pypi tarballs contain the necessary metadata
15429 (uri (pypi-uri "backports.functools_lru_cache" version))
15430 (sha256
15431 (base32
15432 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15433 (build-system python-build-system)
15434 (native-inputs
15435 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15436 (arguments
15437 `(#:python ,python-2))
15438 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15439 (synopsis "Backport of functools.lru_cache from Python 3.3")
15440 (description "@code{python2-backports-functools-lru-cache} is a backport
15441 of @code{functools.lru_cache} from python 3.3.")
15442 (license license:expat)))
15443
15444 (define-public python-configparser
15445 (package
15446 (name "python-configparser")
15447 (version "4.0.2")
15448 (source
15449 (origin
15450 (method url-fetch)
15451 (uri (pypi-uri "configparser" version))
15452 (sha256
15453 (base32
15454 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15455 (native-inputs
15456 `(("python-setuptools_scm" ,python-setuptools-scm)))
15457 (build-system python-build-system)
15458 (home-page "https://github.com/jaraco/configparser/")
15459 (synopsis "Backport of configparser from python 3.5")
15460 (description "@code{python-configparser} is a backport of
15461 @code{configparser} from Python 3.5 so that it can be used directly
15462 in other versions.")
15463 (license license:expat)))
15464
15465 (define-public python2-configparser
15466 (package-with-python2 python-configparser))
15467
15468 (define-public python-mamba
15469 (package
15470 (name "python-mamba")
15471 (version "0.11.1")
15472 (source (origin
15473 (method url-fetch)
15474 (uri (pypi-uri "mamba" version))
15475 (sha256
15476 (base32
15477 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15478 (build-system python-build-system)
15479 (arguments `(#:tests? #f)) ; No test
15480 (propagated-inputs
15481 `(("python-clint" ,python-clint)
15482 ("python-coverage" ,python-coverage)))
15483 (home-page "https://nestorsalceda.com/mamba/")
15484 (synopsis "Test runner for Python")
15485 (description
15486 "Mamba is a Behaviour-Driven Development tool for Python developers.
15487 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15488 (license license:expat)))
15489
15490 (define-public python-mando
15491 (package
15492 (name "python-mando")
15493 (version "0.6.4")
15494 (source (origin
15495 (method url-fetch)
15496 (uri (pypi-uri "mando" version))
15497 (sha256
15498 (base32
15499 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15500 (build-system python-build-system)
15501 (propagated-inputs
15502 `(("python-rst2ansi" ,python-rst2ansi)
15503 ("python-six" ,python-six)))
15504 (native-inputs
15505 `(("python-pytest" ,python-pytest)))
15506 (home-page "https://mando.readthedocs.org/")
15507 (synopsis
15508 "Wrapper around argparse, allowing creation of complete CLI applications")
15509 (description
15510 "This package is a wrapper around argparse, allowing you to write complete CLI
15511 applications in seconds while maintaining all the flexibility.")
15512 (license license:expat)))
15513
15514 (define-public python2-mando
15515 (package-with-python2 python-mando))
15516
15517 (define-public python2-argparse
15518 (package
15519 (name "python2-argparse")
15520 (version "1.4.0")
15521 (source
15522 (origin
15523 (method url-fetch)
15524 (uri (pypi-uri "argparse" version))
15525 (sha256
15526 (base32
15527 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15528 (build-system python-build-system)
15529 (arguments
15530 `(#:python ,python-2))
15531 (home-page "https://github.com/ThomasWaldmann/argparse/")
15532 (synopsis "Python command-line parsing library")
15533 (description
15534 "This package is mostly for people who want to have @code{argparse} on
15535 older Pythons because it was not part of the standard library back then.")
15536 (license license:psfl)))
15537
15538 (define-public python-fudge
15539 (package
15540 (name "python-fudge")
15541 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15542 ;; package, which is currently the only use of this package.
15543 (version "0.9.6")
15544 (source
15545 (origin
15546 (method url-fetch)
15547 (uri (pypi-uri "fudge" version))
15548 (sha256
15549 (base32
15550 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15551 (build-system python-build-system)
15552 (arguments
15553 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15554 (home-page "https://github.com/fudge-py/fudge")
15555 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15556 (description
15557 "Fudge is a Python module for using fake objects (mocks and stubs) to
15558 test real ones.
15559
15560 In readable Python code, you declare the methods available on your fake object
15561 and how they should be called. Then you inject that into your application and
15562 start testing. This declarative approach means you don’t have to record and
15563 playback actions and you don’t have to inspect your fakes after running code.
15564 If the fake object was used incorrectly then you’ll see an informative
15565 exception message with a traceback that points to the culprit.")
15566 (license license:expat)))
15567
15568 (define-public python2-fudge
15569 (package-with-python2 python-fudge))
15570
15571 (define-public python-mwclient
15572 (package
15573 (name "python-mwclient")
15574 (version "0.10.1")
15575 (source
15576 (origin
15577 (method git-fetch)
15578 ;; The PyPI version wouldn't contain tests.
15579 (uri (git-reference
15580 (url "https://github.com/mwclient/mwclient")
15581 (commit (string-append "v" version))))
15582 (file-name (git-file-name name version))
15583 (sha256
15584 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15585 (build-system python-build-system)
15586 (propagated-inputs
15587 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15588 ("python-six" ,python-six)))
15589 (native-inputs
15590 `(("python-mock" ,python-mock)
15591 ("python-pytest" ,python-pytest)
15592 ("python-pytest-cov" ,python-pytest-cov)
15593 ("python-pytest-runner" ,python-pytest-runner)
15594 ("python-responses" ,python-responses)))
15595 (home-page "https://github.com/btongminh/mwclient")
15596 (synopsis "MediaWiki API client")
15597 (description "This package provides a MediaWiki API client.")
15598 (license license:expat)))
15599
15600 (define-public python2-mwclient
15601 (package-with-python2 python-mwclient))
15602
15603 (define-public python-utils
15604 (package
15605 (name "python-utils")
15606 (version "2.4.0")
15607 (source (origin
15608 (method url-fetch)
15609 (uri (pypi-uri "python-utils" version))
15610 (sha256
15611 (base32
15612 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15613 (build-system python-build-system)
15614 (arguments
15615 `(#:phases
15616 (modify-phases %standard-phases
15617 (replace 'check
15618 (lambda* (#:key inputs outputs #:allow-other-keys)
15619 (add-installed-pythonpath inputs outputs)
15620 (delete-file "pytest.ini")
15621 (invoke "pytest" "-vv"))))))
15622 (native-inputs
15623 `(("pytest-runner" ,python-pytest-runner)
15624 ("pytest" ,python-pytest)
15625 ("six" ,python-six)))
15626 (home-page "https://github.com/WoLpH/python-utils")
15627 (synopsis "Convenient utilities not included with the standard Python install")
15628 (description
15629 "Python Utils is a collection of small Python functions and classes which
15630 make common patterns shorter and easier.")
15631 (license license:bsd-2)))
15632
15633 (define-public python2-utils
15634 (package-with-python2 python-utils))
15635
15636 (define-public python-diff-match-patch
15637 (package
15638 (name "python-diff-match-patch")
15639 (version "20121119")
15640 (source
15641 (origin
15642 (method url-fetch)
15643 (uri (pypi-uri "diff-match-patch" version))
15644 (sha256
15645 (base32
15646 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15647 (build-system python-build-system)
15648 (home-page "https://code.google.com/p/google-diff-match-patch")
15649 (synopsis "Synchronize plain text")
15650 (description "Diff Match and Patch libraries offer robust algorithms to
15651 perform the operations required for synchronizing plain text.")
15652 (license license:asl2.0)))
15653
15654 (define-public python2-diff-match-patch
15655 (package-with-python2 python-diff-match-patch))
15656
15657 (define-public python-dirsync
15658 (package
15659 (name "python-dirsync")
15660 (version "2.2.5")
15661 (source
15662 (origin
15663 (method url-fetch)
15664 (uri (pypi-uri "dirsync" version))
15665 (sha256
15666 (base32
15667 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15668 (build-system python-build-system)
15669 (propagated-inputs
15670 `(("six" ,python-six)))
15671 (home-page "https://github.com/tkhyn/dirsync")
15672 (synopsis "Advanced directory tree synchronisation tool")
15673 (description "Advanced directory tree synchronisation tool.")
15674 (license license:expat)))
15675
15676 (define-public python2-dirsync
15677 (package-with-python2 python-dirsync))
15678
15679 (define-public python-levenshtein
15680 (package
15681 (name "python-levenshtein")
15682 (version "0.12.0")
15683 (source
15684 (origin
15685 (method url-fetch)
15686 (uri (pypi-uri "python-Levenshtein" version))
15687 (sha256
15688 (base32
15689 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15690 (build-system python-build-system)
15691 (home-page "https://github.com/ztane/python-Levenshtein")
15692 (synopsis "Fast computation of Levenshtein distance and string similarity")
15693 (description
15694 "The Levenshtein Python C extension module contains functions for fast computation of
15695 @enumerate
15696 @item Levenshtein (edit) distance, and edit operations
15697 @item string similarity
15698 @item approximate median strings, and generally string averaging
15699 @item string sequence and set similarity
15700 @end enumerate
15701 It supports both normal and Unicode strings.")
15702 (license license:gpl2+)))
15703
15704 (define-public python2-levenshtein
15705 (package-with-python2 python-levenshtein))
15706
15707 (define-public python-scandir
15708 (package
15709 (name "python-scandir")
15710 (version "1.10.0")
15711 (source
15712 (origin
15713 (method url-fetch)
15714 (uri (pypi-uri "scandir" version))
15715 (sha256
15716 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15717 (build-system python-build-system)
15718 (arguments
15719 `(#:phases (modify-phases %standard-phases
15720 (replace 'check
15721 (lambda _
15722 (invoke "python" "test/run_tests.py"))))))
15723 (home-page "https://github.com/benhoyt/scandir")
15724 (synopsis "Directory iteration function")
15725 (description
15726 "Directory iteration function like os.listdir(), except that instead of
15727 returning a list of bare filenames, it yields DirEntry objects that include
15728 file type and stat information along with the name. Using scandir() increases
15729 the speed of os.walk() by 2-20 times (depending on the platform and file
15730 system) by avoiding unnecessary calls to os.stat() in most cases.
15731
15732 This package is part of the Python standard library since version 3.5.")
15733 (license license:bsd-3)))
15734
15735 (define-public python2-scandir
15736 (package-with-python2 python-scandir))
15737
15738 (define-public python2-stemming
15739 (package
15740 (name "python2-stemming")
15741 (version "1.0.1")
15742 (source
15743 (origin
15744 (method url-fetch)
15745 (uri (pypi-uri "stemming" version))
15746 (sha256
15747 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15748 (build-system python-build-system)
15749 (arguments
15750 `(#:python ,python-2))
15751 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15752 (synopsis "Python implementations of various stemming algorithms")
15753 (description
15754 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15755 stemming algorithms for English. These implementations are straightforward and
15756 efficient, unlike some Python versions of the same algorithms available on the
15757 Web. This package is an extraction of the stemming code included in the Whoosh
15758 search engine.")
15759 (license license:public-domain)))
15760
15761 (define-public python-factory-boy
15762 (package
15763 (name "python-factory-boy")
15764 (version "2.8.1")
15765 (source
15766 (origin
15767 (method url-fetch)
15768 (uri (pypi-uri "factory_boy" version))
15769 (sha256
15770 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15771 (build-system python-build-system)
15772 (arguments
15773 ;; Tests are not included in the tarball.
15774 `(#:tests? #f))
15775 (propagated-inputs
15776 `(("faker" ,python-faker)))
15777 (home-page "https://github.com/benhoyt/scandir")
15778 (synopsis "Versatile test fixtures replacement")
15779 (description
15780 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15781
15782 As a fixtures replacement tool, it aims to replace static, hard to maintain
15783 fixtures with easy-to-use factories for complex object.
15784
15785 Instead of building an exhaustive test setup with every possible combination
15786 of corner cases, factory_boy allows you to use objects customized for the
15787 current test, while only declaring the test-specific fields")
15788 (license license:expat)))
15789
15790 (define-public python2-factory-boy
15791 (package-with-python2 python-factory-boy))
15792
15793 (define-public python-translate-toolkit
15794 (package
15795 (name "python-translate-toolkit")
15796 (version "2.1.0")
15797 (source
15798 (origin
15799 (method url-fetch)
15800 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15801 (sha256
15802 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15803 (build-system python-build-system)
15804 (native-inputs
15805 `(("python-pytest" ,python-pytest)
15806 ("python-sphinx" ,python-sphinx)))
15807 (propagated-inputs
15808 `(("python-babel" ,python-babel)
15809 ("python-beautifulsoup4" ,python-beautifulsoup4)
15810 ("python-chardet" ,python-chardet)
15811 ("python-diff-match-patch" ,python-diff-match-patch)
15812 ("python-levenshtein" ,python-levenshtein)
15813 ("python-lxml" ,python-lxml)
15814 ("python-six" ,python-six)
15815 ("python-vobject" ,python-vobject)
15816 ("python-pyyaml" ,python-pyyaml)))
15817 (arguments
15818 ;; TODO: tests are not run, because they end with
15819 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15820 ;; 'parse_funcs'
15821 ;; during test setup.
15822 `(#:tests? #f))
15823 (home-page "https://toolkit.translatehouse.org")
15824 (synopsis "Tools and API for translation and localization engineering")
15825 (description
15826 "Tools and API for translation and localization engineering. It contains
15827 several utilities, as well as an API for building localization tools.")
15828 (license license:gpl2+)))
15829
15830 (define-public python2-translate-toolkit
15831 (package-with-python2 python-translate-toolkit))
15832
15833 (define-public python-packaging
15834 (package
15835 (name "python-packaging")
15836 (version "20.0")
15837 (source
15838 (origin
15839 (method url-fetch)
15840 (uri (pypi-uri "packaging" version))
15841 ;; XXX: The URL in the patch file is wrong, it should be
15842 ;; <https://github.com/pypa/packaging/pull/256>.
15843 (patches (search-patches "python-packaging-test-arch.patch"))
15844 (sha256
15845 (base32
15846 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15847 (build-system python-build-system)
15848 (arguments
15849 `(#:phases (modify-phases %standard-phases
15850 (replace 'check
15851 (lambda* (#:key tests? #:allow-other-keys)
15852 (if tests?
15853 (invoke "py.test" "-vv")
15854 (format #t "test suite not run~%"))
15855 #t)))))
15856 (native-inputs
15857 `(("python-pretend" ,python-pretend)
15858 ("python-pytest" ,python-pytest)))
15859 (propagated-inputs
15860 `(("python-pyparsing" ,python-pyparsing)
15861 ("python-six" ,python-six)))
15862 (home-page "https://github.com/pypa/packaging")
15863 (synopsis "Core utilities for Python packages")
15864 (description "Packaging is a Python module for dealing with Python packages.
15865 It offers an interface for working with package versions, names, and dependency
15866 information.")
15867 ;; From 'LICENSE': This software is made available under the terms of
15868 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15869 ;; Contributions to this software is made under the terms of *both* these
15870 ;; licenses.
15871 (license (list license:asl2.0 license:bsd-2))))
15872
15873 (define-public python2-packaging
15874 (package-with-python2 python-packaging))
15875
15876 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15877 (define-public python-packaging-bootstrap
15878 (hidden-package
15879 (package/inherit
15880 python-packaging
15881 (name "python-packaging-bootstrap")
15882 (native-inputs '())
15883 (propagated-inputs
15884 `(("python-pyparsing" ,python-pyparsing)))
15885 (arguments '(#:tests? #f)))))
15886
15887 (define-public python2-packaging-bootstrap
15888 (hidden-package
15889 (package/inherit
15890 python2-packaging
15891 (name "python2-packaging-bootstrap")
15892 (native-inputs '())
15893 (propagated-inputs
15894 `(("python-pyparsing" ,python2-pyparsing)))
15895 (arguments
15896 `(#:tests? #f
15897 ,@(package-arguments python2-packaging))))))
15898
15899 (define-public python-relatorio
15900 (package
15901 (name "python-relatorio")
15902 (version "0.8.0")
15903 (source
15904 (origin
15905 (method url-fetch)
15906 (uri (pypi-uri "relatorio" version))
15907 (sha256
15908 (base32
15909 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15910 (build-system python-build-system)
15911 (propagated-inputs
15912 `(("python-lxml" ,python-lxml)
15913 ("python-genshi" ,python-genshi)))
15914 (native-inputs
15915 `(("python-magic" ,python-magic)))
15916 (home-page "https://relatorio.tryton.org/")
15917 (synopsis "Templating library able to output ODT and PDF files")
15918 (description "Relatorio is a templating library which provides a way to
15919 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15920 for more filetypes can be easily added by creating plugins for them.")
15921 (license license:gpl3+)))
15922
15923 (define-public python2-relatorio
15924 (package-with-python2 python-relatorio))
15925
15926 (define-public python-radon
15927 (package
15928 (name "python-radon")
15929 (version "4.1.0")
15930 (source
15931 (origin
15932 (method url-fetch)
15933 (uri (pypi-uri "radon" version))
15934 (sha256
15935 (base32
15936 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15937 (build-system python-build-system)
15938 (arguments
15939 `(#:phases (modify-phases %standard-phases
15940 (replace 'check
15941 (lambda _
15942 (invoke "python" "radon/tests/run.py"))))))
15943 (propagated-inputs
15944 `(("python-colorama" ,python-colorama)
15945 ("python-flake8-polyfill" ,python-flake8-polyfill)
15946 ("python-mando" ,python-mando)))
15947 (native-inputs
15948 `(("python-pytest" ,python-pytest)
15949 ("python-pytest-mock" ,python-pytest-mock)))
15950 (home-page "https://radon.readthedocs.org/")
15951 (synopsis "Code Metrics in Python")
15952 (description "Radon is a Python tool which computes various code metrics.
15953 Supported metrics are:
15954 @itemize @bullet
15955 @item raw metrics: SLOC, comment lines, blank lines, &c.
15956 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15957 @item Halstead metrics (all of them)
15958 @item the Maintainability Index (a Visual Studio metric)
15959 @end itemize")
15960 (properties `((python2-variant . ,(delay python2-radon))))
15961 (license license:expat)))
15962
15963 (define-public python2-radon
15964 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15965 (package
15966 (inherit base)
15967 (propagated-inputs
15968 `(("python-configparser" ,python2-configparser)
15969 ("python-future" ,python2-future)
15970 ,@(package-propagated-inputs base))))))
15971
15972 (define-public python-sure
15973 (package
15974 (name "python-sure")
15975 (version "1.4.11")
15976 (source
15977 (origin
15978 (method url-fetch)
15979 (uri (pypi-uri "sure" version))
15980 (sha256
15981 (base32
15982 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15983 (build-system python-build-system)
15984 (propagated-inputs
15985 `(("python-mock" ,python-mock)
15986 ("python-six" ,python-six)))
15987 (native-inputs
15988 `(("python-nose" ,python-nose)))
15989 (home-page "https://github.com/gabrielfalcao/sure")
15990 (synopsis "Automated testing library in python for python")
15991 (description
15992 "Sure is a python library that leverages a DSL for writing assertions.
15993 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15994 (license license:gpl3+)))
15995
15996 (define-public python2-sure
15997 (package-with-python2 python-sure))
15998
15999 (define-public python2-couleur
16000 ;; This package does not seem to support python3 at all, hence,
16001 ;; only the python2 variant definition is provided.
16002 (package
16003 (name "python2-couleur")
16004 (version "0.6.2")
16005 (source
16006 (origin
16007 (method url-fetch)
16008 (uri (pypi-uri "couleur" version))
16009 (sha256
16010 (base32
16011 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16012 (build-system python-build-system)
16013 (arguments
16014 `(#:python ,python-2))
16015 (home-page "https://github.com/gabrielfalcao/couleur")
16016 (synopsis
16017 "ANSI terminal tool for python, colored shell and other handy fancy features")
16018 (description
16019 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16020 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16021 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16022 ;; https://github.com/gabrielfalcao/couleur/issues/11
16023 (license license:lgpl3+)))
16024
16025 (define-public python-misaka
16026 (package
16027 (name "python-misaka")
16028 (version "2.1.1")
16029 (source
16030 (origin
16031 (method url-fetch)
16032 (uri (pypi-uri "misaka" version))
16033 (sha256
16034 (base32
16035 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16036 (build-system python-build-system)
16037 (arguments
16038 `(;; Line 37 of setup.py calls self.run_command('develop')
16039 ;; in the 'check' phase. This command seems to be trying
16040 ;; to write to
16041 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16042 ;; for which it does not have the permission to write.
16043 #:tests? #f))
16044 (propagated-inputs
16045 `(("python-cffi" ,python-cffi)))
16046 (home-page "https://github.com/FSX/misaka")
16047 (synopsis "Python binding for Hoedown")
16048 (description
16049 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16050 library written in C. It features a fast HTML renderer and functionality to make custom
16051 renderers (e.g. man pages or LaTeX).")
16052 (license license:expat)))
16053
16054 (define-public python2-misaka
16055 (package-with-python2 python-misaka))
16056
16057 (define-public python2-steadymark
16058 ;; This is forced into being a python2 only variant
16059 ;; due to its dependence on couleur that has no support
16060 ;; for python3
16061 (package
16062 (name "python2-steadymark")
16063 (version "0.7.3")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "steadymark" version))
16068 (sha256
16069 (base32
16070 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16071 (build-system python-build-system)
16072 (native-inputs
16073 `(("python-couleur" ,python2-couleur)
16074 ("python-sure" ,python2-sure)
16075 ("python-misaka" ,python2-misaka)))
16076 (arguments
16077 `(#:python ,python-2
16078 #:phases
16079 (modify-phases %standard-phases
16080 (add-before 'build 'patch-setup-py
16081 (lambda _
16082 ;; Update requirements from dependency==version
16083 ;; to dependency>=version
16084 (substitute* "setup.py"
16085 (("==") ">="))
16086 #t)))))
16087 (home-page "https://github.com/gabrielfalcao/steadymark")
16088 (synopsis "Markdown-based test runner for python")
16089 (description
16090 "@code{Steadymark} allows documentation to be written in github-flavoured
16091 markdown. The documentation may contain snippets of code surrounded by python
16092 code blocks and @code{Steadymark} will find these snippets and run them, making
16093 sure that there are no old malfunctional examples in the documentation examples.")
16094 (license license:expat)))
16095
16096 (define-public python-jsonpointer
16097 (package
16098 (name "python-jsonpointer")
16099 (version "1.10")
16100 (source
16101 (origin
16102 (method url-fetch)
16103 (uri (pypi-uri "jsonpointer" version))
16104 (sha256
16105 (base32
16106 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16107 (build-system python-build-system)
16108 (home-page "https://github.com/stefankoegl/python-json-pointer")
16109 (synopsis "Identify specific nodes in a JSON document")
16110 (description "@code{jsonpointer} allows you to access specific nodes
16111 by path in a JSON document (see RFC 6901).")
16112 (license license:bsd-3)))
16113
16114 (define-public python2-jsonpointer
16115 (package-with-python2 python-jsonpointer))
16116
16117 (define-public python-jsonpatch
16118 (package
16119 (name "python-jsonpatch")
16120 (version "1.16")
16121 (source
16122 (origin
16123 (method git-fetch)
16124 ;; pypi version lacks tests.js
16125 (uri (git-reference
16126 (url "https://github.com/stefankoegl/python-json-patch")
16127 (commit (string-append "v" version))))
16128 (file-name (git-file-name name version))
16129 (sha256
16130 (base32
16131 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16132 (build-system python-build-system)
16133 (propagated-inputs
16134 `(("python-jsonpointer" ,python-jsonpointer)))
16135 (home-page "https://github.com/stefankoegl/python-json-patch")
16136 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16137 (description "@code{jsonpatch} is a library and program that allows
16138 applying JSON Patches according to RFC 6902.")
16139 (license license:bsd-3)))
16140
16141 (define-public python2-jsonpatch
16142 (package-with-python2 python-jsonpatch))
16143
16144 (define-public python-jsonpatch-0.4
16145 (package (inherit python-jsonpatch)
16146 (name "python-jsonpatch")
16147 (version "0.4")
16148 (source
16149 (origin
16150 (method git-fetch)
16151 (uri (git-reference
16152 (url "https://github.com/stefankoegl/python-json-patch")
16153 (commit (string-append "v" version))))
16154 (file-name (git-file-name name version))
16155 (sha256
16156 (base32
16157 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16158
16159 (define-public python2-jsonpatch-0.4
16160 (package-with-python2 python-jsonpatch-0.4))
16161
16162 (define-public python-rfc3986
16163 (package
16164 (name "python-rfc3986")
16165 (version "1.4.0")
16166 (source (origin
16167 (method url-fetch)
16168 (uri (pypi-uri "rfc3986" version))
16169 (sha256
16170 (base32
16171 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16172 (build-system python-build-system)
16173 (arguments
16174 `(#:modules ((guix build utils)
16175 (guix build python-build-system)
16176 (ice-9 ftw)
16177 (srfi srfi-1)
16178 (srfi srfi-26))
16179 #:phases
16180 (modify-phases %standard-phases
16181 (replace 'check
16182 (lambda _
16183 (let ((cwd (getcwd)))
16184 (setenv "PYTHONPATH"
16185 (string-append cwd "/build/"
16186 (find (cut string-prefix? "lib" <>)
16187 (scandir (string-append cwd "/build")))
16188 ":"
16189 (getenv "PYTHONPATH")))
16190 (invoke "pytest" "-v")))))))
16191 (native-inputs
16192 `(("python-pytest" ,python-pytest)))
16193 (home-page "https://rfc3986.readthedocs.io/")
16194 (synopsis "Parse and validate URI references")
16195 (description
16196 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16197 validation and authority parsing. This module also supports RFC@tie{}6874
16198 which adds support for zone identifiers to IPv6 addresses.")
16199 (license license:asl2.0)))
16200
16201 (define-public python2-rfc3986
16202 (package-with-python2 python-rfc3986))
16203
16204 (define-public python-rfc3987
16205 (package
16206 (name "python-rfc3987")
16207 (version "1.3.7")
16208 (source
16209 (origin
16210 (method url-fetch)
16211 (uri (pypi-uri "rfc3987" version))
16212 (sha256
16213 (base32
16214 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16215 (build-system python-build-system)
16216 (home-page "https://pypi.org/project/rfc3987/")
16217 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16218 (description "@code{rfc3987} provides routines for parsing and
16219 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16220 (license license:gpl3+)))
16221
16222 (define-public python2-rfc3987
16223 (package-with-python2 python-rfc3987))
16224
16225 ;; The latest commit contains fixes for building with both python3 and python2.
16226 (define-public python-rfc6555
16227 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16228 (revision "1"))
16229 (package
16230 (name "python-rfc6555")
16231 (version (git-version "0.0.0" revision commit))
16232 (source (origin
16233 (method git-fetch)
16234 (uri (git-reference
16235 (url "https://github.com/sethmlarson/rfc6555")
16236 (commit commit)))
16237 (file-name (git-file-name name version))
16238 (sha256
16239 (base32
16240 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16241 (build-system python-build-system)
16242 (arguments
16243 '(#:phases
16244 (modify-phases %standard-phases
16245 (replace 'check
16246 (lambda* (#:key tests? #:allow-other-keys)
16247 (if tests?
16248 ;; Other tests require network access.
16249 (invoke "pytest" "tests/test_ipv6.py")
16250 #t))))))
16251 (native-inputs
16252 `(("python-pytest" ,python-pytest)))
16253 (home-page "https://pypi.org/project/rfc6555/")
16254 (synopsis "Python implementation of RFC 6555")
16255 (description
16256 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16257 6555. Provided with a single file and dead-simple API to allow easy vendoring
16258 and integration into other projects.")
16259 (properties `((python2-variant . ,(delay python2-rfc6555))))
16260 (license license:asl2.0))))
16261
16262 (define-public python2-rfc6555
16263 (let ((base (package-with-python2
16264 (strip-python2-variant python-rfc6555))))
16265 (package
16266 (inherit base)
16267 (propagated-inputs
16268 `(("python2-selectors2" ,python2-selectors2))))))
16269
16270 (define-public python-bagit
16271 (package
16272 (name "python-bagit")
16273 (version "1.7.0")
16274 (source
16275 (origin
16276 (method url-fetch)
16277 (uri (pypi-uri "bagit" version))
16278 (sha256
16279 (base32
16280 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16281 (build-system python-build-system)
16282 (native-inputs
16283 `(("python-setuptools-scm" ,python-setuptools-scm)
16284 ("python-coverage" ,python-coverage)
16285 ("python-mock" ,python-mock)))
16286 (home-page "https://libraryofcongress.github.io/bagit-python/")
16287 (synopsis "Create and validate BagIt packages")
16288 (description "Bagit is a Python library and command line utility for working
16289 with BagIt style packages. BagIt is a minimalist packaging format for digital
16290 preservation.")
16291 (license license:cc0)))
16292
16293 (define-public python-prov
16294 (package
16295 (name "python-prov")
16296 (version "2.0.0")
16297 (source
16298 (origin
16299 (method url-fetch)
16300 (uri (pypi-uri "prov" version))
16301 (sha256
16302 (base32
16303 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16304 (build-system python-build-system)
16305 (propagated-inputs
16306 `(("python-dateutil" ,python-dateutil)
16307 ("python-lxml" ,python-lxml)
16308 ("python-networkx" ,python-networkx)
16309 ("python-rdflib" ,python-rdflib)))
16310 (native-inputs
16311 `(("graphviz" ,graphviz)
16312 ("python-pydot" ,python-pydot)))
16313 (home-page "https://github.com/trungdong/prov")
16314 (synopsis
16315 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16316 (description
16317 "This package provides a library for W3C Provenance Data Model supporting
16318 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16319 (license license:expat)))
16320
16321 (define-public python-arcp
16322 (package
16323 (name "python-arcp")
16324 (version "0.2.1")
16325 (source
16326 (origin
16327 (method url-fetch)
16328 (uri (pypi-uri "arcp" version))
16329 (sha256
16330 (base32
16331 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16332 (build-system python-build-system)
16333 (native-inputs
16334 `(("python-pytest" ,python-pytest)))
16335 (home-page "http://arcp.readthedocs.io/")
16336 (synopsis
16337 "Archive and Package URI parser and generator")
16338 (description
16339 "@acronym{arcp, Archive and Package} provides functions for creating
16340 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16341 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16342 consume or reference hypermedia resources bundled inside a file archive or an
16343 application package, as well as to resolve URIs for archive resources within a
16344 programmatic framework. This URI scheme provides mechanisms to generate a
16345 unique base URI to represent the root of the archive, so that relative URI
16346 references in a bundled resource can be resolved within the archive without
16347 having to extract the archive content on the local file system. An arcp URI can
16348 be used for purposes of isolation (e.g. when consuming multiple archives),
16349 security constraints (avoiding \"climb out\" from the archive), or for
16350 externally identiyfing sub-resources referenced by hypermedia formats.")
16351 (license license:asl2.0)))
16352
16353 (define-public python-shellescape
16354 (package
16355 (name "python-shellescape")
16356 (version "3.8.1")
16357 (source
16358 (origin
16359 (method git-fetch)
16360 (uri (git-reference
16361 (url "https://github.com/chrissimpkins/shellescape")
16362 (commit (string-append "v" version))))
16363 (file-name (git-file-name name version))
16364 (sha256
16365 (base32
16366 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16367 (build-system python-build-system)
16368 (arguments
16369 '(#:phases
16370 (modify-phases %standard-phases
16371 (replace 'check
16372 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16373 (when tests?
16374 (add-installed-pythonpath inputs outputs)
16375 (invoke "python" "tests/test_shellescape.py"))
16376 #t)))))
16377 (native-inputs
16378 `(("python-pytest" ,python-pytest)))
16379 (home-page "https://github.com/chrissimpkins/shellescape")
16380 (synopsis
16381 "Shell escape a string to safely use it as a token in a shell command")
16382 (description
16383 "The shellescape Python module defines the @code{shellescape.quote()}
16384 function that returns a shell-escaped version of a Python string. This is a
16385 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16386 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16387 (license license:expat)))
16388
16389 (define-public python-validators
16390 (package
16391 (name "python-validators")
16392 (version "0.14.2")
16393 (source (origin
16394 (method url-fetch)
16395 (uri (pypi-uri "validators" version))
16396 (sha256
16397 (base32
16398 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16399 (build-system python-build-system)
16400 (arguments
16401 '(#:phases (modify-phases %standard-phases
16402 (replace 'check
16403 (lambda _
16404 (invoke "pytest" "-vv"))))))
16405 (propagated-inputs
16406 `(("python-decorator" ,python-decorator)
16407 ("python-six" ,python-six)))
16408 (native-inputs
16409 `(("python-flake8" ,python-flake8)
16410 ("python-isort" ,python-isort)
16411 ("python-pytest" ,python-pytest)))
16412 (home-page "https://github.com/kvesteri/validators")
16413 (synopsis "Data validation library")
16414 (description
16415 "This package contains validators for different things such as email
16416 addresses, IP addresses, URLs, hashes and more. It has been designed to
16417 be easy to use and not require defining a schema or form just to validate
16418 some input.")
16419 (license license:expat)))
16420
16421 (define-public python2-validators
16422 (package-with-python2 python-validators))
16423
16424 (define-public python-validate-email
16425 (package
16426 (name "python-validate-email")
16427 (version "1.3")
16428 (source
16429 (origin
16430 (method url-fetch)
16431 (uri (pypi-uri "validate_email" version))
16432 (sha256
16433 (base32
16434 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16435 (build-system python-build-system)
16436 (home-page "https://github.com/syrusakbary/validate_email")
16437 (synopsis "Verifies if an email address is valid and really exists")
16438 (description "@code{validate_email} can be used to verify if an email
16439 address is valid and really exists.")
16440 (license license:lgpl3+)))
16441
16442 (define-public python2-validate-email
16443 (package-with-python2 python-validate-email))
16444
16445 (define-public python-flex
16446 (package
16447 (name "python-flex")
16448 (version "6.10.0")
16449 (source
16450 (origin
16451 (method url-fetch)
16452 (uri (pypi-uri "flex" version))
16453 (sha256
16454 (base32
16455 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16456 (build-system python-build-system)
16457 (propagated-inputs
16458 `(("python-click" ,python-click)
16459 ("python-iso8601" ,python-iso8601)
16460 ("python-jsonpointer" ,python-jsonpointer)
16461 ("python-pyyaml" ,python-pyyaml)
16462 ("python-requests" ,python-requests)
16463 ("python-rfc3987" ,python-rfc3987)
16464 ("python-six" ,python-six)
16465 ("python-validate-email" ,python-validate-email)))
16466 (home-page "https://github.com/pipermerriam/flex")
16467 (synopsis "Validates Swagger schemata")
16468 (description "@code{flex} can be used to validate Swagger schemata.")
16469 (license license:bsd-3)))
16470
16471 (define-public python2-flex
16472 (package-with-python2 python-flex))
16473
16474 (define-public python-marshmallow
16475 (package
16476 (name "python-marshmallow")
16477 (version "3.9.1")
16478 (source
16479 (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "marshmallow" version))
16482 (sha256
16483 (base32
16484 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16485 (build-system python-build-system)
16486 (propagated-inputs
16487 `(("python-dateutil" ,python-dateutil)
16488 ("python-simplejson" ,python-simplejson)))
16489 (native-inputs
16490 `(("python-pytest" ,python-pytest)
16491 ("python-pytz" ,python-pytz)))
16492 (home-page "https://github.com/marshmallow-code/marshmallow")
16493 (synopsis "Convert complex datatypes to and from native
16494 Python datatypes.")
16495 (description "@code{marshmallow} provides a library for converting
16496 complex datatypes to and from native Python datatypes.")
16497 (license license:expat)))
16498
16499 (define-public python2-marshmallow
16500 (package-with-python2 python-marshmallow))
16501
16502 (define-public python-apispec
16503 (package
16504 (name "python-apispec")
16505 (version "0.25.3")
16506 (source
16507 (origin
16508 (method url-fetch)
16509 (uri (pypi-uri "apispec" version))
16510 (sha256
16511 (base32
16512 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16513 (build-system python-build-system)
16514 (propagated-inputs
16515 `(("python-pyyaml" ,python-pyyaml)))
16516 (native-inputs
16517 `(("python-pytest" ,python-pytest)
16518 ("python-flask" ,python-flask)
16519 ("python-marshmallow" ,python-marshmallow)
16520 ("python-tornado" ,python-tornado)
16521 ("python-bottle" ,python-bottle)
16522 ("python-mock" ,python-mock)))
16523 (home-page "https://github.com/marshmallow-code/apispec")
16524 (synopsis "Swagger 2.0 API specification generator")
16525 (description "@code{python-apispec} is a pluggable API specification
16526 generator. Currently supports the OpenAPI specification (f.k.a.
16527 Swagger 2.0).")
16528 (license license:expat)))
16529
16530 (define-public python2-apispec
16531 (package-with-python2 python-apispec))
16532
16533 (define-public python-flasgger
16534 (package
16535 (name "python-flasgger")
16536 (version "0.6.3")
16537 (source
16538 (origin
16539 (method git-fetch)
16540 (uri (git-reference
16541 (url "https://github.com/rochacbruno/flasgger")
16542 (commit version)))
16543 (file-name (git-file-name name version))
16544 (sha256
16545 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16546 (build-system python-build-system)
16547 (arguments
16548 `(#:phases
16549 (modify-phases %standard-phases
16550 (replace 'check
16551 (lambda* (#:key inputs outputs #:allow-other-keys)
16552 (substitute* "Makefile"
16553 (("flake8 flasgger --ignore=F403")
16554 "flake8 flasgger --ignore=E731,F403"))
16555 (setenv "PYTHONPATH" (string-append (getcwd)
16556 ":"
16557 (getenv "PYTHONPATH")))
16558 (invoke "py.test"))))))
16559 (propagated-inputs
16560 `(("python-flask" ,python-flask)
16561 ("python-pyyaml" ,python-pyyaml)
16562 ("python-jsonschema" ,python-jsonschema)
16563 ("python-mistune" ,python-mistune)
16564 ("python-six" ,python-six)))
16565 (native-inputs
16566 `(("python-decorator" ,python-decorator)
16567 ("python-flake8" ,python-flake8)
16568 ("python-flask-restful" ,python-flask-restful)
16569 ("python-flex" ,python-flex)
16570 ("python-pytest" ,python-pytest)
16571 ("python-pytest-cov" ,python-pytest-cov)
16572 ("python-marshmallow" ,python-marshmallow)
16573 ("python-apispec" ,python-apispec)))
16574 (home-page "https://github.com/rochacbruno/flasgger/")
16575 (synopsis "Extract Swagger specs from your Flask project")
16576 (description "@code{python-flasgger} allows extracting Swagger specs
16577 from your Flask project. It is a fork of Flask-Swagger.")
16578 (license license:expat)))
16579
16580 (define-public python2-flasgger
16581 (package-with-python2 python-flasgger))
16582
16583 (define-public python-swagger-spec-validator
16584 (package
16585 (name "python-swagger-spec-validator")
16586 (version "2.4.3")
16587 (source
16588 (origin
16589 (method url-fetch)
16590 (uri (pypi-uri "swagger-spec-validator" version))
16591 (sha256
16592 (base32
16593 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16594 (build-system python-build-system)
16595 (propagated-inputs
16596 `(("python-jsonschema" ,python-jsonschema)
16597 ("python-pyyaml" ,python-pyyaml)
16598 ("python-six" ,python-six)))
16599 (home-page
16600 "https://github.com/Yelp/swagger_spec_validator")
16601 (synopsis "Validation of Swagger specifications")
16602 (description "@code{swagger_spec_validator} provides a library for
16603 validating Swagger API specifications.")
16604 (license license:asl2.0)))
16605
16606 (define-public python2-swagger-spec-validator
16607 (package-with-python2 python-swagger-spec-validator))
16608
16609 (define-public python-apache-libcloud
16610 (package
16611 (name "python-apache-libcloud")
16612 (version "3.1.0")
16613 (source
16614 (origin
16615 (method url-fetch)
16616 (uri (pypi-uri "apache-libcloud" version))
16617 (sha256
16618 (base32
16619 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16620 (build-system python-build-system)
16621 (arguments
16622 `(#:phases
16623 (modify-phases %standard-phases
16624 (add-after 'unpack 'patch-ssh
16625 (lambda* (#:key inputs #:allow-other-keys)
16626 (substitute* "libcloud/compute/ssh.py"
16627 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16628 "/bin/ssh" "'")))
16629 #t))
16630 (add-after 'unpack 'patch-tests
16631 (lambda _
16632 (substitute* "libcloud/test/compute/test_ssh_client.py"
16633 (("class ShellOutSSHClientTests")
16634 "@unittest.skip(\"Guix container doesn't have ssh service\")
16635 class ShellOutSSHClientTests"))
16636 #t))
16637 (add-before 'check 'copy-secret
16638 (lambda _
16639 (copy-file "libcloud/test/secrets.py-dist"
16640 "libcloud/test/secrets.py")
16641 #t)))))
16642 (inputs
16643 `(("openssh" ,openssh)))
16644 (propagated-inputs
16645 `(("python-paramiko" ,python-paramiko)
16646 ("python-requests" ,python-requests)))
16647 (native-inputs
16648 `(("python-lockfile" ,python-lockfile)
16649 ("python-mock" ,python-mock)
16650 ("python-pytest" ,python-pytest)
16651 ("python-pytest-runner" ,python-pytest-runner)
16652 ("python-requests-mock" ,python-requests-mock)))
16653 (home-page "https://libcloud.apache.org/")
16654 (synopsis "Unified Cloud API")
16655 (description "@code{libcloud} is a Python library for interacting with
16656 many of the popular cloud service providers using a unified API.")
16657 (license license:asl2.0)))
16658
16659 (define-public python2-apache-libcloud
16660 (package-with-python2 python-apache-libcloud))
16661
16662 (define-public python-smmap
16663 (package
16664 (name "python-smmap")
16665 (version "3.0.1")
16666 (source
16667 (origin
16668 (method url-fetch)
16669 (uri (pypi-uri "smmap" version))
16670 (sha256
16671 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16672 (build-system python-build-system)
16673 (native-inputs
16674 `(("python-nosexcover" ,python-nosexcover)))
16675 (home-page "https://github.com/Byron/smmap")
16676 (synopsis "Python sliding window memory map manager")
16677 (description "@code{smmap} is a pure Python implementation of a sliding
16678 window memory map manager.")
16679 (license license:bsd-3)))
16680
16681 (define-public python-smmap2
16682 (deprecated-package "python-smmap2" python-smmap))
16683
16684 (define-public python2-smmap
16685 (package-with-python2 python-smmap))
16686
16687 (define-public python2-smmap2
16688 (deprecated-package "python2-smmap2" python2-smmap))
16689
16690 (define-public python-regex
16691 (package
16692 (name "python-regex")
16693 (version "2020.6.8")
16694 (source (origin
16695 (method url-fetch)
16696 (uri (pypi-uri "regex" version))
16697 (sha256
16698 (base32
16699 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16700 (build-system python-build-system)
16701 (arguments
16702 '(#:phases
16703 (modify-phases %standard-phases
16704 (replace 'check
16705 (lambda* (#:key inputs outputs #:allow-other-keys)
16706 (add-installed-pythonpath inputs outputs)
16707 (invoke "python" "-c"
16708 "from regex.test_regex import test_main; test_main()"))))))
16709 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16710 (synopsis "Alternative regular expression module")
16711 (description "This regular expression implementation is backwards-
16712 compatible with the standard @code{re} module, but offers additional
16713 functionality like full case-folding for case-insensitive matches in Unicode.")
16714 (license license:psfl)))
16715
16716 (define-public python2-regex
16717 (package-with-python2 python-regex))
16718
16719 (define-public python-pyopengl
16720 (package
16721 (name "python-pyopengl")
16722 (version "3.1.5")
16723 (source
16724 (origin
16725 (method url-fetch)
16726 (uri (pypi-uri "PyOpenGL" version))
16727 (sha256
16728 (base32
16729 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16730 (build-system python-build-system)
16731 (inputs
16732 `(("mesa" ,mesa)
16733 ("freeglut" ,freeglut)
16734 ("glu" ,glu)))
16735 (arguments
16736 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16737 ;attribute 'OSMesa'
16738 #:phases
16739 (modify-phases %standard-phases
16740 (add-before 'build 'fix-paths
16741 (lambda* (#:key inputs outputs #:allow-other-keys)
16742 (substitute* '("OpenGL/platform/ctypesloader.py")
16743 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16744 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16745 (("'GL'")
16746 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16747 (("'GLU'")
16748 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16749 (("'glut',")
16750 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16751 (("'GLESv1_CM'")
16752 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16753 (("'GLESv2'")
16754 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16755 ;; Not providing libgle. It seems to be very old.
16756 #t)))))
16757 (home-page "http://pyopengl.sourceforge.net")
16758 (synopsis "Standard OpenGL bindings for Python")
16759 (description
16760 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16761 related APIs. The binding is created using the standard @code{ctypes}
16762 library.")
16763 (license license:bsd-3)))
16764
16765 (define-public python-pyopengl-accelerate
16766 (package
16767 (inherit python-pyopengl)
16768 (name "python-pyopengl-accelerate")
16769 (version "3.1.5")
16770 (source
16771 (origin
16772 (method url-fetch)
16773 (uri (pypi-uri "PyOpenGL-accelerate" version))
16774 (sha256
16775 (base32
16776 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16777 (inputs
16778 `(("mesa" ,mesa)
16779 ("python-numpy" ,python-numpy))) ; for cython module
16780 ; numpy_formathandler, thus not propagated
16781 (arguments
16782 `(#:tests? #f
16783 #:phases
16784 (modify-phases %standard-phases
16785 (delete 'fix-paths))))
16786 (synopsis "Acceleration code for PyOpenGL")
16787 (description
16788 "This is the Cython-coded accelerator module for PyOpenGL.")))
16789
16790 (define-public python-rencode
16791 (package
16792 (name "python-rencode")
16793 (version "1.0.5")
16794 (source
16795 (origin
16796 (method url-fetch)
16797 (uri (pypi-uri "rencode" version))
16798 (sha256
16799 (base32
16800 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16801 (build-system python-build-system)
16802 (arguments
16803 `(#:phases
16804 (modify-phases %standard-phases
16805 (add-before 'check 'delete-bogus-test
16806 ;; This test requires /home/aresch/Downloads, which is not provided by
16807 ;; the build environment.
16808 (lambda _
16809 (delete-file "rencode/t.py")
16810 #t)))))
16811 (native-inputs `(("pkg-config" ,pkg-config)
16812 ("python-cython" ,python-cython)))
16813 (home-page "https://github.com/aresch/rencode")
16814 (synopsis "Serialization of heterogeneous data structures")
16815 (description
16816 "The @code{rencode} module is a data structure serialization library,
16817 similar to @code{bencode} from the BitTorrent project. For complex,
16818 heterogeneous data structures with many small elements, r-encoding stake up
16819 significantly less space than b-encodings. This version of rencode is a
16820 complete rewrite in Cython to attempt to increase the performance over the
16821 pure Python module.")
16822 (license license:bsd-3)))
16823
16824 (define-public python2-rencode
16825 (package-with-python2 python-rencode))
16826
16827 (define-public python-xenon
16828 (package
16829 (name "python-xenon")
16830 (version "0.7.0")
16831 (source
16832 (origin
16833 (method url-fetch)
16834 (uri (pypi-uri "xenon" version))
16835 (sha256
16836 (base32
16837 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16838 (build-system python-build-system)
16839 (native-inputs
16840 `(("python-pyyaml" ,python-pyyaml)
16841 ("python-radon" ,python-radon)
16842 ("python-requests" ,python-requests)
16843 ("python-flake8" ,python-flake8)
16844 ("python-tox" ,python-tox)))
16845 (arguments
16846 `(#:tests? #f ;test suite not shipped with the PyPI archive
16847 #:phases
16848 (modify-phases %standard-phases
16849 (add-before 'build 'patch-test-requirements
16850 (lambda _
16851 ;; Remove httpretty dependency for tests.
16852 (substitute* "setup.py"
16853 (("httpretty") ""))
16854 #t)))))
16855 (home-page "https://xenon.readthedocs.org/")
16856 (synopsis "Monitor code metrics for Python on your CI server")
16857 (description
16858 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16859 Ideally, @code{xenon} is run every time code is committed. Through command
16860 line options, various thresholds can be set for the complexity of code. It
16861 will fail (i.e. it will exit with a non-zero exit code) when any of these
16862 requirements is not met.")
16863 (license license:expat)))
16864
16865 (define-public python2-xenon
16866 (package-with-python2 python-xenon))
16867
16868 (define-public python-pysocks
16869 (package
16870 (name "python-pysocks")
16871 (version "1.7.1")
16872 (source
16873 (origin
16874 (method url-fetch)
16875 (uri (pypi-uri "PySocks" version))
16876 (sha256
16877 (base32
16878 "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
16879 (build-system python-build-system)
16880 (arguments `(#:tests? #f))
16881 (home-page "https://github.com/Anorov/PySocks")
16882 (synopsis "SOCKS client module")
16883 (description "@code{pysocks} is an updated and semi-actively maintained
16884 version of @code{SocksiPy} with bug fixes and extra features.")
16885 (license license:bsd-3)))
16886
16887 (define-public python2-pysocks
16888 (package-with-python2 python-pysocks))
16889
16890 (define-public python-pydiff
16891 (package
16892 (name "python-pydiff")
16893 (version "0.2")
16894 (source
16895 (origin
16896 (method url-fetch)
16897 (uri (pypi-uri "pydiff" version))
16898 (sha256
16899 (base32
16900 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16901 (build-system python-build-system)
16902 (home-page "https://github.com/myint/pydiff")
16903 (synopsis "Library to diff two Python files at the bytecode level")
16904 (description
16905 "@code{pydiff} makes it easy to look for actual code changes while
16906 ignoring formatting changes.")
16907 (license license:expat)))
16908
16909 (define-public python2-pydiff
16910 (package-with-python2 python-pydiff))
16911
16912 (define-public python-pydub
16913 (package
16914 (name "python-pydub")
16915 (version "0.24.1")
16916 (source
16917 (origin
16918 (method url-fetch)
16919 (uri (pypi-uri "pydub" version))
16920 (sha256
16921 (base32
16922 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16923 (build-system python-build-system)
16924 (arguments
16925 `(#:phases
16926 (modify-phases %standard-phases
16927 (add-after 'unpack 'fix-ffmpeg-path
16928 (lambda* (#:key inputs #:allow-other-keys)
16929 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
16930 (substitute* '("pydub/utils.py")
16931 (("return \"ffmpeg\"")
16932 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
16933 (("return \"ffplay\"")
16934 (string-append "return \"" ffmpeg "/bin/ffplay\""))
16935 (("return \"ffprobe\"")
16936 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
16937 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
16938 #t))))))
16939 (home-page "https://pydub.com")
16940 (inputs
16941 `(("ffmpeg" ,ffmpeg)))
16942 (propagated-inputs
16943 `(("python-scipy" ,python-scipy)))
16944 (synopsis "Manipulate audio with a high level interface in Python")
16945 (description
16946 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
16947 @code{ffmpeg} to open various audio formats.")
16948 (license license:expat))) ; MIT license
16949
16950 (define-public python-tqdm
16951 (package
16952 (name "python-tqdm")
16953 (version "4.43.0")
16954 (source
16955 (origin
16956 (method url-fetch)
16957 (uri (pypi-uri "tqdm" version))
16958 (sha256
16959 (base32
16960 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16961 (build-system python-build-system)
16962 (arguments
16963 '(#:phases (modify-phases %standard-phases
16964 (replace 'check
16965 (lambda* (#:key inputs outputs #:allow-other-keys)
16966 (add-installed-pythonpath inputs outputs)
16967 ;; This invokation is taken from tox.ini.
16968 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16969 "-d" "-v" "tqdm/"))))))
16970 (native-inputs
16971 `(("python-nose" ,python-nose)))
16972 (home-page "https://github.com/tqdm/tqdm")
16973 (synopsis "Fast, extensible progress meter")
16974 (description
16975 "Make loops show a progress bar on the console by just wrapping any
16976 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16977 design and layout.")
16978 (license (list license:mpl2.0 license:expat))))
16979
16980 (define-public python2-tqdm
16981 (package-with-python2 python-tqdm))
16982
16983 (define-public python-pkginfo
16984 (package
16985 (name "python-pkginfo")
16986 (version "1.4.2")
16987 (source
16988 (origin
16989 (method url-fetch)
16990 (uri (pypi-uri "pkginfo" version))
16991 (sha256
16992 (base32
16993 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16994 (build-system python-build-system)
16995 (arguments
16996 ;; The tests are broken upstream.
16997 '(#:tests? #f))
16998 (home-page
16999 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
17000 (synopsis
17001 "Query metadatdata from sdists, bdists, and installed packages")
17002 (description
17003 "API to query the distutils metadata written in @file{PKG-INFO} inside a
17004 source distriubtion (an sdist) or a binary distribution (e.g., created by
17005 running bdist_egg). It can also query the EGG-INFO directory of an installed
17006 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
17007 created by running @code{python setup.py develop}).")
17008 (license license:expat)))
17009
17010 (define-public python2-pkginfo
17011 (package-with-python2 python-pkginfo))
17012
17013 (define-public python-twine
17014 (package
17015 (name "python-twine")
17016 (version "1.15.0")
17017 (source
17018 (origin
17019 (method url-fetch)
17020 (uri (pypi-uri "twine" version))
17021 (sha256
17022 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17023 (build-system python-build-system)
17024 (propagated-inputs
17025 `(("python-tqdm" ,python-tqdm)
17026 ("python-packaging" ,python-packaging)
17027 ("python-pkginfo" ,python-pkginfo)
17028 ("python-readme-renderer" ,python-readme-renderer)
17029 ("python-requests" ,python-requests)
17030 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17031 (home-page "https://github.com/pypa/twine")
17032 (synopsis "Collection of utilities for interacting with PyPI")
17033 (description
17034 "@code{twine} currently supports registering projects and uploading
17035 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17036 their files and supports any packaging format (including wheels).")
17037 (license license:asl2.0)))
17038
17039 (define-public python2-twine
17040 (package-with-python2 python-twine))
17041
17042 (define-public python-linecache2
17043 (package
17044 (name "python-linecache2")
17045 (version "1.0.0")
17046 (source
17047 (origin
17048 (method url-fetch)
17049 (uri (pypi-uri "linecache2" version))
17050 (sha256
17051 (base32
17052 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17053 (build-system python-build-system)
17054 (arguments
17055 `(;; The tests depend on unittest2, and our version is a bit too old.
17056 #:tests? #f))
17057 (native-inputs
17058 `(("python-pbr" ,python-pbr-minimal)))
17059 (home-page
17060 "https://github.com/testing-cabal/linecache2")
17061 (synopsis "Backports of the linecache module")
17062 (description
17063 "The linecache module allows one to get any line from any file, while
17064 attempting to optimize internally, using a cache, the common case where many
17065 lines are read from a single file.")
17066 (license license:psfl)))
17067
17068 (define-public python2-linecache2
17069 (package-with-python2 python-linecache2))
17070
17071 (define-public python-traceback2
17072 (package
17073 (name "python-traceback2")
17074 (version "1.4.0")
17075 (source
17076 (origin
17077 (method url-fetch)
17078 (uri (pypi-uri "traceback2" version))
17079 (sha256
17080 (base32
17081 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17082 (build-system python-build-system)
17083 (arguments
17084 `(;; python-traceback2 and python-unittest2 depend on one another.
17085 #:tests? #f))
17086 (native-inputs
17087 `(("python-pbr" ,python-pbr-minimal)))
17088 (propagated-inputs
17089 `(("python-linecache2" ,python-linecache2)))
17090 (home-page
17091 "https://github.com/testing-cabal/traceback2")
17092 (synopsis "Backports of the traceback module")
17093 (description
17094 "This module provides a standard interface to extract, format and print
17095 stack traces of Python programs. It exactly mimics the behavior of the Python
17096 interpreter when it prints a stack trace.")
17097 (license license:psfl)))
17098
17099 (define-public python2-traceback2
17100 (package-with-python2 python-traceback2))
17101
17102 (define-public python-ratelimiter
17103 (package
17104 (name "python-ratelimiter")
17105 (version "1.2.0")
17106 (source
17107 (origin
17108 (method url-fetch)
17109 (uri (pypi-uri "ratelimiter" version))
17110 (sha256
17111 (base32
17112 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17113 (build-system python-build-system)
17114 (arguments
17115 '(#:tests? #f)) ; There are no tests in the pypi archive.
17116 (home-page "https://github.com/RazerM/ratelimiter")
17117 (synopsis "Simple rate limiting object")
17118 (description
17119 "The @code{ratelimiter} module ensures that an operation will not be
17120 executed more than a given number of times during a given period.")
17121 (license license:asl2.0)))
17122
17123 (define-public python2-ratelimiter
17124 (package-with-python2 python-ratelimiter))
17125
17126 (define-public python-dukpy
17127 (package
17128 (name "python-dukpy")
17129 (version "0.3")
17130 (source
17131 (origin
17132 (method git-fetch)
17133 (uri (git-reference
17134 (url "https://github.com/kovidgoyal/dukpy")
17135 (commit (string-append "v" version))))
17136 (file-name (git-file-name name version))
17137 (sha256
17138 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17139 (build-system python-build-system)
17140 (home-page "https://github.com/kovidgoyal/dukpy")
17141 (synopsis "Run JavaScript in python")
17142 (description
17143 "dukpy is a JavaScript runtime environment for Python using the duktape
17144 embeddable JavaScript engine.")
17145 ;; Dukpy is licensed under MIT like the embedded duktape library,
17146 ;; with 'errors.c' as GPL3.
17147 (license (list license:expat license:gpl3))))
17148
17149 (define-public python2-dukpy
17150 (package-with-python2 python-dukpy))
17151
17152 (define-public python-jsonrpclib-pelix
17153 (package
17154 (name "python-jsonrpclib-pelix")
17155 (version "0.3.2")
17156 (source
17157 (origin
17158 (method url-fetch)
17159 (uri (pypi-uri "jsonrpclib-pelix" version))
17160 (sha256
17161 (base32
17162 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17163 (build-system python-build-system)
17164 (arguments
17165 `(#:tests? #f)) ; no tests in PyPI tarball
17166 (home-page "https://github.com/tcalmant/jsonrpclib/")
17167 (synopsis "JSON-RPC 2.0 client library for Python")
17168 (description
17169 "This library implements the JSON-RPC v2.0
17170 specification (backwards-compatible) as a client library for Python. This
17171 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17172 services.")
17173 (license license:asl2.0)))
17174
17175 (define-public python2-jsonrpclib-pelix
17176 (package-with-python2 python-jsonrpclib-pelix))
17177
17178 (define-public python-setuptools-scm-git-archive
17179 (package
17180 (name "python-setuptools-scm-git-archive")
17181 (version "1.0")
17182 (source
17183 (origin
17184 (method url-fetch)
17185 (uri (pypi-uri "setuptools_scm_git_archive" version))
17186 (sha256
17187 (base32
17188 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17189 (build-system python-build-system)
17190 (native-inputs
17191 `(("python-pytest" ,python-pytest)))
17192 (propagated-inputs
17193 `(("python-setuptools-scm" ,python-setuptools-scm)))
17194 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17195 (synopsis "Setuptools_scm plugin for git archives")
17196 (description
17197 "The setuptools_scm_git_archive package is a plugin to
17198 setuptools_scm, which supports obtaining versions from git archives that
17199 belong to tagged versions.")
17200 (license license:expat)))
17201
17202 (define-public python2-setuptools-scm-git-archive
17203 (package-with-python2 python-setuptools-scm-git-archive))
17204
17205 (define-public python-setuptools-git
17206 (package
17207 (name "python-setuptools-git")
17208 (version "1.2")
17209 (source
17210 (origin
17211 (method url-fetch)
17212 (uri (pypi-uri "setuptools-git" version))
17213 (sha256
17214 (base32
17215 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17216 (build-system python-build-system)
17217 (arguments
17218 `(#:phases
17219 (modify-phases %standard-phases
17220 ;; This is needed for tests.
17221 (add-after 'unpack 'configure-git
17222 (lambda _
17223 (setenv "HOME" "/tmp")
17224 (invoke "git" "config" "--global" "user.email" "guix")
17225 (invoke "git" "config" "--global" "user.name" "guix")
17226 #t)))))
17227 (native-inputs
17228 `(("git" ,git-minimal)))
17229 (home-page "https://github.com/msabramo/setuptools-git")
17230 (synopsis "Setuptools revision control system plugin for Git")
17231 (description
17232 "This package provides a plugin for Setuptools for revision control with
17233 Git.")
17234 (license license:bsd-3)))
17235
17236 (define-public python-pyclipper
17237 (package
17238 (name "python-pyclipper")
17239 (version "1.1.0.post3")
17240 (source
17241 (origin
17242 (method url-fetch)
17243 (uri (pypi-uri "pyclipper" version ".zip"))
17244 (sha256
17245 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17246 (modules '((guix build utils)))
17247 (snippet
17248 '(begin
17249 ;; This file is generated by Cython.
17250 (delete-file "pyclipper/pyclipper.cpp") #t))))
17251 (build-system python-build-system)
17252 (arguments
17253 `(#:phases
17254 (modify-phases %standard-phases
17255 (add-before 'build 'cythonize-sources
17256 (lambda _
17257 (with-directory-excursion "pyclipper"
17258 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17259 (propagated-inputs
17260 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17261 (native-inputs
17262 `(("python-cython" ,python-cython)
17263 ("python-pytest" ,python-pytest)
17264 ("python-pytest-runner" ,python-pytest-runner)
17265 ("python-unittest2" ,python-unittest2)
17266 ("unzip" ,unzip)))
17267 (home-page "https://github.com/greginvm/pyclipper")
17268 (synopsis "Wrapper for Angus Johnson's Clipper library")
17269 (description
17270 "Pyclipper is a Cython wrapper for the C++ translation of the
17271 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17272 (license license:expat)))
17273
17274 (define-public python2-pyclipper
17275 (package-with-python2 python-pyclipper))
17276
17277 (define-public python2-booleanoperations
17278 (package
17279 (name "python2-booleanoperations")
17280 (version "0.7.1")
17281 (source
17282 (origin
17283 (method url-fetch)
17284 (uri (pypi-uri "booleanOperations" version ".zip"))
17285 (sha256
17286 (base32
17287 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17288 (build-system python-build-system)
17289 (arguments
17290 `(#:python ,python-2))
17291 (native-inputs
17292 `(("unzip" ,unzip)
17293 ("python2-pytest" ,python2-pytest)
17294 ("python2-pytest-runner" ,python2-pytest-runner)))
17295 (propagated-inputs
17296 `(("python-fonttools" ,python2-fonttools)
17297 ("python-pyclipper" ,python2-pyclipper)
17298 ("python-ufolib" ,python2-ufolib)))
17299 (home-page "https://github.com/typemytype/booleanOperations")
17300 (synopsis "Boolean operations on paths")
17301 (description
17302 "BooleanOperations provides a Python library that enables
17303 boolean operations on paths.")
17304 (license license:expat)))
17305
17306 (define-public python-tempdir
17307 (package
17308 (name "python-tempdir")
17309 (version "0.7.1")
17310 (source
17311 (origin
17312 (method url-fetch)
17313 (uri (pypi-uri "tempdir" version))
17314 (sha256
17315 (base32
17316 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17317 (build-system python-build-system)
17318 (home-page "https://pypi.org/project/tempdir/")
17319 (arguments
17320 ;; the package has no tests
17321 '(#:tests? #f))
17322 (synopsis "Python library for managing temporary directories")
17323 (description
17324 "This library manages temporary directories that are automatically
17325 deleted with all their contents when they are no longer needed. It is
17326 particularly convenient for use in tests.")
17327 (license license:expat)))
17328
17329 (define-public python2-tempdir
17330 (package-with-python2 python-tempdir))
17331
17332 (define-public python-activepapers
17333 (package
17334 (name "python-activepapers")
17335 (version "0.2.2")
17336 (source
17337 (origin
17338 (method url-fetch)
17339 (uri (pypi-uri "ActivePapers.Py" version))
17340 (sha256
17341 (base32
17342 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17343 (build-system python-build-system)
17344 (arguments
17345 `(#:modules ((ice-9 ftw)
17346 (srfi srfi-1)
17347 (guix build utils)
17348 (guix build python-build-system))
17349
17350 #:phases
17351 (modify-phases %standard-phases
17352 (add-after 'unpack 'delete-python2-code
17353 (lambda _
17354 (for-each delete-file
17355 '("lib/activepapers/builtins2.py"
17356 "lib/activepapers/standardlib2.py"
17357 "lib/activepapers/utility2.py"))))
17358 (replace 'check
17359 (lambda _
17360 ;; Deactivate the test cases that download files
17361 (setenv "NO_NETWORK_ACCESS" "1")
17362 ;; For some strange reason, some tests fail if nosetests runs all
17363 ;; test modules in a single execution. They pass if each test
17364 ;; module is run individually.
17365 (for-each (lambda (filename)
17366 (invoke "nosetests"
17367 (string-append "tests/" filename)))
17368 (scandir "tests"
17369 (lambda (filename)
17370 (string-suffix? ".py" filename)))))))))
17371 (native-inputs
17372 `(("python-tempdir" ,python-tempdir)
17373 ("python-nose" ,python-nose)))
17374 (propagated-inputs
17375 `(("python-h5py" ,python-h5py)))
17376 (home-page "https://www.activepapers.org/")
17377 (synopsis "Executable papers for scientific computing")
17378 (description
17379 "ActivePapers is a tool for working with executable papers, which
17380 combine data, code, and documentation in single-file packages,
17381 suitable for publication as supplementary material or on repositories
17382 such as figshare or Zenodo.")
17383 (properties `((python2-variant . ,(delay python2-activepapers))))
17384 (license license:bsd-3)))
17385
17386 (define-public python2-activepapers
17387 (let ((base (package-with-python2
17388 (strip-python2-variant python-activepapers))))
17389 (package
17390 (inherit base)
17391 (arguments
17392 (substitute-keyword-arguments (package-arguments base)
17393 ((#:phases phases)
17394 `(modify-phases ,phases
17395 (delete 'delete-python2-code)
17396 (add-after 'unpack 'delete-python3-code
17397 (lambda _
17398 (for-each delete-file
17399 '("lib/activepapers/builtins3.py"
17400 "lib/activepapers/standardlib3.py"
17401 "lib/activepapers/utility3.py")))))))))))
17402
17403 (define-public python-semver
17404 (package
17405 (name "python-semver")
17406 (version "2.9.0")
17407 (source
17408 (origin
17409 (method url-fetch)
17410 (uri (pypi-uri "semver" version))
17411 (sha256
17412 (base32
17413 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17414 (build-system python-build-system)
17415 (arguments
17416 `(#:phases (modify-phases %standard-phases
17417 (replace 'check
17418 (lambda _
17419 (delete-file "setup.cfg")
17420 (invoke "py.test"))))))
17421 (native-inputs
17422 `(("python-pytest" ,python-pytest)))
17423 (home-page "https://github.com/k-bx/python-semver")
17424 (synopsis "Python helper for Semantic Versioning")
17425 (description "This package provides a Python library for
17426 @url{Semantic Versioning, http://semver.org/}.")
17427 (license license:bsd-3)))
17428
17429 (define-public python2-semver
17430 (package-with-python2 python-semver))
17431
17432 (define-public python-pyro4
17433 (package
17434 (name "python-pyro4")
17435 (version "4.77")
17436 (source
17437 (origin
17438 (method url-fetch)
17439 (uri (pypi-uri "Pyro4" version))
17440 (sha256
17441 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17442 (build-system python-build-system)
17443 (arguments
17444 '(#:tests? #f)) ;FIXME: Some tests require network access.
17445 (native-inputs
17446 `(("python-cloudpickle" ,python-cloudpickle)
17447 ("python-dill" ,python-dill)
17448 ("python-msgpack" ,python-msgpack)))
17449 (propagated-inputs
17450 `(("python-serpent" ,python-serpent)))
17451 (home-page "https://pyro4.readthedocs.io")
17452 (synopsis "Distributed object middleware for Python")
17453 (description
17454 "Pyro enables you to build applications in which objects can talk to each
17455 other over the network. You can just use normal Python method calls to call
17456 objects on other machines, also known as remote procedure calls (RPC).")
17457 (license license:expat)))
17458
17459 (define-public python2-pyro
17460 (package
17461 (name "python2-pyro")
17462 (version "3.16")
17463 (source
17464 (origin
17465 (method url-fetch)
17466 (uri (pypi-uri "Pyro" version))
17467 (file-name (string-append "Pyro-" version ".tar.gz"))
17468 (sha256
17469 (base32
17470 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17471 (build-system python-build-system)
17472 (arguments
17473 ;; Pyro is not compatible with Python 3
17474 `(#:python ,python-2
17475 ;; Pyro has no test cases for automatic execution
17476 #:tests? #f))
17477 (home-page "https://pythonhosted.org/Pyro/")
17478 (synopsis "Distributed object manager for Python")
17479 (description "Pyro is a Distributed Object Technology system
17480 written in Python that is designed to be easy to use. It resembles
17481 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17482 which is a system and language independent Distributed Object Technology
17483 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17484 longer maintained. New projects should use Pyro4 instead, which
17485 is the new Pyro version that is actively developed.")
17486 (license license:expat)))
17487
17488 (define-public python2-scientific
17489 (package
17490 (name "python2-scientific")
17491 (version "2.9.4")
17492 (source
17493 (origin
17494 (method git-fetch)
17495 (uri (git-reference
17496 (url "https://github.com/khinsen/ScientificPython")
17497 (commit (string-append "rel" version))))
17498 (file-name (git-file-name name version))
17499 (sha256
17500 (base32
17501 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17502 (build-system python-build-system)
17503 (inputs
17504 `(("netcdf" ,netcdf)))
17505 (propagated-inputs
17506 `(("python-numpy" ,python2-numpy-1.8)
17507 ("python-pyro" ,python2-pyro)))
17508 (arguments
17509 ;; ScientificPython is not compatible with Python 3
17510 `(#:python ,python-2
17511 #:tests? #f ; No test suite
17512 #:phases
17513 (modify-phases %standard-phases
17514 (replace 'build
17515 (lambda* (#:key inputs #:allow-other-keys)
17516 (invoke "python" "setup.py" "build"
17517 (string-append "--netcdf_prefix="
17518 (assoc-ref inputs "netcdf"))))))))
17519 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17520 (synopsis "Python modules for scientific computing")
17521 (description "ScientificPython is a collection of Python modules that are
17522 useful for scientific computing. Most modules are rather general (Geometry,
17523 physical units, automatic derivatives, ...) whereas others are more
17524 domain-specific (e.g. netCDF and PDB support). The library is currently
17525 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17526 (license license:cecill-c)))
17527
17528 (define-public python2-mmtk
17529 (package
17530 (name "python2-mmtk")
17531 (version "2.7.12")
17532 (source
17533 (origin
17534 (method git-fetch)
17535 (uri (git-reference
17536 (url "https://github.com/khinsen/MMTK")
17537 (commit (string-append "rel" version))))
17538 (file-name (git-file-name name version))
17539 (sha256
17540 (base32
17541 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17542 (build-system python-build-system)
17543 (native-inputs
17544 `(("netcdf" ,netcdf)))
17545 (propagated-inputs
17546 `(("python-scientific" ,python2-scientific)
17547 ("python-tkinter" ,python-2 "tk")))
17548 (arguments
17549 `(#:python ,python-2
17550 #:tests? #f
17551 #:phases
17552 (modify-phases %standard-phases
17553 (add-before 'build 'includes-from-scientific
17554 (lambda* (#:key inputs #:allow-other-keys)
17555 (mkdir-p "Include/Scientific")
17556 (copy-recursively
17557 (string-append
17558 (assoc-ref inputs "python-scientific")
17559 "/include/python2.7/Scientific")
17560 "Include/Scientific"))))))
17561 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17562 (synopsis "Python library for molecular simulation")
17563 (description "MMTK is a library for molecular simulations with an emphasis
17564 on biomolecules. It provides widely used methods such as Molecular Dynamics
17565 and normal mode analysis, but also basic routines for implementing new methods
17566 for simulation and analysis. The library is currently not actively maintained
17567 and works only with Python 2 and NumPy < 1.9.")
17568 (license license:cecill-c)))
17569
17570 (define-public python-phonenumbers
17571 (package
17572 (name "python-phonenumbers")
17573 (version "8.9.1")
17574 (source
17575 (origin
17576 (method url-fetch)
17577 (uri (pypi-uri "phonenumbers" version))
17578 (sha256
17579 (base32
17580 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17581 (build-system python-build-system)
17582 (home-page
17583 "https://github.com/daviddrysdale/python-phonenumbers")
17584 (synopsis
17585 "Python library for dealing with international phone numbers")
17586 (description
17587 "This package provides a Python port of Google's libphonenumber library.")
17588 (license license:asl2.0)))
17589
17590 (define-public python2-phonenumbers
17591 (package-with-python2 python-phonenumbers))
17592
17593 (define-public python-send2trash
17594 (package
17595 (name "python-send2trash")
17596 (version "1.5.0")
17597 (source
17598 (origin (method git-fetch)
17599 ;; Source tarball on PyPI doesn't include tests.
17600 (uri (git-reference
17601 (url "https://github.com/hsoft/send2trash")
17602 (commit version)))
17603 (file-name (git-file-name name version))
17604 (sha256
17605 (base32
17606 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17607 (build-system python-build-system)
17608 (arguments
17609 '(#:phases
17610 (modify-phases %standard-phases
17611 (add-before 'check 'pre-check
17612 (lambda _
17613 (mkdir-p "/tmp/foo")
17614 (setenv "HOME" "/tmp/foo")
17615 #t)))))
17616 (home-page "https://github.com/hsoft/send2trash")
17617 (synopsis "Send files to the user's @file{~/Trash} directory")
17618 (description "This package provides a Python library to send files to the
17619 user's @file{~/Trash} directory.")
17620 (properties `((python2-variant . ,(delay python2-send2trash))))
17621 (license license:bsd-3)))
17622
17623 (define-public python2-send2trash
17624 (package
17625 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17626 (arguments
17627 (substitute-keyword-arguments (package-arguments python-send2trash)
17628 ((#:phases phases)
17629 `(modify-phases ,phases
17630 (add-before 'check 'setenv
17631 (lambda _
17632 (setenv "PYTHONPATH"
17633 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17634 #t))))))))
17635
17636 (define-public python-pyfavicon
17637 (package
17638 (name "python-pyfavicon")
17639 (version "0.1.1")
17640 (source
17641 (origin
17642 (method url-fetch)
17643 (uri (pypi-uri "pyfavicon" version))
17644 (sha256
17645 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17646 (build-system python-build-system)
17647 (arguments
17648 ;; There are no tests in the PyPI tarball and the tests from the
17649 ;; repository require online data.
17650 '(#:tests? #f))
17651 (propagated-inputs
17652 `(("python-aiohttp" ,python-aiohttp)
17653 ("python-beautifulsoup4" ,python-beautifulsoup4)
17654 ("python-pillow" ,python-pillow)))
17655 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17656 (synopsis "Async favicon fetcher")
17657 (description
17658 "@code{pyfavicon} is an async favicon fetcher.")
17659 (license license:expat)))
17660
17661 (define-public python-yapf
17662 (package
17663 (name "python-yapf")
17664 (version "0.29.0")
17665 (source
17666 (origin
17667 (method url-fetch)
17668 (uri (pypi-uri "yapf" version))
17669 (sha256
17670 (base32
17671 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17672 (build-system python-build-system)
17673 (home-page "https://github.com/google/yapf")
17674 (synopsis "Formatter for Python code")
17675 (description "YAPF is a formatter for Python code. It's based off of
17676 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17677 takes the code and reformats it to the best formatting that conforms to the
17678 style guide, even if the original code didn't violate the style guide.")
17679 (license license:asl2.0)))
17680
17681 (define-public python2-yapf
17682 (package-with-python2 python-yapf))
17683
17684 (define-public python-yq
17685 (package
17686 (name "python-yq")
17687 (version "2.11.1")
17688 (source
17689 (origin
17690 (method url-fetch)
17691 (uri (pypi-uri "yq" version))
17692 (sha256
17693 (base32
17694 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17695 (build-system python-build-system)
17696 (arguments
17697 '(#:phases
17698 (modify-phases %standard-phases
17699 (add-after 'unpack 'patch
17700 (lambda* (#:key inputs #:allow-other-keys)
17701 (substitute* "yq/__init__.py"
17702 (("Popen\\(\\[\"jq")
17703 (string-append
17704 "Popen([\""
17705 (assoc-ref inputs "jq")
17706 "/bin/jq")))
17707 #t)))))
17708 (inputs
17709 `(("python-argcomplete" ,python-argcomplete)
17710 ("python-pyyaml" ,python-pyyaml)
17711 ("python-xmltodict" ,python-xmltodict)
17712 ("jq" ,jq)))
17713 (native-inputs
17714 `(("python-coverage" ,python-coverage)
17715 ("python-flake8" ,python-flake8)
17716 ("python-wheel" ,python-wheel)))
17717 (home-page "https://github.com/kislyuk/yq")
17718 (synopsis "Command-line YAML/XML processor")
17719 (description
17720 "This package provides @command{yq} and @command{xq} for processing YAML
17721 and XML respectively. The processing is done through @{jq}, @command{jq}
17722 filters can be used to process the data as it passes through.")
17723 (license license:asl2.0)))
17724
17725 (define-public python-gyp
17726 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17727 (revision "0"))
17728 (package
17729 (name "python-gyp")
17730 ;; Google does not release versions,
17731 ;; based on second most recent commit date.
17732 (version (git-version "0.0.0" revision commit))
17733 (source
17734 (origin
17735 ;; Google does not release tarballs,
17736 ;; git checkout is needed.
17737 (method git-fetch)
17738 (uri (git-reference
17739 (url "https://chromium.googlesource.com/external/gyp")
17740 (commit commit)))
17741 (file-name (git-file-name name version))
17742 (sha256
17743 (base32
17744 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17745 (build-system python-build-system)
17746 (home-page "https://gyp.gsrc.io/")
17747 (synopsis "GYP is a Meta-Build system")
17748 (description
17749 "GYP builds build systems for large, cross platform applications.
17750 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17751 files, and Makefiles.")
17752 (license license:bsd-3))))
17753
17754 (define-public python2-gyp
17755 (package-with-python2 python-gyp))
17756
17757 (define-public python-whatever
17758 (package
17759 (name "python-whatever")
17760 (version "0.6")
17761 (source
17762 (origin
17763 (method git-fetch)
17764 (uri (git-reference
17765 (url "https://github.com/Suor/whatever")
17766 (commit version)))
17767 (file-name (git-file-name name version))
17768 (sha256
17769 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17770 (build-system python-build-system)
17771 (arguments
17772 `(#:phases
17773 (modify-phases %standard-phases
17774 (replace 'check
17775 (lambda _
17776 (invoke "py.test"))))))
17777 (native-inputs
17778 `(("python-pytest" ,python-pytest)))
17779 (home-page "https://github.com/Suor/whatever")
17780 (synopsis "Make anonymous functions by partial application of operators")
17781 (description "@code{whatever} provides an easy way to make anonymous
17782 functions by partial application of operators.")
17783 (license license:bsd-3)))
17784
17785 (define-public python2-whatever
17786 (package-with-python2 python-whatever))
17787
17788 (define-public python-funcy
17789 (package
17790 (name "python-funcy")
17791 (version "1.11")
17792 (source
17793 (origin
17794 (method git-fetch)
17795 (uri (git-reference
17796 (url "https://github.com/Suor/funcy")
17797 (commit version)))
17798 (sha256
17799 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17800 (file-name (git-file-name name version))))
17801 (build-system python-build-system)
17802 (arguments
17803 `(#:phases
17804 (modify-phases %standard-phases
17805 (replace 'check
17806 (lambda _
17807 (invoke "py.test"))))))
17808 (native-inputs
17809 `(("python-pytest" ,python-pytest)
17810 ("python-whatever" ,python-whatever)))
17811 (home-page "https://github.com/Suor/funcy")
17812 (synopsis "Functional tools")
17813 (description "@code{funcy} is a library that provides functional tools.
17814 Examples are:
17815 @enumerate
17816 @item merge - Merges collections of the same type
17817 @item walk - Type-preserving map
17818 @item select - Selects a part of a collection
17819 @item take - Takes the first n items of a collection
17820 @item first - Takes the first item of a collection
17821 @item remove - Predicated-removes items of a collection
17822 @item concat - Concatenates two collections
17823 @item flatten - Flattens a collection with subcollections
17824 @item distinct - Returns only distinct items
17825 @item split - Predicated-splits a collection
17826 @item split_at - Splits a collection at a given item
17827 @item group_by - Groups items by group
17828 @item pairwise - Pairs off adjacent items
17829 @item partial - Partially-applies a function
17830 @item curry - Curries a function
17831 @item compose - Composes functions
17832 @item complement - Complements a predicate
17833 @item all_fn - \"all\" with predicate
17834 @end enumerate")
17835 (license license:bsd-3)))
17836
17837 (define-public python2-funcy
17838 (package-with-python2 python-funcy))
17839
17840 (define-public python-isoweek
17841 (package
17842 (name "python-isoweek")
17843 (version "1.3.3")
17844 (source
17845 (origin
17846 (method url-fetch)
17847 (uri (pypi-uri "isoweek" version))
17848 (sha256
17849 (base32
17850 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17851 (build-system python-build-system)
17852 (home-page "https://github.com/gisle/isoweek")
17853 (synopsis "Objects representing a week")
17854 (description "The @code{isoweek} module provide the class Week that
17855 implements the week definition of ISO 8601. This standard also defines
17856 a notation for identifying weeks; yyyyWww (where the W is a literal).
17857 Week instances stringify to this form.")
17858 (license license:bsd-3)))
17859
17860 (define-public python2-isoweek
17861 (package-with-python2 python-isoweek))
17862
17863 (define-public python-pyzbar
17864 (package
17865 (name "python-pyzbar")
17866 (version "0.1.8")
17867 (source
17868 (origin
17869 ;; There's no source tarball on PyPI.
17870 (method git-fetch)
17871 (uri (git-reference
17872 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17873 (commit (string-append "v" version))))
17874 (file-name (git-file-name name version))
17875 (sha256
17876 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17877 (build-system python-build-system)
17878 (arguments
17879 `(#:phases
17880 (modify-phases %standard-phases
17881 (add-after 'unpack 'remove-failing-test
17882 (lambda _
17883 ;; This tests if find_library was called once, but we remove
17884 ;; the call in the stage below to make the library find libzbar.
17885 (delete-file "pyzbar/tests/test_zbar_library.py")
17886 #t))
17887 (add-before 'build 'set-library-file-name
17888 (lambda* (#:key inputs #:allow-other-keys)
17889 (let ((libzbar (assoc-ref inputs "zbar")))
17890 (substitute* "pyzbar/zbar_library.py"
17891 (("find_library\\('zbar'\\)")
17892 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17893 #t))))))
17894 (native-inputs
17895 `(("pkg-config" ,pkg-config)
17896 ("python-numpy" ,python-numpy)
17897 ("python-pillow" ,python-pillow)))
17898 (inputs
17899 `(("zbar" ,zbar)))
17900 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17901 (synopsis "Read one-dimensional barcodes and QR codes")
17902 (description
17903 "Read one-dimensional barcodes and QR codes using the zbar library.
17904
17905 Features:
17906
17907 @itemize
17908 @item Pure python
17909 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17910 @item Decodes locations of barcodes
17911 @item No dependencies, other than the zbar library itself
17912 @end itemize")
17913 (license license:expat)))
17914
17915 (define-public python-tokenize-rt
17916 (package
17917 (name "python-tokenize-rt")
17918 (version "2.0.1")
17919 (source
17920 (origin
17921 (method url-fetch)
17922 (uri (pypi-uri "tokenize-rt" version))
17923 (sha256
17924 (base32
17925 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17926 (build-system python-build-system)
17927 (home-page "https://github.com/asottile/tokenize-rt")
17928 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17929 (description
17930 "This Python library is a wrapper around @code{tokenize} from the Python
17931 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17932 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17933 and @code{tokens_to_src} to roundtrip.")
17934 (license license:expat)))
17935
17936 (define-public python-future-fstrings
17937 (package
17938 (name "python-future-fstrings")
17939 (version "0.4.1")
17940 (source
17941 (origin
17942 (method url-fetch)
17943 (uri (pypi-uri "future_fstrings" version))
17944 (sha256
17945 (base32
17946 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17947 (build-system python-build-system)
17948 (propagated-inputs
17949 `(("python-tokenize-rt" ,python-tokenize-rt)))
17950 (home-page "https://github.com/asottile/future-fstrings")
17951 (synopsis "Backport of fstrings to Python < 3.6")
17952 (description
17953 "This package provides a UTF-8 compatible encoding
17954 @code{future_fstrings}, which performs source manipulation. It decodes the
17955 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17956 @code{f} strings.")
17957 (license license:expat)))
17958
17959 (define-public python-typed-ast
17960 (package
17961 (name "python-typed-ast")
17962 (version "1.4.0")
17963 (source
17964 (origin
17965 (method git-fetch)
17966 (uri (git-reference
17967 (url "https://github.com/python/typed_ast")
17968 (commit version)))
17969 (sha256
17970 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17971 (file-name (git-file-name name version))))
17972 (build-system python-build-system)
17973 (arguments
17974 `(#:modules ((guix build utils)
17975 (guix build python-build-system)
17976 (ice-9 ftw)
17977 (srfi srfi-1)
17978 (srfi srfi-26))
17979 #:phases
17980 (modify-phases %standard-phases
17981 (replace 'check
17982 (lambda _
17983 (let ((cwd (getcwd)))
17984 (setenv "PYTHONPATH"
17985 (string-append cwd "/build/"
17986 (find (cut string-prefix? "lib" <>)
17987 (scandir (string-append cwd "/build")))
17988 ":"
17989 (getenv "PYTHONPATH"))))
17990 (invoke "pytest")
17991 #t)))))
17992 (native-inputs `(("python-pytest" ,python-pytest)))
17993 (home-page "https://github.com/python/typed_ast")
17994 (synopsis "Fork of Python @code{ast} modules with type comment support")
17995 (description "This package provides a parser similar to the standard
17996 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17997 include PEP 484 type comments and are independent of the version of Python
17998 under which they are run. The @code{typed_ast} parsers produce the standard
17999 Python AST (plus type comments), and are both fast and correct, as they are
18000 based on the CPython 2.7 and 3.7 parsers.")
18001 ;; See the file "LICENSE" for the details.
18002 (license (list license:psfl
18003 license:asl2.0
18004 license:expat)))) ;ast27/Parser/spark.py
18005
18006 (define-public python-typing
18007 (package
18008 (name "python-typing")
18009 (version "3.7.4.3")
18010 (source
18011 (origin
18012 (method url-fetch)
18013 (uri (pypi-uri "typing" version))
18014 (sha256
18015 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18016 (build-system python-build-system)
18017 (home-page "https://docs.python.org/3/library/typing.html")
18018 (synopsis "Type hints for Python")
18019 (description "This is a backport of the standard library @code{typing}
18020 module to Python versions older than 3.5. Typing defines a standard notation
18021 for Python function and variable type annotations. The notation can be used
18022 for documenting code in a concise, standard format, and it has been designed
18023 to also be used by static and runtime type checkers, static analyzers, IDEs
18024 and other tools.")
18025 (license license:psfl)))
18026
18027 (define-public python2-typing
18028 (package-with-python2 python-typing))
18029
18030 (define-public python-typing-extensions
18031 (package
18032 (name "python-typing-extensions")
18033 (version "3.7.4.2")
18034 (source
18035 (origin
18036 (method url-fetch)
18037 (uri (pypi-uri "typing_extensions" version))
18038 (sha256
18039 (base32
18040 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
18041 (build-system python-build-system)
18042 (home-page
18043 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18044 (synopsis "Experimental type hints for Python")
18045 (description
18046 "The typing_extensions module contains additional @code{typing} hints not
18047 yet present in the of the @code{typing} standard library.
18048 Included are implementations of:
18049 @enumerate
18050 @item ClassVar
18051 @item ContextManager
18052 @item Counter
18053 @item DefaultDict
18054 @item Deque
18055 @item NewType
18056 @item NoReturn
18057 @item overload
18058 @item Protocol
18059 @item runtime
18060 @item Text
18061 @item Type
18062 @item TYPE_CHECKING
18063 @item AsyncGenerator
18064 @end enumerate\n")
18065 (license license:psfl)))
18066
18067 (define-public bpython
18068 (package
18069 (name "bpython")
18070 (version "0.18")
18071 (source
18072 (origin
18073 (method url-fetch)
18074 (uri (pypi-uri "bpython" version))
18075 (sha256
18076 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18077 (build-system python-build-system)
18078 (arguments
18079 `(#:phases
18080 (modify-phases %standard-phases
18081 (add-after 'unpack 'remove-failing-test
18082 (lambda _
18083 ;; Remove failing test. FIXME: make it pass
18084 (delete-file "bpython/test/test_args.py")
18085 #t))
18086 (add-after 'wrap 'add-aliases
18087 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18088 (lambda* (#:key outputs #:allow-other-keys)
18089 (let ((out (assoc-ref outputs "out")))
18090 (for-each
18091 (lambda (old new)
18092 (symlink old (string-append out "/bin/" new)))
18093 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18094 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18095 #t)))))
18096 (propagated-inputs
18097 `(("python-pygments" ,python-pygments)
18098 ("python-requests" ,python-requests)
18099 ("python-babel" ,python-babel) ; optional, for internationalization
18100 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18101 ("python-greenlet" ,python-greenlet)
18102 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18103 ("python-six" ,python-six)))
18104 (native-inputs
18105 `(("python-sphinx" ,python-sphinx)
18106 ("python-mock" ,python-mock)))
18107 (home-page "https://bpython-interpreter.org/")
18108 (synopsis "Fancy interface to the Python interpreter")
18109 (description "Bpython is a fancy interface to the Python
18110 interpreter. bpython's main features are
18111
18112 @enumerate
18113 @item in-line syntax highlighting,
18114 @item readline-like autocomplete with suggestions displayed as you type,
18115 @item expected parameter list for any Python function,
18116 @item \"rewind\" function to pop the last line of code from memory and
18117 re-evaluate,
18118 @item send the code you've entered off to a pastebin,
18119 @item save the code you've entered to a file, and
18120 @item auto-indentation.
18121 @end enumerate")
18122 (license license:expat)))
18123
18124 (define-public bpython2
18125 (let ((base (package-with-python2
18126 (strip-python2-variant bpython))))
18127 (package (inherit base)
18128 (name "bpython2")
18129 (arguments
18130 `(#:python ,python-2
18131 #:phases
18132 (modify-phases %standard-phases
18133 (add-after 'unpack 'remove-failing-test
18134 (lambda _
18135 ;; Remove failing test. FIXME: make it pass
18136 (delete-file "bpython/test/test_args.py")
18137 ;; Disable failing test-cases (renaming inhibits they are
18138 ;; discovered)
18139 (substitute* "bpython/test/test_curtsies_repl.py"
18140 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
18141 (string-append a "xxx_off_" b))
18142 (("^(\\s*def )(test_complex\\W)" _ a b)
18143 (string-append a "xxx_off_" b)))
18144 #t))
18145 (add-before 'build 'rename-scripts
18146 ;; rename the scripts to bypthon2, bpdb2, etc.
18147 (lambda _
18148 (substitute* "setup.py"
18149 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
18150 (string-append name "2" rest "\n"))
18151 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
18152 (string-append name "2" (or sub "") rest "\n")))
18153 #t))))))))
18154
18155 (define-public python-pyinotify
18156 (package
18157 (name "python-pyinotify")
18158 (version "0.9.6")
18159 (source (origin
18160 (method url-fetch)
18161 (uri (pypi-uri "pyinotify" version))
18162 (sha256
18163 (base32
18164 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18165 (build-system python-build-system)
18166 (arguments `(#:tests? #f)) ;no tests
18167 (home-page "https://github.com/seb-m/pyinotify")
18168 (synopsis "Python library for monitoring inotify events")
18169 (description
18170 "@code{pyinotify} provides a Python interface for monitoring
18171 file system events on Linux.")
18172 (license license:expat)))
18173
18174 (define-public python2-pyinotify
18175 (package-with-python2 python-pyinotify))
18176
18177 ;; Ada parser uses this version.
18178 (define-public python2-quex-0.67.3
18179 (package
18180 (name "python2-quex")
18181 (version "0.67.3")
18182 (source
18183 (origin
18184 (method url-fetch)
18185 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18186 (version-major+minor version)
18187 "/quex-" version ".zip"))
18188 (sha256
18189 (base32
18190 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18191 (build-system python-build-system)
18192 (native-inputs
18193 `(("unzip" ,unzip)))
18194 (arguments
18195 `(#:python ,python-2
18196 #:tests? #f
18197 #:phases
18198 (modify-phases %standard-phases
18199 (delete 'configure)
18200 (delete 'build)
18201 (replace 'install
18202 (lambda* (#:key outputs #:allow-other-keys)
18203 (let* ((out (assoc-ref outputs "out"))
18204 (share/quex (string-append out "/share/quex"))
18205 (bin (string-append out "/bin")))
18206 (copy-recursively "." share/quex)
18207 (mkdir-p bin)
18208 (symlink (string-append share/quex "/quex-exe.py")
18209 (string-append bin "/quex"))
18210 #t))))))
18211 (native-search-paths
18212 (list (search-path-specification
18213 (variable "QUEX_PATH")
18214 (files '("share/quex")))))
18215 (home-page "http://quex.sourceforge.net/")
18216 (synopsis "Lexical analyzer generator in Python")
18217 (description "@code{quex} is a lexical analyzer generator in Python.")
18218 (license license:lgpl2.1+))) ; Non-military
18219
18220 (define-public python2-quex
18221 (package (inherit python2-quex-0.67.3)
18222 (name "python2-quex")
18223 (version "0.68.1")
18224 (source
18225 (origin
18226 (method url-fetch)
18227 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18228 (sha256
18229 (base32
18230 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18231 (file-name (string-append name "-" version ".tar.gz"))))))
18232
18233 (define-public python-more-itertools
18234 (package
18235 (name "python-more-itertools")
18236 (version "8.2.0")
18237 (source
18238 (origin
18239 (method url-fetch)
18240 (uri (pypi-uri "more-itertools" version))
18241 (sha256
18242 (base32
18243 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18244 (build-system python-build-system)
18245 (home-page "https://github.com/erikrose/more-itertools")
18246 (synopsis "More routines for operating on iterables, beyond itertools")
18247 (description "Python's built-in @code{itertools} module implements a
18248 number of iterator building blocks inspired by constructs from APL, Haskell,
18249 and SML. @code{more-itertools} includes additional building blocks for
18250 working with iterables.")
18251 (properties `((python2-variant . ,(delay python2-more-itertools))))
18252 (license license:expat)))
18253
18254 ;; The 5.x series are the last versions supporting Python 2.7.
18255 (define-public python2-more-itertools
18256 (package
18257 (inherit python-more-itertools)
18258 (name "python2-more-itertools")
18259 (version "5.0.0")
18260 (source (origin
18261 (method url-fetch)
18262 (uri (pypi-uri "more-itertools" version))
18263 (sha256
18264 (base32
18265 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18266 (arguments
18267 `(#:python ,python-2))
18268 (propagated-inputs
18269 `(("python2-six" ,python2-six-bootstrap)))))
18270
18271 (define-public python-latexcodec
18272 (package
18273 (name "python-latexcodec")
18274 (version "1.0.7")
18275 (source
18276 (origin
18277 (method url-fetch)
18278 (uri (pypi-uri "latexcodec" version))
18279 (sha256
18280 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18281 (build-system python-build-system)
18282 (inputs
18283 `(("python-six" ,python-six)))
18284 (home-page "https://readthedocs.org/projects/latexcodec/")
18285 (synopsis "Work with LaTeX code in Python")
18286 (description "Lexer and codec to work with LaTeX code in Python.")
18287 (license license:expat)))
18288
18289 (define-public python-pybtex
18290 (package
18291 (name "python-pybtex")
18292 (version "0.22.2")
18293 (source
18294 (origin
18295 (method url-fetch)
18296 (uri (pypi-uri "pybtex" version))
18297 (sha256
18298 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18299 (build-system python-build-system)
18300 (native-inputs
18301 `(("python-nose" ,python-nose)))
18302 (inputs
18303 `(("python-latexcodec" ,python-latexcodec)
18304 ("python-pyyaml" ,python-pyyaml)
18305 ("python-six" ,python-six)))
18306 (arguments
18307 `(#:test-target "nosetests"))
18308 (home-page "https://pybtex.org/")
18309 (synopsis "BibTeX-compatible bibliography processor")
18310 (description "Pybtex is a BibTeX-compatible bibliography processor written
18311 in Python. You can simply type pybtex instead of bibtex.")
18312 (license license:expat)))
18313
18314 (define-public python-onetimepass
18315 (package
18316 (name "python-onetimepass")
18317 (version "1.0.1")
18318 (source
18319 (origin
18320 (method url-fetch)
18321 (uri (pypi-uri "onetimepass" version))
18322 (sha256
18323 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18324 (build-system python-build-system)
18325 (propagated-inputs `(("python-six" ,python-six)))
18326 (home-page "https://github.com/tadeck/onetimepass/")
18327 (synopsis "One-time password library")
18328 (description "Python one-time password library for HMAC-based (HOTP) and
18329 time-based (TOTP) passwords.")
18330 (license license:expat)))
18331
18332 (define-public python-parso
18333 (package
18334 (name "python-parso")
18335 (version "0.7.1")
18336 (source
18337 (origin
18338 (method url-fetch)
18339 (uri (pypi-uri "parso" version))
18340 (sha256
18341 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18342 (native-inputs
18343 `(("python-pytest" ,python-pytest)))
18344 (build-system python-build-system)
18345 (arguments
18346 `(#:phases (modify-phases %standard-phases
18347 (replace 'check
18348 (lambda _ (invoke "pytest" "-vv"))))))
18349 (home-page "https://github.com/davidhalter/parso")
18350 (synopsis "Python Parser")
18351 (description "Parso is a Python parser that supports error recovery and
18352 round-trip parsing for different Python versions (in multiple Python versions).
18353 Parso is also able to list multiple syntax errors in your Python file.")
18354 (license license:expat)))
18355
18356 (define-public python2-parso
18357 (package-with-python2 python-parso))
18358
18359 (define-public python-async-generator
18360 (package
18361 (name "python-async-generator")
18362 (version "1.10")
18363 (source
18364 (origin
18365 (method url-fetch)
18366 (uri (pypi-uri "async_generator" version))
18367 (sha256
18368 (base32
18369 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18370 (build-system python-build-system)
18371 (native-inputs
18372 `(("python-pytest" ,python-pytest)))
18373 (home-page "https://github.com/python-trio/async_generator")
18374 (synopsis "Async generators and context managers for Python 3.5+")
18375 (description "@code{async_generator} back-ports Python 3.6's native async
18376 generators and Python 3.7's context managers into Python 3.5.")
18377 ;; Dual licensed.
18378 (license (list license:expat license:asl2.0))))
18379
18380 (define-public python-async-timeout
18381 (package
18382 (name "python-async-timeout")
18383 (version "3.0.1")
18384 (source
18385 (origin
18386 (method url-fetch)
18387 (uri (pypi-uri "async-timeout" version))
18388 (sha256
18389 (base32
18390 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18391 (build-system python-build-system)
18392 (home-page "https://github.com/aio-libs/async_timeout/")
18393 (synopsis "Timeout context manager for asyncio programs")
18394 (description "@code{async-timeout} provides a timeout timeout context
18395 manager compatible with @code{asyncio}.")
18396 (license license:asl2.0)))
18397
18398 (define-public python-glob2
18399 (package
18400 (name "python-glob2")
18401 (version "0.7")
18402 (source
18403 (origin
18404 (method git-fetch)
18405 (uri (git-reference
18406 (url "https://github.com/miracle2k/python-glob2")
18407 (commit (string-append "v" version))))
18408 (file-name (git-file-name name version))
18409 (sha256
18410 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18411 (build-system python-build-system)
18412 (home-page "https://github.com/miracle2k/python-glob2/")
18413 (synopsis "Extended Version of the python buildin glob module")
18414 (description "This is an extended version of the Python
18415 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18416 adds:
18417
18418 @itemize
18419 @item The ability to capture the text matched by glob patterns, and return
18420 those matches alongside the file names.
18421 @item A recursive @code{**} globbing syntax, akin for example to the
18422 @code{globstar} option of Bash.
18423 @item The ability to replace the file system functions used, in order to glob
18424 on virtual file systems.
18425 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18426 @end itemize
18427
18428 Glob2 currently based on the glob code from Python 3.3.1.")
18429 (license license:bsd-2)))
18430
18431 (define-public python2-glob2
18432 (package-with-python2 python-glob2))
18433
18434 (define-public python-gipc
18435 (package
18436 (name "python-gipc")
18437 (version "0.6.0")
18438 (source
18439 (origin
18440 (method url-fetch)
18441 (uri (pypi-uri "gipc" version ".zip"))
18442 (sha256
18443 (base32
18444 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18445 (build-system python-build-system)
18446 (native-inputs
18447 `(("unzip" ,unzip)))
18448 (propagated-inputs
18449 `(("python-gevent" ,python-gevent)))
18450 (home-page "https://gehrcke.de/gipc/")
18451 (synopsis "Child process management in the context of gevent")
18452 (description "Usage of Python's multiprocessing package in a
18453 gevent-powered application may raise problems. With @code{gipc},
18454 process-based child processes can safely be created anywhere within a
18455 gevent-powered application.")
18456 (license license:expat)))
18457
18458 (define-public python2-gipc
18459 (package-with-python2 python-gipc))
18460
18461 (define-public python-beautifultable
18462 (package
18463 (name "python-beautifultable")
18464 (version "1.0.0")
18465 (source
18466 (origin
18467 (method url-fetch)
18468 (uri (pypi-uri "beautifultable" version))
18469 (sha256
18470 (base32
18471 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18472 (build-system python-build-system)
18473 (propagated-inputs
18474 `(("python-wcwidth" ,python-wcwidth)))
18475 (arguments
18476 `(#:phases
18477 (modify-phases %standard-phases
18478 (add-after 'unpack 'patch-setup.py
18479 (lambda _
18480 (substitute* "setup.py"
18481 (("setup\\(")
18482 "setup(\n test_suite=\"test\",")))))))
18483 (home-page "https://github.com/pri22296/beautifultable")
18484 (synopsis "Print ASCII tables for terminals")
18485 (description "@code{python-beautifultable} provides a class for easily
18486 printing tabular data in a visually appealing ASCII format to a terminal.
18487
18488 Features include, but are not limited to:
18489 @itemize
18490 @item Full customization of the look and feel of the table
18491 @item Row and column accessors.
18492 @item Full support for colors using ANSI sequences or any library.
18493 @item Plenty of predefined styles and option to create custom ones.
18494 @item Support for Unicode characters.
18495 @item Supports streaming table when data is slow to retrieve.
18496 @end itemize")
18497 (license license:expat)))
18498
18499 (define-public python-globber
18500 (package
18501 (name "python-globber")
18502 (version "0.2.1")
18503 (source
18504 (origin
18505 (method git-fetch)
18506 (uri (git-reference
18507 (url "https://github.com/asharov/globber")
18508 (commit version)))
18509 (file-name (git-file-name name version))
18510 (sha256
18511 (base32
18512 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18513 (build-system python-build-system)
18514 (home-page "https://github.com/asharov/globber")
18515 (synopsis "Library for string matching with glob patterns")
18516 (description
18517 "Globber is a Python library for matching file names against glob patterns.
18518 In contrast to other glob-matching libraries, it matches arbitrary strings and
18519 doesn't require the matched names to be existing files. In addition, it
18520 supports the globstar @code{**} operator to match an arbitrary number of
18521 path components.")
18522 (license license:asl2.0)))
18523
18524 (define-public python-git-hammer
18525 (package
18526 (name "python-git-hammer")
18527 (version "0.3.1")
18528 (source
18529 (origin
18530 (method git-fetch)
18531 (uri (git-reference
18532 (url "https://github.com/asharov/git-hammer")
18533 (commit version)))
18534 (file-name (git-file-name name version))
18535 (sha256
18536 (base32
18537 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18538 (build-system python-build-system)
18539 (arguments
18540 `(#:phases
18541 (modify-phases %standard-phases
18542 (add-after 'unpack 'patch-setup.py
18543 (lambda _
18544 (substitute* "setup.py"
18545 (("setup\\(")
18546 "setup(\n test_suite=\"test\",")))))))
18547 (propagated-inputs
18548 `(("python-beautifultable" ,python-beautifultable)
18549 ("python-dateutil" ,python-dateutil)
18550 ("python-gitpython" ,python-gitpython)
18551 ("python-globber" ,python-globber)
18552 ("python-matplotlib" ,python-matplotlib)
18553 ("python-sqlalchemy" ,python-sqlalchemy)
18554 ("python-sqlalchemy-utils"
18555 ,python-sqlalchemy-utils)))
18556 (home-page "https://github.com/asharov/git-hammer")
18557 (synopsis "Provide statistics for git repositories")
18558 (description
18559 "Git Hammer is a statistics tool for projects in git repositories.
18560 Its major feature is tracking the number of lines authored by each person for every
18561 commit, but it also includes some other useful statistics.")
18562 (license license:asl2.0)))
18563
18564 (define-public python-fusepy
18565 (package
18566 (name "python-fusepy")
18567 (version "2.0.4")
18568 (source
18569 (origin
18570 (method url-fetch)
18571 (uri (pypi-uri "fusepy" version))
18572 (sha256
18573 (base32
18574 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18575 (build-system python-build-system)
18576 (arguments
18577 `(#:phases
18578 (modify-phases %standard-phases
18579 (add-before 'build 'set-library-file-name
18580 (lambda* (#:key inputs #:allow-other-keys)
18581 (let ((fuse (assoc-ref inputs "fuse")))
18582 (substitute* "fuse.py"
18583 (("find_library\\('fuse'\\)")
18584 (string-append "'" fuse "/lib/libfuse.so'")))
18585 #t))))))
18586 (propagated-inputs
18587 `(("fuse" ,fuse)))
18588 (home-page "https://github.com/fusepy/fusepy")
18589 (synopsis "Simple ctypes bindings for FUSE")
18590 (description "Python module that provides a simple interface to FUSE and
18591 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18592 (license license:isc)))
18593
18594 (define-public python2-fusepy
18595 (package-with-python2 python-fusepy))
18596
18597 (define-public python-fusepyng
18598 (package
18599 (name "python-fusepyng")
18600 (version "1.0.7")
18601 (source
18602 (origin
18603 (method url-fetch)
18604 (uri (pypi-uri "fusepyng" version))
18605 (sha256
18606 (base32
18607 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18608 (build-system python-build-system)
18609 (arguments
18610 '(#:phases
18611 (modify-phases %standard-phases
18612 (add-after 'unpack 'set-libfuse-path
18613 (lambda* (#:key inputs #:allow-other-keys)
18614 (let ((fuse (assoc-ref inputs "fuse")))
18615 (substitute* "fusepyng.py"
18616 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18617 (string-append "\"" fuse "/lib/libfuse.so\""))))
18618 #t)))))
18619 (inputs
18620 `(("fuse" ,fuse)))
18621 (propagated-inputs
18622 `(("python-paramiko" ,python-paramiko)))
18623 (home-page "https://github.com/rianhunter/fusepyng")
18624 (synopsis "Simple ctypes bindings for FUSE")
18625 (description "@code{fusepyng} is a Python module that provides a simple
18626 interface to FUSE on various operating systems. It's just one file and is
18627 implemented using @code{ctypes}.")
18628 (license license:isc)))
18629
18630 (define-public python2-gdrivefs
18631 (package
18632 (name "python2-gdrivefs")
18633 (version "0.14.9")
18634 (source
18635 (origin
18636 (method url-fetch)
18637 (uri (pypi-uri "gdrivefs" version))
18638 (sha256
18639 (base32
18640 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18641 (build-system python-build-system)
18642 (arguments
18643 `(#:python ,python-2
18644 #:phases
18645 (modify-phases %standard-phases
18646 (add-before 'build 'patch-setup-py
18647 (lambda _
18648 ;; Update requirements from dependency==version
18649 ;; to dependency>=version
18650 (substitute* "gdrivefs/resources/requirements.txt"
18651 (("==") ">="))
18652 #t)))))
18653 (native-inputs
18654 `(("python2-gipc" ,python2-gipc)
18655 ("python2-gevent" ,python2-gevent)
18656 ("python2-greenlet" ,python2-greenlet)
18657 ("python2-httplib2" ,python2-httplib2)
18658 ("python2-uritemplate" ,python2-uritemplate)
18659 ("python2-oauth2client" ,python2-oauth2client)
18660 ("python2-six" ,python2-six)))
18661 (propagated-inputs
18662 `(("python2-dateutil" ,python2-dateutil)
18663 ("python2-fusepy" ,python2-fusepy)
18664 ("python2-google-api-client" ,python2-google-api-client)))
18665 (home-page "https://github.com/dsoprea/GDriveFS")
18666 (synopsis "Mount Google Drive as a local file system")
18667 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18668 under Python 2.7.")
18669 (license license:gpl2)))
18670
18671 (define-public python-userspacefs
18672 (package
18673 (name "python-userspacefs")
18674 (version "1.0.13")
18675 (source
18676 (origin
18677 (method url-fetch)
18678 (uri (pypi-uri "userspacefs" version))
18679 (sha256
18680 (base32
18681 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18682 (build-system python-build-system)
18683 (propagated-inputs
18684 `(("python-fusepyng" ,python-fusepyng)))
18685 (home-page "https://github.com/rianhunter/userspacefs")
18686 (synopsis "User-space file systems for Python")
18687 (description
18688 "@code{userspacefs} is a library that allows you to easily write
18689 user-space file systems in Python.")
18690 (license license:gpl3+)))
18691
18692 (define-public pybind11
18693 (package
18694 (name "pybind11")
18695 (version "2.4.3")
18696 (source (origin
18697 (method git-fetch)
18698 (uri (git-reference
18699 (url "https://github.com/pybind/pybind11")
18700 (commit (string-append "v" version))))
18701 (sha256
18702 (base32
18703 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18704 (file-name (git-file-name name version))))
18705 (build-system cmake-build-system)
18706 (native-inputs
18707 `(("python" ,python-wrapper)
18708
18709 ;; The following dependencies are used for tests.
18710 ("python-pytest" ,python-pytest)
18711 ("catch" ,catch-framework2-1)
18712 ("eigen" ,eigen)))
18713 (arguments
18714 `(#:configure-flags
18715 (list (string-append "-DCATCH_INCLUDE_DIR="
18716 (assoc-ref %build-inputs "catch")
18717 "/include/catch"))
18718
18719 #:phases (modify-phases %standard-phases
18720 (add-after 'install 'install-python
18721 (lambda* (#:key outputs #:allow-other-keys)
18722 (let ((out (assoc-ref outputs "out")))
18723 (with-directory-excursion "../source"
18724 (setenv "PYBIND11_USE_CMAKE" "yes")
18725 (invoke "python" "setup.py" "install"
18726 "--single-version-externally-managed"
18727 "--root=/"
18728 (string-append "--prefix=" out)))))))
18729
18730 #:test-target "check"))
18731 (home-page "https://github.com/pybind/pybind11/")
18732 (synopsis "Seamless operability between C++11 and Python")
18733 (description
18734 "@code{pybind11} is a lightweight header-only library that exposes C++
18735 types in Python and vice versa, mainly to create Python bindings of existing
18736 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18737 library: to minimize boilerplate code in traditional extension modules by
18738 inferring type information using compile-time introspection.")
18739 (license license:bsd-3)))
18740
18741 (define-public python-fasteners
18742 (package
18743 (name "python-fasteners")
18744 (version "0.15")
18745 (source
18746 (origin
18747 (method url-fetch)
18748 (uri (pypi-uri "fasteners" version))
18749 (sha256
18750 (base32
18751 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18752 (build-system python-build-system)
18753 (propagated-inputs
18754 `(("python-monotonic" ,python-monotonic)
18755 ("python-six" ,python-six)))
18756 (native-inputs
18757 `(("python-testtools" ,python-testtools)))
18758 (home-page "https://github.com/harlowja/fasteners")
18759 (synopsis "Python package that provides useful locks")
18760 (description
18761 "This package provides a Python program that provides following locks:
18762
18763 @itemize
18764 @item Locking decorator
18765 @item Reader-writer locks
18766 @item Inter-process locks
18767 @item Generic helpers
18768 @end itemize\n")
18769 (properties `((python2-variant . ,(delay python2-fasteners))))
18770 (license license:asl2.0)))
18771
18772 (define-public python2-fasteners
18773 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18774 (package
18775 (inherit base)
18776 (propagated-inputs
18777 `(("python2-futures" ,python2-futures)
18778 ,@(package-propagated-inputs base))))))
18779
18780 (define-public python-requests-file
18781 (package
18782 (name "python-requests-file")
18783 (version "1.4.3")
18784 (source
18785 (origin
18786 (method url-fetch)
18787 (uri (pypi-uri "requests-file" version))
18788 (sha256
18789 (base32
18790 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18791 (build-system python-build-system)
18792 (propagated-inputs
18793 `(("python-requests" ,python-requests)
18794 ("python-six" ,python-six)))
18795 (home-page
18796 "https://github.com/dashea/requests-file")
18797 (synopsis "File transport adapter for Requests")
18798 (description
18799 "Requests-File is a transport adapter for use with the Requests Python
18800 library to allow local file system access via @code{file://} URLs.")
18801 (license license:asl2.0)))
18802
18803 (define-public python2-requests-file
18804 (package-with-python2 python-requests-file))
18805
18806 (define-public python-identify
18807 (package
18808 (name "python-identify")
18809 (version "1.4.25")
18810 (source
18811 (origin
18812 ;; There are no tests in the PyPI tarball.
18813 (method git-fetch)
18814 (uri (git-reference
18815 (url "https://github.com/chriskuehl/identify")
18816 (commit (string-append "v" version))))
18817 (file-name (git-file-name name version))
18818 (sha256
18819 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18820 (build-system python-build-system)
18821 (arguments
18822 `(#:phases
18823 (modify-phases %standard-phases
18824 (replace 'check
18825 (lambda _
18826 (invoke "pytest" "-vv"))))))
18827 (native-inputs
18828 `(("python-coverage" ,python-coverage)
18829 ("python-pytest" ,python-pytest)))
18830 (propagated-inputs
18831 `(("python-editdistance" ,python-editdistance)))
18832 (home-page "https://github.com/chriskuehl/identify")
18833 (synopsis "File identification library for Python")
18834 (description
18835 "@code{identify} is a file identification library for Python. Given
18836 a file (or some information about a file), return a set of standardized tags
18837 identifying what the file is.")
18838 (license license:expat)))
18839
18840 (define-public python-tldextract
18841 (package
18842 (name "python-tldextract")
18843 (version "2.2.0")
18844 (source
18845 (origin
18846 (method url-fetch)
18847 (uri (pypi-uri "tldextract" version))
18848 (sha256
18849 (base32
18850 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18851 (build-system python-build-system)
18852 (native-inputs
18853 `(("python-pytest" ,python-pytest)
18854 ("python-responses" ,python-responses)))
18855 (propagated-inputs
18856 `(("python-idna" ,python-idna)
18857 ("python-requests" ,python-requests)
18858 ("python-requests-file" ,python-requests-file)))
18859 (home-page
18860 "https://github.com/john-kurkowski/tldextract")
18861 (synopsis
18862 "Separate the TLD from the registered domain and subdomains of a URL")
18863 (description
18864 "TLDExtract accurately separates the TLD from the registered domain and
18865 subdomains of a URL, using the Public Suffix List. By default, this includes
18866 the public ICANN TLDs and their exceptions. It can optionally support the
18867 Public Suffix List's private domains as well.")
18868 (license license:bsd-3)))
18869
18870 (define-public python2-tldextract
18871 (package-with-python2 python-tldextract))
18872
18873 (define-public python-nodeenv
18874 (package
18875 (name "python-nodeenv")
18876 (version "1.4.0")
18877 (source
18878 (origin
18879 ;; There's no tarball in PyPI.
18880 (method git-fetch)
18881 (uri (git-reference
18882 (url "https://github.com/ekalinin/nodeenv")
18883 (commit version)))
18884 (file-name (git-file-name name version))
18885 (sha256
18886 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18887 (build-system python-build-system)
18888 (arguments
18889 `(#:phases
18890 (modify-phases %standard-phases
18891 (replace 'check
18892 (lambda _
18893 ;; This test fails. It tries to open a network socket.
18894 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18895 (native-inputs
18896 `(("python-coverage" ,python-coverage)
18897 ("python-mock" ,python-mock)
18898 ("python-pytest" ,python-pytest)))
18899 (home-page "https://ekalinin.github.io/nodeenv/")
18900 (synopsis "Create isolated node.js environments")
18901 (description
18902 "Nodeenv (node.js virtual environment) is a tool to create isolated
18903 node.js environments. It creates an environment that has its own installation
18904 directories, that doesn't share libraries with other node.js virtual
18905 environments.")
18906 (license license:bsd-3)))
18907
18908 (define-public python-pynamecheap
18909 (package
18910 (name "python-pynamecheap")
18911 (version "0.0.3")
18912 (source
18913 (origin
18914 (method url-fetch)
18915 (uri (pypi-uri "PyNamecheap" version))
18916 (sha256
18917 (base32
18918 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18919 (build-system python-build-system)
18920 (propagated-inputs
18921 `(("python-requests" ,python-requests)))
18922 (home-page
18923 "https://github.com/Bemmu/PyNamecheap")
18924 (synopsis
18925 "Namecheap API client in Python")
18926 (description
18927 "PyNamecheap is a Namecheap API client in Python.")
18928 (license license:expat)))
18929
18930 (define-public python2-pynamecheap
18931 (package-with-python2 python-pynamecheap))
18932
18933 (define-public python-dns-lexicon
18934 (package
18935 (name "python-dns-lexicon")
18936 (version "2.4.0")
18937 (source
18938 (origin
18939 (method url-fetch)
18940 (uri (pypi-uri "dns-lexicon" version))
18941 (sha256
18942 (base32
18943 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18944 (build-system python-build-system)
18945 (arguments
18946 `(#:tests? #f)) ;requires internet access
18947 (propagated-inputs
18948 `(("python-future" ,python-future)
18949 ("python-pynamecheap" ,python-pynamecheap)
18950 ("python-requests" ,python-requests)
18951 ("python-tldextract" ,python-tldextract)
18952 ("python-urllib3" ,python-urllib3)))
18953 (home-page "https://github.com/AnalogJ/lexicon")
18954 (synopsis
18955 "Manipulate DNS records on various DNS providers")
18956 (description
18957 "Lexicon provides a way to manipulate DNS records on multiple DNS
18958 providers in a standardized way. It has a CLI but it can also be used as a
18959 Python library. It was designed to be used in automation, specifically with
18960 Let's Encrypt.")
18961 (license license:expat)))
18962
18963 (define-public python2-dns-lexicon
18964 (package-with-python2 python-dns-lexicon))
18965
18966 (define-public python-cfgv
18967 (package
18968 (name "python-cfgv")
18969 (version "3.1.0")
18970 (source
18971 (origin
18972 ;; There are no tests in the PyPI tarball.
18973 (method git-fetch)
18974 (uri (git-reference
18975 (url "https://github.com/asottile/cfgv")
18976 (commit (string-append "v" version))))
18977 (file-name (git-file-name name version))
18978 (sha256
18979 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18980 (build-system python-build-system)
18981 (arguments
18982 `(#:phases
18983 (modify-phases %standard-phases
18984 (replace 'check
18985 (lambda _
18986 (invoke "pytest" "-vv"))))))
18987 (native-inputs
18988 `(("python-covdefaults" ,python-covdefaults)
18989 ("python-coverage" ,python-coverage)
18990 ("python-pytest" ,python-pytest)))
18991 (home-page "https://github.com/asottile/cfgv")
18992 (synopsis "Configuration validation library")
18993 (description
18994 "This library helps to validate configuration files and produce human
18995 readable error messages.")
18996 (license license:expat)))
18997
18998 (define-public python-commandlines
18999 (package
19000 (name "python-commandlines")
19001 (version "0.4.1")
19002 (source
19003 (origin
19004 (method url-fetch)
19005 (uri (pypi-uri "commandlines" version))
19006 (sha256
19007 (base32
19008 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
19009 (build-system python-build-system)
19010 (home-page "https://github.com/chrissimpkins/commandlines")
19011 (synopsis "Command line argument to object parsing library")
19012 (description
19013 "@code{Commandlines} is a Python library for command line application
19014 development that supports command line argument parsing, command string
19015 validation testing and application logic.")
19016 (license license:expat)))
19017
19018 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19019 ;; python-numba. They have a very unflexible relationship.
19020 (define-public python-numba
19021 (package
19022 (name "python-numba")
19023 (version "0.51.2")
19024 (source
19025 (origin
19026 (method url-fetch)
19027 (uri (pypi-uri "numba" version))
19028 (sha256
19029 (base32
19030 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19031 (build-system python-build-system)
19032 (arguments
19033 `(#:phases
19034 (modify-phases %standard-phases
19035 (add-after 'unpack 'disable-proprietary-features
19036 (lambda _
19037 (setenv "NUMBA_DISABLE_HSA" "1")
19038 (setenv "NUMBA_DISABLE_CUDA" "1")
19039 #t))
19040 (replace 'check
19041 (lambda* (#:key inputs outputs #:allow-other-keys)
19042 (add-installed-pythonpath inputs outputs)
19043 ;; Something is wrong with the PYTHONPATH when running the
19044 ;; tests from the build directory, as it complains about not being
19045 ;; able to import certain modules.
19046 (with-directory-excursion "/tmp"
19047 (setenv "HOME" (getcwd))
19048 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19049 (propagated-inputs
19050 `(("python-llvmlite" ,python-llvmlite)
19051 ("python-numpy" ,python-numpy)
19052 ("python-singledispatch" ,python-singledispatch)))
19053 (native-inputs ;for tests
19054 `(("python-jinja2" ,python-jinja2)
19055 ("python-pygments" ,python-pygments)))
19056 (home-page "https://numba.pydata.org")
19057 (synopsis "Compile Python code using LLVM")
19058 (description "Numba gives you the power to speed up your applications with
19059 high performance functions written directly in Python. With a few
19060 annotations, array-oriented and math-heavy Python code can be just-in-time
19061 compiled to native machine instructions, similar in performance to C, C++ and
19062 Fortran, without having to switch languages or Python interpreters.
19063
19064 Numba works by generating optimized machine code using the LLVM compiler
19065 infrastructure at import time, runtime, or statically (using the included pycc
19066 tool).")
19067 (license license:bsd-3)))
19068
19069 (define-public python-numcodecs
19070 (package
19071 (name "python-numcodecs")
19072 (version "0.6.4")
19073 (source
19074 (origin
19075 (method url-fetch)
19076 (uri (pypi-uri "numcodecs" version))
19077 (sha256
19078 (base32
19079 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19080 (build-system python-build-system)
19081 (propagated-inputs
19082 `(("python-numpy" ,python-numpy)
19083 ("python-msgpack" ,python-msgpack)))
19084 (native-inputs
19085 `(("python-pytest" ,python-pytest)
19086 ("python-setuptools-scm" ,python-setuptools-scm)))
19087 (home-page "https://github.com/zarr-developers/numcodecs")
19088 (synopsis "Buffer compression and transformation codecs")
19089 (description
19090 "This Python package provides buffer compression and transformation
19091 codecs for use in data storage and communication applications.")
19092 (license license:expat)))
19093
19094 (define-public python-asciitree
19095 (package
19096 (name "python-asciitree")
19097 (version "0.3.3")
19098 (source
19099 (origin
19100 (method url-fetch)
19101 (uri (pypi-uri "asciitree" version))
19102 (sha256
19103 (base32
19104 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19105 (build-system python-build-system)
19106 (home-page "https://github.com/mbr/asciitree")
19107 (synopsis "Draws ASCII trees")
19108 (description "This package draws tree structures using characters.")
19109 (license license:expat)))
19110
19111 (define-public python-zarr
19112 (package
19113 (name "python-zarr")
19114 (version "2.4.0")
19115 (source
19116 (origin
19117 (method url-fetch)
19118 (uri (pypi-uri "zarr" version))
19119 (sha256
19120 (base32
19121 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19122 (build-system python-build-system)
19123 (arguments
19124 `(#:phases
19125 (modify-phases %standard-phases
19126 (add-after 'unpack 'disable-service-tests
19127 (lambda _
19128 (setenv "ZARR_TEST_ABS" "0")
19129 (setenv "ZARR_TEST_MONGO" "0")
19130 (setenv "ZARR_TEST_REDIS" "0")
19131 #t))
19132 (replace 'check
19133 (lambda _
19134 (invoke "pytest" "-vv" "-k" "not lmdb")
19135 #t)))))
19136 (propagated-inputs
19137 `(("python-asciitree" ,python-asciitree)
19138 ("python-fasteners" ,python-fasteners)
19139 ("python-numcodecs" ,python-numcodecs)
19140 ("python-numpy" ,python-numpy)))
19141 (native-inputs
19142 `(("python-pytest" ,python-pytest)
19143 ("python-setuptools-scm" ,python-setuptools-scm)))
19144 (home-page "https://github.com/zarr-developers/zarr-python")
19145 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19146 (description
19147 "This package provides an implementation of chunked, compressed,
19148 N-dimensional arrays for Python.")
19149 (license license:expat)))
19150
19151 (define-public python-anndata
19152 (package
19153 (name "python-anndata")
19154 (version "0.7.1")
19155 (source
19156 (origin
19157 (method url-fetch)
19158 (uri (pypi-uri "anndata" version))
19159 (sha256
19160 (base32
19161 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19162 (build-system python-build-system)
19163 (arguments
19164 `(#:phases
19165 (modify-phases %standard-phases
19166 (add-after 'unpack 'delete-inconvenient-tests
19167 (lambda _
19168 ;; This test depends on python-scikit-learn.
19169 (delete-file "anndata/tests/test_inplace_subset.py")
19170 #t))
19171 (delete 'check)
19172 (add-after 'install 'check
19173 (lambda* (#:key inputs outputs #:allow-other-keys)
19174 (add-installed-pythonpath inputs outputs)
19175 (invoke "pytest" "-vv"))))))
19176 (propagated-inputs
19177 `(("python-h5py" ,python-h5py)
19178 ("python-importlib-metadata" ,python-importlib-metadata)
19179 ("python-natsort" ,python-natsort)
19180 ("python-numcodecs" ,python-numcodecs)
19181 ("python-packaging" ,python-packaging)
19182 ("python-pandas" ,python-pandas)
19183 ("python-scipy" ,python-scipy)
19184 ("python-zarr" ,python-zarr)))
19185 (native-inputs
19186 `(("python-joblib" ,python-joblib)
19187 ("python-pytest" ,python-pytest)
19188 ("python-setuptools-scm" ,python-setuptools-scm)))
19189 (home-page "https://github.com/theislab/anndata")
19190 (synopsis "Annotated data for data analysis pipelines")
19191 (description "Anndata is a package for simple (functional) high-level APIs
19192 for data analysis pipelines. In this context, it provides an efficient,
19193 scalable way of keeping track of data together with learned annotations and
19194 reduces the code overhead typically encountered when using a mostly
19195 object-oriented library such as @code{scikit-learn}.")
19196 (license license:bsd-3)))
19197
19198 (define-public python-dill
19199 (package
19200 (name "python-dill")
19201 (version "0.3.1.1")
19202 (source
19203 (origin
19204 (method url-fetch)
19205 (uri (pypi-uri "dill" version))
19206 (sha256
19207 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19208 (build-system python-build-system)
19209 (arguments
19210 `(#:phases
19211 (modify-phases %standard-phases
19212 (replace 'check
19213 (lambda _
19214 (with-directory-excursion "/tmp"
19215 (invoke "nosetests" "-v"))
19216 #t)))))
19217 (native-inputs
19218 `(("python-nose" ,python-nose)))
19219 (home-page "https://pypi.org/project/dill/")
19220 (synopsis "Serialize all of Python")
19221 (description "Dill extends Python's @code{pickle} module for serializing
19222 and de-serializing Python objects to the majority of the built-in Python
19223 types. Dill provides the user the same interface as the @code{pickle} module,
19224 and also includes some additional features. In addition to pickling Python
19225 objects, @code{dill} provides the ability to save the state of an interpreter
19226 session in a single command. Hence, it would be feasible to save a
19227 interpreter session, close the interpreter, ship the pickled file to another
19228 computer, open a new interpreter, unpickle the session and thus continue from
19229 the saved state of the original interpreter session.")
19230 (license license:bsd-3)))
19231
19232 (define-public python-multiprocess
19233 (package
19234 (name "python-multiprocess")
19235 (version "0.70.9")
19236 (source
19237 (origin
19238 (method url-fetch)
19239 (uri (pypi-uri "multiprocess" version))
19240 (sha256
19241 (base32
19242 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19243 (build-system python-build-system)
19244 (arguments
19245 `(#:phases
19246 (modify-phases %standard-phases
19247 (add-after 'unpack 'disable-broken-tests
19248 (lambda _
19249 ;; This test is broken as there is no keyboard interrupt.
19250 (substitute* "py3.7/multiprocess/tests/__init__.py"
19251 (("^(.*)def test_wait_result"
19252 line indent)
19253 (string-append indent
19254 "@unittest.skip(\"Disabled by Guix\")\n"
19255 line)))
19256 #t))
19257 ;; Tests must be run after installation.
19258 (delete 'check)
19259 (add-after 'install 'check
19260 (lambda* (#:key inputs outputs #:allow-other-keys)
19261 (add-installed-pythonpath inputs outputs)
19262 (invoke "python" "-m" "multiprocess.tests")
19263 #t)))))
19264 (propagated-inputs
19265 `(("python-dill" ,python-dill)))
19266 (home-page "https://pypi.org/project/multiprocess/")
19267 (synopsis "Multiprocessing and multithreading in Python")
19268 (description
19269 "This package is a fork of the multiprocessing Python package, a package
19270 which supports the spawning of processes using the API of the standard
19271 library's @code{threading} module.")
19272 (license license:bsd-3)))
19273
19274 (define-public python-toolz
19275 (package
19276 (name "python-toolz")
19277 (version "0.9.0")
19278 (source
19279 (origin
19280 (method url-fetch)
19281 (uri (pypi-uri "toolz" version))
19282 (sha256
19283 (base32
19284 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19285 (build-system python-build-system)
19286 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19287 ;; unregistered loader type"
19288 (arguments '(#:tests? #f))
19289 (home-page "https://github.com/pytoolz/toolz/")
19290 (synopsis "List processing tools and functional utilities")
19291 (description
19292 "This package provides a set of utility functions for iterators,
19293 functions, and dictionaries.")
19294 (license license:bsd-3)))
19295
19296 (define-public python2-toolz
19297 (package-with-python2 python-toolz))
19298
19299 (define-public python-cytoolz
19300 (package
19301 (name "python-cytoolz")
19302 (version "0.9.0.1")
19303 (source
19304 (origin
19305 (method url-fetch)
19306 (uri (pypi-uri "cytoolz" version))
19307 (sha256
19308 (base32
19309 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19310 (build-system python-build-system)
19311 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19312 ;; 'exceptions'"
19313 (arguments '(#:tests? #f))
19314 (propagated-inputs
19315 `(("python-toolz" ,python-toolz)))
19316 (native-inputs
19317 `(("python-cython" ,python-cython)))
19318 (home-page "https://github.com/pytoolz/cytoolz")
19319 (synopsis "High performance functional utilities")
19320 (description
19321 "The cytoolz package implements the same API as provided by toolz. The
19322 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19323 that is accessible to other projects developed in Cython.")
19324 (license license:bsd-3)))
19325
19326 (define-public python-sortedcontainers
19327 (package
19328 (name "python-sortedcontainers")
19329 (version "2.1.0")
19330 (source
19331 (origin
19332 (method url-fetch)
19333 (uri (pypi-uri "sortedcontainers" version))
19334 (sha256
19335 (base32
19336 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19337 (build-system python-build-system)
19338 (arguments
19339 ;; FIXME: Tests require many extra dependencies, and would introduce
19340 ;; a circular dependency on hypothesis, which uses this package.
19341 '(#:tests? #f))
19342 (propagated-inputs
19343 `(("python-appdirs" ,python-appdirs)
19344 ("python-distlib" ,python-distlib)
19345 ("python-filelock" ,python-filelock)
19346 ("python-six" ,python-six-bootstrap)))
19347 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19348 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19349 (description
19350 "This package provides a sorted collections library, written in
19351 pure-Python.")
19352 (license license:asl2.0)))
19353
19354 (define-public python2-sortedcontainers
19355 (package-with-python2 python-sortedcontainers))
19356
19357 (define-public python-cloudpickle
19358 (package
19359 (name "python-cloudpickle")
19360 (version "1.3.0")
19361 (source
19362 (origin
19363 (method url-fetch)
19364 (uri (pypi-uri "cloudpickle" version))
19365 (sha256
19366 (base32
19367 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19368 (build-system python-build-system)
19369 (arguments
19370 '(#:phases (modify-phases %standard-phases
19371 (add-before 'check 'do-not-override-PYTHONPATH
19372 (lambda _
19373 ;; Append to PYTHONPATH instead of overriding it so
19374 ;; that dependencies from Guix can be found.
19375 (substitute* "tests/testutils.py"
19376 (("env\\['PYTHONPATH'\\] = pythonpath")
19377 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19378 #t))
19379 (replace 'check
19380 (lambda* (#:key tests? #:allow-other-keys)
19381 (if tests?
19382 (invoke "pytest" "-s" "-vv")
19383 (format #t "test suite not run~%"))
19384 #t)))))
19385 (native-inputs
19386 `(;; For tests.
19387 ("python-psutil" ,python-psutil)
19388 ("python-pytest" ,python-pytest)
19389 ("python-tornado" ,python-tornado)))
19390 (home-page "https://github.com/cloudpipe/cloudpickle")
19391 (synopsis "Extended pickling support for Python objects")
19392 (description
19393 "Cloudpickle makes it possible to serialize Python constructs not
19394 supported by the default pickle module from the Python standard library. It
19395 is especially useful for cluster computing where Python expressions are
19396 shipped over the network to execute on remote hosts, possibly close to the
19397 data.")
19398 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19399 (license license:bsd-3)))
19400
19401 (define-public python2-cloudpickle
19402 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19403 (package
19404 (inherit base)
19405 (native-inputs
19406 `(("python-mock" ,python2-mock)
19407 ,@(package-native-inputs base)))
19408 (propagated-inputs
19409 `(("python-futures" ,python2-futures)
19410 ,@(package-propagated-inputs base))))))
19411
19412 (define-public python-locket
19413 (package
19414 (name "python-locket")
19415 (version "0.2.0")
19416 (source
19417 (origin
19418 (method url-fetch)
19419 (uri (pypi-uri "locket" version))
19420 (sha256
19421 (base32
19422 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19423 (build-system python-build-system)
19424 (home-page "https://github.com/mwilliamson/locket.py")
19425 (synopsis "File-based locks for Python")
19426 (description
19427 "Locket implements a lock that can be used by multiple processes provided
19428 they use the same path.")
19429 (license license:bsd-2)))
19430
19431 (define-public python2-locket
19432 (package-with-python2 python-locket))
19433
19434 (define-public python-blosc
19435 (package
19436 (name "python-blosc")
19437 (version "1.5.1")
19438 (source
19439 (origin
19440 (method url-fetch)
19441 (uri (pypi-uri "blosc" version))
19442 (sha256
19443 (base32
19444 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19445 (build-system python-build-system)
19446 ;; FIXME: all tests pass, but then this error is printed:
19447 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19448 (arguments '(#:tests? #f))
19449 (propagated-inputs
19450 `(("python-numpy" ,python-numpy)))
19451 (home-page "https://github.com/blosc/python-blosc")
19452 (synopsis "Python wrapper for the Blosc data compressor library")
19453 (description "Blosc is a high performance compressor optimized for binary
19454 data. It has been designed to transmit data to the processor cache faster
19455 than the traditional, non-compressed, direct memory fetch approach via a
19456 @code{memcpy()} system call.
19457
19458 Blosc works well for compressing numerical arrays that contains data with
19459 relatively low entropy, like sparse data, time series, grids with
19460 regular-spaced values, etc.
19461
19462 This Python package wraps the Blosc library.")
19463 (license license:bsd-3)))
19464
19465 (define-public python2-blosc
19466 (package-with-python2 python-blosc))
19467
19468 (define-public python-partd
19469 (package
19470 (name "python-partd")
19471 (version "0.3.9")
19472 (source
19473 (origin
19474 (method url-fetch)
19475 (uri (pypi-uri "partd" version))
19476 (sha256
19477 (base32
19478 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19479 (build-system python-build-system)
19480 (propagated-inputs
19481 `(("python-blosc" ,python-blosc)
19482 ("python-locket" ,python-locket)
19483 ("python-numpy" ,python-numpy)
19484 ("python-pandas" ,python-pandas)
19485 ("python-pyzmq" ,python-pyzmq)
19486 ("python-toolz" ,python-toolz)))
19487 (home-page "https://github.com/dask/partd/")
19488 (synopsis "Appendable key-value storage")
19489 (description "Partd stores key-value pairs. Values are raw bytes. We
19490 append on old values. Partd excels at shuffling operations.")
19491 (license license:bsd-3)))
19492
19493 (define-public python2-partd
19494 (package-with-python2 python-partd))
19495
19496 (define-public python-fsspec
19497 (package
19498 (name "python-fsspec")
19499 (version "0.6.1")
19500 (source
19501 (origin
19502 (method url-fetch)
19503 (uri (pypi-uri "fsspec" version))
19504 (sha256
19505 (base32
19506 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19507 (build-system python-build-system)
19508 (arguments '(#:tests? #f)) ; there are none
19509 (home-page "https://github.com/intake/filesystem_spec")
19510 (synopsis "File-system specification")
19511 (description "The purpose of this package is to produce a template or
19512 specification for a file-system interface, that specific implementations
19513 should follow, so that applications making use of them can rely on a common
19514 behavior and not have to worry about the specific internal implementation
19515 decisions with any given backend.")
19516 (license license:bsd-3)))
19517
19518 (define-public python-dask
19519 (package
19520 (name "python-dask")
19521 (version "2.14.0")
19522 (source
19523 (origin
19524 (method url-fetch)
19525 (uri (pypi-uri "dask" version))
19526 (sha256
19527 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19528 (build-system python-build-system)
19529 (arguments
19530 `(#:phases
19531 (modify-phases %standard-phases
19532 (add-after 'unpack 'disable-broken-tests
19533 (lambda _
19534 ;; This test is marked as xfail when pytest-xdist is used.
19535 (substitute* "dask/tests/test_threaded.py"
19536 (("def test_interrupt\\(\\)" m)
19537 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19538 m)))
19539 ;; This one fails with a type error:
19540 ;; TypeError: Already tz-aware, use tz_convert to convert.
19541 (substitute* "dask/dataframe/tests/test_shuffle.py"
19542 (("def test_set_index_timestamp\\(\\)" m)
19543 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19544 m)))
19545 #t))
19546 (replace 'check
19547 (lambda _ (invoke "pytest" "-vv"))))))
19548 (propagated-inputs
19549 `(("python-cloudpickle" ,python-cloudpickle)
19550 ("python-fsspec" ,python-fsspec)
19551 ("python-numpy" ,python-numpy)
19552 ("python-packaging" ,python-packaging)
19553 ("python-pandas" ,python-pandas)
19554 ("python-partd" ,python-partd)
19555 ("python-toolz" ,python-toolz)
19556 ("python-pyyaml" ,python-pyyaml)))
19557 (native-inputs
19558 `(("python-pytest" ,python-pytest)
19559 ("python-pytest-runner" ,python-pytest-runner)))
19560 (home-page "https://github.com/dask/dask/")
19561 (synopsis "Parallel computing with task scheduling")
19562 (description
19563 "Dask is a flexible parallel computing library for analytics. It
19564 consists of two components: dynamic task scheduling optimized for computation,
19565 and large data collections like parallel arrays, dataframes, and lists that
19566 extend common interfaces like NumPy, Pandas, or Python iterators to
19567 larger-than-memory or distributed environments. These parallel collections
19568 run on top of the dynamic task schedulers. ")
19569 (license license:bsd-3)))
19570
19571 (define-public python-ilinkedlist
19572 (package
19573 (name "python-ilinkedlist")
19574 (version "0.4.0")
19575 (source
19576 (origin
19577 (method url-fetch)
19578 (uri (pypi-uri "ilinkedlist" version))
19579 (sha256
19580 (base32
19581 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19582 (build-system python-build-system)
19583 (native-inputs `(("python-pytest" ,python-pytest)))
19584 (inputs `(("python" ,python)))
19585 (home-page "https://github.com/luther9/ilinkedlist-py")
19586 (synopsis "Immutable linked list library")
19587 (description
19588 "This is a implementation of immutable linked lists for Python. It
19589 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19590 Since a linked list is treated as immutable, it is hashable, and its length
19591 can be retrieved in constant time. Some of the terminology is inspired by
19592 LISP. It is possible to create an improper list by creating a @code{Pair}
19593 with a non-list @code{cdr}.")
19594 (license license:gpl3+)))
19595
19596 (define-public python-readlike
19597 (package
19598 (name "python-readlike")
19599 (version "0.1.3")
19600 (source
19601 (origin
19602 (method url-fetch)
19603 (uri (pypi-uri "readlike" version))
19604 (sha256
19605 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19606 (build-system python-build-system)
19607 (home-page "https://github.com/jangler/readlike")
19608 (synopsis "GNU Readline-like line editing module")
19609 (description
19610 "This Python module provides line editing functions similar to the default
19611 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19612 @code{readline} package, this one allows access to those capabilities in settings
19613 outside of a standard command-line interface. It is especially well-suited to
19614 interfacing with Urwid, due to a shared syntax for describing key inputs.
19615
19616 Currently, all stateless Readline commands are implemented. Yanking and history
19617 are not supported.")
19618 (license license:expat)))
19619
19620 (define-public python2-readlike
19621 (package-with-python2 python-readlike))
19622
19623 (define-public python-reparser
19624 (package
19625 (name "python-reparser")
19626 (version "1.4.3")
19627 (source
19628 (origin
19629 (method url-fetch)
19630 (uri (pypi-uri "ReParser" version))
19631 (sha256
19632 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19633 (build-system python-build-system)
19634 (home-page "https://github.com/xmikos/reparser")
19635 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19636 (description
19637 "This Python library provides a simple lexer/parser for inline markup based
19638 on regular expressions.")
19639 (license license:expat)))
19640
19641 (define-public python2-reparser
19642 (let ((reparser (package-with-python2
19643 (strip-python2-variant python-reparser))))
19644 (package (inherit reparser)
19645 (propagated-inputs
19646 `(("python2-enum34" ,python2-enum34)
19647 ,@(package-propagated-inputs reparser))))))
19648
19649 (define-public python-retrying
19650 (package
19651 (name "python-retrying")
19652 (version "1.3.3")
19653 (source
19654 (origin
19655 (method git-fetch)
19656 (uri (git-reference
19657 (url "https://github.com/rholder/retrying")
19658 (commit (string-append "v" version))))
19659 (file-name (git-file-name name version))
19660 (sha256
19661 (base32
19662 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19663 (build-system python-build-system)
19664 (propagated-inputs
19665 `(("python-six" ,python-six)))
19666 (home-page "https://github.com/rholder/retrying")
19667 (synopsis "Library for adding retry behavior")
19668 (description "Retrying is a general-purpose retrying library to simplify
19669 the task of adding retry behavior to just about anything.
19670
19671 Features:
19672
19673 @itemize
19674 @item Generic Decorator API.
19675 @item Specify stop condition (i.e. limit by number of attempts).
19676 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19677 @item Customize retrying on Exceptions.
19678 @item Customize retrying on expected returned result.
19679 @end itemize")
19680 (license license:asl2.0)))
19681
19682 (define-public python-precis-i18n
19683 (package
19684 (name "python-precis-i18n")
19685 (version "1.0.0")
19686 (source
19687 (origin
19688 (method url-fetch)
19689 (uri (pypi-uri "precis_i18n" version))
19690 (sha256
19691 (base32
19692 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19693 (build-system python-build-system)
19694 (home-page "https://github.com/byllyfish/precis_i18n")
19695 (synopsis "Implementation of the PRECIS framework")
19696 (description
19697 "This module implements the PRECIS Framework as described in RFC 8264,
19698 RFC 8265 and RFC 8266.")
19699 (license license:expat)))
19700
19701 (define-public python-absl-py
19702 (package
19703 (name "python-absl-py")
19704 (version "0.6.1")
19705 (source
19706 (origin
19707 (method url-fetch)
19708 (uri (pypi-uri "absl-py" version))
19709 (sha256
19710 (base32
19711 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19712 (build-system python-build-system)
19713 (propagated-inputs
19714 `(("python-six" ,python-six)))
19715 (home-page "https://github.com/abseil/abseil-py")
19716 (synopsis "Abseil Python common libraries")
19717 (description
19718 "This package provides the Abseil Python Common Libraries, a collection
19719 of Python libraries for building Python applications.")
19720 (license license:asl2.0)))
19721
19722 (define-public python-astor
19723 (package
19724 (name "python-astor")
19725 (version "0.7.1")
19726 (source
19727 (origin
19728 (method url-fetch)
19729 (uri (pypi-uri "astor" version))
19730 (sha256
19731 (base32
19732 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19733 (build-system python-build-system)
19734 ;; FIXME: There are two errors and two test failures.
19735 (arguments `(#:tests? #f))
19736 (home-page "https://github.com/berkerpeksag/astor")
19737 (synopsis "Read and write Python ASTs")
19738 (description "Astor is designed to allow easy manipulation of Python
19739 source via the Abstract Syntax Tree.")
19740 (license license:bsd-3)))
19741
19742 (define-public python2-astor
19743 (package-with-python2 python-astor))
19744
19745 (define-public python-astunparse
19746 (package
19747 (name "python-astunparse")
19748 (version "1.6.2")
19749 (source
19750 (origin
19751 (method url-fetch)
19752 (uri (pypi-uri "astunparse" version))
19753 (sha256
19754 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19755 (build-system python-build-system)
19756 (arguments '(#:tests? #f)) ; there are none
19757 (propagated-inputs
19758 `(("python-six" ,python-six)
19759 ("python-wheel" ,python-wheel)))
19760 (home-page "https://github.com/simonpercivall/astunparse")
19761 (synopsis "AST unparser for Python")
19762 (description "This package provides an AST unparser for Python. It is a
19763 factored out version of @code{unparse} found in the Python source
19764 distribution.")
19765 (license license:bsd-3)))
19766
19767 (define-public python-gast
19768 (package
19769 (name "python-gast")
19770 (version "0.3.3")
19771 (source
19772 (origin
19773 (method url-fetch)
19774 (uri (pypi-uri "gast" version))
19775 (sha256
19776 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19777 (build-system python-build-system)
19778 (propagated-inputs
19779 `(("python-astunparse" ,python-astunparse)))
19780 (home-page "https://pypi.org/project/gast/")
19781 (synopsis "Generic Python AST that abstracts the underlying Python version")
19782 (description
19783 "GAST provides a compatibility layer between the AST of various Python
19784 versions, as produced by @code{ast.parse} from the standard @code{ast}
19785 module.")
19786 (license license:bsd-3)))
19787
19788 (define-public python-wikidata
19789 (package
19790 (name "python-wikidata")
19791 (version "0.6.1")
19792 (source
19793 (origin
19794 (method url-fetch)
19795 (uri (pypi-uri "Wikidata" version))
19796 (sha256
19797 (base32
19798 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19799 (build-system python-build-system)
19800 (propagated-inputs
19801 `(("python-babel" ,python-babel)))
19802 (home-page "https://github.com/dahlia/wikidata")
19803 (synopsis "Wikidata client library")
19804 (description
19805 "This package provides a Python interface to
19806 @url{https://www.wikidata.org/, Wikidata}.")
19807 (properties '((upstream-name . "Wikidata")))
19808 (license license:gpl3+)))
19809
19810 (define-public python-doctest-ignore-unicode
19811 (package
19812 (name "python-doctest-ignore-unicode")
19813 (version "0.1.2")
19814 (source
19815 (origin
19816 (method url-fetch)
19817 (uri (pypi-uri "doctest-ignore-unicode" version))
19818 (sha256
19819 (base32
19820 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19821 (build-system python-build-system)
19822 (native-inputs
19823 `(("python-nose" ,python-nose)))
19824 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19825 (synopsis "Ignore Unicode literal prefixes in doctests")
19826 (description
19827 "This package adds support for a flag to ignore Unicode literal prefixes
19828 in doctests.")
19829 (license license:asl2.0)))
19830
19831 (define-public python-attr
19832 (package
19833 (name "python-attr")
19834 (version "0.3.1")
19835 (source
19836 (origin
19837 (method url-fetch)
19838 (uri (pypi-uri "attr" version))
19839 (sha256
19840 (base32
19841 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19842 (build-system python-build-system)
19843 (home-page "https://github.com/denis-ryzhkov/attr")
19844 (synopsis "Decorator for attributes of target function or class")
19845 (description "Simple decorator to set attributes of target function or
19846 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19847 (license license:expat)))
19848
19849 (define-public python-construct
19850 (package
19851 (name "python-construct")
19852 (version "2.10.56")
19853 (source
19854 (origin
19855 (method url-fetch)
19856 (uri (pypi-uri "construct" version))
19857 (sha256
19858 (base32
19859 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19860 (build-system python-build-system)
19861 (arguments
19862 `(#:tests? #f)) ; No tests exist.
19863 (propagated-inputs
19864 `(("python-extras" ,python-extras)
19865 ("python-arrow" ,python-arrow)
19866 ("python-numpy" ,python-numpy)
19867 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19868 (home-page "https://construct.readthedocs.io")
19869 (synopsis "Declarative and symmetrical parser and builder for binary data")
19870 (description
19871 "This package provides both simple, atomic constructs (such as
19872 integers of various sizes), as well as composite ones which allow you
19873 form hierarchical and sequential structures of increasing complexity.
19874 It features bit and byte granularity, easy debugging and testing, an
19875 easy-to-extend subclass system, and lots of primitive constructs to
19876 make your work easier.")
19877 (license license:expat)))
19878
19879 (define-public python-outcome
19880 (package
19881 (name "python-outcome")
19882 (version "1.0.1")
19883 (source
19884 (origin
19885 (method url-fetch)
19886 (uri (pypi-uri "outcome" version))
19887 (sha256
19888 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19889 (build-system python-build-system)
19890 (arguments
19891 `(#:phases
19892 (modify-phases %standard-phases
19893 (replace 'check
19894 (lambda* (#:key inputs outputs #:allow-other-keys)
19895 (add-installed-pythonpath inputs outputs)
19896 (invoke "pytest" "-vv"))))))
19897 (native-inputs
19898 `(("python-pytest" ,python-pytest)
19899 ("python-pytest-cov" ,python-pytest-cov)
19900 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19901 (propagated-inputs
19902 `(("python-async-generator" ,python-async-generator)
19903 ("python-attrs" ,python-attrs)))
19904 (home-page "https://github.com/python-trio/outcome")
19905 (synopsis "Capture the outcome of Python function calls")
19906 (description
19907 "Capture the outcome of Python function calls. Extracted from the Trio
19908 project.")
19909 ;; Either license applies.
19910 (license (list license:expat license:asl2.0))))
19911
19912 (define-public python-trio
19913 (package
19914 (name "python-trio")
19915 (version "0.17.0")
19916 (source
19917 (origin
19918 (method url-fetch)
19919 (uri (pypi-uri "trio" version))
19920 (sha256
19921 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19922 (build-system python-build-system)
19923 (arguments
19924 `(#:phases
19925 (modify-phases %standard-phases
19926 (add-before 'check 'change-home
19927 (lambda _
19928 ;; Tests require a writable home.
19929 (setenv "HOME" "/tmp")
19930 #t))
19931 (replace 'check
19932 (lambda _
19933 (invoke "pytest" "-vv" "-k"
19934 (string-append
19935 ;; This test times out.
19936 "not test_ki_protection_works"
19937 ;; Assertion errors.
19938 " and not test_guest_mode_ki"
19939 " and not test_run_in_trio_thread_ki"
19940 ;; These try to raise KeyboardInterrupt which does not work
19941 ;; in the build environment.
19942 " and not test_ki_self"
19943 " and not test_ki_wakes_us_up"
19944 ;; Failure in name resolution.
19945 " and not test_getnameinfo"
19946 " and not test_SocketType_resolve"
19947 ;; OSError: protocol not found.
19948 " and not test_getprotobyname")))))))
19949 (native-inputs
19950 `(("python-astor" ,python-astor)
19951 ("python-ipython" ,python-ipython)
19952 ("python-jedi" ,python-jedi)
19953 ("python-pylint" ,python-pylint)
19954 ("python-pyopenssl" ,python-pyopenssl)
19955 ("python-pytest" ,python-pytest)
19956 ("python-pytest-cov" ,python-pytest-cov)
19957 ("python-trustme" ,python-trustme)))
19958 (propagated-inputs
19959 `(("python-attrs" ,python-attrs)
19960 ("python-idna" ,python-idna)
19961 ("python-outcome" ,python-outcome)
19962 ("python-sniffio" ,python-sniffio)
19963 ("python-sortedcontainers"
19964 ,python-sortedcontainers)))
19965 (home-page "https://github.com/python-trio/trio")
19966 (synopsis "Friendly Python library for async concurrency and I/O")
19967 (description
19968 "Trio strives to be a production-quality, async/await-native I/O library
19969 for Python. Like all async libraries, its main purpose is to help you write
19970 programs that do multiple things at the same time with parallelized I/O.")
19971 ;; Either license applies.
19972 (license (list license:expat license:asl2.0))))
19973
19974 (define-public python-trio-typing
19975 (package
19976 (name "python-trio-typing")
19977 (version "0.5.0")
19978 (source
19979 (origin
19980 (method url-fetch)
19981 (uri (pypi-uri "trio-typing" version))
19982 (sha256
19983 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19984 (build-system python-build-system)
19985 (arguments
19986 `(#:phases
19987 (modify-phases %standard-phases
19988 (replace 'check
19989 (lambda _
19990 (invoke "pytest" "-vv"))))))
19991 (native-inputs
19992 `(("python-attrs" ,python-attrs)
19993 ("python-pytest" ,python-pytest)))
19994 (propagated-inputs
19995 `(("python-mypy" ,python-mypy)
19996 ("python-mypy-extensions"
19997 ,python-mypy-extensions)
19998 ("python-trio" ,python-trio)
19999 ("python-typing-extensions"
20000 ,python-typing-extensions)))
20001 (home-page "https://github.com/python-trio/trio-typing")
20002 (synopsis "Static type checking support for Trio and related projects")
20003 (description
20004 "This package provides:
20005
20006 @itemize
20007 @item PEP 561 typing stubs packages for the Trio project packages:
20008
20009 @itemize
20010 @item trio (@code{trio-stubs})
20011 @item outcome (@code{outcome-stubs})
20012 @item async_generator (@code{async_generator-stubs})
20013 @end itemize
20014
20015 @item A package @code{trio_typing} containing types that Trio programs often
20016 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20017 a mypy plugin that smooths over some limitations in the basic type hints.
20018 @end itemize")
20019 ;; Either license applies.
20020 (license (list license:expat license:asl2.0))))
20021
20022 (define-public python-humanize
20023 (package
20024 (name "python-humanize")
20025 (version "0.5.1")
20026 (source
20027 (origin
20028 (method url-fetch)
20029 (uri (pypi-uri "humanize" version))
20030 (sha256
20031 (base32
20032 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20033 (arguments
20034 '(#:tests? #f)) ; tests not in pypi archive
20035 (build-system python-build-system)
20036 (home-page "https://github.com/jmoiron/humanize")
20037 (synopsis "Print numerical information in a human-readable form")
20038 (description "This package provides a Python module that displays numbers
20039 and dates in \"human readable\" forms. For example, it would display
20040 \"12345591313\" as \"12.3 billion\".")
20041 (license license:expat)))
20042
20043 (define-public python-txaio
20044 (package
20045 (name "python-txaio")
20046 (version "18.8.1")
20047 (source
20048 (origin
20049 (method url-fetch)
20050 (uri (pypi-uri "txaio" version))
20051 (sha256
20052 (base32
20053 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20054 (build-system python-build-system)
20055 (propagated-inputs
20056 `(("python-twisted" ,python-twisted)
20057 ("python-six" ,python-six)))
20058 (home-page "https://github.com/crossbario/txaio")
20059 (synopsis "Compatibility layer between Python asyncio and Twisted")
20060 (description "Txaio provides a compatibility layer between the Python
20061 @code{asyncio} module and @code{Twisted}.")
20062 (license license:expat)))
20063
20064 (define-public python-toolshed
20065 (package
20066 (name "python-toolshed")
20067 (version "0.4.6")
20068 (source
20069 (origin
20070 (method url-fetch)
20071 (uri (pypi-uri "toolshed" version))
20072 (sha256
20073 (base32
20074 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20075 (build-system python-build-system)
20076 (native-inputs
20077 `(("python-nose" ,python-nose)))
20078 (home-page "https://github.com/brentp/toolshed/")
20079 (synopsis "Collection of modules and functions for working with data")
20080 (description "This is a collection of well-tested, simple modules and
20081 functions that aim to reduce boilerplate when working with data.")
20082 (license license:bsd-2)))
20083
20084 (define-public python-annoy
20085 (package
20086 (name "python-annoy")
20087 (version "1.15.1")
20088 (source
20089 (origin
20090 (method url-fetch)
20091 (uri (pypi-uri "annoy" version))
20092 (sha256
20093 (base32
20094 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20095 (build-system python-build-system)
20096 (native-inputs
20097 `(("python-nose" ,python-nose)))
20098 (home-page "https://github.com/spotify/annoy/")
20099 (synopsis "Approximate nearest neighbors library")
20100 (description
20101 "Annoy is a C++ library with Python bindings to search for points in
20102 space that are close to a given query point. It also creates large read-only
20103 file-based data structures that are @code{mmap}ped into memory so that many
20104 processes may share the same data.")
20105 (license license:asl2.0)))
20106
20107 (define-public python-croniter
20108 (package
20109 (name "python-croniter")
20110 (version "0.3.34")
20111 (source (origin
20112 (method url-fetch)
20113 (uri (pypi-uri "croniter" version))
20114 (sha256
20115 (base32
20116 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20117 (build-system python-build-system)
20118 (propagated-inputs
20119 `(("python-dateutil" ,python-dateutil)
20120 ("python-natsort" ,python-natsort)))
20121 (home-page "https://github.com/kiorky/croniter")
20122 (synopsis "Iterate datetime objects with cron-like syntax")
20123 (description
20124 "@code{croniter} provides iteration for datetime object with cron-like
20125 format.")
20126 (license license:expat)))
20127
20128 (define-public python-pylzma
20129 (package
20130 (name "python-pylzma")
20131 (version "0.5.0")
20132 (source
20133 (origin
20134 (method url-fetch)
20135 (uri (pypi-uri "pylzma" version))
20136 (sha256
20137 (base32
20138 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20139 (build-system python-build-system)
20140 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20141 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20142 (description "This package provides Python bindings for the LZMA library
20143 by Igor Pavlov.")
20144 (license license:lgpl2.1+)))
20145
20146 (define-public python2-pylzma
20147 (package-with-python2 python-pylzma))
20148
20149 (define-public python2-zeroconf
20150 (package
20151 (name "python2-zeroconf")
20152
20153 ;; This is the last version that supports Python 2.x.
20154 (version "0.19.1")
20155 (source
20156 (origin
20157 (method url-fetch)
20158 (uri (pypi-uri "zeroconf" version))
20159 (sha256
20160 (base32
20161 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20162 (build-system python-build-system)
20163 (arguments
20164 `(#:python ,python-2
20165 #:phases
20166 (modify-phases %standard-phases
20167 (add-after 'unpack 'patch-requires
20168 (lambda* (#:key inputs #:allow-other-keys)
20169 (substitute* "setup.py"
20170 (("enum-compat")
20171 "enum34"))
20172 #t)))))
20173 (native-inputs
20174 `(("python2-six" ,python2-six)
20175 ("python2-enum32" ,python2-enum34)
20176 ("python2-netifaces" ,python2-netifaces)
20177 ("python2-typing" ,python2-typing)))
20178 (home-page "https://github.com/jstasiak/python-zeroconf")
20179 (synopsis "Pure Python mDNS service discovery")
20180 (description
20181 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20182 compatible).")
20183 (license license:lgpl2.1+)))
20184
20185 (define-public python-bsddb3
20186 (package
20187 (name "python-bsddb3")
20188 (version "6.2.6")
20189 (source
20190 (origin
20191 (method url-fetch)
20192 (uri (pypi-uri "bsddb3" version))
20193 (sha256
20194 (base32
20195 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20196 (build-system python-build-system)
20197 (inputs
20198 `(("bdb" ,bdb)))
20199 (arguments
20200 '(#:phases
20201 (modify-phases %standard-phases
20202 (add-after 'unpack 'configure-locations
20203 (lambda* (#:key inputs #:allow-other-keys)
20204 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20205 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20206 #t))
20207 (replace 'check
20208 (lambda _
20209 (invoke "python3" "test3.py" "-v"))))))
20210 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20211 (synopsis "Python bindings for Oracle Berkeley DB")
20212 (description
20213 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20214 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20215 Transaction objects, and each of these is exposed as a Python type in the
20216 bsddb3.db module. The database objects can use various access methods: btree,
20217 hash, recno, and queue. Complete support of Berkeley DB distributed
20218 transactions. Complete support for Berkeley DB Replication Manager.
20219 Complete support for Berkeley DB Base Replication. Support for RPC.")
20220 (license license:bsd-3)))
20221
20222 (define-public python-dbfread
20223 (package
20224 (name "python-dbfread")
20225 (version "2.0.7")
20226 (source (origin
20227 (method url-fetch)
20228 (uri (pypi-uri "dbfread" version))
20229 (sha256
20230 (base32
20231 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20232 (build-system python-build-system)
20233 (native-inputs
20234 `(("python-pytest" ,python-pytest)))
20235 (home-page "https://dbfread.readthedocs.io")
20236 (synopsis "Read DBF Files with Python")
20237 (description
20238 "This library reads DBF files and returns the data as native Python data
20239 types for further processing. It is primarily intended for batch jobs and
20240 one-off scripts.")
20241 (license license:expat)))
20242
20243 (define-public python-cached-property
20244 (package
20245 (name "python-cached-property")
20246 (version "1.5.1")
20247 (source
20248 (origin
20249 (method url-fetch)
20250 (uri (pypi-uri "cached-property" version))
20251 (sha256
20252 (base32
20253 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20254 (build-system python-build-system)
20255 (arguments
20256 `(#:phases
20257 (modify-phases %standard-phases
20258 ;; https://github.com/pydanny/cached-property/issues/131
20259 ;; recent versions of freezegun break one test
20260 (add-after 'unpack 'disable-broken-test
20261 (lambda _
20262 (substitute* "tests/test_cached_property.py"
20263 (("def test_threads_ttl_expiry\\(self\\)" m)
20264 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20265 " " m)))
20266 #t)))))
20267 (native-inputs
20268 `(("python-freezegun" ,python-freezegun)))
20269 (home-page
20270 "https://github.com/pydanny/cached-property")
20271 (synopsis
20272 "Decorator for caching properties in classes")
20273 (description
20274 "This package provides a decorator which makes caching
20275 time-or-computationally-expensive properties quick and easy and works in Python
20276 2 or 3.")
20277 (license license:bsd-3)))
20278
20279 (define-public python-folium
20280 (package
20281 (name "python-folium")
20282 (version "0.11.0")
20283 (source
20284 (origin
20285 (method url-fetch)
20286 (uri (pypi-uri "folium" version))
20287 (sha256
20288 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20289 (build-system python-build-system)
20290 (propagated-inputs
20291 `(("python-branca" ,python-branca)
20292 ("python-jinja2" ,python-jinja2)
20293 ("python-numpy" ,python-numpy)
20294 ("python-requests" ,python-requests)))
20295 (native-inputs
20296 `(("python-pytest" ,python-pytest)))
20297 (home-page "https://github.com/python-visualization/folium")
20298 (synopsis "Make beautiful maps with Leaflet.js & Python")
20299 (description "@code{folium} makes it easy to visualize data that’s been
20300 manipulated in Python on an interactive leaflet map. It enables both the
20301 binding of data to a map for @code{choropleth} visualizations as well as
20302 passing rich vector/raster/HTML visualizations as markers on the map.
20303
20304 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20305 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20306 supports Image, Video, GeoJSON and TopoJSON overlays.")
20307 (license license:expat)))
20308
20309 (define-public jube
20310 (package
20311 ;; This is a command-line tool, so no "python-" prefix.
20312 (name "jube")
20313 (version "2.2.2")
20314 (source (origin
20315 (method url-fetch)
20316 (uri (string-append
20317 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20318 version))
20319 (sha256
20320 (base32
20321 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20322 (file-name (string-append "jube-" version ".tar.gz"))))
20323 (build-system python-build-system)
20324 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20325 (synopsis "Benchmarking environment")
20326 (description
20327 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20328 benchmarked application, benchmark data is stored in a format that allows JUBE
20329 to deduct the desired information. This data can be parsed by automatic pre-
20330 and post-processing scripts that draw information and store it more densely
20331 for manual interpretation.")
20332 (license license:gpl3+)))
20333
20334 (define-public python-pyroutelib3
20335 (package
20336 (name "python-pyroutelib3")
20337 (version "1.3.post1")
20338 (source
20339 (origin
20340 (method url-fetch)
20341 (uri (pypi-uri "pyroutelib3" version))
20342 (sha256
20343 (base32
20344 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20345 (build-system python-build-system)
20346 (propagated-inputs
20347 `(("python-dateutil" ,python-dateutil)))
20348 (home-page "https://github.com/MKuranowski/pyroutelib3")
20349 (synopsis "Library for simple routing on OSM data")
20350 (description "Library for simple routing on OSM data")
20351 (license license:gpl3+)))
20352
20353 (define-public python-bibtexparser
20354 (package
20355 (name "python-bibtexparser")
20356 (version "1.1.0")
20357 (source
20358 (origin
20359 (method url-fetch)
20360 (uri (pypi-uri "bibtexparser" version))
20361 (sha256
20362 (base32
20363 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20364 (build-system python-build-system)
20365 (propagated-inputs
20366 `(("python-pyparsing" ,python-pyparsing)))
20367 (native-inputs
20368 `(("python-future" ,python-future)))
20369 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20370 (synopsis "Python library to parse BibTeX files")
20371 (description "BibtexParser is a Python library to parse BibTeX files.")
20372 (license (list license:bsd-3 license:lgpl3))))
20373
20374 (define-public python-distro
20375 (package
20376 (name "python-distro")
20377 (version "1.4.0")
20378 (source
20379 (origin
20380 (method url-fetch)
20381 (uri (pypi-uri "distro" version))
20382 (sha256
20383 (base32
20384 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20385 (build-system python-build-system)
20386 (native-inputs
20387 `(("python-pytest" ,python-pytest)))
20388 (home-page "https://github.com/nir0s/distro")
20389 (synopsis
20390 "OS platform information API")
20391 (description
20392 "@code{distro} provides information about the OS distribution it runs on,
20393 such as a reliable machine-readable ID, or version information.
20394
20395 It is the recommended replacement for Python's original
20396 `platform.linux_distribution` function (which will be removed in Python 3.8).
20397 @code{distro} also provides a command-line interface to output the platform
20398 information in various formats.")
20399 (license license:asl2.0)))
20400
20401 (define-public python-cairosvg
20402 (package
20403 (name "python-cairosvg")
20404 (version "2.4.2")
20405 (source
20406 (origin
20407 (method url-fetch)
20408 (uri (pypi-uri "CairoSVG" version))
20409 (sha256
20410 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20411 (build-system python-build-system)
20412 (arguments
20413 `(#:phases
20414 (modify-phases %standard-phases
20415 (replace 'check
20416 (lambda _ (invoke "pytest"))))))
20417 (propagated-inputs
20418 `(("python-cairocffi" ,python-cairocffi)
20419 ("python-cssselect2" ,python-cssselect2)
20420 ("python-defusedxml" ,python-defusedxml)
20421 ("python-pillow" ,python-pillow)
20422 ("python-tinycss2" ,python-tinycss2)))
20423 (native-inputs
20424 `(("python-pytest-flake8" ,python-pytest-flake8)
20425 ("python-pytest-isort" ,python-pytest-isort)
20426 ("python-pytest-runner" ,python-pytest-runner)))
20427 (home-page "https://cairosvg.org/")
20428 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20429 (description "CairoSVG is a SVG converter based on Cairo. It can export
20430 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20431 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20432 parsed, the result is drawn to a Cairo surface that can be exported to
20433 qvarious formats: PDF, PostScript, PNG and even SVG.")
20434 (license license:lgpl3+)))
20435
20436 (define-public python-pyphen
20437 (package
20438 (name "python-pyphen")
20439 (version "0.9.5")
20440 (source
20441 (origin
20442 (method url-fetch)
20443 (uri (pypi-uri "Pyphen" version))
20444 (sha256
20445 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20446 (build-system python-build-system)
20447 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20448 ;; embedded set provided by upstream - like Debian does.
20449 (home-page "https://github.com/Kozea/Pyphen")
20450 (synopsis "Pure Python module to hyphenate text")
20451 (description "Pyphen is a pure Python module to hyphenate text using
20452 existing Hunspell hyphenation dictionaries.")
20453 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20454
20455 (define-public python-intelhex
20456 (package
20457 (name "python-intelhex")
20458 (version "2.2.1")
20459 (source
20460 (origin
20461 (method url-fetch)
20462 (uri (pypi-uri "intelhex" version))
20463 (sha256
20464 (base32
20465 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20466 (build-system python-build-system)
20467 (arguments '(#:tests? #f)) ;issue with version
20468 (home-page "https://pypi.org/project/IntelHex/")
20469 (synopsis "Python library for Intel HEX files manipulations")
20470 (description "The Intel HEX file format is widely used in microprocessors
20471 and microcontrollers area (embedded systems etc.) as the de facto standard for
20472 representation of code to be programmed into microelectronic devices. This
20473 package provides an intelhex Python library to read, write, create from
20474 scratch and manipulate data from Intel HEX file format. It also includes
20475 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20476 converters and more, those based on the library itself.")
20477 (license license:bsd-3)))
20478
20479 (define-public python-pykwalify
20480 (package
20481 (name "python-pykwalify")
20482 (version "1.7.0")
20483 (source
20484 (origin
20485 (method url-fetch)
20486 (uri (pypi-uri "pykwalify" version))
20487 (sha256
20488 (base32
20489 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20490 (build-system python-build-system)
20491 (arguments '(#:tests? #f)) ;missing dependencies
20492 (propagated-inputs
20493 `(("python-dateutil" ,python-dateutil)
20494 ("python-docopt" ,python-docopt)
20495 ("python-pyyaml" ,python-pyyaml)))
20496 (home-page "https://github.com/grokzen/pykwalify")
20497 (synopsis
20498 "Python lib/cli for JSON/YAML schema validation")
20499 (description
20500 "This package provides a parser, schema validator, and data binding tool
20501 for YAML and JSON.")
20502 (license license:expat)))
20503
20504 (define-public python-dbusmock
20505 (package
20506 (name "python-dbusmock")
20507 (version "0.18.3")
20508 (source
20509 (origin
20510 (method url-fetch)
20511 (uri (pypi-uri "python-dbusmock" version))
20512 (sha256
20513 (base32
20514 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20515 (build-system python-build-system)
20516 (arguments
20517 '(#:phases
20518 (modify-phases %standard-phases
20519 (add-after 'unpack 'patch-shell-path
20520 (lambda _
20521 (substitute* "tests/test_code.py"
20522 (("/bin/bash") (which "bash")))
20523 #t)))))
20524 (native-inputs
20525 `(;; For tests.
20526 ("dbus" ,dbus) ; for dbus-daemon
20527 ("python-nose" ,python-nose)
20528 ("which" ,which)))
20529 (propagated-inputs
20530 `(("python-dbus" ,python-dbus)
20531 ("python-pygobject" ,python-pygobject)))
20532 (home-page "https://github.com/martinpitt/python-dbusmock")
20533 (synopsis "Python library for mock D-Bus objects")
20534 (description "python-dbusmock allows for the easy creation of mock objects on
20535 D-Bus. This is useful for writing tests for software which talks to D-Bus
20536 services such as upower, systemd, logind, gnome-session or others, and it is
20537 hard (or impossible without root privileges) to set the state of the real
20538 services to what you expect in your tests.")
20539 (license license:lgpl3+)))
20540
20541 (define-public python-jsonplus
20542 (package
20543 (name "python-jsonplus")
20544 (version "0.8.0")
20545 (home-page "https://github.com/randomir/jsonplus")
20546 (source (origin
20547 (method url-fetch)
20548 (uri (pypi-uri "jsonplus" version))
20549 (sha256
20550 (base32
20551 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20552 (build-system python-build-system)
20553 ;; XXX: No tests on PyPI, and the repository has no tags.
20554 (arguments '(#:tests? #f))
20555 (propagated-inputs
20556 `(("python-dateutil" ,python-dateutil)
20557 ("python-simplejson" ,python-simplejson)
20558 ("python-sortedcontainers" ,python-sortedcontainers)))
20559 (synopsis "Serialize Python types to/from JSON")
20560 (description
20561 "This package provides functionality to serialize arbitrary data types
20562 to and from JSON. Common data types are implemented and it is easy to
20563 register custom encoders and decoders.")
20564 (license license:expat)))
20565
20566 (define-public python-ujson
20567 (package
20568 (name "python-ujson")
20569 (version "2.0.3")
20570 (source
20571 (origin
20572 (method url-fetch)
20573 (uri (pypi-uri "ujson" version))
20574 (sha256
20575 (base32
20576 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20577 (modules '((guix build utils)))
20578 (snippet
20579 '(begin (delete-file-recursively "deps") #t))))
20580 (build-system python-build-system)
20581 (arguments
20582 `(#:phases
20583 (modify-phases %standard-phases
20584 (add-after 'unpack 'link-to-system-double-conversion
20585 (lambda* (#:key inputs #:allow-other-keys)
20586 (let ((d-c (assoc-ref inputs "double-conversion")))
20587 (substitute* "setup.py"
20588 (("./deps/double-conversion/double-conversion\"")
20589 (string-append d-c "/include/double-conversion\""))
20590 (("-lstdc++" stdc)
20591 (string-append "-L" d-c "/lib\","
20592 " \"-ldouble-conversion\","
20593 " \"" stdc)))
20594 #t)))
20595 (replace 'check
20596 (lambda* (#:key inputs outputs #:allow-other-keys)
20597 (add-installed-pythonpath inputs outputs)
20598 (invoke "pytest"))))))
20599 (native-inputs
20600 `(("double-conversion" ,double-conversion)
20601 ("python-setuptools-scm" ,python-setuptools-scm)
20602 ("python-pytest" ,python-pytest)))
20603 (home-page "https://github.com/ultrajson/ultrajson")
20604 (synopsis "Ultra fast JSON encoder and decoder for Python")
20605 (description
20606 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20607 bindings for Python 3.")
20608 (license license:bsd-3)))
20609
20610 (define-public python-ujson-1
20611 (package
20612 (inherit python-ujson)
20613 (version "1.35")
20614 (source
20615 (origin
20616 (method url-fetch)
20617 (uri (pypi-uri "ujson" version))
20618 (sha256
20619 (base32
20620 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20621 (arguments
20622 '(#:phases %standard-phases))
20623 (native-inputs '())
20624 (home-page "http://www.esn.me")
20625 (description
20626 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20627 bindings for Python 2.5+ and 3.")))
20628
20629 (define-public python2-ujson-1
20630 (package-with-python2 python-ujson-1))
20631
20632 (define-public python-iocapture
20633 ;; The latest release is more than a year older than this commit.
20634 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20635 (revision "1"))
20636 (package
20637 (name "python-iocapture")
20638 (version "0.1.2")
20639 (source
20640 (origin
20641 (method git-fetch)
20642 (uri (git-reference
20643 (url "https://github.com/oinume/iocapture")
20644 (commit commit)))
20645 (file-name (git-file-name name version))
20646 (sha256
20647 (base32
20648 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20649 (build-system python-build-system)
20650 (arguments
20651 `(#:phases
20652 (modify-phases %standard-phases
20653 (delete 'check)
20654 (add-after 'install 'check
20655 (lambda* (#:key inputs outputs #:allow-other-keys)
20656 (add-installed-pythonpath inputs outputs)
20657 (invoke "py.test" "-v" "tests")
20658 #t)))))
20659 (propagated-inputs
20660 `(("python-flexmock" ,python-flexmock)
20661 ("python-pytest" ,python-pytest)
20662 ("python-pytest-cov" ,python-pytest-cov)
20663 ("python-six" ,python-six)))
20664 (home-page "https://github.com/oinume/iocapture")
20665 (synopsis "Python capturing tool for stdout and stderr")
20666 (description
20667 "This package helps you to capture the standard out (stdout) and the
20668 standard error channel (stderr) in your program.")
20669 (license license:expat))))
20670
20671 (define-public python-argh
20672 ;; There are 21 commits since the latest release containing important
20673 ;; improvements.
20674 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20675 (revision "1"))
20676 (package
20677 (name "python-argh")
20678 (version (git-version "0.26.2" revision commit))
20679 (source
20680 (origin
20681 (method git-fetch)
20682 (uri (git-reference
20683 (url "https://github.com/neithere/argh")
20684 (commit commit)))
20685 (file-name (git-file-name name version))
20686 (sha256
20687 (base32
20688 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20689 (build-system python-build-system)
20690 (propagated-inputs
20691 `(("python-iocapture" ,python-iocapture)
20692 ("python-mock" ,python-mock)
20693 ("python-pytest" ,python-pytest)
20694 ("python-pytest-cov" ,python-pytest-cov)
20695 ("python-pytest-xdist" ,python-pytest-xdist)
20696 ("python-tox" ,python-tox)))
20697 (home-page "https://github.com/neithere/argh/")
20698 (synopsis "Argparse wrapper with natural syntax")
20699 (description
20700 "python-argh is a small library that provides several layers of
20701 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20702 always possible to declare a command with the highest possible (and least
20703 flexible) layer and then tune the behaviour with any of the lower layers
20704 including the native API of @code{python-argparse}.")
20705 (license license:lgpl3+))))
20706
20707 (define-public python-ppft
20708 (package
20709 (name "python-ppft")
20710 (version "1.6.6.1")
20711 (source
20712 (origin
20713 (method url-fetch)
20714 (uri (pypi-uri "ppft" version))
20715 (sha256
20716 (base32
20717 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20718 (build-system python-build-system)
20719 (arguments '(#:tests? #f)) ; there are none
20720 (propagated-inputs
20721 `(("python-six" ,python-six)))
20722 (home-page "https://pypi.org/project/ppft/")
20723 (synopsis "Fork of Parallel Python")
20724 (description
20725 "This package is a fork of Parallel Python. The Parallel Python
20726 module (@code{pp}) provides an easy and efficient way to create
20727 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20728 computers and clusters. It features cross-platform portability and dynamic
20729 load balancing.")
20730 (license license:bsd-3)))
20731
20732 (define-public python-pox
20733 (package
20734 (name "python-pox")
20735 (version "0.2.7")
20736 (source
20737 (origin
20738 (method url-fetch)
20739 (uri (pypi-uri "pox" version))
20740 (sha256
20741 (base32
20742 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20743 (build-system python-build-system)
20744 (arguments
20745 `(#:phases
20746 (modify-phases %standard-phases
20747 (replace 'check
20748 (lambda _
20749 (mkdir-p "/tmp/guix")
20750 (setenv "SHELL" "bash")
20751 (setenv "USERNAME" "guix")
20752 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20753 (invoke "py.test" "-vv")
20754 #t)))))
20755 (native-inputs
20756 `(("python-pytest" ,python-pytest)
20757 ("which" ,which)))
20758 (home-page "https://pypi.org/project/pox/")
20759 (synopsis "Python utilities for file system exploration and automated builds")
20760 (description
20761 "Pox provides a collection of utilities for navigating and manipulating
20762 file systems. This module is designed to facilitate some of the low-level
20763 operating system interactions that are useful when exploring a file system on a
20764 remote host. Pox provides Python equivalents of several shell commands such
20765 as @command{which} and @command{find}. These commands allow automated
20766 discovery of what has been installed on an operating system, and where the
20767 essential tools are located.")
20768 (license license:bsd-3)))
20769
20770 (define-public python-pathos
20771 (package
20772 (name "python-pathos")
20773 (version "0.2.5")
20774 (source
20775 (origin
20776 (method url-fetch)
20777 (uri (pypi-uri "pathos" version))
20778 (sha256
20779 (base32
20780 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20781 (build-system python-build-system)
20782 (arguments
20783 '(#:phases
20784 (modify-phases %standard-phases
20785 (replace 'check
20786 (lambda _
20787 (setenv "PYTHONPATH"
20788 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20789 (invoke "python" "./tests/__main__.py"))))))
20790 (propagated-inputs
20791 `(("python-dill" ,python-dill)
20792 ("python-multiprocess" ,python-multiprocess)
20793 ("python-pox" ,python-pox)
20794 ("python-ppft" ,python-ppft)))
20795 (native-inputs
20796 `(("python-pytest" ,python-pytest)))
20797 (home-page "https://pypi.org/project/pathos/")
20798 (synopsis
20799 "Parallel graph management and execution in heterogeneous computing")
20800 (description
20801 "Python-pathos is a framework for heterogeneous computing. It provides a
20802 consistent high-level interface for configuring and launching parallel
20803 computations across heterogeneous resources. Python-pathos provides configurable
20804 launchers for parallel and distributed computing, where each launcher contains
20805 the syntactic logic to configure and launch jobs in an execution environment.")
20806 (license license:bsd-3)))
20807
20808 (define-public python-flit
20809 (package
20810 (name "python-flit")
20811 (version "2.1.0")
20812 (source
20813 (origin
20814 (method url-fetch)
20815 (uri (pypi-uri "flit" version))
20816 (sha256
20817 (base32
20818 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20819 (build-system python-build-system)
20820 (arguments
20821 `(#:tests? #f)) ; XXX: Check requires network access.
20822 (home-page "https://flit.readthedocs.io/")
20823 (synopsis
20824 "Simple packaging tool for simple packages")
20825 (description
20826 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20827 packages a single importable module or package at a time, using the import
20828 name as the name on PyPI. All subpackages and data files within a package
20829 are included automatically.")
20830 (license license:bsd-3)))
20831
20832 (define-public python-pathtools
20833 (package
20834 (name "python-pathtools")
20835 (version "0.1.2")
20836 (source
20837 (origin
20838 (method url-fetch)
20839 (uri (pypi-uri "pathtools" version))
20840 (sha256
20841 (base32
20842 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20843 (build-system python-build-system)
20844 (home-page
20845 "https://github.com/gorakhargosh/pathtools")
20846 (synopsis "Path utilities for Python")
20847 (description "Pattern matching and various utilities for file systems
20848 paths.")
20849 (license license:expat)))
20850
20851 (define-public python-fastentrypoints
20852 (package
20853 (name "python-fastentrypoints")
20854 (version "0.12")
20855 (source
20856 (origin
20857 (method url-fetch)
20858 (uri (pypi-uri "fastentrypoints" version))
20859 (sha256
20860 (base32
20861 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20862 (build-system python-build-system)
20863 (home-page
20864 "https://github.com/ninjaaron/fast-entry_points")
20865 (synopsis
20866 "Makes entry_points specified in setup.py load more quickly")
20867 (description
20868 "Using entry_points in your setup.py makes scripts that start really
20869 slowly because it imports pkg_resources. This package allows such setup
20870 scripts to load entry points more quickly.")
20871 (license license:bsd-3)))
20872
20873 (define-public python-funcparserlib
20874 (package
20875 (name "python-funcparserlib")
20876 (version "0.3.6")
20877 (source
20878 (origin
20879 (method url-fetch)
20880 (uri (pypi-uri "funcparserlib" version))
20881 (sha256
20882 (base32
20883 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20884 (native-inputs
20885 `(("python-tox" ,python-tox)))
20886 (arguments
20887 `(#:phases
20888 (modify-phases %standard-phases
20889 (replace 'check
20890 (lambda _
20891 (invoke "tox"))))))
20892 (build-system python-build-system)
20893 (home-page
20894 "https://github.com/vlasovskikh/funcparserlib")
20895 (synopsis
20896 "Recursive descent parsing library based on functional combinators")
20897 (description
20898 "This package is a recursive descent parsing library for Python based on
20899 functional combinators. Parser combinators are just higher-order functions
20900 that take parsers as their arguments and return them as result values.")
20901 (license license:expat)))
20902
20903 (define-public python-speg
20904 (package
20905 (name "python-speg")
20906 (version "0.3")
20907 (source
20908 (origin
20909 (method url-fetch)
20910 (uri (pypi-uri "speg" version ".zip"))
20911 (sha256
20912 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20913 (arguments
20914 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20915 (native-inputs
20916 `(("unzip" ,unzip)))
20917 (build-system python-build-system)
20918 (home-page "https://github.com/avakar/speg")
20919 (synopsis "PEG-based parser interpreter with memoization")
20920 (description "This package is a PEG-based parser and interpreter with
20921 memoization.")
20922 (license license:expat)))
20923
20924 (define-public python-cson
20925 (package
20926 (name "python-cson")
20927 (version "0.8")
20928 (source
20929 (origin
20930 (method url-fetch)
20931 (uri (pypi-uri "cson" version))
20932 (sha256
20933 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20934 (build-system python-build-system)
20935 (propagated-inputs
20936 `(("python-speg" ,python-speg)))
20937 (home-page "https://github.com/avakar/pycson")
20938 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20939 (description "This package is a parser for Coffeescript Object
20940 Notation (CSON).")
20941 (license license:expat)))
20942
20943 (define-public python-asynctest
20944 (package
20945 (name "python-asynctest")
20946 (version "0.13.0")
20947 (source
20948 (origin
20949 (method url-fetch)
20950 (uri (pypi-uri "asynctest" version))
20951 (sha256
20952 (base32
20953 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20954 (build-system python-build-system)
20955 (arguments
20956 '(#:phases
20957 (modify-phases %standard-phases
20958 (replace 'check
20959 (lambda _
20960 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20961 (add-after 'unpack 'disable-tests
20962 (lambda* _
20963 ;; XXX: 7 tests fail out of 220. Disable them for now.
20964 (substitute* (list "test/test_selector.py"
20965 "test/test_mock.py")
20966 (("def test_events_watched_outside_test_are_ignored")
20967 "@unittest.skip('disabled by guix')
20968 def test_events_watched_outside_test_are_ignored")
20969 (("def test_awaited_from_autospec_mock.*" line)
20970 (string-append line " return True\n"))
20971 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20972 (string-append line " return True\n"))
20973 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20974 (string-append line " return True\n"))
20975 (("def test_multiple_patches_on_coroutine.*" line)
20976 (string-append line " return True\n"))
20977 (("def test_patch_coroutine_only_when_running.*" line)
20978 (string-append line " return True\n")))
20979 #t)))))
20980 (home-page "https://github.com/Martiusweb/asynctest")
20981 (synopsis "Extension of unittest for testing asyncio libraries")
20982 (description
20983 "The package asynctest is built on top of the standard unittest module
20984 and cuts down boilerplate code when testing libraries for asyncio.")
20985 (license license:asl2.0)))
20986
20987 (define-public python-aionotify
20988 (package
20989 (name "python-aionotify")
20990 (version "0.2.0")
20991 (source
20992 (origin
20993 ;; Source tarball on PyPi lacks tests
20994 (method git-fetch)
20995 (uri (git-reference
20996 (url "https://github.com/rbarrois/aionotify")
20997 (commit (string-append "v" version))))
20998 (file-name (git-file-name name version))
20999 (sha256
21000 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
21001 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
21002 (build-system python-build-system)
21003 (home-page "https://github.com/rbarrois/aionotify")
21004 (synopsis "Asyncio-powered inotify library")
21005 (description
21006 "@code{aionotify} is a simple, asyncio-based inotify library.")
21007 (license license:bsd-3)))
21008
21009 (define-public python-forbiddenfruit
21010 (package
21011 (name "python-forbiddenfruit")
21012 (version "0.1.3")
21013 (source
21014 (origin
21015 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21016 (method git-fetch)
21017 (uri (git-reference
21018 (url "https://github.com/clarete/forbiddenfruit")
21019 (commit version)))
21020 (file-name (git-file-name name version))
21021 (sha256
21022 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21023 (build-system python-build-system)
21024 (arguments
21025 '(#:phases
21026 (modify-phases %standard-phases
21027 (replace 'check
21028 (lambda _
21029 (invoke "make" "SKIP_DEPS=1"))))))
21030 (native-inputs
21031 `(("python-nose" ,python-nose)
21032 ("python-coverage" ,python-coverage)))
21033 (home-page "https://github.com/clarete/forbiddenfruit")
21034 (synopsis "Patch python built-in objects")
21035 (description "This project allows Python code to extend built-in types.")
21036 (license (list license:gpl3+ license:expat))))
21037
21038 (define-public python-shouldbe
21039 (package
21040 (name "python-shouldbe")
21041 (version "0.1.2")
21042 (source
21043 (origin
21044 (method url-fetch)
21045 (uri (pypi-uri "shouldbe" version))
21046 (sha256
21047 (base32
21048 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21049 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21050 (build-system python-build-system)
21051 (propagated-inputs
21052 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21053 (native-inputs
21054 `(("python-nose" ,python-nose)))
21055 (home-page "https://github.com/directxman12/should_be")
21056 (synopsis "Python Assertion Helpers inspired by Shouldly")
21057 (description
21058 "Python Assertion Helpers inspired by Shouldly.")
21059 (license license:isc)))
21060
21061 (define-public python-k5test
21062 (package
21063 (name "python-k5test")
21064 (version "0.9.2")
21065 (source
21066 (origin
21067 (method url-fetch)
21068 (uri (pypi-uri "k5test" version))
21069 (sha256
21070 (base32
21071 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21072 (build-system python-build-system)
21073 (propagated-inputs
21074 `(("python-six" ,python-six)
21075 ;; `which`, `kadmin.local` binaries called inside library
21076 ("which" ,which)
21077 ("mit-krb5" ,mit-krb5)))
21078 (native-inputs `(("mit-krb5" ,mit-krb5)))
21079 (arguments
21080 '(#:phases
21081 (modify-phases %standard-phases
21082 (add-after 'unpack 'patch-paths
21083 (lambda* _
21084 (substitute* "k5test/realm.py"
21085 (("'kadmin_local'") "'kadmin.local'")))))))
21086 (home-page "https://github.com/pythongssapi/k5test")
21087 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21088 (description
21089 "@code{k5test} is a library for setting up self-contained Kerberos 5
21090 environments, and running Python unit tests inside those environments. It is
21091 based on the file of the same name found alongside the MIT Kerberos 5 unit
21092 tests.")
21093 (license license:isc)))
21094
21095 (define-public python-gssapi
21096 (package
21097 (name "python-gssapi")
21098 (version "1.6.9")
21099 (source
21100 (origin
21101 (method url-fetch)
21102 (uri (pypi-uri "gssapi" version))
21103 (sha256
21104 (base32
21105 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21106 (build-system python-build-system)
21107 (arguments
21108 `(#:phases
21109 (modify-phases %standard-phases
21110 ;; Work around
21111 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21112 (add-before 'check 'disable-failing-tests
21113 (lambda _
21114 (let ((reason "Disabled failing test (see: \
21115 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21116 (substitute* "gssapi/tests/test_high_level.py"
21117 ((".*def test_add_with_impersonate.*" all)
21118 (string-append all " self.skipTest('" reason "')\n")))
21119 (substitute* "gssapi/tests/test_raw.py"
21120 ((".*def test_.*impersonate_name.*" all)
21121 (string-append all " self.skipTest('" reason "')\n")))
21122 #t))))))
21123 (propagated-inputs
21124 `(("python-decorator" ,python-decorator)
21125 ("python-six" ,python-six)))
21126 (inputs
21127 `(("mit-krb5" ,mit-krb5)))
21128 ;; for tests
21129 (native-inputs
21130 `(("python-shouldbe" ,python-shouldbe)
21131 ("python-parameterized" ,python-parameterized)
21132 ("python-k5test" ,python-k5test)
21133 ("python-nose" ,python-nose)))
21134 (home-page "https://github.com/pythongssapi/python-gssapi")
21135 (synopsis "Python GSSAPI Wrapper")
21136 (description
21137 "Python-GSSAPI provides both low-level and high level wrappers around the
21138 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21139 also be usable with other GSSAPI mechanisms.")
21140 (license license:isc)))
21141
21142 (define-public python-check-manifest
21143 (package
21144 (name "python-check-manifest")
21145 (version "0.37")
21146 (source
21147 (origin
21148 (method url-fetch)
21149 (uri (pypi-uri "check-manifest" version))
21150 (sha256
21151 (base32
21152 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21153 (build-system python-build-system)
21154 (native-inputs
21155 `(("python-mock" ,python-mock)
21156 ("git" ,git)))
21157 (home-page "https://github.com/mgedmin/check-manifest")
21158 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21159 (description "Python package can include a MANIFEST.in file to help with
21160 sending package files to the Python Package Index. This package checks that
21161 file to ensure it completely and accurately describes your project.")
21162 (license license:expat)))
21163
21164 (define-public python-android-stringslib
21165 (package
21166 (name "python-android-stringslib")
21167 (version "0.1.2")
21168 (source
21169 (origin
21170 (method git-fetch)
21171 (uri (git-reference
21172 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21173 (commit (string-append "v" version))))
21174 (file-name (git-file-name name version))
21175 (sha256
21176 (base32
21177 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21178 (build-system python-build-system)
21179 (arguments
21180 `(#:tests? #f))
21181 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21182 (synopsis "Android strings.xml support")
21183 (description "Android Strings Lib provides support for android's strings.xml
21184 files. These files are used to translate strings in android apps.")
21185 (license license:expat)))
21186
21187 (define-public python-watchdog
21188 (package
21189 (name "python-watchdog")
21190 (version "0.9.0")
21191 (source
21192 (origin
21193 (method url-fetch)
21194 (uri (pypi-uri "watchdog" version))
21195 (sha256
21196 (base32
21197 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21198 (build-system python-build-system)
21199 (arguments
21200 `(#:phases
21201 (modify-phases %standard-phases
21202 (add-before 'check 'remove-failing
21203 (lambda _
21204 (delete-file "tests/test_inotify_buffer.py")
21205 (delete-file "tests/test_snapshot_diff.py")
21206 #t)))))
21207 (propagated-inputs
21208 `(("python-argh" ,python-argh)
21209 ("python-pathtools" ,python-pathtools)
21210 ("python-pyyaml" ,python-pyyaml)))
21211 (native-inputs
21212 `(("python-pytest-cov" ,python-pytest-cov)
21213 ("python-pytest-timeout" ,python-pytest-timeout)))
21214 (home-page "https://github.com/gorakhargosh/watchdog")
21215 (synopsis "File system events monitoring")
21216 (description "This package provides a way to monitor file system events
21217 such as a file modification and trigger an action. This is similar to inotify,
21218 but portable.")
21219 (license license:asl2.0)))
21220
21221 (define-public python-watchgod
21222 (package
21223 (name "python-watchgod")
21224 (version "0.6")
21225 (source
21226 (origin
21227 ;; There are no tests in the PyPI tarball.
21228 (method git-fetch)
21229 (uri (git-reference
21230 (url "https://github.com/samuelcolvin/watchgod")
21231 (commit (string-append "v" version))))
21232 (file-name (git-file-name name version))
21233 (sha256
21234 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21235 (build-system python-build-system)
21236 (arguments
21237 `(#:phases
21238 (modify-phases %standard-phases
21239 (replace 'check
21240 (lambda _
21241 (invoke "pytest" "-vv"))))))
21242 (native-inputs
21243 `(("python-coverage" ,python-coverage)
21244 ("python-docutils" ,python-docutils)
21245 ("python-flake8" ,python-flake8)
21246 ("python-isort" ,python-isort)
21247 ("python-pycodestyle" ,python-pycodestyle)
21248 ("python-pyflakes" ,python-pyflakes)
21249 ("python-pygments" ,python-pygments)
21250 ("python-pytest" ,python-pytest)
21251 ("python-pytest-cov" ,python-pytest-cov)
21252 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21253 ("python-pytest-mock" ,python-pytest-mock)
21254 ("python-pytest-sugar" ,python-pytest-sugar)
21255 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21256 (home-page "https://github.com/samuelcolvin/watchgod")
21257 (synopsis "Simple, modern file watching and code reload in Python")
21258 (description
21259 "Simple, modern file watching and code reload in Python inspired by
21260 @code{watchdog}. Among the differences are a unified approach for each
21261 operating systems and an elegant approach to concurrency using threading.")
21262 (license license:expat)))
21263
21264 (define-public python-wget
21265 (package
21266 (name "python-wget")
21267 (version "3.2")
21268 (source
21269 (origin
21270 (method url-fetch)
21271 (uri (pypi-uri "wget" version ".zip"))
21272 (sha256
21273 (base32
21274 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21275 (build-system python-build-system)
21276 (native-inputs `(("unzip" ,unzip)))
21277 (home-page "https://bitbucket.org/techtonik/python-wget/")
21278 (synopsis "Pure Python download utility")
21279 (description "The python-wget library provides an API to download files
21280 with features similar to the @command{wget} utility.")
21281 (license license:unlicense)))
21282
21283 (define-public offlate
21284 (package
21285 (name "offlate")
21286 (version "0.5")
21287 (source
21288 (origin
21289 (method git-fetch)
21290 (uri (git-reference
21291 (url "https://framagit.org/tyreunom/offlate")
21292 (commit version)))
21293 (file-name (git-file-name name version))
21294 (sha256
21295 (base32
21296 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21297 (build-system python-build-system)
21298 (arguments
21299 ;; No tests
21300 `(#:tests? #f))
21301 (propagated-inputs
21302 `(("python-android-stringslib" ,python-android-stringslib)
21303 ("python-dateutil" ,python-dateutil)
21304 ("python-gitlab" ,python-gitlab)
21305 ("python-lxml" ,python-lxml)
21306 ("python-polib" ,python-polib)
21307 ("python-pyenchant" ,python-pyenchant)
21308 ("python-pygit2" ,python-pygit2)
21309 ("python-pygithub" ,python-pygithub)
21310 ("python-pyqt" ,python-pyqt)
21311 ("python-requests" ,python-requests)
21312 ("python-ruamel.yaml" ,python-ruamel.yaml)
21313 ("python-translation-finder" ,python-translation-finder)
21314 ("python-watchdog" ,python-watchdog)))
21315 (native-inputs
21316 `(("qttools" ,qttools)))
21317 (home-page "https://framagit.org/tyreunom/offlate")
21318 (synopsis "Offline translation interface for online translation tools")
21319 (description "Offlate offers a unified interface for different translation
21320 file formats, as well as many different online translation platforms. You can
21321 use it to get work from online platforms, specialized such as the Translation
21322 Project, or not such a gitlab instance when your upstream doesn't use any
21323 dedicated platform. The tool proposes a unified interface for any format and
21324 an upload option to send your work back to the platform.")
21325 (license license:gpl3+)))
21326
21327 (define-public python-titlecase
21328 (package
21329 (name "python-titlecase")
21330 (version "0.12.0")
21331 (source
21332 (origin
21333 (method url-fetch)
21334 (uri (pypi-uri "titlecase" version))
21335 (sha256
21336 (base32
21337 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21338 (build-system python-build-system)
21339 (native-inputs
21340 `(("python-nose" ,python-nose)))
21341 (home-page "https://github.com/ppannuto/python-titlecase")
21342 (synopsis "Capitalize strings similar to book titles")
21343 (description
21344 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21345 It capitalizes (predominantly English) strings in a way that is similar to
21346 book titles, using the New York Times Manual of Style to leave certain words
21347 lowercase.")
21348 (license license:expat)))
21349
21350 (define-public python-pypng
21351 (package
21352 (name "python-pypng")
21353 (version "0.0.20")
21354 (source
21355 (origin
21356 (method url-fetch)
21357 (uri (pypi-uri "pypng" version))
21358 (sha256
21359 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21360 (build-system python-build-system)
21361 (home-page "https://github.com/drj11/pypng")
21362 (synopsis "Pure Python PNG image encoder/decoder")
21363 (description
21364 "The PyPNG module implements support for PNG images. It reads and writes
21365 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21366 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21367 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21368 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21369 A number of optional chunks can be specified (when writing) and
21370 understood (when reading): tRNS, bKGD, gAMA.
21371
21372 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21373 aim at being a replacement or competitor. Its strength lies in fine-grained
21374 extensive support of PNG features. It can also read and write Netpbm PAM
21375 files, with a focus on its use as an intermediate format for implementing
21376 custom PNG processing.")
21377 (license license:expat)))
21378
21379 (define-public python-fuzzywuzzy
21380 (package
21381 (name "python-fuzzywuzzy")
21382 (version "0.18.0")
21383 (source
21384 (origin
21385 (method url-fetch)
21386 (uri (pypi-uri "fuzzywuzzy" version))
21387 (sha256
21388 (base32
21389 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21390 (build-system python-build-system)
21391 (native-inputs
21392 `(("python-hypothesis" ,python-hypothesis)
21393 ("python-pycodestyle" ,python-pycodestyle)
21394 ("python-pytest" ,python-pytest)))
21395 (propagated-inputs
21396 `(("python-levenshtein" ,python-levenshtein)))
21397 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21398 (synopsis "Fuzzy string matching in Python")
21399 (description "Approximate string matching using
21400 @emph{Levenshtein Distance} to calculate the differences between
21401 sequences.")
21402 (license license:gpl2)))
21403
21404 (define-public python2-fuzzywuzzy
21405 (package-with-python2 python-fuzzywuzzy))
21406
21407 (define-public python-block-tracing
21408 (package
21409 (name "python-block-tracing")
21410 (version "1.0.1")
21411 (source
21412 (origin
21413 (method url-fetch)
21414 (uri (pypi-uri "block_tracing" version))
21415 (sha256
21416 (base32
21417 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21418 (build-system python-build-system)
21419 (arguments '(#:tests? #f)) ; no tests
21420 (home-page "https://github.com/rianhunter/block_tracing")
21421 (synopsis "Protect process memory")
21422 (description
21423 "@code{block_tracing} is a tiny Python library that can be used to
21424 prevent debuggers and other applications from inspecting the memory within
21425 your process.")
21426 (license license:expat)))
21427
21428 (define-public python-gcovr
21429 (package
21430 (name "python-gcovr")
21431 (version "4.2")
21432 (source
21433 (origin
21434 (method url-fetch)
21435 (uri (pypi-uri "gcovr" version))
21436 (sha256
21437 (base32
21438 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21439 (build-system python-build-system)
21440 (propagated-inputs
21441 `(("python-lxml" ,python-lxml)
21442 ("python-jinja2" ,python-jinja2)))
21443 (home-page "https://gcovr.com/")
21444 (synopsis "Utility for generating code coverage results")
21445 (description
21446 "Gcovr provides a utility for managing the use of the GNU gcov
21447 utility and generating summarized code coverage results. It is inspired
21448 by the Python coverage.py package, which provides a similar utility for
21449 Python.")
21450 (license license:bsd-3)))
21451
21452 (define-public python-owslib
21453 (package
21454 (name "python-owslib")
21455 (version "0.19.2")
21456 (source
21457 (origin
21458 (method url-fetch)
21459 (uri (pypi-uri "OWSLib" version))
21460 (sha256
21461 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21462 (build-system python-build-system)
21463 (arguments
21464 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21465 (synopsis "Interface for Open Geospatial Consortium web service")
21466 (description
21467 "OWSLib is a Python package for client programming with Open Geospatial
21468 Consortium (OGC) web service (hence OWS) interface standards, and their related
21469 content models.")
21470 (home-page "https://geopython.github.io/OWSLib/")
21471 (license license:bsd-3)))
21472
21473 (define-public python-docusign-esign
21474 (package
21475 (name "python-docusign-esign")
21476 (version "3.1.0")
21477 (source (origin
21478 (method url-fetch)
21479 (uri (pypi-uri "docusign_esign" version))
21480 (sha256
21481 (base32
21482 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21483 (build-system python-build-system)
21484 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21485 (arguments `(#:tests? #f))
21486 (propagated-inputs
21487 `(("python-certifi" ,python-certifi)
21488 ("python-six" ,python-six)
21489 ("python-dateutil" ,python-dateutil)
21490 ("python-urllib3" ,python-urllib3)
21491 ("python-pyjwt" ,python-pyjwt)
21492 ("python-cryptography" ,python-cryptography)
21493 ("python-nose" ,python-nose)))
21494 (synopsis "DocuSign Python Client")
21495 (description "The Official DocuSign Python Client Library used to interact
21496 with the eSign REST API. Send, sign, and approve documents using this client.")
21497 (home-page "https://www.docusign.com/devcenter")
21498 (license license:expat)))
21499
21500 (define-public python-xattr
21501 (package
21502 (name "python-xattr")
21503 (version "0.9.7")
21504 (source
21505 (origin
21506 (method url-fetch)
21507 (uri (pypi-uri "xattr" version))
21508 (sha256
21509 (base32
21510 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21511 (build-system python-build-system)
21512 (propagated-inputs
21513 `(("python-cffi" ,python-cffi)))
21514 (home-page "https://github.com/xattr/xattr")
21515 (synopsis
21516 "Python wrapper for extended file system attributes")
21517 (description "This package provides a Python wrapper for using extended
21518 file system attributes. Extended attributes extend the basic attributes of files
21519 and directories in the file system. They are stored as name:data pairs
21520 associated with file system objects (files, directories, symlinks, etc).")
21521 (license license:expat)))
21522
21523 (define-public python-json-logger
21524 (package
21525 (name "python-json-logger")
21526 (version "0.1.11")
21527 (source
21528 (origin
21529 (method url-fetch)
21530 (uri (pypi-uri "python-json-logger" version))
21531 (sha256
21532 (base32
21533 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21534 (build-system python-build-system)
21535 (home-page
21536 "https://github.com/madzak/python-json-logger")
21537 (synopsis "JSON log formatter in Python")
21538 (description "This library allows standard Python logging to output log data
21539 as JSON objects. With JSON we can make our logs more readable by machines and
21540 we can stop writing custom parsers for syslog-type records.")
21541 (license license:bsd-3)))
21542
21543 (define-public python-daiquiri
21544 (package
21545 (name "python-daiquiri")
21546 (version "2.1.1")
21547 (source
21548 (origin
21549 (method url-fetch)
21550 (uri (pypi-uri "daiquiri" version))
21551 (sha256
21552 (base32
21553 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21554 (build-system python-build-system)
21555 (propagated-inputs
21556 `(("python-json-logger" ,python-json-logger)))
21557 (native-inputs
21558 `(("python-mock" ,python-mock)
21559 ("python-pytest" ,python-pytest)
21560 ("python-setuptools-scm" ,python-setuptools-scm)
21561 ("python-six" ,python-six)))
21562 (home-page "https://github.com/jd/daiquiri")
21563 (synopsis
21564 "Library to configure Python logging easily")
21565 (description "The daiquiri library provides an easy way to configure
21566 logging in Python. It also provides some custom formatters and handlers.")
21567 (license license:asl2.0)))
21568
21569 (define-public python-pifpaf
21570 (package
21571 (name "python-pifpaf")
21572 (version "2.5.0")
21573 (source
21574 (origin
21575 (method url-fetch)
21576 (uri (pypi-uri "pifpaf" version))
21577 (sha256
21578 (base32
21579 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21580 (build-system python-build-system)
21581 (arguments
21582 '(#:phases
21583 (modify-phases %standard-phases
21584 (replace 'check
21585 (lambda _
21586 (invoke "python" "setup.py" "testr" "--slowest"
21587 "--testr-args=until-failure"))))))
21588 (propagated-inputs
21589 `(("python-click" ,python-click)
21590 ("python-daiquiri" ,python-daiquiri)
21591 ("python-fixtures" ,python-fixtures)
21592 ("python-jinja2" ,python-jinja2)
21593 ("python-pbr" ,python-pbr)
21594 ("python-psutil" ,python-psutil)
21595 ("python-six" ,python-six)
21596 ("python-xattr" ,python-xattr)))
21597 (native-inputs
21598 `(("python-mock" ,python-mock)
21599 ("python-os-testr" ,python-os-testr)
21600 ("python-requests" ,python-requests)
21601 ("python-testrepository" ,python-testrepository)
21602 ("python-testtools" ,python-testtools)))
21603 (home-page "https://github.com/jd/pifpaf")
21604 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21605 (description "Pifpaf is a suite of fixtures and a command-line tool that
21606 starts and stops daemons for a quick throw-away usage. This is typically
21607 useful when needing these daemons to run integration testing. It originally
21608 evolved from its precursor @code{overtest}.")
21609 (license license:asl2.0)))
21610
21611 (define-public python-pytest-check-links
21612 (package
21613 (name "python-pytest-check-links")
21614 (version "0.3.0")
21615 (source
21616 (origin
21617 (method url-fetch)
21618 ;; URI uses underscores
21619 (uri (pypi-uri "pytest_check_links" version))
21620 (sha256
21621 (base32
21622 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21623 (build-system python-build-system)
21624 (propagated-inputs
21625 `(("python-docutils" ,python-docutils)
21626 ("python-html5lib" ,python-html5lib)
21627 ("python-nbconvert" ,python-nbconvert)
21628 ("python-nbformat" ,python-nbformat)
21629 ("python-pytest" ,python-pytest)
21630 ("python-six" ,python-six)))
21631 (native-inputs
21632 `(("python-pbr-minimal" ,python-pbr-minimal)))
21633 (home-page "https://github.com/minrk/pytest-check-links")
21634 (synopsis "Check links in files")
21635 (description "This package provides a pytest plugin that checks URLs for
21636 HTML-containing files.")
21637 (license license:bsd-3)))
21638
21639 (define-public python-json5
21640 (package
21641 (name "python-json5")
21642 (version "0.8.5")
21643 (source
21644 (origin
21645 ;; sample.json5 is missing from PyPi source tarball
21646 (method git-fetch)
21647 (uri (git-reference
21648 (url "https://github.com/dpranke/pyjson5")
21649 (commit (string-append "v" version))))
21650 (file-name (git-file-name name version))
21651 (sha256
21652 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21653 (build-system python-build-system)
21654 (home-page "https://github.com/dpranke/pyjson5")
21655 (synopsis
21656 "Python implementation of the JSON5 data format")
21657 (description
21658 "JSON5 extends the JSON data interchange format to make it slightly more
21659 usable as a configuration language. This Python package implements parsing and
21660 dumping of JSON5 data structures.")
21661 (license license:asl2.0)))
21662
21663 (define-public python-frozendict
21664 (package
21665 (name "python-frozendict")
21666 (version "1.2")
21667 (source
21668 (origin
21669 (method url-fetch)
21670 (uri (pypi-uri "frozendict" version))
21671 (sha256
21672 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21673 (build-system python-build-system)
21674 (home-page "https://github.com/slezica/python-frozendict")
21675 (synopsis "Simple immutable mapping for Python")
21676 (description
21677 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21678 implements the complete mapping interface. It can be used as a drop-in
21679 replacement for dictionaries where immutability is desired.")
21680 (license license:expat)))
21681
21682 (define-public python-unpaddedbase64
21683 (package
21684 (name "python-unpaddedbase64")
21685 (version "1.1.0")
21686 (source
21687 (origin
21688 (method git-fetch)
21689 (uri (git-reference
21690 (url "https://github.com/matrix-org/python-unpaddedbase64")
21691 (commit (string-append "v" version))))
21692 (file-name (git-file-name name version))
21693 (sha256
21694 (base32
21695 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21696 (build-system python-build-system)
21697 (home-page "https://pypi.org/project/unpaddedbase64/")
21698 (synopsis "Encode and decode Base64 without “=” padding")
21699 (description
21700 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21701 using “=” characters. However this conveys no benefit so many protocols
21702 choose to use Base64 without the “=” padding.")
21703 (license license:asl2.0)))
21704
21705 (define-public python-py-cpuinfo
21706 (package
21707 (name "python-py-cpuinfo")
21708 (version "5.0.0")
21709 (source
21710 (origin
21711 (method url-fetch)
21712 (uri (pypi-uri "py-cpuinfo" version))
21713 (sha256
21714 (base32
21715 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21716 (build-system python-build-system)
21717 (home-page "https://github.com/workhorsy/py-cpuinfo")
21718 (synopsis "Get CPU info with Python")
21719 (description
21720 "This Python module returns the CPU info by using the best sources of
21721 information for your operating system.")
21722 (license license:expat)))
21723
21724 (define-public python-canonicaljson
21725 (package
21726 (name "python-canonicaljson")
21727 (version "1.4.0")
21728 (source
21729 (origin
21730 (method url-fetch)
21731 (uri (pypi-uri "canonicaljson" version))
21732 (sha256
21733 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21734 (build-system python-build-system)
21735 (propagated-inputs
21736 `(("python-six" ,python-six)
21737 ("python-frozendict" ,python-frozendict)
21738 ("python-simplejson" ,python-simplejson)))
21739 (home-page "https://github.com/matrix-org/python-canonicaljson")
21740 (synopsis "Canonical JSON")
21741 (description
21742 "Deterministically encode JSON.
21743
21744 @itemize
21745 @item Encodes objects and arrays as RFC 7159 JSON.
21746 @item Sorts object keys so that you get the same result each time.
21747 @item Has no insignificant whitespace to make the output as small as possible.
21748 @item Escapes only the characters that must be escaped, U+0000 to
21749 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21750 @item Uses the shortest escape sequence for each escaped character.
21751 @item Encodes the JSON as UTF-8.
21752 @item Can encode frozendict immutable dictionaries.
21753 @end itemize")
21754 (license license:asl2.0)))
21755
21756 (define-public python-signedjson
21757 (package
21758 (name "python-signedjson")
21759 (version "1.1.1")
21760 (source
21761 (origin
21762 (method url-fetch)
21763 (uri (pypi-uri "signedjson" version))
21764 (sha256
21765 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21766 (build-system python-build-system)
21767 (propagated-inputs
21768 `(("python-canonicaljson" ,python-canonicaljson)
21769 ("python-importlib-metadata" ,python-importlib-metadata)
21770 ("python-pynacl" ,python-pynacl)
21771 ("python-typing-extensions" ,python-typing-extensions)
21772 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21773 (native-inputs
21774 `(("python-setuptools-scm" ,python-setuptools-scm)))
21775 (home-page "https://github.com/matrix-org/python-signedjson")
21776 (synopsis "Sign JSON objects with ED25519 signatures")
21777 (description
21778 "Sign JSON objects with ED25519 signatures.
21779
21780 @itemize
21781 @item More than one entity can sign the same object.
21782 @item Each entity can sign the object with more than one key making it easier to
21783 rotate keys
21784 @item ED25519 can be replaced with a different algorithm.
21785 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21786 key.
21787 @end itemize")
21788 (license license:asl2.0)))
21789
21790 (define-public python-daemonize
21791 (package
21792 (name "python-daemonize")
21793 (version "2.5.0")
21794 (source
21795 (origin
21796 (method url-fetch)
21797 (uri (pypi-uri "daemonize" version))
21798 (sha256
21799 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21800 (build-system python-build-system)
21801 (home-page "https://github.com/thesharp/daemonize")
21802 (synopsis "Library for writing system daemons in Python")
21803 (description "Daemonize is a library for writing system daemons in Python.")
21804 (license license:expat)))
21805
21806 (define-public python-pymacaroons
21807 (package
21808 (name "python-pymacaroons")
21809 (version "0.13.0")
21810 (source
21811 (origin
21812 (method url-fetch)
21813 (uri (pypi-uri "pymacaroons" version))
21814 (sha256
21815 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21816 (build-system python-build-system)
21817 (propagated-inputs
21818 `(("python-six" ,python-six)
21819 ("python-pynacl" ,python-pynacl)))
21820 (home-page "https://github.com/ecordell/pymacaroons")
21821 (synopsis "Python Macaroon Library")
21822 (description
21823 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21824 tokens, macaroons embed caveats that define specific authorization
21825 requirements for the target service, the service that issued the root macaroon
21826 and which is capable of verifying the integrity of macaroons it receives.
21827
21828 Macaroons allow for delegation and attenuation of authorization. They are
21829 simple and fast to verify, and decouple authorization policy from the
21830 enforcement of that policy.")
21831 (license license:expat)))
21832
21833 (define-public python-ldap3
21834 (package
21835 (name "python-ldap3")
21836 (version "2.7")
21837 (home-page "https://github.com/cannatag/ldap3")
21838 (source
21839 (origin
21840 (method git-fetch)
21841 (uri (git-reference (url home-page)
21842 (commit (string-append "v" version))))
21843 (file-name (git-file-name name version))
21844 (sha256
21845 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21846 (build-system python-build-system)
21847 (arguments
21848 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21849 #:phases (modify-phases %standard-phases
21850 (replace 'check
21851 (lambda* (#:key tests? #:allow-other-keys)
21852 (when tests?
21853 (invoke "nosetests" "-s" "test"))
21854 #t)))))
21855 (native-inputs
21856 `(("python-nose" ,python-nose)))
21857 (propagated-inputs
21858 `(("python-gssapi" ,python-gssapi)
21859 ("python-pyasn1" ,python-pyasn1)))
21860 (synopsis "Python LDAP client")
21861 (description
21862 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21863 library.")
21864 (license license:lgpl3+)))
21865
21866 (define-public python-boltons
21867 (package
21868 (name "python-boltons")
21869 (version "20.0.0")
21870 (source
21871 (origin
21872 (method url-fetch)
21873 (uri (pypi-uri "boltons" version))
21874 (sha256
21875 (base32
21876 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21877 (build-system python-build-system)
21878 (home-page "https://github.com/mahmoud/boltons")
21879 (synopsis "Extensions to the Python standard library")
21880 (description
21881 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21882 as — and yet conspicuously missing from — the standard library, including:
21883
21884 @itemize
21885 @item Atomic file saving, bolted on with fileutils
21886 @item A highly-optimized OrderedMultiDict, in dictutils
21887 @item Two types of PriorityQueue, in queueutils
21888 @item Chunked and windowed iteration, in iterutils
21889 @item Recursive data structure iteration and merging, with iterutils.remap
21890 @item Exponential backoff functionality, including jitter, through
21891 iterutils.backoff
21892 @item A full-featured TracebackInfo type, for representing stack traces, in
21893 tbutils
21894 @end itemize")
21895 (license license:bsd-3)))
21896
21897 (define-public python-eliot
21898 (package
21899 (name "python-eliot")
21900 (version "1.12.0")
21901 (source
21902 (origin
21903 (method url-fetch)
21904 (uri (pypi-uri "eliot" version))
21905 (sha256
21906 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21907 (build-system python-build-system)
21908 (arguments
21909 `(#:phases
21910 (modify-phases %standard-phases
21911 (add-after 'unpack 'remove-journald-support
21912 (lambda _
21913 (for-each delete-file
21914 '("eliot/tests/test_journald.py"
21915 "eliot/journald.py"))
21916 #t))
21917 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21918 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21919 ;; be installed and these tests should pass.
21920 (lambda _
21921 (delete-file "eliot/tests/test_prettyprint.py")
21922 #t)))))
21923 (propagated-inputs
21924 `(("python-boltons" ,python-boltons)
21925 ("python-pyrsistent" ,python-pyrsistent)
21926 ("python-six" ,python-six)
21927 ("python-zope-interface" ,python-zope-interface)))
21928 (native-inputs
21929 `(("python-black" ,python-black)
21930 ("python-coverage" ,python-coverage)
21931 ("python-dask" ,python-dask)
21932 ("python-flake8" ,python-flake8)
21933 ("python-hypothesis" ,python-hypothesis)
21934 ("python-pytest" ,python-pytest)
21935 ("python-setuptools" ,python-setuptools)
21936 ("python-sphinx" ,python-sphinx)
21937 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21938 ("python-testtools" ,python-testtools)
21939 ("python-twine" ,python-twine)
21940 ("python-twisted" ,python-twisted)))
21941 (home-page "https://github.com/itamarst/eliot/")
21942 (synopsis "Eliot: the logging system that tells you why it happened")
21943 (description
21944 "@dfn{eliot} is a Python logging system that outputs causal chains of
21945 actions: actions can spawn other actions, and eventually they either succeed
21946 or fail. The resulting logs tell you the story of what your software did: what
21947 happened, and what caused it.")
21948 (license license:asl2.0)))
21949
21950 (define-public python-pem
21951 (package
21952 (name "python-pem")
21953 (version "20.1.0")
21954 (source
21955 (origin
21956 (method url-fetch)
21957 (uri (pypi-uri "pem" version))
21958 (sha256
21959 (base32
21960 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21961 (build-system python-build-system)
21962 (native-inputs
21963 `(("python-certifi" ,python-certifi)
21964 ("python-coverage" ,python-coverage)
21965 ("python-pretend" ,python-pretend)
21966 ("python-pyopenssl" ,python-pyopenssl)
21967 ("python-pytest" ,python-pytest)
21968 ("python-sphinx" ,python-sphinx)
21969 ("python-twisted" ,python-twisted)))
21970 (home-page "https://pem.readthedocs.io/")
21971 (synopsis "Easy PEM file parsing in Python")
21972 (description
21973 "This package provides a Python module for parsing and splitting PEM files.")
21974 (license license:expat)))
21975
21976 (define-public python-txsni
21977 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21978 ;; Python and OpenSSL.
21979 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21980 (revision "0"))
21981 (package
21982 (name "python-txsni")
21983 (version (git-version "0.1.9" revision commit))
21984 (home-page "https://github.com/glyph/txsni")
21985 (source
21986 (origin
21987 (method git-fetch)
21988 (uri (git-reference (url home-page) (commit commit)))
21989 (file-name (git-file-name name version))
21990 (sha256
21991 (base32
21992 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21993 (build-system python-build-system)
21994 (propagated-inputs
21995 `(("python-pyopenssl" ,python-pyopenssl)
21996 ("python-service-identity" ,python-service-identity)
21997 ("python-twisted" ,python-twisted)))
21998 (synopsis "Run TLS servers with Twisted")
21999 (description
22000 "This package provides an easy-to-use SNI endpoint for use
22001 with the Twisted web framework.")
22002 (license license:expat))))
22003
22004 (define-public python-txacme
22005 (package
22006 (name "python-txacme")
22007 (version "0.9.2")
22008 (source
22009 (origin
22010 (method url-fetch)
22011 (uri (pypi-uri "txacme" version))
22012 (sha256
22013 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22014 (build-system python-build-system)
22015 (propagated-inputs
22016 `(("python-acme" ,python-acme)
22017 ("python-attrs" ,python-attrs)
22018 ("python-eliot" ,python-eliot)
22019 ("python-josepy" ,python-josepy)
22020 ("python-pem" ,python-pem)
22021 ("python-treq" ,python-treq)
22022 ("python-twisted" ,python-twisted)
22023 ("python-txsni" ,python-txsni)))
22024 (native-inputs
22025 `(("python-fixtures" ,python-fixtures)
22026 ("python-hypothesis" ,python-hypothesis)
22027 ("python-mock" ,python-mock)
22028 ("python-service-identity"
22029 ,python-service-identity)
22030 ("python-testrepository" ,python-testrepository)
22031 ("python-testscenarios" ,python-testscenarios)
22032 ("python-testtools" ,python-testtools)))
22033 (home-page "https://github.com/twisted/txacme")
22034 (synopsis "Twisted implexmentation of the ACME protocol")
22035 (description
22036 "ACME is Automatic Certificate Management Environment, a protocol that
22037 allows clients and certificate authorities to automate verification and
22038 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22039 Certificate Authority.
22040
22041 txacme is an implementation of the protocol for Twisted, the event-driven
22042 networking engine for Python.")
22043 (license license:expat)))
22044
22045 (define-public python-pysaml2
22046 (package
22047 (name "python-pysaml2")
22048 (version "5.0.0")
22049 (source
22050 (origin
22051 (method url-fetch)
22052 (uri (pypi-uri "pysaml2" version))
22053 (sha256
22054 (base32
22055 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22056 (build-system python-build-system)
22057 (propagated-inputs
22058 `(("python-cryptography" ,python-cryptography)
22059 ("python-dateutil" ,python-dateutil)
22060 ("python-defusedxml" ,python-defusedxml)
22061 ("python-pyopenssl" ,python-pyopenssl)
22062 ("python-pytz" ,python-pytz)
22063 ("python-requests" ,python-requests)
22064 ("python-six" ,python-six)))
22065 (home-page "https://idpy.org")
22066 (synopsis "Python implementation of SAML Version 2 Standard")
22067 (description
22068 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22069 It contains all necessary pieces for building a SAML2 service provider or
22070 an identity provider. The distribution contains examples of both.
22071
22072 This package was originally written to work in a WSGI environment, but
22073 there are extensions that allow you to use it with other frameworks.")
22074 (license license:asl2.0)))
22075
22076 (define-public python-click-plugins
22077 (package
22078 (name "python-click-plugins")
22079 (version "1.1.1")
22080 (source
22081 (origin
22082 (method url-fetch)
22083 (uri (pypi-uri "click-plugins" version))
22084 (sha256
22085 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22086 (build-system python-build-system)
22087 (native-inputs
22088 `(("python-pytest" ,python-pytest)))
22089 (propagated-inputs
22090 `(("python-click" ,python-click)))
22091 (synopsis "Extension for Click to register external CLI commands")
22092 (description "This package provides n extension module for Click to
22093 register external CLI commands via setuptools entry-points.")
22094 (home-page "https://github.com/click-contrib/click-plugins")
22095 (license license:bsd-3)))
22096
22097 (define-public python-diceware
22098 (package
22099 (name "python-diceware")
22100 (version "0.9.6")
22101 (source
22102 (origin
22103 (method url-fetch)
22104 (uri (pypi-uri "diceware" version))
22105 (sha256
22106 (base32
22107 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22108 (build-system python-build-system)
22109 (native-inputs
22110 `(("python-coverage" ,python-coverage)
22111 ("python-pytest" ,python-pytest)
22112 ("python-pytest-runner" ,python-pytest-runner)))
22113 (home-page "https://github.com/ulif/diceware/")
22114 (synopsis "Generates memorable passphrases")
22115 (description "This package generates passphrases by concatenating words
22116 randomly picked from wordlists. It supports several sources of
22117 randomness (including real life dice) and different wordlists (including
22118 cryptographically signed ones).")
22119 (license license:gpl3+)))
22120
22121 (define-public python-dictdiffer
22122 (package
22123 (name "python-dictdiffer")
22124 (version "0.8.1")
22125 (source (origin
22126 (method url-fetch)
22127 (uri (pypi-uri "dictdiffer" version))
22128 (sha256
22129 (base32
22130 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22131 (build-system python-build-system)
22132 (native-inputs
22133 `(("python-check-manifest" ,python-check-manifest)
22134 ("python-coverage" ,python-coverage)
22135 ("python-isort" ,python-isort)
22136 ("python-mock" ,python-mock)
22137 ("python-pydoctstyle" ,python-pydocstyle)
22138 ("python-pytest-cache" ,python-pytest-cache)
22139 ("python-pytest-cov" ,python-pytest-cov)
22140 ("python-pytest-pep8" ,python-pytest-pep8)
22141 ("python-pytest-runner" ,python-pytest-runner)
22142 ("python-pytest" ,python-pytest)
22143 ("python-setuptools-scm" ,python-setuptools-scm)
22144 ("python-tox" ,python-tox)))
22145 (home-page "https://github.com/inveniosoftware/dictdiffer")
22146 (synopsis "Diff and patch Python dictionary objects")
22147 (description
22148 "Dictdiffer is a Python module that helps you to diff and patch
22149 dictionaries.")
22150 (license license:expat)))
22151
22152 (define-public pyzo
22153 (package
22154 (name "pyzo")
22155 (version "4.11.0")
22156 (source
22157 (origin
22158 (method url-fetch)
22159 (uri (pypi-uri "pyzo" version))
22160 (sha256
22161 (base32 "0vzsk6rchavlvy7ciq1z9qh3qrj9q213v2nn491fgjq3g19glj53"))))
22162 (build-system python-build-system)
22163 (arguments
22164 `(#:phases
22165 (modify-phases %standard-phases
22166 (add-before 'check 'fix-home-directory
22167 (lambda _
22168 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22169 (setenv "HOME" "/tmp")
22170 #t)))
22171 ;; Tests fail with "Uncaught Python exception: python: undefined
22172 ;; symbol: objc_getClass".
22173 #:tests? #f))
22174 (propagated-inputs
22175 `(("python-pyqt" ,python-pyqt)))
22176 (home-page "https://pyzo.org")
22177 (synopsis
22178 "Python IDE for scientific computing")
22179 (description
22180 "Pyzo is a Python IDE focused on interactivity and introspection,
22181 which makes it very suitable for scientific computing. Its practical
22182 design is aimed at simplicity and efficiency.
22183
22184 It consists of two main components, the editor and the shell, and uses
22185 a set of pluggable tools to help the programmer in various ways. Some
22186 example tools are source structure, project manager, interactive help,
22187 workspace...")
22188 (license license:bsd-2)))
22189
22190 (define-public python-osc
22191 (package
22192 (name "python-osc")
22193 (version "1.7.4")
22194 (source
22195 (origin
22196 (method url-fetch)
22197 (uri (pypi-uri "python-osc" version))
22198 (sha256
22199 (base32
22200 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22201 (build-system python-build-system)
22202 (home-page "https://github.com/attwad/python-osc")
22203 (synopsis "Open Sound Control server and client implementations")
22204 (description
22205 "@code{python-osc} is a pure Python library with no external
22206 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22207 Open Sound Control 1.0} specification.")
22208 (license license:unlicense)))
22209
22210 (define-public python-voluptuous
22211 (package
22212 (name "python-voluptuous")
22213 (version "0.11.7")
22214 (source
22215 (origin
22216 (method url-fetch)
22217 (uri (pypi-uri "voluptuous" version))
22218 (sha256
22219 (base32
22220 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22221 (build-system python-build-system)
22222 (native-inputs
22223 `(("python-nose" ,python-nose)))
22224 (home-page "https://github.com/alecthomas/voluptuous")
22225 (synopsis "Python data validation library")
22226 (description
22227 "Voluptuous is a Python data validation library. It is primarily
22228 intended for validating data coming into Python as JSON, YAML, etc.")
22229 (license license:bsd-3)))
22230
22231 (define-public python-cmd2
22232 (package
22233 (name "python-cmd2")
22234 (version "1.0.2")
22235 (source
22236 (origin
22237 (method url-fetch)
22238 (uri (pypi-uri "cmd2" version))
22239 (sha256
22240 (base32
22241 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22242 (build-system python-build-system)
22243 (propagated-inputs
22244 `(("python-attrs" ,python-attrs)
22245 ("python-colorama" ,python-colorama)
22246 ("python-pyperclip" ,python-pyperclip)
22247 ("python-wcwidth" ,python-wcwidth)))
22248 (native-inputs
22249 `(("python-codecov" ,python-codecov)
22250 ("python-coverage" ,python-coverage)
22251 ("python-doc8" ,python-doc8)
22252 ("python-flake8" ,python-flake8)
22253 ("python-invoke" ,python-invoke)
22254 ("python-mock" ,python-mock)
22255 ("python-pytest" ,python-pytest)
22256 ("python-pytest-cov" ,python-pytest-cov)
22257 ("python-pytest-mock" ,python-pytest-mock)
22258 ("python-setuptools-scm" ,python-setuptools-scm)
22259 ("python-sphinx" ,python-sphinx)
22260 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22261 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22262 ("python-tox" ,python-tox)
22263 ("python-twine" ,python-twine)
22264 ("which" ,which)))
22265 (home-page "https://github.com/python-cmd2/cmd2")
22266 (synopsis "Tool for building interactive command line applications")
22267 (description
22268 "Cmd2 is a tool for building interactive command line applications in
22269 Python. Its goal is to make it quick and easy for developers to build
22270 feature-rich and user-friendly interactive command line applications. It
22271 provides a simple API which is an extension of Python's built-in @code{cmd}
22272 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22273 make your life easier and eliminates much of the boilerplate code which would
22274 be necessary when using @code{cmd}.")
22275 (license license:expat)))
22276
22277 (define-public python-pytidylib
22278 (package
22279 (name "python-pytidylib")
22280 (version "0.3.2")
22281 (source (origin
22282 (method url-fetch)
22283 (uri (pypi-uri "pytidylib" version))
22284 (sha256
22285 (base32
22286 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22287 (build-system python-build-system)
22288 (arguments
22289 '(#:phases
22290 (modify-phases %standard-phases
22291 (add-before 'build 'qualify-libtidy
22292 (lambda* (#:key inputs #:allow-other-keys)
22293 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22294 "/lib/libtidy.so")))
22295 (substitute* "tidylib/tidy.py"
22296 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22297 (format #f "'~a'" libtidy)))
22298 #t))))))
22299 (inputs `(("tidy" ,tidy)))
22300 (home-page "https://github.com/countergram/pytidylib")
22301 (synopsis "Python wrapper for HTML Tidy library")
22302 (description
22303 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22304 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22305 (license license:expat)))
22306
22307 (define-public python2-pytidylib
22308 (package-with-python2 python-pytidylib))
22309
22310 (define-public python-mujson
22311 (package
22312 (name "python-mujson")
22313 (version "1.4")
22314 (source
22315 (origin
22316 (method url-fetch)
22317 (uri (pypi-uri "mujson" version))
22318 (sha256
22319 (base32
22320 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22321 (build-system python-build-system)
22322 (home-page "https://github.com/mattgiles/mujson")
22323 (synopsis "Use the fastest JSON functions available at import time")
22324 (description "This package selects the fastest JSON functions available
22325 at import time.")
22326 (license license:expat)))
22327
22328 (define-public python-bashlex
22329 (package
22330 (name "python-bashlex")
22331 (version "0.14")
22332 (source
22333 (origin
22334 (method url-fetch)
22335 (uri (pypi-uri "bashlex" version))
22336 (sha256
22337 (base32
22338 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22339 (build-system python-build-system)
22340 (arguments
22341 `(#:phases
22342 (modify-phases %standard-phases
22343 (add-before 'build 'pregenerate-yacc-tables
22344 (lambda _
22345 ;; parser.py caches tables, which attempts to write to site lib
22346 ;; see https://github.com/idank/bashlex/issues/51
22347 (invoke "python" "-c" "import bashlex"))))))
22348 (home-page
22349 "https://github.com/idank/bashlex")
22350 (synopsis "Python parser for bash")
22351 (description "@code{bashlex} is a Python port of the parser used
22352 internally by GNU bash.
22353
22354 For the most part it's transliterated from C, the major differences are:
22355
22356 @itemize
22357 @item it does not execute anything
22358 @item it is reentrant
22359 @item it generates a complete AST
22360 @end itemize
22361 ")
22362 (license license:gpl3+)))
22363
22364 (define-public python-jinxed
22365 (package
22366 (name "python-jinxed")
22367 (version "1.0.0")
22368 (source
22369 (origin
22370 (method url-fetch)
22371 (uri (pypi-uri "jinxed" version))
22372 (sha256
22373 (base32
22374 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22375 (build-system python-build-system)
22376 (arguments
22377 '(#:phases
22378 (modify-phases %standard-phases
22379 (add-before 'check 'set-environment-variables
22380 (lambda* (#:key inputs #:allow-other-keys)
22381 (let ((ncurses (assoc-ref inputs "ncurses")))
22382 (setenv "TERM" "LINUX")
22383 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22384 #t))))
22385 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22386 (native-inputs
22387 `(("ncurses" ,ncurses)))
22388 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22389 (synopsis "Jinxed Terminal Library")
22390 (description
22391 "Jinxed is an implementation of a subset of the Python curses library.")
22392 (license license:mpl2.0)))
22393
22394 (define-public python-blessed
22395 (package
22396 (name "python-blessed")
22397 (version "1.17.8")
22398 (source
22399 (origin
22400 (method url-fetch)
22401 (uri (pypi-uri "blessed" version))
22402 (sha256
22403 (base32
22404 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22405 (modules '((guix build utils)))
22406 (snippet
22407 '(begin
22408 ;; Don't get hung up on Windows test failures.
22409 (delete-file "blessed/win_terminal.py") #t))))
22410 (build-system python-build-system)
22411 (propagated-inputs
22412 `(("python-jinxed" ,python-jinxed)
22413 ("python-six" ,python-six)
22414 ("python-wcwidth" ,python-wcwidth)))
22415 (native-inputs
22416 `(("python-mock" ,python-mock)
22417 ("python-pytest" ,python-pytest)))
22418 (home-page "https://github.com/jquast/blessed")
22419 (synopsis "Wrapper around terminal capabilities")
22420 (description
22421 "Blessed is a thin, practical wrapper around terminal styling, screen
22422 positioning, and keyboard input.")
22423 (license license:expat)))
22424
22425 (define-public python-readme-renderer
22426 (package
22427 (name "python-readme-renderer")
22428 (version "26.0")
22429 (source
22430 (origin
22431 (method url-fetch)
22432 (uri (pypi-uri "readme_renderer" version))
22433 (sha256
22434 (base32
22435 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22436 (build-system python-build-system)
22437 (propagated-inputs
22438 `(("python-bleach" ,python-bleach)
22439 ("python-docutils" ,python-docutils)
22440 ("python-pygments" ,python-pygments)
22441 ("python-six" ,python-six)))
22442 (native-inputs
22443 `(("python-mock" ,python-mock)
22444 ("python-pytest" ,python-pytest)))
22445 (home-page "https://github.com/pypa/readme_renderer")
22446 (synopsis "Render README files in Warehouse")
22447 (description
22448 "Readme Renderer is a library that will safely render arbitrary README
22449 files into HTML. It is designed to be used in Warehouse to render the
22450 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22451 and plain text.")
22452 (license license:asl2.0)))
22453
22454 (define-public python-lazr-delegates
22455 (package
22456 (name "python-lazr-delegates")
22457 (version "2.0.4")
22458 (source
22459 (origin
22460 (method url-fetch)
22461 (uri (pypi-uri "lazr.delegates" version))
22462 (sha256
22463 (base32
22464 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22465 (build-system python-build-system)
22466 (arguments
22467 '(#:phases
22468 (modify-phases %standard-phases
22469 (replace 'check
22470 (lambda _
22471 (invoke "python" "setup.py" "nosetests"))))))
22472 (native-inputs
22473 `(("python-nose" ,python-nose)))
22474 (propagated-inputs
22475 `(("python-zope-interface" ,python-zope-interface)))
22476 (home-page "https://launchpad.net/lazr.delegates")
22477 (synopsis "Easily write objects that delegate behavior")
22478 (description
22479 "The @code{lazr.delegates} package makes it easy to write objects that
22480 delegate behavior to another object. The new object adds some property or
22481 behavior on to the other object, while still providing the underlying interface,
22482 and delegating behavior.")
22483 (license license:lgpl3)))
22484
22485 (define-public python-lazr-config
22486 (package
22487 (name "python-lazr-config")
22488 (version "2.2.2")
22489 (source
22490 (origin
22491 (method url-fetch)
22492 (uri (pypi-uri "lazr.config" version))
22493 (sha256
22494 (base32
22495 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22496 (build-system python-build-system)
22497 (arguments
22498 '(#:phases
22499 (modify-phases %standard-phases
22500 (replace 'check
22501 (lambda _
22502 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22503 (native-inputs
22504 `(("python-nose" ,python-nose)))
22505 (propagated-inputs
22506 `(("python-lazr-delegates" ,python-lazr-delegates)
22507 ("python-zope-interface" ,python-zope-interface)))
22508 (home-page "https://launchpad.net/lazr.config")
22509 (synopsis "Create configuration schemas and process and validate configurations")
22510 (description
22511 "The LAZR config system is typically used to manage process configuration.
22512 Process configuration is for saying how things change when we run systems on
22513 different machines, or under different circumstances. This system uses ini-like
22514 file format of section, keys, and values. The config file supports inheritance
22515 to minimize duplication of information across files. The format supports schema
22516 validation.")
22517 (license license:lgpl3)))
22518
22519 (define-public python-flufl-bounce
22520 (package
22521 (name "python-flufl-bounce")
22522 (version "3.0.1")
22523 (source
22524 (origin
22525 (method url-fetch)
22526 (uri (pypi-uri "flufl.bounce" version))
22527 (sha256
22528 (base32
22529 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22530 (build-system python-build-system)
22531 (propagated-inputs
22532 `(("python-atpublic" ,python-atpublic)
22533 ("python-zope-interface" ,python-zope-interface)))
22534 (native-inputs
22535 `(("python-nose2" ,python-nose2)))
22536 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22537 (synopsis "Email bounce detectors")
22538 (description "The @code{flufl.bounce} library provides a set of heuristics
22539 and an API for detecting the original bouncing email addresses from a bounce
22540 message. Many formats found in the wild are supported, as are VERP and
22541 RFC 3464.")
22542 (license (list license:asl2.0
22543 license:lgpl3)))) ; only for setup_headers.py
22544
22545 (define-public python-flufl-i18n
22546 (package
22547 (name "python-flufl-i18n")
22548 (version "3.0")
22549 (source
22550 (origin
22551 (method url-fetch)
22552 (uri (pypi-uri "flufl.i18n" version))
22553 (sha256
22554 (base32
22555 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22556 (build-system python-build-system)
22557 (propagated-inputs
22558 `(("python-atpublic" ,python-atpublic)))
22559 (home-page "https://flufli18n.readthedocs.io")
22560 (synopsis "API for Python internationalization")
22561 (description
22562 "This package provides a high-level, convenient API for managing
22563 internationalization/translation contexts in Python applications. There is a
22564 simple API for single-context applications, such as command line scripts which
22565 only need to translate into one language during the entire course of their
22566 execution. There is a more flexible, but still convenient API for multi-context
22567 applications, such as servers, which may need to switch language contexts for
22568 different tasks.")
22569 (license license:asl2.0)))
22570
22571 (define-public python-flufl-lock
22572 (package
22573 (name "python-flufl-lock")
22574 (version "4.0")
22575 (source
22576 (origin
22577 (method url-fetch)
22578 (uri (pypi-uri "flufl.lock" version))
22579 (sha256
22580 (base32
22581 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22582 (build-system python-build-system)
22583 (propagated-inputs
22584 `(("python-atpublic" ,python-atpublic)
22585 ("python-psutil" ,python-psutil)))
22586 (home-page "https://flufllock.readthedocs.io")
22587 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22588 (description
22589 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22590 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22591 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22592 and have a maximum lifetime built-in.")
22593 (license (list license:asl2.0
22594 license:lgpl3)))) ; only for setup_helpers.py
22595
22596 (define-public python-flufl-testing
22597 (package
22598 (name "python-flufl-testing")
22599 (version "0.8")
22600 (source
22601 (origin
22602 (method url-fetch)
22603 (uri (pypi-uri "flufl.testing" version))
22604 (sha256
22605 (base32
22606 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22607 (build-system python-build-system)
22608 (native-inputs
22609 `(("python-nose2" ,python-nose2)))
22610 (home-page "https://gitlab.com/warsaw/flufl.testing")
22611 (synopsis "Collection of test tool plugins")
22612 (description
22613 "This package contains a small collection of test tool plugins for
22614 @code{nose2} and @code{flake8}.")
22615 (license license:asl2.0)))
22616
22617 (define-public python-devtools
22618 (package
22619 (name "python-devtools")
22620 (version "0.6")
22621 (source
22622 (origin
22623 (method git-fetch)
22624 (uri (git-reference
22625 (url "https://github.com/samuelcolvin/python-devtools")
22626 (commit (string-append "v" version))))
22627 (file-name (git-file-name name version))
22628 (sha256
22629 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22630 (build-system python-build-system)
22631 (native-inputs
22632 `(("python-pytest" ,python-pytest)
22633 ("python-pytest-mock" ,python-pytest-mock)))
22634 (propagated-inputs
22635 `(("python-pygments" ,python-pygments)))
22636 (arguments
22637 `(#:phases (modify-phases %standard-phases
22638 (replace 'check
22639 (lambda _
22640 (invoke "pytest")
22641 #t)))))
22642 (home-page "https://github.com/samuelcolvin/python-devtools")
22643 (synopsis "Debug command and development tools")
22644 (description
22645 "This package provides a debug print command and other development tools.
22646 It adds a simple and readable way to print stuff during development.")
22647 (license license:expat)))
22648
22649 (define-public python-dateparser
22650 (package
22651 (name "python-dateparser")
22652 (version "0.7.6")
22653 (source
22654 (origin
22655 (method url-fetch)
22656 (uri (pypi-uri "dateparser" version))
22657 (sha256
22658 (base32
22659 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22660 (build-system python-build-system)
22661 (propagated-inputs
22662 `(("python-dateutil" ,python-dateutil)
22663 ("python-pytz" ,python-pytz)
22664 ("python-regex" ,python-regex)
22665 ("python-ruamel.yaml" ,python-ruamel.yaml)
22666 ("python-tzlocal" ,python-tzlocal)))
22667 (native-inputs
22668 `(("python-mock" ,python-mock)
22669 ("python-parameterized" ,python-parameterized)
22670 ("tzdata" ,tzdata-for-tests)))
22671 (arguments
22672 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22673 #:tests? #f
22674 #:phases
22675 (modify-phases %standard-phases
22676 (add-before 'check 'set-check-environment
22677 (lambda* (#:key inputs #:allow-other-keys)
22678 (setenv "TZ" "UTC")
22679 (setenv "TZDIR"
22680 (string-append (assoc-ref inputs "tzdata")
22681 "/share/zoneinfo"))
22682 #t)))))
22683 (home-page "https://github.com/scrapinghub/dateparser")
22684 (synopsis
22685 "Date parsing library designed to parse dates from HTML pages")
22686 (description
22687 "@code{python-dateparser} provides modules to easily parse localized
22688 dates in almost any string formats commonly found on web pages.")
22689 (license license:bsd-3)))
22690
22691 (define-public python-dparse
22692 (package
22693 (name "python-dparse")
22694 (version "0.5.1")
22695 (source
22696 (origin
22697 (method url-fetch)
22698 (uri (pypi-uri "dparse" version))
22699 (sha256
22700 (base32
22701 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22702 (build-system python-build-system)
22703 (native-inputs
22704 `(("python-pytest" ,python-pytest)))
22705 (propagated-inputs
22706 `(("python-packaging" ,python-packaging)
22707 ("python-pyyaml" ,python-pyyaml)
22708 ("python-toml" ,python-toml)))
22709 (home-page "https://github.com/pyupio/dparse")
22710 (synopsis "Parser for Python dependency files")
22711 (description "This package provides a parser for Python dependency files.")
22712 (license license:expat)))
22713
22714 (define-public python-dpath
22715 (package
22716 (name "python-dpath")
22717 (version "2.0.1")
22718 (source
22719 (origin
22720 (method url-fetch)
22721 (uri (pypi-uri "dpath" version))
22722 (sha256
22723 (base32
22724 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22725 (build-system python-build-system)
22726 (native-inputs
22727 `(("python-hypothesis" ,python-hypothesis)
22728 ("python-mock" ,python-mock)
22729 ("python-nose" ,python-nose)))
22730 (arguments
22731 '(#:phases
22732 (modify-phases %standard-phases
22733 (replace 'check
22734 (lambda* (#:key inputs outputs #:allow-other-keys)
22735 (add-installed-pythonpath inputs outputs)
22736 ;; This invokation is taken from tox.ini.
22737 (invoke "nosetests" "-d" "-v" "tests/"))))))
22738 (home-page "https://github.com/akesterson/dpath-python")
22739 (synopsis "Filesystem-like pathing and searching for dictionaries")
22740 (description
22741 "@code{python-dpath} is a library for accessing and searching
22742 dictionaries via /slashed/paths ala xpath.
22743
22744 Basically it lets you glob over a dictionary as if it were a filesystem. It
22745 allows you to specify globs (ala the bash eglob syntax, through some advanced
22746 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22747 facility for filtering those results.")
22748 (license license:expat)))
22749
22750 (define-public python-safety
22751 (package
22752 (name "python-safety")
22753 (version "1.9.0")
22754 (source
22755 (origin
22756 (method url-fetch)
22757 (uri (pypi-uri "safety" version))
22758 (sha256
22759 (base32
22760 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22761 (build-system python-build-system)
22762 (arguments
22763 `(#:phases
22764 (modify-phases %standard-phases
22765 (add-after 'unpack 'disable-tests
22766 (lambda _
22767 (substitute* "tests/test_safety.py"
22768 ;; requires network
22769 (("def test_check_live") "def _test_check_live"))
22770 #t)))))
22771 (propagated-inputs
22772 `(("python-click" ,python-click)
22773 ("python-dparse" ,python-dparse)
22774 ("python-packaging" ,python-packaging)
22775 ("python-requests" ,python-requests)))
22776 (home-page "https://github.com/pyupio/safety")
22777 (synopsis "Check installed dependencies for known vulnerabilities")
22778 (description "Safety checks installed dependencies for known vulnerabilities.
22779 By default it uses the open Python vulnerability database Safety DB.")
22780 (license license:expat)))
22781
22782 (define-public python-pypandoc
22783 (package
22784 (name "python-pypandoc")
22785 (version "1.5")
22786 (source
22787 (origin
22788 (method url-fetch)
22789 (uri (pypi-uri "pypandoc" version))
22790 (sha256
22791 (base32
22792 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22793 (build-system python-build-system)
22794 (inputs
22795 `(("pandoc" ,pandoc)
22796 ("pandoc-citeproc" ,pandoc-citeproc)))
22797 (propagated-inputs
22798 `(("wheel" ,python-wheel)))
22799 (native-inputs
22800 `(("texlive" ,(texlive-union (list texlive-amsfonts
22801 texlive-fonts-ec
22802 texlive-latex-hyperref
22803 texlive-latex-oberdiek
22804 texlive-lm
22805 texlive-xcolor)))))
22806 (arguments
22807 `(#:phases
22808 (modify-phases %standard-phases
22809 (add-before 'check 'disable-tests
22810 (lambda _
22811 ;; Disable test requiring network access
22812 (substitute* "tests.py"
22813 (("test_basic_conversion_from_http_url")
22814 "skip_test_basic_conversion_from_http_url"))
22815 ;; Needed by texlive-union to generate fonts
22816 (setenv "HOME" "/tmp")
22817 #t)))))
22818 (home-page "https://github.com/bebraw/pypandoc")
22819 (synopsis "Python wrapper for pandoc")
22820 (description "pypandoc is a thin Python wrapper around pandoc
22821 and pandoc-citeproc.")
22822 (license license:expat)))
22823
22824 (define-public python-rnc2rng
22825 (package
22826 (name "python-rnc2rng")
22827 (version "2.6.4")
22828 (source
22829 (origin
22830 (method url-fetch)
22831 (uri (pypi-uri "rnc2rng" version))
22832 (sha256
22833 (base32
22834 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22835 (build-system python-build-system)
22836 (propagated-inputs
22837 `(("python-rply" ,python-rply)))
22838 (arguments
22839 `(#:phases (modify-phases %standard-phases
22840 (replace 'check
22841 (lambda _
22842 (invoke "python" "test.py"))))))
22843 (home-page "https://github.com/djc/rnc2rng")
22844 (synopsis "Convert RELAX NG Compact to regular syntax")
22845 (description
22846 "This package provides the @command{rnc2rng} command-line tool as well as
22847 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22848 equivalent schemata in the XML-based default RELAX NG syntax.")
22849 (license license:expat)))
22850
22851 (define-public python-telethon
22852 (package
22853 (name "python-telethon")
22854 (version "1.17.5")
22855 (source
22856 (origin
22857 (method git-fetch)
22858 (uri (git-reference
22859 (url "https://github.com/LonamiWebs/Telethon")
22860 (commit (string-append "v" version))))
22861 (file-name (git-file-name name version))
22862 (sha256
22863 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22864 (build-system python-build-system)
22865 (arguments
22866 '(#:phases
22867 (modify-phases %standard-phases
22868 (replace 'check
22869 (lambda* (#:key tests? #:allow-other-keys)
22870 (when tests?
22871 (invoke "py.test" "-v"))
22872 #t)))))
22873 (propagated-inputs
22874 `(("python-rsa" ,python-rsa)
22875 ("python-pyaes" ,python-pyaes)))
22876 (native-inputs
22877 `(("python-pytest" ,python-pytest)
22878 ("python-pytest-asyncio" ,python-pytest-asyncio)
22879 ("python-pytest-trio" ,python-pytest-trio)))
22880 (home-page "https://docs.telethon.dev")
22881 (synopsis "Full-featured Telegram client library for Python 3")
22882 (description "This library is designed to make it easy to write Python
22883 programs that can interact with Telegram.")
22884 (license license:expat)))
22885
22886 (define-public python-citeproc-py
22887 (package
22888 (name "python-citeproc-py")
22889 (version "0.5.1")
22890 (source
22891 (origin
22892 (method url-fetch)
22893 (uri (pypi-uri "citeproc-py" version))
22894 (sha256
22895 (base32
22896 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22897 (build-system python-build-system)
22898 (propagated-inputs
22899 `(("python-lxml" ,python-lxml)
22900 ("python-rnc2rng" ,python-rnc2rng)))
22901 (home-page
22902 "https://github.com/brechtm/citeproc-py")
22903 (synopsis "Citations and bibliography formatter")
22904 (description
22905 "Citeproc-py is a CSL processor for Python. It aims to implement the
22906 CSL 1.0.1 specification. citeproc-py can output styled citations and
22907 bibliographies in a number of different output formats. Currently supported
22908 are plain text, reStructuredText and HTML.")
22909 (license license:bsd-2)))
22910
22911 (define-public python-inform
22912 (package
22913 (name "python-inform")
22914 (version "1.23.0")
22915 (source
22916 (origin
22917 (method url-fetch)
22918 (uri (pypi-uri "inform" version))
22919 (sha256
22920 (base32
22921 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22922 (build-system python-build-system)
22923 (arguments
22924 `(#:tests? #f)) ; PyPI tarball lacks tests
22925 (native-inputs
22926 `(("python-hypothesis" ,python-hypothesis)
22927 ("python-pytest-cov" ,python-pytest-cov)
22928 ("python-pytest-runner" ,python-pytest-runner)))
22929 (propagated-inputs
22930 `(("python-arrow" ,python-arrow)
22931 ("python-six" ,python-six)))
22932 (home-page "https://inform.readthedocs.io")
22933 (synopsis "Print & logging utilities for communicating with user")
22934 (description
22935 "Inform is designed to display messages from programs that are typically run from
22936 a console. It provides a collection of ‘print’ functions that allow you to simply and
22937 cleanly print different types of messages.")
22938 (license license:gpl3+)))
22939
22940 (define-public python-nestedtext
22941 (package
22942 (name "python-nestedtext")
22943 (version "1.0.0")
22944 (source
22945 (origin
22946 (method url-fetch)
22947 (uri (pypi-uri "nestedtext" version))
22948 (sha256
22949 (base32
22950 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22951 (build-system python-build-system)
22952 (arguments
22953 `(#:tests? #f)) ; PyPI tarball lacks tests
22954 (propagated-inputs
22955 `(("python-inform" ,python-inform)))
22956 (home-page "https://nestedtext.org")
22957 (synopsis "Human readable and writable data interchange format")
22958 (description
22959 "NestedText is a file format for holding data that is to be entered, edited, or
22960 viewed by people. It allows data to be organized into a nested collection of
22961 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22962 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22963 NestedText is both simple and natural. Only a small number of concepts and rules must
22964 be kept in mind when creating it. It is easily created, modified, or viewed with
22965 a text editor and easily understood and used by both programmers and non-programmers.")
22966 (license license:expat))) ; MIT license
22967
22968 (define-public python-parallel
22969 (package
22970 (name "python-parallel")
22971 (version "1.6.4.4")
22972 (source
22973 (origin
22974 (method url-fetch)
22975 (uri (string-append
22976 "https://www.parallelpython.com/downloads/pp/pp-"
22977 version ".zip"))
22978 (sha256
22979 (base32
22980 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22981 (native-inputs
22982 `(("unzip" ,unzip)))
22983 (build-system python-build-system)
22984 (arguments '(#:tests? #f)) ; No test suite.
22985 (home-page "https://www.parallelpython.com")
22986 (synopsis "Parallel and distributed programming for Python")
22987 (description "Parallel Python module (PP) provides an easy and efficient
22988 way to create parallel-enabled applications for SMP computers and clusters.
22989 PP module features cross-platform portability and dynamic load balancing.
22990 Thus applications written with PP will parallelize efficiently even on
22991 heterogeneous and multi-platform clusters (including clusters running other
22992 applications with variable CPU loads).")
22993 (license license:bsd-3)))
22994
22995 (define-public python2-parallel
22996 (package-with-python2 python-parallel))
22997
22998 (define-public python-djvulibre
22999 (package
23000 (name "python-djvulibre")
23001 (version "0.8.5")
23002 (source
23003 (origin
23004 (method url-fetch)
23005 (uri (pypi-uri "python-djvulibre" version))
23006 (sha256
23007 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
23008 (build-system python-build-system)
23009 (native-inputs
23010 `(("ghostscript" ,ghostscript)
23011 ("pkg-config" ,pkg-config)
23012 ("python-nose" ,python-nose)))
23013 (inputs
23014 `(("djvulibre" ,djvulibre)
23015 ("python-cython" ,python-cython)))
23016 (arguments
23017 `(#:phases
23018 (modify-phases %standard-phases
23019 (add-after 'unpack 'fix-tests
23020 (lambda _
23021 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23022 ;; doesn't make sense on GNU/Linux.
23023 (delete-file "djvu/dllpath.py")
23024 #t)))))
23025 (synopsis "Python bindings for DjVuLibre")
23026 (description "This is a set of Python bindings for the DjVuLibre library.")
23027 (home-page "https://jwilk.net/software/python-djvulibre")
23028 (license license:gpl2)))
23029
23030 (define-public python2-djvulibre
23031 (package-with-python2 python-djvulibre))