Merge branch 'version-1.2.0'
[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.5.2")
3565 (source
3566 (origin
3567 (method url-fetch)
3568 (uri (pypi-uri "Pygments" version))
3569 (sha256
3570 (base32
3571 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
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
3582 (define-public python2-pygments
3583 (package-with-python2 python-pygments))
3584
3585 (define-public python-bumpversion
3586 (package
3587 (name "python-bumpversion")
3588 (version "0.5.3")
3589 (source
3590 (origin
3591 (method url-fetch)
3592 (uri (pypi-uri "bumpversion" version))
3593 (sha256
3594 (base32
3595 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3596 (build-system python-build-system)
3597 (home-page "https://github.com/peritus/bumpversion")
3598 (synopsis "Tool to bump software version")
3599 (description "This tool provides a command-line interface (CLI) to bump a
3600 software version simply.")
3601 (license license:expat)))
3602
3603 (define-public python-deprecated
3604 (package
3605 (name "python-deprecated")
3606 (version "1.2.5")
3607 (source
3608 (origin
3609 (method git-fetch)
3610 (uri (git-reference
3611 (url "https://github.com/tantale/deprecated")
3612 (commit (string-append "v" version))))
3613 (file-name (git-file-name name version))
3614 (sha256
3615 (base32
3616 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3617 (build-system python-build-system)
3618 (arguments
3619 `(#:phases (modify-phases %standard-phases
3620 (replace 'check
3621 (lambda _
3622 (invoke "pytest"))))))
3623 (propagated-inputs
3624 `(("python-wrapt" ,python-wrapt)))
3625 (native-inputs
3626 `(("python-bumpversion" ,python-bumpversion)
3627 ("python-pytest" ,python-pytest)
3628 ("python-pytest-cov" ,python-pytest-cov)
3629 ("python-sphinx" ,python-sphinx)
3630 ("python-tox" ,python-tox)))
3631 (home-page "https://github.com/tantale/deprecated")
3632 (synopsis "Python decorator to deprecate classes, functions or methods")
3633 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3634 to deprecate classes, functions or methods.")
3635 (license license:expat)))
3636
3637 (define-public python-pygithub
3638 (package
3639 (name "python-pygithub")
3640 (version "1.43.8")
3641 (source
3642 ;; We fetch from the Git repo because there are no tests in the PyPI
3643 ;; archive.
3644 (origin
3645 (method git-fetch)
3646 (uri (git-reference
3647 (url "https://github.com/PyGithub/PyGithub")
3648 (commit (string-append "v" version))))
3649 (file-name (git-file-name name version))
3650 (sha256
3651 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3652 (build-system python-build-system)
3653 (arguments
3654 `(#:phases (modify-phases %standard-phases
3655 ;; Some tests rely on the network.
3656 (add-after 'unpack 'disable-failing-tests
3657 (lambda _
3658 (substitute* "tests/Issue142.py"
3659 (("testDecodeJson") "disabled_testDecodeJson"))
3660 #t))
3661 (add-before 'check 'prepare-for-tests
3662 (lambda _
3663 (for-each (lambda (f)
3664 (chmod f #o666))
3665 (find-files "./tests"))
3666 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3667 (setenv "PYTHONPATH"
3668 (string-append "./tests:" (getenv "PYTHONPATH")))
3669 #t)))))
3670 (propagated-inputs
3671 `(("python-deprecated" ,python-deprecated)
3672 ("python-pyjwt" ,python-pyjwt)
3673 ("python-requests" ,python-requests)))
3674 (native-inputs `(("python-httpretty" ,python-httpretty)))
3675 (home-page "https://pygithub.readthedocs.io/en/latest/")
3676 (synopsis "Python library for the GitHub API")
3677 (description "This library allows managing GitHub resources such as
3678 repositories, user profiles, and organizations in your Python applications,
3679 using version 3 of the GitHub application programming interface (API).")
3680 (license license:lgpl3+)))
3681
3682 (define-public python-rellu
3683 (package
3684 (name "python-rellu")
3685 (version "0.7")
3686 (source
3687 (origin
3688 (method url-fetch)
3689 (uri (pypi-uri "rellu" version))
3690 (sha256
3691 (base32
3692 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3693 (build-system python-build-system)
3694 (propagated-inputs
3695 `(("python-invoke" ,python-invoke)
3696 ("python-pygithub" ,python-pygithub)))
3697 (home-page "https://github.com/robotframework/rellu")
3698 (synopsis "Utilities to create PyPI releases")
3699 (description "This collection of utilities contains tooling and templates
3700 to assist in creating releases on GitHub and publishing them on PyPI. It is
3701 designed to be used by Robot Framework and tools and libraries in its
3702 ecosystem, but can naturally be used also by other projects.")
3703 (license license:asl2.0)))
3704
3705 (define-public python-robotframework
3706 (package
3707 (name "python-robotframework")
3708 (version "3.2.2")
3709 ;; There are no tests in the PyPI archive.
3710 (source
3711 (origin
3712 (method git-fetch)
3713 (uri (git-reference
3714 (url "https://github.com/robotframework/robotframework")
3715 (commit (string-append "v" version))))
3716 (file-name (git-file-name name version))
3717 (sha256
3718 (base32 "0if0h3myb9m3hgmn1phrhq8pfp89kfqsaq32vmfdjkyjdj7y59ds"))
3719 (patches (search-patches
3720 "python-robotframework-source-date-epoch.patch"))))
3721 (build-system python-build-system)
3722 (arguments
3723 `(#:phases (modify-phases %standard-phases
3724 (add-before 'build 'build-and-install-doc
3725 (lambda* (#:key outputs #:allow-other-keys)
3726 (let* ((doc-output (assoc-ref outputs "doc"))
3727 (doc (string-append doc-output "/share/"
3728 ,name "-" ,version "/")))
3729 (invoke "invoke" "library-docs" "all")
3730 (mkdir-p doc)
3731 (copy-recursively "doc/libraries"
3732 (string-append doc "/libraries"))
3733 #t)))
3734 (replace 'check
3735 (lambda* (#:key inputs #:allow-other-keys)
3736 ;; Some tests require timezone data. Otherwise, they
3737 ;; look up /etc/localtime, which doesn't exist, and fail
3738 ;; with:
3739 ;;
3740 ;; OverflowError: mktime argument out of range
3741 (setenv "TZDIR"
3742 (string-append (assoc-ref inputs "tzdata")
3743 "/share/zoneinfo"))
3744 (setenv "TZ" "Europe/Paris")
3745
3746 (invoke "python" "utest/run.py"))))))
3747 (native-inputs
3748 `(("python-invoke" ,python-invoke)
3749 ("python-rellu" ,python-rellu)
3750 ("python:tk" ,python "tk") ;used when building the HTML doc
3751 ("tzdata" ,tzdata-for-tests)))
3752 (outputs '("out" "doc"))
3753 (home-page "https://robotframework.org")
3754 (synopsis "Generic automation framework")
3755 (description "Robot Framework is a generic automation framework for
3756 acceptance testing, acceptance test driven development (ATDD), and robotic
3757 process automation (RPA).")
3758 (license license:asl2.0)))
3759
3760 (define-public python-robotframework-lint
3761 ;; There is no properly tagged release; the commit below seems to correspond
3762 ;; to the 0.9 stable release available from PyPI. The tests are not
3763 ;; included in the PyPI archive, so we fetch the sources from the upstream
3764 ;; Git repo.
3765 (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
3766 (revision "0"))
3767 (package
3768 (name "python-robotframework-lint")
3769 (version (git-version "1.1" ;version taken from 'rflint/version.py'
3770 revision commit))
3771 (source
3772 (origin
3773 (method git-fetch)
3774 (uri (git-reference
3775 (url "https://github.com/boakley/robotframework-lint")
3776 (commit commit)))
3777 (file-name (git-file-name name version))
3778 (sha256
3779 (base32
3780 "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
3781 (build-system python-build-system)
3782 (arguments
3783 `(#:phases
3784 (modify-phases %standard-phases
3785 (replace 'check
3786 (lambda _
3787 (invoke "python" "-m" "robot" "-A"
3788 "tests/conf/default.args" "tests"))))))
3789 (propagated-inputs
3790 `(("python-robotframework" ,python-robotframework)))
3791 (home-page "https://github.com/boakley/robotframework-lint/")
3792 (synopsis "Static analysis tool (linter) for Robot Framework")
3793 (description "This package provides the @code{rflint} command-line
3794 utility, a static analysis tool (linter) for Robot Framework source files.")
3795 (license license:asl2.0))))
3796
3797 (define-public python-robotframework-sshlibrary
3798 (package
3799 (name "python-robotframework-sshlibrary")
3800 (version "3.3.0")
3801 ;; There are no tests in the PyPI archive.
3802 (source
3803 (origin
3804 (method git-fetch)
3805 (uri (git-reference
3806 (url "https://github.com/robotframework/SSHLibrary")
3807 (commit (string-append "v" version))))
3808 (file-name (git-file-name name version))
3809 (sha256
3810 (base32
3811 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3812 (build-system python-build-system)
3813 (arguments
3814 `(#:phases
3815 (modify-phases %standard-phases
3816 (add-before 'build 'build-and-install-doc
3817 (lambda* (#:key outputs #:allow-other-keys)
3818 (let* ((doc-output (assoc-ref outputs "doc"))
3819 (doc (string-append doc-output "/share/"
3820 ,name "-" ,version "/")))
3821 (invoke "chmod" "-R" "+w" "docs")
3822 (invoke "invoke" "kw-docs" "project-docs")
3823 (mkdir-p doc)
3824 (for-each delete-file (find-files "docs" "\\.rst"))
3825 (copy-recursively "docs" doc)
3826 #t)))
3827 (replace 'check
3828 (lambda _
3829 ;; Some tests require an SSH server; we remove them.
3830 (delete-file "utest/test_client_api.py")
3831 (delete-file "utest/test_scp.py")
3832 (invoke "python" "utest/run.py"))))))
3833 (propagated-inputs
3834 `(("python-robotframework" ,python-robotframework)
3835 ("python-paramiko" ,python-paramiko)
3836 ("python-scp" ,python-scp)))
3837 (native-inputs
3838 `(("openssh" ,openssh)
3839 ("which" ,which)
3840 ;; To generate the documentation
3841 ("python-docutils" ,python-docutils)
3842 ("python-invoke" ,python-invoke)
3843 ("python-pygments" ,python-pygments)
3844 ("python-rellu" ,python-rellu)))
3845 (outputs '("out" "doc"))
3846 (home-page "https://github.com/robotframework/SSHLibrary")
3847 (synopsis "Robot Framework library for SSH and SFTP")
3848 (description "SSHLibrary is a Robot Framework library providing support
3849 for SSH and SFTP. It has the following main usages:
3850 @itemize @bullet
3851 @item Executing commands on the remote machine, either blocking or non-blocking.
3852 @item Writing and reading in an interactive shell.
3853 @item Transferring files and directories over SFTP.
3854 @item Ensuring that files and directories exist on the remote machine.
3855 @end itemize")
3856 (license license:asl2.0)))
3857
3858 (define-public python-rstr
3859 (package
3860 (name "python-rstr")
3861 (version "2.2.6")
3862 (source
3863 (origin
3864 (method url-fetch)
3865 (uri (pypi-uri "rstr" version))
3866 (sha256
3867 (base32
3868 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3869 (build-system python-build-system)
3870 (home-page
3871 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3872 (synopsis "Generate random strings in Python")
3873 (description "This package provides a python module for generating
3874 random strings of various types. It could be useful for fuzz testing,
3875 generating dummy data, or other applications. It has no dependencies
3876 outside the standard library.")
3877 (license license:bsd-3)))
3878
3879 (define-public python-scp
3880 (package
3881 (name "python-scp")
3882 (version "0.13.3")
3883 (source
3884 (origin
3885 (method url-fetch)
3886 (uri (pypi-uri "scp" version))
3887 (sha256
3888 (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
3889 (build-system python-build-system)
3890 (arguments
3891 '(#:tests? #f)) ;tests require an SSH server
3892 (propagated-inputs
3893 `(("python-paramiko" ,python-paramiko)))
3894 (home-page "https://github.com/jbardin/scp.py")
3895 (synopsis "SCP protocol module for Python and Paramiko")
3896 (description "The scp module extends the Paramiko library to send and
3897 receive files via the SCP1 protocol, as implemented by the OpenSSH
3898 @command{scp} program.")
3899 (license license:gpl2+)))
3900
3901 (define-public python-rst.linker
3902 (package
3903 (name "python-rst.linker")
3904 (version "1.11")
3905 (source
3906 (origin
3907 (method url-fetch)
3908 (uri (pypi-uri "rst.linker" version))
3909 (sha256
3910 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3911 (build-system python-build-system)
3912 (propagated-inputs
3913 `(("python-dateutil" ,python-dateutil)
3914 ("python-six" ,python-six)))
3915 (native-inputs
3916 `(("python-setuptools-scm" ,python-setuptools-scm)))
3917 ;; Test would require path.py, which would introduce a cyclic dependence.
3918 (arguments `(#:tests? #f))
3919 ;; Note: As of version 1.7 the documentation is not worth building.
3920 (home-page "https://github.com/jaraco/rst.linker")
3921 (synopsis "Sphinx plugin to add links and timestamps")
3922 (description "rst.linker automatically replaces text by a
3923 reStructuredText external reference or timestamps. It's primary purpose is to
3924 augment the changelog, but it can be used for other documents, too.")
3925 (license license:expat)))
3926
3927 (define-public python2-rst.linker
3928 (package-with-python2 python-rst.linker))
3929
3930 (define-public python-sshpubkeys
3931 (package
3932 (name "python-sshpubkeys")
3933 (version "3.1.0")
3934 (home-page "https://github.com/ojarva/python-sshpubkeys")
3935 (source (origin
3936 (method git-fetch)
3937 (uri (git-reference
3938 (url home-page)
3939 (commit (string-append "v" version))))
3940 (file-name (git-file-name name version))
3941 (sha256
3942 (base32
3943 "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
3944 (build-system python-build-system)
3945 (propagated-inputs
3946 `(("python-cryptography" ,python-cryptography)
3947 ("python-ecdsa" ,python-ecdsa)))
3948 (synopsis "OpenSSH public key parser")
3949 (description
3950 "This package provides a library for parsing and validating OpenSSH
3951 public key files.")
3952 (license license:bsd-3)))
3953
3954 (define-public python-feedgenerator
3955 (package
3956 (name "python-feedgenerator")
3957 (version "1.9")
3958 (source
3959 (origin
3960 (method url-fetch)
3961 (uri (pypi-uri "feedgenerator" version))
3962 (sha256
3963 (base32
3964 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3965 (modules '((guix build utils)))
3966 (snippet
3967 '(begin
3968 ;; Remove pre-compiled .pyc files from source.
3969 (for-each delete-file-recursively
3970 (find-files "." "__pycache__" #:directories? #t))
3971 (for-each delete-file (find-files "." "\\.pyc$"))
3972 #t))))
3973 (build-system python-build-system)
3974 (propagated-inputs
3975 `(("python-pytz" ,python-pytz)
3976 ("python-six" ,python-six)))
3977 (home-page "https://github.com/getpelican/feedgenerator")
3978 (synopsis
3979 "Standalone version of Django's Atom/RSS feed generator")
3980 (description
3981 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3982 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3983 (license license:bsd-3)))
3984
3985 (define-public python2-feedgenerator
3986 (package-with-python2 python-feedgenerator))
3987
3988 (define-public python-toml
3989 (package
3990 (name "python-toml")
3991 (version "0.10.1")
3992 (source
3993 (origin
3994 (method url-fetch)
3995 (uri (pypi-uri "toml" version))
3996 (sha256
3997 (base32
3998 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3999 (build-system python-build-system)
4000 (arguments
4001 `(#:tests? #f)) ;no tests suite in release
4002 (home-page "https://github.com/uiri/toml")
4003 (synopsis "Library for TOML")
4004 (description
4005 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
4006 Language (TOML) configuration files.")
4007 (license license:expat)))
4008
4009 (define-public python-jsonrpc-server
4010 (package
4011 (name "python-jsonrpc-server")
4012 (version "0.3.4")
4013 (source
4014 (origin
4015 (method url-fetch)
4016 (uri (pypi-uri "python-jsonrpc-server" version))
4017 (sha256
4018 (base32
4019 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
4020 (build-system python-build-system)
4021 (propagated-inputs
4022 `(("python-mock" ,python-mock)
4023 ("python-pytest" ,python-pytest)
4024 ("python-ujson" ,python-ujson-1)))
4025 (home-page
4026 "https://github.com/palantir/python-jsonrpc-server")
4027 (synopsis "JSON RPC 2.0 server library")
4028 (description
4029 "This package provides a JSON RPC 2.0 server library for Python.")
4030 (license license:expat)))
4031
4032 (define-public python-pydantic
4033 (package
4034 (name "python-pydantic")
4035 (version "1.6.1")
4036 (source
4037 (origin
4038 (method git-fetch)
4039 (uri (git-reference
4040 (url "https://github.com/samuelcolvin/pydantic")
4041 (commit (string-append "v" version))))
4042 (file-name (git-file-name name version))
4043 (sha256
4044 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
4045 (build-system python-build-system)
4046 (arguments
4047 '(#:phases
4048 (modify-phases %standard-phases
4049 ;; Reported upstream:
4050 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
4051 ;; Disable the faulty test as the fix is unclear.
4052 (add-before 'check 'disable-test
4053 (lambda _
4054 (substitute* "tests/test_validators.py"
4055 (("test_assert_raises_validation_error")
4056 "_test_assert_raises_validation_error"))
4057 #t))
4058 (replace 'check
4059 (lambda _ (invoke "pytest" "-vv" "tests"))))))
4060 (native-inputs
4061 `(("python-pytest" ,python-pytest)))
4062 (home-page "https://github.com/samuelcolvin/pydantic")
4063 (synopsis "Python data validation and settings management")
4064 (description
4065 "Pydantic enforces type hints at runtime, and provides user friendly
4066 errors when data is invalid.")
4067 (license license:expat)))
4068
4069 (define-public python-pydocstyle
4070 (package
4071 (name "python-pydocstyle")
4072 (version "3.0.0")
4073 (source
4074 (origin
4075 (method url-fetch)
4076 (uri (pypi-uri "pydocstyle" version))
4077 (sha256
4078 (base32
4079 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
4080 (build-system python-build-system)
4081 (propagated-inputs
4082 `(("python-six" ,python-six)
4083 ("python-snowballstemmer" ,python-snowballstemmer)))
4084 (home-page
4085 "https://github.com/PyCQA/pydocstyle/")
4086 (synopsis "Python docstring style checker")
4087 (description
4088 "This package provides a style checker for the Python Language
4089 Server (PLS).")
4090 (license license:expat)))
4091
4092 (define-public python-language-server
4093 (package
4094 (name "python-language-server")
4095 (version "0.34.1")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "python-language-server" version))
4100 (sha256
4101 (base32
4102 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
4103 (build-system python-build-system)
4104 (propagated-inputs
4105 `(("python-pluggy" ,python-pluggy)
4106 ("python-jsonrpc-server" ,python-jsonrpc-server)
4107 ("python-jedi" ,python-jedi)
4108 ("python-yapf" ,python-yapf)
4109 ("python-pyflakes" ,python-pyflakes)
4110 ("python-pydocstyle" ,python-pydocstyle)
4111 ("python-pycodestyle" ,python-pycodestyle)
4112 ("python-mccabe" ,python-mccabe)
4113 ("python-rope" ,python-rope)
4114 ("python-autopep8" ,python-autopep8)
4115 ("python-flake8" ,python-flake8)
4116 ("python-pylint" ,python-pylint)))
4117 (home-page "https://github.com/palantir/python-language-server")
4118 (synopsis "Python implementation of the Language Server Protocol")
4119 (description
4120 "The Python Language Server (pyls) is an implementation of the Python 3
4121 language specification for the Language Server Protocol (LSP). This tool is
4122 used in text editing environments to provide a complete and integrated
4123 feature-set for programming Python effectively.")
4124 (license license:expat)))
4125
4126 (define-public python-pathspec
4127 (package
4128 (name "python-pathspec")
4129 (version "0.7.0")
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (pypi-uri "pathspec" version))
4134 (sha256
4135 (base32
4136 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4137 (build-system python-build-system)
4138 (home-page "https://github.com/cpburnz/python-path-specification")
4139 (synopsis "Utility library for gitignore style pattern matching of file paths")
4140 (description
4141 "This package provides a utility library for gitignore style pattern
4142 matching of file paths.")
4143 (license license:mpl2.0)))
4144
4145 (define-public python-black
4146 (package
4147 (name "python-black")
4148 (version "20.8b1")
4149 (source
4150 (origin
4151 (method url-fetch)
4152 (uri (pypi-uri "black" version))
4153 (sha256
4154 (base32
4155 "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"))))
4156 (build-system python-build-system)
4157 (arguments
4158 `(#:phases
4159 (modify-phases %standard-phases
4160 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4161 (lambda _
4162 (let ((python3 (which "python3")))
4163 (substitute* '("tests/data/fmtonoff.py"
4164 "tests/data/string_prefixes.py"
4165 "tests/data/function.py"
4166 "tests/data/python37.py")
4167 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4168 (string-append "#!" python3 (if (string? minor-version)
4169 minor-version
4170 "")))))
4171 #t))
4172 (add-after 'unpack 'disable-broken-tests
4173 (lambda* (#:key outputs inputs #:allow-other-keys)
4174 ;; Make installed package available for running the tests
4175 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4176 ":" (getenv "PATH")))
4177
4178 ;; These tests are supposed to be skipped when the blackd
4179 ;; dependencies are missing, but this doesn't quite work.
4180 (substitute* "tests/test_black.py"
4181 (("( *)class BlackDTestCase.*" match indent)
4182 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4183 indent "class BlackDTestCase(unittest.TestCase):\n"))
4184 (("web.Application") "False")
4185 (("@unittest_run_loop") ""))
4186
4187 ;; Patching the above file breaks the self test
4188 (substitute* "tests/test_black.py"
4189 (("( *)def test_self" match indent)
4190 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4191
4192 (substitute* "tests/test_black.py"
4193 (("( *)def test_python38" match indent)
4194 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4195 #t)))))
4196 (propagated-inputs
4197 `(("python-click" ,python-click)
4198 ("python-attrs" ,python-attrs)
4199 ("python-appdirs" ,python-appdirs)
4200 ("python-pathspec" ,python-pathspec)
4201 ("python-mypy-extensions" ,python-mypy-extensions)
4202 ("python-regex" ,python-regex)
4203 ("python-toml" ,python-toml)
4204 ("python-typed-ast" ,python-typed-ast)
4205 ("python-typing-extensions" ,python-typing-extensions)))
4206 (native-inputs
4207 `(("python-setuptools-scm" ,python-setuptools-scm)))
4208 (home-page "https://github.com/ambv/black")
4209 (synopsis "The uncompromising code formatter")
4210 (description "Black is the uncompromising Python code formatter.")
4211 (license license:expat)))
4212
4213 (define-public python-black-macchiato
4214 (package
4215 (name "python-black-macchiato")
4216 (version "1.3.0")
4217 (source
4218 (origin
4219 (method url-fetch)
4220 (uri (pypi-uri "black-macchiato" version))
4221 (sha256
4222 (base32
4223 "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
4224 (build-system python-build-system)
4225 (propagated-inputs
4226 `(("python-black" ,python-black)))
4227 (home-page "https://github.com/wbolster/black-macchiato")
4228 (synopsis "Partial @code{python-black} formatting")
4229 (description
4230 "This package is built on top the @{python-black} code formatter to
4231 enable formatting of partial files.")
4232 (license license:bsd-3)))
4233
4234 (define-public python-blinker
4235 (package
4236 (name "python-blinker")
4237 (version "1.4")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "blinker" version))
4242 (sha256
4243 (base32
4244 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4245 (build-system python-build-system)
4246 (home-page "https://pythonhosted.org/blinker/")
4247 (synopsis "Fast, simple object-to-object and broadcast signaling")
4248 (description
4249 "Blinker provides a fast dispatching system that allows any number of
4250 interested parties to subscribe to events, or \"signals\".")
4251 (license license:expat)))
4252
4253 (define-public python2-blinker
4254 (package-with-python2 python-blinker))
4255
4256 (define-public pelican
4257 (package
4258 (name "pelican")
4259 (version "4.2.0")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "pelican" version))
4264 (sha256
4265 (base32
4266 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4267 (build-system python-build-system)
4268 (propagated-inputs
4269 `(("python-blinker" ,python-blinker)
4270 ("python-dateutil" ,python-dateutil)
4271 ("python-docutils" ,python-docutils)
4272 ("python-feedgenerator" ,python-feedgenerator)
4273 ("python-jinja2" ,python-jinja2)
4274 ("python-markdown" ,python-markdown)
4275 ("python-pygments" ,python-pygments)
4276 ("python-pytz" ,python-pytz)
4277 ("python-six" ,python-six)
4278 ("python-unidecode" ,python-unidecode)))
4279 (home-page "https://getpelican.com/")
4280 (arguments
4281 `(;; XXX Requires a lot more packages to do unit tests :P
4282 #:tests? #f))
4283 (synopsis "Python-based static site publishing system")
4284 (description
4285 "Pelican is a tool to generate a static blog from reStructuredText,
4286 Markdown input files, and more. Pelican uses Jinja2 for templating
4287 and is very extensible.")
4288 (license license:agpl3+)))
4289
4290 (define-public mallard-ducktype
4291 (package
4292 (name "mallard-ducktype")
4293 (version "1.0.2")
4294 (source
4295 (origin
4296 (method git-fetch)
4297 ;; git-reference because tests are not included in pypi source tarball
4298 ;; https://issues.guix.gnu.org/issue/36755#2
4299 (uri (git-reference
4300 (url "https://github.com/projectmallard/mallard-ducktype")
4301 (commit version)))
4302 (file-name (git-file-name name version))
4303 (sha256
4304 (base32
4305 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4306 (build-system python-build-system)
4307 (arguments
4308 '(#:phases
4309 (modify-phases %standard-phases
4310 (replace 'check
4311 (lambda _
4312 (with-directory-excursion "tests"
4313 (invoke "sh" "runtests")))))))
4314 (home-page "http://projectmallard.org")
4315 (synopsis "Convert Ducktype to Mallard documentation markup")
4316 (description
4317 "Ducktype is a lightweight syntax that can represent all the semantics
4318 of the Mallard XML documentation system. Ducktype files can be converted to
4319 Mallard using the @command{ducktype} tool. The yelp-tools package
4320 provides additional functionality on the produced Mallard documents.")
4321 (license license:expat)))
4322
4323 (define-public python-cython
4324 (package
4325 (name "python-cython")
4326 (version "0.29.17")
4327 (source
4328 (origin
4329 (method url-fetch)
4330 (uri (pypi-uri "Cython" version))
4331 (sha256
4332 (base32
4333 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4334 (build-system python-build-system)
4335 ;; we need the full python package and not just the python-wrapper
4336 ;; because we need libpython3.3m.so
4337 (inputs
4338 `(("python" ,python)))
4339 (arguments
4340 `(#:phases
4341 (modify-phases %standard-phases
4342 (add-before 'check 'set-HOME
4343 ;; some tests require access to "$HOME/.cython"
4344 (lambda _ (setenv "HOME" "/tmp") #t))
4345 (replace 'check
4346 (lambda _
4347 ;; Disable compiler optimizations to greatly reduce the running
4348 ;; time of the test suite.
4349 (setenv "CFLAGS" "-O0")
4350
4351 (invoke "python" "runtests.py" "-vv"
4352 "-j" (number->string (parallel-job-count))
4353 ;; XXX: On 32-bit architectures, running the parallel tests
4354 ;; fails on many-core systems, see
4355 ;; <https://github.com/cython/cython/issues/2807>.
4356 ,@(if (not (target-64bit?))
4357 '("-x" "run.parallel")
4358 '())))))))
4359 (home-page "https://cython.org/")
4360 (synopsis "C extensions for Python")
4361 (description "Cython is an optimising static compiler for both the Python
4362 programming language and the extended Cython programming language. It makes
4363 writing C extensions for Python as easy as Python itself.")
4364 (license license:asl2.0)
4365 (properties `((python2-variant . ,(delay python2-cython))))))
4366
4367 (define-public python2-cython
4368 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4369 (package
4370 (inherit base)
4371 (name "python2-cython")
4372 (inputs
4373 `(("python-2" ,python-2))) ;this is not automatically changed
4374 (arguments
4375 (substitute-keyword-arguments (package-arguments base)
4376 ((#:phases phases)
4377 `(modify-phases ,phases
4378 (add-before 'check 'adjust-test_embed
4379 (lambda _
4380 (substitute* "runtests.py"
4381 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4382 ;; so it can give the right -L flag to GCC when embedding static
4383 ;; builds of Python. It is unaware that the Python "config"
4384 ;; directory (where the static library lives) was renamed in
4385 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4386 ;; which works fine, because that is where the shared library is.
4387 ;;
4388 ;; It also appears to be unaware that the Makefile in Demos/embed
4389 ;; already unconditionally pass the static library location to GCC,
4390 ;; after checking sysconfig.get_config_var('LIBPL).
4391 ;;
4392 ;; The effect is that the linker is unable to resolve libexpat
4393 ;; symbols when building for Python 2, because neither the Python 2
4394 ;; shared library nor Expat is available. To fix it, we can either
4395 ;; add Expat as an input and make it visible to the linker, or just
4396 ;; prevent it from overriding the Python shared library location.
4397 ;; The end result is identical, so we take the easy route.
4398 ((" or libname not in os\\.listdir\\(libdir\\)")
4399 ""))
4400 #t)))))))))
4401
4402 ;; The RPython toolchain currently does not support Python 3.
4403 (define-public python2-rpython
4404 (package
4405 (name "python2-rpython")
4406 (version "0.2.1")
4407 (source
4408 (origin
4409 (method url-fetch)
4410 (uri (pypi-uri "rpython" version))
4411 (sha256
4412 (base32
4413 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4414 (build-system python-build-system)
4415 (arguments `(#:python ,python-2))
4416 (native-inputs
4417 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4418 (home-page "https://rpython.readthedocs.org")
4419 (synopsis "Framework for implementing interpreters and virtual machines")
4420 (description "RPython is a translation and support framework for
4421 producing implementations of dynamic languages, emphasizing a clean separation
4422 between language specification and implementation aspects.")
4423 (license license:expat)))
4424
4425 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4426 ;; python-scipy still build, as these three packages are often used together.
4427 (define-public python-numpy
4428 (package
4429 (name "python-numpy")
4430 (version "1.17.3")
4431 (source
4432 (origin
4433 (method url-fetch)
4434 (uri (string-append
4435 "https://github.com/numpy/numpy/releases/download/v"
4436 version "/numpy-" version ".tar.gz"))
4437 (sha256
4438 (base32
4439 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4440 (build-system python-build-system)
4441 (inputs
4442 `(("openblas" ,openblas)
4443 ("lapack" ,lapack)))
4444 (native-inputs
4445 `(("python-cython" ,python-cython)
4446 ("python-pytest" ,python-pytest)
4447 ("gfortran" ,gfortran)))
4448 (arguments
4449 `(#:phases
4450 (modify-phases %standard-phases
4451 (add-before 'build 'configure-blas-lapack
4452 (lambda* (#:key inputs #:allow-other-keys)
4453 (call-with-output-file "site.cfg"
4454 (lambda (port)
4455 (format port
4456 "[openblas]
4457 libraries = openblas
4458 library_dirs = ~a/lib
4459 include_dirs = ~a/include
4460
4461 # backslash-n to make emacs happy
4462 \n[lapack]
4463 lapack_libs = lapack
4464 library_dirs = ~a/lib
4465 include_dirs = ~a/include
4466 "
4467 (assoc-ref inputs "openblas")
4468 (assoc-ref inputs "openblas")
4469 (assoc-ref inputs "lapack")
4470 (assoc-ref inputs "lapack"))))
4471 #t))
4472 (add-before 'build 'fix-executable-paths
4473 (lambda* (#:key inputs #:allow-other-keys)
4474 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4475 ;; instead of /bin/sh.
4476 (substitute* "numpy/distutils/exec_command.py"
4477 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4478 (string-append match-start (assoc-ref inputs "bash") match-end)))
4479 ;; Use "gcc" executable, not "cc".
4480 (substitute* "numpy/distutils/system_info.py"
4481 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4482 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4483 #t))
4484 ;; Tests can only be run after the library has been installed and not
4485 ;; within the source directory.
4486 (delete 'check)
4487 (add-after 'install 'check
4488 (lambda* (#:key outputs inputs #:allow-other-keys)
4489 ;; Make installed package available for running the tests
4490 (add-installed-pythonpath inputs outputs)
4491 ;; Make sure "f2py" etc is found.
4492 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4493 ":" (getenv "PATH")))
4494 (with-directory-excursion "/tmp"
4495 (invoke "python" "-c"
4496 "import numpy; numpy.test(verbose=2)")))))))
4497 (home-page "https://numpy.org")
4498 (synopsis "Fundamental package for scientific computing with Python")
4499 (description "NumPy is the fundamental package for scientific computing
4500 with Python. It contains among other things: a powerful N-dimensional array
4501 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4502 and Fortran code, useful linear algebra, Fourier transform, and random number
4503 capabilities.")
4504 (properties `((python2-variant . ,(delay python2-numpy))))
4505 (license license:bsd-3)))
4506
4507 ;; Numpy 1.16.x are the last versions that support Python 2.
4508 (define-public python2-numpy
4509 (let ((numpy (package-with-python2
4510 (strip-python2-variant python-numpy))))
4511 (package/inherit
4512 numpy
4513 (version "1.16.5")
4514 (source (origin
4515 (method url-fetch)
4516 (uri (string-append
4517 "https://github.com/numpy/numpy/releases/download/v"
4518 version "/numpy-" version ".tar.gz"))
4519 (sha256
4520 (base32
4521 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4522
4523 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4524 ;; interest only for legacy code going back to NumPy's predecessor
4525 ;; Numeric.
4526 (define-public python2-numpy-1.8
4527 (package (inherit python2-numpy)
4528 (version "1.8.2")
4529 (source
4530 (origin
4531 (method git-fetch)
4532 (uri (git-reference
4533 (url "https://github.com/numpy/numpy")
4534 (commit (string-append "v" version))))
4535 (file-name (git-file-name "numpy" version))
4536 (sha256
4537 (base32
4538 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4539 (arguments
4540 (substitute-keyword-arguments (package-arguments python2-numpy)
4541 ((#:phases phases)
4542 `(modify-phases ,phases
4543 (replace 'configure-blas-lapack
4544 (lambda* (#:key inputs #:allow-other-keys)
4545 (call-with-output-file "site.cfg"
4546 (lambda (port)
4547 (format port
4548 "[openblas]
4549 libraries = openblas,lapack
4550 library_dirs = ~a/lib:~a/lib
4551 include_dirs = ~a/include:~a/include
4552 "
4553 (assoc-ref inputs "openblas")
4554 (assoc-ref inputs "lapack")
4555 (assoc-ref inputs "openblas")
4556 (assoc-ref inputs "lapack"))))
4557 #t))))))
4558 (native-inputs
4559 `(("python2-nose" ,python2-nose)))
4560 (description "NumPy is the fundamental package for scientific computing
4561 with Python. It contains among other things: a powerful N-dimensional array
4562 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4563 and Fortran code, useful linear algebra, Fourier transform, and random number
4564 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4565 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4566 Numeric.")
4567 (license license:bsd-3)))
4568
4569 (define-public python-munch
4570 (package
4571 (name "python-munch")
4572 (version "2.0.4")
4573 (source
4574 (origin
4575 (method url-fetch)
4576 (uri (pypi-uri "munch" version))
4577 (sha256
4578 (base32
4579 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4580 (build-system python-build-system)
4581 (home-page "https://github.com/Infinidat/munch")
4582 (synopsis "Dot-accessible dictionary")
4583 (description "Munch is a dot-accessible dictionary similar to JavaScript
4584 objects.")
4585 (license license:expat)))
4586
4587 (define-public python2-munch
4588 (package-with-python2 python-munch))
4589
4590 (define-public python-colormath
4591 (package
4592 (name "python-colormath")
4593 (version "3.0.0")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (pypi-uri "colormath" version))
4598 (sha256
4599 (base32
4600 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4601 (build-system python-build-system)
4602 (propagated-inputs
4603 `(("python-networkx" ,python-networkx)
4604 ("python-numpy" ,python-numpy)))
4605 (home-page "https://github.com/gtaylor/python-colormath")
4606 (synopsis "Color math and conversion library")
4607 (description
4608 "This is a Python library for color math and conversions.")
4609 (license license:bsd-3)))
4610
4611 (define-public python2-colormath
4612 (package-with-python2 python-colormath))
4613
4614 (define-public python-spectra
4615 (package
4616 (name "python-spectra")
4617 (version "0.0.11")
4618 (source
4619 (origin
4620 (method url-fetch)
4621 (uri (pypi-uri "spectra" version))
4622 (sha256
4623 (base32
4624 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4625 (build-system python-build-system)
4626 (arguments
4627 `(#:phases
4628 (modify-phases %standard-phases
4629 (replace 'check
4630 (lambda _ (invoke "nosetests" "-v"))))))
4631 (propagated-inputs
4632 `(("python-colormath" ,python-colormath)))
4633 (native-inputs
4634 `(("python-nose" ,python-nose)))
4635 (home-page "https://github.com/jsvine/spectra")
4636 (synopsis "Color scales and color conversion")
4637 (description
4638 "This package provides a Python library intended to make color math,
4639 color scales, and color space conversion easy. It has support for:
4640
4641 @enumerate
4642 @item Color scales
4643 @item Color ranges
4644 @item Color blending
4645 @item Brightening/darkening colors
4646 @item Saturating/desaturating colors
4647 @item Conversion to/from multiple color spaces.
4648 @end enumerate\n")
4649 (license license:expat)))
4650
4651 (define-public python2-spectra
4652 (package-with-python2 python-spectra))
4653
4654 (define-public python-numpy-documentation
4655 (package
4656 (name "python-numpy-documentation")
4657 (version (package-version python-numpy))
4658 (source (package-source python-numpy))
4659 (build-system python-build-system)
4660 (native-inputs
4661 `(("python-matplotlib" ,python-matplotlib)
4662 ("python-numpy" ,python-numpy)
4663 ("pkg-config" ,pkg-config)
4664 ("python-sphinx" ,python-sphinx)
4665 ("python-numpydoc" ,python-numpydoc)
4666 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4667 texlive-fonts-ec
4668 texlive-generic-ifxetex
4669 texlive-generic-pdftex
4670 texlive-amsfonts
4671 texlive-latex-capt-of
4672 texlive-latex-cmap
4673 texlive-latex-environ
4674 texlive-latex-eqparbox
4675 texlive-latex-etoolbox
4676 texlive-latex-expdlist
4677 texlive-latex-fancyhdr
4678 texlive-latex-fancyvrb
4679 texlive-latex-fncychap
4680 texlive-latex-float
4681 texlive-latex-framed
4682 texlive-latex-geometry
4683 texlive-latex-graphics
4684 texlive-latex-hyperref
4685 texlive-latex-mdwtools
4686 texlive-latex-multirow
4687 texlive-latex-needspace
4688 texlive-latex-oberdiek
4689 texlive-latex-parskip
4690 texlive-latex-preview
4691 texlive-latex-tabulary
4692 texlive-latex-threeparttable
4693 texlive-latex-titlesec
4694 texlive-latex-trimspaces
4695 texlive-latex-ucs
4696 texlive-latex-upquote
4697 texlive-latex-url
4698 texlive-latex-varwidth
4699 texlive-latex-wrapfig)))
4700 ("texinfo" ,texinfo)
4701 ("perl" ,perl)
4702 ("scipy-sphinx-theme"
4703 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4704 (method git-fetch)
4705 (uri (git-reference
4706 (url "https://github.com/scipy/scipy-sphinx-theme")
4707 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4708 (sha256
4709 (base32
4710 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4711 ,@(package-native-inputs python-numpy)))
4712 (arguments
4713 `(#:tests? #f ; we're only generating the documentation
4714 #:phases
4715 (modify-phases %standard-phases
4716 (delete 'build)
4717 (replace 'install
4718 (lambda* (#:key inputs outputs #:allow-other-keys)
4719 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4720 (doc (string-append
4721 data "/doc/" ,name "-"
4722 ,(package-version python-numpy)))
4723 (info-reader (string-append data "/info"))
4724 (html (string-append doc "/html"))
4725 (scipy-sphinx-theme "scipy-sphinx-theme")
4726 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4727 (pyver ,(string-append "PYVER=")))
4728
4729 ;; FIXME: this is needed to for texlive-union to generate
4730 ;; fonts, which are not found.
4731 (setenv "HOME" "/tmp")
4732
4733 (with-directory-excursion "doc"
4734 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4735 (mkdir-p html)
4736 (invoke "make" "html" pyver)
4737 (invoke "make" "latex" "PAPER=a4" pyver)
4738 (invoke "make" "-C" "build/latex"
4739 "all-pdf" "PAPER=a4" pyver)
4740 ;; FIXME: Generation of the info file fails.
4741 ;; (invoke "make" "info" pyver)
4742 ;; (mkdir-p info)
4743 ;; (copy-file "build/texinfo/numpy.info"
4744 ;; (string-append info "/numpy.info"))
4745 (for-each (lambda (file)
4746 (copy-file (string-append "build/latex" file)
4747 (string-append doc file)))
4748 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4749 (with-directory-excursion "build/html"
4750 (for-each (lambda (file)
4751 (let* ((dir (dirname file))
4752 (tgt-dir (string-append html "/" dir)))
4753 (unless (equal? "." dir)
4754 (mkdir-p tgt-dir))
4755 (install-file file html)))
4756 (find-files "." ".*")))))
4757 #t)))))
4758 (home-page (package-home-page python-numpy))
4759 (synopsis "Documentation for the python-numpy package")
4760 (description (package-description python-numpy))
4761 (license (package-license python-numpy))))
4762
4763 (define-public python2-numpy-documentation
4764 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4765 (package
4766 (inherit numpy-documentation)
4767 (native-inputs `(("python2-functools32" ,python2-functools32)
4768 ,@(package-native-inputs numpy-documentation))))))
4769
4770 (define-public python-pygit2
4771 (package
4772 (name "python-pygit2")
4773 (version "1.1.0")
4774 (source
4775 (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "pygit2" version))
4778 (sha256
4779 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4780 (build-system python-build-system)
4781 (arguments
4782 '(#:tests? #f)) ; tests don't run correctly in our environment
4783 (propagated-inputs
4784 `(("python-cached-property" ,python-cached-property)
4785 ("python-cffi" ,python-cffi)
4786 ("libgit2" ,libgit2)))
4787 (native-inputs
4788 `(("python-pytest" ,python-pytest)))
4789 (home-page "https://github.com/libgit2/pygit2")
4790 (synopsis "Python bindings for libgit2")
4791 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4792 library, libgit2 implements Git plumbing.")
4793 ;; GPL2.0 only, with linking exception.
4794 (license license:gpl2)))
4795
4796 (define-public python-patiencediff
4797 (package
4798 (name "python-patiencediff")
4799 (version "0.2.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (pypi-uri "patiencediff" version))
4804 (sha256
4805 (base32
4806 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4807 (build-system python-build-system)
4808 (home-page "https://www.breezy-vcs.org/")
4809 (synopsis "Python implementation of the patiencediff algorithm")
4810 (description
4811 "This package contains a Python implementation of the @code{patiencediff}
4812 algorithm. Patiencediff provides a good balance of performance, nice output for
4813 humans, and implementation simplicity.")
4814 (license license:gpl2)))
4815
4816 (define-public python-pyparsing
4817 (package
4818 (name "python-pyparsing")
4819 (version "2.4.6")
4820 (source
4821 (origin
4822 (method url-fetch)
4823 (uri (pypi-uri "pyparsing" version))
4824 (sha256
4825 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4826 (build-system python-build-system)
4827 (outputs '("out" "doc"))
4828 (arguments
4829 `(#:tests? #f ; no test target
4830 #:phases
4831 (modify-phases %standard-phases
4832 (add-after 'install 'install-doc
4833 (lambda* (#:key outputs #:allow-other-keys)
4834 (let* ((doc (string-append (assoc-ref outputs "doc")
4835 "/share/doc/" ,name "-" ,version))
4836 (html-doc (string-append doc "/html"))
4837 (examples (string-append doc "/examples")))
4838 (mkdir-p html-doc)
4839 (mkdir-p examples)
4840 (for-each
4841 (lambda (dir tgt)
4842 (map (lambda (file)
4843 (install-file file tgt))
4844 (find-files dir ".*")))
4845 (list "docs" "htmldoc" "examples")
4846 (list doc html-doc examples))
4847 #t))))))
4848 (home-page "https://github.com/pyparsing/pyparsing")
4849 (synopsis "Python parsing class library")
4850 (description
4851 "The pyparsing module is an alternative approach to creating and
4852 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4853 of regular expressions. The pyparsing module provides a library of classes
4854 that client code uses to construct the grammar directly in Python code.")
4855 (license license:expat)))
4856
4857 (define-public python2-pyparsing
4858 (package-with-python2 python-pyparsing))
4859
4860 (define-public python-pyparsing-2.4.7
4861 (package
4862 (inherit python-pyparsing)
4863 (version "2.4.7")
4864 (source
4865 (origin
4866 (method url-fetch)
4867 (uri (pypi-uri "pyparsing" version))
4868 (sha256
4869 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4870
4871 (define-public python-numpydoc
4872 (package
4873 (name "python-numpydoc")
4874 (version "0.8.0")
4875 (source
4876 (origin
4877 (method url-fetch)
4878 (uri (pypi-uri "numpydoc" version))
4879 (sha256
4880 (base32
4881 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4882 (build-system python-build-system)
4883 (propagated-inputs
4884 `(("python-sphinx" ,python-sphinx)))
4885 (native-inputs
4886 `(("python-nose" ,python-nose)))
4887 (home-page "https://pypi.org/project/numpydoc/")
4888 (synopsis
4889 "Numpy's Sphinx extensions")
4890 (description
4891 "Sphinx extension to support docstrings in Numpy format.")
4892 (license license:bsd-2)))
4893
4894 (define-public python2-numpydoc
4895 (package-with-python2 python-numpydoc))
4896
4897 (define-public python-numexpr
4898 (package
4899 (name "python-numexpr")
4900 (version "2.6.5")
4901 (source
4902 (origin
4903 (method url-fetch)
4904 (uri (pypi-uri "numexpr" version))
4905 (sha256
4906 (base32
4907 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4908 (build-system python-build-system)
4909 (arguments `(#:tests? #f)) ; no tests included
4910 (propagated-inputs
4911 `(("python-numpy" ,python-numpy)))
4912 (home-page "https://github.com/pydata/numexpr")
4913 (synopsis "Fast numerical expression evaluator for NumPy")
4914 (description
4915 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4916 expressions that operate on arrays are accelerated and use less memory than
4917 doing the same calculation in Python. In addition, its multi-threaded
4918 capabilities can make use of all your cores, which may accelerate
4919 computations, most specially if they are not memory-bounded (e.g. those using
4920 transcendental functions).")
4921 (license license:expat)))
4922
4923 (define-public python2-numexpr
4924 (package-with-python2 python-numexpr))
4925
4926 (define-public python-cycler
4927 (package
4928 (name "python-cycler")
4929 (version "0.10.0")
4930 (source (origin
4931 (method url-fetch)
4932 (uri (pypi-uri "cycler" version))
4933 (sha256
4934 (base32
4935 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4936 (build-system python-build-system)
4937 (arguments
4938 ;; XXX: The current version requires 'coveralls' which we don't have.
4939 ;; Enable this for the next release which uses 'python-pytest'.
4940 '(#:tests? #f))
4941 (propagated-inputs
4942 `(("python-six" ,python-six)))
4943 (home-page "http://matplotlib.org/cycler/")
4944 (synopsis "Composable keyword argument iterator")
4945 (description
4946 "When using @code{matplotlib} and plotting more than one line, it is
4947 common to want to be able to want to be able to cycle over one or more artist
4948 styles; but the plotting logic can quickly become involved.
4949 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4950 @code{Cycler} class was developed.")
4951 (license license:bsd-3)))
4952
4953 (define-public python2-cycler
4954 (package-with-python2 python-cycler))
4955
4956 (define-public python-colorspacious
4957 (package
4958 (name "python-colorspacious")
4959 (version "1.1.2")
4960 (source
4961 (origin
4962 (method git-fetch)
4963 (uri (git-reference
4964 (url "https://github.com/njsmith/colorspacious")
4965 (commit (string-append "v" version))))
4966 (file-name (git-file-name name version))
4967 (sha256
4968 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4969 (build-system python-build-system)
4970 (propagated-inputs
4971 `(("python-numpy" ,python-numpy)))
4972 (native-inputs
4973 `(("python-nose" ,python-nose)))
4974 (arguments
4975 `(#:phases
4976 (modify-phases %standard-phases
4977 (replace 'check
4978 (lambda _
4979 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4980 (home-page "https://github.com/njsmith/colorspacious")
4981 (synopsis "Python library for colorspace conversions")
4982 (description "@code{colorspacious} is a Python library that lets you
4983 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4984 (license license:expat)))
4985
4986 (define-public python2-colorspacious
4987 (package-with-python2 python-colorspacious))
4988
4989 (define-public python-matplotlib
4990 (package
4991 (name "python-matplotlib")
4992 (version "3.1.2")
4993 (source
4994 (origin
4995 (method url-fetch)
4996 (uri (pypi-uri "matplotlib" version))
4997 (sha256
4998 (base32
4999 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
5000 (build-system python-build-system)
5001 (propagated-inputs ; the following packages are all needed at run time
5002 `(("python-cycler" ,python-cycler)
5003 ("python-kiwisolver" ,python-kiwisolver)
5004 ("python-pyparsing" ,python-pyparsing)
5005 ("python-pygobject" ,python-pygobject)
5006 ("gobject-introspection" ,gobject-introspection)
5007 ("python-tkinter" ,python "tk")
5008 ("python-dateutil" ,python-dateutil)
5009 ("python-numpy" ,python-numpy)
5010 ("python-pillow" ,python-pillow)
5011 ("python-pytz" ,python-pytz)
5012 ("python-six" ,python-six)
5013 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
5014 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
5015 ;; object. For this reason we need to import both libraries.
5016 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
5017 ("python-pycairo" ,python-pycairo)
5018 ("python-cairocffi" ,python-cairocffi)))
5019 (inputs
5020 `(("libpng" ,libpng)
5021 ("freetype" ,freetype)
5022 ("cairo" ,cairo)
5023 ("glib" ,glib)
5024 ;; FIXME: Add backends when available.
5025 ;("python-wxpython" ,python-wxpython)
5026 ("tcl" ,tcl)
5027 ("tk" ,tk)))
5028 (native-inputs
5029 `(("pkg-config" ,pkg-config)
5030 ("python-pytest" ,python-pytest)
5031 ("python-mock" ,python-mock)
5032 ("unzip" ,unzip)
5033 ("jquery-ui"
5034 ,(origin
5035 (method url-fetch)
5036 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
5037 (sha256
5038 (base32
5039 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
5040 (arguments
5041 `(#:phases
5042 (modify-phases %standard-phases
5043 ;; XXX We disable all image comparison tests because we're using a
5044 ;; newer version of FreeType than matplotlib expects. This leads to
5045 ;; minor differences throughout the tests.
5046 (add-after 'unpack 'fix-and-disable-failing-tests
5047 (lambda _
5048 (substitute* (append (find-files "lib/matplotlib/tests/"
5049 "test_.*\\.py$")
5050 (find-files "lib/mpl_toolkits/tests"
5051 "test_.*\\.py$"))
5052 (("^from matplotlib" match)
5053 (string-append "import pytest\n" match))
5054 (("( *)@image_comparison" match indent)
5055 (string-append indent
5056 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
5057 match)))
5058 (substitute* "lib/matplotlib/tests/test_animation.py"
5059 (("/bin/sh") (which "sh")))
5060 (for-each delete-file
5061 ;; test_normal_axes, test_get_tightbbox_polar
5062 '("lib/matplotlib/tests/test_axes.py"
5063 ;; We don't use the webagg backend and this test forces it.
5064 "lib/matplotlib/tests/test_backend_webagg.py"
5065 ;; test_outward_ticks
5066 "lib/matplotlib/tests/test_tightlayout.py"
5067 ;; test_hidden_axes fails with minor extent
5068 ;; differences, possibly due to the use of a
5069 ;; different version of FreeType.
5070 "lib/matplotlib/tests/test_constrainedlayout.py"
5071 ;; Fontconfig returns no fonts.
5072 "lib/matplotlib/tests/test_font_manager.py"))
5073 #t))
5074 (add-before 'install 'install-jquery-ui
5075 (lambda* (#:key outputs inputs #:allow-other-keys)
5076 (let ((dir (string-append (assoc-ref outputs "out")
5077 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
5078 (mkdir-p dir)
5079 (invoke "unzip"
5080 (assoc-ref inputs "jquery-ui")
5081 "-d" dir))
5082 #t))
5083 (replace 'check
5084 (lambda* (#:key outputs inputs #:allow-other-keys)
5085 (add-installed-pythonpath inputs outputs)
5086 (invoke "python" "tests.py" "-v"
5087 "-m" "not network and not webagg")))
5088 (add-before 'build 'configure-environment
5089 (lambda* (#:key outputs inputs #:allow-other-keys)
5090 (let ((cairo (assoc-ref inputs "cairo")))
5091 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
5092 ;; has not effect.
5093 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
5094 (setenv "HOME" (getcwd))
5095 ;; Fix rounding errors when using the x87 FPU.
5096 (when (string-prefix? "i686" ,(%current-system))
5097 (setenv "CFLAGS" "-ffloat-store"))
5098 (call-with-output-file "setup.cfg"
5099 (lambda (port)
5100 (format port "[directories]~%
5101 basedirlist = ~a,~a~%
5102 [packages]~%
5103 tests = True~%"
5104 (assoc-ref inputs "tcl")
5105 (assoc-ref inputs "tk")))))
5106 #t)))))
5107 (home-page "https://matplotlib.org/")
5108 (synopsis "2D plotting library for Python")
5109 (description
5110 "Matplotlib is a Python 2D plotting library which produces publication
5111 quality figures in a variety of hardcopy formats and interactive environments
5112 across platforms. Matplotlib can be used in Python scripts, the python and
5113 ipython shell, web application servers, and six graphical user interface
5114 toolkits.")
5115 (license license:psfl)
5116 (properties `((python2-variant . ,(delay python2-matplotlib))))))
5117
5118 (define-public python2-matplotlib
5119 (let ((matplotlib (package-with-python2
5120 (strip-python2-variant python-matplotlib))))
5121 (package (inherit matplotlib)
5122 (version "2.2.4")
5123 (source
5124 (origin
5125 (method url-fetch)
5126 (uri (pypi-uri "matplotlib" version))
5127 (sha256
5128 (base32
5129 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
5130 (arguments
5131 (substitute-keyword-arguments (package-arguments matplotlib)
5132 ((#:phases phases)
5133 `(modify-phases ,phases
5134 (replace 'install-jquery-ui
5135 (lambda* (#:key outputs inputs #:allow-other-keys)
5136 (let ((dir (string-append (assoc-ref outputs "out")
5137 "/lib/python2.7/site-packages/"
5138 "matplotlib/backends/web_backend/")))
5139 (mkdir-p dir)
5140 (invoke "unzip"
5141 (assoc-ref inputs "jquery-ui")
5142 "-d" dir))
5143 #t))
5144 (delete 'fix-and-disable-failing-tests)
5145 (delete 'check))))) ; These tests weren't run the the past.
5146 ;; Make sure to use special packages for Python 2 instead
5147 ;; of those automatically rewritten by package-with-python2.
5148 (propagated-inputs
5149 `(("python2-pycairo" ,python2-pycairo)
5150 ("python2-backports-functools-lru-cache"
5151 ,python2-backports-functools-lru-cache)
5152 ("python2-functools32" ,python2-functools32)
5153 ("python2-pygobject-2" ,python2-pygobject-2)
5154 ("python2-subprocess32" ,python2-subprocess32)
5155 ("python2-tkinter" ,python-2 "tk")
5156 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5157 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5158
5159 (define-public python-matplotlib-documentation
5160 (package
5161 (name "python-matplotlib-documentation")
5162 (version (package-version python-matplotlib))
5163 (source (package-source python-matplotlib))
5164 (build-system python-build-system)
5165 (native-inputs
5166 `(("python-matplotlib" ,python-matplotlib)
5167 ("python-colorspacious" ,python-colorspacious)
5168 ("python-sphinx" ,python-sphinx)
5169 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5170 ("python-sphinx-gallery" ,python-sphinx-gallery)
5171 ("python-numpydoc" ,python-numpydoc)
5172 ("python-ipython" ,python-ipython)
5173 ("python-ipykernel" ,python-ipykernel)
5174 ("python-mock" ,python-mock)
5175 ("graphviz" ,graphviz)
5176 ("texlive" ,(texlive-union (list texlive-amsfonts
5177 texlive-latex-amsmath
5178 texlive-latex-enumitem
5179 texlive-latex-expdlist
5180 texlive-latex-geometry
5181 texlive-latex-preview
5182 texlive-latex-type1cm
5183 texlive-latex-ucs
5184
5185 texlive-generic-pdftex
5186
5187 texlive-fonts-ec
5188 texlive-fonts-adobe-times
5189 texlive-fonts-txfonts)))
5190 ("texinfo" ,texinfo)
5191 ,@(package-native-inputs python-matplotlib)))
5192 (arguments
5193 `(#:tests? #f ; we're only generating documentation
5194 #:phases
5195 (modify-phases %standard-phases
5196 ;; The tests in python-matplotlib are run after the install phase, so
5197 ;; we need to delete the extra phase here.
5198 (delete 'check)
5199 (replace 'build
5200 (lambda _
5201 (chdir "doc")
5202 (setenv "PYTHONPATH"
5203 (string-append (getenv "PYTHONPATH")
5204 ":" (getcwd) "/../examples/units"))
5205 (substitute* "conf.py"
5206 ;; Don't use git.
5207 (("^SHA = check_output.*")
5208 (string-append "SHA = \"" ,version "\"\n"))
5209 ;; Don't fetch intersphinx files from the Internet
5210 (("^explicit_order_folders" m)
5211 (string-append "intersphinx_mapping = {}\n" m))
5212 (("'sphinx.ext.intersphinx',") "")
5213 ;; Disable URL embedding which requires internet access.
5214 (("'https://docs.scipy.org/doc/numpy'") "None")
5215 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5216 (invoke "make"
5217 "SPHINXBUILD=sphinx-build"
5218 "SPHINXOPTS=" ; don't abort on warnings
5219 "html" "texinfo")))
5220 (replace 'install
5221 (lambda* (#:key inputs outputs #:allow-other-keys)
5222 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5223 (doc (string-append data "/doc/python-matplotlib-" ,version))
5224 (info (string-append data "/info"))
5225 (html (string-append doc "/html")))
5226 (mkdir-p html)
5227 (mkdir-p info)
5228 (copy-recursively "build/html" html)
5229 (symlink (string-append html "/_images")
5230 (string-append info "/matplotlib-figures"))
5231 (with-directory-excursion "build/texinfo"
5232 (substitute* "matplotlib.texi"
5233 (("@image\\{([^,]*)" all file)
5234 (string-append "@image{matplotlib-figures/" file)))
5235 (symlink (string-append html "/_images")
5236 "./matplotlib-figures")
5237 (invoke "makeinfo" "--no-split"
5238 "-o" "matplotlib.info" "matplotlib.texi"))
5239 (install-file "build/texinfo/matplotlib.info" info))
5240 #t)))))
5241 (home-page (package-home-page python-matplotlib))
5242 (synopsis "Documentation for the python-matplotlib package")
5243 (description (package-description python-matplotlib))
5244 (license (package-license python-matplotlib))))
5245
5246 (define-public python2-matplotlib-documentation
5247 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5248 (package
5249 (inherit parent)
5250 (native-inputs
5251 (alist-delete "python-sphinx-copybutton"
5252 (package-native-inputs parent))))))
5253
5254 (define-public python-matplotlib-venn
5255 (package
5256 (name "python-matplotlib-venn")
5257 (version "0.11.5")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5262 (sha256
5263 (base32
5264 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5265 (build-system python-build-system)
5266 (arguments '(#:tests? #f)) ; tests are not included
5267 (propagated-inputs
5268 `(("python-matplotlib" ,python-matplotlib)
5269 ("python-numpy" ,python-numpy)
5270 ("python-scipy" ,python-scipy)))
5271 (native-inputs
5272 `(("unzip" ,unzip)))
5273 (home-page "https://github.com/konstantint/matplotlib-venn")
5274 (synopsis "Plot area-proportional Venn diagrams")
5275 (description
5276 "This package provides tools for plotting area-proportional two- and
5277 three-way Venn diagrams in @code{matplotlib}.")
5278 (license license:expat)))
5279
5280 (define-public python-pysnptools
5281 (package
5282 (name "python-pysnptools")
5283 (version "0.4.11")
5284 (source
5285 (origin
5286 (method url-fetch)
5287 (uri (pypi-uri "pysnptools" version))
5288 (sha256
5289 (base32
5290 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5291 (build-system python-build-system)
5292 (arguments
5293 `(#:tests? #f ; no test data are included
5294 #:phases
5295 (modify-phases %standard-phases
5296 (replace 'check
5297 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5298 (if tests?
5299 (begin
5300 (add-installed-pythonpath inputs outputs)
5301 (invoke "python3" "pysnptools/test.py"))
5302 #t))))))
5303 (propagated-inputs
5304 `(("python-dill" ,python-dill)
5305 ("python-h5py" ,python-h5py)
5306 ("python-numpy" ,python-numpy)
5307 ("python-pandas" ,python-pandas)
5308 ("python-psutil" ,python-psutil)
5309 ("python-scipy" ,python-scipy)))
5310 (native-inputs
5311 `(("python-cython" ,python-cython)))
5312 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5313 (synopsis "Library for reading and manipulating genetic data")
5314 (description
5315 "PySnpTools is a library for reading and manipulating genetic data. It
5316 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5317 those files. It can also efficiently manipulate ranges of integers using set
5318 operators such as union, intersection, and difference.")
5319 (license license:asl2.0)))
5320
5321 (define-public python2-pysnptools
5322 (package-with-python2 python-pysnptools))
5323
5324 (define-public python-wurlitzer
5325 (package
5326 (name "python-wurlitzer")
5327 (version "2.0.1")
5328 (source
5329 (origin
5330 (method url-fetch)
5331 (uri (pypi-uri "wurlitzer" version))
5332 (sha256
5333 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5334 (build-system python-build-system)
5335 (arguments
5336 '(#:phases
5337 (modify-phases %standard-phases
5338 (replace 'check
5339 (lambda _
5340 (invoke "pytest" "-vv" "test.py"))))))
5341 (native-inputs
5342 `(("python-mock" ,python-mock)
5343 ("python-pytest" ,python-pytest)))
5344 (home-page "https://github.com/minrk/wurlitzer")
5345 (synopsis "Capture C-level output in context managers")
5346 (description
5347 "This library helps to redirect @code{sys.stdout} to a stream or a file
5348 while executing some piece of code, including C code running within a Python
5349 process.")
5350 (license license:expat)))
5351
5352 (define-public python-socksipy-branch
5353 (package
5354 (name "python-socksipy-branch")
5355 (version "1.01")
5356 (source
5357 (origin
5358 (method url-fetch)
5359 (uri (pypi-uri "SocksiPy-branch" version))
5360 (sha256
5361 (base32
5362 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5363 (build-system python-build-system)
5364 (arguments
5365 `(#:tests? #f)) ; There are no tests
5366 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5367 (synopsis "Python SOCKS module")
5368 (description
5369 "SocksiPy - A Python SOCKS client module. It provides a
5370 socket-like interface that supports connections to any TCP
5371 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5372 The original version was developed by Dan Haim, this is a
5373 branch created by Mario Vilas to address some open issues,
5374 as the original project seems to have been abandoned circa 2007.")
5375 (license license:bsd-3)))
5376
5377 (define-public python2-socksipy-branch
5378 (package-with-python2 python-socksipy-branch))
5379
5380 (define-public python-socksipychain
5381 (package
5382 (name "python-socksipychain")
5383 (version "2.1.2")
5384 (source
5385 (origin
5386 (method git-fetch)
5387 (uri (git-reference
5388 (url "https://github.com/pagekite/PySocksipyChain")
5389 (commit (string-append "v" version))))
5390 (file-name (git-file-name name version))
5391 (sha256
5392 (base32
5393 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5394 (build-system python-build-system)
5395 (arguments
5396 `(#:tests? #f)) ; Tests try to access the network.
5397 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5398 (synopsis "Python SOCKS module with chained proxies support")
5399 (description
5400 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5401 adds support for arbitrary chaining of proxy servers and various modes of
5402 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5403 a simple netcat replacement with chaining support.")
5404 (license license:bsd-3)))
5405
5406 (define-public python-pycodestyle
5407 (package
5408 (name "python-pycodestyle")
5409 (version "2.6.0")
5410 (source
5411 (origin
5412 (method url-fetch)
5413 (uri (pypi-uri "pycodestyle" version))
5414 (sha256
5415 (base32
5416 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5417 (build-system python-build-system)
5418 (arguments
5419 `(#:phases
5420 (modify-phases %standard-phases
5421 (replace 'check
5422 (lambda _
5423 (invoke "pytest" "-vv"))))))
5424 (native-inputs
5425 `(("python-pytest" ,python-pytest)))
5426 (home-page "https://pycodestyle.readthedocs.io/")
5427 (synopsis "Python style guide checker")
5428 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5429 Python code against some of the style conventions in
5430 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5431 (license license:expat)))
5432
5433 (define-public python2-pycodestyle
5434 (package-with-python2 python-pycodestyle))
5435
5436 (define-public python-multidict
5437 (package
5438 (name "python-multidict")
5439 (version "4.7.5")
5440 (source
5441 (origin
5442 (method url-fetch)
5443 (uri (pypi-uri "multidict" version))
5444 (sha256
5445 (base32
5446 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5447 (build-system python-build-system)
5448 (arguments
5449 '(#:modules ((ice-9 ftw)
5450 (srfi srfi-1)
5451 (srfi srfi-26)
5452 (guix build utils)
5453 (guix build python-build-system))
5454 #:phases (modify-phases %standard-phases
5455 (replace 'check
5456 (lambda* (#:key tests? #:allow-other-keys)
5457 (if tests?
5458 (begin
5459 (let ((libdir (find (cut string-prefix? "lib." <>)
5460 (scandir "build"))))
5461 (setenv "PYTHONPATH"
5462 (string-append "./build/" libdir ":"
5463 (getenv "PYTHONPATH")))
5464 (invoke "pytest" "-vv")))
5465 (format #t "test suite not run~%"))
5466 #t)))))
5467 (native-inputs
5468 `(("python-pytest" ,python-pytest)
5469 ("python-pytest-cov" ,python-pytest-cov)))
5470 (home-page "https://github.com/aio-libs/multidict/")
5471 (synopsis "Multidict implementation")
5472 (description "Multidict is dict-like collection of key-value pairs
5473 where key might be occurred more than once in the container.")
5474 (license license:asl2.0)))
5475
5476 (define-public python-orderedmultidict
5477 (package
5478 (name "python-orderedmultidict")
5479 (version "1.0")
5480 (source
5481 (origin
5482 (method url-fetch)
5483 (uri (pypi-uri "orderedmultidict" version))
5484 (sha256
5485 (base32
5486 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5487 (build-system python-build-system)
5488 (arguments
5489 `(#:phases
5490 (modify-phases %standard-phases
5491 (add-after 'unpack 'fix-tests
5492 (lambda _
5493 ;; The package uses nosetest for running the tests.
5494 ;; Adding this initfile allows to run the test suite
5495 ;; without requiring nosetest.
5496 (with-output-to-file "tests/__init__.py" newline)
5497 #t)))))
5498 (propagated-inputs
5499 `(("python-six" ,python-six)))
5500 (native-inputs
5501 `(("python-pycodestyle" ,python-pycodestyle)))
5502 (home-page "https://github.com/gruns/orderedmultidict")
5503 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5504 (description "This package contains a library for ordered multivalue
5505 dictionaries. A multivalue dictionary is a dictionary that can store
5506 multiple values for the same key. An ordered multivalue dictionary is a
5507 multivalue dictionary that retains the order of insertions and deletions.")
5508 (license license:unlicense)))
5509
5510 (define-public python2-orderedmultidict
5511 (package-with-python2 python-orderedmultidict))
5512
5513 (define-public python-autopep8
5514 (package
5515 (name "python-autopep8")
5516 (version "1.5.3")
5517 (source
5518 (origin
5519 (method url-fetch)
5520 (uri (pypi-uri "autopep8" version))
5521 (sha256
5522 (base32
5523 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5524 (build-system python-build-system)
5525 (propagated-inputs
5526 `(("python-pycodestyle" ,python-pycodestyle)
5527 ("python-toml" ,python-toml)))
5528 (home-page "https://github.com/hhatto/autopep8")
5529 (synopsis "Format Python code according to the PEP 8 style guide")
5530 (description
5531 "@code{autopep8} automatically formats Python code to conform to
5532 the PEP 8 style guide. It uses the pycodestyle utility to determine
5533 what parts of the code needs to be formatted. @code{autopep8} is
5534 capable of fixing most of the formatting issues that can be reported
5535 by pycodestyle.")
5536 (license (license:non-copyleft
5537 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5538
5539 (define-public python2-autopep8
5540 (package-with-python2 python-autopep8))
5541
5542 (define-public python-distlib
5543 (package
5544 (name "python-distlib")
5545 (version "0.3.0")
5546 (source
5547 (origin
5548 (method url-fetch)
5549 (uri (pypi-uri "distlib" version ".zip"))
5550 (sha256
5551 (base32
5552 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5553 (build-system python-build-system)
5554 (arguments
5555 `(#:phases
5556 (modify-phases %standard-phases
5557 (add-before 'build 'no-/bin/sh
5558 (lambda _
5559 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5560 (("/bin/sh") (which "sh")))
5561 #t))
5562 (add-before 'check 'prepare-test-env
5563 (lambda _
5564 (setenv "HOME" "/tmp")
5565 ;; NOTE: Any value works, the variable just has to be present.
5566 (setenv "SKIP_ONLINE" "1")
5567 #t)))))
5568 (native-inputs `(("unzip" ,unzip)))
5569 (home-page "https://bitbucket.org/pypa/distlib")
5570 (synopsis "Distribution utilities")
5571 (description "Distlib is a library which implements low-level functions that
5572 relate to packaging and distribution of Python software. It is intended to be
5573 used as the basis for third-party packaging tools.")
5574 (license license:psfl)))
5575
5576 (define-public python-distutils-extra
5577 (package
5578 (name "python-distutils-extra")
5579 (version "2.38")
5580 (source
5581 (origin
5582 (method url-fetch)
5583 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5584 version "/+download/python-distutils-extra-"
5585 version ".tar.gz"))
5586 (sha256
5587 (base32
5588 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5589 (build-system python-build-system)
5590 (home-page "https://launchpad.net/python-distutils-extra/")
5591 (synopsis "Enhancements to Python's distutils")
5592 (description
5593 "The python-distutils-extra module enables you to easily integrate
5594 gettext support, themed icons, and scrollkeeper-based documentation into
5595 Python's distutils.")
5596 (license license:gpl2)))
5597
5598 (define-public python2-distutils-extra
5599 (package-with-python2 python-distutils-extra))
5600
5601 (define-public python2-elib.intl
5602 (package
5603 (name "python2-elib.intl")
5604 (version "0.0.3")
5605 (source
5606 (origin
5607 ;; This project doesn't tag releases or publish tarballs, so we take
5608 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5609 (method git-fetch)
5610 (uri (git-reference
5611 (url "https://github.com/dieterv/elib.intl")
5612 (commit "d09997cfef")))
5613 (file-name (string-append name "-" version "-checkout"))
5614 (sha256
5615 (base32
5616 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5617 (build-system python-build-system)
5618 (arguments
5619 ;; incompatible with Python 3 (exception syntax)
5620 `(#:python ,python-2
5621 #:tests? #f))
5622 (home-page "https://github.com/dieterv/elib.intl")
5623 (synopsis "Enhanced internationalization for Python")
5624 (description
5625 "The elib.intl module provides enhanced internationalization (I18N)
5626 services for your Python modules and applications.")
5627 (license license:lgpl3+)))
5628
5629 (define-public python-olefile
5630 (package
5631 (name "python-olefile")
5632 (version "0.46")
5633 (source
5634 (origin
5635 (method url-fetch)
5636 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5637 "download/v" version "/olefile-" version ".tar.gz"))
5638 (file-name (string-append name "-" version ".tar.gz"))
5639 (sha256
5640 (base32
5641 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5642 (build-system python-build-system)
5643 (home-page "https://www.decalage.info/python/olefileio")
5644 (synopsis "Read and write Microsoft OLE2 files.")
5645 (description
5646 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5647 Storage or Compound Document, Microsoft Office). It is an improved version of
5648 the OleFileIO module from PIL, the Python Image Library.")
5649 (license license:bsd-3)))
5650
5651 (define-public python2-olefile
5652 (package-with-python2 python-olefile))
5653
5654 (define-public python-pillow
5655 (package
5656 (name "python-pillow")
5657 (version "8.0.1")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "Pillow" version))
5662 (sha256
5663 (base32
5664 "17pv0flaqqfld9m4lz8ayxyqb11gbbmr7w04mw4ar79cn3lwdi8i"))))
5665 (build-system python-build-system)
5666 (native-inputs
5667 `(("python-pytest" ,python-pytest)))
5668 (inputs
5669 `(("freetype" ,freetype)
5670 ("lcms" ,lcms)
5671 ("libjpeg" ,libjpeg-turbo)
5672 ("libtiff" ,libtiff)
5673 ("libwebp" ,libwebp)
5674 ("openjpeg" ,openjpeg)
5675 ("zlib" ,zlib)))
5676 (propagated-inputs
5677 `(("python-olefile" ,python-olefile)))
5678 (arguments
5679 `(#:phases
5680 (modify-phases %standard-phases
5681 (add-after 'unpack 'patch-ldconfig
5682 (lambda _
5683 (substitute* "setup.py"
5684 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5685 (replace 'check
5686 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5687 (if tests?
5688 (begin
5689 (setenv "HOME" (getcwd))
5690 ;; Make installed package available for running the tests.
5691 (add-installed-pythonpath inputs outputs)
5692 (invoke "python" "selftest.py" "--installed")
5693 (invoke "python" "-m" "pytest" "-vv"))
5694 #t))))))
5695 (home-page "https://python-pillow.org")
5696 (synopsis "Fork of the Python Imaging Library")
5697 (description
5698 "The Python Imaging Library adds image processing capabilities to your
5699 Python interpreter. This library provides extensive file format support, an
5700 efficient internal representation, and fairly powerful image processing
5701 capabilities. The core image library is designed for fast access to data
5702 stored in a few basic pixel formats. It should provide a solid foundation for
5703 a general image processing tool.")
5704 (properties `((python2-variant . ,(delay python2-pillow))))
5705 (license (license:x11-style
5706 "http://www.pythonware.com/products/pil/license.htm"
5707 "The PIL Software License"))))
5708
5709 (define-public python2-pillow
5710 (package-with-python2
5711 (package
5712 (inherit (strip-python2-variant python-pillow))
5713 ;; Version 6 is the last series with Python 2 support.
5714 (version "6.2.2")
5715 (source
5716 (origin
5717 (method url-fetch)
5718 (uri (pypi-uri "Pillow" version))
5719 (sha256
5720 (base32
5721 "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv")))))))
5722
5723 (define-public python-pillow-2.9
5724 (package
5725 (inherit python-pillow)
5726 (version "2.9.0")
5727 (source
5728 (origin
5729 (method url-fetch)
5730 (uri (pypi-uri "Pillow" version))
5731 (sha256
5732 (base32
5733 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5734 (arguments
5735 (substitute-keyword-arguments (package-arguments python-pillow)
5736 ((#:tests? _ #f) #f)))
5737 (properties '((hidden? #t)))))
5738
5739 (define-public python-roifile
5740 (package
5741 (name "python-roifile")
5742 (version "2020.5.28")
5743 (source
5744 (origin
5745 (method url-fetch)
5746 (uri (pypi-uri "roifile" version))
5747 (sha256
5748 (base32
5749 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5750 (build-system python-build-system)
5751 (arguments `(#:tests? #f)) ; there are none
5752 (propagated-inputs
5753 `(("python-numpy" ,python-numpy)))
5754 (home-page "https://www.lfd.uci.edu/~gohlke/")
5755 (synopsis "Read and write ImageJ ROI format")
5756 (description "Roifile is a Python library to read, write, create, and plot
5757 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5758 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5759 (license license:bsd-3)))
5760
5761 (define-public python-tifffile
5762 (package
5763 (name "python-tifffile")
5764 (version "2020.6.3")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (pypi-uri "tifffile" version))
5769 (sha256
5770 (base32
5771 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5772 (build-system python-build-system)
5773 ;; Tests require lfdfiles, which depends on tifffile
5774 (arguments `(#:tests? #f))
5775 (propagated-inputs
5776 `(("python-numpy" ,python-numpy)
5777 ;;("python-lfdfiles" ,python-lfdfiles)
5778 ("python-roifile" ,python-roifile)))
5779 (home-page "https://www.lfd.uci.edu/~gohlke/")
5780 (synopsis "Read and write TIFF(r) files")
5781 (description "This package lets you read image and metadata from many
5782 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5783 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5784 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5785 (license license:bsd-3)))
5786
5787 (define-public python-lfdfiles
5788 (package
5789 (name "python-lfdfiles")
5790 (version "2020.1.1")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "lfdfiles" version))
5795 (sha256
5796 (base32
5797 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5798 (build-system python-build-system)
5799 (propagated-inputs
5800 `(("python-click" ,python-click)
5801 ("python-numpy" ,python-numpy)
5802 ("python-tifffile" ,python-tifffile)))
5803 (home-page "https://www.lfd.uci.edu/~gohlke/")
5804 (synopsis "Work with LFD data files")
5805 (description
5806 "Lfdfiles is a Python library and console script for reading, writing,
5807 converting, and viewing many of the proprietary file formats used to store
5808 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5809 (license license:bsd-3)))
5810
5811 (define-public python-imageio
5812 (package
5813 (name "python-imageio")
5814 (version "2.8.0")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 (uri (pypi-uri "imageio" version))
5819 (sha256
5820 (base32
5821 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5822 (build-system python-build-system)
5823 (arguments
5824 `(#:tests? #f ; many tests require online data
5825 #:phases
5826 (modify-phases %standard-phases
5827 (replace 'check
5828 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5829 (if tests?
5830 (begin
5831 ;; Make installed package available for running the tests.
5832 (add-installed-pythonpath inputs outputs)
5833 (invoke "pytest" "-vv"))
5834 #t))))))
5835 (propagated-inputs
5836 `(("python-numpy" ,python-numpy)
5837 ("python-pillow" ,python-pillow)
5838 ("python-psutil" ,python-psutil)))
5839 (native-inputs
5840 `(("python-pytest" ,python-pytest)))
5841 (home-page "https://imageio.github.io/")
5842 (synopsis "Library for reading and writing a wide range of image data")
5843 (description
5844 "Imageio is a Python library that provides an easy interface to read and
5845 write a wide range of image data, including animated images, video, volumetric
5846 data, and scientific formats.")
5847 (license license:bsd-2)))
5848
5849 (define-public python-pycparser
5850 (package
5851 (name "python-pycparser")
5852 (version "2.20")
5853 (source
5854 (origin
5855 (method url-fetch)
5856 (uri (pypi-uri "pycparser" version))
5857 (sha256
5858 (base32
5859 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5860 (outputs '("out" "doc"))
5861 (build-system python-build-system)
5862 (native-inputs
5863 `(("pkg-config" ,pkg-config)))
5864 (arguments
5865 `(#:phases
5866 (modify-phases %standard-phases
5867 (replace 'check
5868 (lambda _
5869 (with-directory-excursion "tests"
5870 (invoke "python" "all_tests.py"))
5871 #t))
5872 (add-after 'install 'install-doc
5873 (lambda* (#:key outputs #:allow-other-keys)
5874 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5875 (doc (string-append data "/doc/" ,name "-" ,version))
5876 (examples (string-append doc "/examples")))
5877 (mkdir-p examples)
5878 (for-each (lambda (file)
5879 (copy-file (string-append "." file)
5880 (string-append doc file)))
5881 '("/README.rst" "/CHANGES" "/LICENSE"))
5882 (copy-recursively "examples" examples)
5883 #t))))))
5884 (home-page "https://github.com/eliben/pycparser")
5885 (synopsis "C parser in Python")
5886 (description
5887 "Pycparser is a complete parser of the C language, written in pure Python
5888 using the PLY parsing library. It parses C code into an AST and can serve as
5889 a front-end for C compilers or analysis tools.")
5890 (license license:bsd-3)))
5891
5892 (define-public python2-pycparser
5893 (package-with-python2 python-pycparser))
5894
5895 (define-public python-pywavelets
5896 (package
5897 (name "python-pywavelets")
5898 (version "1.1.1")
5899 (home-page "https://github.com/PyWavelets/pywt")
5900 (source (origin
5901 (method url-fetch)
5902 (uri (pypi-uri "PyWavelets" version))
5903 (sha256
5904 (base32
5905 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5906 (build-system python-build-system)
5907 (arguments
5908 '(#:modules ((ice-9 ftw)
5909 (srfi srfi-1)
5910 (srfi srfi-26)
5911 (guix build utils)
5912 (guix build python-build-system))
5913 #:phases
5914 (modify-phases %standard-phases
5915 (replace 'check
5916 (lambda _
5917 (let ((cwd (getcwd))
5918 (libdir (find (cut string-prefix? "lib." <>)
5919 (scandir "build"))))
5920 (with-directory-excursion (string-append cwd "/build/" libdir)
5921 (invoke "pytest" "-vv"))))))))
5922 (native-inputs
5923 `(("python-matplotlib" ,python-matplotlib) ;for tests
5924 ("python-pytest" ,python-pytest)))
5925 (propagated-inputs
5926 `(("python-numpy" ,python-numpy)))
5927 (synopsis "Wavelet transforms in Python")
5928 (description
5929 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5930 mathematical basis functions that are localized in both time and frequency.
5931 Wavelet transforms are time-frequency transforms employing wavelets. They are
5932 similar to Fourier transforms, the difference being that Fourier transforms are
5933 localized only in frequency instead of in time and frequency.")
5934 (license license:expat)))
5935
5936 (define-public python-pywinrm
5937 (package
5938 (name "python-pywinrm")
5939 (version "0.4.1")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "pywinrm" version))
5944 (sha256
5945 (base32
5946 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5947 (build-system python-build-system)
5948 (propagated-inputs
5949 `(("python-six" ,python-six)
5950 ("python-requests_ntlm" ,python-requests_ntlm)
5951 ("python-xmltodict" ,python-xmltodict)
5952 ("python-kerberos" ,python-kerberos)))
5953 (native-inputs
5954 `(("python-mock" ,python-mock)
5955 ("python-pytest" ,python-pytest)))
5956 (home-page "https://github.com/diyan/pywinrm/")
5957 (synopsis
5958 "Python library for Windows Remote Management (WinRM)")
5959 (description
5960 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5961 service. It allows you to invoke commands on target Windows machines from
5962 any machine that can run Python.")
5963 (license license:expat)))
5964
5965 (define-public python-xcffib
5966 (package
5967 (name "python-xcffib")
5968 (version "0.6.0")
5969 (source
5970 (origin
5971 (method url-fetch)
5972 (uri (pypi-uri "xcffib" version))
5973 (sha256
5974 (base32
5975 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5976 (build-system python-build-system)
5977 (inputs
5978 `(("libxcb" ,libxcb)))
5979 (propagated-inputs
5980 `(("python-cffi" ,python-cffi) ; used at run time
5981 ("python-six" ,python-six)))
5982 (arguments
5983 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5984 #:tests? #f
5985 #:phases
5986 (modify-phases %standard-phases
5987 (add-after 'unpack 'fix-libxcb-path
5988 (lambda* (#:key inputs #:allow-other-keys)
5989 (let ((libxcb (assoc-ref inputs "libxcb")))
5990 (substitute* '("xcffib/__init__.py")
5991 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5992 #t)))
5993 (add-after 'install 'install-doc
5994 (lambda* (#:key outputs #:allow-other-keys)
5995 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5996 "/doc/" ,name "-" ,version)))
5997 (mkdir-p doc)
5998 (copy-file "README.md"
5999 (string-append doc "/README.md"))
6000 #t))))))
6001 (home-page "https://github.com/tych0/xcffib")
6002 (synopsis "XCB Python bindings")
6003 (description
6004 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
6005 support for Python 3 and PyPy. It is based on cffi.")
6006 (license license:expat)))
6007
6008 (define-public python2-xcffib
6009 (package-with-python2 python-xcffib))
6010
6011 (define-public python-cairocffi
6012 (package
6013 (name "python-cairocffi")
6014 (version "0.9.0")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "cairocffi" version))
6019 (sha256
6020 (base32
6021 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
6022 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
6023 (build-system python-build-system)
6024 (outputs '("out" "doc"))
6025 (inputs
6026 `(("glib" ,glib)
6027 ("gtk+" ,gtk+)
6028 ("gdk-pixbuf" ,gdk-pixbuf)
6029 ("cairo" ,cairo)
6030 ("pango" ,pango)))
6031 (native-inputs
6032 `(("pkg-config" ,pkg-config)
6033 ("python-pytest" ,python-pytest)
6034 ("python-pytest-cov" ,python-pytest-cov)
6035 ("python-pytest-runner" ,python-pytest-runner)
6036 ("python-sphinx" ,python-sphinx)
6037 ("python-docutils" ,python-docutils)))
6038 (propagated-inputs
6039 `(("python-xcffib" ,python-xcffib))) ; used at run time
6040 (arguments
6041 `(#:phases
6042 (modify-phases %standard-phases
6043 (add-after 'unpack 'patch-paths
6044 (lambda* (#:key inputs outputs #:allow-other-keys)
6045 (substitute* (find-files "." "\\.py$")
6046 (("dlopen\\(ffi, 'cairo'")
6047 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
6048 "/lib/libcairo.so.2'"))
6049 (("dlopen\\(ffi, 'gdk-3'")
6050 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
6051 "/lib/libgtk-3.so.0'"))
6052 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
6053 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
6054 "/lib/libgdk_pixbuf-2.0.so.0'"))
6055 (("dlopen\\(ffi, 'glib-2.0'")
6056 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6057 "/lib/libglib-2.0.so.0'"))
6058 (("dlopen\\(ffi, 'gobject-2.0'")
6059 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
6060 "/lib/libgobject-2.0.so.0'"))
6061 (("dlopen\\(ffi, 'pangocairo-1.0'")
6062 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6063 "/lib/libpangocairo-1.0.so.0'"))
6064 (("dlopen\\(ffi, 'pango-1.0'")
6065 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
6066 "/lib/libpango-1.0.so.0'")))
6067 #t))
6068 (add-after 'install 'install-doc
6069 (lambda* (#:key inputs outputs #:allow-other-keys)
6070 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6071 (doc (string-append data "/doc/" ,name "-" ,version))
6072 (html (string-append doc "/html")))
6073 (setenv "LD_LIBRARY_PATH"
6074 (string-append (assoc-ref inputs "cairo") "/lib" ":"
6075 (assoc-ref inputs "gdk-pixbuf") "/lib"))
6076 (setenv "LANG" "en_US.UTF-8")
6077 (mkdir-p html)
6078 (for-each (lambda (file)
6079 (copy-file (string-append "." file)
6080 (string-append doc file)))
6081 '("/README.rst" "/CHANGES" "/LICENSE"))
6082 (system* "python" "setup.py" "build_sphinx")
6083 (copy-recursively "docs/_build/html" html)
6084 #t))))))
6085 (home-page "https://github.com/Kozea/cairocffi")
6086 (synopsis "Python bindings and object-oriented API for Cairo")
6087 (description
6088 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
6089 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
6090 graphics library with support for multiple backends including image buffers,
6091 PNG, PostScript, PDF, and SVG file output.")
6092 (license license:bsd-3)))
6093
6094 (define-public python2-cairocffi
6095 (package-with-python2 python-cairocffi))
6096
6097 (define-public python-decorator
6098 (package
6099 (name "python-decorator")
6100 (version "4.3.0")
6101 (source
6102 (origin
6103 (method url-fetch)
6104 (uri (pypi-uri "decorator" version))
6105 (sha256
6106 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
6107 (build-system python-build-system)
6108 (home-page "https://pypi.org/project/decorator/")
6109 (synopsis "Python module to simplify usage of decorators")
6110 (description
6111 "The aim of the decorator module is to simplify the usage of decorators
6112 for the average programmer, and to popularize decorators usage giving examples
6113 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
6114 etc. The core of this module is a decorator factory.")
6115 (license license:expat)))
6116
6117 (define-public python2-decorator
6118 (package-with-python2 python-decorator))
6119
6120 (define-public python-drmaa
6121 (package
6122 (name "python-drmaa")
6123 (version "0.7.7")
6124 (source
6125 (origin
6126 (method url-fetch)
6127 (uri (pypi-uri "drmaa" version))
6128 (sha256
6129 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
6130 (build-system python-build-system)
6131 ;; The test suite requires libdrmaa which is provided by the cluster
6132 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
6133 ;; should be set to the path of the libdrmaa library.
6134 (arguments '(#:tests? #f))
6135 (native-inputs
6136 `(("python-nose" ,python-nose)))
6137 (home-page "https://pypi.org/project/drmaa/")
6138 (synopsis "Python bindings for the DRMAA library")
6139 (description
6140 "A Python package for Distributed Resource Management (DRM) job
6141 submission and control. This package is an implementation of the DRMAA 1.0
6142 Python language binding specification.")
6143 (license license:bsd-3)))
6144
6145 (define-public python2-drmaa
6146 (package-with-python2 python-drmaa))
6147
6148 (define-public python-grako
6149 (package
6150 (name "python-grako")
6151 (version "3.99.9")
6152 (source
6153 (origin
6154 (method url-fetch)
6155 (uri
6156 (pypi-uri "grako" version ".zip"))
6157 (sha256
6158 (base32
6159 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
6160 (build-system python-build-system)
6161 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
6162 (native-inputs
6163 `(("unzip" ,unzip)
6164 ("python-pytest" ,python-pytest)
6165 ("python-pytest-runner" ,python-pytest-runner)))
6166 (home-page "https://bitbucket.org/neogeny/grako")
6167 (synopsis "EBNF parser generator")
6168 (description
6169 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6170 memoizing PEG/Packrat parser in Python.")
6171 (license license:bsd-3)))
6172
6173 (define-public python2-grako
6174 (package-with-python2 python-grako))
6175
6176 (define-public python-grandalf
6177 (package
6178 (name "python-grandalf")
6179 (version "0.7")
6180 (source
6181 (origin
6182 ;; There's no source tarball on PyPI.
6183 (method git-fetch)
6184 (uri (git-reference
6185 (url "https://github.com/bdcht/grandalf")
6186 (commit (string-append "v" version))))
6187 (file-name (git-file-name name version))
6188 (sha256
6189 (base32
6190 "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
6191 (build-system python-build-system)
6192 (arguments
6193 '(#:phases
6194 (modify-phases %standard-phases
6195 (replace 'check
6196 (lambda _
6197 (invoke "python" "setup.py" "pytest"))))))
6198 (native-inputs
6199 `(("python-pytest" ,python-pytest)
6200 ("python-pytest-runner" ,python-pytest-runner)))
6201 (propagated-inputs
6202 `(("python-numpy" ,python-numpy)
6203 ("python-ply" ,python-ply)))
6204 (home-page "https://github.com/bdcht/grandalf")
6205 (synopsis "Graph and drawing algorithms framework")
6206 (description
6207 "Grandalf is a Python package made for experimentations with graphs
6208 drawing algorithms. It is written in pure Python, and currently implements
6209 two layouts: the Sugiyama hierarchical layout and the force-driven or energy
6210 minimization approach. While not as fast or featured as graphviz or other
6211 libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
6212 than thousands of nodes, while keeping the source code simple enough to tweak
6213 and hack any part of it for experimental purpose. With a total of about 1500
6214 lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
6215 in less than 600 lines. The energy minimization approach is comprised of only
6216 250 lines!
6217
6218 Grandalf does only 2 not-so-simple things:
6219 @itemize
6220 @item computing the nodes (x,y) coordinates (based on provided nodes
6221 dimensions, and a chosen layout)
6222 @item routing the edges with lines or nurbs
6223 @end itemize
6224
6225 It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
6226 will help you find where to draw things like nodes and edges, but it’s up to
6227 you to actually draw things with your favorite toolkit.")
6228 ;; The user can choose either license.
6229 (license (list license:gpl2 license:epl1.0))))
6230
6231 (define-public python-gridmap
6232 (package
6233 (name "python-gridmap")
6234 (version "0.14.0")
6235 (source
6236 (origin
6237 (method git-fetch)
6238 (uri (git-reference
6239 (url "https://github.com/pygridtools/gridmap")
6240 (commit (string-append "v" version))))
6241 (file-name (git-file-name name version))
6242 (sha256
6243 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6244 (build-system python-build-system)
6245 (arguments
6246 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6247 (propagated-inputs
6248 `(("python-psutil" ,python-psutil)
6249 ("python-drmaa" ,python-drmaa)
6250 ("python-pyzmq" ,python-pyzmq)))
6251 (home-page "https://github.com/pygridtools/gridmap")
6252 (synopsis "Create jobs on a cluster directly from Python")
6253 (description
6254 "Gridmap is a Python package to allow you to easily create jobs on the
6255 cluster directly from Python. You can directly map Python functions onto the
6256 cluster without needing to write any wrapper code yourself.")
6257 (license license:gpl3+)))
6258
6259 (define-public python2-gridmap
6260 (package-with-python2 python-gridmap))
6261
6262 (define-public python-honcho
6263 (package
6264 (name "python-honcho")
6265 (version "1.0.1")
6266 (source
6267 (origin
6268 (method git-fetch)
6269 (uri (git-reference
6270 (url "https://github.com/nickstenning/honcho")
6271 (commit (string-append "v" version))))
6272 (file-name (git-file-name name version))
6273 (sha256
6274 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6275 (build-system python-build-system)
6276 (native-inputs
6277 `(("python-pytest" ,python-pytest)
6278 ("python-mock" ,python-mock)
6279 ("python-tox" ,python-tox)
6280 ("which" ,which))) ;for tests
6281 (propagated-inputs
6282 `(("python-jinja2" ,python-jinja2)))
6283 (arguments
6284 `(#:phases
6285 (modify-phases %standard-phases
6286 (delete 'check)
6287 (add-after 'install 'check
6288 (lambda* (#:key outputs inputs #:allow-other-keys)
6289 ;; fix honcho path in testsuite
6290 (substitute* "tests/conftest.py"
6291 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6292 "/bin/honcho" "'")))
6293 ;; It's easier to run tests after install.
6294 ;; Make installed package available for running the tests
6295 (add-installed-pythonpath inputs outputs)
6296 (invoke "py.test" "-v"))))))
6297 (home-page "https://github.com/nickstenning/honcho")
6298 (synopsis "Manage Procfile-based applications")
6299 (description
6300 "A Procfile is a file which describes how to run an application
6301 consisting of several processes. honcho starts all listed processes.
6302 The output of all running processes is collected by honcho and
6303 displayed.")
6304 (license license:expat)))
6305
6306 (define-public python2-honcho
6307 (package-with-python2 python-honcho))
6308
6309 (define-public python-pexpect
6310 (package
6311 (name "python-pexpect")
6312 (version "4.8.0")
6313 (source
6314 (origin
6315 (method url-fetch)
6316 (uri (pypi-uri "pexpect" version))
6317 (sha256
6318 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6319 (build-system python-build-system)
6320 (arguments
6321 `(#:phases
6322 (modify-phases %standard-phases
6323 (add-before 'check 'prepare-tests
6324 (lambda _
6325 (substitute* (find-files "tests")
6326 (("/bin/ls") (which "ls"))
6327 (("/bin/echo") (which "echo"))
6328 (("/bin/which") (which "which"))
6329 ;; Many tests try to use the /bin directory which
6330 ;; is not present in the build environment.
6331 ;; Use one that's non-empty and unlikely to change.
6332 (("/bin'") "/dev'")
6333 ;; Disable failing test. See upstream bug report
6334 ;; https://github.com/pexpect/pexpect/issues/568
6335 (("def test_bash") "def _test_bash"))
6336 ;; XXX: Socket connection test gets "Connection reset by peer".
6337 ;; Why does it not work? Delete for now.
6338 (delete-file "tests/test_socket.py")
6339 #t))
6340 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6341 (native-inputs
6342 `(("python-nose" ,python-nose)
6343 ("python-pytest" ,python-pytest)
6344 ("man-db" ,man-db)
6345 ("which" ,which)
6346 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6347 (propagated-inputs
6348 `(("python-ptyprocess" ,python-ptyprocess)))
6349 (home-page "http://pexpect.readthedocs.org/")
6350 (synopsis "Controlling interactive console applications")
6351 (description
6352 "Pexpect is a pure Python module for spawning child applications;
6353 controlling them; and responding to expected patterns in their output.
6354 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6355 child application and control it as if a human were typing commands.")
6356 (license license:isc)))
6357
6358 (define-public python2-pexpect
6359 (package-with-python2 python-pexpect))
6360
6361 (define-public python-setuptools-scm
6362 (package
6363 (name "python-setuptools-scm")
6364 (version "3.4.3")
6365 (source (origin
6366 (method url-fetch)
6367 (uri (pypi-uri "setuptools_scm" version))
6368 (sha256
6369 (base32
6370 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6371 (build-system python-build-system)
6372 (home-page "https://github.com/pypa/setuptools_scm/")
6373 (synopsis "Manage Python package versions in SCM metadata")
6374 (description
6375 "Setuptools_scm handles managing your Python package versions in
6376 @dfn{software configuration management} (SCM) metadata instead of declaring
6377 them as the version argument or in a SCM managed file.")
6378 (license license:expat)))
6379
6380 (define-public python2-setuptools-scm
6381 (package-with-python2 python-setuptools-scm))
6382
6383 (define-public python-sexpdata
6384 (package
6385 (name "python-sexpdata")
6386 (version "0.0.3")
6387 (source
6388 (origin
6389 (method url-fetch)
6390 (uri (pypi-uri "sexpdata" version))
6391 (sha256
6392 (base32
6393 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6394 (build-system python-build-system)
6395 (home-page "https://github.com/jd-boyd/sexpdata")
6396 (synopsis "S-expression parser for Python")
6397 (description
6398 "Sexpdata is an S-expression parser/serializer. It has load and dump
6399 functions like pickle, json or PyYAML module.")
6400 (license license:bsd-3)))
6401
6402 (define-public python-pathlib2
6403 (package
6404 (name "python-pathlib2")
6405 (version "2.3.3")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "pathlib2" version))
6410 (sha256
6411 (base32
6412 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6413 (build-system python-build-system)
6414 (propagated-inputs
6415 `(("python-scandir" ,python-scandir)
6416 ("python-six" ,python-six)))
6417 (home-page "https://pypi.org/project/pathlib2/")
6418 (synopsis "Object-oriented file system paths")
6419 (description "The goal of pathlib2 is to provide a backport of the
6420 standard @code{pathlib} module which tracks the standard library module, so
6421 all the newest features of the standard @code{pathlib} can be used also on
6422 older Python versions.")
6423 (license license:expat)))
6424
6425 (define-public python-importlib-resources
6426 (package
6427 (name "python-importlib-resources")
6428 (version "3.0.0")
6429 (source
6430 (origin
6431 (method url-fetch)
6432 (uri (pypi-uri "importlib_resources" version))
6433 (sha256
6434 (base32
6435 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6436 (build-system python-build-system)
6437 (native-inputs
6438 `(("python-setuptools-scm" ,python-setuptools-scm)
6439 ("python-toml" ,python-toml)))
6440 (home-page "http://importlib-resources.readthedocs.io/")
6441 (synopsis "Read resources from Python packages")
6442 (description
6443 "@code{importlib_resources} is a backport of Python 3's standard library
6444 @code{importlib.resources} module for Python 2.7, and Python 3.")
6445 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6446 (license license:asl2.0)))
6447
6448 (define-public python2-importlib-resources
6449 (package
6450 (name "python2-importlib-resources")
6451 (version "1.0.2")
6452 (source (origin
6453 (method url-fetch)
6454 (uri (pypi-uri "importlib_resources" version))
6455 (sha256
6456 (base32
6457 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6458 (build-system python-build-system)
6459 (arguments
6460 `(#:python ,python-2
6461 #:phases (modify-phases %standard-phases
6462 ;; The build system tests for python-wheel, but it is
6463 ;; not required for Guix nor the test suite. Just drop
6464 ;; it to make bootstrapping pytest easier.
6465 (add-after 'unpack 'drop-wheel-dependency
6466 (lambda _
6467 (substitute* "setup.cfg"
6468 (("^[[:blank:]]+wheel")
6469 ""))
6470 #t)))))
6471 (propagated-inputs
6472 `(("python-pathlib2" ,python2-pathlib2)
6473 ("python-typing" ,python2-typing)))
6474 (home-page "https://gitlab.com/python-devs/importlib_resources")
6475 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6476 (description
6477 "This package provides an implementation of @code{importlib.resources}
6478 for older versions of Python.")
6479 (license license:asl2.0)))
6480
6481 ;; For importlib-metadata-bootstrap below.
6482 (define-public python2-importlib-resources-bootstrap
6483 (hidden-package
6484 (package/inherit
6485 python2-importlib-resources
6486 (name "python2-importlib-resources-bootstrap")
6487 (propagated-inputs
6488 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6489 ("python-typing" ,python2-typing))))))
6490
6491 (define-public python-importlib-metadata
6492 (package
6493 (name "python-importlib-metadata")
6494 (version "1.5.0")
6495 (source
6496 (origin
6497 (method url-fetch)
6498 (uri (pypi-uri "importlib_metadata" version))
6499 (sha256
6500 (base32
6501 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6502 (build-system python-build-system)
6503 (propagated-inputs
6504 `(("python-zipp" ,python-zipp)))
6505 (native-inputs
6506 `(("python-setuptools-scm" ,python-setuptools-scm)
6507 ("python-pyfakefs" ,python-pyfakefs)
6508 ("python-packaging" ,python-packaging)))
6509 (home-page "https://importlib-metadata.readthedocs.io/")
6510 (synopsis "Read metadata from Python packages")
6511 (description
6512 "@code{importlib_metadata} is a library which provides an API for
6513 accessing an installed Python package's metadata, such as its entry points or
6514 its top-level name. This functionality intends to replace most uses of
6515 @code{pkg_resources} entry point API and metadata API. Along with
6516 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6517 need to use the older and less efficient @code{pkg_resources} package.")
6518 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6519 (license license:asl2.0)))
6520
6521 (define-public python2-importlib-metadata
6522 (let ((base (package-with-python2 (strip-python2-variant
6523 python-importlib-metadata))))
6524 (package/inherit
6525 base
6526 (name "python2-importlib-metadata")
6527 (native-inputs
6528 `(("python-setuptools-scm" ,python2-setuptools-scm)
6529 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6530 ("python-packaging" ,python2-packaging-bootstrap)))
6531 (propagated-inputs
6532 `(("python-configparser" ,python2-configparser)
6533 ("python-contextlib2" ,python2-contextlib2)
6534 ("python-importlib-resources" ,python2-importlib-resources)
6535 ("python-pathlib2" ,python2-pathlib2)
6536 ,@(package-propagated-inputs base))))))
6537
6538 ;; This package is used by python2-pytest, and thus must not depend on it.
6539 (define-public python2-importlib-metadata-bootstrap
6540 (hidden-package
6541 (package/inherit
6542 python2-importlib-metadata
6543 (name "python2-importlib-metadata-bootstrap")
6544 (arguments
6545 `(#:tests? #f
6546 ,@(package-arguments python2-importlib-metadata)))
6547 (propagated-inputs
6548 `(("python-zipp" ,python2-zipp-bootstrap)
6549 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6550 ("python-configparser" ,python2-configparser)
6551 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6552 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6553
6554 (define-public python-importmagic
6555 (package
6556 (name "python-importmagic")
6557 (version "0.1.7")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (pypi-uri "importmagic" version))
6562 (sha256
6563 (base32
6564 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6565 (build-system python-build-system)
6566 (home-page "https://github.com/alecthomas/importmagic")
6567 (synopsis "Library for adding, removing and managing Python imports")
6568 (description
6569 "Importmagic is a Python library for automatically managing imports by
6570 finding unresolved symbols in Python code and their corresponding imports.")
6571 (license license:bsd-3)))
6572
6573 (define-public python-jaraco-packaging
6574 (package
6575 (name "python-jaraco-packaging")
6576 (version "6.1")
6577 (source
6578 (origin
6579 (method url-fetch)
6580 (uri (pypi-uri "jaraco.packaging" version))
6581 (sha256
6582 (base32
6583 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6584 (build-system python-build-system)
6585 (propagated-inputs
6586 `(("python-pytest" ,python-pytest)
6587 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6588 ("python-pytest-flake8" ,python-pytest-flake8)
6589 ("python-rst.linker" ,python-rst.linker)
6590 ("python-setuptools" ,python-setuptools)
6591 ("python-setuptools-scm" ,python-setuptools-scm)
6592 ("python-six" ,python-six)
6593 ("python-sphinx" ,python-sphinx)))
6594 (home-page "https://github.com/jaraco/jaraco.packaging")
6595 (synopsis "Tools to supplement packaging Python releases")
6596 (description
6597 "This package provides various tools to supplement packaging Python
6598 releases.")
6599 (license license:expat)))
6600
6601 (define-public python-pathpy
6602 (package
6603 (name "python-pathpy")
6604 (version "11.5.1")
6605 (source
6606 (origin
6607 (method url-fetch)
6608 (uri (pypi-uri "path.py" version))
6609 (sha256
6610 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6611 (outputs '("out" "doc"))
6612 (build-system python-build-system)
6613 (propagated-inputs
6614 `(("python-appdirs" ,python-appdirs)
6615 ("python-importlib-metadata" ,python-importlib-metadata)))
6616 (native-inputs
6617 `(("python-setuptools-scm" ,python-setuptools-scm)
6618 ("python-sphinx" ,python-sphinx)
6619 ("python-rst.linker" ,python-rst.linker)
6620 ("python-pytest" ,python-pytest)
6621 ("python-pytest-runner" ,python-pytest-runner)
6622 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6623 (arguments
6624 `(#:phases
6625 (modify-phases %standard-phases
6626 (add-after 'build 'build-doc
6627 (lambda _
6628 (setenv "LANG" "en_US.UTF-8")
6629 (invoke "python" "setup.py" "build_sphinx")))
6630 (add-after 'install 'install-doc
6631 (lambda* (#:key outputs #:allow-other-keys)
6632 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6633 (doc (string-append data "/doc/" ,name "-" ,version))
6634 (html (string-append doc "/html")))
6635 (mkdir-p html)
6636 (for-each (lambda (file)
6637 (copy-file file (string-append doc "/" file)))
6638 '("README.rst" "CHANGES.rst"))
6639 (copy-recursively "build/sphinx/html" html)
6640 #t)))
6641 (replace 'check
6642 (lambda _
6643 ;; The import time test aborts if an import takes longer than
6644 ;; 100ms. It may very well take a little longer than that.
6645 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6646 (home-page "https://github.com/jaraco/path.py")
6647 (synopsis "Python module wrapper for built-in os.path")
6648 (description
6649 "@code{path.py} implements path objects as first-class entities, allowing
6650 common operations on files to be invoked on those path objects directly.")
6651 (license license:expat)))
6652
6653 (define-public python2-pathpy
6654 (package-with-python2 python-pathpy))
6655
6656 (define-public python-simplegeneric
6657 (package
6658 (name "python-simplegeneric")
6659 (version "0.8.1")
6660 (source
6661 (origin
6662 (method url-fetch)
6663 (uri (pypi-uri "simplegeneric" version ".zip"))
6664 (sha256
6665 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6666 (build-system python-build-system)
6667 (native-inputs
6668 `(("unzip" ,unzip)))
6669 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6670 (synopsis "Python module for simple generic functions")
6671 (description
6672 "The simplegeneric module lets you define simple single-dispatch generic
6673 functions, akin to Python’s built-in generic functions like @code{len()},
6674 @code{iter()} and so on. However, instead of using specially-named methods,
6675 these generic functions use simple lookup tables, akin to those used by
6676 e.g. @code{pickle.dump()} and other generic functions found in the Python
6677 standard library.")
6678 (license license:zpl2.1)))
6679
6680 (define-public python2-simplegeneric
6681 (package-with-python2 python-simplegeneric))
6682
6683 (define-public python-ipython-genutils
6684 ;; TODO: This package is retired, check if can be removed, see description.
6685 (package
6686 (name "python-ipython-genutils")
6687 (version "0.1.0")
6688 (source
6689 (origin
6690 (method url-fetch)
6691 (uri (pypi-uri "ipython_genutils" version))
6692 (sha256
6693 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6694 (build-system python-build-system)
6695 (arguments `(#:tests? #f)) ; no tests
6696 (home-page "https://ipython.org")
6697 (synopsis "Vestigial utilities from IPython")
6698 (description
6699 "This package provides retired utilities from IPython. No packages
6700 outside IPython/Jupyter should depend on it.
6701
6702 This package shouldn't exist. It contains some common utilities shared by
6703 Jupyter and IPython projects during The Big Split. As soon as possible, those
6704 packages will remove their dependency on this, and this package will go
6705 away.")
6706 (license license:bsd-3)))
6707
6708 (define-public python2-ipython-genutils
6709 (package-with-python2 python-ipython-genutils))
6710
6711 (define-public python-ipyparallel
6712 (package
6713 (name "python-ipyparallel")
6714 (version "6.2.4")
6715 (source
6716 (origin
6717 (method url-fetch)
6718 (uri (pypi-uri "ipyparallel" version))
6719 (sha256
6720 (base32
6721 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6722 (build-system python-build-system)
6723 (arguments
6724 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6725 #:phases
6726 (modify-phases %standard-phases
6727 (add-before 'check 'prepare-for-tests
6728 (lambda _
6729 (setenv "HOME" (getcwd))
6730 #t)))))
6731 (propagated-inputs
6732 `(("python-dateutil" ,python-dateutil)
6733 ("python-decorator" ,python-decorator)
6734 ("python-ipykernel" ,python-ipykernel)
6735 ("python-ipython" ,python-ipython)
6736 ("python-ipython-genutils" ,python-ipython-genutils)
6737 ("python-jupyter-client" ,python-jupyter-client)
6738 ("python-pyzmq" ,python-pyzmq)
6739 ("python-tornado" ,python-tornado)
6740 ("python-traitlets" ,python-traitlets)))
6741 (native-inputs
6742 `(("python-ipython" ,python-ipython)
6743 ("python-mock" ,python-mock)
6744 ("python-nose" ,python-nose)
6745 ("python-pytest" ,python-pytest)
6746 ("python-pytest-cov" ,python-pytest-cov)
6747 ("python-testpath" ,python-testpath)))
6748 (home-page "https://ipython.org/")
6749 (synopsis "Interactive Parallel Computing with IPython")
6750 (description
6751 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6752 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6753 CLI scripts:
6754 @enumerate
6755 @item ipcluster - start/stop a cluster
6756 @item ipcontroller - start a scheduler
6757 @item ipengine - start an engine
6758 @end enumerate")
6759 (license license:bsd-3)))
6760
6761 (define-public python2-ipyparallel
6762 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6763 (package
6764 (inherit ipyparallel)
6765 (propagated-inputs
6766 `(("python2-futures" ,python2-futures)
6767 ,@(package-propagated-inputs ipyparallel))))))
6768
6769 (define-public python-ipython-cluster-helper
6770 (package
6771 (name "python-ipython-cluster-helper")
6772 (version "0.6.4")
6773 (source
6774 (origin
6775 (method url-fetch)
6776 (uri (pypi-uri "ipython-cluster-helper" version))
6777 (sha256
6778 (base32
6779 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6780 (modules '((guix build utils)))
6781 (snippet
6782 '(begin (substitute* "requirements.txt"
6783 (("ipython.*") "ipython\n"))
6784 #t))))
6785 (build-system python-build-system)
6786 (arguments
6787 `(#:tests? #f ; Test suite can't find IPython.
6788 #:phases
6789 (modify-phases %standard-phases
6790 (replace 'check
6791 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6792 (if tests?
6793 (begin
6794 (setenv "HOME" (getcwd))
6795 (add-installed-pythonpath inputs outputs)
6796 (invoke "python" "example/example.py" "--local"))
6797 #t))))))
6798 (propagated-inputs
6799 `(("python-ipyparallel" ,python-ipyparallel)
6800 ("python-ipython" ,python-ipython)
6801 ("python-netifaces" ,python-netifaces)
6802 ("python-pyzmq" ,python-pyzmq)
6803 ("python-setuptools" ,python-setuptools)
6804 ("python-six" ,python-six)))
6805 (home-page "https://github.com/roryk/ipython-cluster-helper")
6806 (synopsis
6807 "Simplify IPython cluster start up and use for multiple schedulers")
6808 (description
6809 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6810 profile, launches a cluster and returns a view. On program exit it shuts the
6811 cluster down and deletes the throwaway profile.")
6812 (license license:expat)))
6813
6814 (define-public python2-ipython-cluster-helper
6815 (package-with-python2 python-ipython-cluster-helper))
6816
6817 (define-public python-traitlets
6818 (package
6819 (name "python-traitlets")
6820 (version "4.3.3")
6821 (source
6822 (origin
6823 (method url-fetch)
6824 (uri (pypi-uri "traitlets" version))
6825 (sha256
6826 (base32
6827 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6828 (build-system python-build-system)
6829 (arguments
6830 `(#:phases
6831 (modify-phases %standard-phases
6832 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6833 (propagated-inputs
6834 `(("python-ipython-genutils" ,python-ipython-genutils)
6835 ("python-decorator" ,python-decorator)))
6836 (native-inputs
6837 `(("python-pytest" ,python-pytest)))
6838 (properties `((python2-variant . ,(delay python2-traitlets))))
6839 (home-page "https://ipython.org")
6840 (synopsis "Configuration system for Python applications")
6841 (description
6842 "Traitlets is a framework that lets Python classes have attributes with
6843 type checking, dynamically calculated default values, and ‘on change’
6844 callbacks. The package also includes a mechanism to use traitlets for
6845 configuration, loading values from files or from command line arguments. This
6846 is a distinct layer on top of traitlets, so you can use traitlets in your code
6847 without using the configuration machinery.")
6848 (license license:bsd-3)))
6849
6850 (define-public python2-traitlets
6851 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6852 (package
6853 (inherit traitlets)
6854 (propagated-inputs
6855 `(("python2-enum34" ,python2-enum34)
6856 ,@(package-propagated-inputs traitlets))))))
6857
6858 (define-public python-jupyter-core
6859 (package
6860 (name "python-jupyter-core")
6861 (version "4.4.0")
6862 (source
6863 (origin
6864 (method url-fetch)
6865 (uri (string-append (pypi-uri "jupyter_core" version)))
6866 (sha256
6867 (base32
6868 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6869 (build-system python-build-system)
6870 ;; FIXME: not sure how to run the tests
6871 (arguments `(#:tests? #f))
6872 (propagated-inputs
6873 `(("python-traitlets" ,python-traitlets)))
6874 (home-page "http://jupyter.org/")
6875 (synopsis "Jupyter base package")
6876 (description
6877 "Jupyter core is the base package on which Jupyter projects rely.")
6878 (license license:bsd-3)))
6879
6880 (define-public python2-jupyter-core
6881 (package-with-python2 python-jupyter-core))
6882
6883 (define-public python-jupyter-client
6884 (package
6885 (name "python-jupyter-client")
6886 (version "5.2.4")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "jupyter_client" version))
6891 (sha256
6892 (base32
6893 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6894 (build-system python-build-system)
6895 ;; Tests fail because of missing native python kernel which I assume is
6896 ;; provided by the ipython package, which we cannot use because it would
6897 ;; cause a dependency cycle.
6898 (arguments
6899 `(#:tests? #f
6900
6901 #:phases (modify-phases %standard-phases
6902 (add-after 'unpack 'set-tool-file-names
6903 (lambda* (#:key inputs #:allow-other-keys)
6904 (let ((iproute (assoc-ref inputs "iproute")))
6905 (substitute* "jupyter_client/localinterfaces.py"
6906 (("'ip'")
6907 (string-append "'" iproute "/sbin/ip'")))
6908 #t))))))
6909 (inputs
6910 `(("iproute" ,iproute)))
6911 (propagated-inputs
6912 `(("python-pyzmq" ,python-pyzmq)
6913 ("python-traitlets" ,python-traitlets)
6914 ("python-jupyter-core" ,python-jupyter-core)))
6915 (home-page "http://jupyter.org/")
6916 (synopsis "Jupyter protocol implementation and client libraries")
6917 (description
6918 "The @code{jupyter_client} package contains the reference implementation
6919 of the Jupyter protocol. It also provides client and kernel management APIs
6920 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6921 installing @code{kernelspec}s for use with Jupyter frontends.")
6922 (license license:bsd-3)))
6923
6924 (define-public python2-jupyter-client
6925 (package-with-python2 python-jupyter-client))
6926
6927 (define-public python-ipykernel
6928 (package
6929 (name "python-ipykernel")
6930 (version "5.1.3")
6931 (source
6932 (origin
6933 (method url-fetch)
6934 (uri (pypi-uri "ipykernel" version))
6935 (sha256
6936 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6937 (build-system python-build-system)
6938 (arguments
6939 `(#:phases
6940 (modify-phases %standard-phases
6941 (replace 'check
6942 (lambda _
6943 (setenv "HOME" "/tmp")
6944 (invoke "pytest" "-v")
6945 #t))
6946 (add-after 'install 'set-python-file-name
6947 (lambda* (#:key outputs #:allow-other-keys)
6948 ;; Record the absolute file name of the 'python' executable in
6949 ;; 'kernel.json'.
6950 (let ((out (assoc-ref outputs "out")))
6951 (substitute* (string-append out "/share/jupyter"
6952 "/kernels/python3/kernel.json")
6953 (("\"python\"")
6954 (string-append "\"" (which "python") "\"")))
6955 #t))))))
6956 (propagated-inputs
6957 `(("python-ipython" ,python-ipython)
6958 ;; imported at runtime during connect
6959 ("python-jupyter-client" ,python-jupyter-client)))
6960 (native-inputs
6961 `(("python-flaky" ,python-flaky)
6962 ("python-nose" ,python-nose)
6963 ("python-pytest" ,python-pytest)))
6964 (home-page "https://ipython.org")
6965 (synopsis "IPython Kernel for Jupyter")
6966 (description
6967 "This package provides the IPython kernel for Jupyter.")
6968 (properties `((python2-variant . ,(delay python2-ipykernel))))
6969 (license license:bsd-3)))
6970
6971 ;; Version 5.x and above no longer support Python 2.
6972 (define-public python2-ipykernel
6973 (package
6974 (name "python2-ipykernel")
6975 (version "4.10.1")
6976 (source
6977 (origin
6978 (method url-fetch)
6979 (uri (pypi-uri "ipykernel" version))
6980 (sha256
6981 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6982 (build-system python-build-system)
6983 (arguments
6984 `(#:python ,python-2))
6985 (propagated-inputs
6986 `(("python2-ipython" ,python2-ipython)
6987 ;; imported at runtime during connect
6988 ("python2-jupyter-client" ,python2-jupyter-client)
6989 ("python2-tornado" ,python2-tornado)
6990 ("python2-traitlets" ,python2-traitlets)))
6991 (native-inputs
6992 `(("python2-mock" ,python2-mock)
6993 ("python2-nose" ,python2-nose)
6994 ("python2-pytest" ,python2-pytest)
6995 ("python2-pytest-cov" ,python2-pytest-cov)))
6996 (home-page "https://ipython.org")
6997 (synopsis "IPython Kernel for Jupyter")
6998 (description
6999 "This package provides the IPython kernel for Jupyter.")
7000 (license license:bsd-3)))
7001
7002 (define-public python-pari-jupyter
7003 (package
7004 (name "python-pari-jupyter")
7005 (version "1.3.2")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "pari_jupyter" version))
7010 (sha256
7011 (base32
7012 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
7013 (build-system python-build-system)
7014 (propagated-inputs
7015 `(("python-ipykernel" ,python-ipykernel)))
7016 (inputs
7017 `(("pari-gp" ,pari-gp)
7018 ("readline" ,readline)))
7019 (arguments
7020 `(#:tests? #f)) ; no test suite
7021 (home-page
7022 "https://github.com/jdemeyer/pari_jupyter")
7023 (synopsis "A Jupyter kernel for PARI/GP")
7024 (description "The package provides a PARI/GP kernel for Jupyter.")
7025 (license license:gpl3+)))
7026
7027 (define-public python-backcall
7028 (package
7029 (name "python-backcall")
7030 (version "0.1.0")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "backcall" version))
7035 (sha256
7036 (base32
7037 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
7038 (build-system python-build-system)
7039 (home-page "https://github.com/takluyver/backcall/")
7040 (synopsis "Specifications for callback functions passed in to an API")
7041 (description
7042 "If your code lets other people supply callback functions, it's important
7043 to specify the function signature you expect, and check that functions support
7044 that. Adding extra parameters later would break other peoples code unless
7045 you're careful. The @code{backcall} package provides a way of specifying the
7046 callback signature using a prototype function.")
7047 (license license:bsd-3)))
7048
7049 (define-public python-ipython
7050 (package
7051 (name "python-ipython")
7052 (version "7.9.0")
7053 (source
7054 (origin
7055 (method url-fetch)
7056 (uri (pypi-uri "ipython" version ".tar.gz"))
7057 (sha256
7058 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
7059 (build-system python-build-system)
7060 (propagated-inputs
7061 `(("python-backcall" ,python-backcall)
7062 ("python-pyzmq" ,python-pyzmq)
7063 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
7064 ("python-terminado" ,python-terminado)
7065 ("python-matplotlib" ,python-matplotlib)
7066 ("python-numpy" ,python-numpy)
7067 ("python-numpydoc" ,python-numpydoc)
7068 ("python-jedi" ,python-jedi)
7069 ("python-jinja2" ,python-jinja2)
7070 ("python-mistune" ,python-mistune)
7071 ("python-pexpect" ,python-pexpect)
7072 ("python-pickleshare" ,python-pickleshare)
7073 ("python-simplegeneric" ,python-simplegeneric)
7074 ("python-jsonschema" ,python-jsonschema)
7075 ("python-traitlets" ,python-traitlets)
7076 ("python-nbformat" ,python-nbformat)
7077 ("python-pygments" ,python-pygments)))
7078 (inputs
7079 `(("readline" ,readline)
7080 ("which" ,which)))
7081 (native-inputs
7082 `(("graphviz" ,graphviz)
7083 ("pkg-config" ,pkg-config)
7084 ("python-requests" ,python-requests) ;; for tests
7085 ("python-testpath" ,python-testpath)
7086 ("python-nose" ,python-nose)))
7087 (arguments
7088 `(#:phases
7089 (modify-phases %standard-phases
7090 (add-after 'unpack 'make-docs-reproducible
7091 (lambda _
7092 (substitute* "IPython/sphinxext/ipython_directive.py"
7093 ((".*import datetime") "")
7094 ((".*datetime.datetime.now\\(\\)") "")
7095 (("%timeit") "# %timeit"))
7096 #t))
7097 ;; Tests can only be run after the library has been installed and not
7098 ;; within the source directory.
7099 (delete 'check)
7100 (add-after 'install 'check
7101 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
7102 (if tests?
7103 (begin
7104 ;; Make installed package available for running the tests
7105 (add-installed-pythonpath inputs outputs)
7106 (setenv "HOME" "/tmp/") ;; required by a test
7107 ;; We only test the core because one of the other tests
7108 ;; tries to import ipykernel.
7109 (invoke "python" "IPython/testing/iptest.py"
7110 "-v" "IPython/core/tests"))
7111 #t)))
7112 (add-before 'check 'fix-tests
7113 (lambda* (#:key inputs #:allow-other-keys)
7114 (substitute* "./IPython/utils/_process_posix.py"
7115 (("/usr/bin/env', 'which") (which "which")))
7116 (substitute* "./IPython/core/tests/test_inputtransformer.py"
7117 (("#!/usr/bin/env python")
7118 (string-append "#!" (which "python"))))
7119 ;; This test introduces a circular dependency on ipykernel
7120 ;; (which depends on ipython).
7121 (delete-file "IPython/core/tests/test_display.py")
7122 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
7123 (delete-file "IPython/core/tests/test_interactiveshell.py")
7124 #t)))))
7125 (home-page "https://ipython.org")
7126 (synopsis "IPython is a tool for interactive computing in Python")
7127 (description
7128 "IPython provides a rich architecture for interactive computing with:
7129 Powerful interactive shells, a browser-based notebook, support for interactive
7130 data visualization, embeddable interpreters and tools for parallel
7131 computing.")
7132 (properties `((python2-variant . ,(delay python2-ipython))))
7133 (license license:bsd-3)))
7134
7135 ;; This is the latest release of the LTS version of ipython with support for
7136 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
7137 ;; dropped support for Python 2.7.
7138 (define-public python2-ipython
7139 (package
7140 (name "python2-ipython")
7141 (version "5.8.0")
7142 (source
7143 (origin
7144 (method url-fetch)
7145 (uri (pypi-uri "ipython" version ".tar.gz"))
7146 (sha256
7147 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
7148 (build-system python-build-system)
7149 (propagated-inputs
7150 `(("python2-backports-shutil-get-terminal-size"
7151 ,python2-backports-shutil-get-terminal-size)
7152 ("python2-pathlib2" ,python2-pathlib2)
7153 ("python2-pyzmq" ,python2-pyzmq)
7154 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7155 ("python2-terminado" ,python2-terminado)
7156 ("python2-matplotlib" ,python2-matplotlib)
7157 ("python2-numpy" ,python2-numpy)
7158 ("python2-numpydoc" ,python2-numpydoc)
7159 ("python2-jinja2" ,python2-jinja2)
7160 ("python2-mistune" ,python2-mistune)
7161 ("python2-pexpect" ,python2-pexpect)
7162 ("python2-pickleshare" ,python2-pickleshare)
7163 ("python2-simplegeneric" ,python2-simplegeneric)
7164 ("python2-jsonschema" ,python2-jsonschema)
7165 ("python2-traitlets" ,python2-traitlets)
7166 ("python2-nbformat" ,python2-nbformat)
7167 ("python2-pygments" ,python2-pygments)))
7168 (inputs
7169 `(("readline" ,readline)
7170 ("which" ,which)))
7171 (native-inputs
7172 `(("graphviz" ,graphviz)
7173 ("pkg-config" ,pkg-config)
7174 ("python2-requests" ,python2-requests) ;; for tests
7175 ("python2-testpath" ,python2-testpath)
7176 ("python2-mock" ,python2-mock)
7177 ("python2-nose" ,python2-nose)))
7178 (arguments
7179 `(#:python ,python-2
7180 #:phases
7181 (modify-phases %standard-phases
7182 (add-before 'check 'delete-broken-tests
7183 (lambda* (#:key inputs #:allow-other-keys)
7184 ;; These tests throw errors for unknown reasons.
7185 (delete-file "IPython/core/tests/test_displayhook.py")
7186 (delete-file "IPython/core/tests/test_magic_terminal.py")
7187 (delete-file "IPython/core/tests/test_profile.py")
7188 #t)))))
7189 (home-page "https://ipython.org")
7190 (synopsis "IPython is a tool for interactive computing in Python")
7191 (description
7192 "IPython provides a rich architecture for interactive computing with:
7193 Powerful interactive shells, a browser-based notebook, support for interactive
7194 data visualization, embeddable interpreters and tools for parallel
7195 computing.")
7196 (license license:bsd-3)))
7197
7198 (define-public python-ipython-documentation
7199 (package
7200 (inherit python-ipython)
7201 (name "python-ipython-documentation")
7202 (version (package-version python-ipython))
7203 (arguments
7204 `(#:phases
7205 (modify-phases %standard-phases
7206 (delete 'build)
7207 (delete 'check)
7208 (replace 'install
7209 (lambda* (#:key outputs #:allow-other-keys)
7210 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
7211 (doc (string-append data "/doc/" ,name "-" ,version))
7212 (html (string-append doc "/html"))
7213 (man1 (string-append data "/man/man1"))
7214 (info (string-append data "/info"))
7215 (examples (string-append doc "/examples"))
7216 (python-arg (string-append "PYTHON=" (which "python"))))
7217 (setenv "LANG" "en_US.utf8")
7218 (with-directory-excursion "docs"
7219 ;; FIXME: pdf fails to build
7220 ;;(system* "make" "pdf" "PAPER=a4")
7221 (system* "make" python-arg "html")
7222 ;; FIXME: the generated texi file contains ^@^@, which trips
7223 ;; up the parser.
7224 ;; (system* "make" python-arg "info")
7225 )
7226 (copy-recursively "docs/man" man1)
7227 (copy-recursively "examples" examples)
7228 (copy-recursively "docs/build/html" html)
7229 ;; (copy-file "docs/build/latex/ipython.pdf"
7230 ;; (string-append doc "/ipython.pdf"))
7231 (mkdir-p info)
7232 ;; (copy-file "docs/build/texinfo/ipython.info"
7233 ;; (string-append info "/ipython.info"))
7234 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7235 #t)))))
7236 (inputs
7237 `(("python-ipython" ,python-ipython)
7238 ("python-ipykernel" ,python-ipykernel)))
7239 (native-inputs
7240 `(("python-sphinx" ,python-sphinx)
7241 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7242 ;; FIXME: It's possible that a smaller union would work just as well.
7243 ("texlive" ,(texlive-union (list texlive-amsfonts
7244 texlive-fonts-ec
7245 texlive-generic-ifxetex
7246 texlive-generic-pdftex
7247 texlive-latex-capt-of
7248 texlive-latex-cmap
7249 texlive-latex-environ
7250 texlive-latex-eqparbox
7251 texlive-latex-etoolbox
7252 texlive-latex-expdlist
7253 texlive-latex-fancyhdr
7254 texlive-latex-fancyvrb
7255 texlive-latex-fncychap
7256 texlive-latex-float
7257 texlive-latex-framed
7258 texlive-latex-geometry
7259 texlive-latex-graphics
7260 texlive-latex-hyperref
7261 texlive-latex-mdwtools
7262 texlive-latex-multirow
7263 texlive-latex-needspace
7264 texlive-latex-oberdiek
7265 texlive-latex-parskip
7266 texlive-latex-preview
7267 texlive-latex-tabulary
7268 texlive-latex-threeparttable
7269 texlive-latex-titlesec
7270 texlive-latex-trimspaces
7271 texlive-latex-ucs
7272 texlive-latex-upquote
7273 texlive-latex-url
7274 texlive-latex-varwidth
7275 texlive-latex-wrapfig)))
7276 ("texinfo" ,texinfo)))))
7277
7278 (define-public python-urwid
7279 (package
7280 (name "python-urwid")
7281 (version "2.1.0")
7282 (source
7283 (origin
7284 (method url-fetch)
7285 (uri (pypi-uri "urwid" version))
7286 (sha256
7287 (base32
7288 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7289 (build-system python-build-system)
7290 (home-page "http://urwid.org")
7291 (synopsis "Console user interface library for Python")
7292 (description
7293 "Urwid is a curses-based UI/widget library for Python. It includes many
7294 features useful for text console applications.")
7295 (license license:lgpl2.1+)))
7296
7297 (define-public python2-urwid
7298 (package-with-python2 python-urwid))
7299
7300 (define-public python-urwidtrees
7301 (package
7302 (name "python-urwidtrees")
7303 (version "1.0.2")
7304 (source
7305 (origin
7306 (method git-fetch)
7307 ;; package author intends on distributing via github rather than pypi:
7308 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7309 (uri (git-reference
7310 (url "https://github.com/pazz/urwidtrees")
7311 (commit version)))
7312 (file-name (git-file-name name version))
7313 (sha256
7314 (base32
7315 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7316 (build-system python-build-system)
7317 (arguments
7318 '(#:use-setuptools? #f
7319 #:tests? #f)) ; no tests
7320 (propagated-inputs `(("python-urwid" ,python-urwid)))
7321 (home-page "https://github.com/pazz/urwidtrees")
7322 (synopsis "Tree widgets for urwid")
7323 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7324 toolkit. Use it to build trees of widgets.")
7325 (license license:gpl3+)))
7326
7327 (define-public python2-urwidtrees
7328 (package-with-python2 python-urwidtrees))
7329
7330 (define-public python-ua-parser
7331 (package
7332 (name "python-ua-parser")
7333 (version "0.8.0")
7334 (source
7335 (origin
7336 (method url-fetch)
7337 (uri (pypi-uri "ua-parser" version))
7338 (sha256
7339 (base32
7340 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7341 (build-system python-build-system)
7342 (arguments
7343 `(#:tests? #f)) ;no test suite in release
7344 (native-inputs
7345 `(("python-pyyaml" ,python-pyyaml)))
7346 (home-page "https://github.com/ua-parser/uap-python")
7347 (synopsis "User agent parser")
7348 (description
7349 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7350 (license license:asl2.0)))
7351
7352 (define-public python2-ua-parser
7353 (package-with-python2 python-ua-parser))
7354
7355 (define-public python-user-agents
7356 (package
7357 (name "python-user-agents")
7358 (version "1.1.0")
7359 (source
7360 (origin
7361 (method url-fetch)
7362 (uri (pypi-uri "user-agents" version))
7363 (sha256
7364 (base32
7365 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7366 (build-system python-build-system)
7367 (arguments
7368 `(#:tests? #f)) ;missing devices.json test file in release
7369 (propagated-inputs
7370 `(("python-ua-parser" ,python-ua-parser)))
7371 (home-page "https://github.com/selwin/python-user-agents")
7372 (synopsis "User Agent strings parsing library")
7373 (description
7374 "A library to identify devices (phones, tablets) and their capabilities by
7375 parsing (browser/HTTP) user agent strings.")
7376 (license license:expat)))
7377
7378 (define-public python2-user-agents
7379 (package-with-python2 python-user-agents))
7380
7381 (define-public python-dbus
7382 (package
7383 (name "python-dbus")
7384 (version "1.2.16")
7385 (source
7386 (origin
7387 (method url-fetch)
7388 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7389 "dbus-python-" version ".tar.gz"))
7390 (sha256
7391 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7392 (build-system gnu-build-system)
7393 (native-inputs
7394 `(("pkg-config" ,pkg-config)))
7395 (inputs
7396 `(("python" ,python-wrapper)
7397 ("dbus-glib" ,dbus-glib)))
7398 (synopsis "Python bindings for D-bus")
7399 (description "python-dbus provides bindings for libdbus, the reference
7400 implementation of D-Bus.")
7401 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7402 (license license:expat)))
7403
7404 (define-public python2-dbus
7405 (package (inherit python-dbus)
7406 (name "python2-dbus")
7407 (inputs `(("python" ,python-2)
7408 ,@(alist-delete "python"
7409 (package-inputs python-dbus)
7410 equal?)))))
7411
7412 (define-public python-notify2
7413 (package
7414 (name "python-notify2")
7415 (version "0.3.1")
7416 (source
7417 (origin
7418 (method url-fetch)
7419 (uri (pypi-uri "notify2" version))
7420 (sha256
7421 (base32
7422 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7423 (build-system python-build-system)
7424 (arguments `(#:tests? #f)) ; tests depend on system state
7425 (native-inputs
7426 `(("python-dbus" ,python-dbus)))
7427 (home-page "https://bitbucket.org/takluyver/pynotify2")
7428 (synopsis "Python interface to D-Bus notifications")
7429 (description
7430 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7431 It is a reimplementation of pynotify in pure Python, and an alternative to
7432 the GObject Introspection bindings to libnotify for non-GTK applications.")
7433 (license (list license:bsd-2
7434 license:lgpl2.1+))))
7435
7436 (define-public python2-notify2
7437 (package-with-python2 python-notify2))
7438
7439 ;; beautifulsoup4 has a totally different namespace than 3.x,
7440 ;; and pypi seems to put it under its own name, so I guess we should too
7441 (define-public python-beautifulsoup4
7442 (package
7443 (name "python-beautifulsoup4")
7444 (version "4.9.1")
7445 (source
7446 (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "beautifulsoup4" version))
7449 (sha256
7450 (base32
7451 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7452 (build-system python-build-system)
7453 (arguments
7454 `(#:phases
7455 (modify-phases %standard-phases
7456 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7457 ;; must use this conversion script when building with Python 3. The
7458 ;; conversion script also runs the tests.
7459 ;; For more information, see the file 'convert-py3k' in the source
7460 ;; distribution.
7461 (replace 'check
7462 (lambda _ (invoke "./convert-py3k"))))))
7463 (propagated-inputs
7464 `(("python-soupsieve" ,python-soupsieve)))
7465 (home-page
7466 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7467 (synopsis
7468 "Python screen-scraping library")
7469 (description
7470 "Beautiful Soup is a Python library designed for rapidly setting up
7471 screen-scraping projects. It offers Pythonic idioms for navigating,
7472 searching, and modifying a parse tree, providing a toolkit for
7473 dissecting a document and extracting what you need. It automatically
7474 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7475 (license license:expat)
7476 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7477
7478 (define-public python2-beautifulsoup4
7479 (package
7480 (inherit (package-with-python2
7481 (strip-python2-variant python-beautifulsoup4)))
7482 (arguments `(#:python ,python-2))))
7483
7484 (define-public python-soupsieve
7485 (package
7486 (name "python-soupsieve")
7487 (version "2.0.1")
7488 (source
7489 (origin
7490 (method url-fetch)
7491 (uri (pypi-uri "soupsieve" version))
7492 (sha256
7493 (base32
7494 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7495 (build-system python-build-system)
7496 (arguments `(#:tests? #f))
7497 ;;XXX: 2 tests fail currently despite claming they were to be
7498 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7499 ;;don't want to create a circular dependency.
7500 (home-page "https://github.com/facelessuser/soupsieve")
7501 (synopsis "CSS selector library")
7502 (description
7503 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7504 Soup 4. It aims to provide selecting, matching, and filtering using modern
7505 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7506 specifications up through the latest CSS level 4 drafts and beyond (though
7507 some are not yet implemented).")
7508 (properties `((python2-variant . ,(delay python2-soupsieve))))
7509 (license license:expat)))
7510
7511 ;; This is the last version that supports python-2
7512 (define-public python2-soupsieve
7513 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7514 (package
7515 (inherit base)
7516 (version "1.9.6")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "soupsieve" version))
7521 (sha256
7522 (base32
7523 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7524 (propagated-inputs
7525 `(("python2-backports-functools-lru-cache"
7526 ,python2-backports-functools-lru-cache)
7527 ,@(package-propagated-inputs base))))))
7528
7529 (define-public python-netifaces
7530 (package
7531 (name "python-netifaces")
7532 (version "0.10.9")
7533 (source
7534 (origin
7535 (method url-fetch)
7536 (uri (pypi-uri "netifaces" version))
7537 (sha256
7538 (base32
7539 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7540 (build-system python-build-system)
7541 (home-page "https://github.com/al45tair/netifaces")
7542 (synopsis
7543 "Python module for portable network interface information")
7544 (description
7545 "Netifaces is a Python module providing information on network
7546 interfaces in an easy and portable manner.")
7547 (license license:expat)))
7548
7549 (define-public python2-netifaces
7550 (package-with-python2 python-netifaces))
7551
7552 (define-public python-networkx
7553 (package
7554 (name "python-networkx")
7555 (version "2.5")
7556 (source
7557 (origin
7558 (method url-fetch)
7559 (uri (pypi-uri "networkx" version))
7560 (sha256
7561 (base32 "00hnii2lplig2s324k1hvi29pyfab6z7i22922f67jgv4da9ay3r"))))
7562 (build-system python-build-system)
7563 (arguments
7564 '(#:phases (modify-phases %standard-phases
7565 (replace 'check
7566 (lambda* (#:key tests? #:allow-other-keys)
7567 (if tests?
7568 (invoke "pytest" "-vv" "--pyargs" "networkx")
7569 (format #t "test suite not run~%"))
7570 #t)))))
7571 ;; python-decorator is needed at runtime.
7572 (propagated-inputs
7573 `(("python-decorator" ,python-decorator)))
7574 (native-inputs
7575 `(("python-pytest" ,python-pytest)))
7576 (home-page "https://networkx.github.io/")
7577 (synopsis "Python module for creating and manipulating graphs and networks")
7578 (description
7579 "NetworkX is a Python package for the creation, manipulation, and study
7580 of the structure, dynamics, and functions of complex networks.")
7581 (properties `((python2-variant . ,(delay python2-networkx))))
7582 (license license:bsd-3)))
7583
7584 ;; NetworkX 2.2 is the last version with support for Python 2.
7585 (define-public python2-networkx
7586 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7587 (package
7588 (inherit base)
7589 (version "2.2")
7590 (source (origin
7591 (method url-fetch)
7592 (uri (pypi-uri "networkx" version ".zip"))
7593 (sha256
7594 (base32
7595 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7596 (arguments
7597 `(#:python ,python-2))
7598 (native-inputs
7599 `(("python-nose" ,python2-nose)
7600 ("unzip" ,unzip))))))
7601
7602 (define-public python-datrie
7603 (package
7604 (name "python-datrie")
7605 (version "0.8.2")
7606 (source
7607 (origin
7608 (method url-fetch)
7609 (uri (pypi-uri "datrie" version))
7610 (sha256
7611 (base32
7612 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7613 (build-system python-build-system)
7614 (native-inputs
7615 `(("python-cython" ,python-cython)
7616 ("python-hypothesis" ,python-hypothesis)
7617 ("python-pytest" ,python-pytest)
7618 ("python-pytest-runner" ,python-pytest-runner)))
7619 (home-page "https://github.com/kmike/datrie")
7620 (synopsis "Fast, efficiently stored trie for Python")
7621 (description
7622 "This package provides a fast, efficiently stored trie implementation for
7623 Python.")
7624 (license license:lgpl2.1+)))
7625
7626 (define-public snakemake
7627 (package
7628 (name "snakemake")
7629 (version "5.7.1")
7630 (source
7631 (origin
7632 (method url-fetch)
7633 (uri (pypi-uri "snakemake" version))
7634 (sha256
7635 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7636 (build-system python-build-system)
7637 (arguments
7638 ;; TODO: Package missing test dependencies.
7639 '(#:tests? #f
7640 #:phases
7641 (modify-phases %standard-phases
7642 ;; For cluster execution Snakemake will call Python. Since there is
7643 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7644 ;; this by calling the snakemake wrapper instead.
7645 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7646 (lambda* (#:key outputs #:allow-other-keys)
7647 (substitute* "snakemake/executors.py"
7648 (("\\{sys.executable\\} -m snakemake")
7649 (string-append (assoc-ref outputs "out")
7650 "/bin/snakemake")))
7651 #t)))))
7652 (propagated-inputs
7653 `(("python-appdirs" ,python-appdirs)
7654 ("python-configargparse" ,python-configargparse)
7655 ("python-datrie" ,python-datrie)
7656 ("python-docutils" ,python-docutils)
7657 ("python-gitpython" ,python-gitpython)
7658 ("python-jinja2" ,python-jinja2)
7659 ("python-jsonschema" ,python-jsonschema)
7660 ("python-networkx" ,python-networkx)
7661 ("python-psutil" ,python-psutil)
7662 ("python-pyyaml" ,python-pyyaml)
7663 ("python-ratelimiter" ,python-ratelimiter)
7664 ("python-requests" ,python-requests)
7665 ("python-wrapt" ,python-wrapt)))
7666 (home-page "https://snakemake.readthedocs.io")
7667 (synopsis "Python-based execution environment for make-like workflows")
7668 (description
7669 "Snakemake aims to reduce the complexity of creating workflows by
7670 providing a clean and modern domain specific specification language (DSL) in
7671 Python style, together with a fast and comfortable execution environment.")
7672 (license license:expat)))
7673
7674 (define-public python-pyqrcode
7675 (package
7676 (name "python-pyqrcode")
7677 (version "1.2.1")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "PyQRCode" version))
7682 (sha256
7683 (base32
7684 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7685 (build-system python-build-system)
7686 (home-page
7687 "https://github.com/mnooner256/pyqrcode")
7688 (synopsis "QR code generator")
7689 (description
7690 "Pyqrcode is a QR code generator written purely in Python with
7691 SVG, EPS, PNG and terminal output.")
7692 (license license:bsd-3)))
7693
7694 (define-public python-seaborn
7695 (package
7696 (name "python-seaborn")
7697 (version "0.10.0")
7698 (source
7699 (origin
7700 (method url-fetch)
7701 (uri (pypi-uri "seaborn" version))
7702 (sha256
7703 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7704 (build-system python-build-system)
7705 (arguments
7706 `(#:phases
7707 (modify-phases %standard-phases
7708 (add-before 'check 'start-xserver
7709 (lambda* (#:key inputs #:allow-other-keys)
7710 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7711 ;; There must be a running X server and make check doesn't
7712 ;; start one. Therefore we must do it.
7713 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7714 (setenv "DISPLAY" ":1")
7715 #t)))
7716 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7717 (propagated-inputs
7718 `(("python-pandas" ,python-pandas)
7719 ("python-matplotlib" ,python-matplotlib)
7720 ("python-numpy" ,python-numpy)
7721 ("python-scipy" ,python-scipy)))
7722 (native-inputs
7723 `(("python-pytest" ,python-pytest)
7724 ("xorg-server" ,xorg-server-for-tests)))
7725 (home-page "https://seaborn.pydata.org/")
7726 (synopsis "Statistical data visualization")
7727 (description
7728 "Seaborn is a library for making attractive and informative statistical
7729 graphics in Python. It is built on top of matplotlib and tightly integrated
7730 with the PyData stack, including support for numpy and pandas data structures
7731 and statistical routines from scipy and statsmodels.")
7732 (properties `((python2-variant . ,(delay python2-seaborn))))
7733 (license license:bsd-3)))
7734
7735 ;; 0.9.1 is the last release with support for Python 2.
7736 (define-public python2-seaborn
7737 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7738 (package
7739 (inherit base)
7740 (version "0.9.1")
7741 (source (origin
7742 (method url-fetch)
7743 (uri (pypi-uri "seaborn" version))
7744 (sha256
7745 (base32
7746 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7747
7748 (define-public python-mpmath
7749 (package
7750 (name "python-mpmath")
7751 (version "1.1.0")
7752 (source (origin
7753 (method url-fetch)
7754 (uri (pypi-uri "mpmath" version))
7755 (file-name (git-file-name name version))
7756 (sha256
7757 (base32
7758 "1xlrcja213jpfhw25q1jl5pl10w1a2cc68x1c4mkicxsbzhan5zw"))))
7759 (build-system python-build-system)
7760 (native-inputs
7761 `(("python-pytest" ,python-pytest)))
7762 (arguments
7763 '(#:phases
7764 (modify-phases %standard-phases
7765 (replace 'check
7766 (lambda _
7767 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7768 (home-page "http://mpmath.org")
7769 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7770 (description
7771 "@code{mpmath} can be used as an arbitrary-precision substitute for
7772 Python's float/complex types and math/cmath modules, but also does much
7773 more advanced mathematics.")
7774 (license license:bsd-3)))
7775
7776 (define-public python2-mpmath
7777 (package-with-python2 python-mpmath))
7778
7779 (define-public python-bigfloat
7780 (package
7781 (name "python-bigfloat")
7782 (version "0.3.0")
7783 (source
7784 (origin
7785 (method url-fetch)
7786 (uri (pypi-uri "bigfloat" version))
7787 (sha256
7788 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7789 (build-system python-build-system)
7790 (inputs
7791 `(("mpfr" ,mpfr)))
7792 (home-page "https://github.com/mdickinson/bigfloat")
7793 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7794 (description
7795 "This package provides a Python interface to the MPFR library for
7796 multiprecision arithmetic.")
7797 (license license:lgpl3+)))
7798
7799 (define-public python2-bigfloat
7800 (package-with-python2 python-bigfloat))
7801
7802 (define-public python-sympy
7803 (package
7804 (name "python-sympy")
7805 (version "1.6.2")
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "sympy" version))
7810 (sha256
7811 (base32 "0247skhkxanczpqqdz6n9k1axgpwl665b25hyn9vgr060p4dryhw"))))
7812 (build-system python-build-system)
7813 (arguments
7814 `(#:phases
7815 (modify-phases %standard-phases
7816 (replace 'check
7817 (lambda* (#:key outputs #:allow-other-keys)
7818 (invoke
7819 (or (which "python3") (which "python"))
7820 "-c" "import sympy; sympy.test(\"/core\")"))))))
7821 (propagated-inputs
7822 `(("python-mpmath" ,python-mpmath)))
7823 (home-page "https://www.sympy.org/")
7824 (synopsis "Python library for symbolic mathematics")
7825 (description
7826 "SymPy is a Python library for symbolic mathematics. It aims to become a
7827 full-featured computer algebra system (CAS) while keeping the code as simple
7828 as possible in order to be comprehensible and easily extensible.")
7829 (license license:bsd-3)))
7830
7831 (define-public python2-sympy
7832 (package
7833 (inherit (package-with-python2 python-sympy))
7834 (version "1.5.1") ; last release for python2
7835 (source
7836 (origin
7837 (method url-fetch)
7838 (uri (pypi-uri "sympy" version))
7839 (sha256
7840 (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
7841
7842 (define-public python-q
7843 (package
7844 (name "python-q")
7845 (version "2.6")
7846 (source
7847 (origin
7848 (method url-fetch)
7849 (uri (pypi-uri "q" version))
7850 (sha256
7851 (base32
7852 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7853 (build-system python-build-system)
7854 (home-page "https://github.com/zestyping/q")
7855 (synopsis "Quick-and-dirty debugging output for tired programmers")
7856 (description
7857 "q is a Python module for \"print\" style of debugging Python code. It
7858 provides convenient short API for print out of values, tracebacks, and
7859 falling into the Python interpreter.")
7860 (license license:asl2.0)))
7861
7862 (define-public python2-q
7863 (package-with-python2 python-q))
7864
7865 (define-public python-xlib
7866 (package
7867 (name "python-xlib")
7868 (version "0.27")
7869 (source
7870 (origin
7871 (method git-fetch)
7872 (uri (git-reference
7873 (url "https://github.com/python-xlib/python-xlib")
7874 (commit version)))
7875 (file-name (git-file-name name version))
7876 (sha256
7877 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7878 (build-system python-build-system)
7879 (arguments
7880 `(#:phases
7881 (modify-phases %standard-phases
7882 (add-before 'check 'start-xserver
7883 (lambda* (#:key inputs #:allow-other-keys)
7884 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7885 ;; There must be a running X server and make check doesn't
7886 ;; start one. Therefore we must do it.
7887 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7888 (setenv "DISPLAY" ":1")
7889 #t))))))
7890 (native-inputs
7891 `(("python-mock" ,python-mock)
7892 ("python-setuptools-scm" ,python-setuptools-scm)
7893 ("python-six" ,python-six)
7894 ("xorg-server" ,xorg-server)))
7895 (home-page "https://github.com/python-xlib/python-xlib")
7896 (synopsis "Python X11 client library")
7897 (description
7898 "The Python X Library is intended to be a fully functional
7899 X client library for Python programs. It is useful to implement
7900 low-level X clients. It is written entirely in Python.")
7901 (license license:gpl2+)))
7902
7903 (define-public python2-xlib
7904 (package-with-python2 python-xlib))
7905
7906 (define-public python-singledispatch
7907 (package
7908 (name "python-singledispatch")
7909 (version "3.4.0.3")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "singledispatch" version))
7914 (sha256
7915 (base32
7916 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7917 (build-system python-build-system)
7918 (native-inputs
7919 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7920 (home-page
7921 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7922 (synopsis "Backport of singledispatch feature from Python 3.4")
7923 (description
7924 "This library brings functools.singledispatch from Python 3.4 to Python
7925 2.6-3.3.")
7926 (license license:expat)))
7927
7928 (define-public python2-singledispatch
7929 (package-with-python2 python-singledispatch))
7930
7931 ;; the python- version can be removed with python-3.5
7932 (define-public python-backports-abc
7933 (package
7934 (name "python-backports-abc")
7935 (version "0.5")
7936 (source
7937 (origin
7938 (method url-fetch)
7939 (uri (pypi-uri "backports_abc" version))
7940 (sha256
7941 (base32
7942 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7943 (build-system python-build-system)
7944 (home-page "https://github.com/cython/backports_abc")
7945 (synopsis "Backport of additions to the 'collections.abc' module")
7946 (description
7947 "Python-backports-abc provides a backport of additions to the
7948 @code{collections.abc} module in Python-3.5.")
7949 (license license:psfl)))
7950
7951 (define-public python2-backports-abc
7952 (package-with-python2 python-backports-abc))
7953
7954 (define-public python-backports-csv
7955 (package
7956 (name "python-backports-csv")
7957 (version "1.0.7")
7958 (source
7959 (origin
7960 (method url-fetch)
7961 (uri (pypi-uri "backports.csv" version))
7962 (sha256
7963 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7964 (build-system python-build-system)
7965 (home-page "https://github.com/ryanhiebert/backports.csv")
7966 (synopsis "Backport of Python 3's csv module for Python 2")
7967 (description
7968 "Provides a backport of Python 3's @code{csv} module for parsing
7969 comma separated values. The API of the @code{csv} module in Python 2
7970 is drastically different from the @code{csv} module in Python 3.
7971 This is due, for the most part, to the difference between str in
7972 Python 2 and Python 3.")
7973 (license license:psfl)))
7974
7975 (define-public python2-backports-csv
7976 (package-with-python2 python-backports-csv))
7977
7978 (define-public python2-backports-shutil-get-terminal-size
7979 (package
7980 (name "python2-backports-shutil-get-terminal-size")
7981 (version "1.0.0")
7982 (source
7983 (origin
7984 (method url-fetch)
7985 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7986 (sha256
7987 (base32
7988 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7989 (build-system python-build-system)
7990 (arguments
7991 `(#:python ,python-2
7992 #:phases
7993 (modify-phases %standard-phases
7994 (replace 'check
7995 (lambda _
7996 (setenv "PYTHONPATH" (string-append "./build/lib:"
7997 (getenv "PYTHONPATH")))
7998 (invoke "py.test" "-v"))))))
7999 (native-inputs
8000 `(("python2-pytest" ,python2-pytest)))
8001 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
8002 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
8003 (description
8004 "This package provides a backport of the @code{get_terminal_size
8005 function} from Python 3.3's @code{shutil}.
8006 Unlike the original version it is written in pure Python rather than C,
8007 so it might be a tiny bit slower.")
8008 (license license:expat)))
8009
8010 (define-public python-waf
8011 (package
8012 (name "python-waf")
8013 (version "2.0.19")
8014 (source (origin
8015 (method url-fetch)
8016 (uri (string-append "https://waf.io/"
8017 "waf-" version ".tar.bz2"))
8018 (sha256
8019 (base32
8020 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
8021 (build-system python-build-system)
8022 (arguments
8023 '(#:phases
8024 (modify-phases %standard-phases
8025 (replace 'build
8026 (lambda _
8027 ;; XXX: Find a way to add all extra tools.
8028 (let ((tools '("gccdeps"
8029 "clang_compilation_database")))
8030 (invoke "python" "waf-light" "configure" "build"
8031 (string-append "--tools="
8032 (string-join tools ","))))))
8033 (replace 'check
8034 (lambda _
8035 (invoke "python" "waf" "--version")))
8036 (replace 'install
8037 (lambda* (#:key outputs #:allow-other-keys)
8038 (let ((out (assoc-ref outputs "out")))
8039 (install-file "waf" (string-append out "/bin")))
8040 #t))
8041 ;; waf breaks when it is wrapped.
8042 (delete 'wrap))))
8043 (home-page "https://waf.io/")
8044 (synopsis "Python-based build system")
8045 (description
8046 "Waf is a Python-based framework for configuring, compiling and installing
8047 applications.")
8048 (license license:bsd-3)))
8049
8050 (define-public python2-waf
8051 (package-with-python2 python-waf))
8052
8053 (define-public python-pyzmq
8054 (package
8055 (name "python-pyzmq")
8056 (version "17.1.2")
8057 (source
8058 (origin
8059 (method url-fetch)
8060 (uri (pypi-uri "pyzmq" version))
8061 (sha256
8062 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
8063 (build-system python-build-system)
8064 (arguments
8065 `(#:configure-flags
8066 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
8067 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
8068 ;; --inplace' for 'python setup.py test' to work.
8069 #:tests? #f))
8070 (inputs
8071 `(("zeromq" ,zeromq)))
8072 (native-inputs
8073 `(("pkg-config" ,pkg-config)
8074 ("python-nose" ,python-nose)))
8075 (home-page "https://github.com/zeromq/pyzmq")
8076 (synopsis "Python bindings for 0MQ")
8077 (description
8078 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
8079 (license license:bsd-4)))
8080
8081 (define-public python2-pyzmq
8082 (package-with-python2 python-pyzmq))
8083
8084 (define-public python-pep8
8085 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
8086 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
8087 ;; some dependents' test suites, and nothing more.
8088 (package
8089 (name "python-pep8")
8090 (version "1.7.0")
8091 (source
8092 (origin
8093 (method url-fetch)
8094 (uri (pypi-uri "pep8" version))
8095 (sha256
8096 (base32
8097 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
8098 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
8099 (build-system python-build-system)
8100 (home-page "https://pep8.readthedocs.org/")
8101 (synopsis "Python style guide checker")
8102 (description
8103 "This tools checks Python code against some of the style conventions in
8104 PEP 8.")
8105 (license license:expat)))
8106
8107 (define-public python2-pep8
8108 (package-with-python2 python-pep8))
8109
8110 (define-public python-pep517
8111 (package
8112 (name "python-pep517")
8113 (version "0.8.2")
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (pypi-uri "pep517" version))
8118 (sha256
8119 (base32
8120 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
8121 (build-system python-build-system)
8122 (arguments
8123 '(#:phases
8124 (modify-phases %standard-phases
8125 (replace 'check
8126 (lambda* (#:key tests? #:allow-other-keys)
8127 (delete-file "pytest.ini")
8128 ;; This test tries to connect to the internet
8129 (delete-file "tests/test_meta.py")
8130 (if tests?
8131 (invoke "pytest")
8132 #t))))))
8133 (native-inputs
8134 `(("python-mock" ,python-mock)
8135 ("python-pytest" ,python-pytest)
8136 ("python-testpath" ,python-testpath)))
8137 (propagated-inputs
8138 `(("python-toml" ,python-toml)
8139 ("python-wheel" ,python-wheel)))
8140 (home-page "https://github.com/pypa/pep517")
8141 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
8142 (description
8143 "Wrappers to build Python packages using PEP 517 hooks.")
8144 (properties `((python2-variant . ,(delay python2-pep517))))
8145 (license license:expat)))
8146
8147 ;; Skip the tests so we don't create a cyclical dependency with pytest.
8148 (define-public python2-pep517
8149 (let ((base (package-with-python2
8150 (strip-python2-variant python-pep517))))
8151 (package
8152 (inherit base)
8153 (name "python2-pep517")
8154 (arguments
8155 `(#:tests? #f
8156 ,@(package-arguments base)))
8157 (native-inputs `()))))
8158
8159 (define-public python-pyflakes
8160 (package
8161 (name "python-pyflakes")
8162 (version "2.2.0")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "pyflakes" version))
8167 (sha256
8168 (base32
8169 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
8170 (build-system python-build-system)
8171 (home-page
8172 "https://github.com/pyflakes/pyflakes")
8173 (synopsis "Passive checker of Python programs")
8174 (description
8175 "Pyflakes statically checks Python source code for common errors.")
8176 (license license:expat)))
8177
8178 (define-public python2-pyflakes
8179 (package-with-python2 python-pyflakes))
8180
8181 (define-public python-mccabe
8182 (package
8183 (name "python-mccabe")
8184 (version "0.6.1")
8185 (source
8186 (origin
8187 (method url-fetch)
8188 (uri (pypi-uri "mccabe" version))
8189 (sha256
8190 (base32
8191 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
8192 (build-system python-build-system)
8193 (native-inputs
8194 `(("python-pytest" ,python-pytest-bootstrap)
8195 ("python-pytest-runner" ,python-pytest-runner)))
8196 (home-page "https://github.com/flintwork/mccabe")
8197 (synopsis "McCabe checker, plugin for flake8")
8198 (description
8199 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8200 complexity of Python source code.")
8201 (license license:expat)))
8202
8203 (define-public python2-mccabe
8204 (package-with-python2 python-mccabe))
8205
8206 (define-public python-flake8
8207 (package
8208 (name "python-flake8")
8209 (version "3.8.4")
8210 (source (origin
8211 (method url-fetch)
8212 (uri (pypi-uri "flake8" version))
8213 (sha256
8214 (base32
8215 "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
8216 (build-system python-build-system)
8217 (arguments
8218 `(#:phases
8219 (modify-phases %standard-phases
8220 (delete 'check)
8221 (add-after 'install 'check
8222 (lambda* (#:key inputs outputs #:allow-other-keys)
8223 (add-installed-pythonpath inputs outputs)
8224 (invoke "pytest" "-v")
8225 #t)))))
8226 (propagated-inputs
8227 `(("python-pycodestyle" ,python-pycodestyle)
8228 ("python-entrypoints" ,python-entrypoints)
8229 ("python-pyflakes" ,python-pyflakes)
8230 ("python-mccabe" ,python-mccabe)))
8231 (native-inputs
8232 `(("python-mock" ,python-mock)
8233 ("python-pytest" ,python-pytest-bootstrap)))
8234 (home-page "https://gitlab.com/pycqa/flake8")
8235 (synopsis
8236 "The modular source code checker: pep8, pyflakes and co")
8237 (description
8238 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8239 (properties `((python2-variant . ,(delay python2-flake8))))
8240 (license license:expat)))
8241
8242 (define-public python2-flake8
8243 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8244 (package (inherit base)
8245 (propagated-inputs
8246 `(("python2-configparser" ,python2-configparser)
8247 ("python2-enum34" ,python2-enum34)
8248 ("python2-functools32" ,python2-functools32)
8249 ("python2-typing" ,python2-typing)
8250 ,@(package-propagated-inputs base))))))
8251
8252 (define-public python-flake8-bugbear
8253 (package
8254 (name "python-flake8-bugbear")
8255 (version "20.1.4")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "flake8-bugbear" version))
8260 (sha256
8261 (base32
8262 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8263 (build-system python-build-system)
8264 (arguments
8265 '(#:phases
8266 (modify-phases %standard-phases
8267 (add-before 'check 'disable-test
8268 (lambda _
8269 ;; This test fails on slow computers.
8270 (substitute* "tests/test_bugbear.py"
8271 (("def test_does_not_crash_on_any_valid_code")
8272 "def _test_does_not_crash_on_any_valid_code")))))))
8273 (native-inputs
8274 `(("python-hypothesis" ,python-hypothesis)
8275 ("python-hypothesmith" ,python-hypothesmith)))
8276 (propagated-inputs
8277 `(("python-attrs" ,python-attrs)
8278 ("python-flake8" ,python-flake8)))
8279 (home-page "https://github.com/PyCQA/flake8-bugbear")
8280 (synopsis
8281 "Flake8 plugin for finding likely bugs and design problems in your program")
8282 (description
8283 "This package contains a plugin for Flake8 finding likely bugs and
8284 design problems in your program. It contains warnings that don't belong
8285 in pyflakes and pycodestyle.")
8286 (license license:expat)))
8287
8288 (define-public python-flake8-polyfill
8289 (package
8290 (name "python-flake8-polyfill")
8291 (version "1.0.2")
8292 (source
8293 (origin
8294 (method url-fetch)
8295 (uri (pypi-uri "flake8-polyfill" version))
8296 (sha256
8297 (base32
8298 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8299 (build-system python-build-system)
8300 (arguments
8301 '(#:phases
8302 (modify-phases %standard-phases
8303 (replace 'check
8304 (lambda _
8305 ;; Be compatible with Pytest 4:
8306 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8307 (substitute* "setup.cfg"
8308 (("\\[pytest\\]")
8309 "[tool:pytest]"))
8310
8311 (setenv "PYTHONPATH"
8312 (string-append (getcwd) "/build/lib:"
8313 (getenv "PYTHONPATH")))
8314 (invoke "py.test" "-v"))))))
8315 (native-inputs
8316 `(("python-flake8" ,python-flake8)
8317 ("python-mock" ,python-mock)
8318 ("python-pep8" ,python-pep8)
8319 ("python-pycodestyle" ,python-pycodestyle)
8320 ("python-pytest" ,python-pytest)))
8321 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8322 (synopsis "Polyfill package for Flake8 plugins")
8323 (description
8324 "This package that provides some compatibility helpers for Flake8
8325 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8326 (license license:expat)))
8327
8328 (define-public python2-flake8-polyfill
8329 (package-with-python2 python-flake8-polyfill))
8330
8331 (define-public python-flake8-pyi
8332 (package
8333 (name "python-flake8-pyi")
8334 (version "20.5.0")
8335 (source
8336 (origin
8337 (method url-fetch)
8338 (uri (pypi-uri "flake8-pyi" version))
8339 (sha256
8340 (base32
8341 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8342 (build-system python-build-system)
8343 (propagated-inputs
8344 `(("python-attrs" ,python-attrs)
8345 ("python-flake8" ,python-flake8)
8346 ("python-pyflakes" ,python-pyflakes)))
8347 (home-page "https://github.com/ambv/flake8-pyi")
8348 (synopsis
8349 "Flake8 plugin that provides specializations for type hinting stub files")
8350 (description
8351 "This package contains a plugin that provides specializations for
8352 type hinting stub files, especially interesting for linting typeshed. It
8353 adds the @file{.pyi} extension to the default value of the @code{--filename}
8354 command-line argument to Flake8. This means stubs are linted by default with
8355 this plugin enabled, without needing to explicitly list every file. It
8356 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8357 expressions after the entire file has been read. This enables support for
8358 first-class forward references that stub files use.")
8359 (license license:expat)))
8360
8361 (define-public python-flake8-pie
8362 (package
8363 (name "python-flake8-pie")
8364 (version "0.5.0")
8365 (source
8366 (origin
8367 (method url-fetch)
8368 (uri (pypi-uri "flake8-pie" version))
8369 (sha256
8370 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8371 (build-system python-build-system)
8372 (home-page "https://github.com/sbdchd/flake8-pie")
8373 (synopsis "Flake8 extension that implements lints")
8374 (description
8375 "This package provides a flake8 extension that implements miscellaneous
8376 lints.")
8377 (license license:bsd-2)))
8378
8379 (define-public python-autoflake
8380 (package
8381 (name "python-autoflake")
8382 (version "1.3.1")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "autoflake" version))
8387 (sha256
8388 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8389 (build-system python-build-system)
8390 (propagated-inputs
8391 `(("python-pyflakes" ,python-pyflakes)))
8392 (home-page "https://github.com/myint/autoflake")
8393 (synopsis "Removes unused imports and unused variables")
8394 (description
8395 "@code{autoflake} removes unused imports and unused variables from Python
8396 code as reported by @code{pyflakes}.
8397
8398 By default, it only removes unused imports for modules that are part of the
8399 standard library. Removal of unused variables is also disabled by default.
8400 It also removes useless @code{pass} statements.")
8401 (license license:expat)))
8402
8403 (define-public python-mistune
8404 (package
8405 (name "python-mistune")
8406 (version "0.8.4")
8407 (source
8408 (origin
8409 (method url-fetch)
8410 (uri (pypi-uri "mistune" version))
8411 (sha256
8412 (base32
8413 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8414 (build-system python-build-system)
8415 (native-inputs
8416 `(("python-nose" ,python-nose)
8417 ("python-cython" ,python-cython)))
8418 (home-page "https://github.com/lepture/mistune")
8419 (synopsis "Markdown parser in pure Python")
8420 (description "This package provides a fast markdown parser in pure
8421 Python.")
8422 (license license:bsd-3)))
8423
8424 (define-public python2-mistune
8425 (package-with-python2 python-mistune))
8426
8427 (define-public python-markdown
8428 (package
8429 (name "python-markdown")
8430 (version "3.2.1")
8431 (source
8432 (origin
8433 (method url-fetch)
8434 (uri (pypi-uri "Markdown" version))
8435 (sha256
8436 (base32
8437 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8438 (build-system python-build-system)
8439 (native-inputs
8440 `(("python-nose" ,python-nose)
8441 ("python-pyyaml" ,python-pyyaml)))
8442 (home-page "https://python-markdown.github.io/")
8443 (synopsis "Python implementation of Markdown")
8444 (description
8445 "This package provides a Python implementation of John Gruber's
8446 Markdown. The library features international input, various Markdown
8447 extensions, and several HTML output formats. A command line wrapper
8448 markdown_py is also provided to convert Markdown files to HTML.")
8449 (properties `((python2-variant . ,(delay python2-markdown))))
8450 (license license:bsd-3)))
8451
8452 ;; Markdown 3.2 dropped support for Python 2.
8453 (define-public python2-markdown
8454 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8455 (package/inherit
8456 base
8457 (version "3.1.1")
8458 (source (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "Markdown" version))
8461 (sha256
8462 (base32
8463 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8464
8465 (define-public python-ptyprocess
8466 (package
8467 (name "python-ptyprocess")
8468 (version "0.5.2")
8469 (source
8470 (origin
8471 (method url-fetch)
8472 (uri (pypi-uri "ptyprocess" version))
8473 (sha256
8474 (base32
8475 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8476 (build-system python-build-system)
8477 (native-inputs
8478 `(("python-nose" ,python-nose)))
8479 (arguments
8480 `(#:phases
8481 (modify-phases %standard-phases
8482 (replace 'check
8483 (lambda _ (invoke "nosetests"))))))
8484 (home-page "https://github.com/pexpect/ptyprocess")
8485 (synopsis "Run a subprocess in a pseudo terminal")
8486 (description
8487 "This package provides a Python library used to launch a subprocess in a
8488 pseudo terminal (pty), and interact with both the process and its pty.")
8489 (license license:isc)))
8490
8491 (define-public python2-ptyprocess
8492 (package-with-python2 python-ptyprocess))
8493
8494 (define-public python-cram
8495 (package
8496 (name "python-cram")
8497 (version "0.7")
8498 (home-page "https://bitheap.org/cram/")
8499 (source (origin
8500 (method url-fetch)
8501 (uri (list (string-append home-page "cram-"
8502 version ".tar.gz")
8503 (pypi-uri "cram" version)))
8504 (sha256
8505 (base32
8506 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8507 (arguments
8508 '(#:phases
8509 (modify-phases %standard-phases
8510 (add-after 'unpack 'patch-source
8511 (lambda _
8512 (substitute* (find-files "cram" ".*\\.py$")
8513 ;; Replace default shell path.
8514 (("/bin/sh") (which "sh")))
8515 (substitute* (find-files "tests" ".*\\.t$")
8516 (("md5") "md5sum")
8517 (("/bin/bash") (which "bash"))
8518 (("/bin/sh") (which "sh")))
8519 (substitute* "cram/_test.py"
8520 ;; This hack works around a bug triggered by substituting
8521 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8522 ;; "cram -h", which breaks the output at 80 characters. This
8523 ;; causes the line showing the default shell to break into two
8524 ;; lines, but the test expects a single line...
8525 (("env\\['COLUMNS'\\] = '80'")
8526 "env['COLUMNS'] = '160'"))
8527
8528 (substitute* "Makefile"
8529 ;; Recent versions of python-coverage have caused the test
8530 ;; coverage to decrease (as of version 0.7). Allow that.
8531 (("--fail-under=100")
8532 "--fail-under=90"))
8533
8534 #t))
8535 (replace 'check
8536 ;; The test phase uses the built library and executable.
8537 (lambda* (#:key inputs outputs #:allow-other-keys)
8538 (add-installed-pythonpath inputs outputs)
8539 (setenv "PATH" (string-append (getenv "PATH") ":"
8540 (assoc-ref outputs "out") "/bin"))
8541 (invoke "make" "test"))))))
8542 (build-system python-build-system)
8543 (native-inputs
8544 `(("python-coverage" ,python-coverage)
8545 ("which" ,which)))
8546 (synopsis "Simple testing framework for command line applications")
8547 (description
8548 "Cram is a functional testing framework for command line applications.
8549 Cram tests look like snippets of interactive shell sessions. Cram runs each
8550 command and compares the command output in the test with the command’s actual
8551 output.")
8552 (license license:gpl2+)))
8553
8554 (define-public python2-cram
8555 (package-with-python2 python-cram))
8556
8557 (define-public python-crashtest
8558 (package
8559 (name "python-crashtest")
8560 (version "0.3.1")
8561 (source
8562 (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "crashtest" version))
8565 (sha256
8566 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8567 (build-system python-build-system)
8568 (home-page "https://github.com/sdispater/crashtest")
8569 (synopsis "Manage Python errors with ease")
8570 (description
8571 "Python library that makes exceptions handling and inspection easier.")
8572 (license license:expat)))
8573
8574 (define-public python-straight-plugin
8575 (package
8576 (name "python-straight-plugin")
8577 (version "1.4.1")
8578 (source
8579 (origin
8580 (method url-fetch)
8581 (uri (pypi-uri "straight.plugin" version))
8582 (sha256
8583 (base32
8584 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8585 (build-system python-build-system)
8586 (home-page "https://github.com/ironfroggy/straight.plugin")
8587 (synopsis "Simple namespaced plugin facility")
8588 (description "Straight Plugin provides a type of plugin you can create from
8589 almost any existing Python modules, and an easy way for outside developers to
8590 add functionality and customization to your projects with their own plugins.")
8591 (license license:expat)))
8592
8593 (define-public python2-straight-plugin
8594 (package-with-python2 python-straight-plugin))
8595
8596 (define-public python-fonttools
8597 (package
8598 (name "python-fonttools")
8599 (version "4.6.0")
8600 (source (origin
8601 (method url-fetch)
8602 (uri (pypi-uri "fonttools" version ".zip"))
8603 (sha256
8604 (base32
8605 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8606 (build-system python-build-system)
8607 (native-inputs
8608 `(("unzip" ,unzip)
8609 ("python-pytest" ,python-pytest)
8610 ("python-pytest-runner" ,python-pytest-runner)))
8611 (home-page "https://github.com/fonttools/fonttools")
8612 (synopsis "Tools to manipulate font files")
8613 (description
8614 "FontTools/TTX is a library to manipulate font files from Python. It
8615 supports reading and writing of TrueType/OpenType fonts, reading and writing
8616 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8617 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8618 from an XML-based format.")
8619 (license license:expat)))
8620
8621 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8622 (define-public python2-fonttools
8623 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8624 (package/inherit
8625 base
8626 (version "3.44.0")
8627 (source (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "fonttools" version ".zip"))
8630 (sha256
8631 (base32
8632 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8633
8634 (define-public python-ly
8635 (package
8636 (name "python-ly")
8637 (version "0.9.5")
8638 (source
8639 (origin
8640 (method url-fetch)
8641 (uri (pypi-uri name version))
8642 (sha256
8643 (base32
8644 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8645 (build-system python-build-system)
8646 (arguments
8647 ;; FIXME: Some tests need network access.
8648 '(#:tests? #f))
8649 (synopsis "Tool and library for manipulating LilyPond files")
8650 (description "This package provides a Python library to parse, manipulate
8651 or create documents in LilyPond format. A command line program ly is also
8652 provided that can be used to do various manipulations with LilyPond files.")
8653 (home-page "https://pypi.org/project/python-ly/")
8654 (license license:gpl2+)))
8655
8656 (define-public python-appdirs
8657 (package
8658 (name "python-appdirs")
8659 (version "1.4.3")
8660 (source
8661 (origin
8662 (method url-fetch)
8663 (uri (pypi-uri "appdirs" version))
8664 (sha256
8665 (base32
8666 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8667 (build-system python-build-system)
8668 (home-page "https://github.com/ActiveState/appdirs")
8669 (synopsis
8670 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8671 (description
8672 "This module provides a portable way of finding out where user data
8673 should be stored on various operating systems.")
8674 (license license:expat)))
8675
8676 (define-public python2-appdirs
8677 (package-with-python2 python-appdirs))
8678
8679 (define-public python-gorilla
8680 (package
8681 (name "python-gorilla")
8682 (version "0.3.0")
8683 (source (origin
8684 (method url-fetch)
8685 (uri (pypi-uri "gorilla" version))
8686 (sha256
8687 (base32
8688 "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
8689 (build-system python-build-system)
8690 (home-page "https://github.com/christophercrouzet/gorilla")
8691 (synopsis "Convenient monkey patching with Python")
8692 (description
8693 "Gorilla is a Python library that provides a convenient approach to
8694 monkey patching. Monkey patching is the process of modifying module and
8695 class attributes at runtime with the purpose of replacing or extending
8696 third-party code.")
8697 (license license:expat)))
8698
8699 (define-public python-llfuse
8700 (package
8701 (name "python-llfuse")
8702 (version "1.3.6")
8703 (source (origin
8704 (method url-fetch)
8705 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8706 (sha256
8707 (base32
8708 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8709 (build-system python-build-system)
8710 (inputs
8711 `(("fuse" ,fuse)
8712 ("attr" ,attr)))
8713 (native-inputs
8714 `(("pkg-config" ,pkg-config)))
8715 (synopsis "Python bindings for FUSE")
8716 (description
8717 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8718 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8719 (license license:lgpl2.0+)
8720 (properties `((python2-variant . ,(delay python2-llfuse))))))
8721
8722 (define-public python2-llfuse
8723 (package (inherit (package-with-python2
8724 (strip-python2-variant python-llfuse)))
8725 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8726
8727 ;; For attic-0.16
8728 (define-public python-llfuse-0.41
8729 (package (inherit python-llfuse)
8730 (version "0.41.1")
8731 (source (origin
8732 (method url-fetch)
8733 (uri (string-append
8734 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8735 "llfuse-" version ".tar.bz2"))
8736 (sha256
8737 (base32
8738 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8739 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8740 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8741 (license (list license:expat license:lgpl2.0+))))
8742
8743 (define-public python-msgpack
8744 (package
8745 (name "python-msgpack")
8746 (version "1.0.0")
8747 (source (origin
8748 (method url-fetch)
8749 (uri (pypi-uri "msgpack" version))
8750 (sha256
8751 (base32
8752 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8753 (build-system python-build-system)
8754 (arguments
8755 `(#:modules ((guix build utils)
8756 (guix build python-build-system)
8757 (ice-9 ftw)
8758 (srfi srfi-1)
8759 (srfi srfi-26))
8760 #:phases
8761 (modify-phases %standard-phases
8762 (replace 'check
8763 (lambda _
8764 (let ((cwd (getcwd)))
8765 (setenv "PYTHONPATH"
8766 (string-append cwd "/build/"
8767 (find (cut string-prefix? "lib" <>)
8768 (scandir (string-append cwd "/build")))
8769 ":"
8770 (getenv "PYTHONPATH")))
8771 (invoke "pytest" "-v" "test")))))))
8772 (native-inputs
8773 `(("python-pytest" ,python-pytest)))
8774 (synopsis "MessagePack (de)serializer")
8775 (description "MessagePack is a fast, compact binary serialization format,
8776 suitable for similar data to JSON. This package provides CPython bindings for
8777 reading and writing MessagePack data.")
8778 (home-page "https://pypi.org/project/msgpack/")
8779 (license license:asl2.0)))
8780
8781 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8782 ;; release 0.5. Some packages like borg still call it by the old name for now.
8783 ;; <https://bugs.gnu.org/30662>
8784 (define-public python-msgpack-transitional
8785 (package
8786 (inherit python-msgpack)
8787 (name "python-msgpack-transitional")
8788 (version "0.5.6")
8789 (source (origin
8790 (method url-fetch)
8791 (uri (pypi-uri "msgpack" version))
8792 (sha256
8793 (base32
8794 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8795 (arguments
8796 (substitute-keyword-arguments (package-arguments python-msgpack)
8797 ((#:phases phases)
8798 `(modify-phases ,phases
8799 (add-after 'unpack 'configure-transitional
8800 (lambda _
8801 ;; Keep using the old name.
8802 (substitute* "setup.py"
8803 (("TRANSITIONAL = False")
8804 "TRANSITIONAL = 1"))
8805 #t))))))))
8806
8807 (define-public python2-msgpack
8808 (package-with-python2 python-msgpack))
8809
8810 (define-public python-netaddr
8811 (package
8812 (name "python-netaddr")
8813 (version "0.7.19")
8814 (source
8815 (origin
8816 (method url-fetch)
8817 (uri (pypi-uri "netaddr" version))
8818 (sha256
8819 (base32
8820 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8821 (build-system python-build-system)
8822 (arguments `(#:tests? #f)) ;; No tests.
8823 (home-page "https://github.com/drkjam/netaddr/")
8824 (synopsis "Pythonic manipulation of network addresses")
8825 (description
8826 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8827 and MAC network addresses.")
8828 (license license:bsd-3)))
8829
8830 (define-public python2-netaddr
8831 (package-with-python2 python-netaddr))
8832
8833 (define-public python2-pyroute2
8834 (package
8835 (name "python2-pyroute2")
8836 (version "0.5.6")
8837 (source
8838 (origin
8839 (method url-fetch)
8840 (uri (pypi-uri "pyroute2" version))
8841 (sha256
8842 (base32
8843 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8844 (build-system python-build-system)
8845 (arguments
8846 `(#:python ,python-2)) ;Python 3.x is not supported
8847 (home-page "https://github.com/svinota/pyroute2")
8848 (synopsis "Python netlink library")
8849 (description
8850 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8851 Supported netlink families and protocols include:
8852 @itemize
8853 @item rtnl, network settings - addresses, routes, traffic controls
8854 @item nfnetlink - netfilter API: ipset, nftables, ...
8855 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8856 @item devlink - manage and monitor devlink-enabled hardware
8857 @item generic - generic netlink families
8858 @itemize
8859 @item nl80211 - wireless functions API (basic support)
8860 @item taskstats - extended process statistics
8861 @item acpi_events - ACPI events monitoring
8862 @item thermal_events - thermal events monitoring
8863 @item VFS_DQUOT - disk quota events monitoring
8864 @end itemize
8865 @end itemize")
8866 (license license:gpl2+)))
8867
8868 (define-public python-wrapt
8869 (package
8870 (name "python-wrapt")
8871 (version "1.11.2")
8872 (source
8873 (origin
8874 (method url-fetch)
8875 (uri (pypi-uri "wrapt" version))
8876 (sha256
8877 (base32
8878 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8879 (build-system python-build-system)
8880 (arguments
8881 ;; Tests are not included in the tarball, they are only available in the
8882 ;; git repository.
8883 `(#:tests? #f))
8884 (home-page "https://github.com/GrahamDumpleton/wrapt")
8885 (synopsis "Module for decorators, wrappers and monkey patching")
8886 (description
8887 "The aim of the wrapt module is to provide a transparent object proxy for
8888 Python, which can be used as the basis for the construction of function
8889 wrappers and decorator functions.")
8890 (license license:bsd-2)))
8891
8892 (define-public python2-wrapt
8893 (package-with-python2 python-wrapt))
8894
8895 (define-public python-xlrd
8896 (package
8897 (name "python-xlrd")
8898 (version "1.2.0")
8899 (source (origin
8900 (method url-fetch)
8901 (uri (pypi-uri "xlrd" version))
8902 (sha256
8903 (base32
8904 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8905 (build-system python-build-system)
8906 (arguments
8907 `(#:phases
8908 (modify-phases %standard-phases
8909 ;; Some tests depend on writing a temporary file to the user's home
8910 ;; directory.
8911 (add-after 'unpack 'fix-tests
8912 (lambda _
8913 (delete-file "tests/test_open_workbook.py")
8914 #t)))))
8915 (home-page "http://www.python-excel.org/")
8916 (synopsis "Library for extracting data from Excel files")
8917 (description "This package provides a library to extract data from
8918 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8919 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8920 Unicode-aware. It is not intended as an end-user tool.")
8921 (license license:bsd-3)))
8922
8923 (define-public python2-xlrd
8924 (package-with-python2 python-xlrd))
8925
8926 (define-public python-immutables
8927 (package
8928 (name "python-immutables")
8929 (version "0.14")
8930 (source
8931 (origin
8932 (method url-fetch)
8933 (uri (pypi-uri "immutables" version))
8934 (sha256
8935 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8936 (build-system python-build-system)
8937 (home-page "https://github.com/MagicStack/immutables")
8938 (synopsis "High-performance immutable mapping type for Python")
8939 (description
8940 "An immutable mapping type for Python. The underlying datastructure is a
8941 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8942 functional languages.")
8943 (license license:asl2.0)))
8944
8945 (define-public python-prettytable
8946 (package
8947 (name "python-prettytable")
8948 (version "0.7.2")
8949 (source
8950 (origin
8951 (method url-fetch)
8952 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8953 (sha256
8954 (base32
8955 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8956 (build-system python-build-system)
8957 (home-page "https://code.google.com/archive/p/prettytable/")
8958 (synopsis "Display tabular data in an ASCII table format")
8959 (description
8960 "A library designed to represent tabular data in visually appealing ASCII
8961 tables. PrettyTable allows for selection of which columns are to be printed,
8962 independent alignment of columns (left or right justified or centred) and
8963 printing of sub-tables by specifying a row range.")
8964 (license license:bsd-3)))
8965
8966 (define-public python2-prettytable
8967 (package-with-python2 python-prettytable))
8968
8969 (define-public python-curio
8970 (package
8971 (name "python-curio")
8972 (version "1.2")
8973 (source
8974 (origin
8975 (method url-fetch)
8976 (uri (pypi-uri "curio" version))
8977 (sha256
8978 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
8979 (build-system python-build-system)
8980 (arguments
8981 `(#:phases
8982 (modify-phases %standard-phases
8983 (replace 'check
8984 (lambda* (#:key inputs outputs #:allow-other-keys)
8985 (add-installed-pythonpath inputs outputs)
8986 (invoke "pytest" "-vv" "-k"
8987 ;; Tries to open an outgoing connection.
8988 "not test_ssl_outgoing"))))))
8989 (native-inputs
8990 `(("python-pytest" ,python-pytest)))
8991 (home-page "https://github.com/dabeaz/curio")
8992 (synopsis "Coroutine-based library for concurrent Python")
8993 (description
8994 "Curio is a coroutine-based library for concurrent Python systems
8995 programming. It provides standard programming abstractions such as as
8996 tasks, sockets, files, locks, and queues.")
8997 (license license:bsd-3)))
8998
8999 (define-public python-tables
9000 (package
9001 (name "python-tables")
9002 (version "3.6.1")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (pypi-uri "tables" version))
9007 (sha256
9008 (base32
9009 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
9010 (modules '((guix build utils)))
9011 (snippet
9012 '(begin
9013 ;; Remove pre-compiled .pyc files from source.
9014 (for-each delete-file-recursively
9015 (find-files "." "__pycache__" #:directories? #t))
9016 (for-each delete-file (find-files "." "\\.pyc$"))
9017 #t))))
9018 (build-system python-build-system)
9019 (arguments
9020 `(;; FIXME: python-build-system does not pass configure-flags to "build"
9021 ;; or "check", so we must override the build and check phases.
9022 #:phases
9023 (modify-phases %standard-phases
9024 (add-after 'unpack 'use-gcc
9025 (lambda _
9026 (substitute* "setup.py"
9027 (("^( +)compiler = new_compiler\\(\\)" line indent)
9028 (string-append line
9029 "\n"
9030 indent
9031 "compiler.set_executables(compiler='gcc',"
9032 "compiler_so='gcc',"
9033 "linker_exe='gcc',"
9034 "linker_so='gcc -shared')")))
9035 #t))
9036 (add-after 'unpack 'disable-tuning
9037 (lambda _
9038 (substitute* "setup.py"
9039 (("cpu_flags = .*")
9040 "cpu_flags = ['sse2']\n"))
9041 #t))
9042 (replace 'build
9043 (lambda* (#:key inputs #:allow-other-keys)
9044 (invoke "python" "setup.py" "build"
9045 (string-append "--hdf5="
9046 (assoc-ref inputs "hdf5")))))
9047 (replace 'check
9048 (lambda* (#:key inputs #:allow-other-keys)
9049 (invoke "python" "setup.py" "check"
9050 (string-append "--hdf5="
9051 (assoc-ref inputs "hdf5"))))))))
9052 (propagated-inputs
9053 `(("python-numexpr" ,python-numexpr)
9054 ("python-numpy" ,python-numpy)))
9055 (native-inputs
9056 `(("python-cython" ,python-cython)
9057 ("pkg-config" ,pkg-config)))
9058 (inputs
9059 `(("hdf5" ,hdf5-1.10)
9060 ("bzip2" ,bzip2)
9061 ("zlib" ,zlib)))
9062 (home-page "https://www.pytables.org/")
9063 (synopsis "Hierarchical datasets for Python")
9064 (description "PyTables is a package for managing hierarchical datasets and
9065 designed to efficiently cope with extremely large amounts of data.")
9066 (license license:bsd-3)))
9067
9068 (define-public python2-tables
9069 (package-with-python2 python-tables))
9070
9071 (define-public python-sniffio
9072 (package
9073 (name "python-sniffio")
9074 (version "1.1.0")
9075 (source
9076 (origin
9077 (method url-fetch)
9078 (uri (pypi-uri "sniffio" version))
9079 (sha256
9080 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
9081 (build-system python-build-system)
9082 (arguments
9083 `(#:phases
9084 (modify-phases %standard-phases
9085 (replace 'check
9086 (lambda _
9087 (invoke "pytest" "-vv"))))))
9088 (native-inputs
9089 `(("python-curio" ,python-curio)
9090 ("python-pytest" ,python-pytest)
9091 ("python-pytest-cov" ,python-pytest-cov)))
9092 (home-page "https://github.com/python-trio/sniffio")
9093 (synopsis "Detect which async library a program is running under")
9094 (description "This package detects which async library a program is
9095 running under. It supports multiple async I/O packages, like Trio, and
9096 asyncio.")
9097 ;; Either license applies.
9098 (license (list license:expat license:asl2.0))))
9099
9100 (define-public python-pytest-black
9101 (package
9102 (name "python-pytest-black")
9103 (version "0.3.8")
9104 (source
9105 (origin
9106 (method url-fetch)
9107 (uri (pypi-uri "pytest-black" version))
9108 (sha256
9109 (base32
9110 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
9111 (build-system python-build-system)
9112 (propagated-inputs
9113 `(("python-pytest" ,python-pytest)
9114 ("python-black" ,python-black)
9115 ("python-toml" ,python-toml)))
9116 (native-inputs
9117 `(("python-setuptools-scm" ,python-setuptools-scm)))
9118 (home-page "https://github.com/shopkeep/pytest-black")
9119 (synopsis "Pytest plugin to enable format checking with black")
9120 (description
9121 "This package provides a pytest plugin to enable format checking with the
9122 Python code formatter \"black\".")
9123 (license license:expat)))
9124
9125 (define-public python-get-version
9126 (package
9127 (name "python-get-version")
9128 (version "2.1")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "get_version" version))
9133 (sha256
9134 (base32
9135 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
9136 (build-system python-build-system)
9137 (propagated-inputs
9138 `(("python-pygments" ,python-pygments)
9139 ("python-pytest" ,python-pytest)
9140 ("python-pytest-black" ,python-pytest-black)
9141 ("python-pytest-cov" ,python-pytest-cov)
9142 ("python-setuptools" ,python-setuptools)
9143 ("python-testpath" ,python-testpath)))
9144 (home-page "https://github.com/flying-sheep/get_version")
9145 (synopsis "Version helper in the spirit of versioneer")
9146 (description
9147 "This package provides a version helper that lets you automatically use
9148 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9149 also supports getting the version from Python source distributions or, once
9150 your package is installed, via @code{pkg_resources} (part of
9151 @code{setuptools}).")
9152 (license license:gpl3+)))
9153
9154 (define-public python-legacy-api-wrap
9155 (package
9156 (name "python-legacy-api-wrap")
9157 (version "1.2")
9158 (source
9159 (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "legacy-api-wrap" version))
9162 (sha256
9163 (base32
9164 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9165 (build-system python-build-system)
9166 (propagated-inputs
9167 `(("python-get-version" ,python-get-version)
9168 ("python-pytest" ,python-pytest)
9169 ("python-pytest-black" ,python-pytest-black)
9170 ("python-pytest-cov" ,python-pytest-cov)
9171 ("python-setuptools" ,python-setuptools)))
9172 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9173 (synopsis "Legacy API wrapper")
9174 (description "This module defines a decorator to wrap legacy APIs. The
9175 primary use case is APIs defined before keyword-only parameters existed.")
9176 (license license:gpl3+)))
9177
9178 (define-public python-pyasn1
9179 (package
9180 (name "python-pyasn1")
9181 (version "0.4.8")
9182 (source
9183 (origin
9184 (method url-fetch)
9185 (uri (pypi-uri "pyasn1" version))
9186 (sha256
9187 (base32
9188 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9189 (build-system python-build-system)
9190 (home-page "http://pyasn1.sourceforge.net/")
9191 (synopsis "ASN.1 types and codecs")
9192 (description
9193 "This is an implementation of ASN.1 types and codecs in Python. It is
9194 suitable for a wide range of protocols based on the ASN.1 specification.")
9195 (license license:bsd-2)))
9196
9197 (define-public python2-pyasn1
9198 (package-with-python2 python-pyasn1))
9199
9200 (define-public python-pyasn1-modules
9201 (package
9202 (name "python-pyasn1-modules")
9203 (version "0.2.2")
9204 (source
9205 (origin
9206 (method url-fetch)
9207 (uri (pypi-uri "pyasn1-modules" version))
9208 (sha256
9209 (base32
9210 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9211 (build-system python-build-system)
9212 (propagated-inputs
9213 `(("python-pyasn1" ,python-pyasn1)))
9214 (home-page "https://sourceforge.net/projects/pyasn1/")
9215 (synopsis "ASN.1 codec implementations")
9216 (description
9217 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9218 implementations of ASN.1-based codecs and protocols.")
9219 (license license:bsd-3)))
9220
9221 (define-public python2-pyasn1-modules
9222 (package-with-python2 python-pyasn1-modules))
9223
9224 (define-public python-ipaddress
9225 (package
9226 (name "python-ipaddress")
9227 (version "1.0.22")
9228 (source (origin
9229 (method url-fetch)
9230 (uri (pypi-uri "ipaddress" version))
9231 (sha256
9232 (base32
9233 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9234 (build-system python-build-system)
9235 (home-page "https://github.com/phihag/ipaddress")
9236 (synopsis "IP address manipulation library")
9237 (description
9238 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9239 in Python. This library is used to create, poke at, and manipulate IPv4 and
9240 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9241 module to older versions of Python.")
9242 (license license:psfl)))
9243
9244 (define-public python2-ipaddress
9245 (package-with-python2 python-ipaddress))
9246
9247 (define-public python2-ipaddr
9248 (package
9249 (name "python2-ipaddr")
9250 (version "2.1.11")
9251 (source
9252 (origin
9253 (method url-fetch)
9254 (uri (pypi-uri "ipaddr" version))
9255 (sha256
9256 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9257 (build-system python-build-system)
9258 (arguments
9259 `(#:python ,python-2 ;version 2 only
9260 #:phases
9261 (modify-phases %standard-phases
9262 (replace 'check
9263 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9264 (home-page "https://github.com/google/ipaddr-py")
9265 (synopsis "IP address manipulation library")
9266 (description
9267 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9268 IPv6 addresses and networks.
9269
9270 For new implementations you may prefer to use the standard module
9271 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9272 versions of Python.")
9273 (license license:asl2.0)))
9274
9275 (define-public python-idna
9276 (package
9277 (name "python-idna")
9278 (version "2.9")
9279 (source
9280 (origin
9281 (method url-fetch)
9282 (uri (pypi-uri "idna" version))
9283 (sha256
9284 (base32
9285 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
9286 (build-system python-build-system)
9287 (home-page "https://github.com/kjd/idna")
9288 (synopsis "Internationalized domain names in applications")
9289 (description
9290 "This is a library to support the Internationalised Domain Names in
9291 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9292 protocol is often referred to as “IDNA2008” and can produce different results
9293 from the earlier standard from 2003. The library is also intended to act as a
9294 suitable drop-in replacement for the “encodings.idna” module that comes with
9295 the Python standard library but currently only supports the older 2003
9296 specification.")
9297 (license license:bsd-4)))
9298
9299 (define-public python-idna-2.7
9300 (package (inherit python-idna)
9301 (version "2.7")
9302 (source (origin
9303 (method url-fetch)
9304 (uri (pypi-uri "idna" version))
9305 (sha256
9306 (base32
9307 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9308
9309
9310 (define-public python2-idna
9311 (package-with-python2 python-idna))
9312
9313 (define-public python-libsass
9314 (package
9315 (name "python-libsass")
9316 (version "0.20.1")
9317 (source
9318 (origin
9319 ;; PyPI tarball is missing some test files.
9320 (method git-fetch)
9321 (uri (git-reference
9322 (url "https://github.com/sass/libsass-python")
9323 (commit version)))
9324 (file-name (git-file-name name version))
9325 (sha256
9326 (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
9327 (build-system python-build-system)
9328 (arguments
9329 `(#:phases
9330 (modify-phases %standard-phases
9331 ;; Use Guix package of libsass instead of compiling from a checkout.
9332 (add-before 'build 'set-libsass
9333 (lambda _
9334 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9335 #t))
9336 (replace 'check
9337 (lambda* (#:key inputs outputs #:allow-other-keys)
9338 (add-installed-pythonpath inputs outputs)
9339 (invoke "pytest" "sasstests.py"))))))
9340 (native-inputs
9341 `(("python-pytest" ,python-pytest)
9342 ("python-werkzeug" ,python-werkzeug)))
9343 (inputs
9344 `(("libsass" ,libsass)))
9345 (propagated-inputs
9346 `(("python-six" ,python-six)))
9347 (home-page "https://sass.github.io/libsass-python/")
9348 (synopsis "Straightforward binding of libsass for Python")
9349 (description
9350 "This package provides a simple Python extension module @code{sass} which
9351 is binding LibSass.")
9352 (license license:expat)))
9353
9354 (define-public python-idna-ssl
9355 (package
9356 (name "python-idna-ssl")
9357 (version "1.0.1")
9358 (source
9359 (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "idna-ssl" version))
9362 (sha256
9363 (base32
9364 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9365 (build-system python-build-system)
9366 (arguments
9367 `(#:tests? #f)) ;circular dependency with python-aiohttp
9368 (home-page "https://github.com/aio-libs/idna-ssl")
9369 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9370 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9371 domains support.")
9372 (license license:expat)))
9373
9374 (define-public python-pretend
9375 (package
9376 (name "python-pretend")
9377 (version "1.0.9")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (pypi-uri "pretend" version))
9382 (sha256
9383 (base32
9384 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9385 (build-system python-build-system)
9386 (home-page "https://github.com/alex/pretend")
9387 (synopsis "Library for stubbing in Python")
9388 (description
9389 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9390 technique for writing tests. You may hear the term mixed up with mocks,
9391 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9392 responses, rather than doing any computation.")
9393 (license license:bsd-3)))
9394
9395 (define-public python2-pretend
9396 (package-with-python2 python-pretend))
9397
9398 (define-public python-pip
9399 (package
9400 (name "python-pip")
9401 (version "20.0.2")
9402 (source
9403 (origin
9404 (method url-fetch)
9405 (uri (pypi-uri "pip" version))
9406 (sha256
9407 (base32
9408 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9409 (build-system python-build-system)
9410 (arguments
9411 '(#:tests? #f)) ; there are no tests in the pypi archive.
9412 (home-page "https://pip.pypa.io/")
9413 (synopsis "Package manager for Python software")
9414 (description
9415 "Pip is a package manager for Python software, that finds packages on the
9416 Python Package Index (PyPI).")
9417 (license license:expat)))
9418
9419 (define-public python2-pip
9420 (package-with-python2 python-pip))
9421
9422 (define-public python-tlsh
9423 (package
9424 (name "python-tlsh")
9425 (version "3.4.5")
9426 (home-page "https://github.com/trendmicro/tlsh")
9427 (source
9428 (origin
9429 (method git-fetch)
9430 (uri (git-reference
9431 (url "https://github.com/trendmicro/tlsh")
9432 (commit (string-append "v" version))))
9433 (file-name (git-file-name name version))
9434 (sha256
9435 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9436 (build-system cmake-build-system)
9437 (arguments
9438 '(#:out-of-source? #f
9439 #:phases (modify-phases %standard-phases
9440 (replace
9441 'install
9442 (lambda* (#:key outputs #:allow-other-keys)
9443 ;; Build and install the Python bindings. The underlying
9444 ;; C++ library is apparently not meant to be installed.
9445 (let ((out (assoc-ref outputs "out")))
9446 (with-directory-excursion "py_ext"
9447 (and (system* "python" "setup.py" "build")
9448 (system* "python" "setup.py" "install"
9449 (string-append "--prefix=" out))))))))))
9450 (inputs `(("python" ,python-wrapper))) ;for the bindings
9451 (synopsis "Fuzzy matching library for Python")
9452 (description
9453 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9454 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9455 value which can be used for similarity comparisons. Similar objects have
9456 similar hash values, which allows for the detection of similar objects by
9457 comparing their hash values. The byte stream should have a sufficient amount
9458 of complexity; for example, a byte stream of identical bytes will not generate
9459 a hash value.")
9460 (license license:asl2.0)))
9461
9462 (define-public python2-tlsh
9463 (package
9464 (inherit python-tlsh)
9465 (name "python2-tlsh")
9466 (inputs `(("python" ,python-2)))))
9467
9468 (define-public python-termcolor
9469 (package
9470 (name "python-termcolor")
9471 (version "1.1.0")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (pypi-uri "termcolor" version))
9476 (sha256
9477 (base32
9478 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9479 (build-system python-build-system)
9480 (arguments
9481 ;; There are no tests.
9482 `(#:tests? #f))
9483 (home-page "https://pypi.org/project/termcolor/")
9484 (synopsis "ANSII Color formatting for terminal output")
9485 (description
9486 "This package provides ANSII Color formatting for output in terminals.")
9487 (license license:expat)))
9488
9489 (define-public python2-termcolor
9490 (package-with-python2 python-termcolor))
9491
9492 (define-public python-terminaltables
9493 (package
9494 (name "python-terminaltables")
9495 (version "3.1.0")
9496 (source
9497 (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "terminaltables" version))
9500 (sha256
9501 (base32
9502 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9503 (build-system python-build-system)
9504 (home-page "https://github.com/Robpol86/terminaltables")
9505 (synopsis
9506 "Generate simple tables in terminals from a nested list of strings")
9507 (description
9508 "This package makes it easy to draw tables in terminal/console
9509 applications from a list of lists of strings. It supports multi-line rows.")
9510 (license license:expat)))
9511
9512 (define-public python-libarchive-c
9513 (package
9514 (name "python-libarchive-c")
9515 (version "2.9")
9516 (source (origin
9517 (method url-fetch)
9518 (uri (pypi-uri "libarchive-c" version))
9519 (sha256
9520 (base32
9521 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9522 (build-system python-build-system)
9523 (arguments
9524 '(#:phases (modify-phases %standard-phases
9525 (add-before
9526 'build 'reference-libarchive
9527 (lambda* (#:key inputs #:allow-other-keys)
9528 ;; Retain the absolute file name of libarchive.so.
9529 (let ((libarchive (assoc-ref inputs "libarchive")))
9530 (substitute* "libarchive/ffi.py"
9531 (("find_library\\('archive'\\)")
9532 (string-append "'" libarchive
9533 "/lib/libarchive.so'"))))))
9534 (replace 'check
9535 (lambda _ (invoke "pytest" "-vv"))))))
9536 (native-inputs
9537 `(("python-mock" ,python-mock)
9538 ("python-pytest" ,python-pytest)))
9539 (inputs
9540 `(("libarchive" ,libarchive)))
9541 (home-page "https://github.com/Changaco/python-libarchive-c")
9542 (synopsis "Python interface to libarchive")
9543 (description
9544 "This package provides Python bindings to libarchive, a C library to
9545 access possibly compressed archives in many different formats. It uses
9546 Python's @code{ctypes} foreign function interface (FFI).")
9547 (license license:lgpl2.0+)))
9548
9549 (define-public python2-libarchive-c
9550 (package-with-python2 python-libarchive-c))
9551
9552 (define-public python-file
9553 (package
9554 (inherit file)
9555 (name "python-file")
9556 (build-system python-build-system)
9557 (arguments
9558 '(#:tests? #f ;no tests
9559 #:configure-flags '("--single-version-externally-managed" "--root=/")
9560 #:phases (modify-phases %standard-phases
9561 (add-before 'build 'change-directory
9562 (lambda _
9563 (chdir "python")
9564 #t))
9565 (add-before 'build 'set-library-file-name
9566 (lambda* (#:key inputs #:allow-other-keys)
9567 (let ((file (assoc-ref inputs "file")))
9568 (substitute* "magic.py"
9569 (("find_library\\('magic'\\)")
9570 (string-append "'" file "/lib/libmagic.so'")))
9571 #t))))))
9572 (inputs `(("file" ,file)))
9573 (native-inputs (if (%current-target-system)
9574 `(("self" ,this-package))
9575 '()))
9576 (synopsis "Python bindings to the libmagic file type guesser")
9577 (description "This package provides Python bindings to the libmagic file
9578 type guesser.
9579
9580 Note that this module and the @code{python-magic} module both provide a
9581 @file{magic.py} file; these two modules, which are different and were
9582 developed separately, both serve the same purpose: provide Python bindings for
9583 libmagic.")))
9584
9585 (define-public python2-file
9586 (package-with-python2 python-file))
9587
9588 (define-public python-debian
9589 (package
9590 (name "python-debian")
9591 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9592 (version "0.1.36")
9593 (source
9594 (origin
9595 ;; Use git-fetch, as pypi doesn't include test suite.
9596 (method git-fetch)
9597 (uri (git-reference
9598 (url home-page)
9599 (commit version)))
9600 (file-name (git-file-name name version))
9601 (sha256
9602 (base32
9603 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9604 (build-system python-build-system)
9605 (arguments
9606 `(#:phases (modify-phases %standard-phases
9607 (add-after 'unpack 'remove-debian-specific-tests
9608 ;; python-apt, apt and dpkg are not yet available in guix,
9609 ;; and these tests heavily depend on them.
9610 (lambda _
9611 (delete-file "lib/debian/tests/test_deb822.py")
9612 (delete-file "lib/debian/tests/test_debfile.py")
9613 #t)))))
9614 (propagated-inputs
9615 `(("python-six" ,python-six)
9616 ("python-chardet" ,python-chardet)))
9617 (synopsis "Debian package related modules")
9618 (description
9619 ;; XXX: Use @enumerate instead of @itemize to work around
9620 ;; <http://bugs.gnu.org/21772>.
9621 "This package provides Python modules that abstract many formats of
9622 Debian-related files, such as:
9623
9624 @enumerate
9625 @item Debtags information;
9626 @item @file{debian/changelog} files;
9627 @item packages files, pdiffs;
9628 @item control files of single or multiple RFC822-style paragraphs---e.g.
9629 @file{debian/control}, @file{.changes}, @file{.dsc};
9630 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9631 contained files and meta-information.
9632 @end enumerate\n")
9633
9634 ;; Modules are either GPLv2+ or GPLv3+.
9635 (license license:gpl3+)))
9636
9637 (define-public python-nbformat
9638 (package
9639 (name "python-nbformat")
9640 (version "4.4.0")
9641 (source
9642 (origin
9643 (method url-fetch)
9644 (uri (pypi-uri "nbformat" version))
9645 (sha256
9646 (base32
9647 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9648 (build-system python-build-system)
9649 (arguments `(#:tests? #f)) ; no test target
9650 (propagated-inputs
9651 `(("python-ipython-genutils" ,python-ipython-genutils)
9652 ("python-jsonschema" ,python-jsonschema)
9653 ("python-jupyter-core" ,python-jupyter-core)
9654 ("python-traitlets" ,python-traitlets)))
9655 (home-page "http://jupyter.org")
9656 (synopsis "Jupyter Notebook format")
9657 (description "This package provides the reference implementation of the
9658 Jupyter Notebook format and Python APIs for working with notebooks.")
9659 (license license:bsd-3)))
9660
9661 (define-public python2-nbformat
9662 (package-with-python2 python-nbformat))
9663
9664 (define-public python-bleach
9665 (package
9666 (name "python-bleach")
9667 (version "3.1.5")
9668 (source
9669 (origin
9670 (method url-fetch)
9671 (uri (pypi-uri "bleach" version))
9672 (sha256
9673 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9674 (build-system python-build-system)
9675 (propagated-inputs
9676 `(("python-webencodings" ,python-webencodings)
9677 ("python-six" ,python-six)))
9678 (native-inputs
9679 `(("python-datrie" ,python-datrie)
9680 ("python-genshi" ,python-genshi)
9681 ("python-lxml" ,python-lxml)
9682 ("python-pytest" ,python-pytest)))
9683 (home-page "https://github.com/mozilla/bleach")
9684 (synopsis "Whitelist-based HTML-sanitizing tool")
9685 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9686 (license license:asl2.0)))
9687
9688 (define-public python2-bleach
9689 (package-with-python2 python-bleach))
9690
9691 (define-public python-entrypoints
9692 (package
9693 (name "python-entrypoints")
9694 (version "0.3")
9695 (source
9696 (origin
9697 (method url-fetch)
9698 (uri (pypi-uri "entrypoints" version))
9699 (sha256
9700 (base32
9701 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9702 (build-system python-build-system)
9703 ;; The package does not come with a setup.py file, so we have to generate
9704 ;; one ourselves.
9705 (arguments
9706 `(#:tests? #f
9707 #:phases
9708 (modify-phases %standard-phases
9709 (add-after 'unpack 'create-setup.py
9710 (lambda _
9711 (call-with-output-file "setup.py"
9712 (lambda (port)
9713 (format port "\
9714 from setuptools import setup
9715 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9716 " ,version))))))))
9717 (home-page "https://github.com/takluyver/entrypoints")
9718 (synopsis "Discover and load entry points from installed Python packages")
9719 (description "Entry points are a way for Python packages to advertise
9720 objects with some common interface. The most common examples are
9721 @code{console_scripts} entry points, which define shell commands by
9722 identifying a Python function to run. The @code{entrypoints} module contains
9723 functions to find and load entry points.")
9724 (license license:expat)))
9725
9726 (define-public python2-entrypoints
9727 (package-with-python2 python-entrypoints))
9728
9729 (define-public python-epc
9730 (package
9731 (name "python-epc")
9732 (version "0.0.5")
9733 (source
9734 (origin
9735 (method url-fetch)
9736 (uri (pypi-uri "epc" version))
9737 (sha256
9738 (base32
9739 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9740 (build-system python-build-system)
9741 (propagated-inputs
9742 `(("python-sexpdata" ,python-sexpdata)))
9743 (native-inputs
9744 `(("python-nose" ,python-nose)))
9745 (home-page "https://github.com/tkf/python-epc")
9746 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9747 (description
9748 "Python-EPC can call elisp functions from Python and Python functions
9749 from elisp.")
9750 (license license:gpl3)))
9751
9752 (define-public python-forex-python
9753 (package
9754 (name "python-forex-python")
9755 (version "1.5")
9756 (source
9757 (origin
9758 (method url-fetch)
9759 (uri (pypi-uri "forex-python" version))
9760 (sha256
9761 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9762 (build-system python-build-system)
9763 (arguments
9764 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9765 ;; repository require online data.
9766 `(#:tests? #f))
9767 (propagated-inputs
9768 `(("python-requests" ,python-requests)
9769 ("python-simplejson" ,python-simplejson)))
9770 (home-page "https://github.com/MicroPyramid/forex-python")
9771 (synopsis "Foreign exchange rates and currency conversion")
9772 (description
9773 "@code{python-forex-python} can be used to manipulate foreign
9774 exchange rates and to operate currency conversions.
9775
9776 Features:
9777 @itemize
9778 @item List all currency rates.
9779 @item BitCoin price for all currencies.
9780 @item Converting amount to BitCoins.
9781 @item Get historical rates for any day since 1999.
9782 @item Conversion rate for one currency(ex; USD to INR).
9783 @item Convert amount from one currency to other.('USD 10$' to INR).
9784 @item Currency symbols.
9785 @item Currency names.
9786 @end itemize")
9787 (license license:expat)))
9788
9789 (define-public python-simpleeval
9790 (package
9791 (name "python-simpleeval")
9792 (version "0.9.10")
9793 (source
9794 (origin
9795 (method url-fetch)
9796 (uri (pypi-uri "simpleeval" version))
9797 (sha256
9798 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9799 (build-system python-build-system)
9800 (home-page "https://github.com/danthedeckie/simpleeval")
9801 (synopsis "Simple, safe single expression evaluator library")
9802 (description
9803 "This package provides a quick single file library for easily adding
9804 evaluatable expressions into python projects. Say you want to allow a user
9805 to set an alarm volume, which could depend on the time of day, alarm level,
9806 how many previous alarms had gone off, and if there is music playing at the
9807 time.")
9808 (license license:expat)))
9809
9810 (define-public python-nbconvert
9811 (package
9812 (name "python-nbconvert")
9813 (version "5.0.0b1")
9814 (source
9815 (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "nbconvert" version))
9818 (sha256
9819 (base32
9820 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9821 (build-system python-build-system)
9822 (arguments
9823 `(;; The "bdist_egg" target is disabled by default, causing the installation
9824 ;; to fail.
9825 #:configure-flags (list "bdist_egg")
9826 ;; FIXME: 5 failures, 40 errors.
9827 #:tests? #f))
9828 ;; #:phases
9829 ;; (modify-phases %standard-phases
9830 ;; (replace 'check
9831 ;; (lambda _
9832 ;; (zero? (system* "py.test" "-v")))))
9833 (native-inputs
9834 `(("python-pytest" ,python-pytest)))
9835 (propagated-inputs
9836 `(("python-bleach" ,python-bleach)
9837 ("python-entrypoints" ,python-entrypoints)
9838 ("python-jinja2" ,python-jinja2)
9839 ("python-jupyter-core" ,python-jupyter-core)
9840 ("python-mistune" ,python-mistune)
9841 ("python-nbformat" ,python-nbformat)
9842 ("python-pygments" ,python-pygments)
9843 ("python-traitlets" ,python-traitlets)))
9844 (home-page "http://jupyter.org")
9845 (synopsis "Converting Jupyter Notebooks")
9846 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9847 notebooks to various other formats via Jinja templates. It allows you to
9848 convert an @code{.ipynb} notebook file into various static formats including:
9849
9850 @enumerate
9851 @item HTML
9852 @item LaTeX
9853 @item PDF
9854 @item Reveal JS
9855 @item Markdown (md)
9856 @item ReStructured Text (rst)
9857 @item executable script
9858 @end enumerate\n")
9859 (license license:bsd-3)))
9860
9861 (define-public python2-nbconvert
9862 (package-with-python2 python-nbconvert))
9863
9864 (define-public python-notebook
9865 (package
9866 (name "python-notebook")
9867 (version "5.7.4")
9868 (source (origin
9869 (method url-fetch)
9870 (uri (pypi-uri "notebook" version))
9871 (sha256
9872 (base32
9873 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9874 (build-system python-build-system)
9875 (arguments
9876 `(#:phases
9877 (modify-phases %standard-phases
9878 (replace 'check
9879 (lambda _
9880 ;; These tests require a browser
9881 (delete-file-recursively "notebook/tests/selenium")
9882 ;; Some tests need HOME
9883 (setenv "HOME" "/tmp")
9884 ;; This file contains "warningfilters", which are not supported
9885 ;; by this version of nose.
9886 (delete-file "setup.cfg")
9887 (with-directory-excursion "/tmp"
9888 (invoke "nosetests" "-v"))
9889 #t)))))
9890 (propagated-inputs
9891 `(("python-jupyter-core" ,python-jupyter-core)
9892 ("python-nbformat" ,python-nbformat)
9893 ("python-nbconvert" ,python-nbconvert)
9894 ("python-prometheus-client" ,python-prometheus-client)
9895 ("python-send2trash" ,python-send2trash)
9896 ("python-terminado" ,python-terminado)))
9897 (native-inputs
9898 `(("python-nose" ,python-nose)
9899 ("python-sphinx" ,python-sphinx)
9900 ("python-requests" ,python-requests)))
9901 (home-page "http://jupyter.org/")
9902 (synopsis "Web-based notebook environment for interactive computing")
9903 (description
9904 "The Jupyter HTML notebook is a web-based notebook environment for
9905 interactive computing.")
9906 (properties `((python2-variant . ,(delay python2-notebook))))
9907 (license license:bsd-3)))
9908
9909 (define-public python2-notebook
9910 (let ((base (package-with-python2
9911 (strip-python2-variant python-notebook))))
9912 (package (inherit base)
9913 (native-inputs
9914 `(("python2-mock" ,python2-mock)
9915 ,@(package-native-inputs base)))
9916 (arguments
9917 (substitute-keyword-arguments (package-arguments base)
9918 ((#:phases phases)
9919 `(modify-phases ,phases
9920 (add-before 'check 'disable-test-case
9921 ;; The test requires network access to localhost. Curiously it
9922 ;; fails with Python 2 only. Simply make the test-case return
9923 ;; immediately.
9924 (lambda _
9925 (substitute*
9926 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9927 (("formats = self.nbconvert_api") "return #")))))))))))
9928
9929 (define-public python-widgetsnbextension
9930 (package
9931 (name "python-widgetsnbextension")
9932 (version "3.5.1")
9933 (source
9934 (origin
9935 (method url-fetch)
9936 (uri (pypi-uri "widgetsnbextension" version))
9937 (sha256
9938 (base32
9939 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9940 (build-system python-build-system)
9941 (propagated-inputs
9942 `(("python-ipykernel" ,python-ipykernel)
9943 ("python-notebook" ,python-notebook)))
9944 (native-inputs
9945 `(("python-certifi" ,python-certifi)
9946 ("python-nose" ,python-nose)))
9947 (home-page "https://ipython.org")
9948 (synopsis "IPython HTML widgets for Jupyter")
9949 (description "This package provides interactive HTML widgets for Jupyter
9950 notebooks.")
9951 (license license:bsd-3)))
9952
9953 (define-public python2-widgetsnbextension
9954 (package-with-python2 python-widgetsnbextension))
9955
9956 (define-public python-ipywidgets
9957 (package
9958 (name "python-ipywidgets")
9959 (version "7.5.1")
9960 (source
9961 (origin
9962 (method url-fetch)
9963 (uri (pypi-uri "ipywidgets" version))
9964 (sha256
9965 (base32
9966 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9967 (build-system python-build-system)
9968 (propagated-inputs
9969 `(("python-ipython" ,python-ipython)
9970 ("python-traitlets" ,python-traitlets)
9971 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9972 (native-inputs
9973 `(("python-nose" ,python-nose)
9974 ("python-pytest" ,python-pytest)))
9975 (home-page "https://ipython.org")
9976 (synopsis "IPython HTML widgets for Jupyter")
9977 (description "Ipywidgets are interactive HTML widgets for Jupyter
9978 notebooks and the IPython kernel. Notebooks come alive when interactive
9979 widgets are used. Users gain control of their data and can visualize changes
9980 in the data.")
9981 (license license:bsd-3)))
9982
9983 (define-public python2-ipywidgets
9984 (package-with-python2 python-ipywidgets))
9985
9986 (define-public python-jupyter-console
9987 (package
9988 (name "python-jupyter-console")
9989 (version "6.1.0")
9990 (source
9991 (origin
9992 (method url-fetch)
9993 (uri (pypi-uri "jupyter_console" version))
9994 (sha256
9995 (base32
9996 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9997 (build-system python-build-system)
9998 (propagated-inputs
9999 `(("python-ipykernel" ,python-ipykernel)
10000 ("python-jupyter-client" ,python-jupyter-client)
10001 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
10002 ("python-pygments" ,python-pygments)))
10003 (native-inputs
10004 `(("python-nose" ,python-nose)))
10005 (home-page "https://jupyter.org")
10006 (synopsis "Jupyter terminal console")
10007 (description "This package provides a terminal-based console frontend for
10008 Jupyter kernels. It also allows for console-based interaction with non-Python
10009 Jupyter kernels such as IJulia and IRKernel.")
10010 (properties `((python2-variant . ,(delay python2-jupyter-console))))
10011 (license license:bsd-3)))
10012
10013 (define-public python2-jupyter-console
10014 (package
10015 (name "python2-jupyter-console")
10016 (version "5.2.0")
10017 (source
10018 (origin
10019 (method url-fetch)
10020 (uri (pypi-uri "jupyter_console" version))
10021 (sha256
10022 (base32
10023 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
10024 (build-system python-build-system)
10025 (arguments
10026 `(#:python ,python-2
10027 #:tests? #f)) ; Tests only run in a TTY.
10028 (propagated-inputs
10029 `(("python2-ipykernel" ,python2-ipykernel)
10030 ("python2-jupyter-client" ,python2-jupyter-client)
10031 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
10032 ("python2-pygments" ,python2-pygments)))
10033 (native-inputs
10034 `(("python2-nose" ,python2-nose)))
10035 (home-page "https://jupyter.org")
10036 (synopsis "Jupyter terminal console")
10037 (description "This package provides a terminal-based console frontend for
10038 Jupyter kernels. It also allows for console-based interaction with non-Python
10039 Jupyter kernels such as IJulia and IRKernel.")
10040 (license license:bsd-3)))
10041
10042 ;; The python-ipython and python-jupyter-console require each other. To get
10043 ;; the functionality in both packages working, strip down the
10044 ;; python-jupyter-console package when using it as an input to python-ipython.
10045 (define python-jupyter-console-minimal
10046 (package
10047 (inherit python-jupyter-console)
10048 (name "python-jupyter-console-minimal")
10049 (arguments
10050 (substitute-keyword-arguments
10051 (package-arguments python-jupyter-console)
10052 ((#:phases phases)
10053 `(modify-phases ,phases
10054 (add-after 'install 'delete-bin
10055 (lambda* (#:key outputs #:allow-other-keys)
10056 ;; Delete the bin files, to avoid conflicts in profiles
10057 ;; where python-ipython and python-jupyter-console are
10058 ;; both present.
10059 (delete-file-recursively
10060 (string-append
10061 (assoc-ref outputs "out") "/bin"))))))))
10062 ;; Remove the python-ipython propagated input, to avoid the cycle
10063 (propagated-inputs
10064 (alist-delete
10065 "python-ipython"
10066 (package-propagated-inputs python-jupyter-console)))))
10067
10068 (define-public python-qtconsole
10069 (package
10070 (name "python-qtconsole")
10071 (version "4.4.3")
10072 (source
10073 (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "qtconsole" version))
10076 (sha256
10077 (base32
10078 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
10079 (build-system python-build-system)
10080 (arguments
10081 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
10082 ;; but we only have the LTS version 5.x. This means that there might be
10083 ;; runtime errors, but since this is a dependency of the Jupyter package,
10084 ;; and Jupyter can be used without the qtconsole we can overlook this for
10085 ;; now.
10086 `(#:tests? #f
10087 #:phases
10088 (modify-phases %standard-phases
10089 (add-before 'check 'pre-check
10090 (lambda _
10091 (setenv "QT_QPA_PLATFORM" "offscreen")
10092 #t)))))
10093 (propagated-inputs
10094 `(("python-ipykernel" ,python-ipykernel)
10095 ("python-ipython" ,python-ipython)))
10096 (native-inputs
10097 `(("python-pytest" ,python-pytest)))
10098 (home-page "http://jupyter.org")
10099 (synopsis "Jupyter Qt console")
10100 (description "This package provides a Qt-based console for Jupyter with
10101 support for rich media output.")
10102 (license license:bsd-3)))
10103
10104 (define-public python-jsbeautifier
10105 (package
10106 (name "python-jsbeautifier")
10107 (version "1.10.2")
10108 (home-page "https://github.com/beautify-web/js-beautify")
10109 (source (origin
10110 (method git-fetch)
10111 (uri (git-reference
10112 (url home-page)
10113 (commit (string-append "v" version))))
10114 (file-name (git-file-name name version))
10115 (sha256
10116 (base32
10117 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
10118 (build-system python-build-system)
10119 (arguments
10120 `(#:phases (modify-phases %standard-phases
10121 (add-after 'unpack 'chdir
10122 (lambda _
10123 ;; The upstream Git repository contains all the code,
10124 ;; but this package only builds the python code.
10125 (chdir "python")
10126 #t))
10127 (add-after 'unpack 'patch-python-six-requirements
10128 (lambda _
10129 (substitute* "python/setup.py"
10130 (("six>=1.12.0")
10131 "six>=1.11.0"))
10132 #t)))))
10133 (propagated-inputs
10134 `(("python-editorconfig" ,python-editorconfig)
10135 ("python-six" ,python-six)))
10136 (native-inputs
10137 `(("python-pytest" ,python-pytest)))
10138 (synopsis "JavaScript unobfuscator and beautifier")
10139 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
10140 popular online obfuscators.")
10141 (license license:expat)))
10142
10143 (define-public jupyter
10144 (package
10145 (name "jupyter")
10146 (version "1.0.0")
10147 (source
10148 (origin
10149 (method url-fetch)
10150 (uri (pypi-uri "jupyter" version))
10151 (sha256
10152 (base32
10153 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10154 (build-system python-build-system)
10155 (arguments '(#:tests? #f)) ; there are none.
10156 (propagated-inputs
10157 `(("python-ipykernel" ,python-ipykernel)
10158 ("python-ipywidgets" ,python-ipywidgets)
10159 ("python-jupyter-console" ,python-jupyter-console)
10160 ("python-nbconvert" ,python-nbconvert)
10161 ("python-notebook" ,python-notebook)
10162 ("python-qtconsole" ,python-qtconsole)))
10163 (native-search-paths
10164 (list (search-path-specification
10165 (variable "JUPYTER_PATH")
10166 (files '("share/jupyter")))))
10167 (home-page "https://jupyter.org")
10168 (synopsis "Web application for interactive documents")
10169 (description
10170 "The Jupyter Notebook is a web application that allows you to create and
10171 share documents that contain live code, equations, visualizations and
10172 explanatory text. Uses include: data cleaning and transformation, numerical
10173 simulation, statistical modeling, machine learning and much more.")
10174 (license license:bsd-3)))
10175
10176 (define-public python-chardet
10177 (package
10178 (name "python-chardet")
10179 (version "3.0.4")
10180 (source
10181 (origin
10182 (method url-fetch)
10183 (uri (pypi-uri "chardet" version))
10184 (sha256
10185 (base32
10186 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10187 (native-inputs
10188 `(("python-hypothesis" ,python-hypothesis)
10189 ("python-pytest" ,python-pytest)
10190 ("python-pytest-runner" ,python-pytest-runner)))
10191 (build-system python-build-system)
10192 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10193 (arguments `(#:tests? #f))
10194 (home-page "https://github.com/chardet/chardet")
10195 (synopsis "Universal encoding detector for Python 2 and 3")
10196 (description
10197 "This package provides @code{chardet}, a Python module that can
10198 automatically detect a wide range of file encodings.")
10199 (license license:lgpl2.1+)))
10200
10201 (define-public python2-chardet
10202 (package-with-python2 python-chardet))
10203
10204 (define-public python-docopt
10205 (package
10206 (name "python-docopt")
10207 (version "0.6.2")
10208 (source
10209 (origin
10210 (method git-fetch)
10211 ;; The release on PyPI does not include tests.
10212 (uri (git-reference
10213 (url "https://github.com/docopt/docopt")
10214 (commit version)))
10215 (file-name (git-file-name name version))
10216 (sha256
10217 (base32
10218 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10219 (build-system python-build-system)
10220 (native-inputs
10221 `(("python-pytest" ,python-pytest)))
10222 (arguments
10223 `(#:phases
10224 (modify-phases %standard-phases
10225 (replace 'check
10226 (lambda _ (invoke "py.test"))))))
10227 (home-page "http://docopt.org")
10228 (synopsis "Command-line interface description language for Python")
10229 (description "This library allows the user to define a command-line
10230 interface from a program's help message rather than specifying it
10231 programmatically with command-line parsers like @code{getopt} and
10232 @code{argparse}.")
10233 (license license:expat)))
10234
10235 (define-public python2-docopt
10236 (package-with-python2 python-docopt))
10237
10238 (define-public python-pythondialog
10239 (package
10240 (name "python-pythondialog")
10241 (version "3.4.0")
10242 (source
10243 (origin
10244 (method url-fetch)
10245 (uri (pypi-uri "pythondialog" version))
10246 (sha256
10247 (base32
10248 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10249 (build-system python-build-system)
10250 (arguments
10251 `(#:phases
10252 (modify-phases %standard-phases
10253 (add-after 'unpack 'patch-path
10254 (lambda* (#:key inputs #:allow-other-keys)
10255 (let* ((dialog (assoc-ref inputs "dialog")))
10256 ;; Since this library really wants to grovel the search path, we
10257 ;; must hardcode dialog's store path into it.
10258 (substitute* "dialog.py"
10259 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10260 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10261 #t))))
10262 #:tests? #f)) ; no test suite
10263 (propagated-inputs
10264 `(("dialog" ,dialog)))
10265 (home-page "http://pythondialog.sourceforge.net/")
10266 (synopsis "Python interface to the UNIX dialog utility")
10267 (description "A Python wrapper for the dialog utility. Its purpose is to
10268 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10269 This allows one to make simple text-mode user interfaces on Unix-like systems")
10270 (license license:lgpl2.1)
10271 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10272
10273 (define-public python2-pythondialog
10274 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10275 (package
10276 (inherit base)
10277 (version (package-version python-pythondialog))
10278 (source (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "python2-pythondialog" version))
10281 (sha256
10282 (base32
10283 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10284
10285 (define-public python-configobj
10286 (package
10287 (name "python-configobj")
10288 (version "5.0.6")
10289 (source (origin
10290 (method url-fetch)
10291 (uri (pypi-uri "configobj" version))
10292 (sha256
10293 (base32
10294 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10295 ;; Patch setup.py so it looks for python-setuptools, which is
10296 ;; required to parse the keyword 'install_requires' in setup.py.
10297 (patches (search-patches "python-configobj-setuptools.patch"))))
10298 (build-system python-build-system)
10299 (propagated-inputs
10300 `(("python-six" ,python-six)))
10301 (synopsis "Config file reading, writing and validation")
10302 (description "ConfigObj is a simple but powerful config file reader and
10303 writer: an ini file round tripper. Its main feature is that it is very easy to
10304 use, with a straightforward programmer’s interface and a simple syntax for
10305 config files.")
10306 (home-page "https://github.com/DiffSK/configobj")
10307 (license license:bsd-3)))
10308
10309 (define-public python2-configobj
10310 (package-with-python2 python-configobj))
10311
10312 (define-public python-configargparse
10313 (package
10314 (name "python-configargparse")
10315 (version "0.14.0")
10316 (source (origin
10317 (method url-fetch)
10318 (uri (pypi-uri "ConfigArgParse" version))
10319 (sha256
10320 (base32
10321 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10322 (build-system python-build-system)
10323 (native-inputs
10324 `(("python-pyyaml" ,python-pyyaml)))
10325 (arguments
10326 `(#:phases
10327 (modify-phases %standard-phases
10328 (replace 'check
10329 (lambda _
10330 ;; Bypass setuptools-shim because one test relies on "setup.py"
10331 ;; being the first argument passed to the python call.
10332 ;;
10333 ;; NOTE: Many tests do not run because they rely on Python's
10334 ;; built-in test.test_argparse, but we remove the unit tests from
10335 ;; our Python installation.
10336 (invoke "python" "setup.py" "test"))))))
10337 (synopsis "Replacement for argparse")
10338 (description "A drop-in replacement for argparse that allows options to also
10339 be set via config files and/or environment variables.")
10340 (home-page "https://github.com/bw2/ConfigArgParse")
10341 (license license:expat)))
10342
10343 (define-public python2-configargparse
10344 (package-with-python2 python-configargparse))
10345
10346 (define-public python-argparse-manpage
10347 (package
10348 (name "python-argparse-manpage")
10349 (version "1.1")
10350 (source
10351 (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "argparse-manpage" version))
10354 (sha256
10355 (base32
10356 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10357 (build-system python-build-system)
10358 (home-page "https://github.com/praiskup/argparse-manpage")
10359 (synopsis "Build manual page from Python's ArgumentParser object")
10360 (description
10361 "This package provides tools to build manual pages from Python's
10362 @code{ArgumentParser} object.")
10363 (license license:asl2.0)))
10364
10365 (define-public python-contextlib2
10366 (package
10367 (name "python-contextlib2")
10368 (version "0.6.0.post1")
10369 (source
10370 (origin
10371 (method url-fetch)
10372 (uri (pypi-uri "contextlib2" version))
10373 (sha256
10374 (base32
10375 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10376 (build-system python-build-system)
10377 (home-page "https://contextlib2.readthedocs.org/")
10378 (synopsis "Tools for decorators and context managers")
10379 (description "This module is primarily a backport of the Python
10380 3.2 contextlib to earlier Python versions. Like contextlib, it
10381 provides utilities for common tasks involving decorators and context
10382 managers. It also contains additional features that are not part of
10383 the standard library.")
10384 (properties `((python2-variant . ,(delay python2-contextlib2))))
10385 (license license:psfl)))
10386
10387 (define-public python2-contextlib2
10388 (let ((base (package-with-python2
10389 (strip-python2-variant python-contextlib2))))
10390 (package
10391 (inherit base)
10392 (arguments
10393 (substitute-keyword-arguments (package-arguments base)
10394 ((#:phases phases)
10395 `(modify-phases ,phases
10396 (replace 'check
10397 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10398 (native-inputs
10399 `(("python2-unittest2" ,python2-unittest2))))))
10400
10401 ;; This package is used by python2-pytest via python2-importlib-metadata,
10402 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10403 (define-public python2-contextlib2-bootstrap
10404 (hidden-package
10405 (package/inherit
10406 python2-contextlib2
10407 (name "python2-contextlib2-bootstrap")
10408 (arguments
10409 `(#:tests? #f
10410 ,@(package-arguments python2-contextlib2)))
10411 (native-inputs '()))))
10412
10413 (define-public python-texttable
10414 (package
10415 (name "python-texttable")
10416 (version "1.6.2")
10417 (source
10418 (origin
10419 (method url-fetch)
10420 (uri (pypi-uri "texttable" version))
10421 (sha256
10422 (base32
10423 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10424 (build-system python-build-system)
10425 (arguments
10426 `(#:phases
10427 (modify-phases %standard-phases
10428 (replace 'check
10429 (lambda _ (invoke "pytest" "tests.py"))))))
10430 (native-inputs
10431 `(("python-pytest" ,python-pytest)))
10432 (home-page "https://github.com/foutaise/texttable/")
10433 (synopsis "Python module for creating simple ASCII tables")
10434 (description "Texttable is a Python module for creating simple ASCII
10435 tables.")
10436 (license license:expat)))
10437
10438 (define-public python2-texttable
10439 (package-with-python2 python-texttable))
10440
10441 (define-public python-atomicwrites
10442 (package
10443 (name "python-atomicwrites")
10444 (version "1.3.0")
10445 (source (origin
10446 (method url-fetch)
10447 (uri (pypi-uri "atomicwrites" version))
10448 (sha256
10449 (base32
10450 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10451 (build-system python-build-system)
10452 (synopsis "Atomic file writes in Python")
10453 (description "Library for atomic file writes using platform dependent tools
10454 for atomic file system operations.")
10455 (home-page "https://github.com/untitaker/python-atomicwrites")
10456 (license license:expat)))
10457
10458 (define-public python2-atomicwrites
10459 (package-with-python2 python-atomicwrites))
10460
10461 (define-public python-click-threading
10462 (package
10463 (name "python-click-threading")
10464 (version "0.4.4")
10465 (source (origin
10466 (method url-fetch)
10467 (uri (pypi-uri "click-threading" version))
10468 (sha256
10469 (base32
10470 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10471 (build-system python-build-system)
10472 (propagated-inputs
10473 `(("python-click" ,python-click)))
10474 (synopsis "Utilities for multithreading in Click")
10475 (description "This package provides utilities for multithreading in Click
10476 applications.")
10477 (home-page "https://github.com/click-contrib/click-threading")
10478 (license license:expat)))
10479
10480 (define-public python-click-log
10481 (package
10482 (name "python-click-log")
10483 (version "0.3.2")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "click-log" version))
10487 (sha256
10488 (base32
10489 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10490 (build-system python-build-system)
10491 (propagated-inputs
10492 `(("python-click" ,python-click)))
10493 (synopsis "Logging for click applications")
10494 (description "This package provides a Python library for logging Click
10495 applications.")
10496 (home-page "https://github.com/click-contrib/click-log")
10497 (license license:expat)))
10498
10499 (define-public python-apipkg
10500 (package
10501 (name "python-apipkg")
10502 (version "1.5")
10503 (source (origin
10504 (method url-fetch)
10505 (uri (pypi-uri "apipkg" version))
10506 (sha256
10507 (base32
10508 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10509 (build-system python-build-system)
10510 (native-inputs
10511 `(("python-pytest" ,python-pytest)
10512 ("python-setuptools-scm" ,python-setuptools-scm)))
10513 (synopsis "Namespace control and lazy-import mechanism")
10514 (description "With apipkg you can control the exported namespace of a Python
10515 package and greatly reduce the number of imports for your users. It is a small
10516 pure Python module that works on virtually all Python versions.")
10517 (home-page "https://github.com/pytest-dev/apipkg")
10518 (license license:expat)))
10519
10520 (define-public python-execnet
10521 (package
10522 (name "python-execnet")
10523 (version "1.4.1")
10524 (source (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "execnet" version))
10527 (sha256
10528 (base32
10529 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10530 (build-system python-build-system)
10531 (arguments
10532 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10533 ;; The two test failures are caused by the lack of an `ssh` executable.
10534 ;; The test suite can be run with pytest after the 'install' phase.
10535 #:tests? #f))
10536 (native-inputs
10537 `(("python-pytest" ,python-pytest)
10538 ("python-setuptools-scm" ,python-setuptools-scm)))
10539 (propagated-inputs
10540 `(("python-apipkg" ,python-apipkg)))
10541 (synopsis "Rapid multi-Python deployment")
10542 (description "Execnet provides a share-nothing model with
10543 channel-send/receive communication for distributing execution across many
10544 Python interpreters across version, platform and network barriers. It has a
10545 minimal and fast API targeting the following uses:
10546 @enumerate
10547 @item distribute tasks to (many) local or remote CPUs
10548 @item write and deploy hybrid multi-process applications
10549 @item write scripts to administer multiple environments
10550 @end enumerate")
10551 (home-page "https://codespeak.net/execnet/")
10552 (license license:expat)))
10553
10554 (define-public python2-execnet
10555 (package-with-python2 python-execnet))
10556
10557 (define-public python-icalendar
10558 (package
10559 (name "python-icalendar")
10560 (version "4.0.5")
10561 (source (origin
10562 (method url-fetch)
10563 (uri (pypi-uri "icalendar" version))
10564 (sha256
10565 (base32
10566 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10567 (build-system python-build-system)
10568 (propagated-inputs
10569 `(("python-dateutil" ,python-dateutil)
10570 ("python-pytz" ,python-pytz)))
10571 (synopsis "Python library for parsing iCalendar files")
10572 (description "The icalendar package is a parser/generator of iCalendar
10573 files for use with Python.")
10574 (home-page "https://github.com/collective/icalendar")
10575 (license license:bsd-2)))
10576
10577 (define-public python-args
10578 (package
10579 (name "python-args")
10580 (version "0.1.0")
10581 (source (origin
10582 (method url-fetch)
10583 (uri (pypi-uri "args" version))
10584 (sha256
10585 (base32
10586 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10587 (build-system python-build-system)
10588 (home-page "https://github.com/kennethreitz/args")
10589 (synopsis "Command-line argument parser")
10590 (description
10591 "This library provides a Python module to parse command-line arguments.")
10592 (license license:bsd-3)))
10593
10594 (define-public python2-args
10595 (package-with-python2 python-args))
10596
10597 (define-public python-clint
10598 (package
10599 (name "python-clint")
10600 (version "0.5.1")
10601 (source (origin
10602 (method url-fetch)
10603 (uri (pypi-uri "clint" version))
10604 (sha256
10605 (base32
10606 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10607 (build-system python-build-system)
10608 (arguments
10609 '(#:phases
10610 (modify-phases %standard-phases
10611 (replace 'check
10612 (lambda _ (invoke "py.test" "-v"))))))
10613 (native-inputs
10614 `(("python-pytest" ,python-pytest)))
10615 (propagated-inputs
10616 `(("python-args" ,python-args)))
10617 (home-page "https://github.com/kennethreitz/clint")
10618 (synopsis "Command-line interface tools")
10619 (description
10620 "Clint is a Python module filled with a set of tools for developing
10621 command-line applications, including tools for colored and indented
10622 output, progress bar display, and pipes.")
10623 (license license:isc)))
10624
10625 (define-public python2-clint
10626 (package-with-python2 python-clint))
10627
10628 (define-public python-rply
10629 (package
10630 (name "python-rply")
10631 (version "0.7.5")
10632 (source (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "rply" version))
10635 (sha256
10636 (base32
10637 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10638 (build-system python-build-system)
10639 (propagated-inputs
10640 `(("python-appdirs" ,python-appdirs)))
10641 (home-page "https://github.com/alex/rply")
10642 (synopsis "Parser generator for Python")
10643 (description
10644 "This package provides a pure Python based parser generator, that also
10645 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10646 with a new public API, and RPython support.")
10647 (license license:bsd-3)))
10648
10649 (define-public python2-rply
10650 (package-with-python2 python-rply))
10651
10652 (define-public python-hy
10653 (package
10654 (name "python-hy")
10655 (version "0.18.0")
10656 (source (origin
10657 (method url-fetch)
10658 (uri (pypi-uri "hy" version))
10659 (sha256
10660 (base32
10661 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10662 (build-system python-build-system)
10663 (arguments
10664 '(#:phases
10665 (modify-phases %standard-phases
10666 (add-before 'install 'set-HOME
10667 (lambda _
10668 (setenv "HOME" "/tmp") #t))
10669 (replace 'check
10670 (lambda _
10671 ;; Tests require write access to HOME.
10672 (setenv "HOME" "/tmp")
10673 (invoke "nosetests"))))))
10674 (native-inputs
10675 `(("python-coverage" ,python-coverage)
10676 ("python-nose" ,python-nose)))
10677 (propagated-inputs
10678 `(("python-astor" ,python-astor)
10679 ("python-colorama" ,python-colorama)
10680 ("python-rply" ,python-rply)
10681 ("python-funcparserlib"
10682 ,python-funcparserlib)))
10683 (home-page "http://hylang.org/")
10684 (synopsis "Lisp frontend to Python")
10685 (description
10686 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10687 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10688 Python at your fingertips, in Lisp form.")
10689 (license license:expat)))
10690
10691 (define-public python2-functools32
10692 (package
10693 (name "python2-functools32")
10694 (version "3.2.3-2")
10695 (source
10696 (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "functools32" version))
10699 (sha256
10700 (base32
10701 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10702 (build-system python-build-system)
10703 (arguments
10704 `(#:python ,python-2
10705 #:tests? #f)) ; no test target
10706 (home-page "https://github.com/MiCHiLU/python-functools32")
10707 (synopsis
10708 "Backport of the functools module from Python 3.2.3")
10709 (description
10710 "This package is a backport of the @code{functools} module from Python
10711 3.2.3 for use with older versions of Python and PyPy.")
10712 (license license:expat)))
10713
10714 (define-public python2-subprocess32
10715 (package
10716 (name "python2-subprocess32")
10717 (version "3.2.7")
10718 (source (origin
10719 (method url-fetch)
10720 (uri (pypi-uri "subprocess32" version))
10721 (sha256
10722 (base32
10723 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10724 (patches
10725 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10726 (build-system python-build-system)
10727 (arguments
10728 `(#:python ,python-2
10729 ;; The test suite fails with Python > 2.7.13:
10730 ;; import test.support
10731 ;; ImportError: No module named support
10732 #:tests? #f
10733 #:phases
10734 (modify-phases %standard-phases
10735 (add-after 'unpack 'patch-/bin/sh
10736 (lambda _
10737 (substitute* '("subprocess32.py"
10738 "test_subprocess32.py")
10739 (("/bin/sh") (which "sh")))
10740 #t)))))
10741 (home-page "https://github.com/google/python-subprocess32")
10742 (synopsis "Backport of the subprocess module from Python 3.2")
10743 (description
10744 "This is a backport of the @code{subprocess} standard library module
10745 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10746 new features. On POSIX systems it is guaranteed to be reliable when used
10747 in threaded applications. It includes timeout support from Python 3.3 but
10748 otherwise matches 3.2’s API.")
10749 (license license:psfl)))
10750
10751 (define-public python2-futures
10752 (package
10753 (name "python2-futures")
10754 (version "3.2.0")
10755 (source
10756 (origin
10757 (method url-fetch)
10758 (uri (pypi-uri "futures" version))
10759 (sha256
10760 (base32
10761 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10762 (build-system python-build-system)
10763 (arguments
10764 `(#:python ,python-2
10765 #:phases
10766 (modify-phases %standard-phases
10767 (replace 'check
10768 (lambda _
10769 (invoke "python" "test_futures.py")
10770 #t)))))
10771 (home-page "https://github.com/agronholm/pythonfutures")
10772 (synopsis
10773 "Backport of the concurrent.futures package from Python 3.2")
10774 (description
10775 "The concurrent.futures module provides a high-level interface for
10776 asynchronously executing callables. This package backports the
10777 concurrent.futures package from Python 3.2")
10778 (license license:bsd-3)))
10779
10780 (define-public python-promise
10781 (package
10782 (name "python-promise")
10783 (version "0.4.2")
10784 (source
10785 (origin
10786 (method url-fetch)
10787 (uri (pypi-uri "promise" version))
10788 (sha256
10789 (base32
10790 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10791 (build-system python-build-system)
10792 ;; Tests wants python-futures, which is a python2 only program, and
10793 ;; can't be found by python-promise at test time.
10794 (arguments `(#:tests? #f))
10795 (home-page "https://github.com/syrusakbary/promise")
10796 (synopsis "Promises/A+ implementation for Python")
10797 (description
10798 "Promises/A+ implementation for Python")
10799 (properties `((python2-variant . ,(delay python2-promise))))
10800 (license license:expat)))
10801
10802 (define-public python2-promise
10803 (let ((promise (package-with-python2
10804 (strip-python2-variant python-promise))))
10805 (package (inherit promise)
10806 (arguments (substitute-keyword-arguments (package-arguments promise)
10807 ((#:tests? _) #t)))
10808 (native-inputs
10809 `(("python2-futures" ,python2-futures)
10810 ("python2-pytest" ,python2-pytest)
10811 ,@(package-native-inputs promise))))))
10812
10813 (define-public python-progressbar2
10814 (package
10815 (name "python-progressbar2")
10816 (version "3.51.3")
10817 (source
10818 (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "progressbar2" version))
10821 (sha256
10822 (base32
10823 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10824 (build-system python-build-system)
10825 (propagated-inputs
10826 `(("python-six" ,python-six)
10827 ("python-utils" ,python-utils)))
10828 (native-inputs
10829 `(("python-flake8" ,python-flake8)
10830 ("python-freezegun" ,python-freezegun)
10831 ("python-pycodestyle" ,python-pycodestyle)
10832 ("python-pytest" ,python-pytest)
10833 ("python-pytest-cache" ,python-pytest-cache)
10834 ("python-pytest-cov" ,python-pytest-cov)
10835 ("python-pytest-flakes" ,python-pytest-flakes)
10836 ("python-pytest-pep8" ,python-pytest-pep8)
10837 ("python-sphinx" ,python-sphinx)))
10838 (home-page "https://github.com/WoLpH/python-progressbar")
10839 (synopsis "Text progress bar library for Python")
10840 (description
10841 "This package provides a Python progressbar library to provide
10842 visual (yet text based) progress to long running operations.")
10843 (license license:bsd-3)))
10844
10845 (define-public python-progressbar33
10846 (package
10847 (name "python-progressbar33")
10848 (version "2.4")
10849 (source
10850 (origin
10851 (method url-fetch)
10852 (uri (pypi-uri "progressbar33" version))
10853 (sha256
10854 (base32
10855 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10856 (build-system python-build-system)
10857 (home-page "https://github.com/germangh/python-progressbar")
10858 (synopsis "Text progress bar library for Python")
10859 (description
10860 "This package provides a text progress bar library for Python. This
10861 version only differs from the original @code{progressbar} package in that it
10862 uses relative package imports instead of absolute imports, which is necessary
10863 for the module to work under Python 3.3.")
10864 ;; Either or both of these licenses may be selected.
10865 (license (list license:lgpl2.1+ license:bsd-3))))
10866
10867 (define-public python-colorama
10868 (package
10869 (name "python-colorama")
10870 (version "0.4.4")
10871 (source
10872 (origin
10873 (method url-fetch)
10874 (uri (pypi-uri "colorama" version))
10875 (sha256
10876 (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
10877 (build-system python-build-system)
10878 (synopsis "Colored terminal text rendering for Python")
10879 (description "Colorama is a Python library for rendering colored terminal
10880 text.")
10881 (home-page "https://pypi.org/project/colorama/")
10882 (license license:bsd-3)))
10883
10884 (define-public python2-colorama
10885 (package-with-python2 python-colorama))
10886
10887 (define-public python-moto
10888 (package
10889 (name "python-moto")
10890 ;; XXX: Use a pre-release for compatibility with latest botocore & friends.
10891 (version "1.3.16.dev134")
10892 (source (origin
10893 (method url-fetch)
10894 (uri (pypi-uri "moto" version))
10895 (sha256
10896 (base32
10897 "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd"))))
10898 (build-system python-build-system)
10899 (arguments
10900 `(#:phases (modify-phases %standard-phases
10901 (add-after 'unpack 'patch-hardcoded-executable-names
10902 (lambda _
10903 (substitute* "moto/batch/models.py"
10904 (("/bin/sh")
10905 (which "sh")))
10906 (substitute* (find-files "tests" "\\.py$")
10907 (("#!/bin/bash")
10908 (string-append "#!" (which "bash"))))
10909 #t))
10910 (replace 'check
10911 (lambda _
10912 (setenv "PYTHONPATH" (string-append "./build/lib:"
10913 (getenv "PYTHONPATH")))
10914 (invoke "pytest" "-vv" "-m" "not network"
10915 ;; These tests require Docker.
10916 "-k" "not test_terminate_job \
10917 and not test_invoke_function_from_sqs_exception"))))))
10918 (native-inputs
10919 `(("python-flask" ,python-flask)
10920 ("python-flask-cors" ,python-flask-cors)
10921 ("python-freezegun" ,python-freezegun)
10922 ("python-parameterized" ,python-parameterized)
10923 ("python-pytest" ,python-pytest)
10924 ("python-sure" ,python-sure)))
10925 (propagated-inputs
10926 `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
10927 ("python-boto" ,python-boto)
10928 ("python-boto3" ,python-boto3)
10929 ("python-botocore" ,python-botocore)
10930 ("python-cfn-lint" ,python-cfn-lint)
10931 ("python-cryptography" ,python-cryptography)
10932 ("python-dateutil" ,python-dateutil)
10933 ("python-docker" ,python-docker)
10934 ("python-idna" ,python-idna)
10935 ("python-jinja2" ,python-jinja2)
10936 ("python-jose" ,python-jose)
10937 ("python-jsondiff" ,python-jsondiff)
10938 ("python-mock" ,python-mock)
10939 ("python-pytz" ,python-pytz)
10940 ("python-pyyaml" ,python-pyyaml)
10941 ("python-requests" ,python-requests)
10942 ("python-responses" ,python-responses)
10943 ("python-six" ,python-six)
10944 ("python-sshpubkeys" ,python-sshpubkeys)
10945 ("python-werkzeug" ,python-werkzeug)
10946 ("python-xmltodict" ,python-xmltodict)))
10947 (home-page "https://github.com/spulec/moto")
10948 (synopsis "Mock out the boto library")
10949 (description
10950 "@code{moto} is a library designed to easily mock out the
10951 @code{boto} library.")
10952 (license license:asl2.0)))
10953
10954 (define-public python-rsa
10955 (package
10956 (name "python-rsa")
10957 (version "3.4.2")
10958 (source
10959 (origin
10960 (method url-fetch)
10961 (uri (pypi-uri "rsa" version))
10962 (sha256
10963 (base32
10964 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10965 (build-system python-build-system)
10966 (propagated-inputs
10967 `(("python-pyasn1" ,python-pyasn1)))
10968 (synopsis "Pure-Python RSA implementation")
10969 (description "Python-RSA is a pure-Python RSA implementation. It supports
10970 encryption and decryption, signing and verifying signatures, and key
10971 generation according to PKCS#1 version 1.5. It can be used as a Python
10972 library as well as on the command line.")
10973 (home-page "https://stuvel.eu/rsa")
10974 (license license:asl2.0)))
10975
10976 (define-public python2-rsa
10977 (package-with-python2 python-rsa))
10978
10979 (define-public python-pluggy
10980 (package
10981 (name "python-pluggy")
10982 (version "0.13.1")
10983 (source
10984 (origin
10985 (method url-fetch)
10986 (uri (pypi-uri "pluggy" version))
10987 (sha256
10988 (base32
10989 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10990 (build-system python-build-system)
10991 (native-inputs
10992 `(("python-setuptools-scm" ,python-setuptools-scm)))
10993 (synopsis "Plugin and hook calling mechanism for Python")
10994 (description "Pluggy is an extraction of the plugin manager as used by
10995 Pytest but stripped of Pytest specific details.")
10996 (home-page "https://pypi.org/project/pluggy/")
10997 (properties `((python2-variant . ,(delay python2-pluggy))))
10998 (license license:expat)))
10999
11000 (define-public python2-pluggy
11001 (let ((base (package-with-python2 (strip-python2-variant
11002 python-pluggy))))
11003 (package/inherit
11004 base
11005 (propagated-inputs
11006 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
11007
11008 ;; This package requires python2-importlib-metadata, but that package
11009 ;; ends up needing python2-pluggy via python2-pytest, so we need this
11010 ;; variant to solve the circular dependency.
11011 (define-public python2-pluggy-bootstrap
11012 (hidden-package
11013 (package/inherit
11014 python2-pluggy
11015 (name "python2-pluggy-bootstrap")
11016 (arguments
11017 `(#:tests? #f
11018 ,@(package-arguments python2-pluggy)))
11019 (propagated-inputs
11020 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
11021
11022 (define-public python-tox
11023 (package
11024 (name "python-tox")
11025 (version "3.20.0")
11026 (source
11027 (origin
11028 (method url-fetch)
11029 (uri (pypi-uri "tox" version))
11030 (sha256
11031 (base32
11032 "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
11033 (build-system python-build-system)
11034 (arguments
11035 ;; FIXME: Tests require pytest-timeout, which itself requires
11036 ;; pytest>=2.8.0 for installation.
11037 '(#:tests? #f))
11038 (propagated-inputs
11039 `(("python-filelock" ,python-filelock)
11040 ("python-packaging" ,python-packaging)
11041 ("python-pluggy" ,python-pluggy)
11042 ("python-py" ,python-py)
11043 ("python-six" ,python-six)
11044 ("python-toml" ,python-toml)
11045 ("python-virtualenv" ,python-virtualenv)))
11046 (native-inputs
11047 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
11048 ("python-pytest" ,python-pytest) ; >= 2.3.5
11049 ("python-setuptools-scm" ,python-setuptools-scm)))
11050 (home-page "https://tox.readthedocs.io")
11051 (synopsis "Virtualenv-based automation of test activities")
11052 (description "Tox is a generic virtualenv management and test command line
11053 tool. It can be used to check that a package installs correctly with
11054 different Python versions and interpreters, or run tests in each type of
11055 supported environment, or act as a frontend to continuous integration
11056 servers.")
11057 (license license:expat)))
11058
11059 (define-public python2-tox
11060 (package-with-python2 python-tox))
11061
11062 (define-public python-jmespath
11063 (package
11064 (name "python-jmespath")
11065 (version "0.9.4")
11066 (source
11067 (origin
11068 (method url-fetch)
11069 (uri (pypi-uri "jmespath" version))
11070 (sha256
11071 (base32
11072 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
11073 (build-system python-build-system)
11074 (native-inputs
11075 `(("python-nose" ,python-nose)))
11076 (synopsis "JSON Matching Expressions")
11077 (description "JMESPath (pronounced “james path”) is a Python library that
11078 allows one to declaratively specify how to extract elements from a JSON
11079 document.")
11080 (home-page "https://github.com/jmespath/jmespath.py")
11081 (license license:expat)))
11082
11083 (define-public python2-jmespath
11084 (package-with-python2 python-jmespath))
11085
11086 (define-public python-symengine
11087 (package
11088 (name "python-symengine")
11089 (version "0.6.1")
11090 (source
11091 (origin
11092 (method url-fetch)
11093 (uri (pypi-uri "symengine" version))
11094 (sha256
11095 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
11096 (build-system python-build-system)
11097 (native-inputs
11098 `(("cmake" ,cmake)
11099 ("python-cython" ,python-cython)))
11100 (inputs
11101 `(("symengine" ,symengine)))
11102 (home-page "https://github.com/symengine/symengine.py")
11103 (synopsis "Python library providing wrappers to SymEngine")
11104 (description
11105 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
11106 manipulation library.")
11107 (license license:expat)))
11108
11109 (define-public python-boto
11110 (package
11111 (name "python-boto")
11112 (version "2.49.0")
11113 (source (origin
11114 (method url-fetch)
11115 (uri (pypi-uri "boto" version))
11116 (sha256
11117 (base32
11118 "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
11119 (build-system python-build-system)
11120 (arguments
11121 ;; XXX: This package is unmaintained and has problems with newer versions
11122 ;; of Python 3 as well as test libraries. 'python-moto' still uses a
11123 ;; subset of this library, so keep it around for now, but disable tests.
11124 '(#:tests? #f))
11125 (propagated-inputs
11126 `(("python-paramiko" ,python-paramiko)
11127 ("python-requests" ,python-requests)))
11128 (home-page "https://github.com/boto/boto")
11129 (synopsis "Python interfaces for Amazon Web Services")
11130 (description
11131 "This package provides various facilities for interacting with Amazon
11132 Web Services through Python.
11133
11134 This software is unmaintained, and new projects should use @code{boto3} instead.")
11135 (license license:expat)))
11136
11137 (define-public python-botocore
11138 ;; Note: When updating botocore, also make sure that boto3 and awscli
11139 ;; are compatible.
11140 (package
11141 (name "python-botocore")
11142 (version "1.19.22")
11143 (source
11144 (origin
11145 (method url-fetch)
11146 (uri (pypi-uri "botocore" version))
11147 (sha256
11148 (base32
11149 "0iim86x7c6hqmvd61ygz6x6x9glnsfbnyzv2y67qjdcdx8jpkmw7"))))
11150 (build-system python-build-system)
11151 (arguments
11152 ;; FIXME: Many tests are failing.
11153 '(#:tests? #f))
11154 (propagated-inputs
11155 `(("python-dateutil" ,python-dateutil)
11156 ("python-jmespath" ,python-jmespath)
11157 ("python-urllib3" ,python-urllib3)))
11158 (home-page "https://github.com/boto/botocore")
11159 (synopsis "Low-level interface to AWS")
11160 (description "Botocore is a Python library that provides a low-level
11161 interface to the Amazon Web Services (AWS) API.")
11162 (license license:asl2.0)))
11163
11164 (define-public python2-botocore
11165 (package-with-python2 python-botocore))
11166
11167 (define-public python-boto3
11168 (package
11169 (name "python-boto3")
11170 (version "1.16.22")
11171 (home-page "https://github.com/boto/boto3")
11172 (source (origin
11173 (method git-fetch)
11174 (uri (git-reference (url home-page) (commit version)))
11175 (file-name (git-file-name name version))
11176 (sha256
11177 (base32
11178 "0h20hgl4yfl58g75qhb6ibrdmzn47md3srgar7hask14cjmfhfy3"))))
11179 (arguments
11180 `(#:phases
11181 (modify-phases %standard-phases
11182 (add-after 'unpack 'delete-network-tests
11183 ;; Deleting integration tests because they are trying to connect to AWS.
11184 (lambda _
11185 (delete-file-recursively "tests/integration")
11186 #t)))))
11187 (build-system python-build-system)
11188 (native-inputs
11189 `(("python-nose" ,python-nose)
11190 ("python-mock" ,python-mock)))
11191 (propagated-inputs
11192 `(("python-botocore" ,python-botocore)
11193 ("python-jmespath" ,python-jmespath)
11194 ("python-s3transfer" ,python-s3transfer)))
11195 (synopsis "AWS SDK for Python")
11196 (description
11197 "Boto3 is a Python library for writing programs that interact with
11198 @acronym{AWS,Amazon Web Services}.")
11199 (license license:asl2.0)))
11200
11201 (define-public python-pyfiglet
11202 (package
11203 (name "python-pyfiglet")
11204 (version "0.8.post1")
11205 (source
11206 (origin
11207 (method url-fetch)
11208 (uri (pypi-uri "pyfiglet" version))
11209 (sha256
11210 (base32
11211 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
11212 (build-system python-build-system)
11213 (home-page "https://github.com/pwaller/pyfiglet")
11214 (synopsis "Draw ASCII art big letters in Python")
11215 (description "This module lets you draw large letter from ordinary characters
11216 in pure Python.")
11217 (license license:expat)))
11218
11219 (define-public python-xdo
11220 (package
11221 (name "python-xdo")
11222 (version "0.3")
11223 (source (origin
11224 (method url-fetch)
11225 (uri (string-append
11226 "http://http.debian.net/debian/pool/main/p/python-xdo/"
11227 "python-xdo_" version ".orig.tar.gz"))
11228 (sha256
11229 (base32
11230 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
11231 (build-system python-build-system)
11232 (arguments
11233 '(#:phases
11234 (modify-phases %standard-phases
11235 (add-before 'install 'patch-libxdo-path
11236 ;; Hardcode the path of dynamically loaded libxdo library.
11237 (lambda* (#:key inputs #:allow-other-keys)
11238 (let ((libxdo (string-append
11239 (assoc-ref inputs "xdotool")
11240 "/lib/libxdo.so")))
11241 (substitute* "xdo/_xdo.py"
11242 (("find_library\\(\"xdo\"\\)")
11243 (simple-format #f "\"~a\"" libxdo)))
11244 #t))))
11245 #:tests? #f)) ; no tests provided
11246 (propagated-inputs
11247 `(("python-six" ,python-six)))
11248 (inputs
11249 `(("xdotool" ,xdotool)
11250 ("libX11" ,libx11)))
11251 (home-page "https://tracker.debian.org/pkg/python-xdo")
11252 (synopsis "Python library for simulating X11 keyboard/mouse input")
11253 (description "Provides bindings to libxdo for manipulating X11 via simulated
11254 input. (Note that this is mostly a legacy library; you may wish to look at
11255 python-xdo for newer bindings.)")
11256 (license license:bsd-3)))
11257
11258 (define-public python2-xdo
11259 (package-with-python2 python-xdo))
11260
11261 (define-public python-mako
11262 (package
11263 (name "python-mako")
11264 (version "1.1.2")
11265 (source
11266 (origin
11267 (method url-fetch)
11268 (uri (pypi-uri "Mako" version))
11269 (sha256
11270 (base32
11271 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
11272 (build-system python-build-system)
11273 (arguments
11274 `(#:phases (modify-phases %standard-phases
11275 (replace 'check
11276 (lambda* (#:key tests? #:allow-other-keys)
11277 (if tests?
11278 (invoke "nosetests" "-v")
11279 (format #t "test suite not run~%"))
11280 #t)))))
11281 (propagated-inputs
11282 `(("python-markupsafe" ,python-markupsafe)))
11283 (native-inputs
11284 `(("python-mock" ,python-mock)
11285 ("python-nose" ,python-nose)))
11286 (home-page "https://www.makotemplates.org/")
11287 (synopsis "Templating language for Python")
11288 (description "Mako is a templating language for Python that compiles
11289 templates into Python modules.")
11290 (license license:expat)))
11291
11292 (define-public python2-mako
11293 (package-with-python2 python-mako))
11294
11295 (define-public python-waitress
11296 (package
11297 (name "python-waitress")
11298 (version "1.1.0")
11299 (source
11300 (origin
11301 (method url-fetch)
11302 (uri (pypi-uri "waitress" version))
11303 (patches (search-patches "python-waitress-fix-tests.patch"))
11304 (sha256
11305 (base32
11306 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11307 (build-system python-build-system)
11308 (home-page "https://github.com/Pylons/waitress")
11309 (synopsis "Waitress WSGI server")
11310 (description "Waitress is meant to be a production-quality pure-Python WSGI
11311 server with very acceptable performance.")
11312 (license license:zpl2.1)))
11313
11314 (define-public python2-waitress
11315 (package-with-python2 python-waitress))
11316
11317 (define-public python-whichcraft
11318 (package
11319 (name "python-whichcraft")
11320 (version "0.6.1")
11321 (source
11322 (origin
11323 (method url-fetch)
11324 (uri (pypi-uri "whichcraft" version))
11325 (sha256
11326 (base32
11327 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11328 (build-system python-build-system)
11329 (native-inputs
11330 `(("python-pytest" ,python-pytest)))
11331 (home-page "https://github.com/pydanny/whichcraft")
11332 (synopsis "Cross-platform cross-python shutil.which functionality")
11333 (description
11334 "This package provides a shim of the shutil.which function that's
11335 designed to work across multiple versions of Python.")
11336 (license license:bsd-3)))
11337
11338 (define-public python-cookiecutter
11339 (package
11340 (name "python-cookiecutter")
11341 (version "1.7.2")
11342 (source
11343 (origin
11344 (method url-fetch)
11345 (uri (pypi-uri "cookiecutter" version))
11346 (sha256
11347 (base32
11348 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11349 (build-system python-build-system)
11350 (native-inputs
11351 `(("python-freezegun" ,python-freezegun)
11352 ("python-pytest" ,python-pytest)
11353 ("python-pytest-catchlog" ,python-pytest-catchlog)
11354 ("python-pytest-cov" ,python-pytest-cov)
11355 ("python-pytest-mock" ,python-pytest-mock)))
11356 (propagated-inputs
11357 `(("python-binaryornot" ,python-binaryornot)
11358 ("python-click" ,python-click)
11359 ("python-future" ,python-future)
11360 ("python-jinja2" ,python-jinja2)
11361 ("python-jinja2-time" ,python-jinja2-time)
11362 ("python-poyo" ,python-poyo)
11363 ("python-requests" ,python-requests)
11364 ("python-slugify" ,python-slugify)
11365 ("python-text-unidecode" ,python-text-unidecode)
11366 ("python-whichcraft" ,python-whichcraft)))
11367 (home-page "https://github.com/cookiecutter/cookiecutter")
11368 (synopsis
11369 "Command-line utility that creates projects from project templates")
11370 (description
11371 "This package provides a command-line utility that creates projects from
11372 project templates, e.g. creating a Python package project from a Python package
11373 project template.")
11374 (license license:bsd-3)))
11375
11376 (define-public python-pyquery
11377 (package
11378 (name "python-pyquery")
11379 (version "1.2.17")
11380 (source
11381 (origin
11382 (method url-fetch)
11383 (uri (pypi-uri "pyquery" version))
11384 (sha256
11385 (base32
11386 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11387 (build-system python-build-system)
11388 (native-inputs
11389 `(("python-webob" ,python-webob)
11390 ("python-webtest" ,python-webtest)))
11391 (propagated-inputs
11392 `(("python-lxml" ,python-lxml)
11393 ("python-cssselect" ,python-cssselect)))
11394 (home-page "https://github.com/gawel/pyquery")
11395 (synopsis "Make jQuery-like queries on xml documents")
11396 (description "pyquery allows you to make jQuery queries on xml documents.
11397 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11398 fast xml and html manipulation.")
11399 (license license:bsd-3)))
11400
11401 (define-public python-anyjson
11402 (package
11403 (name "python-anyjson")
11404 (version "0.3.3")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (pypi-uri "anyjson" version))
11409 (sha256
11410 (base32
11411 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11412 (build-system python-build-system)
11413 (arguments
11414 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11415 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11416 ;; whatever) so this transformation needs to be done before the tests
11417 ;; can be run. Maybe we could add a build step to transform beforehand
11418 ;; but it could be annoying/difficult.
11419 ;; We can enable tests for the Python 2 version, though, and do below.
11420 #:tests? #f))
11421 (home-page "https://bitbucket.org/runeh/anyjson/")
11422 (synopsis
11423 "Wraps best available JSON implementation in a common interface")
11424 (description
11425 "Anyjson loads whichever is the fastest JSON module installed
11426 and provides a uniform API regardless of which JSON implementation is used.")
11427 (license license:bsd-3)
11428 (properties `((python2-variant . ,(delay python2-anyjson))))))
11429
11430 (define-public python2-anyjson
11431 (let ((anyjson (package-with-python2
11432 (strip-python2-variant python-anyjson))))
11433 (package
11434 (inherit anyjson)
11435 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11436 #:tests? #t
11437 ,@(package-arguments anyjson)))
11438 (native-inputs `(("python2-nose" ,python2-nose))))))
11439
11440 (define-public python-amqp
11441 (package
11442 (name "python-amqp")
11443 (version "2.3.2")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "amqp" version))
11448 (sha256
11449 (base32
11450 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11451 (build-system python-build-system)
11452 (native-inputs
11453 `(("python-case" ,python-case)
11454 ("python-pytest-sugar" ,python-pytest-sugar)
11455 ("python-mock" ,python-mock)))
11456 (propagated-inputs
11457 `(("python-vine" ,python-vine)))
11458 (home-page "https://github.com/celery/py-amqp")
11459 (synopsis
11460 "Low-level AMQP client for Python (fork of amqplib)")
11461 (description
11462 "This is a fork of amqplib which was originally written by Barry Pederson.
11463 It is maintained by the Celery project, and used by kombu as a pure python
11464 alternative when librabbitmq is not available.")
11465 (license license:lgpl2.1+)
11466 (properties `((python2-variant . ,(delay python2-amqp))))))
11467
11468 (define-public python2-amqp
11469 (let ((amqp (package-with-python2
11470 (strip-python2-variant python-amqp))))
11471 (package
11472 (inherit amqp)
11473 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11474 ;; unmaintained. Weirdly, does not do this on the python 3
11475 ;; version?
11476 #:tests? #f
11477 ,@(package-arguments amqp))))))
11478
11479 (define-public python-txamqp
11480 (package
11481 (name "python-txamqp")
11482 (version "0.8.2")
11483 (source
11484 (origin
11485 (method url-fetch)
11486 (uri (pypi-uri "txAMQP" version))
11487 (sha256
11488 (base32
11489 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11490 (build-system python-build-system)
11491 (propagated-inputs
11492 `(("python-six" ,python-six)
11493 ("python-twisted" ,python-twisted)))
11494 (home-page "https://github.com/txamqp/txamqp")
11495 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11496 (description
11497 "This package provides a Python library for communicating with AMQP peers
11498 and brokers using the asynchronous networking framework Twisted. It contains
11499 all the necessary code to connect, send and receive messages to/from an
11500 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11501 also includes support for using Thrift RPC over AMQP in Twisted
11502 applications.")
11503 (license license:asl2.0)))
11504
11505 (define-public python2-txamqp
11506 (package-with-python2 python-txamqp))
11507
11508 (define-public python-kombu
11509 (package
11510 (name "python-kombu")
11511 (version "4.2.2")
11512 (source
11513 (origin
11514 (method url-fetch)
11515 (uri (pypi-uri "kombu" version))
11516 (sha256
11517 (base32
11518 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11519 (build-system python-build-system)
11520 (native-inputs
11521 `(("python-mock" ,python-mock)
11522 ("python-case" ,python-case)
11523 ("python-pyro4" ,python-pyro4)
11524 ("python-pytest-sugar" ,python-pytest-sugar)
11525 ("python-pytz" ,python-pytz)))
11526 (propagated-inputs
11527 `(("python-anyjson" ,python-anyjson)
11528 ("python-amqp" ,python-amqp)
11529 ("python-redis" ,python-redis)))
11530 (home-page "https://kombu.readthedocs.io")
11531 (synopsis "Message passing library for Python")
11532 (description "The aim of Kombu is to make messaging in Python as easy as
11533 possible by providing an idiomatic high-level interface for the AMQ protocol,
11534 and also provide proven and tested solutions to common messaging problems.
11535 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11536 message orientation, queuing, routing, reliability and security, for which the
11537 RabbitMQ messaging server is the most popular implementation.")
11538 (license license:bsd-3)
11539 (properties `((python2-variant . ,(delay python2-kombu))))))
11540
11541 (define-public python2-kombu
11542 (let ((kombu (package-with-python2
11543 (strip-python2-variant python-kombu))))
11544 (package
11545 (inherit kombu)
11546 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11547 ;; It works fine on the python3 variant.
11548 #:tests? #f
11549 ,@(package-arguments kombu)))
11550 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11551 ,@(package-native-inputs kombu))))))
11552
11553 (define-public python-billiard
11554 (package
11555 (name "python-billiard")
11556 (version "3.5.0.5")
11557 (source
11558 (origin
11559 (method url-fetch)
11560 (uri (pypi-uri "billiard" version))
11561 (sha256
11562 (base32
11563 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11564 (build-system python-build-system)
11565 (native-inputs
11566 `(("python-case" ,python-case)
11567 ("python-pytest" ,python-pytest)))
11568 (home-page "https://github.com/celery/billiard")
11569 (synopsis
11570 "Python multiprocessing fork with improvements and bugfixes")
11571 (description
11572 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11573 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11574 pyprocessing package. This standalone variant is intended to be compatible with
11575 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11576 (license license:bsd-3)
11577 (properties `((python2-variant . ,(delay python2-billiard))))))
11578
11579 (define-public python2-billiard
11580 (let ((billiard (package-with-python2
11581 (strip-python2-variant python-billiard))))
11582 (package
11583 (inherit billiard)
11584 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11585 ("python2-mock" ,python2-mock)
11586 ,@(package-native-inputs billiard))))))
11587
11588 (define-public python-celery
11589 (package
11590 (name "python-celery")
11591 (version "4.2.1")
11592 (source
11593 (origin
11594 (method url-fetch)
11595 (uri (pypi-uri "celery" version))
11596 (sha256
11597 (base32
11598 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11599 (build-system python-build-system)
11600 (arguments
11601 '(;; TODO The tests fail with Python 3.7
11602 ;; https://github.com/celery/celery/issues/4849
11603 #:tests? #f
11604 #:phases
11605 (modify-phases %standard-phases
11606 (add-after 'unpack 'patch-requirements
11607 (lambda _
11608 (substitute* "requirements/test.txt"
11609 (("pytest>=3\\.0,<3\\.3")
11610 "pytest>=3.0"))
11611 #t)))))
11612 (native-inputs
11613 `(("python-case" ,python-case)
11614 ("python-pytest" ,python-pytest)))
11615 (propagated-inputs
11616 `(("python-pytz" ,python-pytz)
11617 ("python-billiard" ,python-billiard)
11618 ("python-kombu" ,python-kombu)))
11619 (home-page "https://celeryproject.org")
11620 (synopsis "Distributed Task Queue")
11621 (description "Celery is an asynchronous task queue/job queue based on
11622 distributed message passing. It is focused on real-time operation, but
11623 supports scheduling as well. The execution units, called tasks, are executed
11624 concurrently on a single or more worker servers using multiprocessing,
11625 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11626 synchronously (wait until ready).")
11627 (license license:bsd-3)
11628 (properties `((python2-variant . ,(delay python2-celery))))))
11629
11630 (define-public python2-celery
11631 (let ((celery (package-with-python2
11632 (strip-python2-variant python-celery))))
11633 (package
11634 (inherit celery)
11635 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11636 ("python2-mock" ,python2-mock)
11637 ,@(package-native-inputs celery))))))
11638
11639 (define-public python-translitcodec
11640 (package
11641 (name "python-translitcodec")
11642 (version "0.4.0")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "translitcodec" version))
11647 (sha256
11648 (base32
11649 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11650 (build-system python-build-system)
11651 (arguments
11652 `(#:tests? #f)) ; no tests provided
11653 (home-page
11654 "https://github.com/claudep/translitcodec")
11655 (synopsis
11656 "Unicode to 8-bit charset transliteration codec")
11657 (description
11658 "This package contains codecs for transliterating ISO 10646 texts into
11659 best-effort representations using smaller coded character sets (ASCII,
11660 ISO 8859, etc.).")
11661 (license license:expat)))
11662
11663 (define-public python2-translitcodec
11664 (package-with-python2 python-translitcodec))
11665
11666 (define-public python-editor
11667 (package
11668 (name "python-editor")
11669 (version "1.0.4")
11670 (source
11671 (origin
11672 (method url-fetch)
11673 (uri (pypi-uri "python-editor" version))
11674 (sha256
11675 (base32
11676 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11677 (build-system python-build-system)
11678 (arguments
11679 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11680 (home-page "https://github.com/fmoo/python-editor")
11681 (synopsis "Programmatically open an editor, capture the result")
11682 (description
11683 "python-editor is a library that provides the editor module for
11684 programmatically interfacing with your system's $EDITOR.")
11685 (license license:asl2.0)))
11686
11687 (define-public python2-editor
11688 (package-with-python2 python-editor))
11689
11690 (define-public python-vobject
11691 (package
11692 (name "python-vobject")
11693 (version "0.9.6.1")
11694 (source (origin
11695 (method url-fetch)
11696 (uri (pypi-uri "vobject" version))
11697 (sha256
11698 (base32
11699 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11700 (build-system python-build-system)
11701 (arguments
11702 '(;; The test suite relies on some non-portable Windows interfaces.
11703 #:tests? #f))
11704 (propagated-inputs
11705 `(("python-dateutil" ,python-dateutil)
11706 ("python-pyicu" ,python-pyicu)))
11707 (synopsis "Parse and generate vCard and vCalendar files")
11708 (description "Vobject is intended to be a full featured Python package for
11709 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11710 are supported and well tested. vCard 3.0 files are supported, and all data
11711 should be imported, but only a few components are understood in a sophisticated
11712 way.")
11713 (home-page "https://eventable.github.io/vobject/")
11714 (license license:asl2.0)))
11715
11716 (define-public python2-vobject
11717 (package-with-python2 python-vobject))
11718
11719 (define-public python-munkres
11720 (package
11721 (name "python-munkres")
11722 (version "1.0.8")
11723 (source (origin
11724 (method url-fetch)
11725 (uri (pypi-uri "munkres" version))
11726 (sha256
11727 (base32
11728 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11729 (build-system python-build-system)
11730 (arguments
11731 '(#:tests? #f)) ; no test suite
11732 (home-page "https://software.clapper.org/munkres/")
11733 (synopsis "Implementation of the Munkres algorithm")
11734 (description "The Munkres module provides an implementation of the Munkres
11735 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11736 useful for solving the Assignment Problem.")
11737 (license license:bsd-3)))
11738
11739 (define-public python2-munkres
11740 (package-with-python2 python-munkres))
11741
11742 (define-public python-whoosh
11743 (package
11744 (name "python-whoosh")
11745 (version "2.7.4")
11746 (source
11747 (origin
11748 (method url-fetch)
11749 (uri (pypi-uri "Whoosh" version))
11750 (sha256
11751 (base32
11752 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11753 (build-system python-build-system)
11754 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11755 (native-inputs
11756 `(("python-pytest" ,python-pytest)))
11757 (home-page "https://bitbucket.org/mchaput/whoosh")
11758 (synopsis "Full text indexing, search, and spell checking library")
11759 (description
11760 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11761 checking library.")
11762 (license license:bsd-2)))
11763
11764 (define-public python2-whoosh
11765 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11766 (package (inherit whoosh)
11767 (propagated-inputs
11768 `(("python2-backport-ssl-match-hostname"
11769 ,python2-backport-ssl-match-hostname)
11770 ,@(package-propagated-inputs whoosh))))))
11771
11772 (define-public python-pathlib
11773 (package
11774 (name "python-pathlib")
11775 (version "1.0.1")
11776 (source (origin
11777 (method url-fetch)
11778 (uri (pypi-uri "pathlib" version))
11779 (sha256
11780 (base32
11781 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11782 (build-system python-build-system)
11783 ;; The tests depend on the internal "test" module, which does not provide
11784 ;; a stable interface.
11785 (arguments `(#:tests? #f))
11786 (home-page "https://pathlib.readthedocs.org/")
11787 (synopsis "Object-oriented file system paths")
11788 (description "Pathlib offers a set of classes to handle file system paths.
11789 It offers the following advantages over using string objects:
11790
11791 @enumerate
11792 @item No more cumbersome use of os and os.path functions. Everything can
11793 be done easily through operators, attribute accesses, and method calls.
11794 @item Embodies the semantics of different path types. For example,
11795 comparing Windows paths ignores casing.
11796 @item Well-defined semantics, eliminating any inconsistencies or
11797 ambiguities (forward vs. backward slashes, etc.).
11798 @end enumerate
11799
11800 Note: In Python 3.4, pathlib is now part of the standard library. For other
11801 Python versions please consider python-pathlib2 instead, which tracks the
11802 standard library module. This module (python-pathlib) isn't maintained
11803 anymore.")
11804 (license license:expat)))
11805
11806 (define-public python2-pathlib
11807 (package-with-python2 python-pathlib))
11808
11809 (define-public python2-pathlib2
11810 (package
11811 (name "python2-pathlib2")
11812 (version "2.3.5")
11813 (source (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "pathlib2" version))
11816 (sha256
11817 (base32
11818 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11819 (build-system python-build-system)
11820 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11821 ;; version is 3.4 which already includes this package as part of the
11822 ;; standard library.
11823 (arguments
11824 `(#:python ,python-2))
11825 (propagated-inputs
11826 `(("python2-scandir" ,python2-scandir)
11827 ("python2-six" ,python2-six)))
11828 (home-page "https://pypi.org/project/pathlib2/")
11829 (synopsis "Object-oriented file system paths - backport of standard
11830 pathlib module")
11831 (description "The goal of pathlib2 is to provide a backport of standard
11832 pathlib module which tracks the standard library module, so all the newest
11833 features of the standard pathlib can be used also on older Python versions.
11834
11835 Pathlib offers a set of classes to handle file system paths. It offers the
11836 following advantages over using string objects:
11837
11838 @enumerate
11839 @item No more cumbersome use of os and os.path functions. Everything can
11840 be done easily through operators, attribute accesses, and method calls.
11841 @item Embodies the semantics of different path types. For example,
11842 comparing Windows paths ignores casing.
11843 @item Well-defined semantics, eliminating any inconsistencies or
11844 ambiguities (forward vs. backward slashes, etc.).
11845 @end enumerate")
11846 (license license:expat)))
11847
11848 (define-public python2-pathlib2-bootstrap
11849 (hidden-package
11850 (package
11851 (inherit python2-pathlib2)
11852 (name "python2-pathlib2-bootstrap")
11853 (propagated-inputs
11854 `(("python2-scandir" ,python2-scandir)
11855 ("python2-six" ,python2-six-bootstrap))))))
11856
11857 (define-public python-jellyfish
11858 (package
11859 (name "python-jellyfish")
11860 (version "0.5.6")
11861 (source (origin
11862 (method url-fetch)
11863 (uri (pypi-uri "jellyfish" version))
11864 (sha256
11865 (base32
11866 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11867 (build-system python-build-system)
11868 (native-inputs
11869 `(("python-pytest" ,python-pytest)))
11870 (home-page "https://github.com/jamesturk/jellyfish")
11871 (synopsis "Approximate and phonetic matching of strings")
11872 (description "Jellyfish uses a variety of string comparison and phonetic
11873 encoding algorithms to do fuzzy string matching.")
11874 (license license:bsd-2)
11875 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11876
11877 (define-public python2-jellyfish
11878 (let ((jellyfish (package-with-python2
11879 (strip-python2-variant python-jellyfish))))
11880 (package (inherit jellyfish)
11881 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11882 ,@(package-native-inputs jellyfish))))))
11883
11884 (define-public python2-unicodecsv
11885 (package
11886 (name "python2-unicodecsv")
11887 (version "0.14.1")
11888 (source (origin
11889 (method git-fetch)
11890 ;; The test suite is not included in the PyPi release.
11891 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11892 (uri (git-reference
11893 (url "https://github.com/jdunck/python-unicodecsv")
11894 (commit version)))
11895 (file-name (git-file-name name version))
11896 (sha256
11897 (base32
11898 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11899 (build-system python-build-system)
11900 (arguments
11901 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11902 #:python ,python-2))
11903 (native-inputs
11904 `(("python2-unittest2" ,python2-unittest2)))
11905 (home-page "https://github.com/jdunck/python-unicodecsv")
11906 (synopsis "Unicode CSV module for Python 2")
11907 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11908 module, adding support for Unicode strings.")
11909 (license license:bsd-2)))
11910
11911 (define-public python-rarfile
11912 (package
11913 (name "python-rarfile")
11914 (version "2.8")
11915 (source (origin
11916 (method url-fetch)
11917 (uri (pypi-uri "rarfile" version))
11918 (sha256
11919 (base32
11920 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11921 (build-system python-build-system)
11922 (arguments
11923 '(#:phases
11924 (modify-phases %standard-phases
11925 (replace 'check
11926 ;; Many tests fail, but the installation proceeds.
11927 (lambda _ (invoke "make" "-C" "test" "test"))))))
11928 (native-inputs
11929 `(("which" ,which))) ; required for tests
11930 (propagated-inputs
11931 `(("libarchive" ,libarchive)))
11932 (home-page "https://github.com/markokr/rarfile")
11933 (synopsis "RAR archive reader for Python")
11934 (description "This is Python module for RAR archive reading. The interface
11935 is made as zipfile like as possible.")
11936 (license license:isc)))
11937
11938 (define-public python2-rarfile
11939 (package-with-python2 python-rarfile))
11940
11941 (define-public python-magic
11942 (package
11943 (name "python-magic")
11944 (version "0.4.15")
11945 (source
11946 (origin
11947 (method url-fetch)
11948 (uri (pypi-uri "python-magic" version))
11949 (sha256
11950 (base32
11951 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11952 (file-name (string-append name "-" version "-checkout"))))
11953 (build-system python-build-system)
11954 (arguments
11955 ;; The tests are unreliable, so don't run them. The tests fail
11956 ;; under Python3 because they were written for Python2 and
11957 ;; contain import statements that do not work in Python3. One of
11958 ;; the tests fails under Python2 because its assertions are
11959 ;; overly stringent; it relies on comparing output strings which
11960 ;; are brittle and can change depending on the version of
11961 ;; libmagic being used and the system on which the test is
11962 ;; running. In my case, under GuixSD 0.10.0, only one test
11963 ;; failed, and it seems to have failed only because the version
11964 ;; of libmagic that is packaged in Guix outputs a slightly
11965 ;; different (but not wrong) string than the one that the test
11966 ;; expected.
11967 '(#:tests? #f
11968 #:phases (modify-phases %standard-phases
11969 ;; Replace a specific method call with a hard-coded
11970 ;; path to the necessary libmagic.so file in the
11971 ;; store. If we don't do this, then the method call
11972 ;; will fail to find the libmagic.so file, which in
11973 ;; turn will cause any application using
11974 ;; python-magic to fail.
11975 (add-before 'build 'hard-code-path-to-libmagic
11976 (lambda* (#:key inputs #:allow-other-keys)
11977 (let ((file (assoc-ref inputs "file")))
11978 (substitute* "magic.py"
11979 (("ctypes.util.find_library\\('magic'\\)")
11980 (string-append "'" file "/lib/libmagic.so'")))
11981 #t)))
11982 (add-before 'install 'disable-egg-compression
11983 (lambda _
11984 (let ((port (open-file "setup.cfg" "a")))
11985 (display "\n[easy_install]\nzip_ok = 0\n"
11986 port)
11987 (close-port port)
11988 #t))))))
11989 (inputs
11990 ;; python-magic needs to be able to find libmagic.so.
11991 `(("file" ,file)))
11992 (home-page
11993 "https://github.com/ahupp/python-magic")
11994 (synopsis
11995 "File type identification using libmagic")
11996 (description
11997 "This module uses ctypes to access the libmagic file type
11998 identification library. It makes use of the local magic database and
11999 supports both textual and MIME-type output. Note that this module and
12000 the python-file module both provide a \"magic.py\" file; these two
12001 modules, which are different and were developed separately, both serve
12002 the same purpose: to provide Python bindings for libmagic.")
12003 (license license:expat)))
12004
12005 (define-public python2-magic
12006 (package-with-python2 python-magic))
12007
12008 (define-public python2-s3cmd
12009 (package
12010 (name "python2-s3cmd")
12011 (version "1.6.1")
12012 (source
12013 (origin
12014 (method url-fetch)
12015 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
12016 "s3cmd-" version ".tar.gz"))
12017 (sha256
12018 (base32
12019 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
12020 (build-system python-build-system)
12021 (arguments
12022 ;; s3cmd is written for python2 only and contains no tests.
12023 `(#:python ,python-2
12024 #:tests? #f))
12025 (propagated-inputs
12026 `(("python2-dateutil" ,python2-dateutil)
12027 ;; The python-file package also provides a magic.py module.
12028 ;; This is an unfortunate state of affairs; however, s3cmd
12029 ;; fails to install if it cannot find specifically the
12030 ;; python-magic package. Thus we include it, instead of using
12031 ;; python-file. Ironically, s3cmd sometimes works better
12032 ;; without libmagic bindings at all:
12033 ;; https://github.com/s3tools/s3cmd/issues/198
12034 ("python2-magic" ,python2-magic)))
12035 (home-page "https://s3tools.org/s3cmd")
12036 (synopsis "Command line tool for S3-compatible storage services")
12037 (description
12038 "S3cmd is a command line tool for uploading, retrieving and managing data
12039 in storage services that are compatible with the Amazon Simple Storage
12040 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
12041 GnuPG encryption, and more. It also supports management of Amazon's
12042 CloudFront content delivery network.")
12043 (license license:gpl2+)))
12044
12045 (define-public python-pkgconfig
12046 (package
12047 (name "python-pkgconfig")
12048 (version "1.3.1")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "pkgconfig" version))
12053 (sha256
12054 (base32
12055 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
12056 (build-system python-build-system)
12057 (native-inputs
12058 `(("python-nose" ,python-nose)))
12059 (inputs
12060 `(("pkg-config" ,pkg-config)))
12061 (arguments
12062 `(#:phases
12063 (modify-phases %standard-phases
12064 (add-before 'build 'patch
12065 ;; Hard-code the path to pkg-config.
12066 (lambda _
12067 (substitute* "pkgconfig/pkgconfig.py"
12068 (("cmd = 'pkg-config")
12069 (string-append "cmd = '" (which "pkg-config"))))
12070 #t))
12071 (replace 'check
12072 (lambda _
12073 (invoke "nosetests" "test.py"))))))
12074 (home-page "https://github.com/matze/pkgconfig")
12075 (synopsis "Python interface for pkg-config")
12076 (description "This module provides a Python interface to pkg-config. It
12077 can be used to find all pkg-config packages, check if a package exists,
12078 check if a package meets certain version requirements, query CFLAGS and
12079 LDFLAGS and parse the output to build extensions with setup.py.")
12080 (license license:expat)))
12081
12082 (define-public python2-pkgconfig
12083 (package-with-python2 python-pkgconfig))
12084
12085 (define-public python-bz2file
12086 (package
12087 (name "python-bz2file")
12088 (version "0.98")
12089 (source
12090 (origin
12091 (method url-fetch)
12092 (uri (pypi-uri "bz2file" version))
12093 (sha256
12094 (base32
12095 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
12096 (build-system python-build-system)
12097 (arguments
12098 `(#:tests? #f)) ; Tests use deprecated python modules.
12099 (home-page "https://github.com/nvawda/bz2file")
12100 (synopsis "Read and write bzip2-compressed files")
12101 (description
12102 "Bz2file is a Python library for reading and writing bzip2-compressed
12103 files. It contains a drop-in replacement for the I/O interface in the
12104 standard library's @code{bz2} module, including features from the latest
12105 development version of CPython that are not available in older releases.")
12106 (license license:asl2.0)))
12107
12108 (define-public python2-bz2file
12109 (package-with-python2 python-bz2file))
12110
12111 (define-public python-future
12112 (package
12113 (name "python-future")
12114 (version "0.17.1")
12115 (source
12116 (origin
12117 (method url-fetch)
12118 (uri (pypi-uri "future" version))
12119 (sha256
12120 (base32
12121 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
12122 (build-system python-build-system)
12123 ;; Many tests connect to the network or are otherwise flawed.
12124 ;; https://github.com/PythonCharmers/python-future/issues/210
12125 (arguments
12126 `(#:tests? #f))
12127 (home-page "https://python-future.org")
12128 (synopsis "Single-source support for Python 3 and 2")
12129 (description
12130 "@code{python-future} is the missing compatibility layer between Python 2 and
12131 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
12132 to support both Python 2 and Python 3 with minimal overhead.")
12133 (license license:expat)))
12134
12135 (define-public python2-future
12136 (package-with-python2 python-future))
12137
12138 (define-public python-cysignals
12139 (package
12140 (name "python-cysignals")
12141 (version "1.9.0")
12142 (source
12143 (origin
12144 (method url-fetch)
12145 (uri (pypi-uri "cysignals" version))
12146 (sha256
12147 (base32
12148 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
12149 (build-system python-build-system)
12150 (native-inputs
12151 `(("python-cython" ,python-cython)
12152 ("python-sphinx" ,python-sphinx)))
12153 (inputs
12154 `(("pari-gp" ,pari-gp)))
12155 (arguments
12156 `(#:modules ((guix build python-build-system)
12157 ((guix build gnu-build-system) #:prefix gnu:)
12158 (guix build utils))
12159 ;; FIXME: Tests are executed after installation and currently fail
12160 ;; when not installing into standard locations; the author is working
12161 ;; on a fix.
12162 #:tests? #f
12163 #:phases
12164 (modify-phases %standard-phases
12165 (add-before
12166 'build 'configure
12167 (assoc-ref gnu:%standard-phases 'configure)))))
12168 (home-page
12169 "https://github.com/sagemath/cysignals")
12170 (synopsis
12171 "Handling of interrupts and signals for Cython")
12172 (description
12173 "The cysignals package provides mechanisms to handle interrupts (and
12174 other signals and errors) in Cython code, using two related approaches,
12175 for mixed Cython/Python code or external C libraries and pure Cython code,
12176 respectively.")
12177 (license license:lgpl3+)))
12178
12179 (define-public python2-cysignals
12180 (package-with-python2 python-cysignals))
12181
12182 (define-public python2-shedskin
12183 (package
12184 (name "python2-shedskin")
12185 (version "0.9.4")
12186 (source
12187 (origin
12188 (method url-fetch)
12189 (uri (string-append "https://github.com/shedskin/shedskin/"
12190 "releases/download/v" version
12191 "/shedskin-" version ".tgz"))
12192 (sha256
12193 (base32
12194 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
12195 (build-system python-build-system)
12196 (arguments
12197 `(#:python ,python-2
12198 #:phases (modify-phases %standard-phases
12199 (add-after 'unpack 'fix-resulting-include-libs
12200 (lambda* (#:key inputs #:allow-other-keys)
12201 (let ((libgc (assoc-ref inputs "libgc"))
12202 (pcre (assoc-ref inputs "pcre")))
12203 (substitute* "shedskin/makefile.py"
12204 (("variable == 'CCFLAGS':[ ]*")
12205 (string-append "variable == 'CCFLAGS':\n"
12206 " line += ' -I " pcre "/include"
12207 " -I " libgc "/include'"))
12208 (("variable == 'LFLAGS':[ ]*")
12209 (string-append "variable == 'LFLAGS':\n"
12210 " line += ' -L" pcre "/lib"
12211 " -L " libgc "/lib'")))
12212 #t))))))
12213 (inputs `(("pcre" ,pcre)
12214 ("libgc" ,libgc)))
12215 (home-page "https://shedskin.github.io/")
12216 (synopsis "Experimental Python-2 to C++ Compiler")
12217 (description (string-append "This is an experimental compiler for a subset of
12218 Python. It generates C++ code and a Makefile."))
12219 (license (list license:gpl3 license:bsd-3 license:expat))))
12220
12221 (define-public python2-rope
12222 (package
12223 (name "python2-rope")
12224 (version "0.11.0")
12225 (source
12226 (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "rope" version))
12229 (sha256
12230 (base32
12231 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
12232 (arguments
12233 ;; Rope has only partial python3 support, see `python-rope'
12234 `(#:python ,python-2))
12235 (build-system python-build-system)
12236 (native-inputs
12237 `(("python2-unittest2" ,python2-unittest2)))
12238 (home-page "https://github.com/python-rope/rope")
12239 (synopsis "Refactoring library for Python")
12240 (description "Rope is a refactoring library for Python. It facilitates
12241 the renaming, moving and extracting of attributes, functions, modules, fields
12242 and parameters in Python 2 source code. These refactorings can also be applied
12243 to occurrences in strings and comments.")
12244 (license license:gpl2)))
12245
12246 (define-public python-rope
12247 (package
12248 (inherit python2-rope)
12249 (name "python-rope")
12250 (arguments `(#:python ,python-wrapper
12251 ;; XXX: Only partial python3 support, results in some failing
12252 ;; tests: <https://github.com/python-rope/rope/issues/247>.
12253 #:tests? #f))
12254 (properties `((python2-variant . ,(delay python2-rope))))))
12255
12256 (define-public python-py3status
12257 (package
12258 (name "python-py3status")
12259 (version "3.21")
12260 (source
12261 (origin
12262 (method url-fetch)
12263 (uri (pypi-uri "py3status" version))
12264 (sha256
12265 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
12266 (build-system python-build-system)
12267 (inputs
12268 `(("file" ,file)))
12269 (arguments
12270 '(#:phases
12271 (modify-phases %standard-phases
12272 ;; 'file' is used for detection of configuration file encoding
12273 ;; let's make link the dependency to particular input
12274 (add-before 'build 'patch-file-path
12275 (lambda* (#:key inputs #:allow-other-keys)
12276 (let ((file-path (assoc-ref inputs "file")))
12277 (substitute* "py3status/parse_config.py"
12278 (("\\[\"file\", \"-b\"")
12279 (string-append "['" file-path "/bin/file', '-b'")))
12280 #t))))
12281 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12282 (home-page "https://github.com/ultrabug/py3status")
12283 (synopsis "Extensible i3status wrapper written in Python")
12284 (description "py3status is an i3status wrapper which extends i3status
12285 functionality in a modular way, allowing you to extend your panel with your
12286 own code, responding to click events and updating clock every second.")
12287 (license license:bsd-3)))
12288
12289 (define-public python2-selectors2
12290 (package
12291 (name "python2-selectors2")
12292 (version "2.0.1")
12293 (source (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "selectors2" version))
12296 (sha256
12297 (base32
12298 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12299 (build-system python-build-system)
12300 (arguments
12301 `(#:python ,python-2))
12302 (native-inputs
12303 `(("python2-mock" ,python2-mock)
12304 ("python2-psutil" ,python2-psutil)))
12305 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12306 (synopsis "Backport of the selectors module from Python 3.5+")
12307 (description
12308 "This package provides a drop-in replacement for the @code{selectors}
12309 module in Python 3.5 and later.")
12310 (license license:expat)))
12311
12312 (define-public python-tblib
12313 (package
12314 (name "python-tblib")
12315 (version "1.6.0")
12316 (source (origin
12317 (method url-fetch)
12318 (uri (pypi-uri "tblib" version))
12319 (sha256
12320 (base32
12321 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12322 (build-system python-build-system)
12323 (arguments
12324 `(#:phases
12325 (modify-phases %standard-phases
12326 (replace 'check
12327 (lambda _
12328 ;; Upstream runs tests after installation and the package itself
12329 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12330 ;; found.
12331 (setenv "PYTHONPATH"
12332 (string-append (getcwd) "/build/lib:"
12333 (getenv "PYTHONPATH")))
12334 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12335 (native-inputs
12336 `(("python-pytest" ,python-pytest)
12337 ("python-six" ,python-six)))
12338 (home-page "https://github.com/ionelmc/python-tblib")
12339 (synopsis "Traceback serialization library")
12340 (description
12341 "Traceback serialization allows you to:
12342
12343 @enumerate
12344 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12345 different processes. This allows better error handling when running code over
12346 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12347
12348 @item Parse traceback strings and raise with the parsed tracebacks.
12349 @end enumerate\n")
12350 (license license:bsd-3)))
12351
12352 (define-public python2-tblib
12353 (package-with-python2 python-tblib))
12354
12355 (define-public python-greenlet
12356 (package
12357 (name "python-greenlet")
12358 (version "0.4.16")
12359 (source (origin
12360 (method url-fetch)
12361 (uri (pypi-uri "greenlet" version))
12362 (sha256
12363 (base32
12364 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12365 (build-system python-build-system)
12366 (home-page "https://greenlet.readthedocs.io/")
12367 (synopsis "Lightweight in-process concurrent programming")
12368 (description
12369 "Greenlet package is a spin-off of Stackless, a version of CPython
12370 that supports micro-threads called \"tasklets\". Tasklets run
12371 pseudo-concurrently (typically in a single or a few OS-level threads) and
12372 are synchronized with data exchanges on \"channels\".")
12373 (license (list license:psfl license:expat))))
12374
12375 (define-public python2-greenlet
12376 (package-with-python2 python-greenlet))
12377
12378 (define-public python-objgraph
12379 (package
12380 (name "python-objgraph")
12381 (version "3.4.1")
12382 (source
12383 (origin
12384 (method url-fetch)
12385 (uri (pypi-uri "objgraph" version))
12386 (sha256
12387 (base32
12388 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12389 (build-system python-build-system)
12390 (propagated-inputs
12391 `(("python-graphviz" ,python-graphviz)))
12392 (native-inputs
12393 `(("python-mock" ,python-mock)
12394 ("graphviz" ,graphviz)))
12395 (home-page "https://mg.pov.lt/objgraph/")
12396 (synopsis "Draw Python object reference graphs with graphviz")
12397 (description
12398 "This package provides tools to draw Python object reference graphs with
12399 graphviz.")
12400 (license license:expat)))
12401
12402 (define-public python2-objgraph
12403 (package-with-python2 python-objgraph))
12404
12405 (define-public python-gevent
12406 (package
12407 (name "python-gevent")
12408 (version "20.6.2")
12409 (source (origin
12410 (method url-fetch)
12411 (uri (pypi-uri "gevent" version))
12412 (sha256
12413 (base32
12414 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12415 (modules '((guix build utils)))
12416 (snippet
12417 '(begin
12418 ;; unbunding libev and c-ares
12419 (delete-file-recursively "deps")
12420 #t))))
12421 (build-system python-build-system)
12422 (arguments
12423 `(#:modules ((ice-9 ftw)
12424 (ice-9 match)
12425 (srfi srfi-26)
12426 (guix build utils)
12427 (guix build python-build-system))
12428 #:phases (modify-phases %standard-phases
12429 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12430 (lambda _
12431 (substitute* "src/gevent/subprocess.py"
12432 (("/bin/sh") (which "sh")))
12433 (for-each (lambda (file)
12434 (substitute* file
12435 (("/bin/sh") (which "sh"))
12436 (("/bin/true") (which "true"))))
12437 (find-files "src/greentest" "\\.py$"))
12438 #t))
12439 (add-before 'build 'do-not-use-bundled-sources
12440 (lambda _
12441 (setenv "GEVENTSETUP_EMBED" "0")
12442
12443 ;; Prevent building bundled libev.
12444 (substitute* "setup.py"
12445 (("run_make=_BUILDING")
12446 "run_make=False"))
12447 #t))
12448 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12449 (lambda* (#:key inputs #:allow-other-keys)
12450 (let ((greenlet (string-append
12451 (assoc-ref inputs "python-greenlet")
12452 "/include")))
12453 (match (scandir greenlet
12454 (lambda (item)
12455 (string-prefix? "python" item)))
12456 ((python)
12457 (setenv "C_INCLUDE_PATH"
12458 (string-append greenlet "/" python ":"
12459 (or (getenv "C_INCLUDE_PATH")
12460 ""))))))
12461 #t))
12462 (add-before 'check 'pretend-to-be-CI
12463 (lambda _
12464 ;; A few tests are skipped due to network constraints or
12465 ;; get longer timeouts when running in a CI environment.
12466 ;; Piggy-back on that, as we need the same adjustments.
12467 (setenv "TRAVIS" "1")
12468 (setenv "APPVEYOR" "1")
12469 #t))
12470 (add-before 'check 'adjust-tests
12471 (lambda _
12472 (let ((disabled-tests
12473 '(;; These tests rely on networking which is not
12474 ;; available in the build container.
12475 "test_urllib2net.py"
12476 "test__server.py"
12477 "test__server_pywsgi.py"
12478 "test_socket.py"
12479 "test__socket.py"
12480 "test__socket_ssl.py"
12481 "test__socket_dns.py"
12482 "test__socket_dns6.py"
12483 "test___example_servers.py"
12484 "test__getaddrinfo_import.py"
12485 "test__examples.py"
12486 "test_httplib.py"
12487 "test_https.py"
12488 "test_urllib2_localnet.py"
12489 "test_ssl.py"
12490 "test__ssl.py"
12491 ;; XXX: These tests borrow functionality from the
12492 ;; Python builtin 'test' module, but it is not
12493 ;; installed with the Guix Python distribution.
12494 "test_smtpd.py"
12495 "test_wsgiref.py"
12496 "test_urllib2.py"
12497 "test_thread.py"
12498 "test_threading.py"
12499 "test__threading_2.py"
12500 ;; These tests rely on KeyboardInterrupts which do not
12501 ;; work inside the build container for some reason
12502 ;; (lack of controlling terminal?).
12503 "test_subprocess.py"
12504 "test__issues461_471.py"
12505 ;; TODO: Patch out the tests that use getprotobyname, etc
12506 ;; instead of disabling all the tests from these files.
12507 "test__resolver_dnspython.py"
12508 "test__doctests.py"
12509 "test__all__.py"
12510 "test___config.py"
12511 "test__execmodules.py")))
12512 (call-with-output-file "skipped_tests.txt"
12513 (lambda (port)
12514 (format port "~a~%"
12515 (string-join disabled-tests "\n"))))
12516 #t)))
12517 (replace 'check
12518 (lambda _
12519 ;; Make sure the build directory is on PYTHONPATH.
12520 (setenv "PYTHONPATH"
12521 (string-append
12522 (getenv "PYTHONPATH") ":"
12523 (getcwd) "/build/"
12524 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12525
12526 ;; Use the build daemons configured number of workers.
12527 (setenv "NWORKERS" (number->string (parallel-job-count)))
12528
12529 (invoke "python" "-m" "gevent.tests" "--config"
12530 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12531 (propagated-inputs
12532 `(("python-greenlet" ,python-greenlet)
12533 ("python-objgraph" ,python-objgraph)
12534 ("python-zope.event" ,python-zope-event)
12535 ("python-zope.interface" ,python-zope-interface)))
12536 (native-inputs
12537 `(("python-six" ,python-six)
12538
12539 ;; For tests.
12540 ("python-dnspython" ,python-dnspython)
12541 ("python-psutil" ,python-psutil)))
12542 (inputs
12543 `(("c-ares" ,c-ares)
12544 ("libev" ,libev)))
12545 (home-page "http://www.gevent.org/")
12546 (synopsis "Coroutine-based network library")
12547 (description
12548 "gevent is a coroutine-based Python networking library that uses greenlet
12549 to provide a high-level synchronous API on top of the libev event loop.")
12550 (license license:expat)
12551 (properties `((python2-variant . ,(delay python2-gevent))))))
12552
12553 (define-public python2-gevent
12554 (let ((base (package-with-python2
12555 (strip-python2-variant python-gevent))))
12556 (package
12557 (inherit base)
12558 (native-inputs `(,@(package-native-inputs base)
12559 ("python-mock" ,python2-mock)
12560 ("python2-selectors2" ,python2-selectors2))))))
12561
12562 (define-public python-fastimport
12563 (package
12564 (name "python-fastimport")
12565 (version "0.9.8")
12566 (source
12567 (origin
12568 (method url-fetch)
12569 (uri (pypi-uri "fastimport" version))
12570 (sha256
12571 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12572 (build-system python-build-system)
12573 (home-page "https://github.com/jelmer/python-fastimport")
12574 (synopsis "VCS fastimport parser and generator in Python")
12575 (description "This package provides a parser for and generator of the Git
12576 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12577 format.")
12578 (license license:gpl2+)))
12579
12580 (define-public python2-fastimport
12581 (package-with-python2 python-fastimport))
12582
12583 (define-public python-twisted
12584 (package
12585 (name "python-twisted")
12586 (version "19.7.0")
12587 (source (origin
12588 (method url-fetch)
12589 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12590 (sha256
12591 (base32
12592 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12593 (build-system python-build-system)
12594 (arguments
12595 '(#:tests? #f)) ; FIXME: some tests fail
12596 (propagated-inputs
12597 `(("python-zope-interface" ,python-zope-interface)
12598 ("python-pyhamcrest" ,python-pyhamcrest)
12599 ("python-incremental" ,python-incremental)
12600 ("python-hyperlink" ,python-hyperlink)
12601 ("python-constantly" ,python-constantly)
12602 ("python-automat" ,python-automat)))
12603 (home-page "https://twistedmatrix.com/")
12604 (synopsis "Asynchronous networking framework written in Python")
12605 (description
12606 "Twisted is an extensible framework for Python programming, with special
12607 focus on event-based network programming and multiprotocol integration.")
12608 (license license:expat)))
12609
12610 (define-public python2-twisted
12611 (package-with-python2 python-twisted))
12612
12613 (define-public python-pika
12614 (package
12615 (name "python-pika")
12616 (version "0.12.0")
12617 (source
12618 (origin
12619 (method url-fetch)
12620 (uri (pypi-uri "pika" version))
12621 (sha256
12622 (base32
12623 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12624 (build-system python-build-system)
12625 (native-inputs
12626 `(("python-pyev" ,python-pyev)
12627 ("python-tornado" ,python-tornado)
12628 ("python-twisted" ,python-twisted)))
12629 (home-page "https://pika.readthedocs.org")
12630 (synopsis "Pure Python AMQP Client Library")
12631 (description
12632 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12633 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12634 network support library.")
12635 (license license:bsd-3)))
12636
12637 (define-public python2-pika
12638 (package-with-python2 python-pika))
12639
12640 (define-public python-ply
12641 (package
12642 (name "python-ply")
12643 (version "3.11")
12644 (source
12645 (origin
12646 (method url-fetch)
12647 (uri (pypi-uri "ply" version))
12648 (sha256
12649 (base32
12650 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12651 (build-system python-build-system)
12652 (home-page "http://www.dabeaz.com/ply/")
12653 (synopsis "Python Lex & Yacc")
12654 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12655 It uses LR parsing and does extensive error checking.")
12656 (license license:bsd-3)))
12657
12658 (define-public python-tabulate
12659 (package
12660 (name "python-tabulate")
12661 (version "0.8.7")
12662 (source (origin
12663 (method url-fetch)
12664 (uri (pypi-uri "tabulate" version))
12665 (sha256
12666 (base32
12667 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12668 (build-system python-build-system)
12669 (arguments
12670 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12671 ;; and the latest release is not tagged in the upstream repository.
12672 '(#:tests? #f))
12673 (home-page "https://bitbucket.org/astanin/python-tabulate")
12674 (synopsis "Pretty-print tabular data")
12675 (description
12676 "Tabulate is a library and command-line utility to pretty-print tabular
12677 data in Python.")
12678 (license license:expat)))
12679
12680 (define-public python2-tabulate
12681 (package-with-python2 python-tabulate))
12682
12683 (define-public python-kazoo
12684 (package
12685 (name "python-kazoo")
12686 (version "2.4.0")
12687 (source
12688 (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "kazoo" version))
12691 (sha256
12692 (base32
12693 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12694 (build-system python-build-system)
12695 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12696 (propagated-inputs
12697 `(("python-six" ,python-six)))
12698 (home-page "https://kazoo.readthedocs.org")
12699 (synopsis "High-level Zookeeper client library")
12700 (description
12701 "Kazoo is a Python client library for the Apache Zookeeper distributed
12702 application service. It is designed to be easy to use and to avoid common
12703 programming errors.")
12704 (license license:asl2.0)))
12705
12706 (define-public python2-kazoo
12707 (package-with-python2 python-kazoo))
12708
12709 (define-public python-pykafka
12710 (package
12711 (name "python-pykafka")
12712 (version "2.4.0")
12713 (source (origin
12714 (method url-fetch)
12715 (uri (pypi-uri "pykafka" version))
12716 (sha256
12717 (base32
12718 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12719 (build-system python-build-system)
12720 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12721 (propagated-inputs
12722 `(("python-gevent" ,python-gevent)
12723 ("python-kazoo" ,python-kazoo)
12724 ("python-tabulate" ,python-tabulate)))
12725 (inputs
12726 `(("librdkafka" ,librdkafka)))
12727 (home-page "https://pykafka.readthedocs.io/")
12728 (synopsis "Apache Kafka client for Python")
12729 (description
12730 "PyKafka is a client for the Apache Kafka distributed messaging system.
12731 It includes Python implementations of Kafka producers and consumers, which
12732 are optionally backed by a C extension built on librdkafka.")
12733 (license license:asl2.0)))
12734
12735 (define-public python2-pykafka
12736 (package-with-python2 python-pykafka))
12737
12738 (define-public python-wcwidth
12739 (package
12740 (name "python-wcwidth")
12741 (version "0.1.8")
12742 (source (origin
12743 (method url-fetch)
12744 (uri (pypi-uri "wcwidth" version))
12745 (sha256
12746 (base32
12747 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12748 (build-system python-build-system)
12749 (home-page "https://github.com/jquast/wcwidth")
12750 (synopsis "Measure number of terminal column cells of wide-character codes")
12751 (description "Wcwidth measures the number of terminal column cells of
12752 wide-character codes. It is useful for those implementing a terminal emulator,
12753 or programs that carefully produce output to be interpreted by one. It is a
12754 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12755 specified in POSIX.1-2001 and POSIX.1-2008.")
12756 (license license:expat)))
12757
12758 (define-public python2-wcwidth
12759 (package-with-python2 python-wcwidth))
12760
12761 (define-public python2-jsonrpclib
12762 (package
12763 (name "python2-jsonrpclib")
12764 (version "0.1.7")
12765 (source (origin
12766 (method url-fetch)
12767 (uri (pypi-uri "jsonrpclib" version))
12768 (sha256
12769 (base32
12770 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12771 (build-system python-build-system)
12772 (arguments
12773 `(#:tests? #f
12774 #:python ,python-2))
12775 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12776 (synopsis "Implementation of JSON-RPC specification for Python")
12777 (description
12778 "This library is an implementation of the JSON-RPC specification.
12779 It supports both the original 1.0 specification, as well as the
12780 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12781 etc.")
12782 (license license:asl2.0)))
12783
12784 (define-public python-chai
12785 (package
12786 (name "python-chai")
12787 (version "1.1.2")
12788 (source (origin
12789 (method url-fetch)
12790 (uri (pypi-uri "chai" version))
12791 (sha256
12792 (base32
12793 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12794 (build-system python-build-system)
12795 (home-page "https://github.com/agoragames/chai")
12796 (synopsis "Mocking framework for Python")
12797 (description
12798 "Chai provides an api for mocking, stubbing and spying your python
12799 objects, patterned after the Mocha library for Ruby.")
12800 (license license:bsd-3)))
12801
12802 (define-public python2-chai
12803 (package-with-python2 python-chai))
12804
12805 (define-public python-inflection
12806 (package
12807 (name "python-inflection")
12808 (version "0.3.1")
12809 (source
12810 (origin (method url-fetch)
12811 (uri (pypi-uri "inflection" version))
12812 (sha256
12813 (base32
12814 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12815 (build-system python-build-system)
12816 (native-inputs
12817 `(("python-pytest" ,python-pytest)))
12818 (home-page "https://github.com/jpvanhal/inflection")
12819 (synopsis "Python string transformation library")
12820 (description
12821 "Inflection is a string transformation library. It singularizes
12822 and pluralizes English words, and transforms strings from CamelCase to
12823 underscored string.")
12824 (license license:expat)))
12825
12826 (define-public python2-inflection
12827 (package-with-python2 python-inflection))
12828
12829 (define-public python-pylev
12830 (package
12831 (name "python-pylev")
12832 (version "1.3.0")
12833 (source (origin
12834 (method url-fetch)
12835 (uri (pypi-uri "pylev" version))
12836 (sha256
12837 (base32
12838 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12839 (build-system python-build-system)
12840 (home-page "https://github.com/toastdriven/pylev")
12841 (synopsis "Levenshtein distance implementation in Python")
12842 (description "Pure Python Levenshtein implementation, based off the
12843 Wikipedia code samples at
12844 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12845 (license license:bsd-3)))
12846
12847 (define-public python2-pylev
12848 (package-with-python2 python-pylev))
12849
12850 (define-public python-cleo
12851 (package
12852 (name "python-cleo")
12853 (version "0.8.1")
12854 (source (origin
12855 (method url-fetch)
12856 (uri (pypi-uri "cleo" version))
12857 (sha256
12858 (base32
12859 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12860 (build-system python-build-system)
12861 (native-inputs
12862 `( ;; For testing
12863 ("python-mock" ,python-mock)
12864 ("python-pytest-mock" ,python-pytest-mock)
12865 ("python-pytest" ,python-pytest)))
12866 (propagated-inputs
12867 `(("python-backpack" ,python-backpack)
12868 ("python-clikit" ,python-clikit)
12869 ("python-pastel" ,python-pastel)
12870 ("python-pylev" ,python-pylev)))
12871 (home-page "https://github.com/sdispater/cleo")
12872 (synopsis "Command-line arguments library for Python")
12873 (description
12874 "Cleo allows you to create command-line commands with signature in
12875 docstring and colored output.")
12876 (license license:expat)))
12877
12878 (define-public python2-cleo
12879 (package-with-python2 python-cleo))
12880
12881 (define-public python-tomlkit
12882 (package
12883 (name "python-tomlkit")
12884 (version "0.6.0")
12885 (source
12886 (origin
12887 (method url-fetch)
12888 (uri (pypi-uri "tomlkit" version))
12889 (sha256
12890 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12891 (build-system python-build-system)
12892 (native-inputs
12893 `(("python-pytest" ,python-pytest)))
12894 (home-page "https://github.com/sdispater/tomlkit")
12895 (synopsis "Style-preserving TOML library")
12896 (description
12897 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12898 preserves all comments, indentations, whitespace and internal element ordering,
12899 and makes them accessible and editable via an intuitive API. It can also
12900 create new TOML documents from scratch using the provided helpers. Part of the
12901 implementation has been adapted, improved, and fixed from Molten.")
12902 (license license:expat)))
12903
12904 (define-public python-shellingham
12905 (package
12906 (name "python-shellingham")
12907 (version "1.3.2")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "shellingham" version))
12912 (sha256
12913 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12914 (build-system python-build-system)
12915 (arguments
12916 `(#:phases
12917 (modify-phases %standard-phases
12918 (add-after 'unpack 'restore-setup.py
12919 ;; setup.py will return in the next release.
12920 ;; <https://github.com/sarugaku/shellingham/issues/33>
12921 (lambda _
12922 (with-output-to-file "setup.py"
12923 (lambda _
12924 (display "from setuptools import setup\nsetup()\n")))
12925 #t)))))
12926 (home-page "https://github.com/sarugaku/shellingham")
12927 (synopsis "Tool to detect surrounding shell")
12928 (description
12929 "Shellingham detects what shell the current Python executable is
12930 running in.")
12931 (license license:isc)))
12932
12933 (define-public python-memcached
12934 (package
12935 (name "python-memcached")
12936 (version "1.59")
12937 (source
12938 (origin
12939 (method url-fetch)
12940 (uri (pypi-uri "python-memcached" version))
12941 (sha256
12942 (base32
12943 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12944 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12945 (build-system python-build-system)
12946 (propagated-inputs `(("python-six" ,python-six)))
12947 (home-page
12948 "https://github.com/linsomniac/python-memcached")
12949 (synopsis "Pure python memcached client")
12950 (description
12951 "This software is a pure Python interface to the memcached memory cache
12952 daemon. It is the client side software which allows storing values in one or
12953 more, possibly remote, memcached servers.")
12954 (license license:psfl)))
12955
12956 (define-public python-clikit
12957 (package
12958 (name "python-clikit")
12959 (version "0.6.2")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "clikit" version))
12964 (sha256
12965 (base32
12966 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12967 (build-system python-build-system)
12968 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12969 (propagated-inputs
12970 `(("python-crashtest" ,python-crashtest)
12971 ("python-pastel" ,python-pastel)
12972 ("python-pylev" ,python-pylev)))
12973 (home-page "https://github.com/sdispater/clikit")
12974 (synopsis "Group of utilities to build command line interfaces")
12975 (description
12976 "CliKit is a group of utilities to build testable command line
12977 interfaces.")
12978 (properties `((python2-variant . ,(delay python2-clikit))))
12979 (license license:expat)))
12980
12981 (define-public python2-clikit
12982 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12983 (package/inherit
12984 base
12985 (propagated-inputs
12986 `(("python-enum34" ,python2-enum34)
12987 ("python-typing" ,python2-typing)
12988 ,@(package-propagated-inputs base))))))
12989
12990 (define-public python-msgpack-python
12991 (package
12992 (name "python-msgpack-python")
12993 (version "0.5.6")
12994 (source
12995 (origin
12996 (method url-fetch)
12997 (uri (pypi-uri "msgpack-python" version))
12998 (sha256
12999 (base32
13000 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
13001 (build-system python-build-system)
13002 (home-page "http://msgpack.org/")
13003 (synopsis "Package to deserialize messages in MessagePack binary format")
13004 (description
13005 "MessagePack is an efficient binary serialization format. It lets you
13006 exchange data among multiple languages like JSON. But it's faster and
13007 smaller. Small integers are encoded into a single byte, and typical short
13008 strings require only one extra byte in addition to the strings themselves.")
13009 (license license:asl2.0)))
13010
13011 (define-public python-cachy
13012 (package
13013 (name "python-cachy")
13014 (version "0.3.0")
13015 (source
13016 (origin
13017 (method url-fetch)
13018 (uri (pypi-uri "cachy" version))
13019 (sha256
13020 (base32
13021 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
13022 (build-system python-build-system)
13023 (arguments
13024 '(#:phases
13025 (modify-phases %standard-phases
13026 (replace 'check
13027 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
13028 "pytest"))))))
13029 (native-inputs
13030 `(("memcached" ,memcached)
13031 ("python-fakeredis" ,python-fakeredis)
13032 ("python-flexmock" ,python-flexmock)
13033 ("python-pifpaf" ,python-pifpaf)
13034 ("python-pytest" ,python-pytest)))
13035 (propagated-inputs
13036 `(("python-memcached" ,python-memcached)
13037 ("python-msgpack-python" ,python-msgpack-python)
13038 ("python-redis" ,python-redis)))
13039 (home-page "https://github.com/sdispater/cachy")
13040 (synopsis "Simple yet effective caching library")
13041 (description
13042 "Cachy provides a simple yet effective caching library. A simple but
13043 powerful API: thread-safety; decorator syntax; support for memcached, redis,
13044 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
13045 (license license:expat)))
13046
13047 (define-public poetry
13048 (package
13049 (name "poetry")
13050 (version "1.0.10")
13051 ;; Poetry can only be built from source with Poetry.
13052 (source
13053 (origin
13054 (method url-fetch)
13055 (uri (pypi-uri "poetry" version))
13056 (sha256
13057 (base32
13058 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
13059 (build-system python-build-system)
13060 (arguments
13061 `(#:tests? #f ;; Pypi does not have tests.
13062 #:phases
13063 (modify-phases %standard-phases
13064 (add-before 'build 'patch-setup-py
13065 (lambda _
13066 (substitute* "setup.py"
13067 ;; poetry won't update version as 21.0.0 relies on python > 3.6
13068 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
13069 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
13070 ;; Reported upstream:
13071 ;; <https://github.com/python-poetry/poetry/issues/2752>.
13072 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
13073 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
13074 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
13075 #t)))))
13076 (propagated-inputs
13077 `(("python-cachecontrol" ,python-cachecontrol)
13078 ("python-cachy" ,python-cachy)
13079 ("python-cleo" ,python-cleo)
13080 ("python-clikit" ,python-clikit)
13081 ("python-html5lib" ,python-html5lib)
13082 ("python-jsonschema" ,python-jsonschema)
13083 ("python-keyring" ,python-keyring)
13084 ("python-msgpack-transitional" ,python-msgpack-transitional)
13085 ("python-pexpect" ,python-pexpect)
13086 ("python-pkginfo" ,python-pkginfo)
13087 ("python-pyparsing" ,python-pyparsing)
13088 ("python-pyrsistent" ,python-pyrsistent)
13089 ("python-requests" ,python-requests)
13090 ("python-requests-toolbelt" ,python-requests-toolbelt)
13091 ("python-shellingham" ,python-shellingham)
13092 ("python-tomlkit" ,python-tomlkit)
13093 ("python-virtualenv" ,python-virtualenv)))
13094 (home-page "https://python-poetry.org")
13095 (synopsis "Python dependency management and packaging made easy")
13096 (description "Poetry is a tool for dependency management and packaging
13097 in Python. It allows you to declare the libraries your project depends on and
13098 it will manage (install/update) them for you.")
13099 (license license:expat)))
13100
13101 (define-public python-lark-parser
13102 (package
13103 (name "python-lark-parser")
13104 (version "0.9.0")
13105 (source (origin
13106 (method url-fetch)
13107 (uri (pypi-uri "lark-parser" version))
13108 (sha256
13109 (base32
13110 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
13111 (build-system python-build-system)
13112 (home-page "https://github.com/lark-parser/lark")
13113 (synopsis "Multi-language parser for Python")
13114 (description
13115 "Lark is a parser built with a focus on ergonomics, performance and
13116 resilience. Lark can parse all context-free languages. That means it is
13117 capable of parsing almost any programming language out there, and to
13118 some degree most natural languages too.")
13119 (license license:expat)))
13120
13121 (define-public python-libcst
13122 (package
13123 (name "python-libcst")
13124 (version "0.3.8")
13125 (source (origin
13126 (method url-fetch)
13127 (uri (pypi-uri "libcst" version))
13128 (sha256
13129 (base32
13130 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
13131 (build-system python-build-system)
13132 (arguments
13133 `(#:phases
13134 (modify-phases %standard-phases
13135 (add-after 'unpack 'remove-failing-tests
13136 (lambda _
13137 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
13138 (delete-file "libcst/tests/test_fuzz.py")
13139 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
13140 (delete-file "libcst/tests/test_pyre_integration.py")
13141 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
13142 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
13143 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
13144 #t))
13145 (add-before 'check 'generate-test-data
13146 (lambda _
13147 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13148 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
13149 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
13150 (replace 'check
13151 (lambda _
13152 (invoke "python" "-m" "unittest")
13153 #t)))))
13154 (native-inputs
13155 `(("python-black" ,python-black)
13156 ("python-isort" ,python-isort)))
13157 (propagated-inputs
13158 `(("python-typing-extensions" ,python-typing-extensions)
13159 ("python-typing-inspect" ,python-typing-inspect)
13160 ("python-pyyaml" ,python-pyyaml)))
13161 (home-page "https://github.com/Instagram/LibCST")
13162 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
13163 (description
13164 "LibCST parses Python source code as a CST tree that keeps all
13165 formatting details (comments, whitespaces, parentheses, etc). It's useful
13166 for building automated refactoring (codemod) applications and linters.
13167 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
13168 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
13169 naming node types and fields, LibCST creates a lossless CST that looks and
13170 feels like an AST.")
13171 (license (list license:expat
13172 ;; Some files unde libcst/_parser/ are under Python Software
13173 ;; Foundation license (see LICENSE file for details)
13174 license:psfl
13175 ;; libcst/_add_slots.py
13176 license:asl2.0))))
13177
13178 (define-public python-typing-inspect
13179 (package
13180 (name "python-typing-inspect")
13181 (version "0.6.0")
13182 (source (origin
13183 (method url-fetch)
13184 (uri (pypi-uri "typing_inspect" version))
13185 (sha256
13186 (base32
13187 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
13188 (build-system python-build-system)
13189 (propagated-inputs
13190 `(("python-mypy-extensions" ,python-mypy-extensions)
13191 ("python-typing-extensions" ,python-typing-extensions)))
13192 (home-page "https://github.com/ilevkivskyi/typing_inspect")
13193 (synopsis "API for inspection of types in the Python @code{typing} module")
13194 (description
13195 "The @code{typing_inspect} module defines experimental API for runtime
13196 inspection of types defined in the Python standard typing module.")
13197 (license license:expat)))
13198
13199 (define-public python-lazy-object-proxy
13200 (package
13201 (name "python-lazy-object-proxy")
13202 (version "1.5.1")
13203 (source (origin
13204 (method url-fetch)
13205 (uri (pypi-uri "lazy-object-proxy" version))
13206 (sha256
13207 (base32
13208 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
13209 (native-inputs
13210 `(("python-setuptools-scm" ,python-setuptools-scm)))
13211 (build-system python-build-system)
13212 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
13213 (synopsis "Lazy object proxy for python")
13214 (description
13215 "Lazy object proxy is an object that wraps a callable but defers the call
13216 until the object is actually required, and caches the result of said call.")
13217 (license license:bsd-2)))
13218
13219 (define-public python2-lazy-object-proxy
13220 (package-with-python2 python-lazy-object-proxy))
13221
13222 (define-public python-dnspython
13223 (package
13224 (name "python-dnspython")
13225 (version "1.16.0")
13226 (source (origin
13227 (method url-fetch)
13228 (uri (string-append "http://www.dnspython.org/kits/"
13229 version "/dnspython-" version ".tar.gz"))
13230 (sha256
13231 (base32
13232 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
13233 (build-system python-build-system)
13234 (arguments '(#:tests? #f)) ; XXX: requires internet access
13235 (home-page "http://www.dnspython.org")
13236 (synopsis "DNS toolkit for Python")
13237 (description
13238 "dnspython is a DNS toolkit for Python. It supports almost all record
13239 types. It can be used for queries, zone transfers, and dynamic updates.
13240 It supports TSIG authenticated messages and EDNS0.")
13241 (license license:expat)))
13242
13243 (define-public python2-dnspython
13244 (package-with-python2 python-dnspython))
13245
13246 (define-public python-py3dns
13247 (package
13248 (name "python-py3dns")
13249 (version "3.2.1")
13250 (source
13251 (origin
13252 (method url-fetch)
13253 (uri (pypi-uri "py3dns" version))
13254 (sha256
13255 (base32
13256 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
13257 (build-system python-build-system)
13258 ;; This package wants to read /etc/resolv.conf. We can't patch it without
13259 ;; removing functionality so we copy from Nix and "just don't build it".
13260 (arguments
13261 `(#:phases
13262 (modify-phases %standard-phases
13263 (add-after 'unpack 'patch-source
13264 (lambda _
13265 (substitute* "setup.py"
13266 (("import DNS") "")
13267 (("DNS.__version__") (string-append "\"" ,version "\"")))
13268 #t)))
13269 #:tests? #f)) ; Also skip the tests.
13270 (home-page "https://launchpad.net/py3dns")
13271 (synopsis "Python 3 DNS library")
13272 (description "This Python 3 module provides a DNS API for looking up DNS
13273 entries from within Python 3 modules and applications. This module is a
13274 simple, lightweight implementation.")
13275 (license license:psfl)))
13276
13277 (define-public python-email-validator
13278 (package
13279 (name "python-email-validator")
13280 (version "1.0.2")
13281 (source
13282 (origin (method url-fetch)
13283 (uri (pypi-uri "email_validator" version))
13284 (sha256
13285 (base32
13286 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13287 (build-system python-build-system)
13288 (arguments
13289 '(#:phases
13290 (modify-phases %standard-phases
13291 (add-before 'build 'use-dnspython
13292 (lambda _
13293 (substitute* "setup.py"
13294 (("dnspython3") "dnspython"))
13295 #t)))))
13296 (propagated-inputs
13297 `(("python-dnspython" ,python-dnspython)
13298 ("python-idna" ,python-idna)))
13299 (home-page "https://github.com/JoshData/python-email-validator")
13300 (synopsis "Email address validation library for Python")
13301 (description
13302 "This library validates email address syntax and deliverability.")
13303 (license license:cc0)))
13304
13305 (define-public python2-email-validator
13306 (package-with-python2 python-email-validator))
13307
13308 (define-public python-ukpostcodeparser
13309 (package
13310 (name "python-ukpostcodeparser")
13311 (version "1.0.3")
13312 (source (origin
13313 (method url-fetch)
13314 (uri (pypi-uri "UkPostcodeParser" version))
13315 (sha256
13316 (base32
13317 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13318 (build-system python-build-system)
13319 (home-page "https://github.com/hamstah/ukpostcodeparser")
13320 (synopsis "UK Postcode parser for Python")
13321 (description
13322 "This library provides the @code{parse_uk_postcode} function for
13323 parsing UK postcodes.")
13324 (license license:expat)))
13325
13326 (define-public python2-ukpostcodeparser
13327 (package-with-python2 python-ukpostcodeparser))
13328
13329 (define-public python-faker
13330 (package
13331 (name "python-faker")
13332 (version "4.0.2")
13333 (source (origin
13334 (method url-fetch)
13335 (uri (pypi-uri "Faker" version))
13336 (sha256
13337 (base32
13338 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13339 (build-system python-build-system)
13340 (arguments
13341 '(#:phases
13342 (modify-phases %standard-phases
13343 (replace 'check
13344 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13345 (native-inputs
13346 `(;; For testing
13347 ("python-freezegun" ,python-freezegun)
13348 ("python-pytest" ,python-pytest)
13349 ("python-random2" ,python-random2)
13350 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13351 ("python-validators" ,python-validators)))
13352 (propagated-inputs
13353 `(("python-dateutil" ,python-dateutil)
13354 ("python-text-unidecode" ,python-text-unidecode)))
13355 (home-page "https://github.com/joke2k/faker")
13356 (synopsis "Python package that generates fake data")
13357 (description
13358 "Faker is a Python package that generates fake data such as names,
13359 addresses, and phone numbers.")
13360 (license license:expat)
13361 (properties `((python2-variant . ,(delay python2-faker))))))
13362
13363 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13364 (define-public python2-faker
13365 (let ((base (package-with-python2 (strip-python2-variant
13366 python-faker))))
13367 (package
13368 (inherit base)
13369 (version "3.0.1")
13370 (source (origin
13371 (method url-fetch)
13372 (uri (pypi-uri "Faker" version))
13373 (sha256
13374 (base32
13375 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13376 (native-inputs
13377 `(("python-mock" ,python2-mock)
13378 ,@(package-native-inputs base)))
13379 (propagated-inputs
13380 `(("python2-ipaddress" ,python2-ipaddress)
13381 ("python2-six" ,python2-six)
13382 ,@(package-propagated-inputs base))))))
13383
13384 (define-public python-pyaml
13385 (package
13386 (name "python-pyaml")
13387 (version "18.11.0")
13388 (source (origin
13389 (method url-fetch)
13390 (uri (pypi-uri "pyaml" version))
13391 (sha256
13392 (base32
13393 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13394 (build-system python-build-system)
13395 (native-inputs
13396 `(("python-unidecode" ,python-unidecode)))
13397 (propagated-inputs
13398 `(("python-pyyaml" ,python-pyyaml)))
13399 (home-page "https://github.com/mk-fg/pretty-yaml")
13400 (synopsis "YAML pretty-print library for Python")
13401 (description
13402 "pyaml is a PyYAML based python module to produce pretty and readable
13403 YAML-serialized data.")
13404 (license license:wtfpl2)))
13405
13406 (define-public python2-pyaml
13407 (package-with-python2 python-pyaml))
13408
13409 (define-public python-backpack
13410 (package
13411 (name "python-backpack")
13412 (version "0.1")
13413 (source
13414 (origin
13415 (method url-fetch)
13416 (uri (pypi-uri "backpack" version))
13417 (sha256
13418 (base32
13419 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13420 (build-system python-build-system)
13421 (native-inputs
13422 `(("python-pytest" ,python-pytest)
13423 ("python-nose" ,python-nose)))
13424 (propagated-inputs
13425 `(("python-simplejson" ,python-simplejson)))
13426 (home-page "https://github.com/sdispater/backpack")
13427 (synopsis "Utilities for working with Python collections")
13428 (description "Backpack provides some useful utilities for working with
13429 collections of data.")
13430 (license license:expat)))
13431
13432 (define-public python2-backpack
13433 (package-with-python2 python-backpack))
13434
13435 (define-public python-prompt-toolkit
13436 (package
13437 (name "python-prompt-toolkit")
13438 (version "3.0.7")
13439 (source
13440 (origin
13441 (method url-fetch)
13442 (uri (pypi-uri "prompt_toolkit" version))
13443 (sha256
13444 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13445 (build-system python-build-system)
13446 (arguments
13447 `(#:phases
13448 (modify-phases %standard-phases
13449 (delete 'check)
13450 (add-after 'install 'post-install-check
13451 (lambda* (#:key inputs outputs #:allow-other-keys)
13452 ;; HOME is needed for the test
13453 ;; "test_pathcompleter_can_expanduser".
13454 (setenv "HOME" "/tmp")
13455 (add-installed-pythonpath inputs outputs)
13456 (invoke "py.test"))))))
13457 (propagated-inputs
13458 `(("python-wcwidth" ,python-wcwidth)))
13459 (native-inputs
13460 `(("python-pytest" ,python-pytest)))
13461 (home-page
13462 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13463 (synopsis "Library for building command line interfaces in Python")
13464 (description
13465 "Prompt-Toolkit is a library for building interactive command line
13466 interfaces in Python. It's like GNU Readline but it also features syntax
13467 highlighting while typing, out-of-the-box multi-line input editing, advanced
13468 code completion, incremental search, support for Chinese double-width
13469 characters, mouse support, and auto suggestions.")
13470 (license license:bsd-3)
13471 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13472
13473 (define-public python-prompt-toolkit-2
13474 (package (inherit python-prompt-toolkit)
13475 (name "python-prompt-toolkit")
13476 (version "2.0.7")
13477 (source
13478 (origin
13479 (method url-fetch)
13480 (uri (pypi-uri "prompt_toolkit" version))
13481 (sha256
13482 (base32
13483 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13484 (propagated-inputs
13485 `(("python-wcwidth" ,python-wcwidth)
13486 ("python-six" ,python-six)
13487 ("python-pygments" ,python-pygments)))
13488 (properties '())))
13489
13490 (define-public python2-prompt-toolkit
13491 (package-with-python2 python-prompt-toolkit-2))
13492
13493 (define-public python-prompt-toolkit-1
13494 (package (inherit python-prompt-toolkit-2)
13495 (version "1.0.15")
13496 (source
13497 (origin
13498 (method url-fetch)
13499 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13500 (sha256
13501 (base32
13502 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13503
13504 (define-public python2-prompt-toolkit-1
13505 (package-with-python2 python-prompt-toolkit-1))
13506
13507 (define-public python-jedi
13508 (package
13509 (name "python-jedi")
13510 (version "0.17.2")
13511 (source
13512 (origin
13513 (method url-fetch)
13514 (uri (pypi-uri "jedi" version))
13515 (sha256
13516 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13517 (build-system python-build-system)
13518 (arguments
13519 `(#:phases
13520 (modify-phases %standard-phases
13521 (replace 'check
13522 (lambda _
13523 (setenv "HOME" "/tmp")
13524 (invoke "python" "-m" "pytest" "-vv"))))))
13525 (native-inputs
13526 `(("python-pytest" ,python-pytest)
13527 ("python-docopt" ,python-docopt)))
13528 (propagated-inputs
13529 `(("python-parso" ,python-parso)))
13530 (home-page "https://github.com/davidhalter/jedi")
13531 (synopsis "Autocompletion and static analysis library for Python")
13532 (description
13533 "Jedi is a static analysis tool for Python that can be used in Integrated
13534 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13535 on a deeper level than many other static analysis frameworks for Python.
13536
13537 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13538 well.")
13539 (license license:expat)))
13540
13541 (define-public python2-jedi
13542 (package-with-python2 python-jedi))
13543
13544 (define-public ptpython
13545 (package
13546 (name "ptpython")
13547 (version "3.0.5")
13548 (source (origin
13549 (method url-fetch)
13550 (uri (pypi-uri "ptpython" version))
13551 (sha256
13552 (base32
13553 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13554 (build-system python-build-system)
13555 (arguments
13556 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13557 (propagated-inputs
13558 `(("python-appdirs" ,python-appdirs)
13559 ("python-jedi" ,python-jedi)
13560 ("python-prompt-toolkit" ,python-prompt-toolkit)
13561 ("python-pygments" ,python-pygments)))
13562 (home-page "https://github.com/jonathanslenders/ptpython")
13563 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13564 (description
13565 "ptpython is a Python read-eval-print loop with IDE-like features.
13566 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13567 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13568 etc.")
13569 (license license:bsd-3)
13570 (properties `((python2-variant . ,(delay ptpython-2))))))
13571
13572 (define-public ptpython-2
13573 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13574 (package
13575 (inherit base)
13576 (name "ptpython2"))))
13577
13578 (define-public python-stem
13579 (package
13580 (name "python-stem")
13581 (version "1.8.0")
13582 (source
13583 (origin
13584 (method url-fetch)
13585 (uri (pypi-uri "stem" version))
13586 (sha256
13587 (base32
13588 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13589 (build-system python-build-system)
13590 (arguments
13591 `(#:phases
13592 (modify-phases %standard-phases
13593 (replace 'check
13594 (lambda _
13595 (invoke "./run_tests.py" "--unit")
13596 #t)))))
13597 (native-inputs
13598 `(("python-mock" ,python-mock)
13599 ("python-pycodestyle" ,python-pycodestyle)
13600 ("python-pyflakes" ,python-pyflakes)))
13601 (home-page "https://stem.torproject.org/")
13602 (synopsis
13603 "Python controller library that allows applications to interact with Tor")
13604 (description
13605 "Stem is a Python controller library for Tor. With it you can use Tor's
13606 control protocol to script against the Tor process and read descriptor data
13607 relays publish about themselves.")
13608 (license license:lgpl3)))
13609
13610 (define-public python2-stem
13611 (package-with-python2 python-stem))
13612
13613 (define-public python-pyserial
13614 (package
13615 (name "python-pyserial")
13616 (version "3.4")
13617 (source
13618 (origin
13619 (method url-fetch)
13620 (uri (pypi-uri "pyserial" version))
13621 (sha256
13622 (base32
13623 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13624 (build-system python-build-system)
13625 (arguments
13626 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13627 ;; #:phases
13628 ;; (modify-phases %standard-phases
13629 ;; (replace 'check
13630 ;; (lambda _
13631 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13632 (home-page
13633 "https://github.com/pyserial/pyserial")
13634 (synopsis "Python Serial Port Bindings")
13635 (description "@code{pyserial} provide serial port bindings for Python. It
13636 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13637 and/or Xon/Xoff. The port is accessed in RAW mode.")
13638 (license license:bsd-3)))
13639
13640 (define-public python2-pyserial
13641 (package-with-python2 python-pyserial))
13642
13643 (define-public python-kivy
13644 (package
13645 (name "python-kivy")
13646 (version "1.10.1")
13647 (source
13648 (origin
13649 (method url-fetch)
13650 (uri (pypi-uri "Kivy" version))
13651 (file-name (string-append name "-" version ".tar.gz"))
13652 (sha256
13653 (base32
13654 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13655 (build-system python-build-system)
13656 (arguments
13657 `(#:tests? #f ; Tests require many optional packages
13658 #:phases
13659 (modify-phases %standard-phases
13660 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13661 (lambda* (#:key inputs #:allow-other-keys)
13662 (setenv "KIVY_SDL2_PATH"
13663 (string-append (assoc-ref inputs "sdl-union")
13664 "/include/SDL2"))
13665 #t)))))
13666 (native-inputs
13667 `(("pkg-config" ,pkg-config)
13668 ("python-cython" ,python-cython)))
13669 (inputs
13670 `(("gstreamer" ,gstreamer)
13671 ("mesa" ,mesa)
13672 ("sdl-union"
13673 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13674 (home-page "https://kivy.org")
13675 (synopsis
13676 "Multitouch application framework")
13677 (description
13678 "A software library for rapid development of
13679 hardware-accelerated multitouch applications.")
13680 (license license:expat)))
13681
13682 (define-public python2-kivy
13683 (package-with-python2 python-kivy))
13684
13685 (define-public python-binaryornot
13686 (package
13687 (name "python-binaryornot")
13688 (version "0.4.4")
13689 (source (origin
13690 (method url-fetch)
13691 (uri (pypi-uri "binaryornot" version))
13692 (sha256
13693 (base32
13694 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13695 (build-system python-build-system)
13696 (arguments
13697 `(#:phases
13698 (modify-phases %standard-phases
13699 (add-after 'unpack 'patch-tests
13700 (lambda _
13701 ;; TypeError: binary() got an unexpected keyword argument
13702 ;; 'average_size'.
13703 (substitute* "tests/test_check.py"
13704 (("average_size=512") ""))
13705 #t)))))
13706 (propagated-inputs
13707 `(("python-chardet" ,python-chardet)
13708 ("python-hypothesis" ,python-hypothesis)))
13709 (home-page "https://github.com/audreyr/binaryornot")
13710 (synopsis "Package to check if a file is binary or text")
13711 (description "Ultra-lightweight pure Python package to check if a file is
13712 binary or text.")
13713 (license license:bsd-3)
13714 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13715
13716 (define-public python2-binaryornot
13717 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13718 (package (inherit base)
13719 (propagated-inputs
13720 `(("python2-enum34" ,python2-enum34)
13721 ,@(package-propagated-inputs base))))))
13722
13723 (define-public python-binwalk
13724 (package
13725 (name "python-binwalk")
13726 (version "2.2.0")
13727 (source
13728 (origin
13729 (method git-fetch)
13730 (uri (git-reference
13731 (url "https://github.com/ReFirmLabs/binwalk")
13732 (commit (string-append "v" version))))
13733 (file-name (git-file-name name version))
13734 (sha256
13735 (base32
13736 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13737 (build-system python-build-system)
13738 (arguments
13739 `(#:phases
13740 (modify-phases %standard-phases
13741 (add-before 'check 'set-pythonpath
13742 (lambda _
13743 (setenv "PYTHONPATH"
13744 (string-append
13745 (getcwd) "/src/"
13746 ":" (getenv "PYTHONPATH")))
13747 (setenv "HOME" "")
13748 #t)))))
13749 (native-inputs
13750 `(("python-coverage" ,python-coverage)
13751 ("python-nose" ,python-nose)))
13752 (home-page "https://github.com/ReFirmLabs/binwalk")
13753 (synopsis "Firmware analysis tool")
13754 (description "Binwalk is a tool for analyzing, reverse engineering, and
13755 extracting firmware images")
13756 (license license:expat)))
13757
13758 (define-public python-nltk
13759 (package
13760 (name "python-nltk")
13761 (version "3.2.1")
13762 (source (origin
13763 (method url-fetch)
13764 (uri (pypi-uri "nltk" version))
13765 (sha256
13766 (base32
13767 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13768 (build-system python-build-system)
13769 (arguments
13770 '(;; The tests require some extra resources to be downloaded.
13771 ;; TODO Try packaging these resources.
13772 #:tests? #f))
13773 (home-page "http://nltk.org/")
13774 (synopsis "Natural Language Toolkit")
13775 (description "It provides interfaces to over 50 corpora and lexical
13776 resources such as WordNet, along with a suite of text processing libraries
13777 for classification, tokenization, stemming, tagging, parsing, and semantic
13778 reasoning, wrappers for natural language processing libraries.")
13779 (license license:asl2.0)))
13780
13781 (define-public python2-nltk
13782 (package-with-python2 python-nltk))
13783
13784 (define-public python-pymongo
13785 (package
13786 (name "python-pymongo")
13787 (version "3.7.2")
13788 (source (origin
13789 (method url-fetch)
13790 (uri (pypi-uri "pymongo" version))
13791 (sha256
13792 (base32
13793 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13794 (build-system python-build-system)
13795 (propagated-inputs
13796 `(("python-certifi" ,python-certifi)))
13797 (home-page "https://github.com/mongodb/mongo-python-driver")
13798 (synopsis "Python driver for MongoDB")
13799 (description "Python driver for MongoDB.")
13800 (license license:asl2.0)))
13801
13802 (define-public python2-pymongo
13803 (package-with-python2 python-pymongo))
13804
13805 (define-public python-consul
13806 (package
13807 (name "python-consul")
13808 (version "0.6.1")
13809 (source
13810 (origin
13811 (method url-fetch)
13812 (uri (pypi-uri "python-consul" version))
13813 (sha256
13814 (base32
13815 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13816 (build-system python-build-system)
13817 (arguments
13818 '(#:tests? #f)) ; The tests are not distributed
13819 (propagated-inputs
13820 `(("python-requests" ,python-requests)
13821 ("python-six" ,python-six)))
13822 (home-page "https://github.com/cablehead/python-consul")
13823 (synopsis "Python client for Consul")
13824 (description
13825 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13826 discovery, monitoring and configuration.")
13827 (license license:expat)))
13828
13829 (define-public python2-consul
13830 (package-with-python2 python-consul))
13831
13832 (define-public python-schematics
13833 (package
13834 (name "python-schematics")
13835 (version "1.1.1")
13836 (source
13837 (origin
13838 (method git-fetch)
13839 (uri (git-reference
13840 (url "https://github.com/schematics/schematics")
13841 (commit (string-append "v" version))))
13842 (file-name (git-file-name name version))
13843 (sha256
13844 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13845 (build-system python-build-system)
13846 (propagated-inputs
13847 `(("python-six" ,python-six)))
13848 (arguments
13849 ;; The tests require a bunch of not very nice packages with fixed
13850 ;; version requirements (e.g. python-coveralls).
13851 `(#:tests? #f))
13852 (home-page "https://github.com/schematics/schematics")
13853 (synopsis "Python Data Structures for Humans")
13854 (description "Python Data Structures for Humans.")
13855 (license license:bsd-3)))
13856
13857 (define-public python2-schematics
13858 (package-with-python2 python-schematics))
13859
13860 (define-public python-odfpy
13861 (package
13862 (name "python-odfpy")
13863 (version "1.4.1")
13864 (source (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "odfpy" version))
13867 (sha256
13868 (base32
13869 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13870 (arguments
13871 `(#:phases
13872 (modify-phases %standard-phases
13873 (replace 'check
13874 (lambda _
13875 (setenv "PYTHONPATH" (string-append "./build/lib:"
13876 (getenv "PYTHONPATH")))
13877 (invoke "pytest" "-vv"))))))
13878 (build-system python-build-system)
13879 (native-inputs
13880 `(("python-pytest" ,python-pytest)))
13881 (propagated-inputs
13882 `(("python-defusedxml" ,python-defusedxml)))
13883 (home-page "https://github.com/eea/odfpy")
13884 (synopsis "Python API and tools to manipulate OpenDocument files")
13885 (description "Collection of libraries and utility programs written in
13886 Python to manipulate OpenDocument 1.2 files.")
13887 (license
13888 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13889 ;; number of files with other licenses.
13890 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13891
13892 (define-public python2-odfpy
13893 (package-with-python2 python-odfpy))
13894
13895 (define-public python-natsort
13896 (package
13897 (name "python-natsort")
13898 (version "7.0.1")
13899 (source (origin
13900 (method url-fetch)
13901 (uri (pypi-uri "natsort" version))
13902 (sha256
13903 (base32
13904 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13905 (build-system python-build-system)
13906 (arguments
13907 `(#:modules ((guix build utils)
13908 (guix build python-build-system)
13909 (srfi srfi-1)
13910 (srfi srfi-26)
13911 (ice-9 ftw))
13912 #:phases
13913 (modify-phases %standard-phases
13914 (add-before 'check 'set-cachedir
13915 ;; Tests require write access to $HOME by default
13916 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13917 (replace 'check
13918 (lambda _
13919 (let ((cwd (getcwd)))
13920 (setenv "PYTHONPATH"
13921 (string-append
13922 cwd "/build/"
13923 (find (cut string-prefix? "lib" <>)
13924 (scandir (string-append cwd "/build")))
13925 ":"
13926 (getenv "PYTHONPATH")))
13927 (invoke "pytest" "-v")))))))
13928 (native-inputs
13929 `(("python-hypothesis" ,python-hypothesis)
13930 ("python-pytest-cov" ,python-pytest-cov)
13931 ("python-pytest-mock" ,python-pytest-mock)
13932 ("python-pytest" ,python-pytest)))
13933 (propagated-inputs ; TODO: Add python-fastnumbers.
13934 `(("python-pyicu" ,python-pyicu)))
13935 (home-page "https://github.com/SethMMorton/natsort")
13936 (synopsis "Natural sorting for python and shell")
13937 (description
13938 "Natsort lets you apply natural sorting on lists instead of
13939 lexicographical. If you use the built-in @code{sorted} method in python
13940 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13941 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13942 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13943 identifies numbers and sorts them separately from strings. It can also sort
13944 version numbers, real numbers, mixed types and more, and comes with a shell
13945 command @command{natsort} that exposes this functionality in the command line.")
13946 (license license:expat)
13947 (properties `((python2-variant . ,(delay python2-natsort))))))
13948
13949 ;; Natsort 6.x are the last versions with support for Python 2.
13950 (define-public python2-natsort
13951 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13952 (package (inherit base)
13953 (version "6.2.1")
13954 (source (origin
13955 (method url-fetch)
13956 (uri (pypi-uri "natsort" version))
13957 (sha256
13958 (base32
13959 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13960 (native-inputs
13961 `(("python2-pathlib" ,python2-pathlib)
13962 ,@(package-native-inputs base))))))
13963
13964 (define-public glances
13965 (package
13966 (name "glances")
13967 (version "3.1.4")
13968 (source
13969 (origin
13970 (method url-fetch)
13971 (uri (pypi-uri "Glances" version))
13972 (sha256
13973 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13974 (modules '((guix build utils)))
13975 (snippet
13976 '(begin
13977 ;; Glances phones PyPI for weekly update checks by default.
13978 ;; Disable these. The user can re-enable them if desired.
13979 (substitute* "glances/outdated.py"
13980 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13981 (string-append indentation
13982 "self.args.disable_check_update = True\n"
13983 line)))
13984 #t))))
13985 (build-system python-build-system)
13986 (propagated-inputs
13987 `(("python-future" ,python-future)
13988 ("python-psutil" ,python-psutil)))
13989 (home-page "https://github.com/nicolargo/glances")
13990 (synopsis "Cross-platform curses-based monitoring tool")
13991 (description
13992 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13993 Glances uses the PsUtil library to get information from your system. It
13994 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13995 (license license:lgpl3+)))
13996
13997 (define-public python-glances
13998 (deprecated-package "python-glances" glances))
13999
14000 (define-public python-graphql-core
14001 (package
14002 (name "python-graphql-core")
14003 (version "0.5.3")
14004 (source
14005 (origin
14006 (method url-fetch)
14007 (uri (pypi-uri "graphql-core" version))
14008 (sha256
14009 (base32
14010 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
14011 (build-system python-build-system)
14012 (arguments
14013 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
14014 #:phases
14015 (modify-phases %standard-phases
14016 (add-after 'unpack 'patch-hardcoded-version
14017 (lambda _ (substitute*
14018 "setup.py"
14019 (("'gevent==1.1rc1'") "'gevent'"))
14020 #t)))))
14021 (native-inputs
14022 `(("python-gevent" ,python-gevent)
14023 ("python-mock" ,python-mock)
14024 ("python-pytest-mock" ,python-pytest-mock)))
14025 (propagated-inputs
14026 `(("python-promise" ,python-promise)
14027 ("python-six" ,python-six)))
14028 (home-page "https://github.com/graphql-python/graphql-core")
14029 (synopsis "GraphQL implementation for Python")
14030 (description
14031 "GraphQL implementation for Python. GraphQL is a data query language and
14032 runtime designed and used to request and deliver data to mobile and web apps.
14033 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
14034 to Python.")
14035 (license license:expat)))
14036
14037 (define-public python2-graphql-core
14038 (package-with-python2 python-graphql-core))
14039
14040 (define-public python-graphql-relay
14041 (package
14042 (name "python-graphql-relay")
14043 (version "0.4.5")
14044 (source
14045 (origin
14046 (method url-fetch)
14047 (uri (pypi-uri "graphql-relay" version))
14048 (sha256
14049 (base32
14050 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
14051 (build-system python-build-system)
14052 (arguments
14053 '(#:tests? #f)) ; The tests are not distributed
14054 (propagated-inputs
14055 `(("python-graphql-core" ,python-graphql-core)
14056 ("python-promise" ,python-promise)
14057 ("python-six" ,python-six)))
14058 (home-page "https://github.com/graphql-python/graphql-relay-py")
14059 (synopsis "Relay implementation for Python")
14060 (description
14061 "This is a library to allow the easy creation of Relay-compliant servers
14062 using the GraphQL Python reference implementation of a GraphQL server. It
14063 should be noted that the code is a exact port of the original
14064 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
14065 from Facebook.")
14066 (license license:expat)))
14067
14068 (define-public python2-graphql-relay
14069 (package-with-python2 python-graphql-relay))
14070
14071 (define-public python-graphene
14072 (package
14073 (name "python-graphene")
14074 (version "0.10.2")
14075 (source
14076 (origin
14077 (method url-fetch)
14078 (uri (pypi-uri "graphene" version))
14079 (sha256
14080 (base32
14081 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
14082 (build-system python-build-system)
14083 (propagated-inputs
14084 `(("python-graphql-core" ,python-graphql-core)
14085 ("python-graphql-relay" ,python-graphql-relay)
14086 ("python-iso8601" ,python-iso8601)
14087 ("python-promise" ,python-promise)
14088 ("python-six" ,python-six)))
14089 (arguments
14090 `(#:tests? #f)) ; no tests/ in the PyPI tarball
14091 (home-page "https://graphene-python.org/")
14092 (synopsis "GraphQL Framework for Python")
14093 (description
14094 "Graphene is a Python library for building GraphQL schemas/types.
14095 A GraphQL schema describes your data model, and provides a GraphQL server
14096 with an associated set of resolve methods that know how to fetch data.")
14097 (properties `((python2-variant . ,(delay python2-graphene))))
14098 (license license:expat)))
14099
14100 (define-public python2-graphene
14101 (let ((base (package-with-python2
14102 (strip-python2-variant python-graphene))))
14103 (package (inherit base)
14104 (native-inputs
14105 `(("python2-sqlalchemy" ,python2-sqlalchemy)
14106 ,@(package-native-inputs base))))))
14107
14108 (define-public python-nautilus
14109 (package
14110 (name "python-nautilus")
14111 (version "0.4.9")
14112 (source
14113 (origin
14114 (method url-fetch)
14115 (uri (pypi-uri "nautilus" version))
14116 (sha256
14117 (base32
14118 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
14119 (build-system python-build-system)
14120 (arguments `(#:tests? #f)) ; fails to import test modules
14121 (propagated-inputs
14122 `(("python-bcrypt" ,python-bcrypt)
14123 ("python-click" ,python-click)
14124 ("python-consul" ,python-consul)
14125 ("python-graphene" ,python-graphene)
14126 ("python-jinja2" ,python-jinja2)
14127 ("python-peewee" ,python-peewee)
14128 ("python-pika" ,python-pika)
14129 ("python-tornado" ,python-tornado)
14130 ("python-wtforms" ,python-wtforms)))
14131 (native-inputs
14132 `(("python-nose2" ,python-nose2)))
14133 (home-page "https://github.com/AlecAivazis/nautilus")
14134 (synopsis "Library for creating microservice applications")
14135 (description
14136 "Nautilus is a framework for flux based microservices that looks to
14137 provide extendible implementations of common aspects of a cloud so that you can
14138 focus on building massively scalable web applications.")
14139 (license license:expat)))
14140
14141 (define-public python-random2
14142 (package
14143 (name "python-random2")
14144 (version "1.0.1")
14145 (source (origin
14146 (method url-fetch)
14147 (uri (pypi-uri "random2" version ".zip"))
14148 (sha256
14149 (base32
14150 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
14151 (build-system python-build-system)
14152 (native-inputs `(("unzip" ,unzip)))
14153 (home-page "http://pypi.python.org/pypi/random2")
14154 (synopsis "Python 3 version of the Python 2 @code{random} module")
14155 (description
14156 "This package provides a Python 3 ported version of Python 2.7’s
14157 @code{random} module. It has also been back-ported to work in Python 2.6.
14158
14159 In Python 3, the implementation of @code{randrange()} was changed, so that
14160 even with the same seed you get different sequences in Python 2 and 3.
14161
14162 This package closes that gap, allowing stable random number generation
14163 between the different Python versions.")
14164 (license license:psfl)))
14165
14166 (define-public python2-random2
14167 (package-with-python2 python-random2))
14168
14169 (define-public python-snowballstemmer
14170 (package
14171 (name "python-snowballstemmer")
14172 (version "2.0.0")
14173 (source (origin
14174 (method url-fetch)
14175 (uri (pypi-uri "snowballstemmer" version))
14176 (sha256
14177 (base32
14178 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
14179 (build-system python-build-system)
14180 (arguments
14181 `(;; No tests exist
14182 #:tests? #f))
14183 (home-page "https://github.com/shibukawa/snowball_py")
14184 (synopsis "Snowball stemming library collection for Python")
14185 (description "This package provides 16 word stemmer algorithms generated
14186 from Snowball algorithms. It includes the 15 original ones plus the Poerter
14187 English stemmer.")
14188 (license license:bsd-3)))
14189
14190 (define-public python2-snowballstemmer
14191 (package-with-python2 python-snowballstemmer))
14192
14193 (define-public python-setproctitle
14194 (package
14195 (name "python-setproctitle")
14196 (version "1.1.10")
14197 (source
14198 (origin
14199 (method url-fetch)
14200 (uri (pypi-uri "setproctitle" version))
14201 (sha256
14202 (base32
14203 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
14204 (build-system python-build-system)
14205 (arguments
14206 '(#:phases
14207 (modify-phases %standard-phases
14208 (add-before 'check 'patch-Makefile
14209 ;; Stricly this is only required for the python2 variant.
14210 ;; But adding a phase in an inherited package seems to be
14211 ;; cumbersum. So we patch even for python3.
14212 (lambda _
14213 (let ((nose (assoc-ref %build-inputs "python2-nose")))
14214 (when nose
14215 (substitute* "Makefile"
14216 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
14217 (string-append nose "/bin/nosetests "))))
14218 #t)))
14219 (replace 'check
14220 (lambda _
14221 (setenv "PYTHON" (or (which "python3") (which "python")))
14222 (setenv "PYCONFIG" (if (which "python3-config")
14223 "python3-config --embed"
14224 "python-config"))
14225 (setenv "CC" "gcc")
14226 ;; No need to extend PYTHONPATH to find the built package, since
14227 ;; the Makefile will build anyway
14228 (invoke "make" "check"))))))
14229 (native-inputs
14230 `(("procps" ,procps))) ; required for tests
14231 (home-page "https://github.com/dvarrazzo/py-setproctitle")
14232 (synopsis
14233 "Setproctitle implementation for Python to customize the process title")
14234 (description "The library allows a process to change its title (as displayed
14235 by system tools such as ps and top).
14236
14237 Changing the title is mostly useful in multi-process systems, for
14238 example when a master process is forked: changing the children's title
14239 allows identifying the task each process is busy with. The technique
14240 is used by PostgreSQL and the OpenSSH Server for example.")
14241 (license license:bsd-3)
14242 (properties `((python2-variant . ,(delay python2-setproctitle))))))
14243
14244 (define-public python2-setproctitle
14245 (let ((base (package-with-python2
14246 (strip-python2-variant python-setproctitle))))
14247 (package
14248 (inherit base)
14249 (native-inputs `(("python2-nose" ,python2-nose)
14250 ,@(package-native-inputs base))))))
14251
14252 (define-public python-validictory
14253 (package
14254 (name "python-validictory")
14255 (version "1.0.1")
14256 (source
14257 (origin
14258 (method url-fetch)
14259 (uri (pypi-uri "validictory" version))
14260 (sha256
14261 (base32
14262 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
14263 (build-system python-build-system)
14264 (arguments
14265 '(#:phases
14266 (modify-phases %standard-phases
14267 (add-after 'unpack 'bootstrap
14268 ;; Move the tests out of the package directory to avoid
14269 ;; packaging them.
14270 (lambda* _
14271 (rename-file "validictory/tests" "tests")
14272 (delete-file "tests/__init__.py")))
14273 (replace 'check
14274 (lambda _
14275 ;; Extend PYTHONPATH so the built package will be found.
14276 (setenv "PYTHONPATH"
14277 (string-append (getcwd) "/build/lib:"
14278 (getenv "PYTHONPATH")))
14279 (invoke "py.test" "-vv" ))))))
14280 (native-inputs
14281 `(("python-pytest" ,python-pytest)))
14282 (home-page
14283 "https://github.com/jamesturk/validictory")
14284 (synopsis "General purpose Python data validator")
14285 (description "It allows validation of arbitrary Python data structures.
14286
14287 The schema format is based on the JSON Schema
14288 proposal (http://json-schema.org), so combined with json the library is also
14289 useful as a validator for JSON data.")
14290 (license license:expat)))
14291
14292 (define-public python2-validictory
14293 (package-with-python2 python-validictory))
14294
14295 (define-public python-pyelftools
14296 (package
14297 (name "python-pyelftools")
14298 (version "0.25")
14299 (source
14300 (origin
14301 (method url-fetch)
14302 (uri (pypi-uri "pyelftools" version))
14303 (sha256
14304 (base32
14305 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14306 (build-system python-build-system)
14307 (arguments
14308 `(#:phases
14309 (modify-phases %standard-phases
14310 (add-before 'check 'set-pythonpath
14311 (lambda _
14312 (setenv "PYTHONPATH"
14313 (string-append
14314 (getcwd) "/test/"
14315 ":" (getenv "PYTHONPATH")))
14316 #t)))))
14317 (home-page
14318 "https://github.com/eliben/pyelftools")
14319 (synopsis
14320 "Analyze binary and library file information")
14321 (description "This Python library provides interfaces for parsing and
14322 analyzing two binary and library file formats; the Executable and Linking
14323 Format (ELF), and debugging information in the Debugging With Attributed
14324 Record Format (DWARF).")
14325 (license license:public-domain)))
14326
14327 (define-public python-pyev
14328 (package
14329 (name "python-pyev")
14330 (version "0.9.0")
14331 (source
14332 (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "pyev" version))
14335 (sha256
14336 (base32
14337 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14338 (build-system python-build-system)
14339 (arguments
14340 `(#:tests? #f ; no test suite
14341 #:phases
14342 (modify-phases %standard-phases
14343 (add-after 'unpack 'patch
14344 (lambda* (#:key inputs #:allow-other-keys)
14345 (let ((libev (string-append (assoc-ref inputs "libev")
14346 "/lib/libev.so.4")))
14347 (substitute* "setup.py"
14348 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14349 (string-append "libev_dll_name = \"" libev "\"")))))))))
14350 (inputs
14351 `(("libev" ,libev)))
14352 (home-page "http://pythonhosted.org/pyev/")
14353 (synopsis "Python libev interface")
14354 (description "Pyev provides a Python interface to libev.")
14355 (license license:gpl3)))
14356
14357 (define-public python2-pyev
14358 (package-with-python2 python-pyev))
14359
14360 (define-public python-imagesize
14361 (package
14362 (name "python-imagesize")
14363 (version "1.2.0")
14364 (source
14365 (origin
14366 (method url-fetch)
14367 (uri (pypi-uri "imagesize" version))
14368 (sha256
14369 (base32
14370 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14371 (build-system python-build-system)
14372 (home-page "https://github.com/shibukawa/imagesize_py")
14373 (synopsis "Gets image size of files in various formats in Python")
14374 (description
14375 "This package allows determination of image size from
14376 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14377 (license license:expat)))
14378
14379 (define-public python2-imagesize
14380 (package-with-python2 python-imagesize))
14381
14382 (define-public python-termstyle
14383 (package
14384 (name "python-termstyle")
14385 (version "0.1.11")
14386 (source
14387 (origin
14388 (method url-fetch)
14389 (uri (pypi-uri "termstyle" version))
14390 (sha256
14391 (base32
14392 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14393 (build-system python-build-system)
14394 (arguments
14395 '(#:phases
14396 (modify-phases %standard-phases
14397 (replace 'check
14398 (lambda _
14399 (invoke "python" "test3.py"))))))
14400 (home-page "https://github.com/gfxmonk/termstyle")
14401 (synopsis "Console text coloring for Python")
14402 (description "This package provides console text coloring for Python.")
14403 (license license:bsd-3)))
14404
14405 (define-public python-argcomplete
14406 (package
14407 (name "python-argcomplete")
14408 (version "1.11.1")
14409 (source
14410 (origin
14411 (method url-fetch)
14412 (uri (pypi-uri "argcomplete" version))
14413 (sha256
14414 (base32
14415 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14416 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14417 (build-system python-build-system)
14418 (native-inputs
14419 `(("python-coverage" ,python-coverage)
14420 ("python-flake8" ,python-flake8)
14421 ("python-pexpect" ,python-pexpect)
14422 ("python-wheel" ,python-wheel)
14423 ("tcsh" ,tcsh)
14424 ("fish" ,fish)
14425 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14426 (home-page "https://github.com/kislyuk/argcomplete")
14427 (synopsis "Shell tab completion for Python argparse")
14428 (description "argcomplete provides extensible command line tab completion
14429 of arguments and options for Python scripts using @code{argparse}. It's
14430 particularly useful for programs with many options or sub-parsers that can
14431 dynamically suggest completions; for example, when browsing resources over the
14432 network.")
14433 (license license:asl2.0)))
14434
14435 (define-public python2-argcomplete
14436 (package-with-python2 python-argcomplete))
14437
14438 (define-public python-csscompressor
14439 (package
14440 (name "python-csscompressor")
14441 (version "0.9.5")
14442 (source
14443 (origin
14444 (method url-fetch)
14445 (uri (pypi-uri "csscompressor" version))
14446 (sha256
14447 (base32
14448 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14449 (build-system python-build-system)
14450 (arguments
14451 '(#:phases
14452 (modify-phases %standard-phases
14453 (replace 'check
14454 (lambda _
14455 (invoke "py.test"))))))
14456 (native-inputs
14457 `(("python-pytest" ,python-pytest)))
14458 (home-page "https://github.com/sprymix/csscompressor")
14459 (synopsis "Python port of YUI CSS Compressor")
14460 (description
14461 "This package provides a python port of YUI CSS Compressor.")
14462 (license license:bsd-3)))
14463
14464 (define-public python-rcssmin
14465 (package
14466 (name "python-rcssmin")
14467 (version "1.0.6")
14468 (source
14469 (origin
14470 (method url-fetch)
14471 (uri (pypi-uri "rcssmin" version))
14472 (sha256
14473 (base32
14474 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14475 (build-system python-build-system)
14476 (arguments
14477 '(#:phases
14478 (modify-phases %standard-phases
14479 (replace 'check
14480 (lambda _
14481 (invoke "python" "run_tests.py" "tests"))))))
14482 (home-page "http://opensource.perlig.de/rcssmin/")
14483 (synopsis "CSS Minifier")
14484 (description "The minifier is based on the semantics of the YUI compressor,
14485 which itself is based on the rule list by Isaac Schlueter.")
14486 (license license:asl2.0)))
14487
14488 (define-public python-rjsmin
14489 (package
14490 (name "python-rjsmin")
14491 (version "1.1.0")
14492 (source
14493 (origin
14494 (method url-fetch)
14495 (uri (pypi-uri "rjsmin" version))
14496 (sha256
14497 (base32
14498 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14499 (modules '((guix build utils)))
14500 (snippet
14501 '(begin
14502 (for-each delete-file (find-files "bench" "\\.js$"))
14503 #t))))
14504 (build-system python-build-system)
14505 (arguments
14506 '(#:tests? #f ; Not all test files included.
14507 #:phases
14508 (modify-phases %standard-phases
14509 (replace 'check
14510 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14511 (add-installed-pythonpath inputs outputs)
14512 (if tests?
14513 (invoke "py.test" "-vv" "tests")
14514 #t))))))
14515 (native-inputs
14516 `(("python-pytest" ,python-pytest)))
14517 (home-page "http://opensource.perlig.de/rjsmin/")
14518 (synopsis "Javascript Minifier")
14519 (description "@code{rJSmin} is a javascript minifier written in Python. The
14520 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14521 is a re-implementation aiming for speed, so it can be used at runtime (rather
14522 than during a preprocessing step).")
14523 (license license:asl2.0)))
14524
14525 (define-public python-xopen
14526 (package
14527 (name "python-xopen")
14528 (version "0.5.0")
14529 (source
14530 (origin
14531 (method url-fetch)
14532 (uri (pypi-uri "xopen" version))
14533 (sha256
14534 (base32
14535 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14536 (build-system python-build-system)
14537 (propagated-inputs
14538 `(("python-setuptools-scm" ,python-setuptools-scm)))
14539 (home-page "https://github.com/marcelm/xopen/")
14540 (synopsis "Open compressed files transparently")
14541 (description "This module provides an @code{xopen} function that works like
14542 Python's built-in @code{open} function, but can also deal with compressed files.
14543 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14544 recognized by their file extensions. The focus is on being as efficient as
14545 possible on all supported Python versions.")
14546 (license license:expat)))
14547
14548 (define-public python2-xopen
14549 (let ((base (package-with-python2
14550 (strip-python2-variant python-xopen))))
14551 (package
14552 (inherit base)
14553 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14554 ,@(package-propagated-inputs base))))))
14555
14556 (define-public python-cheetah
14557 (package
14558 (name "python-cheetah")
14559 (version "3.2.4")
14560 (source
14561 (origin
14562 (method url-fetch)
14563 (uri (pypi-uri "Cheetah3" version))
14564 (sha256
14565 (base32
14566 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14567 (build-system python-build-system)
14568 (arguments
14569 `(#:modules ((guix build utils)
14570 (guix build python-build-system)
14571 (ice-9 ftw)
14572 (srfi srfi-1)
14573 (srfi srfi-26))
14574 #:phases (modify-phases %standard-phases
14575 (add-after 'unpack 'use-absolute-python
14576 (lambda _
14577 (substitute* "Cheetah/CheetahWrapper.py"
14578 (("#!/usr/bin/env python")
14579 (string-append "#!" (which "python"))))
14580 #t))
14581 (add-after 'unpack 'fix-tests
14582 (lambda _
14583 (substitute* "Cheetah/Tests/ImportHooks.py"
14584 (("os.path.dirname\\(__file__\\)")
14585 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14586 #t))
14587 (replace 'check
14588 (lambda _
14589 (let ((cwd (getcwd)))
14590 (setenv "PYTHONPATH"
14591 (string-append
14592 cwd "/build/"
14593 (find (cut string-prefix? "lib" <>)
14594 (scandir (string-append cwd "/build")))
14595 ":" (getenv "PYTHONPATH")))
14596 (setenv "PATH"
14597 (string-append (getenv "PATH")
14598 ":" cwd "/bin"))
14599 (setenv "TMPDIR" "/tmp")
14600
14601 (substitute* "Cheetah/Tests/Test.py"
14602 (("unittest.TextTestRunner\\(\\)")
14603 "unittest.TextTestRunner(verbosity=2)"))
14604
14605 (invoke "python" "Cheetah/Tests/Test.py")))))))
14606 (propagated-inputs
14607 `(("python-markdown" ,python-markdown))) ;optional
14608 (home-page "https://cheetahtemplate.org/")
14609 (synopsis "Template engine")
14610 (description "Cheetah is a text-based template engine and Python code
14611 generator.
14612
14613 Cheetah can be used as a standalone templating utility or referenced as
14614 a library from other Python applications. It has many potential uses,
14615 but web developers looking for a viable alternative to ASP, JSP, PHP and
14616 PSP are expected to be its principle user group.
14617
14618 Features:
14619 @enumerate
14620 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14621 text-based format.
14622 @item Cleanly separates content, graphic design, and program code.
14623 @item Blends the power and flexibility of Python with a simple template language
14624 that non-programmers can understand.
14625 @item Gives template writers full access to any Python data structure, module,
14626 function, object, or method in their templates.
14627 @item Makes code reuse easy by providing an object-orientated interface to
14628 templates that is accessible from Python code or other Cheetah templates.
14629 One template can subclass another and selectively reimplement sections of it.
14630 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14631 improve the performance of a dynamic website.
14632 @item Compiles templates into optimized, yet readable, Python code.
14633 @end enumerate")
14634 (license (license:x11-style "file://LICENSE"))))
14635
14636 (define-public python2-cheetah
14637 (package-with-python2 python-cheetah))
14638
14639 (define-public python-dulwich
14640 (package
14641 (name "python-dulwich")
14642 (version "0.19.16")
14643 (source
14644 (origin
14645 (method url-fetch)
14646 (uri (list (string-append "https://www.dulwich.io/releases/"
14647 "dulwich-" version ".tar.gz")
14648 (pypi-uri "dulwich" version)))
14649 (sha256
14650 (base32
14651 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14652 (build-system python-build-system)
14653 (arguments
14654 `(#:phases
14655 (modify-phases %standard-phases
14656 (add-before 'check 'fix-tests
14657 (lambda* (#:key inputs #:allow-other-keys)
14658 ;; The tests use Popen with a custom environment which doesn't
14659 ;; include PATH.
14660 (substitute* "dulwich/tests/compat/utils.py"
14661 (("'git'") (string-append "'"
14662 (which "git")
14663 "'")))
14664 (substitute* '("dulwich/tests/test_repository.py"
14665 "dulwich/tests/test_hooks.py")
14666 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14667 (setenv "TEST_RUNNER" "unittest")
14668 (setenv "PYTHONHASHSEED" "random")
14669 #t)))))
14670 (propagated-inputs
14671 `(("python-fastimport" ,python-fastimport)
14672 ("python-urllib3" ,python-urllib3)))
14673 (native-inputs
14674 `(("python-mock" ,python-mock)
14675 ("python-geventhttpclient" ,python-geventhttpclient)
14676 ("git" ,git)))
14677 (home-page "https://www.dulwich.io/")
14678 (synopsis "Git implementation in Python")
14679 (description "Dulwich is an implementation of the Git file formats and
14680 protocols written in pure Python.")
14681 ;; Can be used with either license.
14682 (license (list license:asl2.0 license:gpl2+))))
14683
14684 (define-public python2-dulwich
14685 (package-with-python2 python-dulwich))
14686
14687 (define-public python-pbkdf2
14688 (package
14689 (name "python-pbkdf2")
14690 (version "1.3")
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (pypi-uri "pbkdf2" version))
14695 (sha256
14696 (base32
14697 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14698 (build-system python-build-system)
14699 (arguments
14700 '(#:phases
14701 (modify-phases %standard-phases
14702 (replace 'check
14703 (lambda _
14704 (setenv "PYTHONPATH"
14705 (string-append (getcwd) "/build/lib:"
14706 (getenv "PYTHONPATH")))
14707 (invoke "python" "test/test_pbkdf2.py"))))))
14708 (propagated-inputs
14709 `(("python-pycrypto" ,python-pycrypto))) ; optional
14710 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14711 (synopsis "Password-based key derivation")
14712 (description "This module implements the password-based key derivation
14713 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14714
14715 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14716 is part of the RSA Public Key Cryptography Standards series. The provided
14717 implementation takes a password or a passphrase and a salt value (and
14718 optionally a iteration count, a digest module, and a MAC module) and provides
14719 a file-like object from which an arbitrarily-sized key can be read.")
14720 (license license:expat)))
14721
14722 (define-public python2-pbkdf2
14723 (package-with-python2 python-pbkdf2))
14724
14725 (define-public python-qrcode
14726 (package
14727 (name "python-qrcode")
14728 (version "6.1")
14729 (source
14730 (origin
14731 (method url-fetch)
14732 (uri (pypi-uri "qrcode" version))
14733 (sha256
14734 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14735 (build-system python-build-system)
14736 (arguments
14737 ;; FIXME: Tests require packaging 'pymaging'.
14738 '(#:tests? #f))
14739 (propagated-inputs
14740 `(("python-lxml" ,python-lxml) ; for SVG output
14741 ("python-pillow" ,python-pillow) ; for PNG output
14742 ("python-six" ,python-six)))
14743 (home-page "https://github.com/lincolnloop/python-qrcode")
14744 (synopsis "QR Code image generator")
14745 (description "This package provides a pure Python QR Code generator
14746 module. It uses the Python Imaging Library (PIL) to allow for the generation
14747 of QR Codes.
14748
14749 In addition this package provides a command line tool to generate QR codes and
14750 either write these QR codes to a file or do the output as ascii art at the
14751 console.")
14752 (license license:bsd-3)))
14753
14754 (define-public python2-qrcode
14755 (package-with-python2 python-qrcode))
14756
14757 (define-public python-rst2ansi
14758 (package
14759 (name "python-rst2ansi")
14760 (version "0.1.5")
14761 (source
14762 (origin
14763 (method url-fetch)
14764 (uri (pypi-uri "rst2ansi" version))
14765 (sha256
14766 (base32
14767 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14768 (build-system python-build-system)
14769 (propagated-inputs
14770 `(("python-docutils" ,python-docutils)))
14771 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14772 (synopsis "Convert RST to ANSI-decorated console output")
14773 (description
14774 "Python module dedicated to rendering RST (reStructuredText) documents
14775 to ansi-escaped strings suitable for display in a terminal.")
14776 (license license:expat)))
14777
14778 (define-public python-ansi2html
14779 (package
14780 (name "python-ansi2html")
14781 (version "1.2.0")
14782 (source
14783 (origin
14784 (method url-fetch)
14785 (uri (pypi-uri "ansi2html" version))
14786 (sha256
14787 (base32
14788 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14789 (build-system python-build-system)
14790 (native-inputs
14791 `(("python-mock" ,python-mock)
14792 ("python-nose" ,python-nose)))
14793 (propagated-inputs
14794 `(("python-six" ,python-six)))
14795 (home-page "https://github.com/ralphbean/ansi2html")
14796 (synopsis "Convert ANSI-decorated console output to HTML")
14797 (description
14798 "@command{ansi2html} is a Python library and command line utility for
14799 converting text with ANSI color codes to HTML or LaTeX.")
14800 (license license:gpl3+)))
14801
14802 (define-public python2-ansi2html
14803 (package-with-python2 python-ansi2html))
14804
14805 (define-public python-ddt
14806 (package
14807 (name "python-ddt")
14808 (version "1.4.1")
14809 (source
14810 (origin
14811 (method url-fetch)
14812 (uri (pypi-uri "ddt" version))
14813 (sha256
14814 (base32
14815 "1niqpzc26sxdbyi46r07n4pma5fjx6crww2539vpfmsf0w6yg585"))))
14816 (build-system python-build-system)
14817 (native-inputs
14818 `(("python-pytest" ,python-pytest)))
14819 (propagated-inputs
14820 `(("python-pyyaml" ,python-pyyaml)))
14821 (home-page "https://github.com/datadriventests/ddt")
14822 (synopsis "Data-Driven Tests")
14823 (description
14824 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14825 running it with different test data, and make it appear as multiple test
14826 cases.")
14827 (license license:expat)))
14828
14829 (define-public python-pycountry
14830 (package
14831 (name "python-pycountry")
14832 (version "18.5.26")
14833 (source
14834 (origin
14835 (method url-fetch)
14836 (uri (pypi-uri "pycountry" version))
14837 (sha256
14838 (base32
14839 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14840 (build-system python-build-system)
14841 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14842 (synopsis "ISO databases for languages, countries, currencies, etc.")
14843 (description
14844 "@code{pycountry} provides the ISO databases for the standards:
14845 @enumerate
14846 @item 639-3 (Languages)
14847 @item 3166 (Countries)
14848 @item 3166-3 (Deleted Countries)
14849 @item 3166-2 (Subdivisions of countries)
14850 @item 4217 (Currencies)
14851 @item 15924 (Scripts)
14852 @end enumerate
14853 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14854 through a Python API.")
14855 (license license:lgpl2.1+)))
14856
14857 (define-public python2-pycountry
14858 (package-with-python2 python-pycountry))
14859
14860 (define-public python-pycosat
14861 (package
14862 (name "python-pycosat")
14863 (version "0.6.3")
14864 (source
14865 (origin
14866 (method url-fetch)
14867 (uri (pypi-uri "pycosat" version ".zip"))
14868 (sha256
14869 (base32
14870 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14871 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14872 (build-system python-build-system)
14873 (native-inputs
14874 `(("unzip" ,unzip)))
14875 (home-page "https://github.com/ContinuumIO/pycosat")
14876 (synopsis "Bindings to picosat (a SAT solver)")
14877 (description
14878 "This package provides efficient Python bindings to @code{picosat} on
14879 the C level. When importing pycosat, the @code{picosat} solver becomes part
14880 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14881 Problem} (SAT) solver.")
14882 (license license:expat)))
14883
14884 (define-public python2-pycosat
14885 (package-with-python2 python-pycosat))
14886
14887 (define-public python2-ruamel.ordereddict
14888 (package
14889 (name "python2-ruamel.ordereddict")
14890 (version "0.4.9")
14891 (source
14892 (origin
14893 (method url-fetch)
14894 (uri (pypi-uri "ruamel.ordereddict" version))
14895 (sha256
14896 (base32
14897 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14898 (build-system python-build-system)
14899 (arguments
14900 `(#:python ,python-2
14901 #:phases
14902 (modify-phases %standard-phases
14903 (delete 'check)
14904 (add-after 'install 'check
14905 (lambda* (#:key inputs outputs #:allow-other-keys)
14906 (add-installed-pythonpath inputs outputs)
14907 (invoke "python" "test/testordereddict.py"))))))
14908 (home-page "https://bitbucket.org/ruamel/ordereddict")
14909 (synopsis "Version of dict that keeps keys in insertion order")
14910 (description
14911 "This is an implementation of an ordered dictionary with @dfn{Key
14912 Insertion Order} (KIO: updates of values do not affect the position of the
14913 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14914 removed and put at the back). The standard library module @code{OrderedDict},
14915 implemented later, implements a subset of @code{ordereddict} functionality.
14916 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14917 Order} (KSO, no sorting function can be specified, but a transform can be
14918 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14919 (license license:expat)))
14920
14921 (define-public python-pypeg2
14922 (package
14923 (name "python-pypeg2")
14924 (version "2.15.2")
14925 (source
14926 (origin
14927 (method url-fetch)
14928 (uri (pypi-uri "pyPEG2" version))
14929 (sha256
14930 (base32
14931 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14932 (build-system python-build-system)
14933 (propagated-inputs `(("python-lxml" ,python-lxml)))
14934 (arguments
14935 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14936 '(#:tests? #f))
14937 (home-page "https://fdik.org/pyPEG/")
14938 (synopsis "Parsering Expression Grammars in Python")
14939 (description "PyPEG is an intrinsic parser interpreter framework for
14940 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14941 parse many formal languages.")
14942 (license license:gpl2)))
14943
14944 (define-public python-incremental
14945 (package
14946 (name "python-incremental")
14947 (version "17.5.0")
14948 (source
14949 (origin
14950 (method url-fetch)
14951 (uri (pypi-uri "incremental" version))
14952 (sha256
14953 (base32
14954 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14955 (build-system python-build-system)
14956 (home-page "https://github.com/hawkowl/incremental")
14957 (synopsis "Library for versioning Python projects")
14958 (description "Incremental is a small library that versions your Python
14959 projects.")
14960 (license license:expat)))
14961
14962 (define-public python2-incremental
14963 (package-with-python2 python-incremental))
14964
14965 (define-public python-invoke
14966 (package
14967 (name "python-invoke")
14968 (home-page "https://www.pyinvoke.org/")
14969 (version "1.4.1")
14970 (source (origin
14971 (method url-fetch)
14972 (uri (pypi-uri "invoke" version))
14973 (sha256
14974 (base32
14975 "0pg1lpl4583z83i12262v72y1a4cxdcxi7vqhl8dpqv9wszj6gyy"))))
14976 (build-system python-build-system)
14977 (arguments
14978 ;; XXX: Requires many dependencies that are not yet in Guix.
14979 `(#:tests? #f))
14980 (synopsis "Pythonic task execution")
14981 (description
14982 "Invoke is a Python task execution tool and library, drawing inspiration
14983 from various sources to arrive at a powerful and clean feature set. It is
14984 evolved from the Fabric project, but focuses on local and abstract concerns
14985 instead of servers and network commands.")
14986 (license license:bsd-3)))
14987
14988 (define-public python2-invoke
14989 (package-with-python2 python-invoke))
14990
14991 (define-public python-automat
14992 (package
14993 (name "python-automat")
14994 (version "20.2.0")
14995 (source (origin
14996 (method url-fetch)
14997 (uri (pypi-uri "Automat" version))
14998 (sha256
14999 (base32
15000 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
15001 (build-system python-build-system)
15002 ;; We disable the tests because they require python-twisted, while
15003 ;; python-twisted depends on python-automat. Twisted is optional, but the
15004 ;; tests fail if it is not available. Also see
15005 ;; <https://github.com/glyph/automat/issues/71>.
15006 (arguments '(#:tests? #f))
15007 (native-inputs
15008 `(("python-m2r" ,python-m2r)
15009 ("python-setuptools-scm" ,python-setuptools-scm)
15010 ("python-graphviz" ,python-graphviz)))
15011 (propagated-inputs
15012 `(("python-six" ,python-six)
15013 ("python-attrs" ,python-attrs)))
15014 (home-page "https://github.com/glyph/Automat")
15015 (synopsis "Self-service finite-state machines")
15016 (description "Automat is a library for concise, idiomatic Python
15017 expression of finite-state automata (particularly deterministic finite-state
15018 transducers).")
15019 (license license:expat)))
15020
15021 (define-public python2-automat
15022 (package-with-python2 python-automat))
15023
15024 (define-public python-m2r
15025 (package
15026 (name "python-m2r")
15027 (version "0.2.1")
15028 (source (origin
15029 (method url-fetch)
15030 (uri (pypi-uri "m2r" version))
15031 (sha256
15032 (base32
15033 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
15034 (build-system python-build-system)
15035 (propagated-inputs
15036 `(("python-docutils" ,python-docutils)
15037 ("python-mistune" ,python-mistune)))
15038 (native-inputs
15039 `(("python-pygments" ,python-pygments)
15040 ("python-mock" ,python-mock)))
15041 (home-page "https://github.com/miyakogi/m2r")
15042 (synopsis "Markdown to reStructuredText converter")
15043 (description "M2R converts a markdown file including reST markups to valid
15044 reST format.")
15045 (license license:expat)))
15046
15047 (define-public python2-m2r
15048 (package-with-python2 python-m2r))
15049
15050 (define-public python-constantly
15051 (package
15052 (name "python-constantly")
15053 (version "15.1.0")
15054 (source (origin
15055 (method url-fetch)
15056 (uri (pypi-uri "constantly" version))
15057 (sha256
15058 (base32
15059 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
15060 (build-system python-build-system)
15061 (home-page "https://github.com/twisted/constantly")
15062 (synopsis "Symbolic constants in Python")
15063 (description "Constantly is a Python library that provides symbolic
15064 constant support. It includes collections and constants with text, numeric,
15065 and bit flag values.")
15066 (license license:expat)))
15067
15068 (define-public python2-constantly
15069 (package-with-python2 python-constantly))
15070
15071 (define-public python-attrs
15072 (package
15073 (name "python-attrs")
15074 (version "19.3.0")
15075 (source (origin
15076 (method url-fetch)
15077 (uri (pypi-uri "attrs" version))
15078 (sha256
15079 (base32
15080 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
15081 (build-system python-build-system)
15082 (arguments
15083 `(#:modules ((guix build utils)
15084 (guix build python-build-system)
15085 (ice-9 ftw)
15086 (srfi srfi-1)
15087 (srfi srfi-26))
15088 #:phases (modify-phases %standard-phases
15089 (replace 'check
15090 (lambda _
15091 (let ((cwd (getcwd)))
15092 (setenv "PYTHONPATH"
15093 (string-append
15094 cwd "/build/"
15095 (find (cut string-prefix? "lib" <>)
15096 (scandir (string-append cwd "/build")))
15097 ":"
15098 (getenv "PYTHONPATH")))
15099 (invoke "python" "-m" "pytest")))))))
15100 (native-inputs
15101 `(("python-coverage" ,python-coverage)
15102 ("python-hypothesis" ,python-hypothesis)
15103 ("python-pympler" ,python-pympler)
15104 ("python-pytest" ,python-pytest)
15105 ("python-six" ,python-six)
15106 ("python-sphinx" ,python-sphinx)
15107 ("python-zope-interface" ,python-zope-interface)))
15108 (home-page "https://github.com/python-attrs/attrs/")
15109 (synopsis "Attributes without boilerplate")
15110 (description "@code{attrs} is a Python package with class decorators that
15111 ease the chores of implementing the most common attribute-related object
15112 protocols.")
15113 (license license:expat)))
15114
15115 (define-public python2-attrs
15116 (package-with-python2 python-attrs))
15117
15118 (define-public python-attrs-bootstrap
15119 (package
15120 (inherit python-attrs)
15121 (name "python-attrs-bootstrap")
15122 (native-inputs `())
15123 (arguments `(#:tests? #f))))
15124
15125 (define-public python2-attrs-bootstrap
15126 (package-with-python2 python-attrs-bootstrap))
15127
15128 (define-public python2-cliapp
15129 (package
15130 (name "python2-cliapp")
15131 (version "1.20180812.1")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (string-append
15136 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
15137 version ".tar.gz"))
15138 (sha256
15139 (base32
15140 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
15141 (build-system python-build-system)
15142 (arguments
15143 `(#:python ,python-2
15144 #:phases
15145 (modify-phases %standard-phases
15146 ;; check phase needs to be run before the build phase. If not,
15147 ;; coverage-test-runner looks for tests for the built source files,
15148 ;; and fails.
15149 (delete 'check)
15150 (add-before 'build 'check
15151 (lambda _
15152 ;; Disable python3 tests
15153 (substitute* "check"
15154 (("python3") "# python3"))
15155 (invoke "./check"))))))
15156 (native-inputs
15157 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15158 ("python2-pep8" ,python2-pep8)))
15159 (propagated-inputs
15160 `(("python2-pyaml" ,python2-pyaml)))
15161 (home-page "https://liw.fi/cliapp/")
15162 (synopsis "Python framework for command line programs")
15163 (description "@code{python2-cliapp} is a python framework for
15164 command line programs. It contains the typical stuff such programs
15165 need to do, such as parsing the command line for options, and
15166 iterating over input files.")
15167 (license license:gpl2+)))
15168
15169 (define-public python2-ttystatus
15170 (package
15171 (name "python2-ttystatus")
15172 (version "0.38")
15173 (source
15174 (origin
15175 (method git-fetch)
15176 (uri (git-reference
15177 (url "http://git.liw.fi/ttystatus")
15178 ;; There are no tags after ttystatus-0.36.
15179 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
15180 (sha256
15181 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
15182 (file-name (git-file-name name version))))
15183 (build-system python-build-system)
15184 (native-inputs
15185 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
15186 ("python2-pep8" ,python2-pep8)))
15187 (arguments
15188 `(#:python ,python-2
15189 #:phases
15190 (modify-phases %standard-phases
15191 ;; check phase needs to be run before the build phase. If not,
15192 ;; coverage-test-runner looks for tests for the built source files,
15193 ;; and fails.
15194 (delete 'check)
15195 (add-before 'build 'check
15196 (lambda _ (invoke "make" "check"))))))
15197 (home-page "https://liw.fi/ttystatus/")
15198 (synopsis "Python library for showing progress reporting and
15199 status updates on terminals")
15200 (description "@code{python2-ttystatus} is a python library for
15201 showing progress reporting and status updates on terminals, for
15202 command line programs. Output is automatically adapted to the width
15203 of the terminal: truncated if it does not fit, and resized if the
15204 terminal size changes.")
15205 (license license:gpl3+)))
15206
15207 (define-public python2-tracing
15208 (package
15209 (name "python2-tracing")
15210 (version "0.10")
15211 (source
15212 (origin
15213 (method url-fetch)
15214 (uri (string-append
15215 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
15216 version ".tar.gz"))
15217 (sha256
15218 (base32
15219 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
15220 (build-system python-build-system)
15221 (arguments
15222 `(#:python ,python-2))
15223 (home-page "https://liw.fi/tracing/")
15224 (synopsis "Python debug logging helper")
15225 (description "@code{python2-tracing} is a python library for
15226 logging debug messages. It provides a way to turn debugging messages
15227 on and off, based on the filename they occur in. It is much faster
15228 than using @code{logging.Filter} to accomplish the same thing, which
15229 matters when code is run in production mode. The actual logging still
15230 happens using the @code{logging} library.")
15231 (license license:gpl3+)))
15232
15233 (define-public python2-larch
15234 (package
15235 (name "python2-larch")
15236 (version "1.20151025")
15237 (source
15238 (origin
15239 (method url-fetch)
15240 (uri (string-append
15241 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
15242 version ".tar.gz"))
15243 (patches (search-patches
15244 "python2-larch-coverage-4.0a6-compatibility.patch"))
15245 (sha256
15246 (base32
15247 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
15248 (build-system python-build-system)
15249 (arguments
15250 `(#:python ,python-2
15251 #:phases
15252 (modify-phases %standard-phases
15253 ;; check phase needs to be run before the build phase. If not,
15254 ;; coverage-test-runner looks for tests for the built source files,
15255 ;; and fails.
15256 (delete 'check)
15257 (add-before 'build 'check
15258 (lambda _ (invoke "make" "check"))))))
15259 (native-inputs
15260 `(("cmdtest" ,cmdtest)
15261 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
15262 (propagated-inputs
15263 `(("python2-tracing" ,python2-tracing)))
15264 (home-page "https://liw.fi/larch/")
15265 (synopsis "Python copy-on-write B-tree library")
15266 (description "@code{python2-larch} is an implementation of
15267 particular kind of B-tree, based on research by Ohad Rodeh. See
15268 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15269 on the data structure.
15270
15271 The distinctive feature of this B-tree is that a node is never
15272 (conceptually) modified. Instead, all updates are done by
15273 copy-on-write. This makes it easy to clone a tree, and modify only the
15274 clone, while other processes access the original tree.")
15275 (license license:gpl3+)))
15276
15277 (define-public python-astroid
15278 (package
15279 (name "python-astroid")
15280 (version "2.4.2")
15281 (source
15282 (origin
15283 (method url-fetch)
15284 (uri (pypi-uri "astroid" version))
15285 (sha256
15286 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15287 (modules '((guix build utils)))
15288 (snippet
15289 '(begin
15290 ;; Check to see if the version pinning has been removed.
15291 (substitute* "astroid/__pkginfo__.py"
15292 (("==1\\.4\\.\\*") ">=1.4.0"))
15293 #t))))
15294 (build-system python-build-system)
15295 (propagated-inputs
15296 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15297 ("python-six" ,python-six)
15298 ("python-wrapt" ,python-wrapt)))
15299 (native-inputs
15300 `(("python-dateutil" ,python-dateutil)
15301 ("python-pytest" ,python-pytest)
15302 ("python-pytest-runner" ,python-pytest-runner)))
15303 (home-page "https://github.com/PyCQA/astroid")
15304 (synopsis "Common base representation of python source code for pylint and
15305 other projects")
15306 (description "@code{python-astroid} provides a common base representation
15307 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15308
15309 It provides a compatible representation which comes from the _ast module. It
15310 rebuilds the tree generated by the builtin _ast module by recursively walking
15311 down the AST and building an extended ast. The new node classes have
15312 additional methods and attributes for different usages. They include some
15313 support for static inference and local name scopes. Furthermore, astroid
15314 builds partial trees by inspecting living objects.")
15315 (license license:lgpl2.1+)
15316 (properties `((python2-variant . ,(delay python2-astroid))))))
15317
15318 (define-public python2-astroid
15319 (let ((base (package-with-python2
15320 (strip-python2-variant python-astroid))))
15321 (package (inherit base)
15322 ;; Version 2.x removes python2 support.
15323 (version "1.6.5")
15324 (source
15325 (origin
15326 (method url-fetch)
15327 (uri (pypi-uri "astroid" version))
15328 (sha256
15329 (base32
15330 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15331 (arguments
15332 (substitute-keyword-arguments (package-arguments base)
15333 ((#:phases phases)
15334 `(modify-phases ,phases
15335 (add-after 'unpack 'remove-spurious-test
15336 (lambda _
15337 ;; https://github.com/PyCQA/astroid/issues/276
15338 (delete-file "astroid/tests/unittest_brain.py")
15339 #t))
15340 (replace 'check
15341 (lambda _
15342 (invoke"python" "-m" "unittest" "discover"
15343 "-p" "unittest*.py")))))))
15344 (native-inputs `())
15345 (propagated-inputs
15346 `(("python2-backports-functools-lru-cache"
15347 ,python2-backports-functools-lru-cache)
15348 ("python2-enum34" ,python2-enum34)
15349 ("python2-singledispatch" ,python2-singledispatch)
15350 ,@(alist-delete "python-typed-ast"
15351 (package-propagated-inputs base)))))))
15352
15353 (define-public python-isbnlib
15354 (package
15355 (name "python-isbnlib")
15356 (version "3.10.3")
15357 (source
15358 (origin
15359 (method url-fetch)
15360 (uri (pypi-uri "isbnlib" version))
15361 (sha256
15362 (base32
15363 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15364 (build-system python-build-system)
15365 (arguments '(#:tests? #f)) ; No test
15366 (home-page "https://github.com/xlcnd/isbnlib")
15367 (synopsis "Python library to work with ISBN strings")
15368 (description "@code{python-isbnlib} is a (pure) python library that provides
15369 several useful methods and functions to validate, clean, transform, hyphenate and
15370 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15371 version, is suitable to be include as a dependency in other projects.")
15372 (license license:lgpl3+)))
15373
15374 (define-public python-isort
15375 (package
15376 (name "python-isort")
15377 (version "4.3.4")
15378 (source
15379 (origin
15380 (method git-fetch)
15381 (uri (git-reference
15382 ;; Tests pass only from the Github sources
15383 (url "https://github.com/timothycrosley/isort")
15384 (commit version)))
15385 (file-name (git-file-name name version))
15386 (sha256
15387 (base32
15388 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15389 (build-system python-build-system)
15390 (native-inputs
15391 `(("python-mock" ,python-mock)
15392 ("python-pytest" ,python-pytest)))
15393 (home-page "https://github.com/timothycrosley/isort")
15394 (synopsis "Python utility/library to sort python imports")
15395 (description "@code{python-isort} is a python utility/library to sort
15396 imports alphabetically, and automatically separated into sections. It
15397 provides a command line utility, a python library and plugins for various
15398 editors.")
15399 (license license:expat)
15400 (properties `((python2-variant . ,(delay python2-isort))))))
15401
15402 (define-public python2-isort
15403 (let ((base (package-with-python2
15404 (strip-python2-variant python-isort))))
15405 (package (inherit base)
15406 (native-inputs
15407 `(("python2-futures" ,python2-futures)
15408 ,@(package-native-inputs base))))))
15409
15410 (define-public python2-backports-functools-lru-cache
15411 (package
15412 (name "python2-backports-functools-lru-cache")
15413 (version "1.6.1")
15414 (source
15415 (origin
15416 (method url-fetch)
15417 ;; only the pypi tarballs contain the necessary metadata
15418 (uri (pypi-uri "backports.functools_lru_cache" version))
15419 (sha256
15420 (base32
15421 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15422 (build-system python-build-system)
15423 (native-inputs
15424 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15425 (arguments
15426 `(#:python ,python-2))
15427 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15428 (synopsis "Backport of functools.lru_cache from Python 3.3")
15429 (description "@code{python2-backports-functools-lru-cache} is a backport
15430 of @code{functools.lru_cache} from python 3.3.")
15431 (license license:expat)))
15432
15433 (define-public python-configparser
15434 (package
15435 (name "python-configparser")
15436 (version "4.0.2")
15437 (source
15438 (origin
15439 (method url-fetch)
15440 (uri (pypi-uri "configparser" version))
15441 (sha256
15442 (base32
15443 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15444 (native-inputs
15445 `(("python-setuptools_scm" ,python-setuptools-scm)))
15446 (build-system python-build-system)
15447 (home-page "https://github.com/jaraco/configparser/")
15448 (synopsis "Backport of configparser from python 3.5")
15449 (description "@code{python-configparser} is a backport of
15450 @code{configparser} from Python 3.5 so that it can be used directly
15451 in other versions.")
15452 (license license:expat)))
15453
15454 (define-public python2-configparser
15455 (package-with-python2 python-configparser))
15456
15457 (define-public python-mamba
15458 (package
15459 (name "python-mamba")
15460 (version "0.11.1")
15461 (source (origin
15462 (method url-fetch)
15463 (uri (pypi-uri "mamba" version))
15464 (sha256
15465 (base32
15466 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15467 (build-system python-build-system)
15468 (arguments `(#:tests? #f)) ; No test
15469 (propagated-inputs
15470 `(("python-clint" ,python-clint)
15471 ("python-coverage" ,python-coverage)))
15472 (home-page "https://nestorsalceda.com/mamba/")
15473 (synopsis "Test runner for Python")
15474 (description
15475 "Mamba is a Behaviour-Driven Development tool for Python developers.
15476 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15477 (license license:expat)))
15478
15479 (define-public python-mando
15480 (package
15481 (name "python-mando")
15482 (version "0.6.4")
15483 (source (origin
15484 (method url-fetch)
15485 (uri (pypi-uri "mando" version))
15486 (sha256
15487 (base32
15488 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15489 (build-system python-build-system)
15490 (propagated-inputs
15491 `(("python-rst2ansi" ,python-rst2ansi)
15492 ("python-six" ,python-six)))
15493 (native-inputs
15494 `(("python-pytest" ,python-pytest)))
15495 (home-page "https://mando.readthedocs.org/")
15496 (synopsis
15497 "Wrapper around argparse, allowing creation of complete CLI applications")
15498 (description
15499 "This package is a wrapper around argparse, allowing you to write complete CLI
15500 applications in seconds while maintaining all the flexibility.")
15501 (license license:expat)))
15502
15503 (define-public python2-mando
15504 (package-with-python2 python-mando))
15505
15506 (define-public python2-argparse
15507 (package
15508 (name "python2-argparse")
15509 (version "1.4.0")
15510 (source
15511 (origin
15512 (method url-fetch)
15513 (uri (pypi-uri "argparse" version))
15514 (sha256
15515 (base32
15516 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15517 (build-system python-build-system)
15518 (arguments
15519 `(#:python ,python-2))
15520 (home-page "https://github.com/ThomasWaldmann/argparse/")
15521 (synopsis "Python command-line parsing library")
15522 (description
15523 "This package is mostly for people who want to have @code{argparse} on
15524 older Pythons because it was not part of the standard library back then.")
15525 (license license:psfl)))
15526
15527 (define-public python-fudge
15528 (package
15529 (name "python-fudge")
15530 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15531 ;; package, which is currently the only use of this package.
15532 (version "0.9.6")
15533 (source
15534 (origin
15535 (method url-fetch)
15536 (uri (pypi-uri "fudge" version))
15537 (sha256
15538 (base32
15539 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15540 (build-system python-build-system)
15541 (arguments
15542 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15543 (home-page "https://github.com/fudge-py/fudge")
15544 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15545 (description
15546 "Fudge is a Python module for using fake objects (mocks and stubs) to
15547 test real ones.
15548
15549 In readable Python code, you declare the methods available on your fake object
15550 and how they should be called. Then you inject that into your application and
15551 start testing. This declarative approach means you don’t have to record and
15552 playback actions and you don’t have to inspect your fakes after running code.
15553 If the fake object was used incorrectly then you’ll see an informative
15554 exception message with a traceback that points to the culprit.")
15555 (license license:expat)))
15556
15557 (define-public python2-fudge
15558 (package-with-python2 python-fudge))
15559
15560 (define-public python-mwclient
15561 (package
15562 (name "python-mwclient")
15563 (version "0.10.1")
15564 (source
15565 (origin
15566 (method git-fetch)
15567 ;; The PyPI version wouldn't contain tests.
15568 (uri (git-reference
15569 (url "https://github.com/mwclient/mwclient")
15570 (commit (string-append "v" version))))
15571 (file-name (git-file-name name version))
15572 (sha256
15573 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15574 (build-system python-build-system)
15575 (propagated-inputs
15576 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15577 ("python-six" ,python-six)))
15578 (native-inputs
15579 `(("python-mock" ,python-mock)
15580 ("python-pytest" ,python-pytest)
15581 ("python-pytest-cov" ,python-pytest-cov)
15582 ("python-pytest-runner" ,python-pytest-runner)
15583 ("python-responses" ,python-responses)))
15584 (home-page "https://github.com/btongminh/mwclient")
15585 (synopsis "MediaWiki API client")
15586 (description "This package provides a MediaWiki API client.")
15587 (license license:expat)))
15588
15589 (define-public python2-mwclient
15590 (package-with-python2 python-mwclient))
15591
15592 (define-public python-utils
15593 (package
15594 (name "python-utils")
15595 (version "2.4.0")
15596 (source (origin
15597 (method url-fetch)
15598 (uri (pypi-uri "python-utils" version))
15599 (sha256
15600 (base32
15601 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15602 (build-system python-build-system)
15603 (arguments
15604 `(#:phases
15605 (modify-phases %standard-phases
15606 (replace 'check
15607 (lambda* (#:key inputs outputs #:allow-other-keys)
15608 (add-installed-pythonpath inputs outputs)
15609 (delete-file "pytest.ini")
15610 (invoke "pytest" "-vv"))))))
15611 (native-inputs
15612 `(("pytest-runner" ,python-pytest-runner)
15613 ("pytest" ,python-pytest)
15614 ("six" ,python-six)))
15615 (home-page "https://github.com/WoLpH/python-utils")
15616 (synopsis "Convenient utilities not included with the standard Python install")
15617 (description
15618 "Python Utils is a collection of small Python functions and classes which
15619 make common patterns shorter and easier.")
15620 (license license:bsd-2)))
15621
15622 (define-public python2-utils
15623 (package-with-python2 python-utils))
15624
15625 (define-public python-diff-match-patch
15626 (package
15627 (name "python-diff-match-patch")
15628 (version "20121119")
15629 (source
15630 (origin
15631 (method url-fetch)
15632 (uri (pypi-uri "diff-match-patch" version))
15633 (sha256
15634 (base32
15635 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15636 (build-system python-build-system)
15637 (home-page "https://code.google.com/p/google-diff-match-patch")
15638 (synopsis "Synchronize plain text")
15639 (description "Diff Match and Patch libraries offer robust algorithms to
15640 perform the operations required for synchronizing plain text.")
15641 (license license:asl2.0)))
15642
15643 (define-public python2-diff-match-patch
15644 (package-with-python2 python-diff-match-patch))
15645
15646 (define-public python-dirsync
15647 (package
15648 (name "python-dirsync")
15649 (version "2.2.5")
15650 (source
15651 (origin
15652 (method url-fetch)
15653 (uri (pypi-uri "dirsync" version))
15654 (sha256
15655 (base32
15656 "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
15657 (build-system python-build-system)
15658 (propagated-inputs
15659 `(("six" ,python-six)))
15660 (home-page "https://github.com/tkhyn/dirsync")
15661 (synopsis "Advanced directory tree synchronisation tool")
15662 (description "Advanced directory tree synchronisation tool.")
15663 (license license:expat)))
15664
15665 (define-public python2-dirsync
15666 (package-with-python2 python-dirsync))
15667
15668 (define-public python-levenshtein
15669 (package
15670 (name "python-levenshtein")
15671 (version "0.12.0")
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "python-Levenshtein" version))
15676 (sha256
15677 (base32
15678 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15679 (build-system python-build-system)
15680 (home-page "https://github.com/ztane/python-Levenshtein")
15681 (synopsis "Fast computation of Levenshtein distance and string similarity")
15682 (description
15683 "The Levenshtein Python C extension module contains functions for fast computation of
15684 @enumerate
15685 @item Levenshtein (edit) distance, and edit operations
15686 @item string similarity
15687 @item approximate median strings, and generally string averaging
15688 @item string sequence and set similarity
15689 @end enumerate
15690 It supports both normal and Unicode strings.")
15691 (license license:gpl2+)))
15692
15693 (define-public python2-levenshtein
15694 (package-with-python2 python-levenshtein))
15695
15696 (define-public python-scandir
15697 (package
15698 (name "python-scandir")
15699 (version "1.10.0")
15700 (source
15701 (origin
15702 (method url-fetch)
15703 (uri (pypi-uri "scandir" version))
15704 (sha256
15705 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15706 (build-system python-build-system)
15707 (arguments
15708 `(#:phases (modify-phases %standard-phases
15709 (replace 'check
15710 (lambda _
15711 (invoke "python" "test/run_tests.py"))))))
15712 (home-page "https://github.com/benhoyt/scandir")
15713 (synopsis "Directory iteration function")
15714 (description
15715 "Directory iteration function like os.listdir(), except that instead of
15716 returning a list of bare filenames, it yields DirEntry objects that include
15717 file type and stat information along with the name. Using scandir() increases
15718 the speed of os.walk() by 2-20 times (depending on the platform and file
15719 system) by avoiding unnecessary calls to os.stat() in most cases.
15720
15721 This package is part of the Python standard library since version 3.5.")
15722 (license license:bsd-3)))
15723
15724 (define-public python2-scandir
15725 (package-with-python2 python-scandir))
15726
15727 (define-public python2-stemming
15728 (package
15729 (name "python2-stemming")
15730 (version "1.0.1")
15731 (source
15732 (origin
15733 (method url-fetch)
15734 (uri (pypi-uri "stemming" version))
15735 (sha256
15736 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15737 (build-system python-build-system)
15738 (arguments
15739 `(#:python ,python-2))
15740 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15741 (synopsis "Python implementations of various stemming algorithms")
15742 (description
15743 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15744 stemming algorithms for English. These implementations are straightforward and
15745 efficient, unlike some Python versions of the same algorithms available on the
15746 Web. This package is an extraction of the stemming code included in the Whoosh
15747 search engine.")
15748 (license license:public-domain)))
15749
15750 (define-public python-factory-boy
15751 (package
15752 (name "python-factory-boy")
15753 (version "2.8.1")
15754 (source
15755 (origin
15756 (method url-fetch)
15757 (uri (pypi-uri "factory_boy" version))
15758 (sha256
15759 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15760 (build-system python-build-system)
15761 (arguments
15762 ;; Tests are not included in the tarball.
15763 `(#:tests? #f))
15764 (propagated-inputs
15765 `(("faker" ,python-faker)))
15766 (home-page "https://github.com/benhoyt/scandir")
15767 (synopsis "Versatile test fixtures replacement")
15768 (description
15769 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15770
15771 As a fixtures replacement tool, it aims to replace static, hard to maintain
15772 fixtures with easy-to-use factories for complex object.
15773
15774 Instead of building an exhaustive test setup with every possible combination
15775 of corner cases, factory_boy allows you to use objects customized for the
15776 current test, while only declaring the test-specific fields")
15777 (license license:expat)))
15778
15779 (define-public python2-factory-boy
15780 (package-with-python2 python-factory-boy))
15781
15782 (define-public python-translate-toolkit
15783 (package
15784 (name "python-translate-toolkit")
15785 (version "2.1.0")
15786 (source
15787 (origin
15788 (method url-fetch)
15789 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15790 (sha256
15791 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15792 (build-system python-build-system)
15793 (native-inputs
15794 `(("python-pytest" ,python-pytest)
15795 ("python-sphinx" ,python-sphinx)))
15796 (propagated-inputs
15797 `(("python-babel" ,python-babel)
15798 ("python-beautifulsoup4" ,python-beautifulsoup4)
15799 ("python-chardet" ,python-chardet)
15800 ("python-diff-match-patch" ,python-diff-match-patch)
15801 ("python-levenshtein" ,python-levenshtein)
15802 ("python-lxml" ,python-lxml)
15803 ("python-six" ,python-six)
15804 ("python-vobject" ,python-vobject)
15805 ("python-pyyaml" ,python-pyyaml)))
15806 (arguments
15807 ;; TODO: tests are not run, because they end with
15808 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15809 ;; 'parse_funcs'
15810 ;; during test setup.
15811 `(#:tests? #f))
15812 (home-page "https://toolkit.translatehouse.org")
15813 (synopsis "Tools and API for translation and localization engineering")
15814 (description
15815 "Tools and API for translation and localization engineering. It contains
15816 several utilities, as well as an API for building localization tools.")
15817 (license license:gpl2+)))
15818
15819 (define-public python2-translate-toolkit
15820 (package-with-python2 python-translate-toolkit))
15821
15822 (define-public python-packaging
15823 (package
15824 (name "python-packaging")
15825 (version "20.0")
15826 (source
15827 (origin
15828 (method url-fetch)
15829 (uri (pypi-uri "packaging" version))
15830 ;; XXX: The URL in the patch file is wrong, it should be
15831 ;; <https://github.com/pypa/packaging/pull/256>.
15832 (patches (search-patches "python-packaging-test-arch.patch"))
15833 (sha256
15834 (base32
15835 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15836 (build-system python-build-system)
15837 (arguments
15838 `(#:phases (modify-phases %standard-phases
15839 (replace 'check
15840 (lambda* (#:key tests? #:allow-other-keys)
15841 (if tests?
15842 (invoke "py.test" "-vv")
15843 (format #t "test suite not run~%"))
15844 #t)))))
15845 (native-inputs
15846 `(("python-pretend" ,python-pretend)
15847 ("python-pytest" ,python-pytest)))
15848 (propagated-inputs
15849 `(("python-pyparsing" ,python-pyparsing)
15850 ("python-six" ,python-six)))
15851 (home-page "https://github.com/pypa/packaging")
15852 (synopsis "Core utilities for Python packages")
15853 (description "Packaging is a Python module for dealing with Python packages.
15854 It offers an interface for working with package versions, names, and dependency
15855 information.")
15856 ;; From 'LICENSE': This software is made available under the terms of
15857 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15858 ;; Contributions to this software is made under the terms of *both* these
15859 ;; licenses.
15860 (license (list license:asl2.0 license:bsd-2))))
15861
15862 (define-public python2-packaging
15863 (package-with-python2 python-packaging))
15864
15865 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15866 (define-public python-packaging-bootstrap
15867 (hidden-package
15868 (package/inherit
15869 python-packaging
15870 (name "python-packaging-bootstrap")
15871 (native-inputs '())
15872 (propagated-inputs
15873 `(("python-pyparsing" ,python-pyparsing)))
15874 (arguments '(#:tests? #f)))))
15875
15876 (define-public python2-packaging-bootstrap
15877 (hidden-package
15878 (package/inherit
15879 python2-packaging
15880 (name "python2-packaging-bootstrap")
15881 (native-inputs '())
15882 (propagated-inputs
15883 `(("python-pyparsing" ,python2-pyparsing)))
15884 (arguments
15885 `(#:tests? #f
15886 ,@(package-arguments python2-packaging))))))
15887
15888 (define-public python-relatorio
15889 (package
15890 (name "python-relatorio")
15891 (version "0.8.0")
15892 (source
15893 (origin
15894 (method url-fetch)
15895 (uri (pypi-uri "relatorio" version))
15896 (sha256
15897 (base32
15898 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15899 (build-system python-build-system)
15900 (propagated-inputs
15901 `(("python-lxml" ,python-lxml)
15902 ("python-genshi" ,python-genshi)))
15903 (native-inputs
15904 `(("python-magic" ,python-magic)))
15905 (home-page "https://relatorio.tryton.org/")
15906 (synopsis "Templating library able to output ODT and PDF files")
15907 (description "Relatorio is a templating library which provides a way to
15908 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15909 for more filetypes can be easily added by creating plugins for them.")
15910 (license license:gpl3+)))
15911
15912 (define-public python2-relatorio
15913 (package-with-python2 python-relatorio))
15914
15915 (define-public python-radon
15916 (package
15917 (name "python-radon")
15918 (version "4.1.0")
15919 (source
15920 (origin
15921 (method url-fetch)
15922 (uri (pypi-uri "radon" version))
15923 (sha256
15924 (base32
15925 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15926 (build-system python-build-system)
15927 (arguments
15928 `(#:phases (modify-phases %standard-phases
15929 (replace 'check
15930 (lambda _
15931 (invoke "python" "radon/tests/run.py"))))))
15932 (propagated-inputs
15933 `(("python-colorama" ,python-colorama)
15934 ("python-flake8-polyfill" ,python-flake8-polyfill)
15935 ("python-mando" ,python-mando)))
15936 (native-inputs
15937 `(("python-pytest" ,python-pytest)
15938 ("python-pytest-mock" ,python-pytest-mock)))
15939 (home-page "https://radon.readthedocs.org/")
15940 (synopsis "Code Metrics in Python")
15941 (description "Radon is a Python tool which computes various code metrics.
15942 Supported metrics are:
15943 @itemize @bullet
15944 @item raw metrics: SLOC, comment lines, blank lines, &c.
15945 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15946 @item Halstead metrics (all of them)
15947 @item the Maintainability Index (a Visual Studio metric)
15948 @end itemize")
15949 (properties `((python2-variant . ,(delay python2-radon))))
15950 (license license:expat)))
15951
15952 (define-public python2-radon
15953 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15954 (package
15955 (inherit base)
15956 (propagated-inputs
15957 `(("python-configparser" ,python2-configparser)
15958 ("python-future" ,python2-future)
15959 ,@(package-propagated-inputs base))))))
15960
15961 (define-public python-sure
15962 (package
15963 (name "python-sure")
15964 (version "1.4.11")
15965 (source
15966 (origin
15967 (method url-fetch)
15968 (uri (pypi-uri "sure" version))
15969 (sha256
15970 (base32
15971 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15972 (build-system python-build-system)
15973 (propagated-inputs
15974 `(("python-mock" ,python-mock)
15975 ("python-six" ,python-six)))
15976 (native-inputs
15977 `(("python-nose" ,python-nose)))
15978 (home-page "https://github.com/gabrielfalcao/sure")
15979 (synopsis "Automated testing library in python for python")
15980 (description
15981 "Sure is a python library that leverages a DSL for writing assertions.
15982 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15983 (license license:gpl3+)))
15984
15985 (define-public python2-sure
15986 (package-with-python2 python-sure))
15987
15988 (define-public python2-couleur
15989 ;; This package does not seem to support python3 at all, hence,
15990 ;; only the python2 variant definition is provided.
15991 (package
15992 (name "python2-couleur")
15993 (version "0.6.2")
15994 (source
15995 (origin
15996 (method url-fetch)
15997 (uri (pypi-uri "couleur" version))
15998 (sha256
15999 (base32
16000 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
16001 (build-system python-build-system)
16002 (arguments
16003 `(#:python ,python-2))
16004 (home-page "https://github.com/gabrielfalcao/couleur")
16005 (synopsis
16006 "ANSI terminal tool for python, colored shell and other handy fancy features")
16007 (description
16008 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
16009 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
16010 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
16011 ;; https://github.com/gabrielfalcao/couleur/issues/11
16012 (license license:lgpl3+)))
16013
16014 (define-public python-misaka
16015 (package
16016 (name "python-misaka")
16017 (version "2.1.1")
16018 (source
16019 (origin
16020 (method url-fetch)
16021 (uri (pypi-uri "misaka" version))
16022 (sha256
16023 (base32
16024 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
16025 (build-system python-build-system)
16026 (arguments
16027 `(;; Line 37 of setup.py calls self.run_command('develop')
16028 ;; in the 'check' phase. This command seems to be trying
16029 ;; to write to
16030 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
16031 ;; for which it does not have the permission to write.
16032 #:tests? #f))
16033 (propagated-inputs
16034 `(("python-cffi" ,python-cffi)))
16035 (home-page "https://github.com/FSX/misaka")
16036 (synopsis "Python binding for Hoedown")
16037 (description
16038 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
16039 library written in C. It features a fast HTML renderer and functionality to make custom
16040 renderers (e.g. man pages or LaTeX).")
16041 (license license:expat)))
16042
16043 (define-public python2-misaka
16044 (package-with-python2 python-misaka))
16045
16046 (define-public python2-steadymark
16047 ;; This is forced into being a python2 only variant
16048 ;; due to its dependence on couleur that has no support
16049 ;; for python3
16050 (package
16051 (name "python2-steadymark")
16052 (version "0.7.3")
16053 (source
16054 (origin
16055 (method url-fetch)
16056 (uri (pypi-uri "steadymark" version))
16057 (sha256
16058 (base32
16059 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
16060 (build-system python-build-system)
16061 (native-inputs
16062 `(("python-couleur" ,python2-couleur)
16063 ("python-sure" ,python2-sure)
16064 ("python-misaka" ,python2-misaka)))
16065 (arguments
16066 `(#:python ,python-2
16067 #:phases
16068 (modify-phases %standard-phases
16069 (add-before 'build 'patch-setup-py
16070 (lambda _
16071 ;; Update requirements from dependency==version
16072 ;; to dependency>=version
16073 (substitute* "setup.py"
16074 (("==") ">="))
16075 #t)))))
16076 (home-page "https://github.com/gabrielfalcao/steadymark")
16077 (synopsis "Markdown-based test runner for python")
16078 (description
16079 "@code{Steadymark} allows documentation to be written in github-flavoured
16080 markdown. The documentation may contain snippets of code surrounded by python
16081 code blocks and @code{Steadymark} will find these snippets and run them, making
16082 sure that there are no old malfunctional examples in the documentation examples.")
16083 (license license:expat)))
16084
16085 (define-public python-jsonpointer
16086 (package
16087 (name "python-jsonpointer")
16088 (version "1.10")
16089 (source
16090 (origin
16091 (method url-fetch)
16092 (uri (pypi-uri "jsonpointer" version))
16093 (sha256
16094 (base32
16095 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
16096 (build-system python-build-system)
16097 (home-page "https://github.com/stefankoegl/python-json-pointer")
16098 (synopsis "Identify specific nodes in a JSON document")
16099 (description "@code{jsonpointer} allows you to access specific nodes
16100 by path in a JSON document (see RFC 6901).")
16101 (license license:bsd-3)))
16102
16103 (define-public python2-jsonpointer
16104 (package-with-python2 python-jsonpointer))
16105
16106 (define-public python-jsonpatch
16107 (package
16108 (name "python-jsonpatch")
16109 (version "1.16")
16110 (source
16111 (origin
16112 (method git-fetch)
16113 ;; pypi version lacks tests.js
16114 (uri (git-reference
16115 (url "https://github.com/stefankoegl/python-json-patch")
16116 (commit (string-append "v" version))))
16117 (file-name (git-file-name name version))
16118 (sha256
16119 (base32
16120 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
16121 (build-system python-build-system)
16122 (propagated-inputs
16123 `(("python-jsonpointer" ,python-jsonpointer)))
16124 (home-page "https://github.com/stefankoegl/python-json-patch")
16125 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
16126 (description "@code{jsonpatch} is a library and program that allows
16127 applying JSON Patches according to RFC 6902.")
16128 (license license:bsd-3)))
16129
16130 (define-public python2-jsonpatch
16131 (package-with-python2 python-jsonpatch))
16132
16133 (define-public python-jsonpatch-0.4
16134 (package (inherit python-jsonpatch)
16135 (name "python-jsonpatch")
16136 (version "0.4")
16137 (source
16138 (origin
16139 (method git-fetch)
16140 (uri (git-reference
16141 (url "https://github.com/stefankoegl/python-json-patch")
16142 (commit (string-append "v" version))))
16143 (file-name (git-file-name name version))
16144 (sha256
16145 (base32
16146 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
16147
16148 (define-public python2-jsonpatch-0.4
16149 (package-with-python2 python-jsonpatch-0.4))
16150
16151 (define-public python-rfc3986
16152 (package
16153 (name "python-rfc3986")
16154 (version "1.4.0")
16155 (source (origin
16156 (method url-fetch)
16157 (uri (pypi-uri "rfc3986" version))
16158 (sha256
16159 (base32
16160 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
16161 (build-system python-build-system)
16162 (arguments
16163 `(#:modules ((guix build utils)
16164 (guix build python-build-system)
16165 (ice-9 ftw)
16166 (srfi srfi-1)
16167 (srfi srfi-26))
16168 #:phases
16169 (modify-phases %standard-phases
16170 (replace 'check
16171 (lambda _
16172 (let ((cwd (getcwd)))
16173 (setenv "PYTHONPATH"
16174 (string-append cwd "/build/"
16175 (find (cut string-prefix? "lib" <>)
16176 (scandir (string-append cwd "/build")))
16177 ":"
16178 (getenv "PYTHONPATH")))
16179 (invoke "pytest" "-v")))))))
16180 (native-inputs
16181 `(("python-pytest" ,python-pytest)))
16182 (home-page "https://rfc3986.readthedocs.io/")
16183 (synopsis "Parse and validate URI references")
16184 (description
16185 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
16186 validation and authority parsing. This module also supports RFC@tie{}6874
16187 which adds support for zone identifiers to IPv6 addresses.")
16188 (license license:asl2.0)))
16189
16190 (define-public python2-rfc3986
16191 (package-with-python2 python-rfc3986))
16192
16193 (define-public python-rfc3987
16194 (package
16195 (name "python-rfc3987")
16196 (version "1.3.7")
16197 (source
16198 (origin
16199 (method url-fetch)
16200 (uri (pypi-uri "rfc3987" version))
16201 (sha256
16202 (base32
16203 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
16204 (build-system python-build-system)
16205 (home-page "https://pypi.org/project/rfc3987/")
16206 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
16207 (description "@code{rfc3987} provides routines for parsing and
16208 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
16209 (license license:gpl3+)))
16210
16211 (define-public python2-rfc3987
16212 (package-with-python2 python-rfc3987))
16213
16214 ;; The latest commit contains fixes for building with both python3 and python2.
16215 (define-public python-rfc6555
16216 (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
16217 (revision "1"))
16218 (package
16219 (name "python-rfc6555")
16220 (version (git-version "0.0.0" revision commit))
16221 (source (origin
16222 (method git-fetch)
16223 (uri (git-reference
16224 (url "https://github.com/sethmlarson/rfc6555")
16225 (commit commit)))
16226 (file-name (git-file-name name version))
16227 (sha256
16228 (base32
16229 "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
16230 (build-system python-build-system)
16231 (arguments
16232 '(#:phases
16233 (modify-phases %standard-phases
16234 (replace 'check
16235 (lambda* (#:key tests? #:allow-other-keys)
16236 (if tests?
16237 ;; Other tests require network access.
16238 (invoke "pytest" "tests/test_ipv6.py")
16239 #t))))))
16240 (native-inputs
16241 `(("python-pytest" ,python-pytest)))
16242 (home-page "https://pypi.org/project/rfc6555/")
16243 (synopsis "Python implementation of RFC 6555")
16244 (description
16245 "Python implementation of the Happy Eyeballs Algorithm described in RFC
16246 6555. Provided with a single file and dead-simple API to allow easy vendoring
16247 and integration into other projects.")
16248 (properties `((python2-variant . ,(delay python2-rfc6555))))
16249 (license license:asl2.0))))
16250
16251 (define-public python2-rfc6555
16252 (let ((base (package-with-python2
16253 (strip-python2-variant python-rfc6555))))
16254 (package
16255 (inherit base)
16256 (propagated-inputs
16257 `(("python2-selectors2" ,python2-selectors2))))))
16258
16259 (define-public python-bagit
16260 (package
16261 (name "python-bagit")
16262 (version "1.7.0")
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "bagit" version))
16267 (sha256
16268 (base32
16269 "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
16270 (build-system python-build-system)
16271 (native-inputs
16272 `(("python-setuptools-scm" ,python-setuptools-scm)
16273 ("python-coverage" ,python-coverage)
16274 ("python-mock" ,python-mock)))
16275 (home-page "https://libraryofcongress.github.io/bagit-python/")
16276 (synopsis "Create and validate BagIt packages")
16277 (description "Bagit is a Python library and command line utility for working
16278 with BagIt style packages. BagIt is a minimalist packaging format for digital
16279 preservation.")
16280 (license license:cc0)))
16281
16282 (define-public python-prov
16283 (package
16284 (name "python-prov")
16285 (version "2.0.0")
16286 (source
16287 (origin
16288 (method url-fetch)
16289 (uri (pypi-uri "prov" version))
16290 (sha256
16291 (base32
16292 "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
16293 (build-system python-build-system)
16294 (propagated-inputs
16295 `(("python-dateutil" ,python-dateutil)
16296 ("python-lxml" ,python-lxml)
16297 ("python-networkx" ,python-networkx)
16298 ("python-rdflib" ,python-rdflib)))
16299 (native-inputs
16300 `(("graphviz" ,graphviz)
16301 ("python-pydot" ,python-pydot)))
16302 (home-page "https://github.com/trungdong/prov")
16303 (synopsis
16304 "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
16305 (description
16306 "This package provides a library for W3C Provenance Data Model supporting
16307 PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
16308 (license license:expat)))
16309
16310 (define-public python-arcp
16311 (package
16312 (name "python-arcp")
16313 (version "0.2.1")
16314 (source
16315 (origin
16316 (method url-fetch)
16317 (uri (pypi-uri "arcp" version))
16318 (sha256
16319 (base32
16320 "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
16321 (build-system python-build-system)
16322 (native-inputs
16323 `(("python-pytest" ,python-pytest)))
16324 (home-page "http://arcp.readthedocs.io/")
16325 (synopsis
16326 "Archive and Package URI parser and generator")
16327 (description
16328 "@acronym{arcp, Archive and Package} provides functions for creating
16329 @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
16330 packaged in an archive or package, like a ZIP file. arcp URIs can be used to
16331 consume or reference hypermedia resources bundled inside a file archive or an
16332 application package, as well as to resolve URIs for archive resources within a
16333 programmatic framework. This URI scheme provides mechanisms to generate a
16334 unique base URI to represent the root of the archive, so that relative URI
16335 references in a bundled resource can be resolved within the archive without
16336 having to extract the archive content on the local file system. An arcp URI can
16337 be used for purposes of isolation (e.g. when consuming multiple archives),
16338 security constraints (avoiding \"climb out\" from the archive), or for
16339 externally identiyfing sub-resources referenced by hypermedia formats.")
16340 (license license:asl2.0)))
16341
16342 (define-public python-shellescape
16343 (package
16344 (name "python-shellescape")
16345 (version "3.8.1")
16346 (source
16347 (origin
16348 (method git-fetch)
16349 (uri (git-reference
16350 (url "https://github.com/chrissimpkins/shellescape")
16351 (commit (string-append "v" version))))
16352 (file-name (git-file-name name version))
16353 (sha256
16354 (base32
16355 "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
16356 (build-system python-build-system)
16357 (arguments
16358 '(#:phases
16359 (modify-phases %standard-phases
16360 (replace 'check
16361 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
16362 (when tests?
16363 (add-installed-pythonpath inputs outputs)
16364 (invoke "python" "tests/test_shellescape.py"))
16365 #t)))))
16366 (native-inputs
16367 `(("python-pytest" ,python-pytest)))
16368 (home-page "https://github.com/chrissimpkins/shellescape")
16369 (synopsis
16370 "Shell escape a string to safely use it as a token in a shell command")
16371 (description
16372 "The shellescape Python module defines the @code{shellescape.quote()}
16373 function that returns a shell-escaped version of a Python string. This is a
16374 backport of the @code{shlex.quote()} function from Python 3.8 that makes it
16375 accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
16376 (license license:expat)))
16377
16378 (define-public python-validators
16379 (package
16380 (name "python-validators")
16381 (version "0.14.2")
16382 (source (origin
16383 (method url-fetch)
16384 (uri (pypi-uri "validators" version))
16385 (sha256
16386 (base32
16387 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
16388 (build-system python-build-system)
16389 (arguments
16390 '(#:phases (modify-phases %standard-phases
16391 (replace 'check
16392 (lambda _
16393 (invoke "pytest" "-vv"))))))
16394 (propagated-inputs
16395 `(("python-decorator" ,python-decorator)
16396 ("python-six" ,python-six)))
16397 (native-inputs
16398 `(("python-flake8" ,python-flake8)
16399 ("python-isort" ,python-isort)
16400 ("python-pytest" ,python-pytest)))
16401 (home-page "https://github.com/kvesteri/validators")
16402 (synopsis "Data validation library")
16403 (description
16404 "This package contains validators for different things such as email
16405 addresses, IP addresses, URLs, hashes and more. It has been designed to
16406 be easy to use and not require defining a schema or form just to validate
16407 some input.")
16408 (license license:expat)))
16409
16410 (define-public python2-validators
16411 (package-with-python2 python-validators))
16412
16413 (define-public python-validate-email
16414 (package
16415 (name "python-validate-email")
16416 (version "1.3")
16417 (source
16418 (origin
16419 (method url-fetch)
16420 (uri (pypi-uri "validate_email" version))
16421 (sha256
16422 (base32
16423 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
16424 (build-system python-build-system)
16425 (home-page "https://github.com/syrusakbary/validate_email")
16426 (synopsis "Verifies if an email address is valid and really exists")
16427 (description "@code{validate_email} can be used to verify if an email
16428 address is valid and really exists.")
16429 (license license:lgpl3+)))
16430
16431 (define-public python2-validate-email
16432 (package-with-python2 python-validate-email))
16433
16434 (define-public python-flex
16435 (package
16436 (name "python-flex")
16437 (version "6.10.0")
16438 (source
16439 (origin
16440 (method url-fetch)
16441 (uri (pypi-uri "flex" version))
16442 (sha256
16443 (base32
16444 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16445 (build-system python-build-system)
16446 (propagated-inputs
16447 `(("python-click" ,python-click)
16448 ("python-iso8601" ,python-iso8601)
16449 ("python-jsonpointer" ,python-jsonpointer)
16450 ("python-pyyaml" ,python-pyyaml)
16451 ("python-requests" ,python-requests)
16452 ("python-rfc3987" ,python-rfc3987)
16453 ("python-six" ,python-six)
16454 ("python-validate-email" ,python-validate-email)))
16455 (home-page "https://github.com/pipermerriam/flex")
16456 (synopsis "Validates Swagger schemata")
16457 (description "@code{flex} can be used to validate Swagger schemata.")
16458 (license license:bsd-3)))
16459
16460 (define-public python2-flex
16461 (package-with-python2 python-flex))
16462
16463 (define-public python-marshmallow
16464 (package
16465 (name "python-marshmallow")
16466 (version "3.9.1")
16467 (source
16468 (origin
16469 (method url-fetch)
16470 (uri (pypi-uri "marshmallow" version))
16471 (sha256
16472 (base32
16473 "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
16474 (build-system python-build-system)
16475 (propagated-inputs
16476 `(("python-dateutil" ,python-dateutil)
16477 ("python-simplejson" ,python-simplejson)))
16478 (native-inputs
16479 `(("python-pytest" ,python-pytest)
16480 ("python-pytz" ,python-pytz)))
16481 (home-page "https://github.com/marshmallow-code/marshmallow")
16482 (synopsis "Convert complex datatypes to and from native
16483 Python datatypes.")
16484 (description "@code{marshmallow} provides a library for converting
16485 complex datatypes to and from native Python datatypes.")
16486 (license license:expat)))
16487
16488 (define-public python2-marshmallow
16489 (package-with-python2 python-marshmallow))
16490
16491 (define-public python-apispec
16492 (package
16493 (name "python-apispec")
16494 (version "0.25.3")
16495 (source
16496 (origin
16497 (method url-fetch)
16498 (uri (pypi-uri "apispec" version))
16499 (sha256
16500 (base32
16501 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16502 (build-system python-build-system)
16503 (propagated-inputs
16504 `(("python-pyyaml" ,python-pyyaml)))
16505 (native-inputs
16506 `(("python-pytest" ,python-pytest)
16507 ("python-flask" ,python-flask)
16508 ("python-marshmallow" ,python-marshmallow)
16509 ("python-tornado" ,python-tornado)
16510 ("python-bottle" ,python-bottle)
16511 ("python-mock" ,python-mock)))
16512 (home-page "https://github.com/marshmallow-code/apispec")
16513 (synopsis "Swagger 2.0 API specification generator")
16514 (description "@code{python-apispec} is a pluggable API specification
16515 generator. Currently supports the OpenAPI specification (f.k.a.
16516 Swagger 2.0).")
16517 (license license:expat)))
16518
16519 (define-public python2-apispec
16520 (package-with-python2 python-apispec))
16521
16522 (define-public python-flasgger
16523 (package
16524 (name "python-flasgger")
16525 (version "0.6.3")
16526 (source
16527 (origin
16528 (method git-fetch)
16529 (uri (git-reference
16530 (url "https://github.com/rochacbruno/flasgger")
16531 (commit version)))
16532 (file-name (git-file-name name version))
16533 (sha256
16534 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16535 (build-system python-build-system)
16536 (arguments
16537 `(#:phases
16538 (modify-phases %standard-phases
16539 (replace 'check
16540 (lambda* (#:key inputs outputs #:allow-other-keys)
16541 (substitute* "Makefile"
16542 (("flake8 flasgger --ignore=F403")
16543 "flake8 flasgger --ignore=E731,F403"))
16544 (setenv "PYTHONPATH" (string-append (getcwd)
16545 ":"
16546 (getenv "PYTHONPATH")))
16547 (invoke "py.test"))))))
16548 (propagated-inputs
16549 `(("python-flask" ,python-flask)
16550 ("python-pyyaml" ,python-pyyaml)
16551 ("python-jsonschema" ,python-jsonschema)
16552 ("python-mistune" ,python-mistune)
16553 ("python-six" ,python-six)))
16554 (native-inputs
16555 `(("python-decorator" ,python-decorator)
16556 ("python-flake8" ,python-flake8)
16557 ("python-flask-restful" ,python-flask-restful)
16558 ("python-flex" ,python-flex)
16559 ("python-pytest" ,python-pytest)
16560 ("python-pytest-cov" ,python-pytest-cov)
16561 ("python-marshmallow" ,python-marshmallow)
16562 ("python-apispec" ,python-apispec)))
16563 (home-page "https://github.com/rochacbruno/flasgger/")
16564 (synopsis "Extract Swagger specs from your Flask project")
16565 (description "@code{python-flasgger} allows extracting Swagger specs
16566 from your Flask project. It is a fork of Flask-Swagger.")
16567 (license license:expat)))
16568
16569 (define-public python2-flasgger
16570 (package-with-python2 python-flasgger))
16571
16572 (define-public python-swagger-spec-validator
16573 (package
16574 (name "python-swagger-spec-validator")
16575 (version "2.4.3")
16576 (source
16577 (origin
16578 (method url-fetch)
16579 (uri (pypi-uri "swagger-spec-validator" version))
16580 (sha256
16581 (base32
16582 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16583 (build-system python-build-system)
16584 (propagated-inputs
16585 `(("python-jsonschema" ,python-jsonschema)
16586 ("python-pyyaml" ,python-pyyaml)
16587 ("python-six" ,python-six)))
16588 (home-page
16589 "https://github.com/Yelp/swagger_spec_validator")
16590 (synopsis "Validation of Swagger specifications")
16591 (description "@code{swagger_spec_validator} provides a library for
16592 validating Swagger API specifications.")
16593 (license license:asl2.0)))
16594
16595 (define-public python2-swagger-spec-validator
16596 (package-with-python2 python-swagger-spec-validator))
16597
16598 (define-public python-apache-libcloud
16599 (package
16600 (name "python-apache-libcloud")
16601 (version "3.1.0")
16602 (source
16603 (origin
16604 (method url-fetch)
16605 (uri (pypi-uri "apache-libcloud" version))
16606 (sha256
16607 (base32
16608 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16609 (build-system python-build-system)
16610 (arguments
16611 `(#:phases
16612 (modify-phases %standard-phases
16613 (add-after 'unpack 'patch-ssh
16614 (lambda* (#:key inputs #:allow-other-keys)
16615 (substitute* "libcloud/compute/ssh.py"
16616 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16617 "/bin/ssh" "'")))
16618 #t))
16619 (add-after 'unpack 'patch-tests
16620 (lambda _
16621 (substitute* "libcloud/test/compute/test_ssh_client.py"
16622 (("class ShellOutSSHClientTests")
16623 "@unittest.skip(\"Guix container doesn't have ssh service\")
16624 class ShellOutSSHClientTests"))
16625 #t))
16626 (add-before 'check 'copy-secret
16627 (lambda _
16628 (copy-file "libcloud/test/secrets.py-dist"
16629 "libcloud/test/secrets.py")
16630 #t)))))
16631 (inputs
16632 `(("openssh" ,openssh)))
16633 (propagated-inputs
16634 `(("python-paramiko" ,python-paramiko)
16635 ("python-requests" ,python-requests)))
16636 (native-inputs
16637 `(("python-lockfile" ,python-lockfile)
16638 ("python-mock" ,python-mock)
16639 ("python-pytest" ,python-pytest)
16640 ("python-pytest-runner" ,python-pytest-runner)
16641 ("python-requests-mock" ,python-requests-mock)))
16642 (home-page "https://libcloud.apache.org/")
16643 (synopsis "Unified Cloud API")
16644 (description "@code{libcloud} is a Python library for interacting with
16645 many of the popular cloud service providers using a unified API.")
16646 (license license:asl2.0)))
16647
16648 (define-public python2-apache-libcloud
16649 (package-with-python2 python-apache-libcloud))
16650
16651 (define-public python-smmap
16652 (package
16653 (name "python-smmap")
16654 (version "3.0.1")
16655 (source
16656 (origin
16657 (method url-fetch)
16658 (uri (pypi-uri "smmap" version))
16659 (sha256
16660 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16661 (build-system python-build-system)
16662 (native-inputs
16663 `(("python-nosexcover" ,python-nosexcover)))
16664 (home-page "https://github.com/Byron/smmap")
16665 (synopsis "Python sliding window memory map manager")
16666 (description "@code{smmap} is a pure Python implementation of a sliding
16667 window memory map manager.")
16668 (license license:bsd-3)))
16669
16670 (define-public python-smmap2
16671 (deprecated-package "python-smmap2" python-smmap))
16672
16673 (define-public python2-smmap
16674 (package-with-python2 python-smmap))
16675
16676 (define-public python2-smmap2
16677 (deprecated-package "python2-smmap2" python2-smmap))
16678
16679 (define-public python-regex
16680 (package
16681 (name "python-regex")
16682 (version "2020.6.8")
16683 (source (origin
16684 (method url-fetch)
16685 (uri (pypi-uri "regex" version))
16686 (sha256
16687 (base32
16688 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16689 (build-system python-build-system)
16690 (arguments
16691 '(#:phases
16692 (modify-phases %standard-phases
16693 (replace 'check
16694 (lambda* (#:key inputs outputs #:allow-other-keys)
16695 (add-installed-pythonpath inputs outputs)
16696 (invoke "python" "-c"
16697 "from regex.test_regex import test_main; test_main()"))))))
16698 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16699 (synopsis "Alternative regular expression module")
16700 (description "This regular expression implementation is backwards-
16701 compatible with the standard @code{re} module, but offers additional
16702 functionality like full case-folding for case-insensitive matches in Unicode.")
16703 (license license:psfl)))
16704
16705 (define-public python2-regex
16706 (package-with-python2 python-regex))
16707
16708 (define-public python-pyopengl
16709 (package
16710 (name "python-pyopengl")
16711 (version "3.1.5")
16712 (source
16713 (origin
16714 (method url-fetch)
16715 (uri (pypi-uri "PyOpenGL" version))
16716 (sha256
16717 (base32
16718 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16719 (build-system python-build-system)
16720 (inputs
16721 `(("mesa" ,mesa)
16722 ("freeglut" ,freeglut)
16723 ("glu" ,glu)))
16724 (arguments
16725 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16726 ;attribute 'OSMesa'
16727 #:phases
16728 (modify-phases %standard-phases
16729 (add-before 'build 'fix-paths
16730 (lambda* (#:key inputs outputs #:allow-other-keys)
16731 (substitute* '("OpenGL/platform/ctypesloader.py")
16732 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16733 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16734 (("'GL'")
16735 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16736 (("'GLU'")
16737 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16738 (("'glut',")
16739 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16740 (("'GLESv1_CM'")
16741 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16742 (("'GLESv2'")
16743 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16744 ;; Not providing libgle. It seems to be very old.
16745 #t)))))
16746 (home-page "http://pyopengl.sourceforge.net")
16747 (synopsis "Standard OpenGL bindings for Python")
16748 (description
16749 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16750 related APIs. The binding is created using the standard @code{ctypes}
16751 library.")
16752 (license license:bsd-3)))
16753
16754 (define-public python-pyopengl-accelerate
16755 (package
16756 (inherit python-pyopengl)
16757 (name "python-pyopengl-accelerate")
16758 (version "3.1.5")
16759 (source
16760 (origin
16761 (method url-fetch)
16762 (uri (pypi-uri "PyOpenGL-accelerate" version))
16763 (sha256
16764 (base32
16765 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16766 (inputs
16767 `(("mesa" ,mesa)
16768 ("python-numpy" ,python-numpy))) ; for cython module
16769 ; numpy_formathandler, thus not propagated
16770 (arguments
16771 `(#:tests? #f
16772 #:phases
16773 (modify-phases %standard-phases
16774 (delete 'fix-paths))))
16775 (synopsis "Acceleration code for PyOpenGL")
16776 (description
16777 "This is the Cython-coded accelerator module for PyOpenGL.")))
16778
16779 (define-public python-rencode
16780 (package
16781 (name "python-rencode")
16782 (version "1.0.5")
16783 (source
16784 (origin
16785 (method url-fetch)
16786 (uri (pypi-uri "rencode" version))
16787 (sha256
16788 (base32
16789 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16790 (build-system python-build-system)
16791 (arguments
16792 `(#:phases
16793 (modify-phases %standard-phases
16794 (add-before 'check 'delete-bogus-test
16795 ;; This test requires /home/aresch/Downloads, which is not provided by
16796 ;; the build environment.
16797 (lambda _
16798 (delete-file "rencode/t.py")
16799 #t)))))
16800 (native-inputs `(("pkg-config" ,pkg-config)
16801 ("python-cython" ,python-cython)))
16802 (home-page "https://github.com/aresch/rencode")
16803 (synopsis "Serialization of heterogeneous data structures")
16804 (description
16805 "The @code{rencode} module is a data structure serialization library,
16806 similar to @code{bencode} from the BitTorrent project. For complex,
16807 heterogeneous data structures with many small elements, r-encoding stake up
16808 significantly less space than b-encodings. This version of rencode is a
16809 complete rewrite in Cython to attempt to increase the performance over the
16810 pure Python module.")
16811 (license license:bsd-3)))
16812
16813 (define-public python2-rencode
16814 (package-with-python2 python-rencode))
16815
16816 (define-public python-xenon
16817 (package
16818 (name "python-xenon")
16819 (version "0.7.0")
16820 (source
16821 (origin
16822 (method url-fetch)
16823 (uri (pypi-uri "xenon" version))
16824 (sha256
16825 (base32
16826 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16827 (build-system python-build-system)
16828 (native-inputs
16829 `(("python-pyyaml" ,python-pyyaml)
16830 ("python-radon" ,python-radon)
16831 ("python-requests" ,python-requests)
16832 ("python-flake8" ,python-flake8)
16833 ("python-tox" ,python-tox)))
16834 (arguments
16835 `(#:tests? #f ;test suite not shipped with the PyPI archive
16836 #:phases
16837 (modify-phases %standard-phases
16838 (add-before 'build 'patch-test-requirements
16839 (lambda _
16840 ;; Remove httpretty dependency for tests.
16841 (substitute* "setup.py"
16842 (("httpretty") ""))
16843 #t)))))
16844 (home-page "https://xenon.readthedocs.org/")
16845 (synopsis "Monitor code metrics for Python on your CI server")
16846 (description
16847 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16848 Ideally, @code{xenon} is run every time code is committed. Through command
16849 line options, various thresholds can be set for the complexity of code. It
16850 will fail (i.e. it will exit with a non-zero exit code) when any of these
16851 requirements is not met.")
16852 (license license:expat)))
16853
16854 (define-public python2-xenon
16855 (package-with-python2 python-xenon))
16856
16857 (define-public python-pysocks
16858 (package
16859 (name "python-pysocks")
16860 (version "1.7.0")
16861 (source
16862 (origin
16863 (method url-fetch)
16864 (uri (pypi-uri "PySocks" version))
16865 (sha256
16866 (base32
16867 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
16868 (build-system python-build-system)
16869 (arguments `(#:tests? #f))
16870 (home-page "https://github.com/Anorov/PySocks")
16871 (synopsis "SOCKS client module")
16872 (description "@code{pysocks} is an updated and semi-actively maintained
16873 version of @code{SocksiPy} with bug fixes and extra features.")
16874 (license license:bsd-3)))
16875
16876 (define-public python2-pysocks
16877 (package-with-python2 python-pysocks))
16878
16879 (define-public python-pydiff
16880 (package
16881 (name "python-pydiff")
16882 (version "0.2")
16883 (source
16884 (origin
16885 (method url-fetch)
16886 (uri (pypi-uri "pydiff" version))
16887 (sha256
16888 (base32
16889 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16890 (build-system python-build-system)
16891 (home-page "https://github.com/myint/pydiff")
16892 (synopsis "Library to diff two Python files at the bytecode level")
16893 (description
16894 "@code{pydiff} makes it easy to look for actual code changes while
16895 ignoring formatting changes.")
16896 (license license:expat)))
16897
16898 (define-public python2-pydiff
16899 (package-with-python2 python-pydiff))
16900
16901 (define-public python-pydub
16902 (package
16903 (name "python-pydub")
16904 (version "0.24.1")
16905 (source
16906 (origin
16907 (method url-fetch)
16908 (uri (pypi-uri "pydub" version))
16909 (sha256
16910 (base32
16911 "0sfwfq7yjv4bl3yqbmizszscafvwf4zr40hzbsy7rclvzyznh333"))))
16912 (build-system python-build-system)
16913 (arguments
16914 `(#:phases
16915 (modify-phases %standard-phases
16916 (add-after 'unpack 'fix-ffmpeg-path
16917 (lambda* (#:key inputs #:allow-other-keys)
16918 (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
16919 (substitute* '("pydub/utils.py")
16920 (("return \"ffmpeg\"")
16921 (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
16922 (("return \"ffplay\"")
16923 (string-append "return \"" ffmpeg "/bin/ffplay\""))
16924 (("return \"ffprobe\"")
16925 (string-append "return \"" ffmpeg "/bin/ffprobe\""))
16926 (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
16927 #t))))))
16928 (home-page "https://pydub.com")
16929 (inputs
16930 `(("ffmpeg" ,ffmpeg)))
16931 (propagated-inputs
16932 `(("python-scipy" ,python-scipy)))
16933 (synopsis "Manipulate audio with a high level interface in Python")
16934 (description
16935 "@code{pydub} makes it easy to manipulate audio in Python. It relies on
16936 @code{ffmpeg} to open various audio formats.")
16937 (license license:expat))) ; MIT license
16938
16939 (define-public python-tqdm
16940 (package
16941 (name "python-tqdm")
16942 (version "4.43.0")
16943 (source
16944 (origin
16945 (method url-fetch)
16946 (uri (pypi-uri "tqdm" version))
16947 (sha256
16948 (base32
16949 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16950 (build-system python-build-system)
16951 (arguments
16952 '(#:phases (modify-phases %standard-phases
16953 (replace 'check
16954 (lambda* (#:key inputs outputs #:allow-other-keys)
16955 (add-installed-pythonpath inputs outputs)
16956 ;; This invokation is taken from tox.ini.
16957 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16958 "-d" "-v" "tqdm/"))))))
16959 (native-inputs
16960 `(("python-nose" ,python-nose)))
16961 (home-page "https://github.com/tqdm/tqdm")
16962 (synopsis "Fast, extensible progress meter")
16963 (description
16964 "Make loops show a progress bar on the console by just wrapping any
16965 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16966 design and layout.")
16967 (license (list license:mpl2.0 license:expat))))
16968
16969 (define-public python2-tqdm
16970 (package-with-python2 python-tqdm))
16971
16972 (define-public python-pkginfo
16973 (package
16974 (name "python-pkginfo")
16975 (version "1.4.2")
16976 (source
16977 (origin
16978 (method url-fetch)
16979 (uri (pypi-uri "pkginfo" version))
16980 (sha256
16981 (base32
16982 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16983 (build-system python-build-system)
16984 (arguments
16985 ;; The tests are broken upstream.
16986 '(#:tests? #f))
16987 (home-page
16988 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16989 (synopsis
16990 "Query metadatdata from sdists, bdists, and installed packages")
16991 (description
16992 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16993 source distriubtion (an sdist) or a binary distribution (e.g., created by
16994 running bdist_egg). It can also query the EGG-INFO directory of an installed
16995 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16996 created by running @code{python setup.py develop}).")
16997 (license license:expat)))
16998
16999 (define-public python2-pkginfo
17000 (package-with-python2 python-pkginfo))
17001
17002 (define-public python-twine
17003 (package
17004 (name "python-twine")
17005 (version "1.15.0")
17006 (source
17007 (origin
17008 (method url-fetch)
17009 (uri (pypi-uri "twine" version))
17010 (sha256
17011 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
17012 (build-system python-build-system)
17013 (propagated-inputs
17014 `(("python-tqdm" ,python-tqdm)
17015 ("python-packaging" ,python-packaging)
17016 ("python-pkginfo" ,python-pkginfo)
17017 ("python-readme-renderer" ,python-readme-renderer)
17018 ("python-requests" ,python-requests)
17019 ("python-requests-toolbelt" ,python-requests-toolbelt)))
17020 (home-page "https://github.com/pypa/twine")
17021 (synopsis "Collection of utilities for interacting with PyPI")
17022 (description
17023 "@code{twine} currently supports registering projects and uploading
17024 distributions. It authenticates the user over HTTPS, allows them to pre-sign
17025 their files and supports any packaging format (including wheels).")
17026 (license license:asl2.0)))
17027
17028 (define-public python2-twine
17029 (package-with-python2 python-twine))
17030
17031 (define-public python-linecache2
17032 (package
17033 (name "python-linecache2")
17034 (version "1.0.0")
17035 (source
17036 (origin
17037 (method url-fetch)
17038 (uri (pypi-uri "linecache2" version))
17039 (sha256
17040 (base32
17041 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
17042 (build-system python-build-system)
17043 (arguments
17044 `(;; The tests depend on unittest2, and our version is a bit too old.
17045 #:tests? #f))
17046 (native-inputs
17047 `(("python-pbr" ,python-pbr-minimal)))
17048 (home-page
17049 "https://github.com/testing-cabal/linecache2")
17050 (synopsis "Backports of the linecache module")
17051 (description
17052 "The linecache module allows one to get any line from any file, while
17053 attempting to optimize internally, using a cache, the common case where many
17054 lines are read from a single file.")
17055 (license license:psfl)))
17056
17057 (define-public python2-linecache2
17058 (package-with-python2 python-linecache2))
17059
17060 (define-public python-traceback2
17061 (package
17062 (name "python-traceback2")
17063 (version "1.4.0")
17064 (source
17065 (origin
17066 (method url-fetch)
17067 (uri (pypi-uri "traceback2" version))
17068 (sha256
17069 (base32
17070 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
17071 (build-system python-build-system)
17072 (arguments
17073 `(;; python-traceback2 and python-unittest2 depend on one another.
17074 #:tests? #f))
17075 (native-inputs
17076 `(("python-pbr" ,python-pbr-minimal)))
17077 (propagated-inputs
17078 `(("python-linecache2" ,python-linecache2)))
17079 (home-page
17080 "https://github.com/testing-cabal/traceback2")
17081 (synopsis "Backports of the traceback module")
17082 (description
17083 "This module provides a standard interface to extract, format and print
17084 stack traces of Python programs. It exactly mimics the behavior of the Python
17085 interpreter when it prints a stack trace.")
17086 (license license:psfl)))
17087
17088 (define-public python2-traceback2
17089 (package-with-python2 python-traceback2))
17090
17091 (define-public python-ratelimiter
17092 (package
17093 (name "python-ratelimiter")
17094 (version "1.2.0")
17095 (source
17096 (origin
17097 (method url-fetch)
17098 (uri (pypi-uri "ratelimiter" version))
17099 (sha256
17100 (base32
17101 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
17102 (build-system python-build-system)
17103 (arguments
17104 '(#:tests? #f)) ; There are no tests in the pypi archive.
17105 (home-page "https://github.com/RazerM/ratelimiter")
17106 (synopsis "Simple rate limiting object")
17107 (description
17108 "The @code{ratelimiter} module ensures that an operation will not be
17109 executed more than a given number of times during a given period.")
17110 (license license:asl2.0)))
17111
17112 (define-public python2-ratelimiter
17113 (package-with-python2 python-ratelimiter))
17114
17115 (define-public python-dukpy
17116 (package
17117 (name "python-dukpy")
17118 (version "0.3")
17119 (source
17120 (origin
17121 (method git-fetch)
17122 (uri (git-reference
17123 (url "https://github.com/kovidgoyal/dukpy")
17124 (commit (string-append "v" version))))
17125 (file-name (git-file-name name version))
17126 (sha256
17127 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
17128 (build-system python-build-system)
17129 (home-page "https://github.com/kovidgoyal/dukpy")
17130 (synopsis "Run JavaScript in python")
17131 (description
17132 "dukpy is a JavaScript runtime environment for Python using the duktape
17133 embeddable JavaScript engine.")
17134 ;; Dukpy is licensed under MIT like the embedded duktape library,
17135 ;; with 'errors.c' as GPL3.
17136 (license (list license:expat license:gpl3))))
17137
17138 (define-public python2-dukpy
17139 (package-with-python2 python-dukpy))
17140
17141 (define-public python-jsonrpclib-pelix
17142 (package
17143 (name "python-jsonrpclib-pelix")
17144 (version "0.3.2")
17145 (source
17146 (origin
17147 (method url-fetch)
17148 (uri (pypi-uri "jsonrpclib-pelix" version))
17149 (sha256
17150 (base32
17151 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
17152 (build-system python-build-system)
17153 (arguments
17154 `(#:tests? #f)) ; no tests in PyPI tarball
17155 (home-page "https://github.com/tcalmant/jsonrpclib/")
17156 (synopsis "JSON-RPC 2.0 client library for Python")
17157 (description
17158 "This library implements the JSON-RPC v2.0
17159 specification (backwards-compatible) as a client library for Python. This
17160 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
17161 services.")
17162 (license license:asl2.0)))
17163
17164 (define-public python2-jsonrpclib-pelix
17165 (package-with-python2 python-jsonrpclib-pelix))
17166
17167 (define-public python-setuptools-scm-git-archive
17168 (package
17169 (name "python-setuptools-scm-git-archive")
17170 (version "1.0")
17171 (source
17172 (origin
17173 (method url-fetch)
17174 (uri (pypi-uri "setuptools_scm_git_archive" version))
17175 (sha256
17176 (base32
17177 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
17178 (build-system python-build-system)
17179 (native-inputs
17180 `(("python-pytest" ,python-pytest)))
17181 (propagated-inputs
17182 `(("python-setuptools-scm" ,python-setuptools-scm)))
17183 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
17184 (synopsis "Setuptools_scm plugin for git archives")
17185 (description
17186 "The setuptools_scm_git_archive package is a plugin to
17187 setuptools_scm, which supports obtaining versions from git archives that
17188 belong to tagged versions.")
17189 (license license:expat)))
17190
17191 (define-public python2-setuptools-scm-git-archive
17192 (package-with-python2 python-setuptools-scm-git-archive))
17193
17194 (define-public python-setuptools-git
17195 (package
17196 (name "python-setuptools-git")
17197 (version "1.2")
17198 (source
17199 (origin
17200 (method url-fetch)
17201 (uri (pypi-uri "setuptools-git" version))
17202 (sha256
17203 (base32
17204 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
17205 (build-system python-build-system)
17206 (arguments
17207 `(#:phases
17208 (modify-phases %standard-phases
17209 ;; This is needed for tests.
17210 (add-after 'unpack 'configure-git
17211 (lambda _
17212 (setenv "HOME" "/tmp")
17213 (invoke "git" "config" "--global" "user.email" "guix")
17214 (invoke "git" "config" "--global" "user.name" "guix")
17215 #t)))))
17216 (native-inputs
17217 `(("git" ,git-minimal)))
17218 (home-page "https://github.com/msabramo/setuptools-git")
17219 (synopsis "Setuptools revision control system plugin for Git")
17220 (description
17221 "This package provides a plugin for Setuptools for revision control with
17222 Git.")
17223 (license license:bsd-3)))
17224
17225 (define-public python-pyclipper
17226 (package
17227 (name "python-pyclipper")
17228 (version "1.1.0.post3")
17229 (source
17230 (origin
17231 (method url-fetch)
17232 (uri (pypi-uri "pyclipper" version ".zip"))
17233 (sha256
17234 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
17235 (modules '((guix build utils)))
17236 (snippet
17237 '(begin
17238 ;; This file is generated by Cython.
17239 (delete-file "pyclipper/pyclipper.cpp") #t))))
17240 (build-system python-build-system)
17241 (arguments
17242 `(#:phases
17243 (modify-phases %standard-phases
17244 (add-before 'build 'cythonize-sources
17245 (lambda _
17246 (with-directory-excursion "pyclipper"
17247 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
17248 (propagated-inputs
17249 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
17250 (native-inputs
17251 `(("python-cython" ,python-cython)
17252 ("python-pytest" ,python-pytest)
17253 ("python-pytest-runner" ,python-pytest-runner)
17254 ("python-unittest2" ,python-unittest2)
17255 ("unzip" ,unzip)))
17256 (home-page "https://github.com/greginvm/pyclipper")
17257 (synopsis "Wrapper for Angus Johnson's Clipper library")
17258 (description
17259 "Pyclipper is a Cython wrapper for the C++ translation of the
17260 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
17261 (license license:expat)))
17262
17263 (define-public python2-pyclipper
17264 (package-with-python2 python-pyclipper))
17265
17266 (define-public python2-booleanoperations
17267 (package
17268 (name "python2-booleanoperations")
17269 (version "0.7.1")
17270 (source
17271 (origin
17272 (method url-fetch)
17273 (uri (pypi-uri "booleanOperations" version ".zip"))
17274 (sha256
17275 (base32
17276 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
17277 (build-system python-build-system)
17278 (arguments
17279 `(#:python ,python-2))
17280 (native-inputs
17281 `(("unzip" ,unzip)
17282 ("python2-pytest" ,python2-pytest)
17283 ("python2-pytest-runner" ,python2-pytest-runner)))
17284 (propagated-inputs
17285 `(("python-fonttools" ,python2-fonttools)
17286 ("python-pyclipper" ,python2-pyclipper)
17287 ("python-ufolib" ,python2-ufolib)))
17288 (home-page "https://github.com/typemytype/booleanOperations")
17289 (synopsis "Boolean operations on paths")
17290 (description
17291 "BooleanOperations provides a Python library that enables
17292 boolean operations on paths.")
17293 (license license:expat)))
17294
17295 (define-public python-tempdir
17296 (package
17297 (name "python-tempdir")
17298 (version "0.7.1")
17299 (source
17300 (origin
17301 (method url-fetch)
17302 (uri (pypi-uri "tempdir" version))
17303 (sha256
17304 (base32
17305 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
17306 (build-system python-build-system)
17307 (home-page "https://pypi.org/project/tempdir/")
17308 (arguments
17309 ;; the package has no tests
17310 '(#:tests? #f))
17311 (synopsis "Python library for managing temporary directories")
17312 (description
17313 "This library manages temporary directories that are automatically
17314 deleted with all their contents when they are no longer needed. It is
17315 particularly convenient for use in tests.")
17316 (license license:expat)))
17317
17318 (define-public python2-tempdir
17319 (package-with-python2 python-tempdir))
17320
17321 (define-public python-activepapers
17322 (package
17323 (name "python-activepapers")
17324 (version "0.2.2")
17325 (source
17326 (origin
17327 (method url-fetch)
17328 (uri (pypi-uri "ActivePapers.Py" version))
17329 (sha256
17330 (base32
17331 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
17332 (build-system python-build-system)
17333 (arguments
17334 `(#:modules ((ice-9 ftw)
17335 (srfi srfi-1)
17336 (guix build utils)
17337 (guix build python-build-system))
17338
17339 #:phases
17340 (modify-phases %standard-phases
17341 (add-after 'unpack 'delete-python2-code
17342 (lambda _
17343 (for-each delete-file
17344 '("lib/activepapers/builtins2.py"
17345 "lib/activepapers/standardlib2.py"
17346 "lib/activepapers/utility2.py"))))
17347 (replace 'check
17348 (lambda _
17349 ;; Deactivate the test cases that download files
17350 (setenv "NO_NETWORK_ACCESS" "1")
17351 ;; For some strange reason, some tests fail if nosetests runs all
17352 ;; test modules in a single execution. They pass if each test
17353 ;; module is run individually.
17354 (for-each (lambda (filename)
17355 (invoke "nosetests"
17356 (string-append "tests/" filename)))
17357 (scandir "tests"
17358 (lambda (filename)
17359 (string-suffix? ".py" filename)))))))))
17360 (native-inputs
17361 `(("python-tempdir" ,python-tempdir)
17362 ("python-nose" ,python-nose)))
17363 (propagated-inputs
17364 `(("python-h5py" ,python-h5py)))
17365 (home-page "https://www.activepapers.org/")
17366 (synopsis "Executable papers for scientific computing")
17367 (description
17368 "ActivePapers is a tool for working with executable papers, which
17369 combine data, code, and documentation in single-file packages,
17370 suitable for publication as supplementary material or on repositories
17371 such as figshare or Zenodo.")
17372 (properties `((python2-variant . ,(delay python2-activepapers))))
17373 (license license:bsd-3)))
17374
17375 (define-public python2-activepapers
17376 (let ((base (package-with-python2
17377 (strip-python2-variant python-activepapers))))
17378 (package
17379 (inherit base)
17380 (arguments
17381 (substitute-keyword-arguments (package-arguments base)
17382 ((#:phases phases)
17383 `(modify-phases ,phases
17384 (delete 'delete-python2-code)
17385 (add-after 'unpack 'delete-python3-code
17386 (lambda _
17387 (for-each delete-file
17388 '("lib/activepapers/builtins3.py"
17389 "lib/activepapers/standardlib3.py"
17390 "lib/activepapers/utility3.py")))))))))))
17391
17392 (define-public python-semver
17393 (package
17394 (name "python-semver")
17395 (version "2.9.0")
17396 (source
17397 (origin
17398 (method url-fetch)
17399 (uri (pypi-uri "semver" version))
17400 (sha256
17401 (base32
17402 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
17403 (build-system python-build-system)
17404 (arguments
17405 `(#:phases (modify-phases %standard-phases
17406 (replace 'check
17407 (lambda _
17408 (delete-file "setup.cfg")
17409 (invoke "py.test"))))))
17410 (native-inputs
17411 `(("python-pytest" ,python-pytest)))
17412 (home-page "https://github.com/k-bx/python-semver")
17413 (synopsis "Python helper for Semantic Versioning")
17414 (description "This package provides a Python library for
17415 @url{Semantic Versioning, http://semver.org/}.")
17416 (license license:bsd-3)))
17417
17418 (define-public python2-semver
17419 (package-with-python2 python-semver))
17420
17421 (define-public python-pyro4
17422 (package
17423 (name "python-pyro4")
17424 (version "4.77")
17425 (source
17426 (origin
17427 (method url-fetch)
17428 (uri (pypi-uri "Pyro4" version))
17429 (sha256
17430 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
17431 (build-system python-build-system)
17432 (arguments
17433 '(#:tests? #f)) ;FIXME: Some tests require network access.
17434 (native-inputs
17435 `(("python-cloudpickle" ,python-cloudpickle)
17436 ("python-dill" ,python-dill)
17437 ("python-msgpack" ,python-msgpack)))
17438 (propagated-inputs
17439 `(("python-serpent" ,python-serpent)))
17440 (home-page "https://pyro4.readthedocs.io")
17441 (synopsis "Distributed object middleware for Python")
17442 (description
17443 "Pyro enables you to build applications in which objects can talk to each
17444 other over the network. You can just use normal Python method calls to call
17445 objects on other machines, also known as remote procedure calls (RPC).")
17446 (license license:expat)))
17447
17448 (define-public python2-pyro
17449 (package
17450 (name "python2-pyro")
17451 (version "3.16")
17452 (source
17453 (origin
17454 (method url-fetch)
17455 (uri (pypi-uri "Pyro" version))
17456 (file-name (string-append "Pyro-" version ".tar.gz"))
17457 (sha256
17458 (base32
17459 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
17460 (build-system python-build-system)
17461 (arguments
17462 ;; Pyro is not compatible with Python 3
17463 `(#:python ,python-2
17464 ;; Pyro has no test cases for automatic execution
17465 #:tests? #f))
17466 (home-page "https://pythonhosted.org/Pyro/")
17467 (synopsis "Distributed object manager for Python")
17468 (description "Pyro is a Distributed Object Technology system
17469 written in Python that is designed to be easy to use. It resembles
17470 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17471 which is a system and language independent Distributed Object Technology
17472 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17473 longer maintained. New projects should use Pyro4 instead, which
17474 is the new Pyro version that is actively developed.")
17475 (license license:expat)))
17476
17477 (define-public python2-scientific
17478 (package
17479 (name "python2-scientific")
17480 (version "2.9.4")
17481 (source
17482 (origin
17483 (method git-fetch)
17484 (uri (git-reference
17485 (url "https://github.com/khinsen/ScientificPython")
17486 (commit (string-append "rel" version))))
17487 (file-name (git-file-name name version))
17488 (sha256
17489 (base32
17490 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17491 (build-system python-build-system)
17492 (inputs
17493 `(("netcdf" ,netcdf)))
17494 (propagated-inputs
17495 `(("python-numpy" ,python2-numpy-1.8)
17496 ("python-pyro" ,python2-pyro)))
17497 (arguments
17498 ;; ScientificPython is not compatible with Python 3
17499 `(#:python ,python-2
17500 #:tests? #f ; No test suite
17501 #:phases
17502 (modify-phases %standard-phases
17503 (replace 'build
17504 (lambda* (#:key inputs #:allow-other-keys)
17505 (invoke "python" "setup.py" "build"
17506 (string-append "--netcdf_prefix="
17507 (assoc-ref inputs "netcdf"))))))))
17508 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17509 (synopsis "Python modules for scientific computing")
17510 (description "ScientificPython is a collection of Python modules that are
17511 useful for scientific computing. Most modules are rather general (Geometry,
17512 physical units, automatic derivatives, ...) whereas others are more
17513 domain-specific (e.g. netCDF and PDB support). The library is currently
17514 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17515 (license license:cecill-c)))
17516
17517 (define-public python2-mmtk
17518 (package
17519 (name "python2-mmtk")
17520 (version "2.7.12")
17521 (source
17522 (origin
17523 (method git-fetch)
17524 (uri (git-reference
17525 (url "https://github.com/khinsen/MMTK")
17526 (commit (string-append "rel" version))))
17527 (file-name (git-file-name name version))
17528 (sha256
17529 (base32
17530 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17531 (build-system python-build-system)
17532 (native-inputs
17533 `(("netcdf" ,netcdf)))
17534 (propagated-inputs
17535 `(("python-scientific" ,python2-scientific)
17536 ("python-tkinter" ,python-2 "tk")))
17537 (arguments
17538 `(#:python ,python-2
17539 #:tests? #f
17540 #:phases
17541 (modify-phases %standard-phases
17542 (add-before 'build 'includes-from-scientific
17543 (lambda* (#:key inputs #:allow-other-keys)
17544 (mkdir-p "Include/Scientific")
17545 (copy-recursively
17546 (string-append
17547 (assoc-ref inputs "python-scientific")
17548 "/include/python2.7/Scientific")
17549 "Include/Scientific"))))))
17550 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17551 (synopsis "Python library for molecular simulation")
17552 (description "MMTK is a library for molecular simulations with an emphasis
17553 on biomolecules. It provides widely used methods such as Molecular Dynamics
17554 and normal mode analysis, but also basic routines for implementing new methods
17555 for simulation and analysis. The library is currently not actively maintained
17556 and works only with Python 2 and NumPy < 1.9.")
17557 (license license:cecill-c)))
17558
17559 (define-public python-phonenumbers
17560 (package
17561 (name "python-phonenumbers")
17562 (version "8.9.1")
17563 (source
17564 (origin
17565 (method url-fetch)
17566 (uri (pypi-uri "phonenumbers" version))
17567 (sha256
17568 (base32
17569 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17570 (build-system python-build-system)
17571 (home-page
17572 "https://github.com/daviddrysdale/python-phonenumbers")
17573 (synopsis
17574 "Python library for dealing with international phone numbers")
17575 (description
17576 "This package provides a Python port of Google's libphonenumber library.")
17577 (license license:asl2.0)))
17578
17579 (define-public python2-phonenumbers
17580 (package-with-python2 python-phonenumbers))
17581
17582 (define-public python-send2trash
17583 (package
17584 (name "python-send2trash")
17585 (version "1.5.0")
17586 (source
17587 (origin (method git-fetch)
17588 ;; Source tarball on PyPI doesn't include tests.
17589 (uri (git-reference
17590 (url "https://github.com/hsoft/send2trash")
17591 (commit version)))
17592 (file-name (git-file-name name version))
17593 (sha256
17594 (base32
17595 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17596 (build-system python-build-system)
17597 (arguments
17598 '(#:phases
17599 (modify-phases %standard-phases
17600 (add-before 'check 'pre-check
17601 (lambda _
17602 (mkdir-p "/tmp/foo")
17603 (setenv "HOME" "/tmp/foo")
17604 #t)))))
17605 (home-page "https://github.com/hsoft/send2trash")
17606 (synopsis "Send files to the user's @file{~/Trash} directory")
17607 (description "This package provides a Python library to send files to the
17608 user's @file{~/Trash} directory.")
17609 (properties `((python2-variant . ,(delay python2-send2trash))))
17610 (license license:bsd-3)))
17611
17612 (define-public python2-send2trash
17613 (package
17614 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17615 (arguments
17616 (substitute-keyword-arguments (package-arguments python-send2trash)
17617 ((#:phases phases)
17618 `(modify-phases ,phases
17619 (add-before 'check 'setenv
17620 (lambda _
17621 (setenv "PYTHONPATH"
17622 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17623 #t))))))))
17624
17625 (define-public python-pyfavicon
17626 (package
17627 (name "python-pyfavicon")
17628 (version "0.1.1")
17629 (source
17630 (origin
17631 (method url-fetch)
17632 (uri (pypi-uri "pyfavicon" version))
17633 (sha256
17634 (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
17635 (build-system python-build-system)
17636 (arguments
17637 ;; There are no tests in the PyPI tarball and the tests from the
17638 ;; repository require online data.
17639 '(#:tests? #f))
17640 (propagated-inputs
17641 `(("python-aiohttp" ,python-aiohttp)
17642 ("python-beautifulsoup4" ,python-beautifulsoup4)
17643 ("python-pillow" ,python-pillow)))
17644 (home-page "https://github.com/bilelmoussaoui/pyfavicon")
17645 (synopsis "Async favicon fetcher")
17646 (description
17647 "@code{pyfavicon} is an async favicon fetcher.")
17648 (license license:expat)))
17649
17650 (define-public python-yapf
17651 (package
17652 (name "python-yapf")
17653 (version "0.29.0")
17654 (source
17655 (origin
17656 (method url-fetch)
17657 (uri (pypi-uri "yapf" version))
17658 (sha256
17659 (base32
17660 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17661 (build-system python-build-system)
17662 (home-page "https://github.com/google/yapf")
17663 (synopsis "Formatter for Python code")
17664 (description "YAPF is a formatter for Python code. It's based off of
17665 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17666 takes the code and reformats it to the best formatting that conforms to the
17667 style guide, even if the original code didn't violate the style guide.")
17668 (license license:asl2.0)))
17669
17670 (define-public python2-yapf
17671 (package-with-python2 python-yapf))
17672
17673 (define-public python-yq
17674 (package
17675 (name "python-yq")
17676 (version "2.11.1")
17677 (source
17678 (origin
17679 (method url-fetch)
17680 (uri (pypi-uri "yq" version))
17681 (sha256
17682 (base32
17683 "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
17684 (build-system python-build-system)
17685 (arguments
17686 '(#:phases
17687 (modify-phases %standard-phases
17688 (add-after 'unpack 'patch
17689 (lambda* (#:key inputs #:allow-other-keys)
17690 (substitute* "yq/__init__.py"
17691 (("Popen\\(\\[\"jq")
17692 (string-append
17693 "Popen([\""
17694 (assoc-ref inputs "jq")
17695 "/bin/jq")))
17696 #t)))))
17697 (inputs
17698 `(("python-argcomplete" ,python-argcomplete)
17699 ("python-pyyaml" ,python-pyyaml)
17700 ("python-xmltodict" ,python-xmltodict)
17701 ("jq" ,jq)))
17702 (native-inputs
17703 `(("python-coverage" ,python-coverage)
17704 ("python-flake8" ,python-flake8)
17705 ("python-wheel" ,python-wheel)))
17706 (home-page "https://github.com/kislyuk/yq")
17707 (synopsis "Command-line YAML/XML processor")
17708 (description
17709 "This package provides @command{yq} and @command{xq} for processing YAML
17710 and XML respectively. The processing is done through @{jq}, @command{jq}
17711 filters can be used to process the data as it passes through.")
17712 (license license:asl2.0)))
17713
17714 (define-public python-gyp
17715 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17716 (revision "0"))
17717 (package
17718 (name "python-gyp")
17719 ;; Google does not release versions,
17720 ;; based on second most recent commit date.
17721 (version (git-version "0.0.0" revision commit))
17722 (source
17723 (origin
17724 ;; Google does not release tarballs,
17725 ;; git checkout is needed.
17726 (method git-fetch)
17727 (uri (git-reference
17728 (url "https://chromium.googlesource.com/external/gyp")
17729 (commit commit)))
17730 (file-name (git-file-name name version))
17731 (sha256
17732 (base32
17733 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17734 (build-system python-build-system)
17735 (home-page "https://gyp.gsrc.io/")
17736 (synopsis "GYP is a Meta-Build system")
17737 (description
17738 "GYP builds build systems for large, cross platform applications.
17739 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17740 files, and Makefiles.")
17741 (license license:bsd-3))))
17742
17743 (define-public python2-gyp
17744 (package-with-python2 python-gyp))
17745
17746 (define-public python-whatever
17747 (package
17748 (name "python-whatever")
17749 (version "0.6")
17750 (source
17751 (origin
17752 (method git-fetch)
17753 (uri (git-reference
17754 (url "https://github.com/Suor/whatever")
17755 (commit version)))
17756 (file-name (git-file-name name version))
17757 (sha256
17758 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17759 (build-system python-build-system)
17760 (arguments
17761 `(#:phases
17762 (modify-phases %standard-phases
17763 (replace 'check
17764 (lambda _
17765 (invoke "py.test"))))))
17766 (native-inputs
17767 `(("python-pytest" ,python-pytest)))
17768 (home-page "https://github.com/Suor/whatever")
17769 (synopsis "Make anonymous functions by partial application of operators")
17770 (description "@code{whatever} provides an easy way to make anonymous
17771 functions by partial application of operators.")
17772 (license license:bsd-3)))
17773
17774 (define-public python2-whatever
17775 (package-with-python2 python-whatever))
17776
17777 (define-public python-funcy
17778 (package
17779 (name "python-funcy")
17780 (version "1.11")
17781 (source
17782 (origin
17783 (method git-fetch)
17784 (uri (git-reference
17785 (url "https://github.com/Suor/funcy")
17786 (commit version)))
17787 (sha256
17788 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17789 (file-name (git-file-name name version))))
17790 (build-system python-build-system)
17791 (arguments
17792 `(#:phases
17793 (modify-phases %standard-phases
17794 (replace 'check
17795 (lambda _
17796 (invoke "py.test"))))))
17797 (native-inputs
17798 `(("python-pytest" ,python-pytest)
17799 ("python-whatever" ,python-whatever)))
17800 (home-page "https://github.com/Suor/funcy")
17801 (synopsis "Functional tools")
17802 (description "@code{funcy} is a library that provides functional tools.
17803 Examples are:
17804 @enumerate
17805 @item merge - Merges collections of the same type
17806 @item walk - Type-preserving map
17807 @item select - Selects a part of a collection
17808 @item take - Takes the first n items of a collection
17809 @item first - Takes the first item of a collection
17810 @item remove - Predicated-removes items of a collection
17811 @item concat - Concatenates two collections
17812 @item flatten - Flattens a collection with subcollections
17813 @item distinct - Returns only distinct items
17814 @item split - Predicated-splits a collection
17815 @item split_at - Splits a collection at a given item
17816 @item group_by - Groups items by group
17817 @item pairwise - Pairs off adjacent items
17818 @item partial - Partially-applies a function
17819 @item curry - Curries a function
17820 @item compose - Composes functions
17821 @item complement - Complements a predicate
17822 @item all_fn - \"all\" with predicate
17823 @end enumerate")
17824 (license license:bsd-3)))
17825
17826 (define-public python2-funcy
17827 (package-with-python2 python-funcy))
17828
17829 (define-public python-isoweek
17830 (package
17831 (name "python-isoweek")
17832 (version "1.3.3")
17833 (source
17834 (origin
17835 (method url-fetch)
17836 (uri (pypi-uri "isoweek" version))
17837 (sha256
17838 (base32
17839 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17840 (build-system python-build-system)
17841 (home-page "https://github.com/gisle/isoweek")
17842 (synopsis "Objects representing a week")
17843 (description "The @code{isoweek} module provide the class Week that
17844 implements the week definition of ISO 8601. This standard also defines
17845 a notation for identifying weeks; yyyyWww (where the W is a literal).
17846 Week instances stringify to this form.")
17847 (license license:bsd-3)))
17848
17849 (define-public python2-isoweek
17850 (package-with-python2 python-isoweek))
17851
17852 (define-public python-pyzbar
17853 (package
17854 (name "python-pyzbar")
17855 (version "0.1.8")
17856 (source
17857 (origin
17858 ;; There's no source tarball on PyPI.
17859 (method git-fetch)
17860 (uri (git-reference
17861 (url "https://github.com/NaturalHistoryMuseum/pyzbar")
17862 (commit (string-append "v" version))))
17863 (file-name (git-file-name name version))
17864 (sha256
17865 (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
17866 (build-system python-build-system)
17867 (arguments
17868 `(#:phases
17869 (modify-phases %standard-phases
17870 (add-after 'unpack 'remove-failing-test
17871 (lambda _
17872 ;; This tests if find_library was called once, but we remove
17873 ;; the call in the stage below to make the library find libzbar.
17874 (delete-file "pyzbar/tests/test_zbar_library.py")
17875 #t))
17876 (add-before 'build 'set-library-file-name
17877 (lambda* (#:key inputs #:allow-other-keys)
17878 (let ((libzbar (assoc-ref inputs "zbar")))
17879 (substitute* "pyzbar/zbar_library.py"
17880 (("find_library\\('zbar'\\)")
17881 (string-append "'" libzbar "/lib/libzbar.so.0'")))
17882 #t))))))
17883 (native-inputs
17884 `(("pkg-config" ,pkg-config)
17885 ("python-numpy" ,python-numpy)
17886 ("python-pillow" ,python-pillow)))
17887 (inputs
17888 `(("zbar" ,zbar)))
17889 (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
17890 (synopsis "Read one-dimensional barcodes and QR codes")
17891 (description
17892 "Read one-dimensional barcodes and QR codes using the zbar library.
17893
17894 Features:
17895
17896 @itemize
17897 @item Pure python
17898 @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
17899 @item Decodes locations of barcodes
17900 @item No dependencies, other than the zbar library itself
17901 @end itemize")
17902 (license license:expat)))
17903
17904 (define-public python-tokenize-rt
17905 (package
17906 (name "python-tokenize-rt")
17907 (version "2.0.1")
17908 (source
17909 (origin
17910 (method url-fetch)
17911 (uri (pypi-uri "tokenize-rt" version))
17912 (sha256
17913 (base32
17914 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17915 (build-system python-build-system)
17916 (home-page "https://github.com/asottile/tokenize-rt")
17917 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17918 (description
17919 "This Python library is a wrapper around @code{tokenize} from the Python
17920 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17921 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17922 and @code{tokens_to_src} to roundtrip.")
17923 (license license:expat)))
17924
17925 (define-public python-future-fstrings
17926 (package
17927 (name "python-future-fstrings")
17928 (version "0.4.1")
17929 (source
17930 (origin
17931 (method url-fetch)
17932 (uri (pypi-uri "future_fstrings" version))
17933 (sha256
17934 (base32
17935 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17936 (build-system python-build-system)
17937 (propagated-inputs
17938 `(("python-tokenize-rt" ,python-tokenize-rt)))
17939 (home-page "https://github.com/asottile/future-fstrings")
17940 (synopsis "Backport of fstrings to Python < 3.6")
17941 (description
17942 "This package provides a UTF-8 compatible encoding
17943 @code{future_fstrings}, which performs source manipulation. It decodes the
17944 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17945 @code{f} strings.")
17946 (license license:expat)))
17947
17948 (define-public python-typed-ast
17949 (package
17950 (name "python-typed-ast")
17951 (version "1.4.0")
17952 (source
17953 (origin
17954 (method git-fetch)
17955 (uri (git-reference
17956 (url "https://github.com/python/typed_ast")
17957 (commit version)))
17958 (sha256
17959 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17960 (file-name (git-file-name name version))))
17961 (build-system python-build-system)
17962 (arguments
17963 `(#:modules ((guix build utils)
17964 (guix build python-build-system)
17965 (ice-9 ftw)
17966 (srfi srfi-1)
17967 (srfi srfi-26))
17968 #:phases
17969 (modify-phases %standard-phases
17970 (replace 'check
17971 (lambda _
17972 (let ((cwd (getcwd)))
17973 (setenv "PYTHONPATH"
17974 (string-append cwd "/build/"
17975 (find (cut string-prefix? "lib" <>)
17976 (scandir (string-append cwd "/build")))
17977 ":"
17978 (getenv "PYTHONPATH"))))
17979 (invoke "pytest")
17980 #t)))))
17981 (native-inputs `(("python-pytest" ,python-pytest)))
17982 (home-page "https://github.com/python/typed_ast")
17983 (synopsis "Fork of Python @code{ast} modules with type comment support")
17984 (description "This package provides a parser similar to the standard
17985 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17986 include PEP 484 type comments and are independent of the version of Python
17987 under which they are run. The @code{typed_ast} parsers produce the standard
17988 Python AST (plus type comments), and are both fast and correct, as they are
17989 based on the CPython 2.7 and 3.7 parsers.")
17990 ;; See the file "LICENSE" for the details.
17991 (license (list license:psfl
17992 license:asl2.0
17993 license:expat)))) ;ast27/Parser/spark.py
17994
17995 (define-public python-typing
17996 (package
17997 (name "python-typing")
17998 (version "3.7.4.3")
17999 (source
18000 (origin
18001 (method url-fetch)
18002 (uri (pypi-uri "typing" version))
18003 (sha256
18004 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
18005 (build-system python-build-system)
18006 (home-page "https://docs.python.org/3/library/typing.html")
18007 (synopsis "Type hints for Python")
18008 (description "This is a backport of the standard library @code{typing}
18009 module to Python versions older than 3.5. Typing defines a standard notation
18010 for Python function and variable type annotations. The notation can be used
18011 for documenting code in a concise, standard format, and it has been designed
18012 to also be used by static and runtime type checkers, static analyzers, IDEs
18013 and other tools.")
18014 (license license:psfl)))
18015
18016 (define-public python2-typing
18017 (package-with-python2 python-typing))
18018
18019 (define-public python-typing-extensions
18020 (package
18021 (name "python-typing-extensions")
18022 (version "3.7.4.2")
18023 (source
18024 (origin
18025 (method url-fetch)
18026 (uri (pypi-uri "typing_extensions" version))
18027 (sha256
18028 (base32
18029 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
18030 (build-system python-build-system)
18031 (home-page
18032 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
18033 (synopsis "Experimental type hints for Python")
18034 (description
18035 "The typing_extensions module contains additional @code{typing} hints not
18036 yet present in the of the @code{typing} standard library.
18037 Included are implementations of:
18038 @enumerate
18039 @item ClassVar
18040 @item ContextManager
18041 @item Counter
18042 @item DefaultDict
18043 @item Deque
18044 @item NewType
18045 @item NoReturn
18046 @item overload
18047 @item Protocol
18048 @item runtime
18049 @item Text
18050 @item Type
18051 @item TYPE_CHECKING
18052 @item AsyncGenerator
18053 @end enumerate\n")
18054 (license license:psfl)))
18055
18056 (define-public bpython
18057 (package
18058 (name "bpython")
18059 (version "0.18")
18060 (source
18061 (origin
18062 (method url-fetch)
18063 (uri (pypi-uri "bpython" version))
18064 (sha256
18065 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
18066 (build-system python-build-system)
18067 (arguments
18068 `(#:phases
18069 (modify-phases %standard-phases
18070 (add-after 'unpack 'remove-failing-test
18071 (lambda _
18072 ;; Remove failing test. FIXME: make it pass
18073 (delete-file "bpython/test/test_args.py")
18074 #t))
18075 (add-after 'wrap 'add-aliases
18076 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
18077 (lambda* (#:key outputs #:allow-other-keys)
18078 (let ((out (assoc-ref outputs "out")))
18079 (for-each
18080 (lambda (old new)
18081 (symlink old (string-append out "/bin/" new)))
18082 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
18083 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
18084 #t)))))
18085 (propagated-inputs
18086 `(("python-pygments" ,python-pygments)
18087 ("python-requests" ,python-requests)
18088 ("python-babel" ,python-babel) ; optional, for internationalization
18089 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
18090 ("python-greenlet" ,python-greenlet)
18091 ("python-urwid" ,python-urwid) ; for bpython-urwid only
18092 ("python-six" ,python-six)))
18093 (native-inputs
18094 `(("python-sphinx" ,python-sphinx)
18095 ("python-mock" ,python-mock)))
18096 (home-page "https://bpython-interpreter.org/")
18097 (synopsis "Fancy interface to the Python interpreter")
18098 (description "Bpython is a fancy interface to the Python
18099 interpreter. bpython's main features are
18100
18101 @enumerate
18102 @item in-line syntax highlighting,
18103 @item readline-like autocomplete with suggestions displayed as you type,
18104 @item expected parameter list for any Python function,
18105 @item \"rewind\" function to pop the last line of code from memory and
18106 re-evaluate,
18107 @item send the code you've entered off to a pastebin,
18108 @item save the code you've entered to a file, and
18109 @item auto-indentation.
18110 @end enumerate")
18111 (license license:expat)))
18112
18113 (define-public bpython2
18114 (let ((base (package-with-python2
18115 (strip-python2-variant bpython))))
18116 (package (inherit base)
18117 (name "bpython2")
18118 (arguments
18119 `(#:python ,python-2
18120 #:phases
18121 (modify-phases %standard-phases
18122 (add-after 'unpack 'remove-failing-test
18123 (lambda _
18124 ;; Remove failing test. FIXME: make it pass
18125 (delete-file "bpython/test/test_args.py")
18126 ;; Disable failing test-cases (renaming inhibits they are
18127 ;; discovered)
18128 (substitute* "bpython/test/test_curtsies_repl.py"
18129 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
18130 (string-append a "xxx_off_" b))
18131 (("^(\\s*def )(test_complex\\W)" _ a b)
18132 (string-append a "xxx_off_" b)))
18133 #t))
18134 (add-before 'build 'rename-scripts
18135 ;; rename the scripts to bypthon2, bpdb2, etc.
18136 (lambda _
18137 (substitute* "setup.py"
18138 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
18139 (string-append name "2" rest "\n"))
18140 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
18141 (string-append name "2" (or sub "") rest "\n")))
18142 #t))))))))
18143
18144 (define-public python-pyinotify
18145 (package
18146 (name "python-pyinotify")
18147 (version "0.9.6")
18148 (source (origin
18149 (method url-fetch)
18150 (uri (pypi-uri "pyinotify" version))
18151 (sha256
18152 (base32
18153 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
18154 (build-system python-build-system)
18155 (arguments `(#:tests? #f)) ;no tests
18156 (home-page "https://github.com/seb-m/pyinotify")
18157 (synopsis "Python library for monitoring inotify events")
18158 (description
18159 "@code{pyinotify} provides a Python interface for monitoring
18160 file system events on Linux.")
18161 (license license:expat)))
18162
18163 (define-public python2-pyinotify
18164 (package-with-python2 python-pyinotify))
18165
18166 ;; Ada parser uses this version.
18167 (define-public python2-quex-0.67.3
18168 (package
18169 (name "python2-quex")
18170 (version "0.67.3")
18171 (source
18172 (origin
18173 (method url-fetch)
18174 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
18175 (version-major+minor version)
18176 "/quex-" version ".zip"))
18177 (sha256
18178 (base32
18179 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
18180 (build-system python-build-system)
18181 (native-inputs
18182 `(("unzip" ,unzip)))
18183 (arguments
18184 `(#:python ,python-2
18185 #:tests? #f
18186 #:phases
18187 (modify-phases %standard-phases
18188 (delete 'configure)
18189 (delete 'build)
18190 (replace 'install
18191 (lambda* (#:key outputs #:allow-other-keys)
18192 (let* ((out (assoc-ref outputs "out"))
18193 (share/quex (string-append out "/share/quex"))
18194 (bin (string-append out "/bin")))
18195 (copy-recursively "." share/quex)
18196 (mkdir-p bin)
18197 (symlink (string-append share/quex "/quex-exe.py")
18198 (string-append bin "/quex"))
18199 #t))))))
18200 (native-search-paths
18201 (list (search-path-specification
18202 (variable "QUEX_PATH")
18203 (files '("share/quex")))))
18204 (home-page "http://quex.sourceforge.net/")
18205 (synopsis "Lexical analyzer generator in Python")
18206 (description "@code{quex} is a lexical analyzer generator in Python.")
18207 (license license:lgpl2.1+))) ; Non-military
18208
18209 (define-public python2-quex
18210 (package (inherit python2-quex-0.67.3)
18211 (name "python2-quex")
18212 (version "0.68.1")
18213 (source
18214 (origin
18215 (method url-fetch)
18216 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
18217 (sha256
18218 (base32
18219 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
18220 (file-name (string-append name "-" version ".tar.gz"))))))
18221
18222 (define-public python-more-itertools
18223 (package
18224 (name "python-more-itertools")
18225 (version "8.2.0")
18226 (source
18227 (origin
18228 (method url-fetch)
18229 (uri (pypi-uri "more-itertools" version))
18230 (sha256
18231 (base32
18232 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
18233 (build-system python-build-system)
18234 (home-page "https://github.com/erikrose/more-itertools")
18235 (synopsis "More routines for operating on iterables, beyond itertools")
18236 (description "Python's built-in @code{itertools} module implements a
18237 number of iterator building blocks inspired by constructs from APL, Haskell,
18238 and SML. @code{more-itertools} includes additional building blocks for
18239 working with iterables.")
18240 (properties `((python2-variant . ,(delay python2-more-itertools))))
18241 (license license:expat)))
18242
18243 ;; The 5.x series are the last versions supporting Python 2.7.
18244 (define-public python2-more-itertools
18245 (package
18246 (inherit python-more-itertools)
18247 (name "python2-more-itertools")
18248 (version "5.0.0")
18249 (source (origin
18250 (method url-fetch)
18251 (uri (pypi-uri "more-itertools" version))
18252 (sha256
18253 (base32
18254 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
18255 (arguments
18256 `(#:python ,python-2))
18257 (propagated-inputs
18258 `(("python2-six" ,python2-six-bootstrap)))))
18259
18260 (define-public python-latexcodec
18261 (package
18262 (name "python-latexcodec")
18263 (version "1.0.7")
18264 (source
18265 (origin
18266 (method url-fetch)
18267 (uri (pypi-uri "latexcodec" version))
18268 (sha256
18269 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
18270 (build-system python-build-system)
18271 (inputs
18272 `(("python-six" ,python-six)))
18273 (home-page "https://readthedocs.org/projects/latexcodec/")
18274 (synopsis "Work with LaTeX code in Python")
18275 (description "Lexer and codec to work with LaTeX code in Python.")
18276 (license license:expat)))
18277
18278 (define-public python-pybtex
18279 (package
18280 (name "python-pybtex")
18281 (version "0.22.2")
18282 (source
18283 (origin
18284 (method url-fetch)
18285 (uri (pypi-uri "pybtex" version))
18286 (sha256
18287 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
18288 (build-system python-build-system)
18289 (native-inputs
18290 `(("python-nose" ,python-nose)))
18291 (inputs
18292 `(("python-latexcodec" ,python-latexcodec)
18293 ("python-pyyaml" ,python-pyyaml)
18294 ("python-six" ,python-six)))
18295 (arguments
18296 `(#:test-target "nosetests"))
18297 (home-page "https://pybtex.org/")
18298 (synopsis "BibTeX-compatible bibliography processor")
18299 (description "Pybtex is a BibTeX-compatible bibliography processor written
18300 in Python. You can simply type pybtex instead of bibtex.")
18301 (license license:expat)))
18302
18303 (define-public python-onetimepass
18304 (package
18305 (name "python-onetimepass")
18306 (version "1.0.1")
18307 (source
18308 (origin
18309 (method url-fetch)
18310 (uri (pypi-uri "onetimepass" version))
18311 (sha256
18312 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
18313 (build-system python-build-system)
18314 (propagated-inputs `(("python-six" ,python-six)))
18315 (home-page "https://github.com/tadeck/onetimepass/")
18316 (synopsis "One-time password library")
18317 (description "Python one-time password library for HMAC-based (HOTP) and
18318 time-based (TOTP) passwords.")
18319 (license license:expat)))
18320
18321 (define-public python-parso
18322 (package
18323 (name "python-parso")
18324 (version "0.7.1")
18325 (source
18326 (origin
18327 (method url-fetch)
18328 (uri (pypi-uri "parso" version))
18329 (sha256
18330 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
18331 (native-inputs
18332 `(("python-pytest" ,python-pytest)))
18333 (build-system python-build-system)
18334 (arguments
18335 `(#:phases (modify-phases %standard-phases
18336 (replace 'check
18337 (lambda _ (invoke "pytest" "-vv"))))))
18338 (home-page "https://github.com/davidhalter/parso")
18339 (synopsis "Python Parser")
18340 (description "Parso is a Python parser that supports error recovery and
18341 round-trip parsing for different Python versions (in multiple Python versions).
18342 Parso is also able to list multiple syntax errors in your Python file.")
18343 (license license:expat)))
18344
18345 (define-public python2-parso
18346 (package-with-python2 python-parso))
18347
18348 (define-public python-async-generator
18349 (package
18350 (name "python-async-generator")
18351 (version "1.10")
18352 (source
18353 (origin
18354 (method url-fetch)
18355 (uri (pypi-uri "async_generator" version))
18356 (sha256
18357 (base32
18358 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
18359 (build-system python-build-system)
18360 (native-inputs
18361 `(("python-pytest" ,python-pytest)))
18362 (home-page "https://github.com/python-trio/async_generator")
18363 (synopsis "Async generators and context managers for Python 3.5+")
18364 (description "@code{async_generator} back-ports Python 3.6's native async
18365 generators and Python 3.7's context managers into Python 3.5.")
18366 ;; Dual licensed.
18367 (license (list license:expat license:asl2.0))))
18368
18369 (define-public python-async-timeout
18370 (package
18371 (name "python-async-timeout")
18372 (version "3.0.1")
18373 (source
18374 (origin
18375 (method url-fetch)
18376 (uri (pypi-uri "async-timeout" version))
18377 (sha256
18378 (base32
18379 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
18380 (build-system python-build-system)
18381 (home-page "https://github.com/aio-libs/async_timeout/")
18382 (synopsis "Timeout context manager for asyncio programs")
18383 (description "@code{async-timeout} provides a timeout timeout context
18384 manager compatible with @code{asyncio}.")
18385 (license license:asl2.0)))
18386
18387 (define-public python-glob2
18388 (package
18389 (name "python-glob2")
18390 (version "0.7")
18391 (source
18392 (origin
18393 (method git-fetch)
18394 (uri (git-reference
18395 (url "https://github.com/miracle2k/python-glob2")
18396 (commit (string-append "v" version))))
18397 (file-name (git-file-name name version))
18398 (sha256
18399 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
18400 (build-system python-build-system)
18401 (home-page "https://github.com/miracle2k/python-glob2/")
18402 (synopsis "Extended Version of the python buildin glob module")
18403 (description "This is an extended version of the Python
18404 @url{http://docs.python.org/library/glob.html, built-in glob module} which
18405 adds:
18406
18407 @itemize
18408 @item The ability to capture the text matched by glob patterns, and return
18409 those matches alongside the file names.
18410 @item A recursive @code{**} globbing syntax, akin for example to the
18411 @code{globstar} option of Bash.
18412 @item The ability to replace the file system functions used, in order to glob
18413 on virtual file systems.
18414 @item Compatible with Python 2 and Python 3 (tested with 3.3).
18415 @end itemize
18416
18417 Glob2 currently based on the glob code from Python 3.3.1.")
18418 (license license:bsd-2)))
18419
18420 (define-public python2-glob2
18421 (package-with-python2 python-glob2))
18422
18423 (define-public python-gipc
18424 (package
18425 (name "python-gipc")
18426 (version "0.6.0")
18427 (source
18428 (origin
18429 (method url-fetch)
18430 (uri (pypi-uri "gipc" version ".zip"))
18431 (sha256
18432 (base32
18433 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
18434 (build-system python-build-system)
18435 (native-inputs
18436 `(("unzip" ,unzip)))
18437 (propagated-inputs
18438 `(("python-gevent" ,python-gevent)))
18439 (home-page "https://gehrcke.de/gipc/")
18440 (synopsis "Child process management in the context of gevent")
18441 (description "Usage of Python's multiprocessing package in a
18442 gevent-powered application may raise problems. With @code{gipc},
18443 process-based child processes can safely be created anywhere within a
18444 gevent-powered application.")
18445 (license license:expat)))
18446
18447 (define-public python2-gipc
18448 (package-with-python2 python-gipc))
18449
18450 (define-public python-beautifultable
18451 (package
18452 (name "python-beautifultable")
18453 (version "1.0.0")
18454 (source
18455 (origin
18456 (method url-fetch)
18457 (uri (pypi-uri "beautifultable" version))
18458 (sha256
18459 (base32
18460 "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
18461 (build-system python-build-system)
18462 (propagated-inputs
18463 `(("python-wcwidth" ,python-wcwidth)))
18464 (arguments
18465 `(#:phases
18466 (modify-phases %standard-phases
18467 (add-after 'unpack 'patch-setup.py
18468 (lambda _
18469 (substitute* "setup.py"
18470 (("setup\\(")
18471 "setup(\n test_suite=\"test\",")))))))
18472 (home-page "https://github.com/pri22296/beautifultable")
18473 (synopsis "Print ASCII tables for terminals")
18474 (description "@code{python-beautifultable} provides a class for easily
18475 printing tabular data in a visually appealing ASCII format to a terminal.
18476
18477 Features include, but are not limited to:
18478 @itemize
18479 @item Full customization of the look and feel of the table
18480 @item Row and column accessors.
18481 @item Full support for colors using ANSI sequences or any library.
18482 @item Plenty of predefined styles and option to create custom ones.
18483 @item Support for Unicode characters.
18484 @item Supports streaming table when data is slow to retrieve.
18485 @end itemize")
18486 (license license:expat)))
18487
18488 (define-public python-globber
18489 (package
18490 (name "python-globber")
18491 (version "0.2.1")
18492 (source
18493 (origin
18494 (method git-fetch)
18495 (uri (git-reference
18496 (url "https://github.com/asharov/globber")
18497 (commit version)))
18498 (file-name (git-file-name name version))
18499 (sha256
18500 (base32
18501 "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
18502 (build-system python-build-system)
18503 (home-page "https://github.com/asharov/globber")
18504 (synopsis "Library for string matching with glob patterns")
18505 (description
18506 "Globber is a Python library for matching file names against glob patterns.
18507 In contrast to other glob-matching libraries, it matches arbitrary strings and
18508 doesn't require the matched names to be existing files. In addition, it
18509 supports the globstar @code{**} operator to match an arbitrary number of
18510 path components.")
18511 (license license:asl2.0)))
18512
18513 (define-public python-git-hammer
18514 (package
18515 (name "python-git-hammer")
18516 (version "0.3.1")
18517 (source
18518 (origin
18519 (method git-fetch)
18520 (uri (git-reference
18521 (url "https://github.com/asharov/git-hammer")
18522 (commit version)))
18523 (file-name (git-file-name name version))
18524 (sha256
18525 (base32
18526 "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
18527 (build-system python-build-system)
18528 (arguments
18529 `(#:phases
18530 (modify-phases %standard-phases
18531 (add-after 'unpack 'patch-setup.py
18532 (lambda _
18533 (substitute* "setup.py"
18534 (("setup\\(")
18535 "setup(\n test_suite=\"test\",")))))))
18536 (propagated-inputs
18537 `(("python-beautifultable" ,python-beautifultable)
18538 ("python-dateutil" ,python-dateutil)
18539 ("python-gitpython" ,python-gitpython)
18540 ("python-globber" ,python-globber)
18541 ("python-matplotlib" ,python-matplotlib)
18542 ("python-sqlalchemy" ,python-sqlalchemy)
18543 ("python-sqlalchemy-utils"
18544 ,python-sqlalchemy-utils)))
18545 (home-page "https://github.com/asharov/git-hammer")
18546 (synopsis "Provide statistics for git repositories")
18547 (description
18548 "Git Hammer is a statistics tool for projects in git repositories.
18549 Its major feature is tracking the number of lines authored by each person for every
18550 commit, but it also includes some other useful statistics.")
18551 (license license:asl2.0)))
18552
18553 (define-public python-fusepy
18554 (package
18555 (name "python-fusepy")
18556 (version "2.0.4")
18557 (source
18558 (origin
18559 (method url-fetch)
18560 (uri (pypi-uri "fusepy" version))
18561 (sha256
18562 (base32
18563 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
18564 (build-system python-build-system)
18565 (arguments
18566 `(#:phases
18567 (modify-phases %standard-phases
18568 (add-before 'build 'set-library-file-name
18569 (lambda* (#:key inputs #:allow-other-keys)
18570 (let ((fuse (assoc-ref inputs "fuse")))
18571 (substitute* "fuse.py"
18572 (("find_library\\('fuse'\\)")
18573 (string-append "'" fuse "/lib/libfuse.so'")))
18574 #t))))))
18575 (propagated-inputs
18576 `(("fuse" ,fuse)))
18577 (home-page "https://github.com/fusepy/fusepy")
18578 (synopsis "Simple ctypes bindings for FUSE")
18579 (description "Python module that provides a simple interface to FUSE and
18580 MacFUSE. The binding is created using the standard @code{ctypes} library.")
18581 (license license:isc)))
18582
18583 (define-public python2-fusepy
18584 (package-with-python2 python-fusepy))
18585
18586 (define-public python-fusepyng
18587 (package
18588 (name "python-fusepyng")
18589 (version "1.0.7")
18590 (source
18591 (origin
18592 (method url-fetch)
18593 (uri (pypi-uri "fusepyng" version))
18594 (sha256
18595 (base32
18596 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
18597 (build-system python-build-system)
18598 (arguments
18599 '(#:phases
18600 (modify-phases %standard-phases
18601 (add-after 'unpack 'set-libfuse-path
18602 (lambda* (#:key inputs #:allow-other-keys)
18603 (let ((fuse (assoc-ref inputs "fuse")))
18604 (substitute* "fusepyng.py"
18605 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
18606 (string-append "\"" fuse "/lib/libfuse.so\""))))
18607 #t)))))
18608 (inputs
18609 `(("fuse" ,fuse)))
18610 (propagated-inputs
18611 `(("python-paramiko" ,python-paramiko)))
18612 (home-page "https://github.com/rianhunter/fusepyng")
18613 (synopsis "Simple ctypes bindings for FUSE")
18614 (description "@code{fusepyng} is a Python module that provides a simple
18615 interface to FUSE on various operating systems. It's just one file and is
18616 implemented using @code{ctypes}.")
18617 (license license:isc)))
18618
18619 (define-public python2-gdrivefs
18620 (package
18621 (name "python2-gdrivefs")
18622 (version "0.14.9")
18623 (source
18624 (origin
18625 (method url-fetch)
18626 (uri (pypi-uri "gdrivefs" version))
18627 (sha256
18628 (base32
18629 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
18630 (build-system python-build-system)
18631 (arguments
18632 `(#:python ,python-2
18633 #:phases
18634 (modify-phases %standard-phases
18635 (add-before 'build 'patch-setup-py
18636 (lambda _
18637 ;; Update requirements from dependency==version
18638 ;; to dependency>=version
18639 (substitute* "gdrivefs/resources/requirements.txt"
18640 (("==") ">="))
18641 #t)))))
18642 (native-inputs
18643 `(("python2-gipc" ,python2-gipc)
18644 ("python2-gevent" ,python2-gevent)
18645 ("python2-greenlet" ,python2-greenlet)
18646 ("python2-httplib2" ,python2-httplib2)
18647 ("python2-uritemplate" ,python2-uritemplate)
18648 ("python2-oauth2client" ,python2-oauth2client)
18649 ("python2-six" ,python2-six)))
18650 (propagated-inputs
18651 `(("python2-dateutil" ,python2-dateutil)
18652 ("python2-fusepy" ,python2-fusepy)
18653 ("python2-google-api-client" ,python2-google-api-client)))
18654 (home-page "https://github.com/dsoprea/GDriveFS")
18655 (synopsis "Mount Google Drive as a local file system")
18656 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
18657 under Python 2.7.")
18658 (license license:gpl2)))
18659
18660 (define-public python-userspacefs
18661 (package
18662 (name "python-userspacefs")
18663 (version "1.0.13")
18664 (source
18665 (origin
18666 (method url-fetch)
18667 (uri (pypi-uri "userspacefs" version))
18668 (sha256
18669 (base32
18670 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
18671 (build-system python-build-system)
18672 (propagated-inputs
18673 `(("python-fusepyng" ,python-fusepyng)))
18674 (home-page "https://github.com/rianhunter/userspacefs")
18675 (synopsis "User-space file systems for Python")
18676 (description
18677 "@code{userspacefs} is a library that allows you to easily write
18678 user-space file systems in Python.")
18679 (license license:gpl3+)))
18680
18681 (define-public pybind11
18682 (package
18683 (name "pybind11")
18684 (version "2.4.3")
18685 (source (origin
18686 (method git-fetch)
18687 (uri (git-reference
18688 (url "https://github.com/pybind/pybind11")
18689 (commit (string-append "v" version))))
18690 (sha256
18691 (base32
18692 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18693 (file-name (git-file-name name version))))
18694 (build-system cmake-build-system)
18695 (native-inputs
18696 `(("python" ,python-wrapper)
18697
18698 ;; The following dependencies are used for tests.
18699 ("python-pytest" ,python-pytest)
18700 ("catch" ,catch-framework2-1)
18701 ("eigen" ,eigen)))
18702 (arguments
18703 `(#:configure-flags
18704 (list (string-append "-DCATCH_INCLUDE_DIR="
18705 (assoc-ref %build-inputs "catch")
18706 "/include/catch"))
18707
18708 #:phases (modify-phases %standard-phases
18709 (add-after 'install 'install-python
18710 (lambda* (#:key outputs #:allow-other-keys)
18711 (let ((out (assoc-ref outputs "out")))
18712 (with-directory-excursion "../source"
18713 (setenv "PYBIND11_USE_CMAKE" "yes")
18714 (invoke "python" "setup.py" "install"
18715 "--single-version-externally-managed"
18716 "--root=/"
18717 (string-append "--prefix=" out)))))))
18718
18719 #:test-target "check"))
18720 (home-page "https://github.com/pybind/pybind11/")
18721 (synopsis "Seamless operability between C++11 and Python")
18722 (description
18723 "@code{pybind11} is a lightweight header-only library that exposes C++
18724 types in Python and vice versa, mainly to create Python bindings of existing
18725 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18726 library: to minimize boilerplate code in traditional extension modules by
18727 inferring type information using compile-time introspection.")
18728 (license license:bsd-3)))
18729
18730 (define-public python-fasteners
18731 (package
18732 (name "python-fasteners")
18733 (version "0.15")
18734 (source
18735 (origin
18736 (method url-fetch)
18737 (uri (pypi-uri "fasteners" version))
18738 (sha256
18739 (base32
18740 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18741 (build-system python-build-system)
18742 (propagated-inputs
18743 `(("python-monotonic" ,python-monotonic)
18744 ("python-six" ,python-six)))
18745 (native-inputs
18746 `(("python-testtools" ,python-testtools)))
18747 (home-page "https://github.com/harlowja/fasteners")
18748 (synopsis "Python package that provides useful locks")
18749 (description
18750 "This package provides a Python program that provides following locks:
18751
18752 @itemize
18753 @item Locking decorator
18754 @item Reader-writer locks
18755 @item Inter-process locks
18756 @item Generic helpers
18757 @end itemize\n")
18758 (properties `((python2-variant . ,(delay python2-fasteners))))
18759 (license license:asl2.0)))
18760
18761 (define-public python2-fasteners
18762 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18763 (package
18764 (inherit base)
18765 (propagated-inputs
18766 `(("python2-futures" ,python2-futures)
18767 ,@(package-propagated-inputs base))))))
18768
18769 (define-public python-requests-file
18770 (package
18771 (name "python-requests-file")
18772 (version "1.4.3")
18773 (source
18774 (origin
18775 (method url-fetch)
18776 (uri (pypi-uri "requests-file" version))
18777 (sha256
18778 (base32
18779 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18780 (build-system python-build-system)
18781 (propagated-inputs
18782 `(("python-requests" ,python-requests)
18783 ("python-six" ,python-six)))
18784 (home-page
18785 "https://github.com/dashea/requests-file")
18786 (synopsis "File transport adapter for Requests")
18787 (description
18788 "Requests-File is a transport adapter for use with the Requests Python
18789 library to allow local file system access via @code{file://} URLs.")
18790 (license license:asl2.0)))
18791
18792 (define-public python2-requests-file
18793 (package-with-python2 python-requests-file))
18794
18795 (define-public python-identify
18796 (package
18797 (name "python-identify")
18798 (version "1.4.25")
18799 (source
18800 (origin
18801 ;; There are no tests in the PyPI tarball.
18802 (method git-fetch)
18803 (uri (git-reference
18804 (url "https://github.com/chriskuehl/identify")
18805 (commit (string-append "v" version))))
18806 (file-name (git-file-name name version))
18807 (sha256
18808 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18809 (build-system python-build-system)
18810 (arguments
18811 `(#:phases
18812 (modify-phases %standard-phases
18813 (replace 'check
18814 (lambda _
18815 (invoke "pytest" "-vv"))))))
18816 (native-inputs
18817 `(("python-coverage" ,python-coverage)
18818 ("python-pytest" ,python-pytest)))
18819 (propagated-inputs
18820 `(("python-editdistance" ,python-editdistance)))
18821 (home-page "https://github.com/chriskuehl/identify")
18822 (synopsis "File identification library for Python")
18823 (description
18824 "@code{identify} is a file identification library for Python. Given
18825 a file (or some information about a file), return a set of standardized tags
18826 identifying what the file is.")
18827 (license license:expat)))
18828
18829 (define-public python-tldextract
18830 (package
18831 (name "python-tldextract")
18832 (version "2.2.0")
18833 (source
18834 (origin
18835 (method url-fetch)
18836 (uri (pypi-uri "tldextract" version))
18837 (sha256
18838 (base32
18839 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18840 (build-system python-build-system)
18841 (native-inputs
18842 `(("python-pytest" ,python-pytest)
18843 ("python-responses" ,python-responses)))
18844 (propagated-inputs
18845 `(("python-idna" ,python-idna)
18846 ("python-requests" ,python-requests)
18847 ("python-requests-file" ,python-requests-file)))
18848 (home-page
18849 "https://github.com/john-kurkowski/tldextract")
18850 (synopsis
18851 "Separate the TLD from the registered domain and subdomains of a URL")
18852 (description
18853 "TLDExtract accurately separates the TLD from the registered domain and
18854 subdomains of a URL, using the Public Suffix List. By default, this includes
18855 the public ICANN TLDs and their exceptions. It can optionally support the
18856 Public Suffix List's private domains as well.")
18857 (license license:bsd-3)))
18858
18859 (define-public python2-tldextract
18860 (package-with-python2 python-tldextract))
18861
18862 (define-public python-nodeenv
18863 (package
18864 (name "python-nodeenv")
18865 (version "1.4.0")
18866 (source
18867 (origin
18868 ;; There's no tarball in PyPI.
18869 (method git-fetch)
18870 (uri (git-reference
18871 (url "https://github.com/ekalinin/nodeenv")
18872 (commit version)))
18873 (file-name (git-file-name name version))
18874 (sha256
18875 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18876 (build-system python-build-system)
18877 (arguments
18878 `(#:phases
18879 (modify-phases %standard-phases
18880 (replace 'check
18881 (lambda _
18882 ;; This test fails. It tries to open a network socket.
18883 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18884 (native-inputs
18885 `(("python-coverage" ,python-coverage)
18886 ("python-mock" ,python-mock)
18887 ("python-pytest" ,python-pytest)))
18888 (home-page "https://ekalinin.github.io/nodeenv/")
18889 (synopsis "Create isolated node.js environments")
18890 (description
18891 "Nodeenv (node.js virtual environment) is a tool to create isolated
18892 node.js environments. It creates an environment that has its own installation
18893 directories, that doesn't share libraries with other node.js virtual
18894 environments.")
18895 (license license:bsd-3)))
18896
18897 (define-public python-pynamecheap
18898 (package
18899 (name "python-pynamecheap")
18900 (version "0.0.3")
18901 (source
18902 (origin
18903 (method url-fetch)
18904 (uri (pypi-uri "PyNamecheap" version))
18905 (sha256
18906 (base32
18907 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18908 (build-system python-build-system)
18909 (propagated-inputs
18910 `(("python-requests" ,python-requests)))
18911 (home-page
18912 "https://github.com/Bemmu/PyNamecheap")
18913 (synopsis
18914 "Namecheap API client in Python")
18915 (description
18916 "PyNamecheap is a Namecheap API client in Python.")
18917 (license license:expat)))
18918
18919 (define-public python2-pynamecheap
18920 (package-with-python2 python-pynamecheap))
18921
18922 (define-public python-dns-lexicon
18923 (package
18924 (name "python-dns-lexicon")
18925 (version "2.4.0")
18926 (source
18927 (origin
18928 (method url-fetch)
18929 (uri (pypi-uri "dns-lexicon" version))
18930 (sha256
18931 (base32
18932 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18933 (build-system python-build-system)
18934 (arguments
18935 `(#:tests? #f)) ;requires internet access
18936 (propagated-inputs
18937 `(("python-future" ,python-future)
18938 ("python-pynamecheap" ,python-pynamecheap)
18939 ("python-requests" ,python-requests)
18940 ("python-tldextract" ,python-tldextract)
18941 ("python-urllib3" ,python-urllib3)))
18942 (home-page "https://github.com/AnalogJ/lexicon")
18943 (synopsis
18944 "Manipulate DNS records on various DNS providers")
18945 (description
18946 "Lexicon provides a way to manipulate DNS records on multiple DNS
18947 providers in a standardized way. It has a CLI but it can also be used as a
18948 Python library. It was designed to be used in automation, specifically with
18949 Let's Encrypt.")
18950 (license license:expat)))
18951
18952 (define-public python2-dns-lexicon
18953 (package-with-python2 python-dns-lexicon))
18954
18955 (define-public python-cfgv
18956 (package
18957 (name "python-cfgv")
18958 (version "3.1.0")
18959 (source
18960 (origin
18961 ;; There are no tests in the PyPI tarball.
18962 (method git-fetch)
18963 (uri (git-reference
18964 (url "https://github.com/asottile/cfgv")
18965 (commit (string-append "v" version))))
18966 (file-name (git-file-name name version))
18967 (sha256
18968 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18969 (build-system python-build-system)
18970 (arguments
18971 `(#:phases
18972 (modify-phases %standard-phases
18973 (replace 'check
18974 (lambda _
18975 (invoke "pytest" "-vv"))))))
18976 (native-inputs
18977 `(("python-covdefaults" ,python-covdefaults)
18978 ("python-coverage" ,python-coverage)
18979 ("python-pytest" ,python-pytest)))
18980 (home-page "https://github.com/asottile/cfgv")
18981 (synopsis "Configuration validation library")
18982 (description
18983 "This library helps to validate configuration files and produce human
18984 readable error messages.")
18985 (license license:expat)))
18986
18987 (define-public python-commandlines
18988 (package
18989 (name "python-commandlines")
18990 (version "0.4.1")
18991 (source
18992 (origin
18993 (method url-fetch)
18994 (uri (pypi-uri "commandlines" version))
18995 (sha256
18996 (base32
18997 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18998 (build-system python-build-system)
18999 (home-page "https://github.com/chrissimpkins/commandlines")
19000 (synopsis "Command line argument to object parsing library")
19001 (description
19002 "@code{Commandlines} is a Python library for command line application
19003 development that supports command line argument parsing, command string
19004 validation testing and application logic.")
19005 (license license:expat)))
19006
19007 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
19008 ;; python-numba. They have a very unflexible relationship.
19009 (define-public python-numba
19010 (package
19011 (name "python-numba")
19012 (version "0.51.2")
19013 (source
19014 (origin
19015 (method url-fetch)
19016 (uri (pypi-uri "numba" version))
19017 (sha256
19018 (base32
19019 "0s0777m8kq4l96i88zj78np7283v1n4878qfc1gvzb8l45bmkg8n"))))
19020 (build-system python-build-system)
19021 (arguments
19022 `(#:phases
19023 (modify-phases %standard-phases
19024 (add-after 'unpack 'disable-proprietary-features
19025 (lambda _
19026 (setenv "NUMBA_DISABLE_HSA" "1")
19027 (setenv "NUMBA_DISABLE_CUDA" "1")
19028 #t))
19029 (replace 'check
19030 (lambda* (#:key inputs outputs #:allow-other-keys)
19031 (add-installed-pythonpath inputs outputs)
19032 ;; Something is wrong with the PYTHONPATH when running the
19033 ;; tests from the build directory, as it complains about not being
19034 ;; able to import certain modules.
19035 (with-directory-excursion "/tmp"
19036 (setenv "HOME" (getcwd))
19037 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))))))
19038 (propagated-inputs
19039 `(("python-llvmlite" ,python-llvmlite)
19040 ("python-numpy" ,python-numpy)
19041 ("python-singledispatch" ,python-singledispatch)))
19042 (native-inputs ;for tests
19043 `(("python-jinja2" ,python-jinja2)
19044 ("python-pygments" ,python-pygments)))
19045 (home-page "https://numba.pydata.org")
19046 (synopsis "Compile Python code using LLVM")
19047 (description "Numba gives you the power to speed up your applications with
19048 high performance functions written directly in Python. With a few
19049 annotations, array-oriented and math-heavy Python code can be just-in-time
19050 compiled to native machine instructions, similar in performance to C, C++ and
19051 Fortran, without having to switch languages or Python interpreters.
19052
19053 Numba works by generating optimized machine code using the LLVM compiler
19054 infrastructure at import time, runtime, or statically (using the included pycc
19055 tool).")
19056 (license license:bsd-3)))
19057
19058 (define-public python-numcodecs
19059 (package
19060 (name "python-numcodecs")
19061 (version "0.6.4")
19062 (source
19063 (origin
19064 (method url-fetch)
19065 (uri (pypi-uri "numcodecs" version))
19066 (sha256
19067 (base32
19068 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
19069 (build-system python-build-system)
19070 (propagated-inputs
19071 `(("python-numpy" ,python-numpy)
19072 ("python-msgpack" ,python-msgpack)))
19073 (native-inputs
19074 `(("python-pytest" ,python-pytest)
19075 ("python-setuptools-scm" ,python-setuptools-scm)))
19076 (home-page "https://github.com/zarr-developers/numcodecs")
19077 (synopsis "Buffer compression and transformation codecs")
19078 (description
19079 "This Python package provides buffer compression and transformation
19080 codecs for use in data storage and communication applications.")
19081 (license license:expat)))
19082
19083 (define-public python-asciitree
19084 (package
19085 (name "python-asciitree")
19086 (version "0.3.3")
19087 (source
19088 (origin
19089 (method url-fetch)
19090 (uri (pypi-uri "asciitree" version))
19091 (sha256
19092 (base32
19093 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
19094 (build-system python-build-system)
19095 (home-page "https://github.com/mbr/asciitree")
19096 (synopsis "Draws ASCII trees")
19097 (description "This package draws tree structures using characters.")
19098 (license license:expat)))
19099
19100 (define-public python-zarr
19101 (package
19102 (name "python-zarr")
19103 (version "2.4.0")
19104 (source
19105 (origin
19106 (method url-fetch)
19107 (uri (pypi-uri "zarr" version))
19108 (sha256
19109 (base32
19110 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
19111 (build-system python-build-system)
19112 (arguments
19113 `(#:phases
19114 (modify-phases %standard-phases
19115 (add-after 'unpack 'disable-service-tests
19116 (lambda _
19117 (setenv "ZARR_TEST_ABS" "0")
19118 (setenv "ZARR_TEST_MONGO" "0")
19119 (setenv "ZARR_TEST_REDIS" "0")
19120 #t))
19121 (replace 'check
19122 (lambda _
19123 (invoke "pytest" "-vv" "-k" "not lmdb")
19124 #t)))))
19125 (propagated-inputs
19126 `(("python-asciitree" ,python-asciitree)
19127 ("python-fasteners" ,python-fasteners)
19128 ("python-numcodecs" ,python-numcodecs)
19129 ("python-numpy" ,python-numpy)))
19130 (native-inputs
19131 `(("python-pytest" ,python-pytest)
19132 ("python-setuptools-scm" ,python-setuptools-scm)))
19133 (home-page "https://github.com/zarr-developers/zarr-python")
19134 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
19135 (description
19136 "This package provides an implementation of chunked, compressed,
19137 N-dimensional arrays for Python.")
19138 (license license:expat)))
19139
19140 (define-public python-anndata
19141 (package
19142 (name "python-anndata")
19143 (version "0.7.1")
19144 (source
19145 (origin
19146 (method url-fetch)
19147 (uri (pypi-uri "anndata" version))
19148 (sha256
19149 (base32
19150 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
19151 (build-system python-build-system)
19152 (arguments
19153 `(#:phases
19154 (modify-phases %standard-phases
19155 (add-after 'unpack 'delete-inconvenient-tests
19156 (lambda _
19157 ;; This test depends on python-scikit-learn.
19158 (delete-file "anndata/tests/test_inplace_subset.py")
19159 #t))
19160 (delete 'check)
19161 (add-after 'install 'check
19162 (lambda* (#:key inputs outputs #:allow-other-keys)
19163 (add-installed-pythonpath inputs outputs)
19164 (invoke "pytest" "-vv"))))))
19165 (propagated-inputs
19166 `(("python-h5py" ,python-h5py)
19167 ("python-importlib-metadata" ,python-importlib-metadata)
19168 ("python-natsort" ,python-natsort)
19169 ("python-numcodecs" ,python-numcodecs)
19170 ("python-packaging" ,python-packaging)
19171 ("python-pandas" ,python-pandas)
19172 ("python-scipy" ,python-scipy)
19173 ("python-zarr" ,python-zarr)))
19174 (native-inputs
19175 `(("python-joblib" ,python-joblib)
19176 ("python-pytest" ,python-pytest)
19177 ("python-setuptools-scm" ,python-setuptools-scm)))
19178 (home-page "https://github.com/theislab/anndata")
19179 (synopsis "Annotated data for data analysis pipelines")
19180 (description "Anndata is a package for simple (functional) high-level APIs
19181 for data analysis pipelines. In this context, it provides an efficient,
19182 scalable way of keeping track of data together with learned annotations and
19183 reduces the code overhead typically encountered when using a mostly
19184 object-oriented library such as @code{scikit-learn}.")
19185 (license license:bsd-3)))
19186
19187 (define-public python-dill
19188 (package
19189 (name "python-dill")
19190 (version "0.3.1.1")
19191 (source
19192 (origin
19193 (method url-fetch)
19194 (uri (pypi-uri "dill" version))
19195 (sha256
19196 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
19197 (build-system python-build-system)
19198 (arguments
19199 `(#:phases
19200 (modify-phases %standard-phases
19201 (replace 'check
19202 (lambda _
19203 (with-directory-excursion "/tmp"
19204 (invoke "nosetests" "-v"))
19205 #t)))))
19206 (native-inputs
19207 `(("python-nose" ,python-nose)))
19208 (home-page "https://pypi.org/project/dill/")
19209 (synopsis "Serialize all of Python")
19210 (description "Dill extends Python's @code{pickle} module for serializing
19211 and de-serializing Python objects to the majority of the built-in Python
19212 types. Dill provides the user the same interface as the @code{pickle} module,
19213 and also includes some additional features. In addition to pickling Python
19214 objects, @code{dill} provides the ability to save the state of an interpreter
19215 session in a single command. Hence, it would be feasible to save a
19216 interpreter session, close the interpreter, ship the pickled file to another
19217 computer, open a new interpreter, unpickle the session and thus continue from
19218 the saved state of the original interpreter session.")
19219 (license license:bsd-3)))
19220
19221 (define-public python-multiprocess
19222 (package
19223 (name "python-multiprocess")
19224 (version "0.70.9")
19225 (source
19226 (origin
19227 (method url-fetch)
19228 (uri (pypi-uri "multiprocess" version))
19229 (sha256
19230 (base32
19231 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
19232 (build-system python-build-system)
19233 (arguments
19234 `(#:phases
19235 (modify-phases %standard-phases
19236 (add-after 'unpack 'disable-broken-tests
19237 (lambda _
19238 ;; This test is broken as there is no keyboard interrupt.
19239 (substitute* "py3.7/multiprocess/tests/__init__.py"
19240 (("^(.*)def test_wait_result"
19241 line indent)
19242 (string-append indent
19243 "@unittest.skip(\"Disabled by Guix\")\n"
19244 line)))
19245 #t))
19246 ;; Tests must be run after installation.
19247 (delete 'check)
19248 (add-after 'install 'check
19249 (lambda* (#:key inputs outputs #:allow-other-keys)
19250 (add-installed-pythonpath inputs outputs)
19251 (invoke "python" "-m" "multiprocess.tests")
19252 #t)))))
19253 (propagated-inputs
19254 `(("python-dill" ,python-dill)))
19255 (home-page "https://pypi.org/project/multiprocess/")
19256 (synopsis "Multiprocessing and multithreading in Python")
19257 (description
19258 "This package is a fork of the multiprocessing Python package, a package
19259 which supports the spawning of processes using the API of the standard
19260 library's @code{threading} module.")
19261 (license license:bsd-3)))
19262
19263 (define-public python-toolz
19264 (package
19265 (name "python-toolz")
19266 (version "0.9.0")
19267 (source
19268 (origin
19269 (method url-fetch)
19270 (uri (pypi-uri "toolz" version))
19271 (sha256
19272 (base32
19273 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
19274 (build-system python-build-system)
19275 ;; FIXME: tests cannot be computed: "Can't perform this operation for
19276 ;; unregistered loader type"
19277 (arguments '(#:tests? #f))
19278 (home-page "https://github.com/pytoolz/toolz/")
19279 (synopsis "List processing tools and functional utilities")
19280 (description
19281 "This package provides a set of utility functions for iterators,
19282 functions, and dictionaries.")
19283 (license license:bsd-3)))
19284
19285 (define-public python2-toolz
19286 (package-with-python2 python-toolz))
19287
19288 (define-public python-cytoolz
19289 (package
19290 (name "python-cytoolz")
19291 (version "0.9.0.1")
19292 (source
19293 (origin
19294 (method url-fetch)
19295 (uri (pypi-uri "cytoolz" version))
19296 (sha256
19297 (base32
19298 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
19299 (build-system python-build-system)
19300 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
19301 ;; 'exceptions'"
19302 (arguments '(#:tests? #f))
19303 (propagated-inputs
19304 `(("python-toolz" ,python-toolz)))
19305 (native-inputs
19306 `(("python-cython" ,python-cython)))
19307 (home-page "https://github.com/pytoolz/cytoolz")
19308 (synopsis "High performance functional utilities")
19309 (description
19310 "The cytoolz package implements the same API as provided by toolz. The
19311 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
19312 that is accessible to other projects developed in Cython.")
19313 (license license:bsd-3)))
19314
19315 (define-public python-sortedcontainers
19316 (package
19317 (name "python-sortedcontainers")
19318 (version "2.1.0")
19319 (source
19320 (origin
19321 (method url-fetch)
19322 (uri (pypi-uri "sortedcontainers" version))
19323 (sha256
19324 (base32
19325 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
19326 (build-system python-build-system)
19327 (arguments
19328 ;; FIXME: Tests require many extra dependencies, and would introduce
19329 ;; a circular dependency on hypothesis, which uses this package.
19330 '(#:tests? #f))
19331 (propagated-inputs
19332 `(("python-appdirs" ,python-appdirs)
19333 ("python-distlib" ,python-distlib)
19334 ("python-filelock" ,python-filelock)
19335 ("python-six" ,python-six-bootstrap)))
19336 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
19337 (synopsis "Sorted List, Sorted Dict, Sorted Set")
19338 (description
19339 "This package provides a sorted collections library, written in
19340 pure-Python.")
19341 (license license:asl2.0)))
19342
19343 (define-public python2-sortedcontainers
19344 (package-with-python2 python-sortedcontainers))
19345
19346 (define-public python-cloudpickle
19347 (package
19348 (name "python-cloudpickle")
19349 (version "1.3.0")
19350 (source
19351 (origin
19352 (method url-fetch)
19353 (uri (pypi-uri "cloudpickle" version))
19354 (sha256
19355 (base32
19356 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
19357 (build-system python-build-system)
19358 (arguments
19359 '(#:phases (modify-phases %standard-phases
19360 (add-before 'check 'do-not-override-PYTHONPATH
19361 (lambda _
19362 ;; Append to PYTHONPATH instead of overriding it so
19363 ;; that dependencies from Guix can be found.
19364 (substitute* "tests/testutils.py"
19365 (("env\\['PYTHONPATH'\\] = pythonpath")
19366 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
19367 #t))
19368 (replace 'check
19369 (lambda* (#:key tests? #:allow-other-keys)
19370 (if tests?
19371 (invoke "pytest" "-s" "-vv")
19372 (format #t "test suite not run~%"))
19373 #t)))))
19374 (native-inputs
19375 `(;; For tests.
19376 ("python-psutil" ,python-psutil)
19377 ("python-pytest" ,python-pytest)
19378 ("python-tornado" ,python-tornado)))
19379 (home-page "https://github.com/cloudpipe/cloudpickle")
19380 (synopsis "Extended pickling support for Python objects")
19381 (description
19382 "Cloudpickle makes it possible to serialize Python constructs not
19383 supported by the default pickle module from the Python standard library. It
19384 is especially useful for cluster computing where Python expressions are
19385 shipped over the network to execute on remote hosts, possibly close to the
19386 data.")
19387 (properties `((python2-variant . ,(delay python2-cloudpickle))))
19388 (license license:bsd-3)))
19389
19390 (define-public python2-cloudpickle
19391 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
19392 (package
19393 (inherit base)
19394 (native-inputs
19395 `(("python-mock" ,python2-mock)
19396 ,@(package-native-inputs base)))
19397 (propagated-inputs
19398 `(("python-futures" ,python2-futures)
19399 ,@(package-propagated-inputs base))))))
19400
19401 (define-public python-locket
19402 (package
19403 (name "python-locket")
19404 (version "0.2.0")
19405 (source
19406 (origin
19407 (method url-fetch)
19408 (uri (pypi-uri "locket" version))
19409 (sha256
19410 (base32
19411 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
19412 (build-system python-build-system)
19413 (home-page "https://github.com/mwilliamson/locket.py")
19414 (synopsis "File-based locks for Python")
19415 (description
19416 "Locket implements a lock that can be used by multiple processes provided
19417 they use the same path.")
19418 (license license:bsd-2)))
19419
19420 (define-public python2-locket
19421 (package-with-python2 python-locket))
19422
19423 (define-public python-blosc
19424 (package
19425 (name "python-blosc")
19426 (version "1.5.1")
19427 (source
19428 (origin
19429 (method url-fetch)
19430 (uri (pypi-uri "blosc" version))
19431 (sha256
19432 (base32
19433 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
19434 (build-system python-build-system)
19435 ;; FIXME: all tests pass, but then this error is printed:
19436 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
19437 (arguments '(#:tests? #f))
19438 (propagated-inputs
19439 `(("python-numpy" ,python-numpy)))
19440 (home-page "https://github.com/blosc/python-blosc")
19441 (synopsis "Python wrapper for the Blosc data compressor library")
19442 (description "Blosc is a high performance compressor optimized for binary
19443 data. It has been designed to transmit data to the processor cache faster
19444 than the traditional, non-compressed, direct memory fetch approach via a
19445 @code{memcpy()} system call.
19446
19447 Blosc works well for compressing numerical arrays that contains data with
19448 relatively low entropy, like sparse data, time series, grids with
19449 regular-spaced values, etc.
19450
19451 This Python package wraps the Blosc library.")
19452 (license license:bsd-3)))
19453
19454 (define-public python2-blosc
19455 (package-with-python2 python-blosc))
19456
19457 (define-public python-partd
19458 (package
19459 (name "python-partd")
19460 (version "0.3.9")
19461 (source
19462 (origin
19463 (method url-fetch)
19464 (uri (pypi-uri "partd" version))
19465 (sha256
19466 (base32
19467 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
19468 (build-system python-build-system)
19469 (propagated-inputs
19470 `(("python-blosc" ,python-blosc)
19471 ("python-locket" ,python-locket)
19472 ("python-numpy" ,python-numpy)
19473 ("python-pandas" ,python-pandas)
19474 ("python-pyzmq" ,python-pyzmq)
19475 ("python-toolz" ,python-toolz)))
19476 (home-page "https://github.com/dask/partd/")
19477 (synopsis "Appendable key-value storage")
19478 (description "Partd stores key-value pairs. Values are raw bytes. We
19479 append on old values. Partd excels at shuffling operations.")
19480 (license license:bsd-3)))
19481
19482 (define-public python2-partd
19483 (package-with-python2 python-partd))
19484
19485 (define-public python-fsspec
19486 (package
19487 (name "python-fsspec")
19488 (version "0.6.1")
19489 (source
19490 (origin
19491 (method url-fetch)
19492 (uri (pypi-uri "fsspec" version))
19493 (sha256
19494 (base32
19495 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
19496 (build-system python-build-system)
19497 (arguments '(#:tests? #f)) ; there are none
19498 (home-page "https://github.com/intake/filesystem_spec")
19499 (synopsis "File-system specification")
19500 (description "The purpose of this package is to produce a template or
19501 specification for a file-system interface, that specific implementations
19502 should follow, so that applications making use of them can rely on a common
19503 behavior and not have to worry about the specific internal implementation
19504 decisions with any given backend.")
19505 (license license:bsd-3)))
19506
19507 (define-public python-dask
19508 (package
19509 (name "python-dask")
19510 (version "2.14.0")
19511 (source
19512 (origin
19513 (method url-fetch)
19514 (uri (pypi-uri "dask" version))
19515 (sha256
19516 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
19517 (build-system python-build-system)
19518 (arguments
19519 `(#:phases
19520 (modify-phases %standard-phases
19521 (add-after 'unpack 'disable-broken-tests
19522 (lambda _
19523 ;; This test is marked as xfail when pytest-xdist is used.
19524 (substitute* "dask/tests/test_threaded.py"
19525 (("def test_interrupt\\(\\)" m)
19526 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19527 m)))
19528 ;; This one fails with a type error:
19529 ;; TypeError: Already tz-aware, use tz_convert to convert.
19530 (substitute* "dask/dataframe/tests/test_shuffle.py"
19531 (("def test_set_index_timestamp\\(\\)" m)
19532 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
19533 m)))
19534 #t))
19535 (replace 'check
19536 (lambda _ (invoke "pytest" "-vv"))))))
19537 (propagated-inputs
19538 `(("python-cloudpickle" ,python-cloudpickle)
19539 ("python-fsspec" ,python-fsspec)
19540 ("python-numpy" ,python-numpy)
19541 ("python-packaging" ,python-packaging)
19542 ("python-pandas" ,python-pandas)
19543 ("python-partd" ,python-partd)
19544 ("python-toolz" ,python-toolz)
19545 ("python-pyyaml" ,python-pyyaml)))
19546 (native-inputs
19547 `(("python-pytest" ,python-pytest)
19548 ("python-pytest-runner" ,python-pytest-runner)))
19549 (home-page "https://github.com/dask/dask/")
19550 (synopsis "Parallel computing with task scheduling")
19551 (description
19552 "Dask is a flexible parallel computing library for analytics. It
19553 consists of two components: dynamic task scheduling optimized for computation,
19554 and large data collections like parallel arrays, dataframes, and lists that
19555 extend common interfaces like NumPy, Pandas, or Python iterators to
19556 larger-than-memory or distributed environments. These parallel collections
19557 run on top of the dynamic task schedulers. ")
19558 (license license:bsd-3)))
19559
19560 (define-public python-ilinkedlist
19561 (package
19562 (name "python-ilinkedlist")
19563 (version "0.4.0")
19564 (source
19565 (origin
19566 (method url-fetch)
19567 (uri (pypi-uri "ilinkedlist" version))
19568 (sha256
19569 (base32
19570 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
19571 (build-system python-build-system)
19572 (native-inputs `(("python-pytest" ,python-pytest)))
19573 (inputs `(("python" ,python)))
19574 (home-page "https://github.com/luther9/ilinkedlist-py")
19575 (synopsis "Immutable linked list library")
19576 (description
19577 "This is a implementation of immutable linked lists for Python. It
19578 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
19579 Since a linked list is treated as immutable, it is hashable, and its length
19580 can be retrieved in constant time. Some of the terminology is inspired by
19581 LISP. It is possible to create an improper list by creating a @code{Pair}
19582 with a non-list @code{cdr}.")
19583 (license license:gpl3+)))
19584
19585 (define-public python-readlike
19586 (package
19587 (name "python-readlike")
19588 (version "0.1.3")
19589 (source
19590 (origin
19591 (method url-fetch)
19592 (uri (pypi-uri "readlike" version))
19593 (sha256
19594 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
19595 (build-system python-build-system)
19596 (home-page "https://github.com/jangler/readlike")
19597 (synopsis "GNU Readline-like line editing module")
19598 (description
19599 "This Python module provides line editing functions similar to the default
19600 Emacs-style ones of GNU Readline. Unlike the Python standard library's
19601 @code{readline} package, this one allows access to those capabilities in settings
19602 outside of a standard command-line interface. It is especially well-suited to
19603 interfacing with Urwid, due to a shared syntax for describing key inputs.
19604
19605 Currently, all stateless Readline commands are implemented. Yanking and history
19606 are not supported.")
19607 (license license:expat)))
19608
19609 (define-public python2-readlike
19610 (package-with-python2 python-readlike))
19611
19612 (define-public python-reparser
19613 (package
19614 (name "python-reparser")
19615 (version "1.4.3")
19616 (source
19617 (origin
19618 (method url-fetch)
19619 (uri (pypi-uri "ReParser" version))
19620 (sha256
19621 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
19622 (build-system python-build-system)
19623 (home-page "https://github.com/xmikos/reparser")
19624 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
19625 (description
19626 "This Python library provides a simple lexer/parser for inline markup based
19627 on regular expressions.")
19628 (license license:expat)))
19629
19630 (define-public python2-reparser
19631 (let ((reparser (package-with-python2
19632 (strip-python2-variant python-reparser))))
19633 (package (inherit reparser)
19634 (propagated-inputs
19635 `(("python2-enum34" ,python2-enum34)
19636 ,@(package-propagated-inputs reparser))))))
19637
19638 (define-public python-retrying
19639 (package
19640 (name "python-retrying")
19641 (version "1.3.3")
19642 (source
19643 (origin
19644 (method git-fetch)
19645 (uri (git-reference
19646 (url "https://github.com/rholder/retrying")
19647 (commit (string-append "v" version))))
19648 (file-name (git-file-name name version))
19649 (sha256
19650 (base32
19651 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19652 (build-system python-build-system)
19653 (propagated-inputs
19654 `(("python-six" ,python-six)))
19655 (home-page "https://github.com/rholder/retrying")
19656 (synopsis "Library for adding retry behavior")
19657 (description "Retrying is a general-purpose retrying library to simplify
19658 the task of adding retry behavior to just about anything.
19659
19660 Features:
19661
19662 @itemize
19663 @item Generic Decorator API.
19664 @item Specify stop condition (i.e. limit by number of attempts).
19665 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19666 @item Customize retrying on Exceptions.
19667 @item Customize retrying on expected returned result.
19668 @end itemize")
19669 (license license:asl2.0)))
19670
19671 (define-public python-precis-i18n
19672 (package
19673 (name "python-precis-i18n")
19674 (version "1.0.0")
19675 (source
19676 (origin
19677 (method url-fetch)
19678 (uri (pypi-uri "precis_i18n" version))
19679 (sha256
19680 (base32
19681 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19682 (build-system python-build-system)
19683 (home-page "https://github.com/byllyfish/precis_i18n")
19684 (synopsis "Implementation of the PRECIS framework")
19685 (description
19686 "This module implements the PRECIS Framework as described in RFC 8264,
19687 RFC 8265 and RFC 8266.")
19688 (license license:expat)))
19689
19690 (define-public python-absl-py
19691 (package
19692 (name "python-absl-py")
19693 (version "0.6.1")
19694 (source
19695 (origin
19696 (method url-fetch)
19697 (uri (pypi-uri "absl-py" version))
19698 (sha256
19699 (base32
19700 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19701 (build-system python-build-system)
19702 (propagated-inputs
19703 `(("python-six" ,python-six)))
19704 (home-page "https://github.com/abseil/abseil-py")
19705 (synopsis "Abseil Python common libraries")
19706 (description
19707 "This package provides the Abseil Python Common Libraries, a collection
19708 of Python libraries for building Python applications.")
19709 (license license:asl2.0)))
19710
19711 (define-public python-astor
19712 (package
19713 (name "python-astor")
19714 (version "0.7.1")
19715 (source
19716 (origin
19717 (method url-fetch)
19718 (uri (pypi-uri "astor" version))
19719 (sha256
19720 (base32
19721 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19722 (build-system python-build-system)
19723 ;; FIXME: There are two errors and two test failures.
19724 (arguments `(#:tests? #f))
19725 (home-page "https://github.com/berkerpeksag/astor")
19726 (synopsis "Read and write Python ASTs")
19727 (description "Astor is designed to allow easy manipulation of Python
19728 source via the Abstract Syntax Tree.")
19729 (license license:bsd-3)))
19730
19731 (define-public python2-astor
19732 (package-with-python2 python-astor))
19733
19734 (define-public python-astunparse
19735 (package
19736 (name "python-astunparse")
19737 (version "1.6.2")
19738 (source
19739 (origin
19740 (method url-fetch)
19741 (uri (pypi-uri "astunparse" version))
19742 (sha256
19743 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19744 (build-system python-build-system)
19745 (arguments '(#:tests? #f)) ; there are none
19746 (propagated-inputs
19747 `(("python-six" ,python-six)
19748 ("python-wheel" ,python-wheel)))
19749 (home-page "https://github.com/simonpercivall/astunparse")
19750 (synopsis "AST unparser for Python")
19751 (description "This package provides an AST unparser for Python. It is a
19752 factored out version of @code{unparse} found in the Python source
19753 distribution.")
19754 (license license:bsd-3)))
19755
19756 (define-public python-gast
19757 (package
19758 (name "python-gast")
19759 (version "0.3.3")
19760 (source
19761 (origin
19762 (method url-fetch)
19763 (uri (pypi-uri "gast" version))
19764 (sha256
19765 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19766 (build-system python-build-system)
19767 (propagated-inputs
19768 `(("python-astunparse" ,python-astunparse)))
19769 (home-page "https://pypi.org/project/gast/")
19770 (synopsis "Generic Python AST that abstracts the underlying Python version")
19771 (description
19772 "GAST provides a compatibility layer between the AST of various Python
19773 versions, as produced by @code{ast.parse} from the standard @code{ast}
19774 module.")
19775 (license license:bsd-3)))
19776
19777 (define-public python-wikidata
19778 (package
19779 (name "python-wikidata")
19780 (version "0.6.1")
19781 (source
19782 (origin
19783 (method url-fetch)
19784 (uri (pypi-uri "Wikidata" version))
19785 (sha256
19786 (base32
19787 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19788 (build-system python-build-system)
19789 (propagated-inputs
19790 `(("python-babel" ,python-babel)))
19791 (home-page "https://github.com/dahlia/wikidata")
19792 (synopsis "Wikidata client library")
19793 (description
19794 "This package provides a Python interface to
19795 @url{https://www.wikidata.org/, Wikidata}.")
19796 (properties '((upstream-name . "Wikidata")))
19797 (license license:gpl3+)))
19798
19799 (define-public python-doctest-ignore-unicode
19800 (package
19801 (name "python-doctest-ignore-unicode")
19802 (version "0.1.2")
19803 (source
19804 (origin
19805 (method url-fetch)
19806 (uri (pypi-uri "doctest-ignore-unicode" version))
19807 (sha256
19808 (base32
19809 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19810 (build-system python-build-system)
19811 (native-inputs
19812 `(("python-nose" ,python-nose)))
19813 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19814 (synopsis "Ignore Unicode literal prefixes in doctests")
19815 (description
19816 "This package adds support for a flag to ignore Unicode literal prefixes
19817 in doctests.")
19818 (license license:asl2.0)))
19819
19820 (define-public python-attr
19821 (package
19822 (name "python-attr")
19823 (version "0.3.1")
19824 (source
19825 (origin
19826 (method url-fetch)
19827 (uri (pypi-uri "attr" version))
19828 (sha256
19829 (base32
19830 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19831 (build-system python-build-system)
19832 (home-page "https://github.com/denis-ryzhkov/attr")
19833 (synopsis "Decorator for attributes of target function or class")
19834 (description "Simple decorator to set attributes of target function or
19835 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19836 (license license:expat)))
19837
19838 (define-public python-construct
19839 (package
19840 (name "python-construct")
19841 (version "2.10.56")
19842 (source
19843 (origin
19844 (method url-fetch)
19845 (uri (pypi-uri "construct" version))
19846 (sha256
19847 (base32
19848 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19849 (build-system python-build-system)
19850 (arguments
19851 `(#:tests? #f)) ; No tests exist.
19852 (propagated-inputs
19853 `(("python-extras" ,python-extras)
19854 ("python-arrow" ,python-arrow)
19855 ("python-numpy" ,python-numpy)
19856 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19857 (home-page "https://construct.readthedocs.io")
19858 (synopsis "Declarative and symmetrical parser and builder for binary data")
19859 (description
19860 "This package provides both simple, atomic constructs (such as
19861 integers of various sizes), as well as composite ones which allow you
19862 form hierarchical and sequential structures of increasing complexity.
19863 It features bit and byte granularity, easy debugging and testing, an
19864 easy-to-extend subclass system, and lots of primitive constructs to
19865 make your work easier.")
19866 (license license:expat)))
19867
19868 (define-public python-outcome
19869 (package
19870 (name "python-outcome")
19871 (version "1.0.1")
19872 (source
19873 (origin
19874 (method url-fetch)
19875 (uri (pypi-uri "outcome" version))
19876 (sha256
19877 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19878 (build-system python-build-system)
19879 (arguments
19880 `(#:phases
19881 (modify-phases %standard-phases
19882 (replace 'check
19883 (lambda* (#:key inputs outputs #:allow-other-keys)
19884 (add-installed-pythonpath inputs outputs)
19885 (invoke "pytest" "-vv"))))))
19886 (native-inputs
19887 `(("python-pytest" ,python-pytest)
19888 ("python-pytest-cov" ,python-pytest-cov)
19889 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19890 (propagated-inputs
19891 `(("python-async-generator" ,python-async-generator)
19892 ("python-attrs" ,python-attrs)))
19893 (home-page "https://github.com/python-trio/outcome")
19894 (synopsis "Capture the outcome of Python function calls")
19895 (description
19896 "Capture the outcome of Python function calls. Extracted from the Trio
19897 project.")
19898 ;; Either license applies.
19899 (license (list license:expat license:asl2.0))))
19900
19901 (define-public python-trio
19902 (package
19903 (name "python-trio")
19904 (version "0.17.0")
19905 (source
19906 (origin
19907 (method url-fetch)
19908 (uri (pypi-uri "trio" version))
19909 (sha256
19910 (base32 "0zcxirpdvvl54pbfkgw7vz984879xwvdygqfpggnam24is2zjp78"))))
19911 (build-system python-build-system)
19912 (arguments
19913 `(#:phases
19914 (modify-phases %standard-phases
19915 (add-before 'check 'change-home
19916 (lambda _
19917 ;; Tests require a writable home.
19918 (setenv "HOME" "/tmp")
19919 #t))
19920 (replace 'check
19921 (lambda _
19922 (invoke "pytest" "-vv" "-k"
19923 (string-append
19924 ;; This test times out.
19925 "not test_ki_protection_works"
19926 ;; Assertion errors.
19927 " and not test_guest_mode_ki"
19928 " and not test_run_in_trio_thread_ki"
19929 ;; These try to raise KeyboardInterrupt which does not work
19930 ;; in the build environment.
19931 " and not test_ki_self"
19932 " and not test_ki_wakes_us_up"
19933 ;; Failure in name resolution.
19934 " and not test_getnameinfo"
19935 " and not test_SocketType_resolve"
19936 ;; OSError: protocol not found.
19937 " and not test_getprotobyname")))))))
19938 (native-inputs
19939 `(("python-astor" ,python-astor)
19940 ("python-ipython" ,python-ipython)
19941 ("python-jedi" ,python-jedi)
19942 ("python-pylint" ,python-pylint)
19943 ("python-pyopenssl" ,python-pyopenssl)
19944 ("python-pytest" ,python-pytest)
19945 ("python-pytest-cov" ,python-pytest-cov)
19946 ("python-trustme" ,python-trustme)))
19947 (propagated-inputs
19948 `(("python-attrs" ,python-attrs)
19949 ("python-idna" ,python-idna)
19950 ("python-outcome" ,python-outcome)
19951 ("python-sniffio" ,python-sniffio)
19952 ("python-sortedcontainers"
19953 ,python-sortedcontainers)))
19954 (home-page "https://github.com/python-trio/trio")
19955 (synopsis "Friendly Python library for async concurrency and I/O")
19956 (description
19957 "Trio strives to be a production-quality, async/await-native I/O library
19958 for Python. Like all async libraries, its main purpose is to help you write
19959 programs that do multiple things at the same time with parallelized I/O.")
19960 ;; Either license applies.
19961 (license (list license:expat license:asl2.0))))
19962
19963 (define-public python-trio-typing
19964 (package
19965 (name "python-trio-typing")
19966 (version "0.5.0")
19967 (source
19968 (origin
19969 (method url-fetch)
19970 (uri (pypi-uri "trio-typing" version))
19971 (sha256
19972 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19973 (build-system python-build-system)
19974 (arguments
19975 `(#:phases
19976 (modify-phases %standard-phases
19977 (replace 'check
19978 (lambda _
19979 (invoke "pytest" "-vv"))))))
19980 (native-inputs
19981 `(("python-attrs" ,python-attrs)
19982 ("python-pytest" ,python-pytest)))
19983 (propagated-inputs
19984 `(("python-mypy" ,python-mypy)
19985 ("python-mypy-extensions"
19986 ,python-mypy-extensions)
19987 ("python-trio" ,python-trio)
19988 ("python-typing-extensions"
19989 ,python-typing-extensions)))
19990 (home-page "https://github.com/python-trio/trio-typing")
19991 (synopsis "Static type checking support for Trio and related projects")
19992 (description
19993 "This package provides:
19994
19995 @itemize
19996 @item PEP 561 typing stubs packages for the Trio project packages:
19997
19998 @itemize
19999 @item trio (@code{trio-stubs})
20000 @item outcome (@code{outcome-stubs})
20001 @item async_generator (@code{async_generator-stubs})
20002 @end itemize
20003
20004 @item A package @code{trio_typing} containing types that Trio programs often
20005 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
20006 a mypy plugin that smooths over some limitations in the basic type hints.
20007 @end itemize")
20008 ;; Either license applies.
20009 (license (list license:expat license:asl2.0))))
20010
20011 (define-public python-humanize
20012 (package
20013 (name "python-humanize")
20014 (version "0.5.1")
20015 (source
20016 (origin
20017 (method url-fetch)
20018 (uri (pypi-uri "humanize" version))
20019 (sha256
20020 (base32
20021 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
20022 (arguments
20023 '(#:tests? #f)) ; tests not in pypi archive
20024 (build-system python-build-system)
20025 (home-page "https://github.com/jmoiron/humanize")
20026 (synopsis "Print numerical information in a human-readable form")
20027 (description "This package provides a Python module that displays numbers
20028 and dates in \"human readable\" forms. For example, it would display
20029 \"12345591313\" as \"12.3 billion\".")
20030 (license license:expat)))
20031
20032 (define-public python-txaio
20033 (package
20034 (name "python-txaio")
20035 (version "18.8.1")
20036 (source
20037 (origin
20038 (method url-fetch)
20039 (uri (pypi-uri "txaio" version))
20040 (sha256
20041 (base32
20042 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
20043 (build-system python-build-system)
20044 (propagated-inputs
20045 `(("python-twisted" ,python-twisted)
20046 ("python-six" ,python-six)))
20047 (home-page "https://github.com/crossbario/txaio")
20048 (synopsis "Compatibility layer between Python asyncio and Twisted")
20049 (description "Txaio provides a compatibility layer between the Python
20050 @code{asyncio} module and @code{Twisted}.")
20051 (license license:expat)))
20052
20053 (define-public python-toolshed
20054 (package
20055 (name "python-toolshed")
20056 (version "0.4.6")
20057 (source
20058 (origin
20059 (method url-fetch)
20060 (uri (pypi-uri "toolshed" version))
20061 (sha256
20062 (base32
20063 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
20064 (build-system python-build-system)
20065 (native-inputs
20066 `(("python-nose" ,python-nose)))
20067 (home-page "https://github.com/brentp/toolshed/")
20068 (synopsis "Collection of modules and functions for working with data")
20069 (description "This is a collection of well-tested, simple modules and
20070 functions that aim to reduce boilerplate when working with data.")
20071 (license license:bsd-2)))
20072
20073 (define-public python-annoy
20074 (package
20075 (name "python-annoy")
20076 (version "1.15.1")
20077 (source
20078 (origin
20079 (method url-fetch)
20080 (uri (pypi-uri "annoy" version))
20081 (sha256
20082 (base32
20083 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
20084 (build-system python-build-system)
20085 (native-inputs
20086 `(("python-nose" ,python-nose)))
20087 (home-page "https://github.com/spotify/annoy/")
20088 (synopsis "Approximate nearest neighbors library")
20089 (description
20090 "Annoy is a C++ library with Python bindings to search for points in
20091 space that are close to a given query point. It also creates large read-only
20092 file-based data structures that are @code{mmap}ped into memory so that many
20093 processes may share the same data.")
20094 (license license:asl2.0)))
20095
20096 (define-public python-croniter
20097 (package
20098 (name "python-croniter")
20099 (version "0.3.34")
20100 (source (origin
20101 (method url-fetch)
20102 (uri (pypi-uri "croniter" version))
20103 (sha256
20104 (base32
20105 "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
20106 (build-system python-build-system)
20107 (propagated-inputs
20108 `(("python-dateutil" ,python-dateutil)
20109 ("python-natsort" ,python-natsort)))
20110 (home-page "https://github.com/kiorky/croniter")
20111 (synopsis "Iterate datetime objects with cron-like syntax")
20112 (description
20113 "@code{croniter} provides iteration for datetime object with cron-like
20114 format.")
20115 (license license:expat)))
20116
20117 (define-public python-pylzma
20118 (package
20119 (name "python-pylzma")
20120 (version "0.5.0")
20121 (source
20122 (origin
20123 (method url-fetch)
20124 (uri (pypi-uri "pylzma" version))
20125 (sha256
20126 (base32
20127 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
20128 (build-system python-build-system)
20129 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
20130 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
20131 (description "This package provides Python bindings for the LZMA library
20132 by Igor Pavlov.")
20133 (license license:lgpl2.1+)))
20134
20135 (define-public python2-pylzma
20136 (package-with-python2 python-pylzma))
20137
20138 (define-public python2-zeroconf
20139 (package
20140 (name "python2-zeroconf")
20141
20142 ;; This is the last version that supports Python 2.x.
20143 (version "0.19.1")
20144 (source
20145 (origin
20146 (method url-fetch)
20147 (uri (pypi-uri "zeroconf" version))
20148 (sha256
20149 (base32
20150 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
20151 (build-system python-build-system)
20152 (arguments
20153 `(#:python ,python-2
20154 #:phases
20155 (modify-phases %standard-phases
20156 (add-after 'unpack 'patch-requires
20157 (lambda* (#:key inputs #:allow-other-keys)
20158 (substitute* "setup.py"
20159 (("enum-compat")
20160 "enum34"))
20161 #t)))))
20162 (native-inputs
20163 `(("python2-six" ,python2-six)
20164 ("python2-enum32" ,python2-enum34)
20165 ("python2-netifaces" ,python2-netifaces)
20166 ("python2-typing" ,python2-typing)))
20167 (home-page "https://github.com/jstasiak/python-zeroconf")
20168 (synopsis "Pure Python mDNS service discovery")
20169 (description
20170 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
20171 compatible).")
20172 (license license:lgpl2.1+)))
20173
20174 (define-public python-bsddb3
20175 (package
20176 (name "python-bsddb3")
20177 (version "6.2.6")
20178 (source
20179 (origin
20180 (method url-fetch)
20181 (uri (pypi-uri "bsddb3" version))
20182 (sha256
20183 (base32
20184 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
20185 (build-system python-build-system)
20186 (inputs
20187 `(("bdb" ,bdb)))
20188 (arguments
20189 '(#:phases
20190 (modify-phases %standard-phases
20191 (add-after 'unpack 'configure-locations
20192 (lambda* (#:key inputs #:allow-other-keys)
20193 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
20194 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
20195 #t))
20196 (replace 'check
20197 (lambda _
20198 (invoke "python3" "test3.py" "-v"))))))
20199 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
20200 (synopsis "Python bindings for Oracle Berkeley DB")
20201 (description
20202 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
20203 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
20204 Transaction objects, and each of these is exposed as a Python type in the
20205 bsddb3.db module. The database objects can use various access methods: btree,
20206 hash, recno, and queue. Complete support of Berkeley DB distributed
20207 transactions. Complete support for Berkeley DB Replication Manager.
20208 Complete support for Berkeley DB Base Replication. Support for RPC.")
20209 (license license:bsd-3)))
20210
20211 (define-public python-dbfread
20212 (package
20213 (name "python-dbfread")
20214 (version "2.0.7")
20215 (source (origin
20216 (method url-fetch)
20217 (uri (pypi-uri "dbfread" version))
20218 (sha256
20219 (base32
20220 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
20221 (build-system python-build-system)
20222 (native-inputs
20223 `(("python-pytest" ,python-pytest)))
20224 (home-page "https://dbfread.readthedocs.io")
20225 (synopsis "Read DBF Files with Python")
20226 (description
20227 "This library reads DBF files and returns the data as native Python data
20228 types for further processing. It is primarily intended for batch jobs and
20229 one-off scripts.")
20230 (license license:expat)))
20231
20232 (define-public python-cached-property
20233 (package
20234 (name "python-cached-property")
20235 (version "1.5.1")
20236 (source
20237 (origin
20238 (method url-fetch)
20239 (uri (pypi-uri "cached-property" version))
20240 (sha256
20241 (base32
20242 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
20243 (build-system python-build-system)
20244 (arguments
20245 `(#:phases
20246 (modify-phases %standard-phases
20247 ;; https://github.com/pydanny/cached-property/issues/131
20248 ;; recent versions of freezegun break one test
20249 (add-after 'unpack 'disable-broken-test
20250 (lambda _
20251 (substitute* "tests/test_cached_property.py"
20252 (("def test_threads_ttl_expiry\\(self\\)" m)
20253 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
20254 " " m)))
20255 #t)))))
20256 (native-inputs
20257 `(("python-freezegun" ,python-freezegun)))
20258 (home-page
20259 "https://github.com/pydanny/cached-property")
20260 (synopsis
20261 "Decorator for caching properties in classes")
20262 (description
20263 "This package provides a decorator which makes caching
20264 time-or-computationally-expensive properties quick and easy and works in Python
20265 2 or 3.")
20266 (license license:bsd-3)))
20267
20268 (define-public python-folium
20269 (package
20270 (name "python-folium")
20271 (version "0.11.0")
20272 (source
20273 (origin
20274 (method url-fetch)
20275 (uri (pypi-uri "folium" version))
20276 (sha256
20277 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
20278 (build-system python-build-system)
20279 (propagated-inputs
20280 `(("python-branca" ,python-branca)
20281 ("python-jinja2" ,python-jinja2)
20282 ("python-numpy" ,python-numpy)
20283 ("python-requests" ,python-requests)))
20284 (native-inputs
20285 `(("python-pytest" ,python-pytest)))
20286 (home-page "https://github.com/python-visualization/folium")
20287 (synopsis "Make beautiful maps with Leaflet.js & Python")
20288 (description "@code{folium} makes it easy to visualize data that’s been
20289 manipulated in Python on an interactive leaflet map. It enables both the
20290 binding of data to a map for @code{choropleth} visualizations as well as
20291 passing rich vector/raster/HTML visualizations as markers on the map.
20292
20293 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
20294 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
20295 supports Image, Video, GeoJSON and TopoJSON overlays.")
20296 (license license:expat)))
20297
20298 (define-public jube
20299 (package
20300 ;; This is a command-line tool, so no "python-" prefix.
20301 (name "jube")
20302 (version "2.2.2")
20303 (source (origin
20304 (method url-fetch)
20305 (uri (string-append
20306 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
20307 version))
20308 (sha256
20309 (base32
20310 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
20311 (file-name (string-append "jube-" version ".tar.gz"))))
20312 (build-system python-build-system)
20313 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
20314 (synopsis "Benchmarking environment")
20315 (description
20316 "JUBE helps perform and analyze benchmarks in a systematic way. For each
20317 benchmarked application, benchmark data is stored in a format that allows JUBE
20318 to deduct the desired information. This data can be parsed by automatic pre-
20319 and post-processing scripts that draw information and store it more densely
20320 for manual interpretation.")
20321 (license license:gpl3+)))
20322
20323 (define-public python-pyroutelib3
20324 (package
20325 (name "python-pyroutelib3")
20326 (version "1.3.post1")
20327 (source
20328 (origin
20329 (method url-fetch)
20330 (uri (pypi-uri "pyroutelib3" version))
20331 (sha256
20332 (base32
20333 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
20334 (build-system python-build-system)
20335 (propagated-inputs
20336 `(("python-dateutil" ,python-dateutil)))
20337 (home-page "https://github.com/MKuranowski/pyroutelib3")
20338 (synopsis "Library for simple routing on OSM data")
20339 (description "Library for simple routing on OSM data")
20340 (license license:gpl3+)))
20341
20342 (define-public python-bibtexparser
20343 (package
20344 (name "python-bibtexparser")
20345 (version "1.1.0")
20346 (source
20347 (origin
20348 (method url-fetch)
20349 (uri (pypi-uri "bibtexparser" version))
20350 (sha256
20351 (base32
20352 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
20353 (build-system python-build-system)
20354 (propagated-inputs
20355 `(("python-pyparsing" ,python-pyparsing)))
20356 (native-inputs
20357 `(("python-future" ,python-future)))
20358 (home-page "https://github.com/sciunto-org/python-bibtexparser")
20359 (synopsis "Python library to parse BibTeX files")
20360 (description "BibtexParser is a Python library to parse BibTeX files.")
20361 (license (list license:bsd-3 license:lgpl3))))
20362
20363 (define-public python-distro
20364 (package
20365 (name "python-distro")
20366 (version "1.4.0")
20367 (source
20368 (origin
20369 (method url-fetch)
20370 (uri (pypi-uri "distro" version))
20371 (sha256
20372 (base32
20373 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
20374 (build-system python-build-system)
20375 (native-inputs
20376 `(("python-pytest" ,python-pytest)))
20377 (home-page "https://github.com/nir0s/distro")
20378 (synopsis
20379 "OS platform information API")
20380 (description
20381 "@code{distro} provides information about the OS distribution it runs on,
20382 such as a reliable machine-readable ID, or version information.
20383
20384 It is the recommended replacement for Python's original
20385 `platform.linux_distribution` function (which will be removed in Python 3.8).
20386 @code{distro} also provides a command-line interface to output the platform
20387 information in various formats.")
20388 (license license:asl2.0)))
20389
20390 (define-public python-cairosvg
20391 (package
20392 (name "python-cairosvg")
20393 (version "2.4.2")
20394 (source
20395 (origin
20396 (method url-fetch)
20397 (uri (pypi-uri "CairoSVG" version))
20398 (sha256
20399 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
20400 (build-system python-build-system)
20401 (arguments
20402 `(#:phases
20403 (modify-phases %standard-phases
20404 (replace 'check
20405 (lambda _ (invoke "pytest"))))))
20406 (propagated-inputs
20407 `(("python-cairocffi" ,python-cairocffi)
20408 ("python-cssselect2" ,python-cssselect2)
20409 ("python-defusedxml" ,python-defusedxml)
20410 ("python-pillow" ,python-pillow)
20411 ("python-tinycss2" ,python-tinycss2)))
20412 (native-inputs
20413 `(("python-pytest-flake8" ,python-pytest-flake8)
20414 ("python-pytest-isort" ,python-pytest-isort)
20415 ("python-pytest-runner" ,python-pytest-runner)))
20416 (home-page "https://cairosvg.org/")
20417 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
20418 (description "CairoSVG is a SVG converter based on Cairo. It can export
20419 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
20420 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
20421 parsed, the result is drawn to a Cairo surface that can be exported to
20422 qvarious formats: PDF, PostScript, PNG and even SVG.")
20423 (license license:lgpl3+)))
20424
20425 (define-public python-pyphen
20426 (package
20427 (name "python-pyphen")
20428 (version "0.9.5")
20429 (source
20430 (origin
20431 (method url-fetch)
20432 (uri (pypi-uri "Pyphen" version))
20433 (sha256
20434 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
20435 (build-system python-build-system)
20436 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
20437 ;; embedded set provided by upstream - like Debian does.
20438 (home-page "https://github.com/Kozea/Pyphen")
20439 (synopsis "Pure Python module to hyphenate text")
20440 (description "Pyphen is a pure Python module to hyphenate text using
20441 existing Hunspell hyphenation dictionaries.")
20442 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
20443
20444 (define-public python-intelhex
20445 (package
20446 (name "python-intelhex")
20447 (version "2.2.1")
20448 (source
20449 (origin
20450 (method url-fetch)
20451 (uri (pypi-uri "intelhex" version))
20452 (sha256
20453 (base32
20454 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
20455 (build-system python-build-system)
20456 (arguments '(#:tests? #f)) ;issue with version
20457 (home-page "https://pypi.org/project/IntelHex/")
20458 (synopsis "Python library for Intel HEX files manipulations")
20459 (description "The Intel HEX file format is widely used in microprocessors
20460 and microcontrollers area (embedded systems etc.) as the de facto standard for
20461 representation of code to be programmed into microelectronic devices. This
20462 package provides an intelhex Python library to read, write, create from
20463 scratch and manipulate data from Intel HEX file format. It also includes
20464 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
20465 converters and more, those based on the library itself.")
20466 (license license:bsd-3)))
20467
20468 (define-public python-pykwalify
20469 (package
20470 (name "python-pykwalify")
20471 (version "1.7.0")
20472 (source
20473 (origin
20474 (method url-fetch)
20475 (uri (pypi-uri "pykwalify" version))
20476 (sha256
20477 (base32
20478 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
20479 (build-system python-build-system)
20480 (arguments '(#:tests? #f)) ;missing dependencies
20481 (propagated-inputs
20482 `(("python-dateutil" ,python-dateutil)
20483 ("python-docopt" ,python-docopt)
20484 ("python-pyyaml" ,python-pyyaml)))
20485 (home-page "https://github.com/grokzen/pykwalify")
20486 (synopsis
20487 "Python lib/cli for JSON/YAML schema validation")
20488 (description
20489 "This package provides a parser, schema validator, and data binding tool
20490 for YAML and JSON.")
20491 (license license:expat)))
20492
20493 (define-public python-dbusmock
20494 (package
20495 (name "python-dbusmock")
20496 (version "0.18.3")
20497 (source
20498 (origin
20499 (method url-fetch)
20500 (uri (pypi-uri "python-dbusmock" version))
20501 (sha256
20502 (base32
20503 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
20504 (build-system python-build-system)
20505 (arguments
20506 '(#:phases
20507 (modify-phases %standard-phases
20508 (add-after 'unpack 'patch-shell-path
20509 (lambda _
20510 (substitute* "tests/test_code.py"
20511 (("/bin/bash") (which "bash")))
20512 #t)))))
20513 (native-inputs
20514 `(;; For tests.
20515 ("dbus" ,dbus) ; for dbus-daemon
20516 ("python-nose" ,python-nose)
20517 ("which" ,which)))
20518 (propagated-inputs
20519 `(("python-dbus" ,python-dbus)
20520 ("python-pygobject" ,python-pygobject)))
20521 (home-page "https://github.com/martinpitt/python-dbusmock")
20522 (synopsis "Python library for mock D-Bus objects")
20523 (description "python-dbusmock allows for the easy creation of mock objects on
20524 D-Bus. This is useful for writing tests for software which talks to D-Bus
20525 services such as upower, systemd, logind, gnome-session or others, and it is
20526 hard (or impossible without root privileges) to set the state of the real
20527 services to what you expect in your tests.")
20528 (license license:lgpl3+)))
20529
20530 (define-public python-jsonplus
20531 (package
20532 (name "python-jsonplus")
20533 (version "0.8.0")
20534 (home-page "https://github.com/randomir/jsonplus")
20535 (source (origin
20536 (method url-fetch)
20537 (uri (pypi-uri "jsonplus" version))
20538 (sha256
20539 (base32
20540 "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
20541 (build-system python-build-system)
20542 ;; XXX: No tests on PyPI, and the repository has no tags.
20543 (arguments '(#:tests? #f))
20544 (propagated-inputs
20545 `(("python-dateutil" ,python-dateutil)
20546 ("python-simplejson" ,python-simplejson)
20547 ("python-sortedcontainers" ,python-sortedcontainers)))
20548 (synopsis "Serialize Python types to/from JSON")
20549 (description
20550 "This package provides functionality to serialize arbitrary data types
20551 to and from JSON. Common data types are implemented and it is easy to
20552 register custom encoders and decoders.")
20553 (license license:expat)))
20554
20555 (define-public python-ujson
20556 (package
20557 (name "python-ujson")
20558 (version "2.0.3")
20559 (source
20560 (origin
20561 (method url-fetch)
20562 (uri (pypi-uri "ujson" version))
20563 (sha256
20564 (base32
20565 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
20566 (modules '((guix build utils)))
20567 (snippet
20568 '(begin (delete-file-recursively "deps") #t))))
20569 (build-system python-build-system)
20570 (arguments
20571 `(#:phases
20572 (modify-phases %standard-phases
20573 (add-after 'unpack 'link-to-system-double-conversion
20574 (lambda* (#:key inputs #:allow-other-keys)
20575 (let ((d-c (assoc-ref inputs "double-conversion")))
20576 (substitute* "setup.py"
20577 (("./deps/double-conversion/double-conversion\"")
20578 (string-append d-c "/include/double-conversion\""))
20579 (("-lstdc++" stdc)
20580 (string-append "-L" d-c "/lib\","
20581 " \"-ldouble-conversion\","
20582 " \"" stdc)))
20583 #t)))
20584 (replace 'check
20585 (lambda* (#:key inputs outputs #:allow-other-keys)
20586 (add-installed-pythonpath inputs outputs)
20587 (invoke "pytest"))))))
20588 (native-inputs
20589 `(("double-conversion" ,double-conversion)
20590 ("python-setuptools-scm" ,python-setuptools-scm)
20591 ("python-pytest" ,python-pytest)))
20592 (home-page "https://github.com/ultrajson/ultrajson")
20593 (synopsis "Ultra fast JSON encoder and decoder for Python")
20594 (description
20595 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20596 bindings for Python 3.")
20597 (license license:bsd-3)))
20598
20599 (define-public python-ujson-1
20600 (package
20601 (inherit python-ujson)
20602 (version "1.35")
20603 (source
20604 (origin
20605 (method url-fetch)
20606 (uri (pypi-uri "ujson" version))
20607 (sha256
20608 (base32
20609 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
20610 (arguments
20611 '(#:phases %standard-phases))
20612 (native-inputs '())
20613 (home-page "http://www.esn.me")
20614 (description
20615 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
20616 bindings for Python 2.5+ and 3.")))
20617
20618 (define-public python2-ujson-1
20619 (package-with-python2 python-ujson-1))
20620
20621 (define-public python-iocapture
20622 ;; The latest release is more than a year older than this commit.
20623 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
20624 (revision "1"))
20625 (package
20626 (name "python-iocapture")
20627 (version "0.1.2")
20628 (source
20629 (origin
20630 (method git-fetch)
20631 (uri (git-reference
20632 (url "https://github.com/oinume/iocapture")
20633 (commit commit)))
20634 (file-name (git-file-name name version))
20635 (sha256
20636 (base32
20637 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
20638 (build-system python-build-system)
20639 (arguments
20640 `(#:phases
20641 (modify-phases %standard-phases
20642 (delete 'check)
20643 (add-after 'install 'check
20644 (lambda* (#:key inputs outputs #:allow-other-keys)
20645 (add-installed-pythonpath inputs outputs)
20646 (invoke "py.test" "-v" "tests")
20647 #t)))))
20648 (propagated-inputs
20649 `(("python-flexmock" ,python-flexmock)
20650 ("python-pytest" ,python-pytest)
20651 ("python-pytest-cov" ,python-pytest-cov)
20652 ("python-six" ,python-six)))
20653 (home-page "https://github.com/oinume/iocapture")
20654 (synopsis "Python capturing tool for stdout and stderr")
20655 (description
20656 "This package helps you to capture the standard out (stdout) and the
20657 standard error channel (stderr) in your program.")
20658 (license license:expat))))
20659
20660 (define-public python-argh
20661 ;; There are 21 commits since the latest release containing important
20662 ;; improvements.
20663 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
20664 (revision "1"))
20665 (package
20666 (name "python-argh")
20667 (version (git-version "0.26.2" revision commit))
20668 (source
20669 (origin
20670 (method git-fetch)
20671 (uri (git-reference
20672 (url "https://github.com/neithere/argh")
20673 (commit commit)))
20674 (file-name (git-file-name name version))
20675 (sha256
20676 (base32
20677 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
20678 (build-system python-build-system)
20679 (propagated-inputs
20680 `(("python-iocapture" ,python-iocapture)
20681 ("python-mock" ,python-mock)
20682 ("python-pytest" ,python-pytest)
20683 ("python-pytest-cov" ,python-pytest-cov)
20684 ("python-pytest-xdist" ,python-pytest-xdist)
20685 ("python-tox" ,python-tox)))
20686 (home-page "https://github.com/neithere/argh/")
20687 (synopsis "Argparse wrapper with natural syntax")
20688 (description
20689 "python-argh is a small library that provides several layers of
20690 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
20691 always possible to declare a command with the highest possible (and least
20692 flexible) layer and then tune the behaviour with any of the lower layers
20693 including the native API of @code{python-argparse}.")
20694 (license license:lgpl3+))))
20695
20696 (define-public python-ppft
20697 (package
20698 (name "python-ppft")
20699 (version "1.6.6.1")
20700 (source
20701 (origin
20702 (method url-fetch)
20703 (uri (pypi-uri "ppft" version))
20704 (sha256
20705 (base32
20706 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20707 (build-system python-build-system)
20708 (arguments '(#:tests? #f)) ; there are none
20709 (propagated-inputs
20710 `(("python-six" ,python-six)))
20711 (home-page "https://pypi.org/project/ppft/")
20712 (synopsis "Fork of Parallel Python")
20713 (description
20714 "This package is a fork of Parallel Python. The Parallel Python
20715 module (@code{pp}) provides an easy and efficient way to create
20716 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20717 computers and clusters. It features cross-platform portability and dynamic
20718 load balancing.")
20719 (license license:bsd-3)))
20720
20721 (define-public python-pox
20722 (package
20723 (name "python-pox")
20724 (version "0.2.7")
20725 (source
20726 (origin
20727 (method url-fetch)
20728 (uri (pypi-uri "pox" version))
20729 (sha256
20730 (base32
20731 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20732 (build-system python-build-system)
20733 (arguments
20734 `(#:phases
20735 (modify-phases %standard-phases
20736 (replace 'check
20737 (lambda _
20738 (mkdir-p "/tmp/guix")
20739 (setenv "SHELL" "bash")
20740 (setenv "USERNAME" "guix")
20741 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20742 (invoke "py.test" "-vv")
20743 #t)))))
20744 (native-inputs
20745 `(("python-pytest" ,python-pytest)
20746 ("which" ,which)))
20747 (home-page "https://pypi.org/project/pox/")
20748 (synopsis "Python utilities for file system exploration and automated builds")
20749 (description
20750 "Pox provides a collection of utilities for navigating and manipulating
20751 file systems. This module is designed to facilitate some of the low-level
20752 operating system interactions that are useful when exploring a file system on a
20753 remote host. Pox provides Python equivalents of several shell commands such
20754 as @command{which} and @command{find}. These commands allow automated
20755 discovery of what has been installed on an operating system, and where the
20756 essential tools are located.")
20757 (license license:bsd-3)))
20758
20759 (define-public python-pathos
20760 (package
20761 (name "python-pathos")
20762 (version "0.2.5")
20763 (source
20764 (origin
20765 (method url-fetch)
20766 (uri (pypi-uri "pathos" version))
20767 (sha256
20768 (base32
20769 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20770 (build-system python-build-system)
20771 (arguments
20772 '(#:phases
20773 (modify-phases %standard-phases
20774 (replace 'check
20775 (lambda _
20776 (setenv "PYTHONPATH"
20777 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20778 (invoke "python" "./tests/__main__.py"))))))
20779 (propagated-inputs
20780 `(("python-dill" ,python-dill)
20781 ("python-multiprocess" ,python-multiprocess)
20782 ("python-pox" ,python-pox)
20783 ("python-ppft" ,python-ppft)))
20784 (native-inputs
20785 `(("python-pytest" ,python-pytest)))
20786 (home-page "https://pypi.org/project/pathos/")
20787 (synopsis
20788 "Parallel graph management and execution in heterogeneous computing")
20789 (description
20790 "Python-pathos is a framework for heterogeneous computing. It provides a
20791 consistent high-level interface for configuring and launching parallel
20792 computations across heterogeneous resources. Python-pathos provides configurable
20793 launchers for parallel and distributed computing, where each launcher contains
20794 the syntactic logic to configure and launch jobs in an execution environment.")
20795 (license license:bsd-3)))
20796
20797 (define-public python-flit
20798 (package
20799 (name "python-flit")
20800 (version "2.1.0")
20801 (source
20802 (origin
20803 (method url-fetch)
20804 (uri (pypi-uri "flit" version))
20805 (sha256
20806 (base32
20807 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20808 (build-system python-build-system)
20809 (arguments
20810 `(#:tests? #f)) ; XXX: Check requires network access.
20811 (home-page "https://flit.readthedocs.io/")
20812 (synopsis
20813 "Simple packaging tool for simple packages")
20814 (description
20815 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20816 packages a single importable module or package at a time, using the import
20817 name as the name on PyPI. All subpackages and data files within a package
20818 are included automatically.")
20819 (license license:bsd-3)))
20820
20821 (define-public python-pathtools
20822 (package
20823 (name "python-pathtools")
20824 (version "0.1.2")
20825 (source
20826 (origin
20827 (method url-fetch)
20828 (uri (pypi-uri "pathtools" version))
20829 (sha256
20830 (base32
20831 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20832 (build-system python-build-system)
20833 (home-page
20834 "https://github.com/gorakhargosh/pathtools")
20835 (synopsis "Path utilities for Python")
20836 (description "Pattern matching and various utilities for file systems
20837 paths.")
20838 (license license:expat)))
20839
20840 (define-public python-fastentrypoints
20841 (package
20842 (name "python-fastentrypoints")
20843 (version "0.12")
20844 (source
20845 (origin
20846 (method url-fetch)
20847 (uri (pypi-uri "fastentrypoints" version))
20848 (sha256
20849 (base32
20850 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20851 (build-system python-build-system)
20852 (home-page
20853 "https://github.com/ninjaaron/fast-entry_points")
20854 (synopsis
20855 "Makes entry_points specified in setup.py load more quickly")
20856 (description
20857 "Using entry_points in your setup.py makes scripts that start really
20858 slowly because it imports pkg_resources. This package allows such setup
20859 scripts to load entry points more quickly.")
20860 (license license:bsd-3)))
20861
20862 (define-public python-funcparserlib
20863 (package
20864 (name "python-funcparserlib")
20865 (version "0.3.6")
20866 (source
20867 (origin
20868 (method url-fetch)
20869 (uri (pypi-uri "funcparserlib" version))
20870 (sha256
20871 (base32
20872 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20873 (native-inputs
20874 `(("python-tox" ,python-tox)))
20875 (arguments
20876 `(#:phases
20877 (modify-phases %standard-phases
20878 (replace 'check
20879 (lambda _
20880 (invoke "tox"))))))
20881 (build-system python-build-system)
20882 (home-page
20883 "https://github.com/vlasovskikh/funcparserlib")
20884 (synopsis
20885 "Recursive descent parsing library based on functional combinators")
20886 (description
20887 "This package is a recursive descent parsing library for Python based on
20888 functional combinators. Parser combinators are just higher-order functions
20889 that take parsers as their arguments and return them as result values.")
20890 (license license:expat)))
20891
20892 (define-public python-speg
20893 (package
20894 (name "python-speg")
20895 (version "0.3")
20896 (source
20897 (origin
20898 (method url-fetch)
20899 (uri (pypi-uri "speg" version ".zip"))
20900 (sha256
20901 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20902 (arguments
20903 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20904 (native-inputs
20905 `(("unzip" ,unzip)))
20906 (build-system python-build-system)
20907 (home-page "https://github.com/avakar/speg")
20908 (synopsis "PEG-based parser interpreter with memoization")
20909 (description "This package is a PEG-based parser and interpreter with
20910 memoization.")
20911 (license license:expat)))
20912
20913 (define-public python-cson
20914 (package
20915 (name "python-cson")
20916 (version "0.8")
20917 (source
20918 (origin
20919 (method url-fetch)
20920 (uri (pypi-uri "cson" version))
20921 (sha256
20922 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20923 (build-system python-build-system)
20924 (propagated-inputs
20925 `(("python-speg" ,python-speg)))
20926 (home-page "https://github.com/avakar/pycson")
20927 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20928 (description "This package is a parser for Coffeescript Object
20929 Notation (CSON).")
20930 (license license:expat)))
20931
20932 (define-public python-asynctest
20933 (package
20934 (name "python-asynctest")
20935 (version "0.13.0")
20936 (source
20937 (origin
20938 (method url-fetch)
20939 (uri (pypi-uri "asynctest" version))
20940 (sha256
20941 (base32
20942 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20943 (build-system python-build-system)
20944 (arguments
20945 '(#:phases
20946 (modify-phases %standard-phases
20947 (replace 'check
20948 (lambda _
20949 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20950 (add-after 'unpack 'disable-tests
20951 (lambda* _
20952 ;; XXX: 7 tests fail out of 220. Disable them for now.
20953 (substitute* (list "test/test_selector.py"
20954 "test/test_mock.py")
20955 (("def test_events_watched_outside_test_are_ignored")
20956 "@unittest.skip('disabled by guix')
20957 def test_events_watched_outside_test_are_ignored")
20958 (("def test_awaited_from_autospec_mock.*" line)
20959 (string-append line " return True\n"))
20960 (("def test_create_autospec_on_coroutine_and_using_assert_methods.*" line)
20961 (string-append line " return True\n"))
20962 (("def test_patch_coroutine_with_multiple_scopes.*" line)
20963 (string-append line " return True\n"))
20964 (("def test_multiple_patches_on_coroutine.*" line)
20965 (string-append line " return True\n"))
20966 (("def test_patch_coroutine_only_when_running.*" line)
20967 (string-append line " return True\n")))
20968 #t)))))
20969 (home-page "https://github.com/Martiusweb/asynctest")
20970 (synopsis "Extension of unittest for testing asyncio libraries")
20971 (description
20972 "The package asynctest is built on top of the standard unittest module
20973 and cuts down boilerplate code when testing libraries for asyncio.")
20974 (license license:asl2.0)))
20975
20976 (define-public python-aionotify
20977 (package
20978 (name "python-aionotify")
20979 (version "0.2.0")
20980 (source
20981 (origin
20982 ;; Source tarball on PyPi lacks tests
20983 (method git-fetch)
20984 (uri (git-reference
20985 (url "https://github.com/rbarrois/aionotify")
20986 (commit (string-append "v" version))))
20987 (file-name (git-file-name name version))
20988 (sha256
20989 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20990 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20991 (build-system python-build-system)
20992 (home-page "https://github.com/rbarrois/aionotify")
20993 (synopsis "Asyncio-powered inotify library")
20994 (description
20995 "@code{aionotify} is a simple, asyncio-based inotify library.")
20996 (license license:bsd-3)))
20997
20998 (define-public python-forbiddenfruit
20999 (package
21000 (name "python-forbiddenfruit")
21001 (version "0.1.3")
21002 (source
21003 (origin
21004 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
21005 (method git-fetch)
21006 (uri (git-reference
21007 (url "https://github.com/clarete/forbiddenfruit")
21008 (commit version)))
21009 (file-name (git-file-name name version))
21010 (sha256
21011 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
21012 (build-system python-build-system)
21013 (arguments
21014 '(#:phases
21015 (modify-phases %standard-phases
21016 (replace 'check
21017 (lambda _
21018 (invoke "make" "SKIP_DEPS=1"))))))
21019 (native-inputs
21020 `(("python-nose" ,python-nose)
21021 ("python-coverage" ,python-coverage)))
21022 (home-page "https://github.com/clarete/forbiddenfruit")
21023 (synopsis "Patch python built-in objects")
21024 (description "This project allows Python code to extend built-in types.")
21025 (license (list license:gpl3+ license:expat))))
21026
21027 (define-public python-shouldbe
21028 (package
21029 (name "python-shouldbe")
21030 (version "0.1.2")
21031 (source
21032 (origin
21033 (method url-fetch)
21034 (uri (pypi-uri "shouldbe" version))
21035 (sha256
21036 (base32
21037 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
21038 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
21039 (build-system python-build-system)
21040 (propagated-inputs
21041 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
21042 (native-inputs
21043 `(("python-nose" ,python-nose)))
21044 (home-page "https://github.com/directxman12/should_be")
21045 (synopsis "Python Assertion Helpers inspired by Shouldly")
21046 (description
21047 "Python Assertion Helpers inspired by Shouldly.")
21048 (license license:isc)))
21049
21050 (define-public python-k5test
21051 (package
21052 (name "python-k5test")
21053 (version "0.9.2")
21054 (source
21055 (origin
21056 (method url-fetch)
21057 (uri (pypi-uri "k5test" version))
21058 (sha256
21059 (base32
21060 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
21061 (build-system python-build-system)
21062 (propagated-inputs
21063 `(("python-six" ,python-six)
21064 ;; `which`, `kadmin.local` binaries called inside library
21065 ("which" ,which)
21066 ("mit-krb5" ,mit-krb5)))
21067 (native-inputs `(("mit-krb5" ,mit-krb5)))
21068 (arguments
21069 '(#:phases
21070 (modify-phases %standard-phases
21071 (add-after 'unpack 'patch-paths
21072 (lambda* _
21073 (substitute* "k5test/realm.py"
21074 (("'kadmin_local'") "'kadmin.local'")))))))
21075 (home-page "https://github.com/pythongssapi/k5test")
21076 (synopsis "Library for setting up self-contained Kerberos 5 environments")
21077 (description
21078 "@code{k5test} is a library for setting up self-contained Kerberos 5
21079 environments, and running Python unit tests inside those environments. It is
21080 based on the file of the same name found alongside the MIT Kerberos 5 unit
21081 tests.")
21082 (license license:isc)))
21083
21084 (define-public python-gssapi
21085 (package
21086 (name "python-gssapi")
21087 (version "1.6.9")
21088 (source
21089 (origin
21090 (method url-fetch)
21091 (uri (pypi-uri "gssapi" version))
21092 (sha256
21093 (base32
21094 "1fa78pn5jzfbwf3y6mj4fc8sh11wjf1hwh5qv39cdlxb71qsq2hb"))))
21095 (build-system python-build-system)
21096 (arguments
21097 `(#:phases
21098 (modify-phases %standard-phases
21099 ;; Work around
21100 ;; https://github.com/pythongssapi/python-gssapi/issues/220.
21101 (add-before 'check 'disable-failing-tests
21102 (lambda _
21103 (let ((reason "Disabled failing test (see: \
21104 https://github.com/pythongssapi/python-gssapi/issues/220)."))
21105 (substitute* "gssapi/tests/test_high_level.py"
21106 ((".*def test_add_with_impersonate.*" all)
21107 (string-append all " self.skipTest('" reason "')\n")))
21108 (substitute* "gssapi/tests/test_raw.py"
21109 ((".*def test_.*impersonate_name.*" all)
21110 (string-append all " self.skipTest('" reason "')\n")))
21111 #t))))))
21112 (propagated-inputs
21113 `(("python-decorator" ,python-decorator)
21114 ("python-six" ,python-six)))
21115 (inputs
21116 `(("mit-krb5" ,mit-krb5)))
21117 ;; for tests
21118 (native-inputs
21119 `(("python-shouldbe" ,python-shouldbe)
21120 ("python-parameterized" ,python-parameterized)
21121 ("python-k5test" ,python-k5test)
21122 ("python-nose" ,python-nose)))
21123 (home-page "https://github.com/pythongssapi/python-gssapi")
21124 (synopsis "Python GSSAPI Wrapper")
21125 (description
21126 "Python-GSSAPI provides both low-level and high level wrappers around the
21127 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
21128 also be usable with other GSSAPI mechanisms.")
21129 (license license:isc)))
21130
21131 (define-public python-check-manifest
21132 (package
21133 (name "python-check-manifest")
21134 (version "0.37")
21135 (source
21136 (origin
21137 (method url-fetch)
21138 (uri (pypi-uri "check-manifest" version))
21139 (sha256
21140 (base32
21141 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
21142 (build-system python-build-system)
21143 (native-inputs
21144 `(("python-mock" ,python-mock)
21145 ("git" ,git)))
21146 (home-page "https://github.com/mgedmin/check-manifest")
21147 (synopsis "Check MANIFEST.in in a Python source package for completeness")
21148 (description "Python package can include a MANIFEST.in file to help with
21149 sending package files to the Python Package Index. This package checks that
21150 file to ensure it completely and accurately describes your project.")
21151 (license license:expat)))
21152
21153 (define-public python-android-stringslib
21154 (package
21155 (name "python-android-stringslib")
21156 (version "0.1.2")
21157 (source
21158 (origin
21159 (method git-fetch)
21160 (uri (git-reference
21161 (url "https://framagit.org/tyreunom/python-android-strings-lib")
21162 (commit (string-append "v" version))))
21163 (file-name (git-file-name name version))
21164 (sha256
21165 (base32
21166 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
21167 (build-system python-build-system)
21168 (arguments
21169 `(#:tests? #f))
21170 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
21171 (synopsis "Android strings.xml support")
21172 (description "Android Strings Lib provides support for android's strings.xml
21173 files. These files are used to translate strings in android apps.")
21174 (license license:expat)))
21175
21176 (define-public python-watchdog
21177 (package
21178 (name "python-watchdog")
21179 (version "0.9.0")
21180 (source
21181 (origin
21182 (method url-fetch)
21183 (uri (pypi-uri "watchdog" version))
21184 (sha256
21185 (base32
21186 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
21187 (build-system python-build-system)
21188 (arguments
21189 `(#:phases
21190 (modify-phases %standard-phases
21191 (add-before 'check 'remove-failing
21192 (lambda _
21193 (delete-file "tests/test_inotify_buffer.py")
21194 (delete-file "tests/test_snapshot_diff.py")
21195 #t)))))
21196 (propagated-inputs
21197 `(("python-argh" ,python-argh)
21198 ("python-pathtools" ,python-pathtools)
21199 ("python-pyyaml" ,python-pyyaml)))
21200 (native-inputs
21201 `(("python-pytest-cov" ,python-pytest-cov)
21202 ("python-pytest-timeout" ,python-pytest-timeout)))
21203 (home-page "https://github.com/gorakhargosh/watchdog")
21204 (synopsis "File system events monitoring")
21205 (description "This package provides a way to monitor file system events
21206 such as a file modification and trigger an action. This is similar to inotify,
21207 but portable.")
21208 (license license:asl2.0)))
21209
21210 (define-public python-watchgod
21211 (package
21212 (name "python-watchgod")
21213 (version "0.6")
21214 (source
21215 (origin
21216 ;; There are no tests in the PyPI tarball.
21217 (method git-fetch)
21218 (uri (git-reference
21219 (url "https://github.com/samuelcolvin/watchgod")
21220 (commit (string-append "v" version))))
21221 (file-name (git-file-name name version))
21222 (sha256
21223 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
21224 (build-system python-build-system)
21225 (arguments
21226 `(#:phases
21227 (modify-phases %standard-phases
21228 (replace 'check
21229 (lambda _
21230 (invoke "pytest" "-vv"))))))
21231 (native-inputs
21232 `(("python-coverage" ,python-coverage)
21233 ("python-docutils" ,python-docutils)
21234 ("python-flake8" ,python-flake8)
21235 ("python-isort" ,python-isort)
21236 ("python-pycodestyle" ,python-pycodestyle)
21237 ("python-pyflakes" ,python-pyflakes)
21238 ("python-pygments" ,python-pygments)
21239 ("python-pytest" ,python-pytest)
21240 ("python-pytest-cov" ,python-pytest-cov)
21241 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
21242 ("python-pytest-mock" ,python-pytest-mock)
21243 ("python-pytest-sugar" ,python-pytest-sugar)
21244 ("python-pytest-toolbox" ,python-pytest-toolbox)))
21245 (home-page "https://github.com/samuelcolvin/watchgod")
21246 (synopsis "Simple, modern file watching and code reload in Python")
21247 (description
21248 "Simple, modern file watching and code reload in Python inspired by
21249 @code{watchdog}. Among the differences are a unified approach for each
21250 operating systems and an elegant approach to concurrency using threading.")
21251 (license license:expat)))
21252
21253 (define-public python-wget
21254 (package
21255 (name "python-wget")
21256 (version "3.2")
21257 (source
21258 (origin
21259 (method url-fetch)
21260 (uri (pypi-uri "wget" version ".zip"))
21261 (sha256
21262 (base32
21263 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
21264 (build-system python-build-system)
21265 (native-inputs `(("unzip" ,unzip)))
21266 (home-page "https://bitbucket.org/techtonik/python-wget/")
21267 (synopsis "Pure Python download utility")
21268 (description "The python-wget library provides an API to download files
21269 with features similar to the @command{wget} utility.")
21270 (license license:unlicense)))
21271
21272 (define-public offlate
21273 (package
21274 (name "offlate")
21275 (version "0.5")
21276 (source
21277 (origin
21278 (method git-fetch)
21279 (uri (git-reference
21280 (url "https://framagit.org/tyreunom/offlate")
21281 (commit version)))
21282 (file-name (git-file-name name version))
21283 (sha256
21284 (base32
21285 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
21286 (build-system python-build-system)
21287 (arguments
21288 ;; No tests
21289 `(#:tests? #f))
21290 (propagated-inputs
21291 `(("python-android-stringslib" ,python-android-stringslib)
21292 ("python-dateutil" ,python-dateutil)
21293 ("python-gitlab" ,python-gitlab)
21294 ("python-lxml" ,python-lxml)
21295 ("python-polib" ,python-polib)
21296 ("python-pyenchant" ,python-pyenchant)
21297 ("python-pygit2" ,python-pygit2)
21298 ("python-pygithub" ,python-pygithub)
21299 ("python-pyqt" ,python-pyqt)
21300 ("python-requests" ,python-requests)
21301 ("python-ruamel.yaml" ,python-ruamel.yaml)
21302 ("python-translation-finder" ,python-translation-finder)
21303 ("python-watchdog" ,python-watchdog)))
21304 (native-inputs
21305 `(("qttools" ,qttools)))
21306 (home-page "https://framagit.org/tyreunom/offlate")
21307 (synopsis "Offline translation interface for online translation tools")
21308 (description "Offlate offers a unified interface for different translation
21309 file formats, as well as many different online translation platforms. You can
21310 use it to get work from online platforms, specialized such as the Translation
21311 Project, or not such a gitlab instance when your upstream doesn't use any
21312 dedicated platform. The tool proposes a unified interface for any format and
21313 an upload option to send your work back to the platform.")
21314 (license license:gpl3+)))
21315
21316 (define-public python-titlecase
21317 (package
21318 (name "python-titlecase")
21319 (version "0.12.0")
21320 (source
21321 (origin
21322 (method url-fetch)
21323 (uri (pypi-uri "titlecase" version))
21324 (sha256
21325 (base32
21326 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
21327 (build-system python-build-system)
21328 (native-inputs
21329 `(("python-nose" ,python-nose)))
21330 (home-page "https://github.com/ppannuto/python-titlecase")
21331 (synopsis "Capitalize strings similar to book titles")
21332 (description
21333 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
21334 It capitalizes (predominantly English) strings in a way that is similar to
21335 book titles, using the New York Times Manual of Style to leave certain words
21336 lowercase.")
21337 (license license:expat)))
21338
21339 (define-public python-pypng
21340 (package
21341 (name "python-pypng")
21342 (version "0.0.20")
21343 (source
21344 (origin
21345 (method url-fetch)
21346 (uri (pypi-uri "pypng" version))
21347 (sha256
21348 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
21349 (build-system python-build-system)
21350 (home-page "https://github.com/drj11/pypng")
21351 (synopsis "Pure Python PNG image encoder/decoder")
21352 (description
21353 "The PyPNG module implements support for PNG images. It reads and writes
21354 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
21355 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
21356 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
21357 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
21358 A number of optional chunks can be specified (when writing) and
21359 understood (when reading): tRNS, bKGD, gAMA.
21360
21361 PyPNG is not a high level toolkit for image processing (like PIL) and does not
21362 aim at being a replacement or competitor. Its strength lies in fine-grained
21363 extensive support of PNG features. It can also read and write Netpbm PAM
21364 files, with a focus on its use as an intermediate format for implementing
21365 custom PNG processing.")
21366 (license license:expat)))
21367
21368 (define-public python-fuzzywuzzy
21369 (package
21370 (name "python-fuzzywuzzy")
21371 (version "0.18.0")
21372 (source
21373 (origin
21374 (method url-fetch)
21375 (uri (pypi-uri "fuzzywuzzy" version))
21376 (sha256
21377 (base32
21378 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
21379 (build-system python-build-system)
21380 (native-inputs
21381 `(("python-hypothesis" ,python-hypothesis)
21382 ("python-pycodestyle" ,python-pycodestyle)
21383 ("python-pytest" ,python-pytest)))
21384 (propagated-inputs
21385 `(("python-levenshtein" ,python-levenshtein)))
21386 (home-page "https://github.com/seatgeek/fuzzywuzzy")
21387 (synopsis "Fuzzy string matching in Python")
21388 (description "Approximate string matching using
21389 @emph{Levenshtein Distance} to calculate the differences between
21390 sequences.")
21391 (license license:gpl2)))
21392
21393 (define-public python2-fuzzywuzzy
21394 (package-with-python2 python-fuzzywuzzy))
21395
21396 (define-public python-block-tracing
21397 (package
21398 (name "python-block-tracing")
21399 (version "1.0.1")
21400 (source
21401 (origin
21402 (method url-fetch)
21403 (uri (pypi-uri "block_tracing" version))
21404 (sha256
21405 (base32
21406 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
21407 (build-system python-build-system)
21408 (arguments '(#:tests? #f)) ; no tests
21409 (home-page "https://github.com/rianhunter/block_tracing")
21410 (synopsis "Protect process memory")
21411 (description
21412 "@code{block_tracing} is a tiny Python library that can be used to
21413 prevent debuggers and other applications from inspecting the memory within
21414 your process.")
21415 (license license:expat)))
21416
21417 (define-public python-gcovr
21418 (package
21419 (name "python-gcovr")
21420 (version "4.2")
21421 (source
21422 (origin
21423 (method url-fetch)
21424 (uri (pypi-uri "gcovr" version))
21425 (sha256
21426 (base32
21427 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
21428 (build-system python-build-system)
21429 (propagated-inputs
21430 `(("python-lxml" ,python-lxml)
21431 ("python-jinja2" ,python-jinja2)))
21432 (home-page "https://gcovr.com/")
21433 (synopsis "Utility for generating code coverage results")
21434 (description
21435 "Gcovr provides a utility for managing the use of the GNU gcov
21436 utility and generating summarized code coverage results. It is inspired
21437 by the Python coverage.py package, which provides a similar utility for
21438 Python.")
21439 (license license:bsd-3)))
21440
21441 (define-public python-owslib
21442 (package
21443 (name "python-owslib")
21444 (version "0.19.2")
21445 (source
21446 (origin
21447 (method url-fetch)
21448 (uri (pypi-uri "OWSLib" version))
21449 (sha256
21450 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
21451 (build-system python-build-system)
21452 (arguments
21453 '(#:tests? #f)) ; TODO: package dependencies required for tests.
21454 (synopsis "Interface for Open Geospatial Consortium web service")
21455 (description
21456 "OWSLib is a Python package for client programming with Open Geospatial
21457 Consortium (OGC) web service (hence OWS) interface standards, and their related
21458 content models.")
21459 (home-page "https://geopython.github.io/OWSLib/")
21460 (license license:bsd-3)))
21461
21462 (define-public python-docusign-esign
21463 (package
21464 (name "python-docusign-esign")
21465 (version "3.1.0")
21466 (source (origin
21467 (method url-fetch)
21468 (uri (pypi-uri "docusign_esign" version))
21469 (sha256
21470 (base32
21471 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
21472 (build-system python-build-system)
21473 ;; Testing requires undocumented setup changes, and so testing is disabled here.
21474 (arguments `(#:tests? #f))
21475 (propagated-inputs
21476 `(("python-certifi" ,python-certifi)
21477 ("python-six" ,python-six)
21478 ("python-dateutil" ,python-dateutil)
21479 ("python-urllib3" ,python-urllib3)
21480 ("python-pyjwt" ,python-pyjwt)
21481 ("python-cryptography" ,python-cryptography)
21482 ("python-nose" ,python-nose)))
21483 (synopsis "DocuSign Python Client")
21484 (description "The Official DocuSign Python Client Library used to interact
21485 with the eSign REST API. Send, sign, and approve documents using this client.")
21486 (home-page "https://www.docusign.com/devcenter")
21487 (license license:expat)))
21488
21489 (define-public python-xattr
21490 (package
21491 (name "python-xattr")
21492 (version "0.9.7")
21493 (source
21494 (origin
21495 (method url-fetch)
21496 (uri (pypi-uri "xattr" version))
21497 (sha256
21498 (base32
21499 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
21500 (build-system python-build-system)
21501 (propagated-inputs
21502 `(("python-cffi" ,python-cffi)))
21503 (home-page "https://github.com/xattr/xattr")
21504 (synopsis
21505 "Python wrapper for extended file system attributes")
21506 (description "This package provides a Python wrapper for using extended
21507 file system attributes. Extended attributes extend the basic attributes of files
21508 and directories in the file system. They are stored as name:data pairs
21509 associated with file system objects (files, directories, symlinks, etc).")
21510 (license license:expat)))
21511
21512 (define-public python-json-logger
21513 (package
21514 (name "python-json-logger")
21515 (version "0.1.11")
21516 (source
21517 (origin
21518 (method url-fetch)
21519 (uri (pypi-uri "python-json-logger" version))
21520 (sha256
21521 (base32
21522 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
21523 (build-system python-build-system)
21524 (home-page
21525 "https://github.com/madzak/python-json-logger")
21526 (synopsis "JSON log formatter in Python")
21527 (description "This library allows standard Python logging to output log data
21528 as JSON objects. With JSON we can make our logs more readable by machines and
21529 we can stop writing custom parsers for syslog-type records.")
21530 (license license:bsd-3)))
21531
21532 (define-public python-daiquiri
21533 (package
21534 (name "python-daiquiri")
21535 (version "2.1.1")
21536 (source
21537 (origin
21538 (method url-fetch)
21539 (uri (pypi-uri "daiquiri" version))
21540 (sha256
21541 (base32
21542 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
21543 (build-system python-build-system)
21544 (propagated-inputs
21545 `(("python-json-logger" ,python-json-logger)))
21546 (native-inputs
21547 `(("python-mock" ,python-mock)
21548 ("python-pytest" ,python-pytest)
21549 ("python-setuptools-scm" ,python-setuptools-scm)
21550 ("python-six" ,python-six)))
21551 (home-page "https://github.com/jd/daiquiri")
21552 (synopsis
21553 "Library to configure Python logging easily")
21554 (description "The daiquiri library provides an easy way to configure
21555 logging in Python. It also provides some custom formatters and handlers.")
21556 (license license:asl2.0)))
21557
21558 (define-public python-pifpaf
21559 (package
21560 (name "python-pifpaf")
21561 (version "2.5.0")
21562 (source
21563 (origin
21564 (method url-fetch)
21565 (uri (pypi-uri "pifpaf" version))
21566 (sha256
21567 (base32
21568 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
21569 (build-system python-build-system)
21570 (arguments
21571 '(#:phases
21572 (modify-phases %standard-phases
21573 (replace 'check
21574 (lambda _
21575 (invoke "python" "setup.py" "testr" "--slowest"
21576 "--testr-args=until-failure"))))))
21577 (propagated-inputs
21578 `(("python-click" ,python-click)
21579 ("python-daiquiri" ,python-daiquiri)
21580 ("python-fixtures" ,python-fixtures)
21581 ("python-jinja2" ,python-jinja2)
21582 ("python-pbr" ,python-pbr)
21583 ("python-psutil" ,python-psutil)
21584 ("python-six" ,python-six)
21585 ("python-xattr" ,python-xattr)))
21586 (native-inputs
21587 `(("python-mock" ,python-mock)
21588 ("python-os-testr" ,python-os-testr)
21589 ("python-requests" ,python-requests)
21590 ("python-testrepository" ,python-testrepository)
21591 ("python-testtools" ,python-testtools)))
21592 (home-page "https://github.com/jd/pifpaf")
21593 (synopsis "Tools and fixtures to manage daemons for testing in Python")
21594 (description "Pifpaf is a suite of fixtures and a command-line tool that
21595 starts and stops daemons for a quick throw-away usage. This is typically
21596 useful when needing these daemons to run integration testing. It originally
21597 evolved from its precursor @code{overtest}.")
21598 (license license:asl2.0)))
21599
21600 (define-public python-pytest-check-links
21601 (package
21602 (name "python-pytest-check-links")
21603 (version "0.3.0")
21604 (source
21605 (origin
21606 (method url-fetch)
21607 ;; URI uses underscores
21608 (uri (pypi-uri "pytest_check_links" version))
21609 (sha256
21610 (base32
21611 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
21612 (build-system python-build-system)
21613 (propagated-inputs
21614 `(("python-docutils" ,python-docutils)
21615 ("python-html5lib" ,python-html5lib)
21616 ("python-nbconvert" ,python-nbconvert)
21617 ("python-nbformat" ,python-nbformat)
21618 ("python-pytest" ,python-pytest)
21619 ("python-six" ,python-six)))
21620 (native-inputs
21621 `(("python-pbr-minimal" ,python-pbr-minimal)))
21622 (home-page "https://github.com/minrk/pytest-check-links")
21623 (synopsis "Check links in files")
21624 (description "This package provides a pytest plugin that checks URLs for
21625 HTML-containing files.")
21626 (license license:bsd-3)))
21627
21628 (define-public python-json5
21629 (package
21630 (name "python-json5")
21631 (version "0.8.5")
21632 (source
21633 (origin
21634 ;; sample.json5 is missing from PyPi source tarball
21635 (method git-fetch)
21636 (uri (git-reference
21637 (url "https://github.com/dpranke/pyjson5")
21638 (commit (string-append "v" version))))
21639 (file-name (git-file-name name version))
21640 (sha256
21641 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
21642 (build-system python-build-system)
21643 (home-page "https://github.com/dpranke/pyjson5")
21644 (synopsis
21645 "Python implementation of the JSON5 data format")
21646 (description
21647 "JSON5 extends the JSON data interchange format to make it slightly more
21648 usable as a configuration language. This Python package implements parsing and
21649 dumping of JSON5 data structures.")
21650 (license license:asl2.0)))
21651
21652 (define-public python-frozendict
21653 (package
21654 (name "python-frozendict")
21655 (version "1.2")
21656 (source
21657 (origin
21658 (method url-fetch)
21659 (uri (pypi-uri "frozendict" version))
21660 (sha256
21661 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
21662 (build-system python-build-system)
21663 (home-page "https://github.com/slezica/python-frozendict")
21664 (synopsis "Simple immutable mapping for Python")
21665 (description
21666 "@dfn{frozendict} is an immutable wrapper around dictionaries that
21667 implements the complete mapping interface. It can be used as a drop-in
21668 replacement for dictionaries where immutability is desired.")
21669 (license license:expat)))
21670
21671 (define-public python-unpaddedbase64
21672 (package
21673 (name "python-unpaddedbase64")
21674 (version "1.1.0")
21675 (source
21676 (origin
21677 (method git-fetch)
21678 (uri (git-reference
21679 (url "https://github.com/matrix-org/python-unpaddedbase64")
21680 (commit (string-append "v" version))))
21681 (file-name (git-file-name name version))
21682 (sha256
21683 (base32
21684 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
21685 (build-system python-build-system)
21686 (home-page "https://pypi.org/project/unpaddedbase64/")
21687 (synopsis "Encode and decode Base64 without “=” padding")
21688 (description
21689 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
21690 using “=” characters. However this conveys no benefit so many protocols
21691 choose to use Base64 without the “=” padding.")
21692 (license license:asl2.0)))
21693
21694 (define-public python-py-cpuinfo
21695 (package
21696 (name "python-py-cpuinfo")
21697 (version "5.0.0")
21698 (source
21699 (origin
21700 (method url-fetch)
21701 (uri (pypi-uri "py-cpuinfo" version))
21702 (sha256
21703 (base32
21704 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
21705 (build-system python-build-system)
21706 (home-page "https://github.com/workhorsy/py-cpuinfo")
21707 (synopsis "Get CPU info with Python")
21708 (description
21709 "This Python module returns the CPU info by using the best sources of
21710 information for your operating system.")
21711 (license license:expat)))
21712
21713 (define-public python-canonicaljson
21714 (package
21715 (name "python-canonicaljson")
21716 (version "1.4.0")
21717 (source
21718 (origin
21719 (method url-fetch)
21720 (uri (pypi-uri "canonicaljson" version))
21721 (sha256
21722 (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
21723 (build-system python-build-system)
21724 (propagated-inputs
21725 `(("python-six" ,python-six)
21726 ("python-frozendict" ,python-frozendict)
21727 ("python-simplejson" ,python-simplejson)))
21728 (home-page "https://github.com/matrix-org/python-canonicaljson")
21729 (synopsis "Canonical JSON")
21730 (description
21731 "Deterministically encode JSON.
21732
21733 @itemize
21734 @item Encodes objects and arrays as RFC 7159 JSON.
21735 @item Sorts object keys so that you get the same result each time.
21736 @item Has no insignificant whitespace to make the output as small as possible.
21737 @item Escapes only the characters that must be escaped, U+0000 to
21738 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21739 @item Uses the shortest escape sequence for each escaped character.
21740 @item Encodes the JSON as UTF-8.
21741 @item Can encode frozendict immutable dictionaries.
21742 @end itemize")
21743 (license license:asl2.0)))
21744
21745 (define-public python-signedjson
21746 (package
21747 (name "python-signedjson")
21748 (version "1.1.1")
21749 (source
21750 (origin
21751 (method url-fetch)
21752 (uri (pypi-uri "signedjson" version))
21753 (sha256
21754 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21755 (build-system python-build-system)
21756 (propagated-inputs
21757 `(("python-canonicaljson" ,python-canonicaljson)
21758 ("python-importlib-metadata" ,python-importlib-metadata)
21759 ("python-pynacl" ,python-pynacl)
21760 ("python-typing-extensions" ,python-typing-extensions)
21761 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21762 (native-inputs
21763 `(("python-setuptools-scm" ,python-setuptools-scm)))
21764 (home-page "https://github.com/matrix-org/python-signedjson")
21765 (synopsis "Sign JSON objects with ED25519 signatures")
21766 (description
21767 "Sign JSON objects with ED25519 signatures.
21768
21769 @itemize
21770 @item More than one entity can sign the same object.
21771 @item Each entity can sign the object with more than one key making it easier to
21772 rotate keys
21773 @item ED25519 can be replaced with a different algorithm.
21774 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21775 key.
21776 @end itemize")
21777 (license license:asl2.0)))
21778
21779 (define-public python-daemonize
21780 (package
21781 (name "python-daemonize")
21782 (version "2.5.0")
21783 (source
21784 (origin
21785 (method url-fetch)
21786 (uri (pypi-uri "daemonize" version))
21787 (sha256
21788 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21789 (build-system python-build-system)
21790 (home-page "https://github.com/thesharp/daemonize")
21791 (synopsis "Library for writing system daemons in Python")
21792 (description "Daemonize is a library for writing system daemons in Python.")
21793 (license license:expat)))
21794
21795 (define-public python-pymacaroons
21796 (package
21797 (name "python-pymacaroons")
21798 (version "0.13.0")
21799 (source
21800 (origin
21801 (method url-fetch)
21802 (uri (pypi-uri "pymacaroons" version))
21803 (sha256
21804 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21805 (build-system python-build-system)
21806 (propagated-inputs
21807 `(("python-six" ,python-six)
21808 ("python-pynacl" ,python-pynacl)))
21809 (home-page "https://github.com/ecordell/pymacaroons")
21810 (synopsis "Python Macaroon Library")
21811 (description
21812 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21813 tokens, macaroons embed caveats that define specific authorization
21814 requirements for the target service, the service that issued the root macaroon
21815 and which is capable of verifying the integrity of macaroons it receives.
21816
21817 Macaroons allow for delegation and attenuation of authorization. They are
21818 simple and fast to verify, and decouple authorization policy from the
21819 enforcement of that policy.")
21820 (license license:expat)))
21821
21822 (define-public python-ldap3
21823 (package
21824 (name "python-ldap3")
21825 (version "2.7")
21826 (home-page "https://github.com/cannatag/ldap3")
21827 (source
21828 (origin
21829 (method git-fetch)
21830 (uri (git-reference (url home-page)
21831 (commit (string-append "v" version))))
21832 (file-name (git-file-name name version))
21833 (sha256
21834 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21835 (build-system python-build-system)
21836 (arguments
21837 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21838 #:phases (modify-phases %standard-phases
21839 (replace 'check
21840 (lambda* (#:key tests? #:allow-other-keys)
21841 (when tests?
21842 (invoke "nosetests" "-s" "test"))
21843 #t)))))
21844 (native-inputs
21845 `(("python-nose" ,python-nose)))
21846 (propagated-inputs
21847 `(("python-gssapi" ,python-gssapi)
21848 ("python-pyasn1" ,python-pyasn1)))
21849 (synopsis "Python LDAP client")
21850 (description
21851 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21852 library.")
21853 (license license:lgpl3+)))
21854
21855 (define-public python-boltons
21856 (package
21857 (name "python-boltons")
21858 (version "20.0.0")
21859 (source
21860 (origin
21861 (method url-fetch)
21862 (uri (pypi-uri "boltons" version))
21863 (sha256
21864 (base32
21865 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21866 (build-system python-build-system)
21867 (home-page "https://github.com/mahmoud/boltons")
21868 (synopsis "Extensions to the Python standard library")
21869 (description
21870 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21871 as — and yet conspicuously missing from — the standard library, including:
21872
21873 @itemize
21874 @item Atomic file saving, bolted on with fileutils
21875 @item A highly-optimized OrderedMultiDict, in dictutils
21876 @item Two types of PriorityQueue, in queueutils
21877 @item Chunked and windowed iteration, in iterutils
21878 @item Recursive data structure iteration and merging, with iterutils.remap
21879 @item Exponential backoff functionality, including jitter, through
21880 iterutils.backoff
21881 @item A full-featured TracebackInfo type, for representing stack traces, in
21882 tbutils
21883 @end itemize")
21884 (license license:bsd-3)))
21885
21886 (define-public python-eliot
21887 (package
21888 (name "python-eliot")
21889 (version "1.12.0")
21890 (source
21891 (origin
21892 (method url-fetch)
21893 (uri (pypi-uri "eliot" version))
21894 (sha256
21895 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21896 (build-system python-build-system)
21897 (arguments
21898 `(#:phases
21899 (modify-phases %standard-phases
21900 (add-after 'unpack 'remove-journald-support
21901 (lambda _
21902 (for-each delete-file
21903 '("eliot/tests/test_journald.py"
21904 "eliot/journald.py"))
21905 #t))
21906 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21907 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21908 ;; be installed and these tests should pass.
21909 (lambda _
21910 (delete-file "eliot/tests/test_prettyprint.py")
21911 #t)))))
21912 (propagated-inputs
21913 `(("python-boltons" ,python-boltons)
21914 ("python-pyrsistent" ,python-pyrsistent)
21915 ("python-six" ,python-six)
21916 ("python-zope-interface" ,python-zope-interface)))
21917 (native-inputs
21918 `(("python-black" ,python-black)
21919 ("python-coverage" ,python-coverage)
21920 ("python-dask" ,python-dask)
21921 ("python-flake8" ,python-flake8)
21922 ("python-hypothesis" ,python-hypothesis)
21923 ("python-pytest" ,python-pytest)
21924 ("python-setuptools" ,python-setuptools)
21925 ("python-sphinx" ,python-sphinx)
21926 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21927 ("python-testtools" ,python-testtools)
21928 ("python-twine" ,python-twine)
21929 ("python-twisted" ,python-twisted)))
21930 (home-page "https://github.com/itamarst/eliot/")
21931 (synopsis "Eliot: the logging system that tells you why it happened")
21932 (description
21933 "@dfn{eliot} is a Python logging system that outputs causal chains of
21934 actions: actions can spawn other actions, and eventually they either succeed
21935 or fail. The resulting logs tell you the story of what your software did: what
21936 happened, and what caused it.")
21937 (license license:asl2.0)))
21938
21939 (define-public python-pem
21940 (package
21941 (name "python-pem")
21942 (version "20.1.0")
21943 (source
21944 (origin
21945 (method url-fetch)
21946 (uri (pypi-uri "pem" version))
21947 (sha256
21948 (base32
21949 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21950 (build-system python-build-system)
21951 (native-inputs
21952 `(("python-certifi" ,python-certifi)
21953 ("python-coverage" ,python-coverage)
21954 ("python-pretend" ,python-pretend)
21955 ("python-pyopenssl" ,python-pyopenssl)
21956 ("python-pytest" ,python-pytest)
21957 ("python-sphinx" ,python-sphinx)
21958 ("python-twisted" ,python-twisted)))
21959 (home-page "https://pem.readthedocs.io/")
21960 (synopsis "Easy PEM file parsing in Python")
21961 (description
21962 "This package provides a Python module for parsing and splitting PEM files.")
21963 (license license:expat)))
21964
21965 (define-public python-txsni
21966 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21967 ;; Python and OpenSSL.
21968 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21969 (revision "0"))
21970 (package
21971 (name "python-txsni")
21972 (version (git-version "0.1.9" revision commit))
21973 (home-page "https://github.com/glyph/txsni")
21974 (source
21975 (origin
21976 (method git-fetch)
21977 (uri (git-reference (url home-page) (commit commit)))
21978 (file-name (git-file-name name version))
21979 (sha256
21980 (base32
21981 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21982 (build-system python-build-system)
21983 (propagated-inputs
21984 `(("python-pyopenssl" ,python-pyopenssl)
21985 ("python-service-identity" ,python-service-identity)
21986 ("python-twisted" ,python-twisted)))
21987 (synopsis "Run TLS servers with Twisted")
21988 (description
21989 "This package provides an easy-to-use SNI endpoint for use
21990 with the Twisted web framework.")
21991 (license license:expat))))
21992
21993 (define-public python-txacme
21994 (package
21995 (name "python-txacme")
21996 (version "0.9.2")
21997 (source
21998 (origin
21999 (method url-fetch)
22000 (uri (pypi-uri "txacme" version))
22001 (sha256
22002 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
22003 (build-system python-build-system)
22004 (propagated-inputs
22005 `(("python-acme" ,python-acme)
22006 ("python-attrs" ,python-attrs)
22007 ("python-eliot" ,python-eliot)
22008 ("python-josepy" ,python-josepy)
22009 ("python-pem" ,python-pem)
22010 ("python-treq" ,python-treq)
22011 ("python-twisted" ,python-twisted)
22012 ("python-txsni" ,python-txsni)))
22013 (native-inputs
22014 `(("python-fixtures" ,python-fixtures)
22015 ("python-hypothesis" ,python-hypothesis)
22016 ("python-mock" ,python-mock)
22017 ("python-service-identity"
22018 ,python-service-identity)
22019 ("python-testrepository" ,python-testrepository)
22020 ("python-testscenarios" ,python-testscenarios)
22021 ("python-testtools" ,python-testtools)))
22022 (home-page "https://github.com/twisted/txacme")
22023 (synopsis "Twisted implexmentation of the ACME protocol")
22024 (description
22025 "ACME is Automatic Certificate Management Environment, a protocol that
22026 allows clients and certificate authorities to automate verification and
22027 certificate issuance. The ACME protocol is used by the free Let's Encrypt
22028 Certificate Authority.
22029
22030 txacme is an implementation of the protocol for Twisted, the event-driven
22031 networking engine for Python.")
22032 (license license:expat)))
22033
22034 (define-public python-pysaml2
22035 (package
22036 (name "python-pysaml2")
22037 (version "5.0.0")
22038 (source
22039 (origin
22040 (method url-fetch)
22041 (uri (pypi-uri "pysaml2" version))
22042 (sha256
22043 (base32
22044 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
22045 (build-system python-build-system)
22046 (propagated-inputs
22047 `(("python-cryptography" ,python-cryptography)
22048 ("python-dateutil" ,python-dateutil)
22049 ("python-defusedxml" ,python-defusedxml)
22050 ("python-pyopenssl" ,python-pyopenssl)
22051 ("python-pytz" ,python-pytz)
22052 ("python-requests" ,python-requests)
22053 ("python-six" ,python-six)))
22054 (home-page "https://idpy.org")
22055 (synopsis "Python implementation of SAML Version 2 Standard")
22056 (description
22057 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
22058 It contains all necessary pieces for building a SAML2 service provider or
22059 an identity provider. The distribution contains examples of both.
22060
22061 This package was originally written to work in a WSGI environment, but
22062 there are extensions that allow you to use it with other frameworks.")
22063 (license license:asl2.0)))
22064
22065 (define-public python-click-plugins
22066 (package
22067 (name "python-click-plugins")
22068 (version "1.1.1")
22069 (source
22070 (origin
22071 (method url-fetch)
22072 (uri (pypi-uri "click-plugins" version))
22073 (sha256
22074 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
22075 (build-system python-build-system)
22076 (native-inputs
22077 `(("python-pytest" ,python-pytest)))
22078 (propagated-inputs
22079 `(("python-click" ,python-click)))
22080 (synopsis "Extension for Click to register external CLI commands")
22081 (description "This package provides n extension module for Click to
22082 register external CLI commands via setuptools entry-points.")
22083 (home-page "https://github.com/click-contrib/click-plugins")
22084 (license license:bsd-3)))
22085
22086 (define-public python-diceware
22087 (package
22088 (name "python-diceware")
22089 (version "0.9.6")
22090 (source
22091 (origin
22092 (method url-fetch)
22093 (uri (pypi-uri "diceware" version))
22094 (sha256
22095 (base32
22096 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
22097 (build-system python-build-system)
22098 (native-inputs
22099 `(("python-coverage" ,python-coverage)
22100 ("python-pytest" ,python-pytest)
22101 ("python-pytest-runner" ,python-pytest-runner)))
22102 (home-page "https://github.com/ulif/diceware/")
22103 (synopsis "Generates memorable passphrases")
22104 (description "This package generates passphrases by concatenating words
22105 randomly picked from wordlists. It supports several sources of
22106 randomness (including real life dice) and different wordlists (including
22107 cryptographically signed ones).")
22108 (license license:gpl3+)))
22109
22110 (define-public python-dictdiffer
22111 (package
22112 (name "python-dictdiffer")
22113 (version "0.8.1")
22114 (source (origin
22115 (method url-fetch)
22116 (uri (pypi-uri "dictdiffer" version))
22117 (sha256
22118 (base32
22119 "1lk3qmy1hkaphk4n7ayfk0wl6m2yvd6r7qkam6yncqfzgkbc1phs"))))
22120 (build-system python-build-system)
22121 (native-inputs
22122 `(("python-check-manifest" ,python-check-manifest)
22123 ("python-coverage" ,python-coverage)
22124 ("python-isort" ,python-isort)
22125 ("python-mock" ,python-mock)
22126 ("python-pydoctstyle" ,python-pydocstyle)
22127 ("python-pytest-cache" ,python-pytest-cache)
22128 ("python-pytest-cov" ,python-pytest-cov)
22129 ("python-pytest-pep8" ,python-pytest-pep8)
22130 ("python-pytest-runner" ,python-pytest-runner)
22131 ("python-pytest" ,python-pytest)
22132 ("python-setuptools-scm" ,python-setuptools-scm)
22133 ("python-tox" ,python-tox)))
22134 (home-page "https://github.com/inveniosoftware/dictdiffer")
22135 (synopsis "Diff and patch Python dictionary objects")
22136 (description
22137 "Dictdiffer is a Python module that helps you to diff and patch
22138 dictionaries.")
22139 (license license:expat)))
22140
22141 (define-public pyzo
22142 (package
22143 (name "pyzo")
22144 (version "4.11.0")
22145 (source
22146 (origin
22147 (method url-fetch)
22148 (uri (pypi-uri "pyzo" version))
22149 (sha256
22150 (base32 "0vzsk6rchavlvy7ciq1z9qh3qrj9q213v2nn491fgjq3g19glj53"))))
22151 (build-system python-build-system)
22152 (arguments
22153 `(#:phases
22154 (modify-phases %standard-phases
22155 (add-before 'check 'fix-home-directory
22156 (lambda _
22157 ;; Tests fail with "Permission denied: '/homeless-shelter'".
22158 (setenv "HOME" "/tmp")
22159 #t)))
22160 ;; Tests fail with "Uncaught Python exception: python: undefined
22161 ;; symbol: objc_getClass".
22162 #:tests? #f))
22163 (propagated-inputs
22164 `(("python-pyqt" ,python-pyqt)))
22165 (home-page "https://pyzo.org")
22166 (synopsis
22167 "Python IDE for scientific computing")
22168 (description
22169 "Pyzo is a Python IDE focused on interactivity and introspection,
22170 which makes it very suitable for scientific computing. Its practical
22171 design is aimed at simplicity and efficiency.
22172
22173 It consists of two main components, the editor and the shell, and uses
22174 a set of pluggable tools to help the programmer in various ways. Some
22175 example tools are source structure, project manager, interactive help,
22176 workspace...")
22177 (license license:bsd-2)))
22178
22179 (define-public python-osc
22180 (package
22181 (name "python-osc")
22182 (version "1.7.4")
22183 (source
22184 (origin
22185 (method url-fetch)
22186 (uri (pypi-uri "python-osc" version))
22187 (sha256
22188 (base32
22189 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
22190 (build-system python-build-system)
22191 (home-page "https://github.com/attwad/python-osc")
22192 (synopsis "Open Sound Control server and client implementations")
22193 (description
22194 "@code{python-osc} is a pure Python library with no external
22195 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
22196 Open Sound Control 1.0} specification.")
22197 (license license:unlicense)))
22198
22199 (define-public python-voluptuous
22200 (package
22201 (name "python-voluptuous")
22202 (version "0.11.7")
22203 (source
22204 (origin
22205 (method url-fetch)
22206 (uri (pypi-uri "voluptuous" version))
22207 (sha256
22208 (base32
22209 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
22210 (build-system python-build-system)
22211 (native-inputs
22212 `(("python-nose" ,python-nose)))
22213 (home-page "https://github.com/alecthomas/voluptuous")
22214 (synopsis "Python data validation library")
22215 (description
22216 "Voluptuous is a Python data validation library. It is primarily
22217 intended for validating data coming into Python as JSON, YAML, etc.")
22218 (license license:bsd-3)))
22219
22220 (define-public python-cmd2
22221 (package
22222 (name "python-cmd2")
22223 (version "1.0.2")
22224 (source
22225 (origin
22226 (method url-fetch)
22227 (uri (pypi-uri "cmd2" version))
22228 (sha256
22229 (base32
22230 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
22231 (build-system python-build-system)
22232 (propagated-inputs
22233 `(("python-attrs" ,python-attrs)
22234 ("python-colorama" ,python-colorama)
22235 ("python-pyperclip" ,python-pyperclip)
22236 ("python-wcwidth" ,python-wcwidth)))
22237 (native-inputs
22238 `(("python-codecov" ,python-codecov)
22239 ("python-coverage" ,python-coverage)
22240 ("python-doc8" ,python-doc8)
22241 ("python-flake8" ,python-flake8)
22242 ("python-invoke" ,python-invoke)
22243 ("python-mock" ,python-mock)
22244 ("python-pytest" ,python-pytest)
22245 ("python-pytest-cov" ,python-pytest-cov)
22246 ("python-pytest-mock" ,python-pytest-mock)
22247 ("python-setuptools-scm" ,python-setuptools-scm)
22248 ("python-sphinx" ,python-sphinx)
22249 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
22250 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
22251 ("python-tox" ,python-tox)
22252 ("python-twine" ,python-twine)
22253 ("which" ,which)))
22254 (home-page "https://github.com/python-cmd2/cmd2")
22255 (synopsis "Tool for building interactive command line applications")
22256 (description
22257 "Cmd2 is a tool for building interactive command line applications in
22258 Python. Its goal is to make it quick and easy for developers to build
22259 feature-rich and user-friendly interactive command line applications. It
22260 provides a simple API which is an extension of Python's built-in @code{cmd}
22261 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
22262 make your life easier and eliminates much of the boilerplate code which would
22263 be necessary when using @code{cmd}.")
22264 (license license:expat)))
22265
22266 (define-public python-pytidylib
22267 (package
22268 (name "python-pytidylib")
22269 (version "0.3.2")
22270 (source (origin
22271 (method url-fetch)
22272 (uri (pypi-uri "pytidylib" version))
22273 (sha256
22274 (base32
22275 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
22276 (build-system python-build-system)
22277 (arguments
22278 '(#:phases
22279 (modify-phases %standard-phases
22280 (add-before 'build 'qualify-libtidy
22281 (lambda* (#:key inputs #:allow-other-keys)
22282 (let ((libtidy (string-append (assoc-ref inputs "tidy")
22283 "/lib/libtidy.so")))
22284 (substitute* "tidylib/tidy.py"
22285 (("ctypes\\.util\\.find_library\\('tidy'\\)")
22286 (format #f "'~a'" libtidy)))
22287 #t))))))
22288 (inputs `(("tidy" ,tidy)))
22289 (home-page "https://github.com/countergram/pytidylib")
22290 (synopsis "Python wrapper for HTML Tidy library")
22291 (description
22292 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
22293 allows you, from Python code, to “fix” invalid (X)HTML markup.")
22294 (license license:expat)))
22295
22296 (define-public python2-pytidylib
22297 (package-with-python2 python-pytidylib))
22298
22299 (define-public python-mujson
22300 (package
22301 (name "python-mujson")
22302 (version "1.4")
22303 (source
22304 (origin
22305 (method url-fetch)
22306 (uri (pypi-uri "mujson" version))
22307 (sha256
22308 (base32
22309 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
22310 (build-system python-build-system)
22311 (home-page "https://github.com/mattgiles/mujson")
22312 (synopsis "Use the fastest JSON functions available at import time")
22313 (description "This package selects the fastest JSON functions available
22314 at import time.")
22315 (license license:expat)))
22316
22317 (define-public python-bashlex
22318 (package
22319 (name "python-bashlex")
22320 (version "0.14")
22321 (source
22322 (origin
22323 (method url-fetch)
22324 (uri (pypi-uri "bashlex" version))
22325 (sha256
22326 (base32
22327 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
22328 (build-system python-build-system)
22329 (arguments
22330 `(#:phases
22331 (modify-phases %standard-phases
22332 (add-before 'build 'pregenerate-yacc-tables
22333 (lambda _
22334 ;; parser.py caches tables, which attempts to write to site lib
22335 ;; see https://github.com/idank/bashlex/issues/51
22336 (invoke "python" "-c" "import bashlex"))))))
22337 (home-page
22338 "https://github.com/idank/bashlex")
22339 (synopsis "Python parser for bash")
22340 (description "@code{bashlex} is a Python port of the parser used
22341 internally by GNU bash.
22342
22343 For the most part it's transliterated from C, the major differences are:
22344
22345 @itemize
22346 @item it does not execute anything
22347 @item it is reentrant
22348 @item it generates a complete AST
22349 @end itemize
22350 ")
22351 (license license:gpl3+)))
22352
22353 (define-public python-jinxed
22354 (package
22355 (name "python-jinxed")
22356 (version "1.0.0")
22357 (source
22358 (origin
22359 (method url-fetch)
22360 (uri (pypi-uri "jinxed" version))
22361 (sha256
22362 (base32
22363 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
22364 (build-system python-build-system)
22365 (arguments
22366 '(#:phases
22367 (modify-phases %standard-phases
22368 (add-before 'check 'set-environment-variables
22369 (lambda* (#:key inputs #:allow-other-keys)
22370 (let ((ncurses (assoc-ref inputs "ncurses")))
22371 (setenv "TERM" "LINUX")
22372 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
22373 #t))))
22374 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
22375 (native-inputs
22376 `(("ncurses" ,ncurses)))
22377 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
22378 (synopsis "Jinxed Terminal Library")
22379 (description
22380 "Jinxed is an implementation of a subset of the Python curses library.")
22381 (license license:mpl2.0)))
22382
22383 (define-public python-blessed
22384 (package
22385 (name "python-blessed")
22386 (version "1.17.8")
22387 (source
22388 (origin
22389 (method url-fetch)
22390 (uri (pypi-uri "blessed" version))
22391 (sha256
22392 (base32
22393 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
22394 (modules '((guix build utils)))
22395 (snippet
22396 '(begin
22397 ;; Don't get hung up on Windows test failures.
22398 (delete-file "blessed/win_terminal.py") #t))))
22399 (build-system python-build-system)
22400 (propagated-inputs
22401 `(("python-jinxed" ,python-jinxed)
22402 ("python-six" ,python-six)
22403 ("python-wcwidth" ,python-wcwidth)))
22404 (native-inputs
22405 `(("python-mock" ,python-mock)
22406 ("python-pytest" ,python-pytest)))
22407 (home-page "https://github.com/jquast/blessed")
22408 (synopsis "Wrapper around terminal capabilities")
22409 (description
22410 "Blessed is a thin, practical wrapper around terminal styling, screen
22411 positioning, and keyboard input.")
22412 (license license:expat)))
22413
22414 (define-public python-readme-renderer
22415 (package
22416 (name "python-readme-renderer")
22417 (version "26.0")
22418 (source
22419 (origin
22420 (method url-fetch)
22421 (uri (pypi-uri "readme_renderer" version))
22422 (sha256
22423 (base32
22424 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
22425 (build-system python-build-system)
22426 (propagated-inputs
22427 `(("python-bleach" ,python-bleach)
22428 ("python-docutils" ,python-docutils)
22429 ("python-pygments" ,python-pygments)
22430 ("python-six" ,python-six)))
22431 (native-inputs
22432 `(("python-mock" ,python-mock)
22433 ("python-pytest" ,python-pytest)))
22434 (home-page "https://github.com/pypa/readme_renderer")
22435 (synopsis "Render README files in Warehouse")
22436 (description
22437 "Readme Renderer is a library that will safely render arbitrary README
22438 files into HTML. It is designed to be used in Warehouse to render the
22439 @code{long_description} for packages. It can handle Markdown, reStructuredText,
22440 and plain text.")
22441 (license license:asl2.0)))
22442
22443 (define-public python-lazr-delegates
22444 (package
22445 (name "python-lazr-delegates")
22446 (version "2.0.4")
22447 (source
22448 (origin
22449 (method url-fetch)
22450 (uri (pypi-uri "lazr.delegates" version))
22451 (sha256
22452 (base32
22453 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
22454 (build-system python-build-system)
22455 (arguments
22456 '(#:phases
22457 (modify-phases %standard-phases
22458 (replace 'check
22459 (lambda _
22460 (invoke "python" "setup.py" "nosetests"))))))
22461 (native-inputs
22462 `(("python-nose" ,python-nose)))
22463 (propagated-inputs
22464 `(("python-zope-interface" ,python-zope-interface)))
22465 (home-page "https://launchpad.net/lazr.delegates")
22466 (synopsis "Easily write objects that delegate behavior")
22467 (description
22468 "The @code{lazr.delegates} package makes it easy to write objects that
22469 delegate behavior to another object. The new object adds some property or
22470 behavior on to the other object, while still providing the underlying interface,
22471 and delegating behavior.")
22472 (license license:lgpl3)))
22473
22474 (define-public python-lazr-config
22475 (package
22476 (name "python-lazr-config")
22477 (version "2.2.2")
22478 (source
22479 (origin
22480 (method url-fetch)
22481 (uri (pypi-uri "lazr.config" version))
22482 (sha256
22483 (base32
22484 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
22485 (build-system python-build-system)
22486 (arguments
22487 '(#:phases
22488 (modify-phases %standard-phases
22489 (replace 'check
22490 (lambda _
22491 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
22492 (native-inputs
22493 `(("python-nose" ,python-nose)))
22494 (propagated-inputs
22495 `(("python-lazr-delegates" ,python-lazr-delegates)
22496 ("python-zope-interface" ,python-zope-interface)))
22497 (home-page "https://launchpad.net/lazr.config")
22498 (synopsis "Create configuration schemas and process and validate configurations")
22499 (description
22500 "The LAZR config system is typically used to manage process configuration.
22501 Process configuration is for saying how things change when we run systems on
22502 different machines, or under different circumstances. This system uses ini-like
22503 file format of section, keys, and values. The config file supports inheritance
22504 to minimize duplication of information across files. The format supports schema
22505 validation.")
22506 (license license:lgpl3)))
22507
22508 (define-public python-flufl-bounce
22509 (package
22510 (name "python-flufl-bounce")
22511 (version "3.0.1")
22512 (source
22513 (origin
22514 (method url-fetch)
22515 (uri (pypi-uri "flufl.bounce" version))
22516 (sha256
22517 (base32
22518 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
22519 (build-system python-build-system)
22520 (propagated-inputs
22521 `(("python-atpublic" ,python-atpublic)
22522 ("python-zope-interface" ,python-zope-interface)))
22523 (native-inputs
22524 `(("python-nose2" ,python-nose2)))
22525 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
22526 (synopsis "Email bounce detectors")
22527 (description "The @code{flufl.bounce} library provides a set of heuristics
22528 and an API for detecting the original bouncing email addresses from a bounce
22529 message. Many formats found in the wild are supported, as are VERP and
22530 RFC 3464.")
22531 (license (list license:asl2.0
22532 license:lgpl3)))) ; only for setup_headers.py
22533
22534 (define-public python-flufl-i18n
22535 (package
22536 (name "python-flufl-i18n")
22537 (version "3.0")
22538 (source
22539 (origin
22540 (method url-fetch)
22541 (uri (pypi-uri "flufl.i18n" version))
22542 (sha256
22543 (base32
22544 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
22545 (build-system python-build-system)
22546 (propagated-inputs
22547 `(("python-atpublic" ,python-atpublic)))
22548 (home-page "https://flufli18n.readthedocs.io")
22549 (synopsis "API for Python internationalization")
22550 (description
22551 "This package provides a high-level, convenient API for managing
22552 internationalization/translation contexts in Python applications. There is a
22553 simple API for single-context applications, such as command line scripts which
22554 only need to translate into one language during the entire course of their
22555 execution. There is a more flexible, but still convenient API for multi-context
22556 applications, such as servers, which may need to switch language contexts for
22557 different tasks.")
22558 (license license:asl2.0)))
22559
22560 (define-public python-flufl-lock
22561 (package
22562 (name "python-flufl-lock")
22563 (version "4.0")
22564 (source
22565 (origin
22566 (method url-fetch)
22567 (uri (pypi-uri "flufl.lock" version))
22568 (sha256
22569 (base32
22570 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
22571 (build-system python-build-system)
22572 (propagated-inputs
22573 `(("python-atpublic" ,python-atpublic)
22574 ("python-psutil" ,python-psutil)))
22575 (home-page "https://flufllock.readthedocs.io")
22576 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
22577 (description
22578 "The @dfn{flufl.lock} package provides NFS-safe file locking with
22579 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
22580 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
22581 and have a maximum lifetime built-in.")
22582 (license (list license:asl2.0
22583 license:lgpl3)))) ; only for setup_helpers.py
22584
22585 (define-public python-flufl-testing
22586 (package
22587 (name "python-flufl-testing")
22588 (version "0.8")
22589 (source
22590 (origin
22591 (method url-fetch)
22592 (uri (pypi-uri "flufl.testing" version))
22593 (sha256
22594 (base32
22595 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
22596 (build-system python-build-system)
22597 (native-inputs
22598 `(("python-nose2" ,python-nose2)))
22599 (home-page "https://gitlab.com/warsaw/flufl.testing")
22600 (synopsis "Collection of test tool plugins")
22601 (description
22602 "This package contains a small collection of test tool plugins for
22603 @code{nose2} and @code{flake8}.")
22604 (license license:asl2.0)))
22605
22606 (define-public python-devtools
22607 (package
22608 (name "python-devtools")
22609 (version "0.6")
22610 (source
22611 (origin
22612 (method git-fetch)
22613 (uri (git-reference
22614 (url "https://github.com/samuelcolvin/python-devtools")
22615 (commit (string-append "v" version))))
22616 (file-name (git-file-name name version))
22617 (sha256
22618 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
22619 (build-system python-build-system)
22620 (native-inputs
22621 `(("python-pytest" ,python-pytest)
22622 ("python-pytest-mock" ,python-pytest-mock)))
22623 (propagated-inputs
22624 `(("python-pygments" ,python-pygments)))
22625 (arguments
22626 `(#:phases (modify-phases %standard-phases
22627 (replace 'check
22628 (lambda _
22629 (invoke "pytest")
22630 #t)))))
22631 (home-page "https://github.com/samuelcolvin/python-devtools")
22632 (synopsis "Debug command and development tools")
22633 (description
22634 "This package provides a debug print command and other development tools.
22635 It adds a simple and readable way to print stuff during development.")
22636 (license license:expat)))
22637
22638 (define-public python-dateparser
22639 (package
22640 (name "python-dateparser")
22641 (version "0.7.6")
22642 (source
22643 (origin
22644 (method url-fetch)
22645 (uri (pypi-uri "dateparser" version))
22646 (sha256
22647 (base32
22648 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
22649 (build-system python-build-system)
22650 (propagated-inputs
22651 `(("python-dateutil" ,python-dateutil)
22652 ("python-pytz" ,python-pytz)
22653 ("python-regex" ,python-regex)
22654 ("python-ruamel.yaml" ,python-ruamel.yaml)
22655 ("python-tzlocal" ,python-tzlocal)))
22656 (native-inputs
22657 `(("python-mock" ,python-mock)
22658 ("python-parameterized" ,python-parameterized)
22659 ("tzdata" ,tzdata-for-tests)))
22660 (arguments
22661 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
22662 #:tests? #f
22663 #:phases
22664 (modify-phases %standard-phases
22665 (add-before 'check 'set-check-environment
22666 (lambda* (#:key inputs #:allow-other-keys)
22667 (setenv "TZ" "UTC")
22668 (setenv "TZDIR"
22669 (string-append (assoc-ref inputs "tzdata")
22670 "/share/zoneinfo"))
22671 #t)))))
22672 (home-page "https://github.com/scrapinghub/dateparser")
22673 (synopsis
22674 "Date parsing library designed to parse dates from HTML pages")
22675 (description
22676 "@code{python-dateparser} provides modules to easily parse localized
22677 dates in almost any string formats commonly found on web pages.")
22678 (license license:bsd-3)))
22679
22680 (define-public python-dparse
22681 (package
22682 (name "python-dparse")
22683 (version "0.5.1")
22684 (source
22685 (origin
22686 (method url-fetch)
22687 (uri (pypi-uri "dparse" version))
22688 (sha256
22689 (base32
22690 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
22691 (build-system python-build-system)
22692 (native-inputs
22693 `(("python-pytest" ,python-pytest)))
22694 (propagated-inputs
22695 `(("python-packaging" ,python-packaging)
22696 ("python-pyyaml" ,python-pyyaml)
22697 ("python-toml" ,python-toml)))
22698 (home-page "https://github.com/pyupio/dparse")
22699 (synopsis "Parser for Python dependency files")
22700 (description "This package provides a parser for Python dependency files.")
22701 (license license:expat)))
22702
22703 (define-public python-dpath
22704 (package
22705 (name "python-dpath")
22706 (version "2.0.1")
22707 (source
22708 (origin
22709 (method url-fetch)
22710 (uri (pypi-uri "dpath" version))
22711 (sha256
22712 (base32
22713 "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
22714 (build-system python-build-system)
22715 (native-inputs
22716 `(("python-hypothesis" ,python-hypothesis)
22717 ("python-mock" ,python-mock)
22718 ("python-nose" ,python-nose)))
22719 (arguments
22720 '(#:phases
22721 (modify-phases %standard-phases
22722 (replace 'check
22723 (lambda* (#:key inputs outputs #:allow-other-keys)
22724 (add-installed-pythonpath inputs outputs)
22725 ;; This invokation is taken from tox.ini.
22726 (invoke "nosetests" "-d" "-v" "tests/"))))))
22727 (home-page "https://github.com/akesterson/dpath-python")
22728 (synopsis "Filesystem-like pathing and searching for dictionaries")
22729 (description
22730 "@code{python-dpath} is a library for accessing and searching
22731 dictionaries via /slashed/paths ala xpath.
22732
22733 Basically it lets you glob over a dictionary as if it were a filesystem. It
22734 allows you to specify globs (ala the bash eglob syntax, through some advanced
22735 fnmatch.fnmatch magic) to access dictionary elements, and provides some
22736 facility for filtering those results.")
22737 (license license:expat)))
22738
22739 (define-public python-safety
22740 (package
22741 (name "python-safety")
22742 (version "1.9.0")
22743 (source
22744 (origin
22745 (method url-fetch)
22746 (uri (pypi-uri "safety" version))
22747 (sha256
22748 (base32
22749 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
22750 (build-system python-build-system)
22751 (arguments
22752 `(#:phases
22753 (modify-phases %standard-phases
22754 (add-after 'unpack 'disable-tests
22755 (lambda _
22756 (substitute* "tests/test_safety.py"
22757 ;; requires network
22758 (("def test_check_live") "def _test_check_live"))
22759 #t)))))
22760 (propagated-inputs
22761 `(("python-click" ,python-click)
22762 ("python-dparse" ,python-dparse)
22763 ("python-packaging" ,python-packaging)
22764 ("python-requests" ,python-requests)))
22765 (home-page "https://github.com/pyupio/safety")
22766 (synopsis "Check installed dependencies for known vulnerabilities")
22767 (description "Safety checks installed dependencies for known vulnerabilities.
22768 By default it uses the open Python vulnerability database Safety DB.")
22769 (license license:expat)))
22770
22771 (define-public python-pypandoc
22772 (package
22773 (name "python-pypandoc")
22774 (version "1.5")
22775 (source
22776 (origin
22777 (method url-fetch)
22778 (uri (pypi-uri "pypandoc" version))
22779 (sha256
22780 (base32
22781 "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
22782 (build-system python-build-system)
22783 (inputs
22784 `(("pandoc" ,pandoc)
22785 ("pandoc-citeproc" ,pandoc-citeproc)))
22786 (propagated-inputs
22787 `(("wheel" ,python-wheel)))
22788 (native-inputs
22789 `(("texlive" ,(texlive-union (list texlive-amsfonts
22790 texlive-fonts-ec
22791 texlive-latex-hyperref
22792 texlive-latex-oberdiek
22793 texlive-lm
22794 texlive-xcolor)))))
22795 (arguments
22796 `(#:phases
22797 (modify-phases %standard-phases
22798 (add-before 'check 'disable-tests
22799 (lambda _
22800 ;; Disable test requiring network access
22801 (substitute* "tests.py"
22802 (("test_basic_conversion_from_http_url")
22803 "skip_test_basic_conversion_from_http_url"))
22804 ;; Needed by texlive-union to generate fonts
22805 (setenv "HOME" "/tmp")
22806 #t)))))
22807 (home-page "https://github.com/bebraw/pypandoc")
22808 (synopsis "Python wrapper for pandoc")
22809 (description "pypandoc is a thin Python wrapper around pandoc
22810 and pandoc-citeproc.")
22811 (license license:expat)))
22812
22813 (define-public python-rnc2rng
22814 (package
22815 (name "python-rnc2rng")
22816 (version "2.6.4")
22817 (source
22818 (origin
22819 (method url-fetch)
22820 (uri (pypi-uri "rnc2rng" version))
22821 (sha256
22822 (base32
22823 "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
22824 (build-system python-build-system)
22825 (propagated-inputs
22826 `(("python-rply" ,python-rply)))
22827 (arguments
22828 `(#:phases (modify-phases %standard-phases
22829 (replace 'check
22830 (lambda _
22831 (invoke "python" "test.py"))))))
22832 (home-page "https://github.com/djc/rnc2rng")
22833 (synopsis "Convert RELAX NG Compact to regular syntax")
22834 (description
22835 "This package provides the @command{rnc2rng} command-line tool as well as
22836 a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
22837 equivalent schemata in the XML-based default RELAX NG syntax.")
22838 (license license:expat)))
22839
22840 (define-public python-telethon
22841 (package
22842 (name "python-telethon")
22843 (version "1.17.5")
22844 (source
22845 (origin
22846 (method git-fetch)
22847 (uri (git-reference
22848 (url "https://github.com/LonamiWebs/Telethon")
22849 (commit (string-append "v" version))))
22850 (file-name (git-file-name name version))
22851 (sha256
22852 (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
22853 (build-system python-build-system)
22854 (arguments
22855 '(#:phases
22856 (modify-phases %standard-phases
22857 (replace 'check
22858 (lambda* (#:key tests? #:allow-other-keys)
22859 (when tests?
22860 (invoke "py.test" "-v"))
22861 #t)))))
22862 (propagated-inputs
22863 `(("python-rsa" ,python-rsa)
22864 ("python-pyaes" ,python-pyaes)))
22865 (native-inputs
22866 `(("python-pytest" ,python-pytest)
22867 ("python-pytest-asyncio" ,python-pytest-asyncio)
22868 ("python-pytest-trio" ,python-pytest-trio)))
22869 (home-page "https://docs.telethon.dev")
22870 (synopsis "Full-featured Telegram client library for Python 3")
22871 (description "This library is designed to make it easy to write Python
22872 programs that can interact with Telegram.")
22873 (license license:expat)))
22874
22875 (define-public python-citeproc-py
22876 (package
22877 (name "python-citeproc-py")
22878 (version "0.5.1")
22879 (source
22880 (origin
22881 (method url-fetch)
22882 (uri (pypi-uri "citeproc-py" version))
22883 (sha256
22884 (base32
22885 "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
22886 (build-system python-build-system)
22887 (propagated-inputs
22888 `(("python-lxml" ,python-lxml)
22889 ("python-rnc2rng" ,python-rnc2rng)))
22890 (home-page
22891 "https://github.com/brechtm/citeproc-py")
22892 (synopsis "Citations and bibliography formatter")
22893 (description
22894 "Citeproc-py is a CSL processor for Python. It aims to implement the
22895 CSL 1.0.1 specification. citeproc-py can output styled citations and
22896 bibliographies in a number of different output formats. Currently supported
22897 are plain text, reStructuredText and HTML.")
22898 (license license:bsd-2)))
22899
22900 (define-public python-inform
22901 (package
22902 (name "python-inform")
22903 (version "1.23.0")
22904 (source
22905 (origin
22906 (method url-fetch)
22907 (uri (pypi-uri "inform" version))
22908 (sha256
22909 (base32
22910 "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
22911 (build-system python-build-system)
22912 (arguments
22913 `(#:tests? #f)) ; PyPI tarball lacks tests
22914 (native-inputs
22915 `(("python-hypothesis" ,python-hypothesis)
22916 ("python-pytest-cov" ,python-pytest-cov)
22917 ("python-pytest-runner" ,python-pytest-runner)))
22918 (propagated-inputs
22919 `(("python-arrow" ,python-arrow)
22920 ("python-six" ,python-six)))
22921 (home-page "https://inform.readthedocs.io")
22922 (synopsis "Print & logging utilities for communicating with user")
22923 (description
22924 "Inform is designed to display messages from programs that are typically run from
22925 a console. It provides a collection of ‘print’ functions that allow you to simply and
22926 cleanly print different types of messages.")
22927 (license license:gpl3+)))
22928
22929 (define-public python-nestedtext
22930 (package
22931 (name "python-nestedtext")
22932 (version "1.0.0")
22933 (source
22934 (origin
22935 (method url-fetch)
22936 (uri (pypi-uri "nestedtext" version))
22937 (sha256
22938 (base32
22939 "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
22940 (build-system python-build-system)
22941 (arguments
22942 `(#:tests? #f)) ; PyPI tarball lacks tests
22943 (propagated-inputs
22944 `(("python-inform" ,python-inform)))
22945 (home-page "https://nestedtext.org")
22946 (synopsis "Human readable and writable data interchange format")
22947 (description
22948 "NestedText is a file format for holding data that is to be entered, edited, or
22949 viewed by people. It allows data to be organized into a nested collection of
22950 dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
22951 without the complexity and risk of YAML and without the syntatic clutter of JSON.
22952 NestedText is both simple and natural. Only a small number of concepts and rules must
22953 be kept in mind when creating it. It is easily created, modified, or viewed with
22954 a text editor and easily understood and used by both programmers and non-programmers.")
22955 (license license:expat))) ; MIT license
22956
22957 (define-public python-parallel
22958 (package
22959 (name "python-parallel")
22960 (version "1.6.4.4")
22961 (source
22962 (origin
22963 (method url-fetch)
22964 (uri (string-append
22965 "https://www.parallelpython.com/downloads/pp/pp-"
22966 version ".zip"))
22967 (sha256
22968 (base32
22969 "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
22970 (native-inputs
22971 `(("unzip" ,unzip)))
22972 (build-system python-build-system)
22973 (arguments '(#:tests? #f)) ; No test suite.
22974 (home-page "https://www.parallelpython.com")
22975 (synopsis "Parallel and distributed programming for Python")
22976 (description "Parallel Python module (PP) provides an easy and efficient
22977 way to create parallel-enabled applications for SMP computers and clusters.
22978 PP module features cross-platform portability and dynamic load balancing.
22979 Thus applications written with PP will parallelize efficiently even on
22980 heterogeneous and multi-platform clusters (including clusters running other
22981 applications with variable CPU loads).")
22982 (license license:bsd-3)))
22983
22984 (define-public python2-parallel
22985 (package-with-python2 python-parallel))
22986
22987 (define-public python-djvulibre
22988 (package
22989 (name "python-djvulibre")
22990 (version "0.8.5")
22991 (source
22992 (origin
22993 (method url-fetch)
22994 (uri (pypi-uri "python-djvulibre" version))
22995 (sha256
22996 (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f"))))
22997 (build-system python-build-system)
22998 (native-inputs
22999 `(("ghostscript" ,ghostscript)
23000 ("pkg-config" ,pkg-config)
23001 ("python-nose" ,python-nose)))
23002 (inputs
23003 `(("djvulibre" ,djvulibre)
23004 ("python-cython" ,python-cython)))
23005 (arguments
23006 `(#:phases
23007 (modify-phases %standard-phases
23008 (add-after 'unpack 'fix-tests
23009 (lambda _
23010 ;; Unit tests try to load the 'dllpath.py' and fail, because it
23011 ;; doesn't make sense on GNU/Linux.
23012 (delete-file "djvu/dllpath.py")
23013 #t)))))
23014 (synopsis "Python bindings for DjVuLibre")
23015 (description "This is a set of Python bindings for the DjVuLibre library.")
23016 (home-page "https://jwilk.net/software/python-djvulibre")
23017 (license license:gpl2)))
23018
23019 (define-public python2-djvulibre
23020 (package-with-python2 python-djvulibre))