gnu: python-pbkdf2: Fix typo in description.
[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 © 2019, 2020 Brett Gilio <brettg@gnu.org>
60 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
61 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
62 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
63 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
64 ;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
65 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
66 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
67 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
68 ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
69 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
70 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
71 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
73 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
74 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
75 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
76 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
77 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
78 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
79 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
80 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
81 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
82 ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
83 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
84 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
85 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
86 ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
87 ;;;
88 ;;; This file is part of GNU Guix.
89 ;;;
90 ;;; GNU Guix is free software; you can redistribute it and/or modify it
91 ;;; under the terms of the GNU General Public License as published by
92 ;;; the Free Software Foundation; either version 3 of the License, or (at
93 ;;; your option) any later version.
94 ;;;
95 ;;; GNU Guix is distributed in the hope that it will be useful, but
96 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
97 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98 ;;; GNU General Public License for more details.
99 ;;;
100 ;;; You should have received a copy of the GNU General Public License
101 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
102
103 (define-module (gnu packages python-xyz)
104 #:use-module ((guix licenses) #:prefix license:)
105 #:use-module (gnu packages)
106 #:use-module (gnu packages algebra)
107 #:use-module (gnu packages adns)
108 #:use-module (gnu packages attr)
109 #:use-module (gnu packages backup)
110 #:use-module (gnu packages bash)
111 #:use-module (gnu packages check)
112 #:use-module (gnu packages cmake)
113 #:use-module (gnu packages compression)
114 #:use-module (gnu packages crypto)
115 #:use-module (gnu packages databases)
116 #:use-module (gnu packages dbm)
117 #:use-module (gnu packages enchant)
118 #:use-module (gnu packages file)
119 #:use-module (gnu packages fontutils)
120 #:use-module (gnu packages gcc)
121 #:use-module (gnu packages geo)
122 #:use-module (gnu packages ghostscript)
123 #:use-module (gnu packages gl)
124 #:use-module (gnu packages glib)
125 #:use-module (gnu packages gnome)
126 #:use-module (gnu packages gnupg)
127 #:use-module (gnu packages graphviz)
128 #:use-module (gnu packages graphics)
129 #:use-module (gnu packages gsasl)
130 #:use-module (gnu packages gstreamer)
131 #:use-module (gnu packages gtk)
132 #:use-module (gnu packages icu4c)
133 #:use-module (gnu packages image)
134 #:use-module (gnu packages imagemagick)
135 #:use-module (gnu packages kerberos)
136 #:use-module (gnu packages libevent)
137 #:use-module (gnu packages libffi)
138 #:use-module (gnu packages libidn)
139 #:use-module (gnu packages linux)
140 #:use-module (gnu packages llvm)
141 #:use-module (gnu packages man)
142 #:use-module (gnu packages maths)
143 #:use-module (gnu packages monitoring)
144 #:use-module (gnu packages multiprecision)
145 #:use-module (gnu packages networking)
146 #:use-module (gnu packages ncurses)
147 #:use-module (gnu packages openstack)
148 #:use-module (gnu packages pcre)
149 #:use-module (gnu packages perl)
150 #:use-module (gnu packages photo)
151 #:use-module (gnu packages pkg-config)
152 #:use-module (gnu packages python)
153 #:use-module (gnu packages python-check)
154 #:use-module (gnu packages python-compression)
155 #:use-module (gnu packages python-crypto)
156 #:use-module (gnu packages python-science)
157 #:use-module (gnu packages python-web)
158 #:use-module (gnu packages qt)
159 #:use-module (gnu packages readline)
160 #:use-module (gnu packages sdl)
161 #:use-module (gnu packages search)
162 #:use-module (gnu packages shells)
163 #:use-module (gnu packages sphinx)
164 #:use-module (gnu packages ssh)
165 #:use-module (gnu packages terminals)
166 #:use-module (gnu packages tex)
167 #:use-module (gnu packages texinfo)
168 #:use-module (gnu packages textutils)
169 #:use-module (gnu packages time)
170 #:use-module (gnu packages tls)
171 #:use-module (gnu packages version-control)
172 #:use-module (gnu packages video)
173 #:use-module (gnu packages web)
174 #:use-module (gnu packages base)
175 #:use-module (gnu packages xml)
176 #:use-module (gnu packages xorg)
177 #:use-module (gnu packages xdisorg)
178 #:use-module (gnu packages tcl)
179 #:use-module (gnu packages bdw-gc)
180 #:use-module (gnu packages serialization)
181 #:use-module (guix packages)
182 #:use-module (guix download)
183 #:use-module (guix git-download)
184 #:use-module (guix hg-download)
185 #:use-module (guix utils)
186 #:use-module (guix build-system gnu)
187 #:use-module (guix build-system cmake)
188 #:use-module (guix build-system python)
189 #:use-module (guix build-system trivial)
190 #:use-module (srfi srfi-1)
191 #:use-module (srfi srfi-26))
192
193 (define-public python-slixmpp
194 (package
195 (name "python-slixmpp")
196 (version "1.5.2")
197 (source
198 (origin
199 (method git-fetch)
200 (uri
201 (git-reference
202 (url "https://lab.louiz.org/poezio/slixmpp.git")
203 (commit
204 (string-append "slix-" version))))
205 (file-name
206 (git-file-name name version))
207 (sha256
208 (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
209 (build-system python-build-system)
210 (arguments
211 `(#:phases
212 (modify-phases %standard-phases
213 (add-after 'unpack 'patch
214 (lambda _
215 (substitute* "setup.py"
216 (("'CC', 'cc'")
217 "'CC', 'gcc'"))
218 #t)))))
219 (native-inputs
220 `(("cython" ,python-cython)
221 ("gnupg" ,gnupg)
222 ("pkg-config" ,pkg-config)))
223 (propagated-inputs
224 `(("python-aiodns" ,python-aiodns)
225 ("python-aiohttp" ,python-aiohttp)
226 ("python-pyasn1" ,python-pyasn1)
227 ("python-pyasn1-modules" ,python-pyasn1-modules)))
228 (inputs
229 `(("libidn" ,libidn)
230 ("python" ,python))) ; We are building a Python extension.
231 (synopsis "XMPP library without threads")
232 (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
233 SleekXMPP. Its goal is to only rewrite the core of the library (the low level
234 socket handling, the timers, the events dispatching) in order to remove all
235 threads.")
236 (home-page "https://lab.louiz.org/poezio/slixmpp")
237 (license license:expat)))
238
239 (define-public python-tenacity
240 (package
241 (name "python-tenacity")
242 (version "6.1.0")
243 (source (origin
244 (method url-fetch)
245 (uri (pypi-uri "tenacity" version))
246 (sha256
247 (base32
248 "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv"))))
249 (build-system python-build-system)
250 (native-inputs
251 `(("python-setuptools-scm" ,python-setuptools-scm)
252 ("python-sphinx" ,python-sphinx)
253 ("python-tornado" ,python-tornado)
254 ("python-pytest" ,python-pytest)))
255 (propagated-inputs
256 `(("python-six" ,python-six)))
257 (arguments
258 `(#:phases (modify-phases %standard-phases
259 (replace 'check
260 (lambda _
261 (invoke "pytest")
262 #t)))))
263 (home-page "https://github.com/jd/tenacity")
264 (synopsis "Retrying library for python")
265 (description "Tenacity is a general-purpose python library to simplify the
266 task of adding retry behavior to just about anything.")
267 (license license:asl2.0)))
268
269 (define-public python-colorlog
270 (package
271 (name "python-colorlog")
272 (version "4.1.0")
273 (source (origin
274 (method url-fetch)
275 (uri (pypi-uri "colorlog" version))
276 (sha256
277 (base32
278 "1lpk8zmfv8vz090h5d0hzb4n39wgasxdd3x3bpn3v1x1n9dfzaih"))))
279 (build-system python-build-system)
280 (native-inputs
281 `(("python-pytest" ,python-pytest)))
282 (arguments
283 `(#:phases (modify-phases %standard-phases
284 (replace 'check
285 (lambda _
286 ;; Extend PYTHONPATH so the built package will be found.
287 (setenv "PYTHONPATH"
288 (string-append (getcwd) "/build/lib:"
289 (getenv "PYTHONPATH")))
290 (invoke "pytest" "-p" "no:logging")
291 #t)))))
292 (home-page "https://github.com/borntyping/python-colorlog")
293 (synopsis "Log formatting with colors for python")
294 (description "The @code{colorlog.ColoredFormatter} is a formatter for use
295 with Python's logging module that outputs records using terminal colors.")
296 (license license:expat)))
297
298 (define-public python-pyprind
299 (package
300 (name "python-pyprind")
301 (version "2.11.2")
302 (source (origin
303 (method url-fetch)
304 (uri (pypi-uri "PyPrind" version))
305 (sha256
306 (base32
307 "0xg6m5hr33h9bdlrr42kc58jm2m87a9zsagy7n2m4n407d2snv64"))))
308 (build-system python-build-system)
309 (propagated-inputs
310 `(("python-psutil" ,python-psutil)))
311 (home-page "https://github.com/rasbt/pyprind")
312 (synopsis "Python Progress Bar and Percent Indicator Utility")
313 (description "The PyPrind (Python Progress Indicator) module provides a
314 progress bar and a percentage indicator object that let you track the progress
315 of a loop structure or other iterative computation.")
316 (license license:bsd-3)))
317
318 (define-public python-gphoto2
319 (package
320 (name "python-gphoto2")
321 (version "2.2.1")
322 (source (origin
323 (method url-fetch)
324 (uri (pypi-uri "gphoto2" version))
325 (sha256
326 (base32
327 "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
328 (build-system python-build-system)
329 (native-inputs
330 `(("pkg-config" ,pkg-config)))
331 (inputs
332 `(("libgphoto2" ,libgphoto2)))
333 (home-page "https://github.com/jim-easterbrook/python-gphoto2")
334 (synopsis "Python interface to libgphoto2")
335 (description "@code{python-gphoto2} is a comprehensive Python interface
336 (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
337 automatically generate the interface code.")
338 (license license:gpl3+)))
339
340 (define-public python-colour
341 (package
342 (name "python-colour")
343 (version "0.1.5")
344 (source (origin
345 (method url-fetch)
346 (uri (pypi-uri "colour" version))
347 (sha256
348 (base32
349 "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
350 (build-system python-build-system)
351 (native-inputs
352 `(("python-d2to1" ,python-d2to1)))
353 (home-page "https://github.com/vaab/colour")
354 (synopsis "Convert and manipulate various color representations")
355 (description "Pythonic way to manipulate color representations (HSL, RVB,
356 web, X11, ...).")
357 (license license:expat)))
358
359 (define-public python-d2to1
360 (package
361 (name "python-d2to1")
362 (version "0.2.12.post1")
363 (source (origin
364 (method url-fetch)
365 (uri (pypi-uri "d2to1" version))
366 (sha256
367 (base32
368 "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
369 (build-system python-build-system)
370 (native-inputs
371 `(("python-nose" ,python-nose)))
372 (home-page "https://github.com/embray/d2to1")
373 (synopsis "Allows for distutils2-like setup.cfg files as package metadata
374 in python")
375 (description "The python package d2to1 (the d is for distutils) allows
376 using distutils2-like setup.cfg files for a package's metadata with a
377 distribute/setuptools setup.py script.")
378 (license license:bsd-2)))
379
380 (define-public python-rawkit
381 (package
382 (name "python-rawkit")
383 (version "0.6.0")
384 (source (origin
385 (method url-fetch)
386 (uri (pypi-uri "rawkit" version))
387 (sha256
388 (base32
389 "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
390 (build-system python-build-system)
391 (native-inputs
392 `(("python-pytest" ,python-pytest)
393 ("python-mock" ,python-mock)))
394 (inputs
395 `(("libraw" ,libraw)))
396 (home-page "https://rawkit.readthedocs.io")
397 (synopsis "Ctypes-based LibRaw binding for Python")
398 (description "The rawkit package provides two modules: rawkit and libraw.
399 The rawkit module provides a high-level Pythonic interface for developing raw
400 photos, while the libraw module provides a CTypes based interface for
401 interacting with the low-level LibRaw C APIs.")
402 (license license:expat)))
403
404 (define-public python-easygui
405 (package
406 (name "python-easygui")
407 (version "0.98.1")
408 (source (origin
409 (method url-fetch)
410 (uri (pypi-uri "easygui" version))
411 (sha256
412 (base32
413 "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
414 (build-system python-build-system)
415 (propagated-inputs
416 `(("python-tkinter" ,python "tk")))
417 (home-page "https://github.com/robertlugg/easygui")
418 (synopsis "GUI programming module for Python")
419 (description "EasyGUI is a module for very simple, very easy GUI
420 programming in Python. EasyGUI is different from other GUI generators in that
421 EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
422 simple function calls.")
423 (license license:bsd-3)))
424
425 (define-public python-pymediainfo
426 (package
427 (name "python-pymediainfo")
428 (version "4.1")
429 (source
430 (origin
431 (method url-fetch)
432 (uri (pypi-uri "pymediainfo" version))
433 (sha256
434 (base32
435 "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
436 (build-system python-build-system)
437 (native-inputs
438 `(("python-setuptools-scm" ,python-setuptools-scm)
439 ("python-pytest" ,python-pytest)))
440 (inputs
441 `(("libmediainfo" ,libmediainfo)))
442 (arguments
443 `(#:phases
444 (modify-phases %standard-phases
445 (add-after 'unpack 'patch-libmediainfo
446 (lambda _
447 (substitute* "pymediainfo/__init__.py"
448 (("libmediainfo.so.0")
449 (string-append (assoc-ref %build-inputs "libmediainfo")
450 "/lib/libmediainfo.so.0")))
451 #t))
452 (replace 'check
453 (lambda _
454 ;; Extend PYTHONPATH so the built package will be found.
455 (setenv "PYTHONPATH"
456 (string-append (getcwd) "/build/lib:"
457 (getenv "PYTHONPATH")))
458 ;; Skip the only failing test "test_parse_url"
459 (invoke "pytest" "-vv" "-k" "not test_parse_url")
460 #t)))))
461 (home-page
462 "https://github.com/sbraz/pymediainfo")
463 (synopsis
464 "Python wrapper for the mediainfo library")
465 (description
466 "Python wrapper for the mediainfo library to access the technical and tag
467 data for video and audio files.")
468 (license license:expat)))
469
470 (define-public python-psutil
471 (package
472 (name "python-psutil")
473 (version "5.7.2")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (pypi-uri "psutil" version))
478 (sha256
479 (base32 "1svv985vmqsls35kmvp3vhh26nsgz229324s9k29awf6qgqhm6ch"))))
480 (build-system python-build-system)
481 (arguments
482 ;; FIXME: some tests do not return and time out. Some tests fail because
483 ;; some processes survive kill().
484 '(#:tests? #f))
485 (home-page "https://www.github.com/giampaolo/psutil")
486 (synopsis "Library for retrieving information on running processes")
487 (description
488 "psutil (Python system and process utilities) is a library for retrieving
489 information on running processes and system utilization (CPU, memory, disks,
490 network) in Python. It is useful mainly for system monitoring, profiling and
491 limiting process resources and management of running processes. It implements
492 many functionalities offered by command line tools such as: ps, top, lsof,
493 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
494 pidof, tty, taskset, pmap.")
495 (properties `((python2-variant . ,(delay python2-psutil))))
496 (license license:bsd-3)))
497
498 (define-public python2-psutil
499 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
500 (package
501 (inherit base)
502 (propagated-inputs
503 `(("python2-enum34" ,python2-enum34) ;optional
504 ,@(package-propagated-inputs base))))))
505
506 (define-public python-shapely
507 (package
508 (name "python-shapely")
509 (version "1.6.4.post2")
510 (source
511 (origin
512 (method url-fetch)
513 (uri (pypi-uri "Shapely" version))
514 (sha256
515 (base32
516 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
517 (build-system python-build-system)
518 (native-inputs
519 `(("python-cython" ,python-cython)
520 ("python-matplotlib" ,python-matplotlib)
521 ("python-pytest" ,python-pytest)
522 ("python-pytest-cov" ,python-pytest-cov)))
523 (inputs
524 `(("geos" ,geos)))
525 (propagated-inputs
526 `(("python-numpy" ,python-numpy)))
527 (arguments
528 `(#:phases
529 (modify-phases %standard-phases
530 (add-after 'unpack 'patch-geos-path
531 (lambda* (#:key inputs #:allow-other-keys)
532 (let ((geos (assoc-ref inputs "geos"))
533 (glibc (assoc-ref inputs ,(if (%current-target-system)
534 "cross-libc" "libc"))))
535 (substitute* "shapely/geos.py"
536 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
537 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
538 geos "/lib/libgeos_c.so'])"))
539 (("free = load_dll\\('c'\\)\\.free")
540 (string-append "free = load_dll('c', fallbacks=['"
541 glibc "/lib/libc.so.6']).free"))))
542 #t)))))
543 (home-page "https://github.com/Toblerity/Shapely")
544 (synopsis "Library for the manipulation and analysis of geometric objects")
545 (description "Shapely is a Python package for manipulation and analysis of
546 planar geometric objects. It is based on the @code{GEOS} library.")
547 (license license:bsd-3)))
548
549 (define-public python-shortuuid
550 (package
551 (name "python-shortuuid")
552 (version "0.5.0")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "shortuuid" version))
557 (sha256
558 (base32
559 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
560 (build-system python-build-system)
561 (native-inputs
562 `(("python-pep8" ,python-pep8)))
563 (home-page "https://github.com/skorokithakis/shortuuid")
564 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
565 (description
566 "@code{shortuuid} is a Python library for generating concise, unambiguous
567 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
568 module and then similar looking characters are removed.")
569 (license license:bsd-3)))
570
571 (define-public python-logwrap
572 (package
573 (name "python-logwrap")
574 (version "3.2.1")
575 (source
576 (origin
577 (method url-fetch)
578 (uri (pypi-uri "logwrap" version ".zip"))
579 (sha256
580 (base32
581 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
582 (build-system python-build-system)
583 (propagated-inputs
584 `(("python-six" ,python-six)
585 ("python-typing" ,python-typing)))
586 (native-inputs
587 `(("unzip" ,unzip)
588 ("python-cython" ,python-cython)
589 ("python-pytest" ,python-pytest)
590 ("python-pytest-cov" ,python-pytest-cov)
591 ("python-pytest-runner" ,python-pytest-runner)))
592 (home-page "https://github.com/penguinolog/logwrap")
593 (synopsis "Decorator for logging function arguments")
594 (description "This package provides a decorator to log function arguments
595 and function call return values in a human-readable way.")
596 (license license:asl2.0)))
597
598 (define-public python2-shapely
599 (package-with-python2 python-shapely))
600
601 (define-public python-clyent
602 (package
603 (name "python-clyent")
604 (version "1.2.1")
605 (source
606 (origin
607 (method url-fetch)
608 (uri (pypi-uri "clyent" version))
609 (sha256
610 (base32
611 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
612 (build-system python-build-system)
613 (native-inputs
614 `(("python-mock" ,python-mock)))
615 (home-page "https://github.com/Anaconda-Platform/clyent")
616 (synopsis "Command line client library")
617 (description "Clyent is a Python command line utility library. It is used
618 by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
619 (license license:bsd-3)))
620
621 (define-public python2-clyent
622 (package-with-python2 python-clyent))
623
624 (define-public python-babel
625 (package
626 (name "python-babel")
627 (version "2.8.0")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "Babel" version))
632 (sha256
633 (base32
634 "0f0f2vvs1mpdpz2c0mg1mnc3sih8bizmc1h9m67kdsnqs3i2mb0s"))))
635 (build-system python-build-system)
636 (native-inputs
637 `(("python-freezegun" ,python-freezegun)
638 ("python-pytest" ,python-pytest)))
639 (propagated-inputs
640 `(("python-pytz" ,python-pytz)))
641 (arguments
642 `(#:phases (modify-phases %standard-phases
643 (replace 'check
644 (lambda _
645 (invoke "pytest" "-vv" "-k"
646 (string-append
647 ;; XXX: These tests fail when using Pytest 4.x and
648 ;; Babel 2.6.0. Try removing this for later versions.
649 "not test_no_inherit_metazone_marker_never_in_output"
650 " and not test_smoke_dates"
651 " and not test_smoke_numbers")))))))
652 (home-page "http://babel.pocoo.org/")
653 (synopsis
654 "Tools for internationalizing Python applications")
655 (description
656 "Babel is composed of two major parts:
657 - tools to build and work with gettext message catalogs
658 - a Python interface to the CLDR (Common Locale Data Repository), providing
659 access to various locale display names, localized number and date formatting,
660 etc. ")
661 (license license:bsd-3)))
662
663 (define-public python2-babel
664 (package-with-python2 python-babel))
665
666 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
667 (define-public python2-babel-2.6
668 (package
669 (inherit python2-babel)
670 (version "2.6.0")
671 (source (origin
672 (method url-fetch)
673 (uri (pypi-uri "Babel" version))
674 (sha256
675 (base32
676 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
677
678 (define-public python2-backport-ssl-match-hostname
679 (package
680 (name "python2-backport-ssl-match-hostname")
681 (version "3.5.0.1")
682 (source
683 (origin
684 (method url-fetch)
685 (uri (pypi-uri "backports.ssl_match_hostname" version))
686 (sha256
687 (base32
688 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
689 (build-system python-build-system)
690 (arguments
691 `(#:python ,python-2
692 #:tests? #f)) ; no test target
693 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
694 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
695 (description
696 "This backport brings the ssl.match_hostname() function to users of
697 earlier versions of Python. The function checks the hostname in the
698 certificate returned by the server to which a connection has been established,
699 and verifies that it matches the intended target hostname.")
700 (license license:psfl)))
701
702 (define-public python-bitarray
703 (package
704 (name "python-bitarray")
705 (version "1.4.0")
706 (source (origin
707 (method url-fetch)
708 (uri (pypi-uri "bitarray" version))
709 (sha256
710 (base32
711 "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
712 (build-system python-build-system)
713 (home-page "https://github.com/ilanschnell/bitarray")
714 (synopsis "Efficient arrays of booleans")
715 (description "This package provides an object type which efficiently
716 represents an array of booleans. Bitarrays are sequence types and behave very
717 much like usual lists. Eight bits are represented by one byte in a contiguous
718 block of memory. The user can select between two representations:
719 little-endian and big-endian. All of the functionality is implemented in C.
720 Methods for accessing the machine representation are provided. This can be
721 useful when bit level access to binary files is required, such as portable
722 bitmap image files. Also, when dealing with compressed data which uses
723 variable bit length encoding, you may find this module useful.")
724 (license license:psfl)))
725
726 (define-public python-boolean.py
727 (package
728 (name "python-boolean.py")
729 (version "3.6")
730 (source
731 (origin
732 ;; There's no source tarball on PyPI.
733 (method git-fetch)
734 (uri (git-reference
735 (url "https://github.com/bastikr/boolean.py")
736 (commit (string-append "v" version))))
737 (file-name (git-file-name name version))
738 (sha256
739 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
740 (build-system python-build-system)
741 (home-page "https://github.com/bastikr/boolean.py")
742 (synopsis "Boolean algebra in one Python module")
743 (description
744 "This is a small Python library that implements boolean algebra.
745 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
746 @code{Symbol} class that can take on one of these two values. Calculations
747 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
748 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
749 Expressions are constructed from parsed strings or directly in Python.")
750 (license license:bsd-2)))
751
752 (define-public python-hdf4
753 (package
754 (name "python-hdf4")
755 (version "0.9")
756 (source
757 (origin
758 (method url-fetch)
759 (uri (pypi-uri name version))
760 (sha256
761 (base32
762 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
763 (build-system python-build-system)
764 (native-inputs `(("nose" ,python-nose)))
765 (propagated-inputs `(("numpy" ,python-numpy)))
766 (inputs
767 `(("hdf4" ,hdf4)
768 ("libjpeg" ,libjpeg-turbo)
769 ("zlib" ,zlib)))
770 (arguments
771 `(#:phases
772 (modify-phases %standard-phases
773 (replace 'check
774 (lambda _
775 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
776 ;; on to import numpy. Somehow this works on their CI system.
777 ;; Let's just manage PYTHONPATH here instead.
778 (substitute* "runexamples.sh"
779 (("export PYTHONPATH=.*") ""))
780 (setenv "PYTHONPATH"
781 (string-append (getcwd) ":"
782 (getenv "PYTHONPATH")))
783 (invoke "./runexamples.sh")
784 (invoke "nosetests" "-v"))))))
785 (home-page "https://github.com/fhs/python-hdf4")
786 (synopsis "Python interface to the NCSA HDF4 library")
787 (description
788 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
789 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
790 NetCDF files can also be read and modified. Python-HDF4 is a fork of
791 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
792 (license license:expat)))
793
794 (define-public python2-hdf4
795 (package-with-python2 python-hdf4))
796
797 (define-public python-h5py
798 (package
799 (name "python-h5py")
800 (version "2.10.0")
801 (source
802 (origin
803 (method url-fetch)
804 (uri (pypi-uri "h5py" version))
805 (sha256
806 (base32
807 "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4"))))
808 (build-system python-build-system)
809 (arguments
810 `(#:tests? #f ; no test target
811 #:phases
812 (modify-phases %standard-phases
813 (add-after 'unpack 'fix-hdf5-paths
814 (lambda* (#:key inputs #:allow-other-keys)
815 (let ((prefix (assoc-ref inputs "hdf5")))
816 (substitute* "setup_build.py"
817 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
818 (string-append "['" prefix "/lib" "']"))
819 (("'/opt/local/include', '/usr/local/include'")
820 (string-append "'" prefix "/include" "'")))
821 (substitute* "setup_configure.py"
822 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
823 (string-append "['" prefix "/lib" "']")))
824 #t))))))
825 (propagated-inputs
826 `(("python-six" ,python-six)
827 ("python-numpy" ,python-numpy)))
828 (inputs
829 `(("hdf5" ,hdf5-1.10)))
830 (native-inputs
831 `(("python-cython" ,python-cython)
832 ("python-pkgconfig" ,python-pkgconfig)
833 ("pkg-config" ,pkg-config)))
834 (home-page "https://www.h5py.org/")
835 (synopsis "Read and write HDF5 files from Python")
836 (description
837 "The h5py package provides both a high- and low-level interface to the
838 HDF5 library from Python. The low-level interface is intended to be a
839 complete wrapping of the HDF5 API, while the high-level component supports
840 access to HDF5 files, datasets and groups using established Python and NumPy
841 concepts.")
842 (license license:bsd-3)))
843
844 (define-public python2-h5py
845 (package-with-python2 python-h5py))
846
847 (define-public python-sh
848 (package
849 (name "python-sh")
850 (version "1.12.14")
851 (source
852 (origin
853 (method url-fetch)
854 (uri (pypi-uri "sh" version))
855 (sha256
856 (base32
857 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
858 (build-system python-build-system)
859 (arguments
860 '(#:phases
861 (modify-phases %standard-phases
862 (replace 'check
863 (lambda _
864 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
865 (setenv "HOME" "/tmp")
866 (invoke "python" "sh.py" "test"))))))
867 (native-inputs
868 `(("python-coverage" ,python-coverage)))
869 (home-page "https://github.com/amoffat/sh")
870 (synopsis "Python subprocess replacement")
871 (description "This package provides a replacement for Python's
872 @code{subprocess} feature.")
873 (license license:expat)))
874
875 (define-public python2-sh
876 (package-with-python2 python-sh))
877
878 (define-public python-cftime
879 (package
880 (name "python-cftime")
881 (version "1.0.4.2")
882 (source
883 (origin
884 (method url-fetch)
885 (uri (pypi-uri "cftime" version))
886 (sha256
887 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
888 (build-system python-build-system)
889 (propagated-inputs
890 `(("python-numpy" ,python-numpy)))
891 (native-inputs
892 `(("python-coveralls" ,python-coveralls)
893 ("python-cython" ,python-cython)
894 ("python-pytest-cov" ,python-pytest-cov)))
895 (home-page "https://github.com/Unidata/cftime")
896 (synopsis "Library for time handling")
897 (description
898 "This package provides time-handling functionality that used to be part
899 of the netcdf4 package before.")
900 ;; This package claims to include code under the GPLv3 but is released
901 ;; under ISC.
902 (license (list license:isc license:gpl3+))))
903
904 (define-public python-netcdf4
905 (package
906 (name "python-netcdf4")
907 (version "1.5.3")
908 (source
909 (origin
910 (method url-fetch)
911 (uri (pypi-uri "netCDF4" version))
912 (sha256
913 (base32
914 "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
915 (build-system python-build-system)
916 (arguments
917 '(#:phases
918 (modify-phases %standard-phases
919 (add-after 'unpack 'configure-locations
920 (lambda* (#:key inputs #:allow-other-keys)
921 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
922 #t)))))
923 (native-inputs
924 `(("python-cython" ,python-cython)))
925 (propagated-inputs
926 `(("python-numpy" ,python-numpy)
927 ("python-cftime" ,python-cftime)))
928 (inputs
929 `(("netcdf" ,netcdf)
930 ("hdf4" ,hdf4)
931 ("hdf5" ,hdf5)))
932 (home-page "https://github.com/Unidata/netcdf4-python")
933 (synopsis "Python/numpy interface to the netCDF library")
934 (description "Netcdf4-python is a Python interface to the netCDF C
935 library. netCDF version 4 has many features not found in earlier
936 versions of the library and is implemented on top of HDF5. This module
937 can read and write files in both the new netCDF 4 and the old netCDF 3
938 format, and can create files that are readable by HDF5 clients. The
939 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
940 to users of that module.")
941 ;; The software is mainly ISC, but includes some files covered
942 ;; by the Expat license.
943 (license (list license:isc license:expat))))
944
945 (define-public python2-netcdf4
946 (package-with-python2 python-netcdf4))
947
948 (define-public python-license-expression
949 (package
950 (name "python-license-expression")
951 (version "0.999")
952 (source
953 (origin
954 (method url-fetch)
955 (uri (pypi-uri "license-expression" version))
956 (sha256
957 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
958 (build-system python-build-system)
959 (propagated-inputs
960 `(("python-boolean.py" ,python-boolean.py)))
961 (home-page "https://github.com/nexB/license-expression")
962 (synopsis "Apply boolean logic to license expressions")
963 (description
964 "This Python module defines a tiny language to evaluate and compare
965 license expressions using boolean logic. Logical combinations of licenses can
966 be tested for equality, containment, and equivalence. They can be normalised
967 and simplified. It supports SPDX license expressions as well as other naming
968 conventions and aliases in the same expression.")
969 (license license:gpl2+)))
970
971 (define-public python-lockfile
972 (package
973 (name "python-lockfile")
974 (version "0.12.2")
975 (source
976 (origin
977 (method url-fetch)
978 (uri (pypi-uri "lockfile" version))
979 (sha256
980 (base32
981 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
982 (build-system python-build-system)
983 (arguments '(#:test-target "check"))
984 (native-inputs
985 `(("python-pbr" ,python-pbr)))
986 (home-page "https://launchpad.net/pylockfile")
987 (synopsis "Platform-independent file locking module")
988 (description
989 "The lockfile package exports a LockFile class which provides a simple
990 API for locking files.")
991 (license license:expat)))
992
993 (define-public python2-lockfile
994 (package-with-python2 python-lockfile))
995
996 (define-public python-filelock
997 (package
998 (name "python-filelock")
999 (version "3.0.12")
1000 (source
1001 (origin
1002 (method url-fetch)
1003 (uri (pypi-uri "filelock" version))
1004 (sha256
1005 (base32
1006 "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
1007 (build-system python-build-system)
1008 (home-page
1009 "https://github.com/benediktschmitt/py-filelock")
1010 (synopsis "Platform independent file lock")
1011 (description "@code{filelock} contains a single module implementing
1012 a platform independent file lock in Python, which provides a simple way of
1013 inter-process communication.")
1014 (license license:unlicense)))
1015
1016 (define-public python-semantic-version
1017 (package
1018 (name "python-semantic-version")
1019 (version "2.6.0")
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri (pypi-uri "semantic_version" version))
1024 (sha256
1025 (base32
1026 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
1027 (build-system python-build-system)
1028 (arguments
1029 `(#:tests? #f)) ; PyPI tarball lacks tests
1030 (home-page "https://github.com/rbarrois/python-semanticversion")
1031 (synopsis "Semantic versioning module for Python")
1032 (description
1033 "The @code{semantic_version} class is a small library for handling
1034 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
1035
1036 It can compare versions, generate a new version that represents a bump in one of
1037 the version levels, and check whether any given string is a proper semantic
1038 version identifier.")
1039 (license license:bsd-3)))
1040
1041 (define-public python2-semantic-version
1042 (package-with-python2 python-semantic-version))
1043
1044 (define-public python-serpent
1045 (package
1046 (name "python-serpent")
1047 (version "1.28")
1048 (source
1049 (origin
1050 (method url-fetch)
1051 (uri (pypi-uri "serpent" version))
1052 (sha256
1053 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
1054 (build-system python-build-system)
1055 (native-inputs
1056 `(("python-attrs" ,python-attrs)
1057 ("python-pytz" ,python-pytz)))
1058 (home-page "https://github.com/irmen/Serpent")
1059 (synopsis "Serializer for literal Python expressions")
1060 (description
1061 "Serpent provides @code{ast.literal_eval()}-compatible object tree
1062 serialization. It serializes an object tree into bytes (an utf-8 encoded
1063 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
1064 to rebuild the original object tree.
1065
1066 Because only safe literals are encoded, it is safe to send serpent data to
1067 other machines, such as over the network.")
1068 (properties `((python2-variant . ,(delay python2-serpent))))
1069 (license license:expat)))
1070
1071 (define-public python2-serpent
1072 (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
1073 (package
1074 (inherit base)
1075 (propagated-inputs
1076 `(("python-enum34" ,python2-enum34)
1077 ,@(package-propagated-inputs base))))))
1078
1079 (define-public python-setuptools
1080 (package
1081 (name "python-setuptools")
1082 (version "41.0.1")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "setuptools" version ".zip"))
1087 (sha256
1088 (base32
1089 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
1090 (modules '((guix build utils)))
1091 (snippet
1092 '(begin
1093 ;; Remove included binaries which are used to build self-extracting
1094 ;; installers for Windows.
1095 ;; TODO: Find some way to build them ourself so we can include them.
1096 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
1097 #t))))
1098 (build-system python-build-system)
1099 ;; FIXME: Tests require pytest, which itself relies on setuptools.
1100 ;; One could bootstrap with an internal untested setuptools.
1101 (arguments
1102 `(#:tests? #f))
1103 (home-page "https://pypi.org/project/setuptools/")
1104 (synopsis
1105 "Library designed to facilitate packaging Python projects")
1106 (description
1107 "Setuptools is a fully-featured, stable library designed to facilitate
1108 packaging Python projects, where packaging includes:
1109 Python package and module definitions,
1110 distribution package metadata,
1111 test hooks,
1112 project installation,
1113 platform-specific details,
1114 Python 3 support.")
1115 ;; TODO: setuptools now bundles the following libraries:
1116 ;; packaging, pyparsing, six and appdirs. How to unbundle?
1117 (license (list license:psfl ; setuptools itself
1118 license:expat ; six, appdirs, pyparsing
1119 license:asl2.0 ; packaging is dual ASL2/BSD-2
1120 license:bsd-2))))
1121
1122 (define-public python2-setuptools
1123 (package-with-python2 python-setuptools))
1124
1125 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
1126 (define-public python-setuptools-for-tensorflow
1127 (hidden-package
1128 (package
1129 (inherit python-setuptools)
1130 (version "39.1.0")
1131 (source (origin
1132 (inherit (package-source python-setuptools))
1133 (uri (pypi-uri "setuptools" version ".zip"))
1134 (sha256
1135 (base32
1136 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
1137
1138 (define-public python-uniseg
1139 (package
1140 (name "python-uniseg")
1141 (version "0.7.1")
1142 (source
1143 (origin
1144 (method url-fetch)
1145 (uri (pypi-uri "uniseg" version ".zip"))
1146 (sha256
1147 (base32
1148 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
1149 (build-system python-build-system)
1150 (arguments
1151 '(#:tests? #f)) ; The test suite requires network access.
1152 (native-inputs
1153 `(("unzip" ,unzip)))
1154 (home-page
1155 "https://bitbucket.org/emptypage/uniseg-python")
1156 (synopsis
1157 "Python library to determine Unicode text segmentations")
1158 (description
1159 "Uniseg is a Python package used to determine Unicode text segmentations.
1160 Supported segmentations include:
1161 @enumerate
1162 @item @dfn{Code point} (any value in the Unicode codespace)
1163 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
1164 multiple Unicode code points, e.g. \"G\" + acute-accent)
1165 @item Word break
1166 @item Sentence break
1167 @item Line break
1168 @end enumerate")
1169 (license license:expat)))
1170
1171 (define-public python2-uniseg
1172 (package-with-python2 python-uniseg))
1173
1174 (define-public python-humanfriendly
1175 (package
1176 (name "python-humanfriendly")
1177 (version "8.2")
1178 (source
1179 (origin
1180 (method url-fetch)
1181 (uri (pypi-uri "humanfriendly" version))
1182 (sha256
1183 (base32
1184 "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
1185 (build-system python-build-system)
1186 (arguments
1187 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
1188 #:tests? #f))
1189 (home-page "https://humanfriendly.readthedocs.io")
1190 (synopsis "Human-friendly input and output in Python")
1191 (description
1192 "The functions and classes in @code{humanfriendly} can be used to make
1193 text interfaces more user-friendly. It includes tools to parse and format
1194 numbers, file sizes, and timespans, timers for long-running operations, menus
1195 to allow the user to choose from a list of options, and terminal interaction
1196 helpers.")
1197 (properties `((python2-variant . ,(delay python2-humanfriendly))))
1198 (license license:expat)))
1199
1200 (define-public python2-humanfriendly
1201 (let ((base (package-with-python2
1202 (strip-python2-variant python-humanfriendly))))
1203 (package (inherit base)
1204 (propagated-inputs
1205 `(("python2-monotonic" ,python2-monotonic)
1206 ,@(package-propagated-inputs base))))))
1207
1208 (define-public python-textparser
1209 (package
1210 (name "python-textparser")
1211 (version "0.23.0")
1212 (source
1213 (origin
1214 (method url-fetch)
1215 (uri (pypi-uri "textparser" version))
1216 (sha256
1217 (base32
1218 "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
1219 (build-system python-build-system)
1220 (home-page "https://github.com/eerimoq/textparser")
1221 (synopsis "Fast text parser for Python")
1222 (description "This library provides a text parser written in the Python
1223 language. It aims to be fast.")
1224 (license license:expat)))
1225
1226 (define-public python-aenum
1227 (package
1228 (name "python-aenum")
1229 (version "2.2.4")
1230 (source
1231 (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "aenum" version))
1234 (sha256
1235 (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
1236 (build-system python-build-system)
1237 (arguments
1238 `(#:phases (modify-phases %standard-phases
1239 (replace 'check
1240 (lambda _
1241 (format #t "current working dir ~s~%" (getcwd))
1242 (setenv "PYTHONPATH"
1243 (string-append ".:" (getenv "PYTHONPATH")))
1244 ;; We must run the test suite module directly, as it
1245 ;; fails to define the 'tempdir' variable in scope for
1246 ;; the tests otherwise
1247 ;; (see:https://bitbucket.org/stoneleaf/aenum/\
1248 ;; issues/32/running-tests-with-python-setuppy-test).
1249 (invoke "python3" "aenum/test.py")
1250 ;; This one fails with "NameError: name
1251 ;; 'test_pickle_dump_load' is not defined" (see:
1252 ;; https://bitbucket.org/stoneleaf/aenum/issues/33
1253 ;; /error-running-the-test_v3py-test-suite).
1254 ;; (invoke "python3" "aenum/test_v3.py")
1255 #t)))))
1256 (home-page "https://bitbucket.org/stoneleaf/aenum")
1257 (synopsis "Advanced enumerations, namedtuples and constants for Python")
1258 (description "The aenum library includes an @code{Enum} base class, a
1259 metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
1260 class.")
1261 (license license:bsd-3)))
1262
1263 (define-public python-can
1264 (package
1265 (name "python-can")
1266 (version "3.3.3")
1267 (source
1268 (origin
1269 (method url-fetch)
1270 (uri (pypi-uri "python-can" version))
1271 (sha256
1272 (base32
1273 "123lz1bl6xf3d0fvxzr4bg4884yg4m9s21z6xd2m68zhnbv9rmpc"))))
1274 (build-system python-build-system)
1275 (arguments
1276 `(#:phases (modify-phases %standard-phases
1277 (add-after 'unpack 'relax-version-requirements
1278 (lambda _
1279 (substitute* "setup.py"
1280 (("mock~=2\\.0") "mock")
1281 (("coverage<5") "coverage")
1282 (("pytest~=4\\.3") "pytest")
1283 (("hypothesis~=4\\.56") "hypothesis"))
1284 #t))
1285 (add-after 'unpack 'fix-broken-tests
1286 ;; The tests try to run two scripts it expects should be
1287 ;; in PATH, but they aren't at this time (see:
1288 ;; https://github.com/hardbyte/python-can/issues/805).
1289 (lambda _
1290 (substitute* "test/test_scripts.py"
1291 (("\"can_logger\\.py --help\"") "")
1292 (("\"can_player\\.py --help\"") ""))
1293 #t)))))
1294 (propagated-inputs
1295 `(("python-aenum" ,python-aenum)
1296 ("python-wrapt" ,python-wrapt)))
1297 (native-inputs
1298 `(("python-codecov" ,python-codecov)
1299 ("python-coverage" ,python-coverage)
1300 ("python-future" ,python-future)
1301 ("python-hypothesis" ,python-hypothesis)
1302 ("python-mock" ,python-mock)
1303 ("python-pyserial" ,python-pyserial)
1304 ("python-pytest" ,python-pytest)
1305 ("python-pytest-cov" ,python-pytest-cov)
1306 ("python-pytest-runner" ,python-pytest-runner)
1307 ("python-pytest-timeout" ,python-pytest-timeout)))
1308 (home-page "https://github.com/hardbyte/python-can")
1309 (synopsis "Controller Area Network (CAN) interface module for Python")
1310 (description "This package defines the @code{can} module, which provides
1311 controller area network (CAN) support for Python developers; providing common
1312 abstractions to different hardware devices, and a suite of utilities for
1313 sending and receiving messages on a CAN bus.")
1314 (license license:lgpl3+)))
1315
1316 (define-public python-diskcache
1317 (package
1318 (name "python-diskcache")
1319 (version "4.1.0")
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (pypi-uri "diskcache" version))
1324 (sha256
1325 (base32
1326 "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
1327 (build-system python-build-system)
1328 (arguments
1329 `(#:tests? #f)) ;test suite not included in the release
1330 (home-page "http://www.grantjenks.com/docs/diskcache/")
1331 (synopsis "Disk and file backed cache library")
1332 (description "DiskCache is a disk and file backed persistent cache.")
1333 (license license:asl2.0)))
1334
1335 (define-public python-bitstruct
1336 (package
1337 (name "python-bitstruct")
1338 (version "8.9.0")
1339 (source
1340 (origin
1341 (method url-fetch)
1342 (uri (pypi-uri "bitstruct" version))
1343 (sha256
1344 (base32
1345 "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
1346 (build-system python-build-system)
1347 (home-page "https://github.com/eerimoq/bitstruct")
1348 (synopsis "Python values to and C bit field structs converter")
1349 (description "This module performs conversions between Python values and C
1350 bit field structs represented as Python byte strings. It is intended to have
1351 a similar interface as the @code{struct} module from Python, but working on
1352 bits instead of primitive data types like @code{char}, @code{int}, etc.")
1353 (license license:expat)))
1354
1355 (define-public python-cantools
1356 (package
1357 (name "python-cantools")
1358 (version "33.1.1")
1359 (source
1360 (origin
1361 ;; We take the sources from the Git repository as the documentation is
1362 ;; not included with the PyPI archive.
1363 (method git-fetch)
1364 (uri (git-reference
1365 (url "https://github.com/eerimoq/cantools")
1366 (commit version)))
1367 (file-name (git-file-name name version))
1368 (sha256
1369 (base32
1370 "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
1371 (build-system python-build-system)
1372 (arguments
1373 `(#:phases
1374 (modify-phases %standard-phases
1375 (add-after 'build 'build-doc
1376 (lambda _
1377 ;; See: https://github.com/eerimoq/cantools/issues/190.
1378 (substitute* "README.rst"
1379 (("https://github.com/eerimoq/cantools/raw/master\
1380 /docs/monitor.png")
1381 "monitor.png"))
1382 (with-directory-excursion "docs"
1383 (invoke "make" "man" "info"))))
1384 (add-after 'install 'install-doc
1385 (lambda* (#:key outputs #:allow-other-keys)
1386 (let* ((out (assoc-ref outputs "out"))
1387 (info (string-append out "/share/info"))
1388 (man1 (string-append out "/share/man/man1")))
1389 (format #t "CWD: ~s~%" (getcwd))
1390 (install-file "docs/_build/texinfo/cantools.info" info)
1391 (install-file "docs/_build/man/cantools.1" man1)
1392 #t))))))
1393 (native-inputs
1394 `(("sphinx" ,python-sphinx)
1395 ("texinfo" ,texinfo)))
1396 (propagated-inputs
1397 `(("python-bitstruct" ,python-bitstruct)
1398 ("python-can" ,python-can)
1399 ("python-diskcache" ,python-diskcache)
1400 ("python-textparser" ,python-textparser)))
1401 (home-page "https://github.com/eerimoq/cantools")
1402 (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
1403 (description "This package includes Controller Area Network (CAN) related
1404 tools that can be used to:
1405 @itemize
1406 @item parse DBC, KCD, SYM, ARXML 4 and CDD files
1407 @item encode and decode CAN messages
1408 @item multiplex simple and extended signals
1409 @item diagnose DID encoding and decoding
1410 @item dump the CAN decoder output
1411 @item test CAN nodes
1412 @item generate C source code
1413 @item monitor the CAN bus
1414 @end itemize")
1415 (license license:expat)))
1416
1417 (define-public python-capturer
1418 (package
1419 (name "python-capturer")
1420 (version "2.4")
1421 (source
1422 (origin
1423 (method url-fetch)
1424 (uri (pypi-uri "capturer" version))
1425 (sha256
1426 (base32
1427 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
1428 (build-system python-build-system)
1429 (arguments
1430 `(#:tests? #f))
1431 (propagated-inputs
1432 `(("python-humanfriendly" ,python-humanfriendly)))
1433 (home-page "https://capturer.readthedocs.io")
1434 (synopsis "Capture stdout and stderr streams of the current process")
1435 (description
1436 "The capturer package makes it easy to capture the stdout and stderr
1437 streams of the current process and subprocesses. Output can be relayed
1438 to the terminal in real time but is also available to the Python program
1439 for additional processing.")
1440 (license license:expat)))
1441
1442 (define-public python2-capturer
1443 (package-with-python2 python-capturer))
1444
1445 (define-public python-case
1446 (package
1447 (name "python-case")
1448 (version "1.5.3")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (pypi-uri "case" version))
1453 (sha256
1454 (base32
1455 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
1456 (build-system python-build-system)
1457 (propagated-inputs
1458 `(("python-mock" ,python-mock)
1459 ("python-nose" ,python-nose)
1460 ("python-six" ,python-six)
1461 ("python-unittest2" ,python-unittest2)))
1462 (native-inputs
1463 `(("python-coverage" ,python-coverage)))
1464 (home-page "https://github.com/celery/case")
1465 (synopsis "Unittest utilities and convenience methods")
1466 (description
1467 "The @code{case} package provides utilities on top of unittest, including
1468 some helpful Python 2 compatibility convenience methods.")
1469 (license license:bsd-3)))
1470
1471 (define-public python-verboselogs
1472 (package
1473 (name "python-verboselogs")
1474 (version "1.7")
1475 (source
1476 (origin
1477 (method url-fetch)
1478 (uri (pypi-uri "verboselogs" version))
1479 (sha256
1480 (base32
1481 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
1482 (build-system python-build-system)
1483 (arguments
1484 `(#:phases
1485 (modify-phases %standard-phases
1486 (replace 'check
1487 (lambda _
1488 ;; Do not run pylint plugin test, as astroid is an old
1489 ;; unsupported version.
1490 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
1491 "verboselogs/tests.py"))))))
1492 (native-inputs
1493 `(("python-mock" ,python-mock)
1494 ("python-pytest" ,python-pytest)))
1495 (home-page "https://verboselogs.readthedocs.io")
1496 (synopsis "Verbose logging level for Python's logging module")
1497 (description
1498 "The @code{verboselogs} package extends Python's @code{logging} module to
1499 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
1500 (license license:expat)))
1501
1502 (define-public python2-verboselogs
1503 (package-with-python2 python-verboselogs))
1504
1505 (define-public python-coloredlogs
1506 (package
1507 (name "python-coloredlogs")
1508 (version "10.0")
1509 (source
1510 (origin
1511 (method url-fetch)
1512 (uri (pypi-uri "coloredlogs" version))
1513 (sha256
1514 (base32
1515 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
1516 (build-system python-build-system)
1517 (arguments
1518 `(;Tests require some updated modules
1519 #:tests? #f))
1520 (propagated-inputs
1521 `(("python-capturer" ,python-capturer)))
1522 (home-page "https://coloredlogs.readthedocs.io")
1523 (synopsis "Colored stream handler for Python's logging module")
1524 (description
1525 "The @code{coloredlogs} package enables colored terminal output for
1526 Python's logging module. The @code{ColoredFormatter} class inherits from
1527 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
1528 messages in color.")
1529 (license license:expat)))
1530
1531 (define-public python2-coloredlogs
1532 (package-with-python2 python-coloredlogs))
1533
1534 (define-public python-editorconfig
1535 (package
1536 (name "python-editorconfig")
1537 (version "0.12.2")
1538 (source
1539 (origin
1540 (method url-fetch)
1541 (uri (pypi-uri "EditorConfig" version))
1542 (sha256
1543 (base32
1544 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
1545 (build-system python-build-system)
1546 (home-page "https://editorconfig.org/")
1547 (synopsis "EditorConfig bindings for python")
1548 (description "The EditorConfig project consists of a file format for
1549 defining coding styles and a collection of text editor plugins that enable
1550 editors to read the file format and adhere to defined styles. EditorConfig
1551 files are easily readable and they work nicely with version control systems.")
1552 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
1553 (license (list license:bsd-2 license:psfl))))
1554
1555 (define-public dosage
1556 (package
1557 (name "dosage")
1558 (version "2.17")
1559 (source
1560 (origin
1561 (method url-fetch)
1562 (uri (pypi-uri "dosage" version))
1563 (sha256
1564 (base32
1565 "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
1566 (build-system python-build-system)
1567 (propagated-inputs
1568 `(("python2-backports-functools-lru-cache"
1569 ,python2-backports-functools-lru-cache)
1570 ("python2-backports-shutil-get-terminal-size"
1571 ,python2-backports-shutil-get-terminal-size)
1572 ("python-cached-property" ,python-cached-property)
1573 ("python-colorama" ,python-colorama)
1574 ("python-imagesize" ,python-imagesize)
1575 ("python-importlib-metadata" ,python-importlib-metadata)
1576 ("python-lxml" ,python-lxml)
1577 ("python-requests" ,python-requests)
1578 ("python-six" ,python-six)))
1579 (native-inputs
1580 `(("python-pytest-cov" ,python-pytest-cov)
1581 ("python-pytest-xdist" ,python-pytest-xdist)
1582 ("python-responses" ,python-responses)
1583 ("python-setuptools-scm" ,python-setuptools-scm)))
1584 (home-page "https://github.com/webcomics/dosage")
1585 (synopsis "Comic strip downloader and archiver")
1586 (description "Dosage is designed to keep a local copy of specific webcomics and other
1587 picture-based content such as Picture of the Day sites. With the @command{dosage}
1588 command-line script you can get the latest strip of a webcomic, catch-up to the last strip
1589 downloaded, or download a strip for a particular date or index, if possible.")
1590 (license license:expat)))
1591
1592 (define-public python-et-xmlfile
1593 (package
1594 (name "python-et-xmlfile")
1595 (version "1.0.1")
1596 (source
1597 (origin
1598 (method url-fetch)
1599 (uri (pypi-uri "et_xmlfile" version))
1600 (sha256
1601 (base32
1602 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1603 (build-system python-build-system)
1604 (arguments
1605 `(#:phases (modify-phases %standard-phases
1606 (replace 'check
1607 (lambda _
1608 (invoke "pytest"))))))
1609 (native-inputs
1610 `(("python-pytest" ,python-pytest)
1611 ("python-lxml" ,python-lxml))) ;used for the tests
1612 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1613 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1614 (description "This Python library is based upon the @code{xmlfile} module
1615 from @code{lxml}. It aims to provide a low memory, compatible implementation
1616 of @code{xmlfile}.")
1617 (license license:expat)))
1618
1619 (define-public python2-et-xmlfile
1620 (package-with-python2 python-et-xmlfile))
1621
1622 (define-public python-openpyxl
1623 (package
1624 (name "python-openpyxl")
1625 (version "2.6.2")
1626 (source
1627 (origin
1628 ;; We use the upstream repository, as the tests are not included in the
1629 ;; PyPI releases.
1630 (method hg-fetch)
1631 (uri (hg-reference
1632 (url "https://bitbucket.org/openpyxl/openpyxl")
1633 (changeset version)))
1634 (file-name (string-append name "-" version "-checkout"))
1635 (sha256
1636 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1637 (build-system python-build-system)
1638 (arguments
1639 `(#:phases (modify-phases %standard-phases
1640 (replace 'check
1641 (lambda _
1642 (invoke "pytest"))))))
1643 (native-inputs
1644 ;; For the test suite.
1645 `(("python-lxml" ,python-lxml)
1646 ("python-pillow" ,python-pillow)
1647 ("python-pytest" ,python-pytest)))
1648 (propagated-inputs
1649 `(("python-et-xmlfile" ,python-et-xmlfile)
1650 ("python-jdcal" ,python-jdcal)))
1651 (home-page "https://openpyxl.readthedocs.io")
1652 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1653 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1654 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1655 standard.")
1656 (license license:expat)))
1657
1658 (define-public python-eventlet
1659 (package
1660 (name "python-eventlet")
1661 (version "0.25.1")
1662 (source
1663 (origin
1664 (method url-fetch)
1665 (uri (pypi-uri "eventlet" version))
1666 (sha256
1667 (base32
1668 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1669 (build-system python-build-system)
1670 (propagated-inputs
1671 `(("python-greenlet" ,python-greenlet)))
1672 (arguments
1673 ;; TODO: Requires unpackaged 'enum-compat'.
1674 '(#:tests? #f))
1675 (home-page "https://eventlet.net")
1676 (synopsis "Concurrent networking library for Python")
1677 (description
1678 "Eventlet is a concurrent networking library for Python that
1679 allows you to change how you run your code, not how you write it.
1680 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1681 Coroutines ensure that the developer uses a blocking style of programming
1682 that is similar to threading, but provide the benefits of non-blocking I/O.
1683 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1684 from the Python interpreter, or as a small part of a larger application.")
1685 (license license:expat)))
1686
1687 (define-public python2-eventlet
1688 (let ((base (package-with-python2
1689 (strip-python2-variant python-eventlet))))
1690 (package (inherit base)
1691 (propagated-inputs
1692 `(("python2-enum34" ,python2-enum34)
1693 ,@(package-propagated-inputs base))))))
1694
1695 (define-public python-six
1696 (package
1697 (name "python-six")
1698 (version "1.14.0")
1699 (source
1700 (origin
1701 (method url-fetch)
1702 (uri (pypi-uri "six" version))
1703 (sha256
1704 (base32
1705 "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3"))))
1706 (build-system python-build-system)
1707 (arguments
1708 `(#:phases
1709 (modify-phases %standard-phases
1710 (replace 'check
1711 (lambda _
1712 (invoke "py.test" "-v"))))))
1713 (native-inputs
1714 `(("python-pytest" ,python-pytest-bootstrap)))
1715 (home-page "https://pypi.org/project/six/")
1716 (synopsis "Python 2 and 3 compatibility utilities")
1717 (description
1718 "Six is a Python 2 and 3 compatibility library. It provides utility
1719 functions for smoothing over the differences between the Python versions with
1720 the goal of writing Python code that is compatible on both Python versions.
1721 Six supports every Python version since 2.5. It is contained in only one
1722 Python file, so it can be easily copied into your project.")
1723 (license license:x11)))
1724
1725 (define-public python2-six
1726 (package-with-python2 python-six))
1727
1728 (define-public python-six-bootstrap
1729 (package
1730 (inherit python-six)
1731 (name "python-six-bootstrap")
1732 (native-inputs `())
1733 (arguments `(#:tests? #f))))
1734
1735 (define-public python2-six-bootstrap
1736 (package-with-python2 python-six-bootstrap))
1737
1738 (define-public python-schedule
1739 (package
1740 (name "python-schedule")
1741 (version "0.4.3")
1742 (source
1743 (origin
1744 (method url-fetch)
1745 (uri (pypi-uri "schedule" version))
1746 (sha256
1747 (base32
1748 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1749 (build-system python-build-system)
1750 (native-inputs
1751 `(("python-pytest" ,python-pytest)
1752 ("python-mock" ,python-mock)))
1753 (home-page "https://github.com/dbader/schedule")
1754 (synopsis "Schedule periodic function calls in Python")
1755 (description
1756 "Schedule is an in-process scheduler for periodic jobs that uses the
1757 builder pattern for configuration. Schedule lets you run Python functions (or
1758 any other callable) periodically at pre-determined intervals using a simple,
1759 human-friendly syntax.")
1760 (license license:expat)))
1761
1762 (define-public python2-schedule
1763 (package-with-python2 python-schedule))
1764
1765 (define-public python-mechanize
1766 (package
1767 (name "python-mechanize")
1768 (version "0.4.5")
1769 (source
1770 (origin
1771 (method url-fetch)
1772 (uri (pypi-uri "mechanize" version))
1773 (sha256
1774 (base32
1775 "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
1776 (build-system python-build-system)
1777 (propagated-inputs
1778 `(("python-html5lib" ,python-html5lib)))
1779 (home-page "https://github.com/python-mechanize/mechanize")
1780 (synopsis
1781 "Stateful programmatic web browsing in Python")
1782 (description
1783 "Mechanize implements stateful programmatic web browsing in Python,
1784 after Andy Lester’s Perl module WWW::Mechanize.")
1785 (license license:bsd-3)))
1786
1787 (define-public python2-mechanize
1788 (package-with-python2 python-mechanize))
1789
1790 (define-public python-simplejson
1791 (package
1792 (name "python-simplejson")
1793 (version "3.17.0")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (pypi-uri "simplejson" version))
1798 (sha256
1799 (base32
1800 "108yf3252fy4ndqab7h46raksxfhcn113bzy2yd8369vidrjnjrb"))))
1801 (build-system python-build-system)
1802 (home-page "http://simplejson.readthedocs.org/en/latest/")
1803 (synopsis
1804 "Json library for Python")
1805 (description
1806 "JSON (JavaScript Object Notation) is a subset of JavaScript
1807 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1808 format.
1809
1810 Simplejson exposes an API familiar to users of the standard library marshal
1811 and pickle modules. It is the externally maintained version of the json
1812 library contained in Python 2.6, but maintains compatibility with Python 2.5
1813 and (currently) has significant performance advantages, even without using
1814 the optional C extension for speedups. Simplejson is also supported on
1815 Python 3.3+.")
1816 (license license:x11)))
1817
1818 (define-public python2-simplejson
1819 (package-with-python2 python-simplejson))
1820
1821
1822 (define-public python-pyicu
1823 (package
1824 (name "python-pyicu")
1825 (version "2.4.3")
1826 (source
1827 (origin
1828 (method url-fetch)
1829 (uri (pypi-uri "PyICU" version))
1830 (sha256
1831 (base32
1832 "075bw66b3w0nw6mc5k32fwmrhyrmq3d7da3q2mw212qfmm0pgjn0"))))
1833 (build-system python-build-system)
1834 (inputs
1835 `(("icu4c" ,icu4c)))
1836 (native-inputs
1837 `(("python-pytest" ,python-pytest)
1838 ("python-six" ,python-six)))
1839 (home-page "https://github.com/ovalhub/pyicu")
1840 (synopsis "Python extension wrapping the ICU C++ API")
1841 (description
1842 "PyICU is a python extension wrapping the ICU C++ API.")
1843 (license license:x11)))
1844
1845 (define-public python2-pyicu
1846 (package-with-python2 python-pyicu))
1847
1848 (define-public python-dogtail
1849 (package
1850 (name "python-dogtail")
1851 (version "0.9.11")
1852 (source (origin
1853 (method url-fetch)
1854 (uri
1855 (string-append
1856 "https://gitlab.com/dogtail/dogtail/-/raw/released/"
1857 "dogtail-" version ".tar.gz"))
1858 (sha256
1859 (base32
1860 "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
1861 (build-system python-build-system)
1862 (arguments
1863 `(#:tests? #f ; TODO Launching dbus for the tests
1864 ; fails
1865 #:phases
1866 (modify-phases %standard-phases
1867 (replace 'check
1868 (lambda* (#:key tests? #:allow-other-keys)
1869 (when tests?
1870 (system "Xvfb :1 &")
1871 (setenv "DISPLAY" ":1")
1872 (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
1873 #t)))))
1874 (propagated-inputs
1875 `(("python-pygobject" ,python-pygobject)
1876 ("python-pycairo" ,python-pycairo)
1877 ("python-pyatspi" ,python-pyatspi)))
1878 (native-inputs
1879 `(("python-nose" ,python-nose)
1880 ("gtk+" ,gtk+)
1881 ("xvfb" ,xorg-server)
1882 ("dbus" ,dbus)
1883 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
1884 ("gobject-introspection" ,gobject-introspection)))
1885 (home-page "https://gitlab.com/dogtail/dogtail/")
1886 (synopsis "GUI test tool and automation framework written in Python")
1887 (description
1888 "Dogtail is a GUI test tool and automation framework written in Python.
1889 It uses Accessibility (a11y) technologies to communicate with desktop
1890 applications. dogtail scripts are written in Python and executed like any
1891 other Python program.")
1892 (license license:gpl2+)))
1893
1894 (define-public python2-dogtail
1895 (package-with-python2 python-dogtail))
1896
1897 (define-public python-empy
1898 (package
1899 (name "python-empy")
1900 (version "3.3.3")
1901 (source (origin
1902 (method url-fetch)
1903 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1904 version ".tar.gz"))
1905 (sha256
1906 (base32
1907 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1908 (build-system python-build-system)
1909 (arguments
1910 `(#:tests? #f)) ; python2 only
1911 (home-page "http://www.alcyone.com/software/empy/")
1912 (synopsis "Templating system for Python")
1913 (description
1914 "EmPy is a system for embedding Python expressions and statements in
1915 template text; it takes an EmPy source file, processes it, and produces
1916 output. This is accomplished via expansions, which are special signals to the
1917 EmPy system and are set off by a special prefix (by default the at sign, @@).
1918 EmPy can expand arbitrary Python expressions and statements in this way, as
1919 well as a variety of special forms. Textual data not explicitly delimited in
1920 this way is sent unaffected to the output, allowing Python to be used in
1921 effect as a markup language. Also supported are callbacks via hooks,
1922 recording and playback via diversions, and dynamic, chainable filters. The
1923 system is highly configurable via command line options and embedded
1924 commands.")
1925 (license license:lgpl2.1+)))
1926
1927 (define-public python2-empy
1928 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1929 (package
1930 (inherit base)
1931 (arguments `(,@(package-arguments base)
1932 #:tests? #t)))))
1933
1934 (define-public python2-element-tree
1935 (package
1936 (name "python2-element-tree")
1937 (version "1.2.6")
1938 (source (origin
1939 (method url-fetch)
1940 (uri (string-append
1941 "http://effbot.org/media/downloads/elementtree-"
1942 version "-20050316.tar.gz"))
1943 (sha256
1944 (base32
1945 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1946 (build-system python-build-system)
1947 (arguments
1948 `(#:python ,python-2 ; seems to be part of Python 3
1949 #:tests? #f)) ; no 'test' sub-command
1950 (synopsis "Toolkit for XML processing in Python")
1951 (description
1952 "ElementTree is a Python library supporting lightweight XML processing.")
1953 (home-page "https://effbot.org/zone/element-index.htm")
1954 (license (license:x11-style
1955 "http://docs.python.org/2/license.html"
1956 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1957
1958 (define-public python2-pybugz
1959 (package
1960 (name "python2-pybugz")
1961 (version "0.6.11")
1962 (source (origin
1963 (method url-fetch)
1964 (uri (string-append
1965 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1966 version ".tar.gz"))
1967 (sha256
1968 (base32
1969 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1970 (patches (search-patches "pybugz-stty.patch"
1971 "pybugz-encode-error.patch"))))
1972 (build-system python-build-system)
1973 (arguments
1974 `(#:python ,python-2 ; SyntaxError with Python 3
1975 #:tests? #f)) ; no 'test' sub-command
1976 (propagated-inputs
1977 `(("element-tree" ,python2-element-tree)))
1978 (synopsis "Python and command-line interface to Bugzilla")
1979 (description
1980 "PyBugz is a Python library and command-line tool to query the Bugzilla
1981 bug tracking system. It is meant as an aid to speed up interaction with the
1982 bug tracker.")
1983 (home-page "http://www.liquidx.net/pybugz/")
1984 (license license:gpl2)))
1985
1986 (define-public python2-enum
1987 (package
1988 (name "python2-enum")
1989 (version "0.4.6")
1990 (source (origin
1991 (method url-fetch)
1992 (uri (pypi-uri "enum" version))
1993 (sha256
1994 (base32
1995 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1996 (build-system python-build-system)
1997 (arguments
1998 `(#:python ,python-2))
1999 (home-page "https://pypi.org/project/enum/")
2000 (synopsis "Robust enumerated type support in Python")
2001 (description
2002 "This provides a module for robust enumerations in Python. It has
2003 been superseded by the Python standard library and is provided only for
2004 compatibility.")
2005 ;; Choice of either license.
2006 (license (list license:gpl3+ license:psfl))))
2007
2008 (define-public python-enum34
2009 (package
2010 (name "python-enum34")
2011 (version "1.1.6")
2012 (source
2013 (origin
2014 (method url-fetch)
2015 (uri (pypi-uri "enum34" version))
2016 (sha256
2017 (base32
2018 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
2019 (build-system python-build-system)
2020 (home-page "https://pypi.org/project/enum34/")
2021 (synopsis "Backported Python 3.4 Enum")
2022 (description
2023 "Enum34 is the new Python stdlib enum module available in Python 3.4
2024 backported for previous versions of Python from 2.4 to 3.3.")
2025 (license license:bsd-3)))
2026
2027 (define-public python2-enum34
2028 (package-with-python2 python-enum34))
2029
2030 (define-public python-parse-type
2031 (package
2032 (name "python-parse-type")
2033 (version "0.4.2")
2034 (source
2035 (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "parse_type" version))
2038 (sha256
2039 (base32
2040 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
2041 (build-system python-build-system)
2042 (propagated-inputs
2043 `(("python-six" ,python-six)
2044 ("python-parse" ,python-parse)))
2045 (native-inputs
2046 `(("python-pytest" ,python-pytest)
2047 ("python-pytest-runner" ,python-pytest-runner)))
2048 (home-page "https://github.com/jenisys/parse_type")
2049 (synopsis "Extended parse module")
2050 (description
2051 "Parse_type extends the python parse module.")
2052 (properties
2053 `((python2-variant . ,(delay python2-parse-type))))
2054 (license license:bsd-3)))
2055
2056 (define-public python2-parse-type
2057 (let ((base (package-with-python2
2058 (strip-python2-variant python-parse-type))))
2059 (package (inherit base)
2060 (propagated-inputs
2061 `(("python2-enum34" ,python2-enum34)
2062 ,@(package-propagated-inputs base))))))
2063
2064 (define-public python-parse
2065 (package
2066 (name "python-parse")
2067 (version "1.8.4")
2068 (source
2069 (origin
2070 (method url-fetch)
2071 (uri (pypi-uri "parse" version))
2072 (sha256
2073 (base32
2074 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
2075 (build-system python-build-system)
2076 (arguments
2077 `(#:phases
2078 (modify-phases %standard-phases
2079 (replace 'check
2080 (lambda _ (invoke "python" "test_parse.py"))))))
2081 (home-page "https://github.com/r1chardj0n3s/parse")
2082 (synopsis "Parse strings")
2083 (description
2084 "Parse strings using a specification based on the Python @code{format()}
2085 syntax.")
2086 (license license:x11)))
2087
2088 (define-public python-polib
2089 (package
2090 (name "python-polib")
2091 (version "1.0.8")
2092 (source (origin
2093 (method url-fetch)
2094 (uri (pypi-uri "polib" version))
2095 (sha256
2096 (base32
2097 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
2098 (build-system python-build-system)
2099 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
2100 (synopsis "Manipulate, create and modify gettext files")
2101 (description "Polib can manipulate any gettext format (po, pot and mo)
2102 files. It can be used to create po files from scratch or to modify
2103 existing ones.")
2104 (license license:expat)))
2105
2106 (define-public python2-polib
2107 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
2108 (package
2109 (inherit base)
2110 (arguments `(,@(package-arguments base)
2111 ;; Tests don't work with python2.
2112 #:tests? #f)))))
2113
2114 (define-public python-poyo
2115 (package
2116 (name "python-poyo")
2117 (version "0.5.0")
2118 (source
2119 (origin
2120 (method url-fetch)
2121 (uri (pypi-uri "poyo" version))
2122 (sha256
2123 (base32
2124 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
2125 (build-system python-build-system)
2126 (home-page "https://github.com/hackebrot/poyo")
2127 (synopsis "Lightweight YAML Parser for Python")
2128 (description
2129 "This package provides a lightweight YAML Parser for Python. It supports
2130 only a chosen subset of the YAML format that is required to parse cookiecutter
2131 user configuration files. It does not have support for serializing into YAML
2132 and is not compatible with JSON.")
2133 (license license:expat)))
2134
2135 (define-public scons
2136 (package
2137 (name "scons")
2138 (version "3.0.4")
2139 (source (origin
2140 (method git-fetch)
2141 (uri (git-reference
2142 (url "https://github.com/SCons/scons")
2143 (commit version)))
2144 (file-name (git-file-name name version))
2145 (sha256
2146 (base32
2147 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
2148 (build-system python-build-system)
2149 (arguments
2150 `(#:use-setuptools? #f ; still relies on distutils
2151 #:tests? #f ; no 'python setup.py test' command
2152 #:phases
2153 (modify-phases %standard-phases
2154 (add-before 'build 'bootstrap
2155 (lambda _
2156 (substitute* "src/engine/SCons/compat/__init__.py"
2157 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
2158 "sys.modules[new] = __import__(old)"))
2159 (substitute* "src/engine/SCons/Platform/__init__.py"
2160 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
2161 "mod = __import__(full_name)"))
2162 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
2163 (chdir "build/scons")
2164 #t)))))
2165 (home-page "https://scons.org/")
2166 (synopsis "Software construction tool written in Python")
2167 (description
2168 "SCons is a software construction tool. Think of SCons as an improved,
2169 cross-platform substitute for the classic Make utility with integrated
2170 functionality similar to autoconf/automake and compiler caches such as ccache.
2171 In short, SCons is an easier, more reliable and faster way to build
2172 software.")
2173 (license license:x11)))
2174
2175 (define-public scons-python2
2176 (package
2177 (inherit (package-with-python2 scons))
2178 (name "scons-python2")))
2179
2180 (define-public python-extras
2181 (package
2182 (name "python-extras")
2183 (version "1.0.0")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (pypi-uri "extras" version))
2188 (sha256
2189 (base32
2190 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
2191 (build-system python-build-system)
2192 (arguments
2193 ;; FIXME: Circular dependency on testtools.
2194 '(#:tests? #f))
2195 (home-page "https://github.com/testing-cabal/extras")
2196 (synopsis "Useful extensions to the Python standard library")
2197 (description
2198 "Extras is a set of extensions to the Python standard library.")
2199 (license license:expat)))
2200
2201 (define-public python2-extras
2202 (package-with-python2 python-extras))
2203
2204 (define-public python-mimeparse
2205 (package
2206 (name "python-mimeparse")
2207 (version "1.6.0")
2208 (source
2209 (origin
2210 (method url-fetch)
2211 (uri (pypi-uri "python-mimeparse" version))
2212 (sha256
2213 (base32
2214 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
2215 (build-system python-build-system)
2216 (arguments
2217 '(#:phases
2218 (modify-phases %standard-phases
2219 (replace 'check
2220 (lambda _
2221 (invoke "./mimeparse_test.py"))))))
2222 (home-page
2223 "https://github.com/dbtsai/python-mimeparse")
2224 (synopsis "Python library for parsing MIME types")
2225 (description
2226 "Mimeparse provides basic functions for parsing MIME type names and
2227 matching them against a list of media-ranges.")
2228 (license license:expat)))
2229
2230 (define-public python2-mimeparse
2231 (package-with-python2 python-mimeparse))
2232
2233 (define-public python-miniboa
2234 (package
2235 (name "python-miniboa")
2236 (version "1.0.7")
2237 (source
2238 (origin
2239 (method url-fetch)
2240 (uri (pypi-uri "miniboa" version))
2241 (sha256
2242 (base32
2243 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
2244 (build-system python-build-system)
2245 (home-page "https://github.com/shmup/miniboa")
2246 (synopsis "Simple, single-threaded Telnet server")
2247 (description
2248 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
2249 server.")
2250 (license license:asl2.0)))
2251
2252 (define-public python2-miniboa
2253 (package-with-python2 python-miniboa))
2254
2255 (define-public python-pafy
2256 (package
2257 (name "python-pafy")
2258 (version "0.5.3.1")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "pafy" version))
2263 (sha256
2264 (base32
2265 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
2266 (build-system python-build-system)
2267 (arguments
2268 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
2269 (propagated-inputs
2270 ;; Youtube-dl is a python package which is imported in the file
2271 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
2272 `(("youtube-dl" ,youtube-dl)))
2273 (home-page "https://np1.github.io/pafy/")
2274 (synopsis "Retrieve YouTube content and metadata")
2275 (description
2276 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
2277 (license license:lgpl3+)))
2278
2279 (define-public python2-funcsigs
2280 (package
2281 (name "python2-funcsigs")
2282 (version "1.0.2")
2283 (source (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "funcsigs" version))
2286 (sha256
2287 (base32
2288 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
2289 (build-system python-build-system)
2290 (arguments
2291 `(#:python ,python-2))
2292 (native-inputs
2293 `(("python2-unittest2" ,python2-unittest2)))
2294 (home-page "http://funcsigs.readthedocs.org")
2295 (synopsis "Python function signatures from PEP362")
2296 (description
2297 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
2298 (license license:asl2.0)))
2299
2300 (define-public python2-funcsigs-bootstrap
2301 (package
2302 (inherit python2-funcsigs)
2303 (name "python2-funcsigs-bootstrap")
2304 (native-inputs `())
2305 (arguments
2306 `(#:tests? #f
2307 ,@(package-arguments python2-funcsigs)))))
2308
2309 (define-public python-py
2310 (package
2311 (name "python-py")
2312 (version "1.8.1")
2313 (source
2314 (origin
2315 (method url-fetch)
2316 (uri (pypi-uri "py" version))
2317 (sha256
2318 (base32
2319 "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy"))))
2320 (build-system python-build-system)
2321 (arguments
2322 ;; FIXME: "ImportError: 'test' module incorrectly imported from
2323 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
2324 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
2325 ;; Is this module globally installed?"
2326 '(#:tests? #f))
2327 (native-inputs
2328 `(("python-setuptools-scm" ,python-setuptools-scm)))
2329 (home-page "https://github.com/pytest-dev/py")
2330 (synopsis "Python library for parsing, I/O, instrospection, and logging")
2331 (description
2332 "Py is a Python library for file name parsing, .ini file parsing, I/O,
2333 code introspection, and logging.")
2334 (license license:expat)))
2335
2336 (define-public python2-py
2337 (package-with-python2 python-py))
2338
2339 ;; Recent versions of python-fixtures and python-testrepository need
2340 ;; python-pbr for packaging, which itself needs these two packages for
2341 ;; testing.
2342 ;; To fix this circular dependency, we use a build of python-pbr, based on the
2343 ;; same source, just without any test dependencies and with tests disabled.
2344 ;; python-pbr-minmal is then used to package python-fixtures and
2345 ;; python-testrepository.
2346 ;; Strictly speaking we currently could remove the test-requirements from the
2347 ;; normal python-pbr package (and save this package) since test are disabled
2348 ;; there anyway. But this may change in future.
2349 (define-public python-pbr-minimal
2350 (package
2351 (name "python-pbr-minimal")
2352 (version "3.0.1")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "pbr" version))
2357 (sha256
2358 (base32
2359 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
2360 (build-system python-build-system)
2361 (arguments
2362 `(#:tests? #f))
2363 (home-page "https://docs.openstack.org/pbr/latest/")
2364 (synopsis "Minimal build of python-pbr used for bootstrapping")
2365 (description
2366 "Used only for bootstrapping python2-pbr, you should not need this.")
2367 (license license:asl2.0)))
2368
2369 (define-public python2-pbr-minimal
2370 (package-with-python2 python-pbr-minimal))
2371
2372 (define-public python-pbr
2373 (package
2374 (inherit python-pbr-minimal)
2375 (name "python-pbr")
2376 (arguments
2377 `(#:tests? #f)) ;; Most tests seem to use the Internet.
2378 (propagated-inputs
2379 `(("git" ,git))) ;; pbr actually uses the "git" binary.
2380 (native-inputs
2381 `(("python-fixtures" ,python-fixtures-bootstrap)
2382 ;; discover, coverage, hacking, subunit
2383 ("python-mock" ,python-mock)
2384 ("python-six" ,python-six)
2385 ("python-sphinx" ,python-sphinx)
2386 ("python-testrepository" ,python-testrepository-bootstrap)
2387 ("python-testresources" ,python-testresources-bootstrap)
2388 ("python-testscenarios" ,python-testscenarios-bootstrap)
2389 ("python-testtools" ,python-testtools-bootstrap)
2390 ("python-virtualenv" ,python-virtualenv)))
2391 (synopsis "Enhance the default behavior of Python’s setuptools")
2392 (description
2393 "Python Build Reasonableness (PBR) is a library that injects some useful
2394 and sensible default behaviors into your setuptools run. It will set
2395 versions, process requirements files and generate AUTHORS and ChangeLog file
2396 from git information.
2397 ")))
2398
2399 (define-public python2-pbr
2400 (package-with-python2 python-pbr))
2401
2402 (define-public python-pyrsistent
2403 (package
2404 (name "python-pyrsistent")
2405 (version "0.16.0")
2406 (home-page "https://github.com/tobgu/pyrsistent")
2407 (source (origin
2408 (method url-fetch)
2409 (uri (pypi-uri "pyrsistent" version))
2410 (sha256
2411 (base32
2412 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
2413 (build-system python-build-system)
2414 (arguments
2415 '(#:phases (modify-phases %standard-phases
2416 ;; The package works fine with newer Pytest and Hypothesis, but
2417 ;; has pinned older versions to stay compatible with Python 2.
2418 (add-before 'check 'loosen-pytest-requirement
2419 (lambda _
2420 (substitute* "setup.py"
2421 (("pytest<5") "pytest")
2422 (("hypothesis<5") "hypothesis"))
2423 #t)))))
2424 (native-inputs
2425 `(("python-hypothesis" ,python-hypothesis)
2426 ("python-pytest" ,python-pytest)
2427 ("python-pytest-runner" ,python-pytest-runner)))
2428 (propagated-inputs
2429 `(("python-six" ,python-six)))
2430 (synopsis "Persistent data structures for Python")
2431 (description
2432 "Pyrsistent is a number of persistent collections (by some referred to as
2433 functional data structures). Persistent in the sense that they are immutable.
2434
2435 All methods on a data structure that would normally mutate it instead return a
2436 new copy of the structure containing the requested updates. The original
2437 structure is left untouched.")
2438 (license license:expat)))
2439
2440 (define-public python2-pyrsistent
2441 (package-with-python2 python-pyrsistent))
2442
2443 (define-public python-exif-read
2444 (package
2445 (name "python-exif-read")
2446 (version "2.1.2")
2447 (source (origin
2448 (method url-fetch)
2449 (uri (pypi-uri "ExifRead" version))
2450 (sha256
2451 (base32
2452 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
2453 (build-system python-build-system)
2454 (arguments `(#:tests? #f)) ; no tests
2455 (home-page "https://github.com/ianare/exif-py")
2456 (synopsis "Python library to extract EXIF data from image files")
2457 (description
2458 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
2459 files.")
2460 (license license:bsd-3)))
2461
2462 (define-public python2-exif-read
2463 (package-with-python2 python-exif-read))
2464
2465 (define-public python-pyld
2466 (package
2467 (name "python-pyld")
2468 (version "1.0.5")
2469 (source (origin
2470 (method url-fetch)
2471 (uri (pypi-uri "PyLD" version))
2472 (sha256
2473 (base32
2474 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
2475 (build-system python-build-system)
2476 (home-page "https://github.com/digitalbazaar/pyld")
2477 (synopsis "Python implementation of the JSON-LD specification")
2478 (description
2479 "PyLD is an implementation of the JSON-LD specification.")
2480 (license license:bsd-3)))
2481
2482 (define-public python2-pyld
2483 (package-with-python2 python-pyld))
2484
2485 (define-public python-cli-helpers
2486 (package
2487 (name "python-cli-helpers")
2488 (version "2.0.1")
2489 (source
2490 (origin
2491 ;; There's no source tarball on PyPI.
2492 (method git-fetch)
2493 (uri (git-reference
2494 (url "https://github.com/dbcli/cli_helpers")
2495 (commit (string-append "v" version))))
2496 (file-name (git-file-name name version))
2497 (sha256
2498 (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
2499 (build-system python-build-system)
2500 (native-inputs
2501 `(("python-pytest" ,python-pytest)))
2502 (propagated-inputs
2503 `(("python-wcwidth" ,python-wcwidth)
2504 ("python-configobj" ,python-configobj)
2505 ("python-tabulate" ,python-tabulate)
2506 ("python-terminaltables" ,python-terminaltables)))
2507 (home-page "https://github.com/dbcli/cli_helpers")
2508 (synopsis "Helpers for building command-line apps")
2509 (description
2510 "CLI Helpers is a Python package that makes it easy to perform common
2511 tasks when building command-line apps. It's a helper library for command-line
2512 interfaces.")
2513 (license license:bsd-3)))
2514
2515 (define-public python-click
2516 (package
2517 (name "python-click")
2518 (version "7.1.2")
2519 (source
2520 (origin
2521 (method url-fetch)
2522 (uri (pypi-uri "click" version))
2523 (sha256
2524 (base32
2525 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
2526 (build-system python-build-system)
2527 (arguments
2528 `(#:phases
2529 (modify-phases %standard-phases
2530 (add-after 'unpack 'fix-paths
2531 (lambda* (#:key inputs #:allow-other-keys)
2532 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
2533 "cross-libc" "libc"))))
2534 (substitute* "src/click/_unicodefun.py"
2535 (("'locale'")
2536 (string-append "'" glibc "/bin/locale'"))))
2537 #t))
2538 (replace 'check
2539 (lambda _
2540 (setenv "PYTHONPATH" (string-append "./src:" (getenv "PYTHONPATH")))
2541 (invoke "python" "-m" "pytest"))))))
2542 (native-inputs
2543 `(("python-pytest" ,python-pytest)))
2544 (home-page "https://palletsprojects.com/p/click/")
2545 (synopsis "Command line library for Python")
2546 (description
2547 "Click is a Python package for creating command line interfaces in a
2548 composable way with as little code as necessary. Its name stands for
2549 \"Command Line Interface Creation Kit\". It's highly configurable but comes
2550 with sensible defaults out of the box.")
2551 (license license:bsd-3)))
2552
2553 (define-public python2-click
2554 (package-with-python2 python-click))
2555
2556 (define-public python-click-5
2557 (package (inherit python-click)
2558 (name "python-click")
2559 (version "5.1")
2560 (source
2561 (origin
2562 (method url-fetch)
2563 (uri (pypi-uri "click" version))
2564 (sha256
2565 (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
2566 (arguments `())))
2567
2568 (define-public python-wheel
2569 (package
2570 (name "python-wheel")
2571 (version "0.33.6")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (pypi-uri "wheel" version))
2576 (sha256
2577 (base32
2578 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
2579 (build-system python-build-system)
2580 (arguments
2581 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
2582 ;; fails to find the newly-built bdist_wheel library, even though it is
2583 ;; available on PYTHONPATH. What search path is consulted by setup.py?
2584 '(#:tests? #f))
2585 (home-page "https://bitbucket.org/pypa/wheel/")
2586 (synopsis "Format for built Python packages")
2587 (description
2588 "A wheel is a ZIP-format archive with a specially formatted filename and
2589 the @code{.whl} extension. It is designed to contain all the files for a PEP
2590 376 compatible install in a way that is very close to the on-disk format. Many
2591 packages will be properly installed with only the @code{Unpack} step and the
2592 unpacked archive preserves enough information to @code{Spread} (copy data and
2593 scripts to their final locations) at any later time. Wheel files can be
2594 installed with a newer @code{pip} or with wheel's own command line utility.")
2595 (license license:expat)))
2596
2597 (define-public python2-wheel
2598 (package-with-python2 python-wheel))
2599
2600 (define-public python-vcversioner
2601 (package
2602 (name "python-vcversioner")
2603 (version "2.16.0.0")
2604 (source
2605 (origin
2606 (method url-fetch)
2607 (uri (pypi-uri "vcversioner" version))
2608 (sha256
2609 (base32
2610 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2611 (build-system python-build-system)
2612 (synopsis "Python library for version number discovery")
2613 (description "Vcversioner is a Python library that inspects tagging
2614 information in a variety of version control systems in order to discover
2615 version numbers.")
2616 (home-page "https://github.com/habnabit/vcversioner")
2617 (license license:isc)))
2618
2619 (define-public python2-vcversioner
2620 (package-with-python2 python-vcversioner))
2621
2622 (define-public python-jdcal
2623 (package
2624 (name "python-jdcal")
2625 (version "1.4")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (pypi-uri "jdcal" version))
2630 (sha256
2631 (base32
2632 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2633 (build-system python-build-system)
2634 (arguments
2635 `(#:phases (modify-phases %standard-phases
2636 (replace 'check
2637 (lambda _
2638 (invoke "pytest"))))))
2639 (native-inputs
2640 `(("python-pytest" ,python-pytest)))
2641 (home-page "https://github.com/phn/jdcal")
2642 (synopsis "Functions to convert between Julian dates Gregorian dates")
2643 (description "This Python library provides functions for converting
2644 between Julian dates and Gregorian dates.")
2645 (license license:bsd-2)))
2646
2647 (define-public python2-jdcal
2648 (package-with-python2 python-jdcal))
2649
2650 (define-public python-jsondiff
2651 (package
2652 (name "python-jsondiff")
2653 (version "1.2.0")
2654 (source
2655 (origin
2656 (method url-fetch)
2657 (uri (pypi-uri "jsondiff" version))
2658 (sha256
2659 (base32
2660 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2661 (build-system python-build-system)
2662 (native-inputs
2663 `(("python-nose" ,python-nose)
2664 ("python-nose-random" ,python-nose-random)))
2665 (home-page
2666 "https://github.com/fzumstein/jsondiff")
2667 (synopsis "Compare JSON and JSON-like structures in Python")
2668 (description "@code{jsondiff} is a Python library which lets you
2669 compare, diff, and patch JSON and JSON-like structures in Python.")
2670 (license license:expat)))
2671
2672 (define-public python-jsonschema
2673 (package
2674 (name "python-jsonschema")
2675 (version "3.2.0")
2676 (source (origin
2677 (method url-fetch)
2678 (uri (pypi-uri "jsonschema" version))
2679 (sha256
2680 (base32
2681 "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
2682 (build-system python-build-system)
2683 (arguments
2684 '(#:phases
2685 (modify-phases %standard-phases
2686 (replace 'check
2687 (lambda* (#:key inputs outputs #:allow-other-keys)
2688 (add-installed-pythonpath inputs outputs)
2689 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2690 (invoke "trial" "jsonschema"))))))
2691 (native-inputs
2692 `(("python-setuptools_scm" ,python-setuptools-scm)
2693 ("python-twisted" ,python-twisted)))
2694 (propagated-inputs
2695 `(("python-attrs" ,python-attrs)
2696 ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8
2697 ("python-pyrsistent" ,python-pyrsistent)
2698 ("python-six" ,python-six)))
2699 (home-page "https://github.com/Julian/jsonschema")
2700 (synopsis "Implementation of JSON Schema for Python")
2701 (description
2702 "Jsonschema is an implementation of JSON Schema for Python.")
2703 (license license:expat)
2704 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2705
2706 (define-public python2-jsonschema
2707 (let ((jsonschema (package-with-python2
2708 (strip-python2-variant python-jsonschema))))
2709 (package (inherit jsonschema)
2710 (propagated-inputs
2711 `(("python2-functools32" ,python2-functools32)
2712 ,@(package-propagated-inputs jsonschema))))))
2713
2714 (define-public python-schema
2715 (package
2716 (name "python-schema")
2717 (version "0.6.6")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "schema" version))
2722 (sha256
2723 (base32
2724 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2725 (build-system python-build-system)
2726 (native-inputs
2727 `(("python-pytest" ,python-pytest)))
2728 (home-page "https://github.com/keleshev/schema")
2729 (synopsis "Simple data validation library")
2730 (description
2731 "@code{python-schema} is a library for validating Python data
2732 structures, such as those obtained from config-files, forms, external
2733 services or command-line parsing, converted from JSON/YAML (or
2734 something else) to Python data-types.")
2735 (license license:psfl)))
2736
2737 (define-public python2-schema
2738 (package-with-python2 python-schema))
2739
2740 (define-public python-schema-0.5
2741 (package (inherit python-schema)
2742 (version "0.5.0")
2743 (source
2744 (origin
2745 (method url-fetch)
2746 (uri (pypi-uri "schema" version))
2747 (sha256
2748 (base32
2749 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2750
2751 (define-public python2-schema-0.5
2752 (package-with-python2 python-schema-0.5))
2753
2754 (define-public python-kitchen
2755 (package
2756 (name "python-kitchen")
2757 (version "1.2.5")
2758 (source
2759 (origin
2760 (method url-fetch)
2761 (uri (pypi-uri "kitchen" version))
2762 (sha256
2763 (base32
2764 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2765 (build-system python-build-system)
2766 (propagated-inputs
2767 `(("python-chardet" ,python-chardet)))
2768 (home-page "https://github.com/fedora-infra/kitchen")
2769 (synopsis "Python API for snippets")
2770 (description "@code{kitchen} module provides a python API for all sorts of
2771 little useful snippets of code that everybody ends up writing for their projects
2772 but never seem big enough to build an independent release. Use kitchen and stop
2773 cutting and pasting that code over and over.")
2774 (license (list license:lgpl2.1+
2775 ;; subprocess.py, test_subprocess.py,
2776 ;; kitchen/pycompat25/defaultdict.py:
2777 license:psfl))))
2778
2779 (define-public python2-kitchen
2780 (package-with-python2 python-kitchen))
2781
2782 (define-public python-unidecode
2783 (package
2784 (name "python-unidecode")
2785 (version "1.1.1")
2786 (source (origin
2787 (method url-fetch)
2788 (uri (pypi-uri "Unidecode" version))
2789 (sha256
2790 (base32
2791 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2792 (build-system python-build-system)
2793 (home-page "https://pypi.org/project/Unidecode/")
2794 (synopsis "ASCII transliterations of Unicode text")
2795 (description
2796 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2797 useful when integrating with legacy code that doesn't support Unicode, or for
2798 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2799 machine identifiers from human-readable Unicode strings that should still be
2800 somewhat intelligible.")
2801 (license license:gpl2+)))
2802
2803 (define-public python2-unidecode
2804 (package-with-python2 python-unidecode))
2805
2806 (define-public python-text-unidecode
2807 (package
2808 (name "python-text-unidecode")
2809 (version "1.3")
2810 (source (origin
2811 (method url-fetch)
2812 (uri (pypi-uri "text-unidecode" version))
2813 (sha256
2814 (base32
2815 "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
2816 (build-system python-build-system)
2817 (arguments
2818 '(#:phases (modify-phases %standard-phases
2819 (replace 'check
2820 (lambda _
2821 (setenv "PYTHONPATH"
2822 (string-append "./build/lib:"
2823 (getenv "PYTHONPATH")))
2824 (invoke "pytest" "-vv"))))))
2825 (native-inputs
2826 `(("python-pytest" ,python-pytest)))
2827 (home-page "https://github.com/kmike/text-unidecode/")
2828 (synopsis "Decode Unicode data")
2829 (description
2830 "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
2831 Perl library. It can create ASCII representations of Unicode data. In general
2832 users should prefer the @code{python-unidecode} package which offers better
2833 memory usage and transliteration quality.")
2834 ;; The user can choose either license.
2835 (license (list license:clarified-artistic license:gpl2+))))
2836
2837 (define-public python2-text-unidecode
2838 (package-with-python2 python-text-unidecode))
2839
2840 (define-public python-pyjwt
2841 (package
2842 (name "python-pyjwt")
2843 (version "1.7.1")
2844 (source
2845 (origin
2846 (method url-fetch)
2847 (uri (pypi-uri "PyJWT" version))
2848 (sha256
2849 (base32
2850 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2851 (modules '((guix build utils)))
2852 (snippet
2853 '(begin
2854 (for-each delete-file-recursively
2855 (find-files "." "\\.pyc$"))
2856 #t))))
2857 (build-system python-build-system)
2858 (arguments
2859 '(#:phases (modify-phases %standard-phases
2860 (replace 'check
2861 (lambda _
2862 ;; Mimic upstream commit 3a20892442b34c7 to get
2863 ;; rid of dependency on pytest-runner < 5.0.
2864 ;; Remove substitution for PyJWT > 1.7.1.
2865 (substitute* "setup.py"
2866 ((".*pytest-runner.*")
2867 ""))
2868 (invoke "pytest" "-vv"))))))
2869 (native-inputs
2870 `(("python-pytest" ,python-pytest)
2871 ("python-pytest-cov" ,python-pytest-cov)))
2872 (home-page "https://github.com/progrium/pyjwt")
2873 (synopsis "JSON Web Token implementation in Python")
2874 (description
2875 "PyJWT is a JSON Web Token implementation written in Python.")
2876 (license license:expat)))
2877
2878 (define-public python2-pyjwt
2879 (package-with-python2 python-pyjwt))
2880
2881 (define-public python-pykka
2882 (package
2883 (name "python-pykka")
2884 (version "1.2.1")
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (pypi-uri "Pykka" version))
2889 (sha256
2890 (base32
2891 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2892 (build-system python-build-system)
2893 (native-inputs
2894 `(("python-mock" ,python-mock)
2895 ("python-nose" ,python-nose)
2896 ("python-gevent" ,python-gevent)
2897 ("python-eventlet" ,python-eventlet)))
2898 (home-page "https://www.pykka.org/")
2899 (synopsis "Pykka is a Python implementation of the actor model")
2900 (description
2901 "Pykka is a Python implementation of the actor model.
2902 The actor model introduces some simple rules to control the sharing
2903 of state and cooperation between execution units, which makes it
2904 easier to build concurrent applications.")
2905 (license license:asl2.0)))
2906
2907 (define-public python2-pykka
2908 (package-with-python2 python-pykka))
2909
2910 (define-public python-pymsgbox
2911 (package
2912 (name "python-pymsgbox")
2913 (version "1.0.6")
2914 (source
2915 (origin
2916 (method git-fetch)
2917 (uri (git-reference
2918 ;; LICENSE.txt is not present on pypi
2919 (url "https://github.com/asweigart/PyMsgBox")
2920 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2921 (file-name (git-file-name name version))
2922 (sha256
2923 (base32
2924 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2925 (arguments
2926 ;; Circular dependency to run tests:
2927 ;; Tests need pyautogui, which depends on pymsgbox.
2928 '(#:tests? #f))
2929 (build-system python-build-system)
2930 (home-page "https://github.com/asweigart/PyMsgBox")
2931 (synopsis "Python module for JavaScript-like message boxes")
2932 (description
2933 "PyMsgBox is a simple, cross-platform, pure Python module for
2934 JavaScript-like message boxes. Types of dialog boxes include:
2935 @enumerate
2936 @item alert
2937 @item confirm
2938 @item prompt
2939 @item password
2940 @end enumerate
2941 ")
2942 (license license:bsd-3)))
2943
2944 (define-public python-pympler
2945 (package
2946 (name "python-pympler")
2947 (home-page "https://pythonhosted.org/Pympler/")
2948 (version "0.8")
2949 (source (origin
2950 (method url-fetch)
2951 (uri (pypi-uri "Pympler" version))
2952 (sha256
2953 (base32
2954 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2955 (build-system python-build-system)
2956 (arguments
2957 `(#:phases (modify-phases %standard-phases
2958 (delete 'check)
2959 (add-after 'install 'check
2960 (lambda* (#:key inputs outputs #:allow-other-keys)
2961 (add-installed-pythonpath inputs outputs)
2962 (invoke "python" "setup.py" "test"))))))
2963 (synopsis "Measure, monitor and analyze memory behavior")
2964 (description
2965 "Pympler is a development tool to measure, monitor and analyze
2966 the memory behavior of Python objects in a running Python application.
2967
2968 By pympling a Python application, detailed insight in the size and the
2969 lifetime of Python objects can be obtained. Undesirable or unexpected
2970 runtime behavior like memory bloat and other @samp{pymples} can easily
2971 be identified.
2972
2973 A web profiling frontend exposes process statistics, garbage
2974 visualisation and class tracker statistics.")
2975 (license license:asl2.0)))
2976
2977 (define-public python2-pympler
2978 (package-with-python2 python-pympler))
2979
2980 (define-public python-itsdangerous
2981 (package
2982 (name "python-itsdangerous")
2983 (version "1.1.0")
2984 (source
2985 (origin
2986 (method url-fetch)
2987 (uri (pypi-uri "itsdangerous" version))
2988 (sha256
2989 (base32
2990 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2991 (build-system python-build-system)
2992 (home-page "https://palletsprojects.com/p/itsdangerous/")
2993 (synopsis "Python library for passing data to/from untrusted environments")
2994 (description
2995 "Itsdangerous provides various helpers to pass trusted data to untrusted
2996 environments and back.")
2997 (license license:bsd-3)))
2998
2999 (define-public python2-itsdangerous
3000 (package-with-python2 python-itsdangerous))
3001
3002 (define-public python-pyyaml
3003 (package
3004 (name "python-pyyaml")
3005 (version "5.3.1")
3006 (source
3007 (origin
3008 (method url-fetch)
3009 (uri (pypi-uri "PyYAML" version))
3010 (sha256
3011 (base32
3012 "0pb4zvkfxfijkpgd1b86xjsqql97ssf1knbd1v53wkg1qm9cgsmq"))))
3013 (build-system python-build-system)
3014 (inputs
3015 `(("libyaml" ,libyaml)))
3016 (home-page "https://pyyaml.org")
3017 (synopsis "YAML parser and emitter for Python")
3018 (description
3019 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
3020 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
3021 API, and sensible error messages. PyYAML supports standard YAML tags and
3022 provides Python-specific tags that represent an arbitrary Python object.")
3023 (license license:expat)))
3024
3025 (define-public python2-pyyaml
3026 (package-with-python2 python-pyyaml))
3027
3028 (define-public python-vine
3029 (package
3030 (name "python-vine")
3031 (version "1.1.4")
3032 (source
3033 (origin
3034 (method url-fetch)
3035 (uri (pypi-uri "vine" version))
3036 (sha256
3037 (base32
3038 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
3039 (build-system python-build-system)
3040 (native-inputs
3041 `(("python-pytest" ,python-pytest)
3042 ("python-case" ,python-case)))
3043 (home-page "https://github.com/celery/vine")
3044 (synopsis "Promises for Python")
3045 (description
3046 "@code{vine} provides a special implementation of promises in that it can
3047 be used both for \"promise of a value\" and lazy evaluation. The biggest
3048 upside for this is that everything in a promise can also be a promise,
3049 e.g. filters, callbacks and errbacks can all be promises.")
3050 (license license:bsd-3)))
3051
3052 (define-public python-virtualenv
3053 (package
3054 (name "python-virtualenv")
3055 (version "20.0.10")
3056 (source
3057 (origin
3058 (method url-fetch)
3059 (uri (pypi-uri "virtualenv" version))
3060 (sha256
3061 (base32
3062 "0y6x41l3ja891993i4adylbbyly0r4m52n2d0a0y9y4h3lzyh4l5"))))
3063 (build-system python-build-system)
3064 (native-inputs
3065 `(("python-mock" ,python-mock)
3066 ("python-pytest" ,python-pytest)
3067 ;; NOTE: guix lint remarks that "python-setuptools should probably not
3068 ;; be an input at all". However, removing the input makes the build error:
3069 ;; File "setup.py", line 4, in <module>
3070 ;; raise RuntimeError("setuptools >= 41 required to build")
3071 ("python-setuptools" ,python-setuptools)
3072 ("python-setuptools-scm" ,python-setuptools-scm)))
3073 (propagated-inputs
3074 `(("python-appdirs" ,python-appdirs)
3075 ("python-distlib" ,python-distlib)
3076 ("python-filelock" ,python-filelock)
3077 ("python-six" ,python-six)
3078 ("python-importlib-metadata" ,python-importlib-metadata)))
3079 (home-page "https://virtualenv.pypa.io/")
3080 (synopsis "Virtual Python environment builder")
3081 (description
3082 "Virtualenv is a tool to create isolated Python environments.")
3083 (properties `((python2-variant . ,(delay python2-virtualenv))))
3084 (license license:expat)))
3085
3086 (define-public python2-virtualenv
3087 (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
3088 (package
3089 (inherit base)
3090 (arguments
3091 `(#:python ,python-2
3092 #:phases
3093 (modify-phases %standard-phases
3094 (add-after 'set-paths 'adjust-PYTHONPATH
3095 (lambda* (#:key inputs #:allow-other-keys)
3096 (let* ((python (assoc-ref inputs "python"))
3097 (python-sitedir (string-append python "/lib/python2.7"
3098 "/site-packages")))
3099 ;; XXX: 'python2' always comes first on PYTHONPATH
3100 ;; and shadows the 'setuptools' input. Move python2
3101 ;; last: this should be fixed in python-build-system
3102 ;; in a future rebuild cycle.
3103 (setenv "PYTHONPATH"
3104 (string-append (string-join (delete python-sitedir
3105 (string-split
3106 (getenv "PYTHONPATH")
3107 #\:))
3108 ":")
3109 ":" python-sitedir))
3110 (format #t "environment variable `PYTHONPATH' changed to `~a'~%"
3111 (getenv "PYTHONPATH"))
3112 #t))))))
3113 (propagated-inputs
3114 `(("python-contextlib2" ,python2-contextlib2)
3115 ,@(package-propagated-inputs base))))))
3116
3117 (define-public python-markupsafe
3118 (package
3119 (name "python-markupsafe")
3120 (version "1.1.1")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (pypi-uri "MarkupSafe" version))
3125 (sha256
3126 (base32
3127 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
3128 (build-system python-build-system)
3129 (arguments
3130 `(#:modules ((ice-9 ftw)
3131 (srfi srfi-1)
3132 (srfi srfi-26)
3133 (guix build utils)
3134 (guix build python-build-system))
3135 #:phases (modify-phases %standard-phases
3136 (replace 'check
3137 (lambda _
3138 (let ((cwd (getcwd))
3139 (libdir (find (cut string-prefix? "lib." <>)
3140 (scandir "build"))))
3141 (setenv "PYTHONPATH"
3142 (string-append cwd "/build/" libdir ":"
3143 (getenv "PYTHONPATH")))
3144 (invoke "pytest" "-vv")))))))
3145 (native-inputs
3146 `(("python-pytest" ,python-pytest)))
3147 (home-page "https://github.com/mitsuhiko/markupsafe")
3148 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
3149 (description
3150 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
3151 for Python.")
3152 (license license:bsd-3)))
3153
3154 (define-public python2-markupsafe
3155 (package-with-python2 python-markupsafe))
3156
3157 (define-public python-jinja2
3158 (package
3159 (name "python-jinja2")
3160 (version "2.11.2")
3161 (source
3162 (origin
3163 (method url-fetch)
3164 (uri (pypi-uri "Jinja2" version))
3165 (sha256
3166 (base32
3167 "1c1v3djnr0ymp5xpy1h3h60abcaqxdlm4wsqmls9rxby88av5al9"))))
3168 (build-system python-build-system)
3169 (arguments
3170 '(#:phases (modify-phases %standard-phases
3171 (replace 'check
3172 (lambda* (#:key tests? #:allow-other-keys)
3173 (if tests?
3174 (begin
3175 (setenv "PYTHONPATH"
3176 (string-append "./build/lib:"
3177 (getenv "PYTHONPATH")))
3178 (invoke "pytest" "-vv"))
3179 (format #t "test suite not run~%"))
3180 #t)))))
3181 (native-inputs
3182 `(("python-pytest" ,python-pytest)))
3183 (propagated-inputs
3184 `(("python-markupsafe" ,python-markupsafe)))
3185 (home-page "http://jinja.pocoo.org/")
3186 (synopsis "Python template engine")
3187 (description
3188 "Jinja2 is a small but fast and easy to use stand-alone template engine
3189 written in pure Python.")
3190 (license license:bsd-3)))
3191
3192 (define-public python2-jinja2
3193 (package-with-python2 python-jinja2))
3194
3195 (define-public python-jinja2-time
3196 (package
3197 (name "python-jinja2-time")
3198 (version "0.2.0")
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (pypi-uri "jinja2-time" version))
3203 (sha256
3204 (base32
3205 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
3206 (build-system python-build-system)
3207 (propagated-inputs
3208 `(("python-arrow" ,python-arrow)
3209 ("python-jinja2" ,python-jinja2)))
3210 (home-page
3211 "https://github.com/hackebrot/jinja2-time")
3212 (synopsis "Jinja2 Extension for Dates and Times")
3213 (description
3214 "This package provides an extension for the template engine Jinja2. It
3215 adds a 'now' tag providing a convenient access to the arrow.now() API from
3216 templates. A format string can be provided to control the output.")
3217 (license license:expat)))
3218
3219 (define-public python-pystache
3220 (package
3221 (name "python-pystache")
3222 (version "0.5.4")
3223 (source (origin
3224 (method url-fetch)
3225 (uri (pypi-uri "pystache" version))
3226 (sha256
3227 (base32
3228 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
3229 (build-system python-build-system)
3230 (arguments
3231 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
3232 (home-page "http://defunkt.io/pystache/")
3233 (synopsis "Python logic-less template engine")
3234 (description
3235 "Pystache is a Python implementation of the framework agnostic,
3236 logic-free templating system Mustache.")
3237 (license license:expat)
3238 (properties `((python2-variant . ,(delay python2-pystache))))))
3239
3240 (define-public python2-pystache
3241 (package (inherit (package-with-python2
3242 (strip-python2-variant python-pystache)))
3243 (arguments
3244 `(#:python ,python-2
3245 #:phases
3246 (modify-phases %standard-phases
3247 (replace 'check
3248 (lambda _
3249 (invoke "python" "test_pystache.py"))))))))
3250
3251 (define-public python-joblib
3252 (package
3253 (name "python-joblib")
3254 (version "0.14.1")
3255 (source (origin
3256 (method url-fetch)
3257 (uri (pypi-uri "joblib" version))
3258 (sha256
3259 (base32
3260 "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))
3261 (build-system python-build-system)
3262 (arguments
3263 `(#:phases
3264 (modify-phases %standard-phases
3265 (replace 'check
3266 (lambda _ (invoke "pytest" "-v" "joblib"))))))
3267 (native-inputs
3268 `(("python-pytest" ,python-pytest)))
3269 (home-page "https://joblib.readthedocs.io/")
3270 (synopsis "Using Python functions as pipeline jobs")
3271 (description
3272 "Joblib is a set of tools to provide lightweight pipelining in Python.
3273 In particular, joblib offers: transparent disk-caching of the output values
3274 and lazy re-evaluation (memoize pattern), easy simple parallel computing
3275 logging and tracing of the execution.")
3276 (license license:bsd-3)))
3277
3278 (define-public python2-joblib
3279 (package-with-python2 python-joblib))
3280
3281 (define-public python-daemon
3282 (package
3283 (name "python-daemon")
3284 (version "2.2.3")
3285 (source
3286 (origin
3287 (method url-fetch)
3288 (uri (pypi-uri "python-daemon" version))
3289 (sha256
3290 (base32
3291 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
3292 (build-system python-build-system)
3293 (arguments
3294 `(#:phases
3295 (modify-phases %standard-phases
3296 (add-before 'check 'disable-tests
3297 (lambda _
3298 ;; FIXME: Determine why test fails
3299 (substitute* "test/test_daemon.py"
3300 (("test_detaches_process_context")
3301 "skip_test_detaches_process_context"))
3302 #t)))))
3303 (propagated-inputs
3304 `(("python-lockfile" ,python-lockfile)))
3305 (native-inputs
3306 `(("python-unittest2" ,python-unittest2)
3307 ("python-testtools" ,python-testtools)
3308 ("python-testscenarios" ,python-testscenarios)
3309 ("python-mock" ,python-mock)
3310 ("python-docutils" ,python-docutils)))
3311 (home-page "https://pagure.io/python-daemon/")
3312 (synopsis "Python library for making a Unix daemon process")
3313 (description "Python-daemon is a library that assists a Python program to
3314 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
3315
3316 This library provides a @code{DaemonContext} class that manages the following
3317 important tasks for becoming a daemon process:
3318 @enumerate
3319 @item Detach the process into its own process group.
3320 @item Set process environment appropriate for running inside a chroot.
3321 @item Renounce suid and sgid privileges.
3322 @item Close all open file descriptors.
3323 @item Change the working directory, uid, gid, and umask.
3324 @item Set appropriate signal handlers.
3325 @item Open new file descriptors for stdin, stdout, and stderr.
3326 @item Manage a specified PID lock file.
3327 @item Register cleanup functions for at-exit processing.
3328 @end enumerate")
3329 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
3330 (license (list license:asl2.0 license:gpl3+))))
3331
3332 (define-public python-anytree
3333 (package
3334 (name "python-anytree")
3335 (version "2.8.0")
3336 (source (origin
3337 (method url-fetch)
3338 (uri (pypi-uri "anytree" version))
3339 (sha256
3340 (base32
3341 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
3342 (build-system python-build-system)
3343 (propagated-inputs
3344 `(("python-six" ,python-six)))
3345 (native-inputs
3346 `(;; For tests.
3347 ("graphviz" ,graphviz) ;for 'dot'
3348 ("python-nose" ,python-nose)))
3349 (home-page "https://github.com/c0fec0de/anytree")
3350 (synopsis "Lightweight tree data library")
3351 (description
3352 "@code{anytree} is a simple, lightweight, and extensible tree data
3353 structure for Python.")
3354 (license license:asl2.0)))
3355
3356 (define-public python-docutils
3357 (package
3358 (name "python-docutils")
3359 (version "0.16")
3360 (source
3361 (origin
3362 (method url-fetch)
3363 (uri (pypi-uri "docutils" version))
3364 (sha256
3365 (base32
3366 "1z3qliszqca9m719q3qhdkh0ghh90g500avzdgi7pl77x5h3mpn2"))))
3367 (build-system python-build-system)
3368 (arguments
3369 '(#:phases (modify-phases %standard-phases
3370 (replace 'check
3371 (lambda* (#:key tests? #:allow-other-keys)
3372 (if tests?
3373 (invoke "python" "test/alltests.py")
3374 (format #t "test suite not run~%"))
3375 #t)))))
3376 (home-page "http://docutils.sourceforge.net/")
3377 (synopsis "Python Documentation Utilities")
3378 (description
3379 "Docutils is a modular system for processing documentation into useful
3380 formats, such as HTML, XML, and LaTeX. For input Docutils supports
3381 reStructuredText.")
3382 ;; Most of the source code is public domain, but some source files are
3383 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
3384 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
3385
3386 (define-public python2-docutils
3387 (package-with-python2 python-docutils))
3388
3389 ;; python2-sphinx fails its test suite with newer versions.
3390 (define-public python2-docutils-0.14
3391 (package
3392 (inherit python2-docutils)
3393 (version "0.14")
3394 (source (origin
3395 (method url-fetch)
3396 (uri (pypi-uri "docutils" version))
3397 (sha256
3398 (base32
3399 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
3400
3401 (define-public python-restructuredtext-lint
3402 (package
3403 (name "python-restructuredtext-lint")
3404 (version "1.3.0")
3405 (source
3406 (origin
3407 (method url-fetch)
3408 (uri (pypi-uri "restructuredtext-lint" version))
3409 (sha256
3410 (base32
3411 "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
3412 (build-system python-build-system)
3413 (arguments
3414 `(#:phases
3415 (modify-phases %standard-phases
3416 (delete 'check)
3417 (add-after 'install 'check
3418 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3419 (when tests?
3420 (add-installed-pythonpath inputs outputs)
3421 (invoke "nosetests" "-v"))
3422 #t)))))
3423 (propagated-inputs
3424 `(("python-docutils" ,python-docutils)))
3425 (native-inputs
3426 `(("python-nose" ,python-nose)))
3427 (home-page "https://github.com/twolfson/restructuredtext-lint")
3428 (synopsis "reStructuredText linter")
3429 (description "This package provides a linter for the reStructuredText
3430 format.")
3431 (license license:unlicense)))
3432
3433 (define-public python-doc8
3434 (package
3435 (name "python-doc8")
3436 (version "0.8.0")
3437 (source
3438 (origin
3439 (method url-fetch)
3440 (uri (pypi-uri "doc8" version))
3441 (sha256
3442 (base32
3443 "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
3444 (build-system python-build-system)
3445 (arguments
3446 `(#:phases
3447 (modify-phases %standard-phases
3448 (delete 'check)
3449 (add-after 'install 'check
3450 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
3451 (when tests?
3452 (add-installed-pythonpath inputs outputs)
3453 (invoke "pytest" "-v"))
3454 #t)))))
3455 (propagated-inputs
3456 `(("python-chardet" ,python-chardet)
3457 ("python-docutils" ,python-docutils)
3458 ("python-restructuredtext-lint" ,python-restructuredtext-lint)
3459 ("python-six" ,python-six)
3460 ("python-stevedore" ,python-stevedore)))
3461 (native-inputs
3462 `(("python-testtools" ,python-testtools)
3463 ("python-pytest" ,python-pytest)))
3464 (home-page "https://launchpad.net/doc8")
3465 (synopsis
3466 "Style checker for Sphinx (or other) RST documentation")
3467 (description
3468 "Doc8 is an opinionated style checker for reStructured Text and plain
3469 text styles of documentation.")
3470 (license license:asl2.0)))
3471
3472 (define-public python-pygments
3473 (package
3474 (name "python-pygments")
3475 (version "2.5.2")
3476 (source
3477 (origin
3478 (method url-fetch)
3479 (uri (pypi-uri "Pygments" version))
3480 (sha256
3481 (base32
3482 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
3483 (build-system python-build-system)
3484 (arguments
3485 ;; FIXME: Tests require sphinx, which depends on this.
3486 '(#:tests? #f))
3487 (home-page "https://pygments.org/")
3488 (synopsis "Syntax highlighting")
3489 (description
3490 "Pygments is a syntax highlighting package written in Python.")
3491 (license license:bsd-2)))
3492
3493 (define-public python2-pygments
3494 (package-with-python2 python-pygments))
3495
3496 (define-public python-bumpversion
3497 (package
3498 (name "python-bumpversion")
3499 (version "0.5.3")
3500 (source
3501 (origin
3502 (method url-fetch)
3503 (uri (pypi-uri "bumpversion" version))
3504 (sha256
3505 (base32
3506 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
3507 (build-system python-build-system)
3508 (home-page "https://github.com/peritus/bumpversion")
3509 (synopsis "Tool to bump software version")
3510 (description "This tool provides a command-line interface (CLI) to bump a
3511 software version simply.")
3512 (license license:expat)))
3513
3514 (define-public python-deprecated
3515 (package
3516 (name "python-deprecated")
3517 (version "1.2.5")
3518 (source
3519 (origin
3520 (method git-fetch)
3521 (uri (git-reference
3522 (url "https://github.com/tantale/deprecated")
3523 (commit (string-append "v" version))))
3524 (file-name (git-file-name name version))
3525 (sha256
3526 (base32
3527 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
3528 (build-system python-build-system)
3529 (arguments
3530 `(#:phases (modify-phases %standard-phases
3531 (replace 'check
3532 (lambda _
3533 (invoke "pytest"))))))
3534 (propagated-inputs
3535 `(("python-wrapt" ,python-wrapt)))
3536 (native-inputs
3537 `(("python-bumpversion" ,python-bumpversion)
3538 ("python-pytest" ,python-pytest)
3539 ("python-pytest-cov" ,python-pytest-cov)
3540 ("python-sphinx" ,python-sphinx)
3541 ("python-tox" ,python-tox)))
3542 (home-page "https://github.com/tantale/deprecated")
3543 (synopsis "Python decorator to deprecate classes, functions or methods")
3544 (description "The @code{deprecated} decorator provides a convenient way to deprecate
3545 to deprecate classes, functions or methods.")
3546 (license license:expat)))
3547
3548 (define-public python-pygithub
3549 (package
3550 (name "python-pygithub")
3551 (version "1.43.8")
3552 (source
3553 ;; We fetch from the Git repo because there are no tests in the PyPI
3554 ;; archive.
3555 (origin
3556 (method git-fetch)
3557 (uri (git-reference
3558 (url "https://github.com/PyGithub/PyGithub")
3559 (commit (string-append "v" version))))
3560 (file-name (git-file-name name version))
3561 (sha256
3562 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
3563 (build-system python-build-system)
3564 (arguments
3565 `(#:phases (modify-phases %standard-phases
3566 ;; Some tests rely on the network.
3567 (add-after 'unpack 'disable-failing-tests
3568 (lambda _
3569 (substitute* "tests/Issue142.py"
3570 (("testDecodeJson") "disabled_testDecodeJson"))
3571 #t))
3572 (add-before 'check 'prepare-for-tests
3573 (lambda _
3574 (for-each (lambda (f)
3575 (chmod f #o666))
3576 (find-files "./tests"))
3577 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
3578 (setenv "PYTHONPATH"
3579 (string-append "./tests:" (getenv "PYTHONPATH")))
3580 #t)))))
3581 (propagated-inputs
3582 `(("python-deprecated" ,python-deprecated)
3583 ("python-pyjwt" ,python-pyjwt)
3584 ("python-requests" ,python-requests)))
3585 (native-inputs `(("python-httpretty" ,python-httpretty)))
3586 (home-page "https://pygithub.readthedocs.io/en/latest/")
3587 (synopsis "Python library for the GitHub API")
3588 (description "This library allows managing GitHub resources such as
3589 repositories, user profiles, and organizations in your Python applications,
3590 using version 3 of the GitHub application programming interface (API).")
3591 (license license:lgpl3+)))
3592
3593 (define-public python-rellu
3594 (package
3595 (name "python-rellu")
3596 (version "0.7")
3597 (source
3598 (origin
3599 (method url-fetch)
3600 (uri (pypi-uri "rellu" version))
3601 (sha256
3602 (base32
3603 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
3604 (build-system python-build-system)
3605 (propagated-inputs
3606 `(("python-invoke" ,python-invoke)
3607 ("python-pygithub" ,python-pygithub)))
3608 (home-page "https://github.com/robotframework/rellu")
3609 (synopsis "Utilities to create PyPI releases")
3610 (description "This collection of utilities contains tooling and templates
3611 to assist in creating releases on GitHub and publishing them on PyPI. It is
3612 designed to be used by Robot Framework and tools and libraries in its
3613 ecosystem, but can naturally be used also by other projects.")
3614 (license license:asl2.0)))
3615
3616 (define-public python-robotframework
3617 (package
3618 (name "python-robotframework")
3619 (version "3.1.2")
3620 ;; There are no tests in the PyPI archive.
3621 (source
3622 (origin
3623 (method git-fetch)
3624 (uri (git-reference
3625 (url "https://github.com/robotframework/robotframework")
3626 (commit (string-append "v" version))))
3627 (file-name (git-file-name name version))
3628 (sha256
3629 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
3630 (patches (search-patches
3631 "python-robotframework-honor-source-date-epoch.patch"))))
3632 (build-system python-build-system)
3633 (arguments
3634 `(#:phases (modify-phases %standard-phases
3635 (add-before 'build 'build-and-install-doc
3636 (lambda* (#:key outputs #:allow-other-keys)
3637 (let* ((doc-output (assoc-ref outputs "doc"))
3638 (doc (string-append doc-output "/share/"
3639 ,name "-" ,version "/")))
3640 (invoke "invoke" "library-docs" "all")
3641 (mkdir-p doc)
3642 (copy-recursively "doc/libraries"
3643 (string-append doc "/libraries"))
3644 #t)))
3645 (replace 'check
3646 (lambda _
3647 (invoke "python" "utest/run.py"))))))
3648 (native-inputs
3649 `(("python-invoke" ,python-invoke)
3650 ("python-rellu" ,python-rellu)
3651 ("python:tk" ,python "tk"))) ;used when building the HTML doc
3652 (outputs '("out" "doc"))
3653 (home-page "https://robotframework.org")
3654 (synopsis "Generic automation framework")
3655 (description "Robot Framework is a generic automation framework for
3656 acceptance testing, acceptance test driven development (ATDD), and robotic
3657 process automation (RPA).")
3658 (license license:asl2.0)))
3659
3660 (define-public python-robotframework-lint
3661 ;; There is no properly tagged release; the commit below seems to correspond
3662 ;; to the 0.9 stable release available from PyPI. The tests are not
3663 ;; included in the PyPI archive, so we fetch the sources from the upstream
3664 ;; Git repo.
3665 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
3666 (revision "1"))
3667 (package
3668 (name "python-robotframework-lint")
3669 (version (git-version "0.9.0" revision commit))
3670 (source
3671 (origin
3672 (method git-fetch)
3673 (uri (git-reference
3674 (url "https://github.com/boakley/robotframework-lint")
3675 (commit commit)))
3676 (file-name (git-file-name name version))
3677 (sha256
3678 (base32
3679 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
3680 (build-system python-build-system)
3681 (arguments
3682 `(#:phases
3683 (modify-phases %standard-phases
3684 (replace 'check
3685 (lambda _
3686 (invoke "python" "-m" "robot" "-A"
3687 "tests/conf/default.args" "tests"))))))
3688 (propagated-inputs
3689 `(("python-robotframework" ,python-robotframework)))
3690 (home-page "https://github.com/boakley/robotframework-lint/")
3691 (synopsis "Static analysis tool (linter) for Robot Framework")
3692 (description "This package provides the @code{rflint} command-line
3693 utility, a static analysis tool (linter) for Robot Framework source files.")
3694 (license license:asl2.0))))
3695
3696 (define-public python-robotframework-sshlibrary
3697 (package
3698 (name "python-robotframework-sshlibrary")
3699 (version "3.3.0")
3700 ;; There are no tests in the PyPI archive.
3701 (source
3702 (origin
3703 (method git-fetch)
3704 (uri (git-reference
3705 (url "https://github.com/robotframework/SSHLibrary")
3706 (commit (string-append "v" version))))
3707 (file-name (git-file-name name version))
3708 (sha256
3709 (base32
3710 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
3711 (build-system python-build-system)
3712 (arguments
3713 `(#:phases
3714 (modify-phases %standard-phases
3715 (add-before 'build 'build-and-install-doc
3716 (lambda* (#:key outputs #:allow-other-keys)
3717 (let* ((doc-output (assoc-ref outputs "doc"))
3718 (doc (string-append doc-output "/share/"
3719 ,name "-" ,version "/")))
3720 (invoke "chmod" "-R" "+w" "docs")
3721 (invoke "invoke" "kw-docs" "project-docs")
3722 (mkdir-p doc)
3723 (for-each delete-file (find-files "docs" "\\.rst"))
3724 (copy-recursively "docs" doc)
3725 #t)))
3726 (replace 'check
3727 (lambda _
3728 ;; Some tests require an SSH server; we remove them.
3729 (delete-file "utest/test_client_api.py")
3730 (delete-file "utest/test_scp.py")
3731 (invoke "python" "utest/run.py"))))))
3732 (propagated-inputs
3733 `(("python-robotframework" ,python-robotframework)
3734 ("python-paramiko" ,python-paramiko)
3735 ("python-scp" ,python-scp)))
3736 (native-inputs
3737 `(("openssh" ,openssh)
3738 ("which" ,which)
3739 ;; To generate the documentation
3740 ("python-docutils" ,python-docutils)
3741 ("python-invoke" ,python-invoke)
3742 ("python-pygments" ,python-pygments)
3743 ("python-rellu" ,python-rellu)))
3744 (outputs '("out" "doc"))
3745 (home-page "https://github.com/robotframework/SSHLibrary")
3746 (synopsis "Robot Framework library for SSH and SFTP")
3747 (description "SSHLibrary is a Robot Framework library providing support
3748 for SSH and SFTP. It has the following main usages:
3749 @itemize @bullet
3750 @item Executing commands on the remote machine, either blocking or non-blocking.
3751 @item Writing and reading in an interactive shell.
3752 @item Transferring files and directories over SFTP.
3753 @item Ensuring that files and directories exist on the remote machine.
3754 @end itemize")
3755 (license license:asl2.0)))
3756
3757 (define-public python-rstr
3758 (package
3759 (name "python-rstr")
3760 (version "2.2.6")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (pypi-uri "rstr" version))
3765 (sha256
3766 (base32
3767 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
3768 (build-system python-build-system)
3769 (home-page
3770 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
3771 (synopsis "Generate random strings in Python")
3772 (description "This package provides a python module for generating
3773 random strings of various types. It could be useful for fuzz testing,
3774 generating dummy data, or other applications. It has no dependencies
3775 outside the standard library.")
3776 (license license:bsd-3)))
3777
3778 (define-public python-scp
3779 (package
3780 (name "python-scp")
3781 (version "0.13.2")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (pypi-uri "scp" version))
3786 (sha256
3787 (base32
3788 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
3789 (build-system python-build-system)
3790 (arguments
3791 '(#:tests? #f)) ;tests require an SSH server
3792 (propagated-inputs
3793 `(("python-paramiko" ,python-paramiko)))
3794 (home-page "https://github.com/jbardin/scp.py")
3795 (synopsis "SCP protocol module for Python and Paramiko")
3796 (description "The scp module extends the Paramiko library to send and
3797 receive files via the SCP1 protocol, as implemented by the OpenSSH
3798 @command{scp} program.")
3799 (license license:gpl2+)))
3800
3801 (define-public python-rst.linker
3802 (package
3803 (name "python-rst.linker")
3804 (version "1.11")
3805 (source
3806 (origin
3807 (method url-fetch)
3808 (uri (pypi-uri "rst.linker" version))
3809 (sha256
3810 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3811 (build-system python-build-system)
3812 (propagated-inputs
3813 `(("python-dateutil" ,python-dateutil)
3814 ("python-six" ,python-six)))
3815 (native-inputs
3816 `(("python-setuptools-scm" ,python-setuptools-scm)))
3817 ;; Test would require path.py, which would introduce a cyclic dependence.
3818 (arguments `(#:tests? #f))
3819 ;; Note: As of version 1.7 the documentation is not worth building.
3820 (home-page "https://github.com/jaraco/rst.linker")
3821 (synopsis "Sphinx plugin to add links and timestamps")
3822 (description "rst.linker automatically replaces text by a
3823 reStructuredText external reference or timestamps. It's primary purpose is to
3824 augment the changelog, but it can be used for other documents, too.")
3825 (license license:expat)))
3826
3827 (define-public python2-rst.linker
3828 (package-with-python2 python-rst.linker))
3829
3830 (define-public python-feedgenerator
3831 (package
3832 (name "python-feedgenerator")
3833 (version "1.9")
3834 (source
3835 (origin
3836 (method url-fetch)
3837 (uri (pypi-uri "feedgenerator" version))
3838 (sha256
3839 (base32
3840 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3841 (modules '((guix build utils)))
3842 (snippet
3843 '(begin
3844 ;; Remove pre-compiled .pyc files from source.
3845 (for-each delete-file-recursively
3846 (find-files "." "__pycache__" #:directories? #t))
3847 (for-each delete-file (find-files "." "\\.pyc$"))
3848 #t))))
3849 (build-system python-build-system)
3850 (propagated-inputs
3851 `(("python-pytz" ,python-pytz)
3852 ("python-six" ,python-six)))
3853 (home-page "https://github.com/getpelican/feedgenerator")
3854 (synopsis
3855 "Standalone version of Django's Atom/RSS feed generator")
3856 (description
3857 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3858 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3859 (license license:bsd-3)))
3860
3861 (define-public python2-feedgenerator
3862 (package-with-python2 python-feedgenerator))
3863
3864 (define-public python-toml
3865 (package
3866 (name "python-toml")
3867 (version "0.10.1")
3868 (source
3869 (origin
3870 (method url-fetch)
3871 (uri (pypi-uri "toml" version))
3872 (sha256
3873 (base32
3874 "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj"))))
3875 (build-system python-build-system)
3876 (arguments
3877 `(#:tests? #f)) ;no tests suite in release
3878 (home-page "https://github.com/uiri/toml")
3879 (synopsis "Library for TOML")
3880 (description
3881 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3882 Language (TOML) configuration files.")
3883 (license license:expat)))
3884
3885 (define-public python-jsonrpc-server
3886 (package
3887 (name "python-jsonrpc-server")
3888 (version "0.3.4")
3889 (source
3890 (origin
3891 (method url-fetch)
3892 (uri (pypi-uri "python-jsonrpc-server" version))
3893 (sha256
3894 (base32
3895 "0dzya99nbi4mw7q85vmyw1wfgbx5dpmysnvm0bwx5m4xbi4zafy7"))))
3896 (build-system python-build-system)
3897 (propagated-inputs
3898 `(("python-mock" ,python-mock)
3899 ("python-pytest" ,python-pytest)
3900 ("python-ujson" ,python-ujson-1)))
3901 (home-page
3902 "https://github.com/palantir/python-jsonrpc-server")
3903 (synopsis "JSON RPC 2.0 server library")
3904 (description
3905 "This package provides a JSON RPC 2.0 server library for Python.")
3906 (license license:expat)))
3907
3908 (define-public python-pydantic
3909 (package
3910 (name "python-pydantic")
3911 (version "1.6.1")
3912 (source
3913 (origin
3914 (method git-fetch)
3915 (uri (git-reference
3916 (url "https://github.com/samuelcolvin/pydantic")
3917 (commit (string-append "v" version))))
3918 (file-name (git-file-name name version))
3919 (sha256
3920 (base32 "1380s9k77g6q15by9fkxndczjk89q6xpz09jdrqip535xws2z3j8"))))
3921 (build-system python-build-system)
3922 (arguments
3923 '(#:phases
3924 (modify-phases %standard-phases
3925 ;; Reported upstream:
3926 ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
3927 ;; Disable the faulty test as the fix is unclear.
3928 (add-before 'check 'disable-test
3929 (lambda _
3930 (substitute* "tests/test_validators.py"
3931 (("test_assert_raises_validation_error")
3932 "_test_assert_raises_validation_error"))
3933 #t))
3934 (replace 'check
3935 (lambda _ (invoke "pytest" "-vv" "tests"))))))
3936 (native-inputs
3937 `(("python-pytest" ,python-pytest)))
3938 (home-page "https://github.com/samuelcolvin/pydantic")
3939 (synopsis "Python data validation and settings management")
3940 (description
3941 "Pydantic enforces type hints at runtime, and provides user friendly
3942 errors when data is invalid.")
3943 (license license:expat)))
3944
3945 (define-public python-pydocstyle
3946 (package
3947 (name "python-pydocstyle")
3948 (version "3.0.0")
3949 (source
3950 (origin
3951 (method url-fetch)
3952 (uri (pypi-uri "pydocstyle" version))
3953 (sha256
3954 (base32
3955 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3956 (build-system python-build-system)
3957 (propagated-inputs
3958 `(("python-six" ,python-six)
3959 ("python-snowballstemmer" ,python-snowballstemmer)))
3960 (home-page
3961 "https://github.com/PyCQA/pydocstyle/")
3962 (synopsis "Python docstring style checker")
3963 (description
3964 "This package provides a style checker for the Python Language
3965 Server (PLS).")
3966 (license license:expat)))
3967
3968 (define-public python-language-server
3969 (package
3970 (name "python-language-server")
3971 (version "0.34.1")
3972 (source
3973 (origin
3974 (method url-fetch)
3975 (uri (pypi-uri "python-language-server" version))
3976 (sha256
3977 (base32
3978 "0gfjjlj7yg2nf8wkbrshwaljkwlqja4n7s1x949f495anmkg8vxr"))))
3979 (build-system python-build-system)
3980 (propagated-inputs
3981 `(("python-pluggy" ,python-pluggy)
3982 ("python-jsonrpc-server" ,python-jsonrpc-server)
3983 ("python-jedi" ,python-jedi)
3984 ("python-yapf" ,python-yapf)
3985 ("python-pyflakes" ,python-pyflakes)
3986 ("python-pydocstyle" ,python-pydocstyle)
3987 ("python-pycodestyle" ,python-pycodestyle)
3988 ("python-mccabe" ,python-mccabe)
3989 ("python-rope" ,python-rope)
3990 ("python-autopep8" ,python-autopep8)
3991 ("python-flake8" ,python-flake8)
3992 ("python-pylint" ,python-pylint)))
3993 (home-page "https://github.com/palantir/python-language-server")
3994 (synopsis "Python implementation of the Language Server Protocol")
3995 (description
3996 "The Python Language Server (pyls) is an implementation of the Python 3
3997 language specification for the Language Server Protocol (LSP). This tool is
3998 used in text editing environments to provide a complete and integrated
3999 feature-set for programming Python effectively.")
4000 (license license:expat)))
4001
4002 (define-public python-pathspec
4003 (package
4004 (name "python-pathspec")
4005 (version "0.7.0")
4006 (source
4007 (origin
4008 (method url-fetch)
4009 (uri (pypi-uri "pathspec" version))
4010 (sha256
4011 (base32
4012 "15lvs4awlg8xzl0l4gk9y53xx4yqmqvsv44pglv39m70y85afajn"))))
4013 (build-system python-build-system)
4014 (home-page "https://github.com/cpburnz/python-path-specification")
4015 (synopsis "Utility library for gitignore style pattern matching of file paths")
4016 (description
4017 "This package provides a utility library for gitignore style pattern
4018 matching of file paths.")
4019 (license license:mpl2.0)))
4020
4021 (define-public python-black
4022 (package
4023 (name "python-black")
4024 (version "19.10b0")
4025 (source
4026 (origin
4027 (method url-fetch)
4028 (uri (pypi-uri "black" version))
4029 (sha256
4030 (base32
4031 "0f8mr0yzj78q1dx7v6ggbgfir2wv0n5z2shfbbvfdq7910xbgvf2"))))
4032 (build-system python-build-system)
4033 (arguments
4034 `(#:phases
4035 (modify-phases %standard-phases
4036 (add-after 'patch-source-shebangs 'patch-extra-shebangs
4037 (lambda _
4038 (let ((python3 (which "python3")))
4039 (substitute* '("tests/data/fmtonoff.py"
4040 "tests/data/string_prefixes.py"
4041 "tests/data/function.py"
4042 "tests/data/python37.py")
4043 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
4044 (string-append "#!" python3 (if (string? minor-version)
4045 minor-version
4046 "")))))
4047 #t))
4048 (add-after 'unpack 'disable-broken-tests
4049 (lambda _
4050 ;; These tests are supposed to be skipped when the blackd
4051 ;; dependencies are missing, but this doesn't quite work.
4052 (substitute* "tests/test_black.py"
4053 (("( *)class BlackDTestCase.*" match indent)
4054 (string-append indent "@unittest.skip(\"no blackd deps\")\n"
4055 indent "class BlackDTestCase(unittest.TestCase):\n"))
4056 (("web.Application") "False")
4057 (("@unittest_run_loop") ""))
4058
4059 ;; Patching the above file breaks the self test
4060 (substitute* "tests/test_black.py"
4061 (("( *)def test_self" match indent)
4062 (string-append indent "@unittest.skip(\"guix\")\n" match)))
4063 #t)))))
4064 (propagated-inputs
4065 `(("python-click" ,python-click)
4066 ("python-attrs" ,python-attrs)
4067 ("python-appdirs" ,python-appdirs)
4068 ("python-pathspec" ,python-pathspec)
4069 ("python-regex" ,python-regex)
4070 ("python-toml" ,python-toml)
4071 ("python-typed-ast" ,python-typed-ast)))
4072 (native-inputs
4073 `(("python-setuptools-scm" ,python-setuptools-scm)))
4074 (home-page "https://github.com/ambv/black")
4075 (synopsis "The uncompromising code formatter")
4076 (description "Black is the uncompromising Python code formatter.")
4077 (license license:expat)))
4078
4079 (define-public python-blinker
4080 (package
4081 (name "python-blinker")
4082 (version "1.4")
4083 (source
4084 (origin
4085 (method url-fetch)
4086 (uri (pypi-uri "blinker" version))
4087 (sha256
4088 (base32
4089 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
4090 (build-system python-build-system)
4091 (home-page "https://pythonhosted.org/blinker/")
4092 (synopsis "Fast, simple object-to-object and broadcast signaling")
4093 (description
4094 "Blinker provides a fast dispatching system that allows any number of
4095 interested parties to subscribe to events, or \"signals\".")
4096 (license license:expat)))
4097
4098 (define-public python2-blinker
4099 (package-with-python2 python-blinker))
4100
4101 (define-public pelican
4102 (package
4103 (name "pelican")
4104 (version "4.2.0")
4105 (source
4106 (origin
4107 (method url-fetch)
4108 (uri (pypi-uri "pelican" version))
4109 (sha256
4110 (base32
4111 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
4112 (build-system python-build-system)
4113 (propagated-inputs
4114 `(("python-blinker" ,python-blinker)
4115 ("python-dateutil" ,python-dateutil)
4116 ("python-docutils" ,python-docutils)
4117 ("python-feedgenerator" ,python-feedgenerator)
4118 ("python-jinja2" ,python-jinja2)
4119 ("python-markdown" ,python-markdown)
4120 ("python-pygments" ,python-pygments)
4121 ("python-pytz" ,python-pytz)
4122 ("python-six" ,python-six)
4123 ("python-unidecode" ,python-unidecode)))
4124 (home-page "https://getpelican.com/")
4125 (arguments
4126 `(;; XXX Requires a lot more packages to do unit tests :P
4127 #:tests? #f))
4128 (synopsis "Python-based static site publishing system")
4129 (description
4130 "Pelican is a tool to generate a static blog from reStructuredText,
4131 Markdown input files, and more. Pelican uses Jinja2 for templating
4132 and is very extensible.")
4133 (license license:agpl3+)))
4134
4135 (define-public mallard-ducktype
4136 (package
4137 (name "mallard-ducktype")
4138 (version "1.0.2")
4139 (source
4140 (origin
4141 (method git-fetch)
4142 ;; git-reference because tests are not included in pypi source tarball
4143 ;; https://issues.guix.gnu.org/issue/36755#2
4144 (uri (git-reference
4145 (url "https://github.com/projectmallard/mallard-ducktype")
4146 (commit version)))
4147 (file-name (git-file-name name version))
4148 (sha256
4149 (base32
4150 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
4151 (build-system python-build-system)
4152 (arguments
4153 '(#:phases
4154 (modify-phases %standard-phases
4155 (replace 'check
4156 (lambda _
4157 (with-directory-excursion "tests"
4158 (invoke "sh" "runtests")))))))
4159 (home-page "http://projectmallard.org")
4160 (synopsis "Convert Ducktype to Mallard documentation markup")
4161 (description
4162 "Ducktype is a lightweight syntax that can represent all the semantics
4163 of the Mallard XML documentation system. Ducktype files can be converted to
4164 Mallard using the @command{ducktype} tool. The yelp-tools package
4165 provides additional functionality on the produced Mallard documents.")
4166 (license license:expat)))
4167
4168 (define-public python-cython
4169 (package
4170 (name "python-cython")
4171 (version "0.29.17")
4172 (source
4173 (origin
4174 (method url-fetch)
4175 (uri (pypi-uri "Cython" version))
4176 (sha256
4177 (base32
4178 "1wnaz40hdw4mg5acz5gqb6bhjhn4cvfxg0xdzfy7aa6qn665hqb3"))))
4179 (build-system python-build-system)
4180 ;; we need the full python package and not just the python-wrapper
4181 ;; because we need libpython3.3m.so
4182 (inputs
4183 `(("python" ,python)))
4184 (arguments
4185 `(#:phases
4186 (modify-phases %standard-phases
4187 (add-before 'check 'set-HOME
4188 ;; some tests require access to "$HOME/.cython"
4189 (lambda _ (setenv "HOME" "/tmp") #t))
4190 (replace 'check
4191 (lambda _
4192 ;; Disable compiler optimizations to greatly reduce the running
4193 ;; time of the test suite.
4194 (setenv "CFLAGS" "-O0")
4195
4196 (invoke "python" "runtests.py" "-vv"
4197 "-j" (number->string (parallel-job-count))
4198 ;; XXX: On 32-bit architectures, running the parallel tests
4199 ;; fails on many-core systems, see
4200 ;; <https://github.com/cython/cython/issues/2807>.
4201 ,@(if (not (target-64bit?))
4202 '("-x" "run.parallel")
4203 '())))))))
4204 (home-page "https://cython.org/")
4205 (synopsis "C extensions for Python")
4206 (description "Cython is an optimising static compiler for both the Python
4207 programming language and the extended Cython programming language. It makes
4208 writing C extensions for Python as easy as Python itself.")
4209 (license license:asl2.0)
4210 (properties `((python2-variant . ,(delay python2-cython))))))
4211
4212 (define-public python2-cython
4213 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
4214 (package
4215 (inherit base)
4216 (name "python2-cython")
4217 (inputs
4218 `(("python-2" ,python-2))) ;this is not automatically changed
4219 (arguments
4220 (substitute-keyword-arguments (package-arguments base)
4221 ((#:phases phases)
4222 `(modify-phases ,phases
4223 (add-before 'check 'adjust-test_embed
4224 (lambda _
4225 (substitute* "runtests.py"
4226 ;; test_embed goes great lengths to find the static libpythonX.Y.a
4227 ;; so it can give the right -L flag to GCC when embedding static
4228 ;; builds of Python. It is unaware that the Python "config"
4229 ;; directory (where the static library lives) was renamed in
4230 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
4231 ;; which works fine, because that is where the shared library is.
4232 ;;
4233 ;; It also appears to be unaware that the Makefile in Demos/embed
4234 ;; already unconditionally pass the static library location to GCC,
4235 ;; after checking sysconfig.get_config_var('LIBPL).
4236 ;;
4237 ;; The effect is that the linker is unable to resolve libexpat
4238 ;; symbols when building for Python 2, because neither the Python 2
4239 ;; shared library nor Expat is available. To fix it, we can either
4240 ;; add Expat as an input and make it visible to the linker, or just
4241 ;; prevent it from overriding the Python shared library location.
4242 ;; The end result is identical, so we take the easy route.
4243 ((" or libname not in os\\.listdir\\(libdir\\)")
4244 ""))
4245 #t)))))))))
4246
4247 ;; The RPython toolchain currently does not support Python 3.
4248 (define-public python2-rpython
4249 (package
4250 (name "python2-rpython")
4251 (version "0.2.1")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "rpython" version))
4256 (sha256
4257 (base32
4258 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
4259 (build-system python-build-system)
4260 (arguments `(#:python ,python-2))
4261 (native-inputs
4262 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
4263 (home-page "https://rpython.readthedocs.org")
4264 (synopsis "Framework for implementing interpreters and virtual machines")
4265 (description "RPython is a translation and support framework for
4266 producing implementations of dynamic languages, emphasizing a clean separation
4267 between language specification and implementation aspects.")
4268 (license license:expat)))
4269
4270 ;; NOTE: when upgrading numpy please make sure that python-pandas and
4271 ;; python-scipy still build, as these three packages are often used together.
4272 (define-public python-numpy
4273 (package
4274 (name "python-numpy")
4275 (version "1.17.3")
4276 (source
4277 (origin
4278 (method url-fetch)
4279 (uri (string-append
4280 "https://github.com/numpy/numpy/releases/download/v"
4281 version "/numpy-" version ".tar.gz"))
4282 (sha256
4283 (base32
4284 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
4285 (build-system python-build-system)
4286 (inputs
4287 `(("openblas" ,openblas)
4288 ("lapack" ,lapack)))
4289 (native-inputs
4290 `(("python-cython" ,python-cython)
4291 ("python-pytest" ,python-pytest)
4292 ("gfortran" ,gfortran)))
4293 (arguments
4294 `(#:phases
4295 (modify-phases %standard-phases
4296 (add-before 'build 'configure-blas-lapack
4297 (lambda* (#:key inputs #:allow-other-keys)
4298 (call-with-output-file "site.cfg"
4299 (lambda (port)
4300 (format port
4301 "[openblas]
4302 libraries = openblas
4303 library_dirs = ~a/lib
4304 include_dirs = ~a/include
4305
4306 # backslash-n to make emacs happy
4307 \n[lapack]
4308 lapack_libs = lapack
4309 library_dirs = ~a/lib
4310 include_dirs = ~a/include
4311 "
4312 (assoc-ref inputs "openblas")
4313 (assoc-ref inputs "openblas")
4314 (assoc-ref inputs "lapack")
4315 (assoc-ref inputs "lapack"))))
4316 #t))
4317 (add-before 'build 'fix-executable-paths
4318 (lambda* (#:key inputs #:allow-other-keys)
4319 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
4320 ;; instead of /bin/sh.
4321 (substitute* "numpy/distutils/exec_command.py"
4322 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
4323 (string-append match-start (assoc-ref inputs "bash") match-end)))
4324 ;; Use "gcc" executable, not "cc".
4325 (substitute* "numpy/distutils/system_info.py"
4326 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
4327 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
4328 #t))
4329 ;; Tests can only be run after the library has been installed and not
4330 ;; within the source directory.
4331 (delete 'check)
4332 (add-after 'install 'check
4333 (lambda* (#:key outputs inputs #:allow-other-keys)
4334 ;; Make installed package available for running the tests
4335 (add-installed-pythonpath inputs outputs)
4336 ;; Make sure "f2py" etc is found.
4337 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
4338 ":" (getenv "PATH")))
4339 (with-directory-excursion "/tmp"
4340 (invoke "python" "-c"
4341 "import numpy; numpy.test(verbose=2)")))))))
4342 (home-page "https://numpy.org")
4343 (synopsis "Fundamental package for scientific computing with Python")
4344 (description "NumPy is the fundamental package for scientific computing
4345 with Python. It contains among other things: a powerful N-dimensional array
4346 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4347 and Fortran code, useful linear algebra, Fourier transform, and random number
4348 capabilities.")
4349 (properties `((python2-variant . ,(delay python2-numpy))))
4350 (license license:bsd-3)))
4351
4352 ;; Numpy 1.16.x are the last versions that support Python 2.
4353 (define-public python2-numpy
4354 (let ((numpy (package-with-python2
4355 (strip-python2-variant python-numpy))))
4356 (package/inherit
4357 numpy
4358 (version "1.16.5")
4359 (source (origin
4360 (method url-fetch)
4361 (uri (string-append
4362 "https://github.com/numpy/numpy/releases/download/v"
4363 version "/numpy-" version ".tar.gz"))
4364 (sha256
4365 (base32
4366 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
4367
4368 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
4369 ;; interest only for legacy code going back to NumPy's predecessor
4370 ;; Numeric.
4371 (define-public python2-numpy-1.8
4372 (package (inherit python2-numpy)
4373 (version "1.8.2")
4374 (source
4375 (origin
4376 (method git-fetch)
4377 (uri (git-reference
4378 (url "https://github.com/numpy/numpy")
4379 (commit (string-append "v" version))))
4380 (file-name (git-file-name "numpy" version))
4381 (sha256
4382 (base32
4383 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
4384 (arguments
4385 (substitute-keyword-arguments (package-arguments python2-numpy)
4386 ((#:phases phases)
4387 `(modify-phases ,phases
4388 (replace 'configure-blas-lapack
4389 (lambda* (#:key inputs #:allow-other-keys)
4390 (call-with-output-file "site.cfg"
4391 (lambda (port)
4392 (format port
4393 "[openblas]
4394 libraries = openblas,lapack
4395 library_dirs = ~a/lib:~a/lib
4396 include_dirs = ~a/include:~a/include
4397 "
4398 (assoc-ref inputs "openblas")
4399 (assoc-ref inputs "lapack")
4400 (assoc-ref inputs "openblas")
4401 (assoc-ref inputs "lapack"))))
4402 #t))))))
4403 (native-inputs
4404 `(("python2-nose" ,python2-nose)))
4405 (description "NumPy is the fundamental package for scientific computing
4406 with Python. It contains among other things: a powerful N-dimensional array
4407 object, sophisticated (broadcasting) functions, tools for integrating C/C++
4408 and Fortran code, useful linear algebra, Fourier transform, and random number
4409 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
4410 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
4411 Numeric.")
4412 (license license:bsd-3)))
4413
4414 (define-public python-munch
4415 (package
4416 (name "python-munch")
4417 (version "2.0.4")
4418 (source
4419 (origin
4420 (method url-fetch)
4421 (uri (pypi-uri "munch" version))
4422 (sha256
4423 (base32
4424 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
4425 (build-system python-build-system)
4426 (home-page "https://github.com/Infinidat/munch")
4427 (synopsis "Dot-accessible dictionary")
4428 (description "Munch is a dot-accessible dictionary similar to JavaScript
4429 objects.")
4430 (license license:expat)))
4431
4432 (define-public python2-munch
4433 (package-with-python2 python-munch))
4434
4435 (define-public python-colormath
4436 (package
4437 (name "python-colormath")
4438 (version "3.0.0")
4439 (source
4440 (origin
4441 (method url-fetch)
4442 (uri (pypi-uri "colormath" version))
4443 (sha256
4444 (base32
4445 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
4446 (build-system python-build-system)
4447 (propagated-inputs
4448 `(("python-networkx" ,python-networkx)
4449 ("python-numpy" ,python-numpy)))
4450 (home-page "https://github.com/gtaylor/python-colormath")
4451 (synopsis "Color math and conversion library")
4452 (description
4453 "This is a Python library for color math and conversions.")
4454 (license license:bsd-3)))
4455
4456 (define-public python2-colormath
4457 (package-with-python2 python-colormath))
4458
4459 (define-public python-spectra
4460 (package
4461 (name "python-spectra")
4462 (version "0.0.11")
4463 (source
4464 (origin
4465 (method url-fetch)
4466 (uri (pypi-uri "spectra" version))
4467 (sha256
4468 (base32
4469 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
4470 (build-system python-build-system)
4471 (arguments
4472 `(#:phases
4473 (modify-phases %standard-phases
4474 (replace 'check
4475 (lambda _ (invoke "nosetests" "-v"))))))
4476 (propagated-inputs
4477 `(("python-colormath" ,python-colormath)))
4478 (native-inputs
4479 `(("python-nose" ,python-nose)))
4480 (home-page "https://github.com/jsvine/spectra")
4481 (synopsis "Color scales and color conversion")
4482 (description
4483 "This package provides a Python library intended to make color math,
4484 color scales, and color space conversion easy. It has support for:
4485
4486 @enumerate
4487 @item Color scales
4488 @item Color ranges
4489 @item Color blending
4490 @item Brightening/darkening colors
4491 @item Saturating/desaturating colors
4492 @item Conversion to/from multiple color spaces.
4493 @end enumerate\n")
4494 (license license:expat)))
4495
4496 (define-public python2-spectra
4497 (package-with-python2 python-spectra))
4498
4499 (define-public python-numpy-documentation
4500 (package
4501 (name "python-numpy-documentation")
4502 (version (package-version python-numpy))
4503 (source (package-source python-numpy))
4504 (build-system python-build-system)
4505 (native-inputs
4506 `(("python-matplotlib" ,python-matplotlib)
4507 ("python-numpy" ,python-numpy)
4508 ("pkg-config" ,pkg-config)
4509 ("python-sphinx" ,python-sphinx)
4510 ("python-numpydoc" ,python-numpydoc)
4511 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
4512 texlive-fonts-ec
4513 texlive-generic-ifxetex
4514 texlive-generic-pdftex
4515 texlive-amsfonts
4516 texlive-latex-capt-of
4517 texlive-latex-cmap
4518 texlive-latex-environ
4519 texlive-latex-eqparbox
4520 texlive-latex-etoolbox
4521 texlive-latex-expdlist
4522 texlive-latex-fancyhdr
4523 texlive-latex-fancyvrb
4524 texlive-latex-fncychap
4525 texlive-latex-float
4526 texlive-latex-framed
4527 texlive-latex-geometry
4528 texlive-latex-graphics
4529 texlive-latex-hyperref
4530 texlive-latex-mdwtools
4531 texlive-latex-multirow
4532 texlive-latex-needspace
4533 texlive-latex-oberdiek
4534 texlive-latex-parskip
4535 texlive-latex-preview
4536 texlive-latex-tabulary
4537 texlive-latex-threeparttable
4538 texlive-latex-titlesec
4539 texlive-latex-trimspaces
4540 texlive-latex-ucs
4541 texlive-latex-upquote
4542 texlive-latex-url
4543 texlive-latex-varwidth
4544 texlive-latex-wrapfig)))
4545 ("texinfo" ,texinfo)
4546 ("perl" ,perl)
4547 ("scipy-sphinx-theme"
4548 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
4549 (method git-fetch)
4550 (uri (git-reference
4551 (url "https://github.com/scipy/scipy-sphinx-theme")
4552 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
4553 (sha256
4554 (base32
4555 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
4556 ,@(package-native-inputs python-numpy)))
4557 (arguments
4558 `(#:tests? #f ; we're only generating the documentation
4559 #:phases
4560 (modify-phases %standard-phases
4561 (delete 'build)
4562 (replace 'install
4563 (lambda* (#:key inputs outputs #:allow-other-keys)
4564 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4565 (doc (string-append
4566 data "/doc/" ,name "-"
4567 ,(package-version python-numpy)))
4568 (info-reader (string-append data "/info"))
4569 (html (string-append doc "/html"))
4570 (scipy-sphinx-theme "scipy-sphinx-theme")
4571 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
4572 (pyver ,(string-append "PYVER=")))
4573
4574 ;; FIXME: this is needed to for texlive-union to generate
4575 ;; fonts, which are not found.
4576 (setenv "HOME" "/tmp")
4577
4578 (with-directory-excursion "doc"
4579 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
4580 (mkdir-p html)
4581 (invoke "make" "html" pyver)
4582 (invoke "make" "latex" "PAPER=a4" pyver)
4583 (invoke "make" "-C" "build/latex"
4584 "all-pdf" "PAPER=a4" pyver)
4585 ;; FIXME: Generation of the info file fails.
4586 ;; (invoke "make" "info" pyver)
4587 ;; (mkdir-p info)
4588 ;; (copy-file "build/texinfo/numpy.info"
4589 ;; (string-append info "/numpy.info"))
4590 (for-each (lambda (file)
4591 (copy-file (string-append "build/latex" file)
4592 (string-append doc file)))
4593 '("/numpy-ref.pdf" "/numpy-user.pdf"))
4594 (with-directory-excursion "build/html"
4595 (for-each (lambda (file)
4596 (let* ((dir (dirname file))
4597 (tgt-dir (string-append html "/" dir)))
4598 (unless (equal? "." dir)
4599 (mkdir-p tgt-dir))
4600 (install-file file html)))
4601 (find-files "." ".*")))))
4602 #t)))))
4603 (home-page (package-home-page python-numpy))
4604 (synopsis "Documentation for the python-numpy package")
4605 (description (package-description python-numpy))
4606 (license (package-license python-numpy))))
4607
4608 (define-public python2-numpy-documentation
4609 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
4610 (package
4611 (inherit numpy-documentation)
4612 (native-inputs `(("python2-functools32" ,python2-functools32)
4613 ,@(package-native-inputs numpy-documentation))))))
4614
4615 (define-public python-pygit2
4616 (package
4617 (name "python-pygit2")
4618 (version "1.1.0")
4619 (source
4620 (origin
4621 (method url-fetch)
4622 (uri (pypi-uri "pygit2" version))
4623 (sha256
4624 (base32 "1hs0pqqzn1yjxqk86nq7p0lvsklwnlyi5xwyzr7d5nrs19dmsjbg"))))
4625 (build-system python-build-system)
4626 (arguments
4627 '(#:tests? #f)) ; tests don't run correctly in our environment
4628 (propagated-inputs
4629 `(("python-cached-property" ,python-cached-property)
4630 ("python-cffi" ,python-cffi)
4631 ("libgit2" ,libgit2)))
4632 (native-inputs
4633 `(("python-pytest" ,python-pytest)))
4634 (home-page "https://github.com/libgit2/pygit2")
4635 (synopsis "Python bindings for libgit2")
4636 (description "Pygit2 is a set of Python bindings to the libgit2 shared
4637 library, libgit2 implements Git plumbing.")
4638 ;; GPL2.0 only, with linking exception.
4639 (license license:gpl2)))
4640
4641 (define-public python-patiencediff
4642 (package
4643 (name "python-patiencediff")
4644 (version "0.2.0")
4645 (source
4646 (origin
4647 (method url-fetch)
4648 (uri (pypi-uri "patiencediff" version))
4649 (sha256
4650 (base32
4651 "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
4652 (build-system python-build-system)
4653 (home-page "https://www.breezy-vcs.org/")
4654 (synopsis "Python implementation of the patiencediff algorithm")
4655 (description
4656 "This package contains a Python implementation of the @code{patiencediff}
4657 algorithm. Patiencediff provides a good balance of performance, nice output for
4658 humans, and implementation simplicity.")
4659 (license license:gpl2)))
4660
4661 (define-public python-pyparsing
4662 (package
4663 (name "python-pyparsing")
4664 (version "2.4.6")
4665 (source
4666 (origin
4667 (method url-fetch)
4668 (uri (pypi-uri "pyparsing" version))
4669 (sha256
4670 (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc"))))
4671 (build-system python-build-system)
4672 (outputs '("out" "doc"))
4673 (arguments
4674 `(#:tests? #f ; no test target
4675 #:phases
4676 (modify-phases %standard-phases
4677 (add-after 'install 'install-doc
4678 (lambda* (#:key outputs #:allow-other-keys)
4679 (let* ((doc (string-append (assoc-ref outputs "doc")
4680 "/share/doc/" ,name "-" ,version))
4681 (html-doc (string-append doc "/html"))
4682 (examples (string-append doc "/examples")))
4683 (mkdir-p html-doc)
4684 (mkdir-p examples)
4685 (for-each
4686 (lambda (dir tgt)
4687 (map (lambda (file)
4688 (install-file file tgt))
4689 (find-files dir ".*")))
4690 (list "docs" "htmldoc" "examples")
4691 (list doc html-doc examples))
4692 #t))))))
4693 (home-page "https://github.com/pyparsing/pyparsing")
4694 (synopsis "Python parsing class library")
4695 (description
4696 "The pyparsing module is an alternative approach to creating and
4697 executing simple grammars, vs. the traditional lex/yacc approach, or the use
4698 of regular expressions. The pyparsing module provides a library of classes
4699 that client code uses to construct the grammar directly in Python code.")
4700 (license license:expat)))
4701
4702 (define-public python2-pyparsing
4703 (package-with-python2 python-pyparsing))
4704
4705 (define-public python-pyparsing-2.4.7
4706 (package
4707 (inherit python-pyparsing)
4708 (version "2.4.7")
4709 (source
4710 (origin
4711 (method url-fetch)
4712 (uri (pypi-uri "pyparsing" version))
4713 (sha256
4714 (base32 "1hgc8qrbq1ymxbwfbjghv01fm3fbpjwpjwi0bcailxxzhf3yq0y2"))))))
4715
4716 (define-public python-numpydoc
4717 (package
4718 (name "python-numpydoc")
4719 (version "0.8.0")
4720 (source
4721 (origin
4722 (method url-fetch)
4723 (uri (pypi-uri "numpydoc" version))
4724 (sha256
4725 (base32
4726 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
4727 (build-system python-build-system)
4728 (propagated-inputs
4729 `(("python-sphinx" ,python-sphinx)))
4730 (native-inputs
4731 `(("python-nose" ,python-nose)))
4732 (home-page "https://pypi.org/project/numpydoc/")
4733 (synopsis
4734 "Numpy's Sphinx extensions")
4735 (description
4736 "Sphinx extension to support docstrings in Numpy format.")
4737 (license license:bsd-2)))
4738
4739 (define-public python2-numpydoc
4740 (package-with-python2 python-numpydoc))
4741
4742 (define-public python-numexpr
4743 (package
4744 (name "python-numexpr")
4745 (version "2.6.5")
4746 (source
4747 (origin
4748 (method url-fetch)
4749 (uri (pypi-uri "numexpr" version))
4750 (sha256
4751 (base32
4752 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
4753 (build-system python-build-system)
4754 (arguments `(#:tests? #f)) ; no tests included
4755 (propagated-inputs
4756 `(("python-numpy" ,python-numpy)))
4757 (home-page "https://github.com/pydata/numexpr")
4758 (synopsis "Fast numerical expression evaluator for NumPy")
4759 (description
4760 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
4761 expressions that operate on arrays are accelerated and use less memory than
4762 doing the same calculation in Python. In addition, its multi-threaded
4763 capabilities can make use of all your cores, which may accelerate
4764 computations, most specially if they are not memory-bounded (e.g. those using
4765 transcendental functions).")
4766 (license license:expat)))
4767
4768 (define-public python2-numexpr
4769 (package-with-python2 python-numexpr))
4770
4771 (define-public python-cycler
4772 (package
4773 (name "python-cycler")
4774 (version "0.10.0")
4775 (source (origin
4776 (method url-fetch)
4777 (uri (pypi-uri "cycler" version))
4778 (sha256
4779 (base32
4780 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
4781 (build-system python-build-system)
4782 (arguments
4783 ;; XXX: The current version requires 'coveralls' which we don't have.
4784 ;; Enable this for the next release which uses 'python-pytest'.
4785 '(#:tests? #f))
4786 (propagated-inputs
4787 `(("python-six" ,python-six)))
4788 (home-page "http://matplotlib.org/cycler/")
4789 (synopsis "Composable keyword argument iterator")
4790 (description
4791 "When using @code{matplotlib} and plotting more than one line, it is
4792 common to want to be able to want to be able to cycle over one or more artist
4793 styles; but the plotting logic can quickly become involved.
4794 To address this and enable easy cycling over arbitrary @code{kwargs}, the
4795 @code{Cycler} class was developed.")
4796 (license license:bsd-3)))
4797
4798 (define-public python2-cycler
4799 (package-with-python2 python-cycler))
4800
4801 (define-public python-colorspacious
4802 (package
4803 (name "python-colorspacious")
4804 (version "1.1.2")
4805 (source
4806 (origin
4807 (method git-fetch)
4808 (uri (git-reference
4809 (url "https://github.com/njsmith/colorspacious")
4810 (commit (string-append "v" version))))
4811 (file-name (git-file-name name version))
4812 (sha256
4813 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
4814 (build-system python-build-system)
4815 (propagated-inputs
4816 `(("python-numpy" ,python-numpy)))
4817 (native-inputs
4818 `(("python-nose" ,python-nose)))
4819 (arguments
4820 `(#:phases
4821 (modify-phases %standard-phases
4822 (replace 'check
4823 (lambda _
4824 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
4825 (home-page "https://github.com/njsmith/colorspacious")
4826 (synopsis "Python library for colorspace conversions")
4827 (description "@code{colorspacious} is a Python library that lets you
4828 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
4829 (license license:expat)))
4830
4831 (define-public python2-colorspacious
4832 (package-with-python2 python-colorspacious))
4833
4834 (define-public python-matplotlib
4835 (package
4836 (name "python-matplotlib")
4837 (version "3.1.2")
4838 (source
4839 (origin
4840 (method url-fetch)
4841 (uri (pypi-uri "matplotlib" version))
4842 (sha256
4843 (base32
4844 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
4845 (build-system python-build-system)
4846 (propagated-inputs ; the following packages are all needed at run time
4847 `(("python-cycler" ,python-cycler)
4848 ("python-kiwisolver" ,python-kiwisolver)
4849 ("python-pyparsing" ,python-pyparsing)
4850 ("python-pygobject" ,python-pygobject)
4851 ("gobject-introspection" ,gobject-introspection)
4852 ("python-tkinter" ,python "tk")
4853 ("python-dateutil" ,python-dateutil)
4854 ("python-numpy" ,python-numpy)
4855 ("python-pillow" ,python-pillow)
4856 ("python-pytz" ,python-pytz)
4857 ("python-six" ,python-six)
4858 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
4859 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
4860 ;; object. For this reason we need to import both libraries.
4861 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
4862 ("python-pycairo" ,python-pycairo)
4863 ("python-cairocffi" ,python-cairocffi)))
4864 (inputs
4865 `(("libpng" ,libpng)
4866 ("imagemagick" ,imagemagick)
4867 ("freetype" ,freetype)
4868 ("cairo" ,cairo)
4869 ("glib" ,glib)
4870 ;; FIXME: Add backends when available.
4871 ;("python-wxpython" ,python-wxpython)
4872 ("tcl" ,tcl)
4873 ("tk" ,tk)))
4874 (native-inputs
4875 `(("pkg-config" ,pkg-config)
4876 ("python-pytest" ,python-pytest)
4877 ("python-mock" ,python-mock)
4878 ("unzip" ,unzip)
4879 ("jquery-ui"
4880 ,(origin
4881 (method url-fetch)
4882 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4883 (sha256
4884 (base32
4885 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4886 (arguments
4887 `(#:phases
4888 (modify-phases %standard-phases
4889 ;; XXX We disable all image comparison tests because we're using a
4890 ;; newer version of FreeType than matplotlib expects. This leads to
4891 ;; minor differences throughout the tests.
4892 (add-after 'unpack 'fix-and-disable-failing-tests
4893 (lambda _
4894 (substitute* (append (find-files "lib/matplotlib/tests/"
4895 "test_.*\\.py$")
4896 (find-files "lib/mpl_toolkits/tests"
4897 "test_.*\\.py$"))
4898 (("^from matplotlib" match)
4899 (string-append "import pytest\n" match))
4900 (("( *)@image_comparison" match indent)
4901 (string-append indent
4902 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4903 match)))
4904 (substitute* "lib/matplotlib/tests/test_animation.py"
4905 (("/bin/sh") (which "sh")))
4906 (for-each delete-file
4907 ;; test_normal_axes, test_get_tightbbox_polar
4908 '("lib/matplotlib/tests/test_axes.py"
4909 ;; We don't use the webagg backend and this test forces it.
4910 "lib/matplotlib/tests/test_backend_webagg.py"
4911 ;; test_outward_ticks
4912 "lib/matplotlib/tests/test_tightlayout.py"
4913 ;; test_hidden_axes fails with minor extent
4914 ;; differences, possibly due to the use of a
4915 ;; different version of FreeType.
4916 "lib/matplotlib/tests/test_constrainedlayout.py"
4917 ;; Fontconfig returns no fonts.
4918 "lib/matplotlib/tests/test_font_manager.py"))
4919 #t))
4920 (add-before 'install 'install-jquery-ui
4921 (lambda* (#:key outputs inputs #:allow-other-keys)
4922 (let ((dir (string-append (assoc-ref outputs "out")
4923 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4924 (mkdir-p dir)
4925 (invoke "unzip"
4926 (assoc-ref inputs "jquery-ui")
4927 "-d" dir))
4928 #t))
4929 (replace 'check
4930 (lambda* (#:key outputs inputs #:allow-other-keys)
4931 (add-installed-pythonpath inputs outputs)
4932 (invoke "python" "tests.py" "-v"
4933 "-m" "not network and not webagg")))
4934 (add-before 'build 'configure-environment
4935 (lambda* (#:key outputs inputs #:allow-other-keys)
4936 (let ((cairo (assoc-ref inputs "cairo")))
4937 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4938 ;; has not effect.
4939 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4940 (setenv "HOME" (getcwd))
4941 (call-with-output-file "setup.cfg"
4942 (lambda (port)
4943 (format port "[directories]~%
4944 basedirlist = ~a,~a~%
4945 [packages]~%
4946 tests = True~%"
4947 (assoc-ref inputs "tcl")
4948 (assoc-ref inputs "tk")))))
4949 #t)))))
4950 (home-page "https://matplotlib.org/")
4951 (synopsis "2D plotting library for Python")
4952 (description
4953 "Matplotlib is a Python 2D plotting library which produces publication
4954 quality figures in a variety of hardcopy formats and interactive environments
4955 across platforms. Matplotlib can be used in Python scripts, the python and
4956 ipython shell, web application servers, and six graphical user interface
4957 toolkits.")
4958 (license license:psfl)
4959 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4960
4961 (define-public python2-matplotlib
4962 (let ((matplotlib (package-with-python2
4963 (strip-python2-variant python-matplotlib))))
4964 (package (inherit matplotlib)
4965 (version "2.2.4")
4966 (source
4967 (origin
4968 (method url-fetch)
4969 (uri (pypi-uri "matplotlib" version))
4970 (sha256
4971 (base32
4972 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4973 (arguments
4974 (substitute-keyword-arguments (package-arguments matplotlib)
4975 ((#:phases phases)
4976 `(modify-phases ,phases
4977 (replace 'install-jquery-ui
4978 (lambda* (#:key outputs inputs #:allow-other-keys)
4979 (let ((dir (string-append (assoc-ref outputs "out")
4980 "/lib/python2.7/site-packages/"
4981 "matplotlib/backends/web_backend/")))
4982 (mkdir-p dir)
4983 (invoke "unzip"
4984 (assoc-ref inputs "jquery-ui")
4985 "-d" dir))
4986 #t))
4987 (delete 'fix-and-disable-failing-tests)
4988 (delete 'check))))) ; These tests weren't run the the past.
4989 ;; Make sure to use special packages for Python 2 instead
4990 ;; of those automatically rewritten by package-with-python2.
4991 (propagated-inputs
4992 `(("python2-pycairo" ,python2-pycairo)
4993 ("python2-backports-functools-lru-cache"
4994 ,python2-backports-functools-lru-cache)
4995 ("python2-functools32" ,python2-functools32)
4996 ("python2-pygobject-2" ,python2-pygobject-2)
4997 ("python2-subprocess32" ,python2-subprocess32)
4998 ("python2-tkinter" ,python-2 "tk")
4999 ,@(fold alist-delete (package-propagated-inputs matplotlib)
5000 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
5001
5002 (define-public python-matplotlib-documentation
5003 (package
5004 (name "python-matplotlib-documentation")
5005 (version (package-version python-matplotlib))
5006 (source (package-source python-matplotlib))
5007 (build-system python-build-system)
5008 (native-inputs
5009 `(("python-matplotlib" ,python-matplotlib)
5010 ("python-colorspacious" ,python-colorspacious)
5011 ("python-sphinx" ,python-sphinx)
5012 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
5013 ("python-sphinx-gallery" ,python-sphinx-gallery)
5014 ("python-numpydoc" ,python-numpydoc)
5015 ("python-ipython" ,python-ipython)
5016 ("python-ipykernel" ,python-ipykernel)
5017 ("python-mock" ,python-mock)
5018 ("graphviz" ,graphviz)
5019 ("texlive" ,(texlive-union (list texlive-amsfonts
5020 texlive-latex-amsmath
5021 texlive-latex-enumitem
5022 texlive-latex-expdlist
5023 texlive-latex-geometry
5024 texlive-latex-preview
5025 texlive-latex-type1cm
5026 texlive-latex-ucs
5027
5028 texlive-generic-pdftex
5029
5030 texlive-fonts-ec
5031 texlive-fonts-adobe-times
5032 texlive-fonts-txfonts)))
5033 ("texinfo" ,texinfo)
5034 ,@(package-native-inputs python-matplotlib)))
5035 (arguments
5036 `(#:tests? #f ; we're only generating documentation
5037 #:phases
5038 (modify-phases %standard-phases
5039 ;; The tests in python-matplotlib are run after the install phase, so
5040 ;; we need to delete the extra phase here.
5041 (delete 'check)
5042 (replace 'build
5043 (lambda _
5044 (chdir "doc")
5045 (setenv "PYTHONPATH"
5046 (string-append (getenv "PYTHONPATH")
5047 ":" (getcwd) "/../examples/units"))
5048 (substitute* "conf.py"
5049 ;; Don't use git.
5050 (("^SHA = check_output.*")
5051 (string-append "SHA = \"" ,version "\"\n"))
5052 ;; Don't fetch intersphinx files from the Internet
5053 (("^explicit_order_folders" m)
5054 (string-append "intersphinx_mapping = {}\n" m))
5055 (("'sphinx.ext.intersphinx',") "")
5056 ;; Disable URL embedding which requires internet access.
5057 (("'https://docs.scipy.org/doc/numpy'") "None")
5058 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
5059 (invoke "make"
5060 "SPHINXBUILD=sphinx-build"
5061 "SPHINXOPTS=" ; don't abort on warnings
5062 "html" "texinfo")))
5063 (replace 'install
5064 (lambda* (#:key inputs outputs #:allow-other-keys)
5065 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5066 (doc (string-append data "/doc/python-matplotlib-" ,version))
5067 (info (string-append data "/info"))
5068 (html (string-append doc "/html")))
5069 (mkdir-p html)
5070 (mkdir-p info)
5071 (copy-recursively "build/html" html)
5072 (symlink (string-append html "/_images")
5073 (string-append info "/matplotlib-figures"))
5074 (with-directory-excursion "build/texinfo"
5075 (substitute* "matplotlib.texi"
5076 (("@image\\{([^,]*)" all file)
5077 (string-append "@image{matplotlib-figures/" file)))
5078 (symlink (string-append html "/_images")
5079 "./matplotlib-figures")
5080 (invoke "makeinfo" "--no-split"
5081 "-o" "matplotlib.info" "matplotlib.texi"))
5082 (install-file "build/texinfo/matplotlib.info" info))
5083 #t)))))
5084 (home-page (package-home-page python-matplotlib))
5085 (synopsis "Documentation for the python-matplotlib package")
5086 (description (package-description python-matplotlib))
5087 (license (package-license python-matplotlib))))
5088
5089 (define-public python2-matplotlib-documentation
5090 (let ((parent (package-with-python2 python-matplotlib-documentation)))
5091 (package
5092 (inherit parent)
5093 (native-inputs
5094 (alist-delete "python-sphinx-copybutton"
5095 (package-native-inputs parent))))))
5096
5097 (define-public python-matplotlib-venn
5098 (package
5099 (name "python-matplotlib-venn")
5100 (version "0.11.5")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "matplotlib-venn" version ".zip"))
5105 (sha256
5106 (base32
5107 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
5108 (build-system python-build-system)
5109 (arguments '(#:tests? #f)) ; tests are not included
5110 (propagated-inputs
5111 `(("python-matplotlib" ,python-matplotlib)
5112 ("python-numpy" ,python-numpy)
5113 ("python-scipy" ,python-scipy)))
5114 (native-inputs
5115 `(("unzip" ,unzip)))
5116 (home-page "https://github.com/konstantint/matplotlib-venn")
5117 (synopsis "Plot area-proportional Venn diagrams")
5118 (description
5119 "This package provides tools for plotting area-proportional two- and
5120 three-way Venn diagrams in @code{matplotlib}.")
5121 (license license:expat)))
5122
5123 (define-public python-pysnptools
5124 (package
5125 (name "python-pysnptools")
5126 (version "0.4.11")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (pypi-uri "pysnptools" version))
5131 (sha256
5132 (base32
5133 "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
5134 (build-system python-build-system)
5135 (arguments
5136 `(#:tests? #f ; no test data are included
5137 #:phases
5138 (modify-phases %standard-phases
5139 (replace 'check
5140 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5141 (if tests?
5142 (begin
5143 (add-installed-pythonpath inputs outputs)
5144 (invoke "python3" "pysnptools/test.py"))
5145 #t))))))
5146 (propagated-inputs
5147 `(("python-dill" ,python-dill)
5148 ("python-h5py" ,python-h5py)
5149 ("python-numpy" ,python-numpy)
5150 ("python-pandas" ,python-pandas)
5151 ("python-psutil" ,python-psutil)
5152 ("python-scipy" ,python-scipy)))
5153 (native-inputs
5154 `(("python-cython" ,python-cython)))
5155 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
5156 (synopsis "Library for reading and manipulating genetic data")
5157 (description
5158 "PySnpTools is a library for reading and manipulating genetic data. It
5159 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
5160 those files. It can also efficiently manipulate ranges of integers using set
5161 operators such as union, intersection, and difference.")
5162 (license license:asl2.0)))
5163
5164 (define-public python2-pysnptools
5165 (package-with-python2 python-pysnptools))
5166
5167 (define-public python-wurlitzer
5168 (package
5169 (name "python-wurlitzer")
5170 (version "2.0.1")
5171 (source
5172 (origin
5173 (method url-fetch)
5174 (uri (pypi-uri "wurlitzer" version))
5175 (sha256
5176 (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
5177 (build-system python-build-system)
5178 (arguments
5179 '(#:phases
5180 (modify-phases %standard-phases
5181 (replace 'check
5182 (lambda _
5183 (invoke "pytest" "-vv" "test.py"))))))
5184 (native-inputs
5185 `(("python-mock" ,python-mock)
5186 ("python-pytest" ,python-pytest)))
5187 (home-page "https://github.com/minrk/wurlitzer")
5188 (synopsis "Capture C-level output in context managers")
5189 (description
5190 "This library helps to redirect @code{sys.stdout} to a stream or a file
5191 while executing some piece of code, including C code running within a Python
5192 process.")
5193 (license license:expat)))
5194
5195 (define-public python-socksipy-branch
5196 (package
5197 (name "python-socksipy-branch")
5198 (version "1.01")
5199 (source
5200 (origin
5201 (method url-fetch)
5202 (uri (pypi-uri "SocksiPy-branch" version))
5203 (sha256
5204 (base32
5205 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
5206 (build-system python-build-system)
5207 (arguments
5208 `(#:tests? #f)) ; There are no tests
5209 (home-page "https://code.google.com/archive/p/socksipy-branch/")
5210 (synopsis "Python SOCKS module")
5211 (description
5212 "SocksiPy - A Python SOCKS client module. It provides a
5213 socket-like interface that supports connections to any TCP
5214 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
5215 The original version was developed by Dan Haim, this is a
5216 branch created by Mario Vilas to address some open issues,
5217 as the original project seems to have been abandoned circa 2007.")
5218 (license license:bsd-3)))
5219
5220 (define-public python2-socksipy-branch
5221 (package-with-python2 python-socksipy-branch))
5222
5223 (define-public python-socksipychain
5224 (package
5225 (name "python-socksipychain")
5226 (version "2.1.2")
5227 (source
5228 (origin
5229 (method git-fetch)
5230 (uri (git-reference
5231 (url "https://github.com/pagekite/PySocksipyChain")
5232 (commit (string-append "v" version))))
5233 (file-name (git-file-name name version))
5234 (sha256
5235 (base32
5236 "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
5237 (build-system python-build-system)
5238 (arguments
5239 `(#:tests? #f)) ; Tests try to access the network.
5240 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
5241 (synopsis "Python SOCKS module with chained proxies support")
5242 (description
5243 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
5244 adds support for arbitrary chaining of proxy servers and various modes of
5245 TLS/SSL encryption. It was developed for use in PageKite, and also includes
5246 a simple netcat replacement with chaining support.")
5247 (license license:bsd-3)))
5248
5249 (define-public python-pycodestyle
5250 (package
5251 (name "python-pycodestyle")
5252 (version "2.6.0")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (pypi-uri "pycodestyle" version))
5257 (sha256
5258 (base32
5259 "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))
5260 (build-system python-build-system)
5261 (arguments
5262 `(#:phases
5263 (modify-phases %standard-phases
5264 (replace 'check
5265 (lambda _
5266 (invoke "pytest" "-vv"))))))
5267 (native-inputs
5268 `(("python-pytest" ,python-pytest)))
5269 (home-page "https://pycodestyle.readthedocs.io/")
5270 (synopsis "Python style guide checker")
5271 (description "@code{pycodestyle} (formerly pep8) is a tool to check
5272 Python code against some of the style conventions in
5273 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
5274 (license license:expat)))
5275
5276 (define-public python2-pycodestyle
5277 (package-with-python2 python-pycodestyle))
5278
5279 (define-public python-multidict
5280 (package
5281 (name "python-multidict")
5282 (version "4.7.5")
5283 (source
5284 (origin
5285 (method url-fetch)
5286 (uri (pypi-uri "multidict" version))
5287 (sha256
5288 (base32
5289 "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
5290 (build-system python-build-system)
5291 (arguments
5292 '(#:modules ((ice-9 ftw)
5293 (srfi srfi-1)
5294 (srfi srfi-26)
5295 (guix build utils)
5296 (guix build python-build-system))
5297 #:phases (modify-phases %standard-phases
5298 (replace 'check
5299 (lambda* (#:key tests? #:allow-other-keys)
5300 (if tests?
5301 (begin
5302 (let ((libdir (find (cut string-prefix? "lib." <>)
5303 (scandir "build"))))
5304 (setenv "PYTHONPATH"
5305 (string-append "./build/" libdir ":"
5306 (getenv "PYTHONPATH")))
5307 (invoke "pytest" "-vv")))
5308 (format #t "test suite not run~%"))
5309 #t)))))
5310 (native-inputs
5311 `(("python-pytest" ,python-pytest)
5312 ("python-pytest-cov" ,python-pytest-cov)))
5313 (home-page "https://github.com/aio-libs/multidict/")
5314 (synopsis "Multidict implementation")
5315 (description "Multidict is dict-like collection of key-value pairs
5316 where key might be occurred more than once in the container.")
5317 (license license:asl2.0)))
5318
5319 (define-public python-orderedmultidict
5320 (package
5321 (name "python-orderedmultidict")
5322 (version "1.0")
5323 (source
5324 (origin
5325 (method url-fetch)
5326 (uri (pypi-uri "orderedmultidict" version))
5327 (sha256
5328 (base32
5329 "1idjbl933avgaadscrjw1np3xkvnz3phq0l8vw5qs0rqcjx9b65q"))))
5330 (build-system python-build-system)
5331 (arguments
5332 `(#:phases
5333 (modify-phases %standard-phases
5334 (add-after 'unpack 'fix-tests
5335 (lambda _
5336 ;; The package uses nosetest for running the tests.
5337 ;; Adding this initfile allows to run the test suite
5338 ;; without requiring nosetest.
5339 (with-output-to-file "tests/__init__.py" newline)
5340 #t)))))
5341 (propagated-inputs
5342 `(("python-six" ,python-six)))
5343 (native-inputs
5344 `(("python-pycodestyle" ,python-pycodestyle)))
5345 (home-page "https://github.com/gruns/orderedmultidict")
5346 (synopsis "Python Ordered Multivalue Dictionary - omdict")
5347 (description "This package contains a library for ordered multivalue
5348 dictionaries. A multivalue dictionary is a dictionary that can store
5349 multiple values for the same key. An ordered multivalue dictionary is a
5350 multivalue dictionary that retains the order of insertions and deletions.")
5351 (license license:unlicense)))
5352
5353 (define-public python2-orderedmultidict
5354 (package-with-python2 python-orderedmultidict))
5355
5356 (define-public python-autopep8
5357 (package
5358 (name "python-autopep8")
5359 (version "1.5.3")
5360 (source
5361 (origin
5362 (method url-fetch)
5363 (uri (pypi-uri "autopep8" version))
5364 (sha256
5365 (base32
5366 "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
5367 (build-system python-build-system)
5368 (propagated-inputs
5369 `(("python-pycodestyle" ,python-pycodestyle)
5370 ("python-toml" ,python-toml)))
5371 (home-page "https://github.com/hhatto/autopep8")
5372 (synopsis "Format Python code according to the PEP 8 style guide")
5373 (description
5374 "@code{autopep8} automatically formats Python code to conform to
5375 the PEP 8 style guide. It uses the pycodestyle utility to determine
5376 what parts of the code needs to be formatted. @code{autopep8} is
5377 capable of fixing most of the formatting issues that can be reported
5378 by pycodestyle.")
5379 (license (license:non-copyleft
5380 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
5381
5382 (define-public python2-autopep8
5383 (package-with-python2 python-autopep8))
5384
5385 (define-public python-distlib
5386 (package
5387 (name "python-distlib")
5388 (version "0.3.0")
5389 (source
5390 (origin
5391 (method url-fetch)
5392 (uri (pypi-uri "distlib" version ".zip"))
5393 (sha256
5394 (base32
5395 "08fyi2r246733vharl2yckw20rilci28r91mzrnnvcr638inw5if"))))
5396 (build-system python-build-system)
5397 (arguments
5398 `(#:phases
5399 (modify-phases %standard-phases
5400 (add-before 'build 'no-/bin/sh
5401 (lambda _
5402 (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
5403 (("/bin/sh") (which "sh")))
5404 #t))
5405 (add-before 'check 'prepare-test-env
5406 (lambda _
5407 (setenv "HOME" "/tmp")
5408 ;; NOTE: Any value works, the variable just has to be present.
5409 (setenv "SKIP_ONLINE" "1")
5410 #t)))))
5411 (native-inputs `(("unzip" ,unzip)))
5412 (home-page "https://bitbucket.org/pypa/distlib")
5413 (synopsis "Distribution utilities")
5414 (description "Distlib is a library which implements low-level functions that
5415 relate to packaging and distribution of Python software. It is intended to be
5416 used as the basis for third-party packaging tools.")
5417 (license license:psfl)))
5418
5419 (define-public python-distutils-extra
5420 (package
5421 (name "python-distutils-extra")
5422 (version "2.38")
5423 (source
5424 (origin
5425 (method url-fetch)
5426 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
5427 version "/+download/python-distutils-extra-"
5428 version ".tar.gz"))
5429 (sha256
5430 (base32
5431 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
5432 (build-system python-build-system)
5433 (home-page "https://launchpad.net/python-distutils-extra/")
5434 (synopsis "Enhancements to Python's distutils")
5435 (description
5436 "The python-distutils-extra module enables you to easily integrate
5437 gettext support, themed icons, and scrollkeeper-based documentation into
5438 Python's distutils.")
5439 (license license:gpl2)))
5440
5441 (define-public python2-distutils-extra
5442 (package-with-python2 python-distutils-extra))
5443
5444 (define-public python2-elib.intl
5445 (package
5446 (name "python2-elib.intl")
5447 (version "0.0.3")
5448 (source
5449 (origin
5450 ;; This project doesn't tag releases or publish tarballs, so we take
5451 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
5452 (method git-fetch)
5453 (uri (git-reference
5454 (url "https://github.com/dieterv/elib.intl")
5455 (commit "d09997cfef")))
5456 (file-name (string-append name "-" version "-checkout"))
5457 (sha256
5458 (base32
5459 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
5460 (build-system python-build-system)
5461 (arguments
5462 ;; incompatible with Python 3 (exception syntax)
5463 `(#:python ,python-2
5464 #:tests? #f))
5465 (home-page "https://github.com/dieterv/elib.intl")
5466 (synopsis "Enhanced internationalization for Python")
5467 (description
5468 "The elib.intl module provides enhanced internationalization (I18N)
5469 services for your Python modules and applications.")
5470 (license license:lgpl3+)))
5471
5472 (define-public python-olefile
5473 (package
5474 (name "python-olefile")
5475 (version "0.46")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (string-append "https://github.com/decalage2/olefile/releases/"
5480 "download/v" version "/olefile-" version ".tar.gz"))
5481 (file-name (string-append name "-" version ".tar.gz"))
5482 (sha256
5483 (base32
5484 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
5485 (build-system python-build-system)
5486 (home-page "https://www.decalage.info/python/olefileio")
5487 (synopsis "Read and write Microsoft OLE2 files.")
5488 (description
5489 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
5490 Storage or Compound Document, Microsoft Office). It is an improved version of
5491 the OleFileIO module from PIL, the Python Image Library.")
5492 (license license:bsd-3)))
5493
5494 (define-public python2-olefile
5495 (package-with-python2 python-olefile))
5496
5497 (define-public python-pillow
5498 (package
5499 (name "python-pillow")
5500 (version "6.2.1")
5501 (source
5502 (origin
5503 (method url-fetch)
5504 (uri (pypi-uri "Pillow" version))
5505 (sha256
5506 (base32
5507 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
5508 (build-system python-build-system)
5509 (native-inputs
5510 `(("python-pytest" ,python-pytest)))
5511 (inputs
5512 `(("freetype" ,freetype)
5513 ("lcms" ,lcms)
5514 ("libjpeg" ,libjpeg-turbo)
5515 ("libtiff" ,libtiff)
5516 ("libwebp" ,libwebp)
5517 ("openjpeg" ,openjpeg)
5518 ("zlib" ,zlib)))
5519 (propagated-inputs
5520 `(("python-olefile" ,python-olefile)))
5521 (arguments
5522 `(#:phases
5523 (modify-phases %standard-phases
5524 (add-after 'unpack 'patch-ldconfig
5525 (lambda _
5526 (substitute* "setup.py"
5527 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
5528 (replace 'check
5529 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5530 (if tests?
5531 (begin
5532 (setenv "HOME" (getcwd))
5533 ;; Make installed package available for running the tests.
5534 (add-installed-pythonpath inputs outputs)
5535 (invoke "python" "selftest.py" "--installed")
5536 (invoke "python" "-m" "pytest" "-vv"))
5537 #t))))))
5538 (home-page "https://python-pillow.org")
5539 (synopsis "Fork of the Python Imaging Library")
5540 (description
5541 "The Python Imaging Library adds image processing capabilities to your
5542 Python interpreter. This library provides extensive file format support, an
5543 efficient internal representation, and fairly powerful image processing
5544 capabilities. The core image library is designed for fast access to data
5545 stored in a few basic pixel formats. It should provide a solid foundation for
5546 a general image processing tool.")
5547 (license (license:x11-style
5548 "http://www.pythonware.com/products/pil/license.htm"
5549 "The PIL Software License"))))
5550
5551 (define-public python2-pillow
5552 (package-with-python2 python-pillow))
5553
5554 (define-public python-pillow-2.9
5555 (package
5556 (inherit python-pillow)
5557 (version "2.9.0")
5558 (source
5559 (origin
5560 (method url-fetch)
5561 (uri (pypi-uri "Pillow" version))
5562 (sha256
5563 (base32
5564 "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
5565 (arguments
5566 (substitute-keyword-arguments (package-arguments python-pillow)
5567 ((#:tests? _ #f) #f)))
5568 (properties '((hidden? #t)))))
5569
5570 (define-public python-roifile
5571 (package
5572 (name "python-roifile")
5573 (version "2020.5.28")
5574 (source
5575 (origin
5576 (method url-fetch)
5577 (uri (pypi-uri "roifile" version))
5578 (sha256
5579 (base32
5580 "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
5581 (build-system python-build-system)
5582 (arguments `(#:tests? #f)) ; there are none
5583 (propagated-inputs
5584 `(("python-numpy" ,python-numpy)))
5585 (home-page "https://www.lfd.uci.edu/~gohlke/")
5586 (synopsis "Read and write ImageJ ROI format")
5587 (description "Roifile is a Python library to read, write, create, and plot
5588 ImageJ ROIs, an undocumented and ImageJ application specific format to store
5589 regions of interest, geometric shapes, paths, text, etc for image overlays.")
5590 (license license:bsd-3)))
5591
5592 (define-public python-tifffile
5593 (package
5594 (name "python-tifffile")
5595 (version "2020.6.3")
5596 (source
5597 (origin
5598 (method url-fetch)
5599 (uri (pypi-uri "tifffile" version))
5600 (sha256
5601 (base32
5602 "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
5603 (build-system python-build-system)
5604 ;; Tests require lfdfiles, which depends on tifffile
5605 (arguments `(#:tests? #f))
5606 (propagated-inputs
5607 `(("python-numpy" ,python-numpy)
5608 ;;("python-lfdfiles" ,python-lfdfiles)
5609 ("python-roifile" ,python-roifile)))
5610 (home-page "https://www.lfd.uci.edu/~gohlke/")
5611 (synopsis "Read and write TIFF(r) files")
5612 (description "This package lets you read image and metadata from many
5613 bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
5614 NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
5615 numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
5616 (license license:bsd-3)))
5617
5618 (define-public python-lfdfiles
5619 (package
5620 (name "python-lfdfiles")
5621 (version "2020.1.1")
5622 (source
5623 (origin
5624 (method url-fetch)
5625 (uri (pypi-uri "lfdfiles" version))
5626 (sha256
5627 (base32
5628 "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
5629 (build-system python-build-system)
5630 (propagated-inputs
5631 `(("python-click" ,python-click)
5632 ("python-numpy" ,python-numpy)
5633 ("python-tifffile" ,python-tifffile)))
5634 (home-page "https://www.lfd.uci.edu/~gohlke/")
5635 (synopsis "Work with LFD data files")
5636 (description
5637 "Lfdfiles is a Python library and console script for reading, writing,
5638 converting, and viewing many of the proprietary file formats used to store
5639 experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
5640 (license license:bsd-3)))
5641
5642 (define-public python-imageio
5643 (package
5644 (name "python-imageio")
5645 (version "2.8.0")
5646 (source
5647 (origin
5648 (method url-fetch)
5649 (uri (pypi-uri "imageio" version))
5650 (sha256
5651 (base32
5652 "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
5653 (build-system python-build-system)
5654 (arguments
5655 `(#:tests? #f ; many tests require online data
5656 #:phases
5657 (modify-phases %standard-phases
5658 (replace 'check
5659 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
5660 (if tests?
5661 (begin
5662 ;; Make installed package available for running the tests.
5663 (add-installed-pythonpath inputs outputs)
5664 (invoke "pytest" "-vv"))
5665 #t))))))
5666 (propagated-inputs
5667 `(("python-numpy" ,python-numpy)
5668 ("python-pillow" ,python-pillow)
5669 ("python-psutil" ,python-psutil)))
5670 (native-inputs
5671 `(("python-pytest" ,python-pytest)))
5672 (home-page "https://imageio.github.io/")
5673 (synopsis "Library for reading and writing a wide range of image data")
5674 (description
5675 "Imageio is a Python library that provides an easy interface to read and
5676 write a wide range of image data, including animated images, video, volumetric
5677 data, and scientific formats.")
5678 (license license:bsd-2)))
5679
5680 (define-public python-pycparser
5681 (package
5682 (name "python-pycparser")
5683 (version "2.20")
5684 (source
5685 (origin
5686 (method url-fetch)
5687 (uri (pypi-uri "pycparser" version))
5688 (sha256
5689 (base32
5690 "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
5691 (outputs '("out" "doc"))
5692 (build-system python-build-system)
5693 (native-inputs
5694 `(("pkg-config" ,pkg-config)))
5695 (arguments
5696 `(#:phases
5697 (modify-phases %standard-phases
5698 (replace 'check
5699 (lambda _
5700 (with-directory-excursion "tests"
5701 (invoke "python" "all_tests.py"))
5702 #t))
5703 (add-after 'install 'install-doc
5704 (lambda* (#:key outputs #:allow-other-keys)
5705 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5706 (doc (string-append data "/doc/" ,name "-" ,version))
5707 (examples (string-append doc "/examples")))
5708 (mkdir-p examples)
5709 (for-each (lambda (file)
5710 (copy-file (string-append "." file)
5711 (string-append doc file)))
5712 '("/README.rst" "/CHANGES" "/LICENSE"))
5713 (copy-recursively "examples" examples)
5714 #t))))))
5715 (home-page "https://github.com/eliben/pycparser")
5716 (synopsis "C parser in Python")
5717 (description
5718 "Pycparser is a complete parser of the C language, written in pure Python
5719 using the PLY parsing library. It parses C code into an AST and can serve as
5720 a front-end for C compilers or analysis tools.")
5721 (license license:bsd-3)))
5722
5723 (define-public python2-pycparser
5724 (package-with-python2 python-pycparser))
5725
5726 (define-public python-pywavelets
5727 (package
5728 (name "python-pywavelets")
5729 (version "1.1.1")
5730 (home-page "https://github.com/PyWavelets/pywt")
5731 (source (origin
5732 (method url-fetch)
5733 (uri (pypi-uri "PyWavelets" version))
5734 (sha256
5735 (base32
5736 "1j88c0r4j1d4mb3f8qhz6nalyx21qrzmsm70rjngnkybd87v8r0s"))))
5737 (build-system python-build-system)
5738 (arguments
5739 '(#:modules ((ice-9 ftw)
5740 (srfi srfi-1)
5741 (srfi srfi-26)
5742 (guix build utils)
5743 (guix build python-build-system))
5744 #:phases
5745 (modify-phases %standard-phases
5746 (replace 'check
5747 (lambda _
5748 (let ((cwd (getcwd))
5749 (libdir (find (cut string-prefix? "lib." <>)
5750 (scandir "build"))))
5751 (with-directory-excursion (string-append cwd "/build/" libdir)
5752 (invoke "pytest" "-vv"))))))))
5753 (native-inputs
5754 `(("python-matplotlib" ,python-matplotlib) ;for tests
5755 ("python-pytest" ,python-pytest)))
5756 (propagated-inputs
5757 `(("python-numpy" ,python-numpy)))
5758 (synopsis "Wavelet transforms in Python")
5759 (description
5760 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
5761 mathematical basis functions that are localized in both time and frequency.
5762 Wavelet transforms are time-frequency transforms employing wavelets. They are
5763 similar to Fourier transforms, the difference being that Fourier transforms are
5764 localized only in frequency instead of in time and frequency.")
5765 (license license:expat)))
5766
5767 (define-public python-pywinrm
5768 (package
5769 (name "python-pywinrm")
5770 (version "0.4.1")
5771 (source
5772 (origin
5773 (method url-fetch)
5774 (uri (pypi-uri "pywinrm" version))
5775 (sha256
5776 (base32
5777 "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
5778 (build-system python-build-system)
5779 (propagated-inputs
5780 `(("python-six" ,python-six)
5781 ("python-requests_ntlm" ,python-requests_ntlm)
5782 ("python-xmltodict" ,python-xmltodict)
5783 ("python-kerberos" ,python-kerberos)))
5784 (native-inputs
5785 `(("python-mock" ,python-mock)
5786 ("python-pytest" ,python-pytest)))
5787 (home-page "https://github.com/diyan/pywinrm/")
5788 (synopsis
5789 "Python library for Windows Remote Management (WinRM)")
5790 (description
5791 "pywinrm is a Python client for the Windows Remote Management (WinRM)
5792 service. It allows you to invoke commands on target Windows machines from
5793 any machine that can run Python.")
5794 (license license:expat)))
5795
5796 (define-public python-xcffib
5797 (package
5798 (name "python-xcffib")
5799 (version "0.6.0")
5800 (source
5801 (origin
5802 (method url-fetch)
5803 (uri (pypi-uri "xcffib" version))
5804 (sha256
5805 (base32
5806 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
5807 (build-system python-build-system)
5808 (inputs
5809 `(("libxcb" ,libxcb)))
5810 (propagated-inputs
5811 `(("python-cffi" ,python-cffi) ; used at run time
5812 ("python-six" ,python-six)))
5813 (arguments
5814 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
5815 #:tests? #f
5816 #:phases
5817 (modify-phases %standard-phases
5818 (add-after 'unpack 'fix-libxcb-path
5819 (lambda* (#:key inputs #:allow-other-keys)
5820 (let ((libxcb (assoc-ref inputs "libxcb")))
5821 (substitute* '("xcffib/__init__.py")
5822 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
5823 #t)))
5824 (add-after 'install 'install-doc
5825 (lambda* (#:key outputs #:allow-other-keys)
5826 (let ((doc (string-append (assoc-ref outputs "out") "/share"
5827 "/doc/" ,name "-" ,version)))
5828 (mkdir-p doc)
5829 (copy-file "README.md"
5830 (string-append doc "/README.md"))
5831 #t))))))
5832 (home-page "https://github.com/tych0/xcffib")
5833 (synopsis "XCB Python bindings")
5834 (description
5835 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
5836 support for Python 3 and PyPy. It is based on cffi.")
5837 (license license:expat)))
5838
5839 (define-public python2-xcffib
5840 (package-with-python2 python-xcffib))
5841
5842 (define-public python-cairocffi
5843 (package
5844 (name "python-cairocffi")
5845 (version "0.9.0")
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (pypi-uri "cairocffi" version))
5850 (sha256
5851 (base32
5852 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
5853 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
5854 (build-system python-build-system)
5855 (outputs '("out" "doc"))
5856 (inputs
5857 `(("glib" ,glib)
5858 ("gtk+" ,gtk+)
5859 ("gdk-pixbuf" ,gdk-pixbuf)
5860 ("cairo" ,cairo)
5861 ("pango" ,pango)))
5862 (native-inputs
5863 `(("pkg-config" ,pkg-config)
5864 ("python-pytest" ,python-pytest)
5865 ("python-pytest-cov" ,python-pytest-cov)
5866 ("python-pytest-runner" ,python-pytest-runner)
5867 ("python-sphinx" ,python-sphinx)
5868 ("python-docutils" ,python-docutils)))
5869 (propagated-inputs
5870 `(("python-xcffib" ,python-xcffib))) ; used at run time
5871 (arguments
5872 `(#:phases
5873 (modify-phases %standard-phases
5874 (add-after 'unpack 'patch-paths
5875 (lambda* (#:key inputs outputs #:allow-other-keys)
5876 (substitute* (find-files "." "\\.py$")
5877 (("dlopen\\(ffi, 'cairo'")
5878 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
5879 "/lib/libcairo.so.2'"))
5880 (("dlopen\\(ffi, 'gdk-3'")
5881 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
5882 "/lib/libgtk-3.so.0'"))
5883 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
5884 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
5885 "/lib/libgdk_pixbuf-2.0.so.0'"))
5886 (("dlopen\\(ffi, 'glib-2.0'")
5887 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5888 "/lib/libglib-2.0.so.0'"))
5889 (("dlopen\\(ffi, 'gobject-2.0'")
5890 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
5891 "/lib/libgobject-2.0.so.0'"))
5892 (("dlopen\\(ffi, 'pangocairo-1.0'")
5893 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5894 "/lib/libpangocairo-1.0.so.0'"))
5895 (("dlopen\\(ffi, 'pango-1.0'")
5896 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
5897 "/lib/libpango-1.0.so.0'")))
5898 #t))
5899 (add-after 'install 'install-doc
5900 (lambda* (#:key inputs outputs #:allow-other-keys)
5901 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5902 (doc (string-append data "/doc/" ,name "-" ,version))
5903 (html (string-append doc "/html")))
5904 (setenv "LD_LIBRARY_PATH"
5905 (string-append (assoc-ref inputs "cairo") "/lib" ":"
5906 (assoc-ref inputs "gdk-pixbuf") "/lib"))
5907 (setenv "LANG" "en_US.UTF-8")
5908 (mkdir-p html)
5909 (for-each (lambda (file)
5910 (copy-file (string-append "." file)
5911 (string-append doc file)))
5912 '("/README.rst" "/CHANGES" "/LICENSE"))
5913 (system* "python" "setup.py" "build_sphinx")
5914 (copy-recursively "docs/_build/html" html)
5915 #t))))))
5916 (home-page "https://github.com/Kozea/cairocffi")
5917 (synopsis "Python bindings and object-oriented API for Cairo")
5918 (description
5919 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
5920 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
5921 graphics library with support for multiple backends including image buffers,
5922 PNG, PostScript, PDF, and SVG file output.")
5923 (license license:bsd-3)))
5924
5925 (define-public python2-cairocffi
5926 (package-with-python2 python-cairocffi))
5927
5928 (define-public python-decorator
5929 (package
5930 (name "python-decorator")
5931 (version "4.3.0")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (pypi-uri "decorator" version))
5936 (sha256
5937 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
5938 (build-system python-build-system)
5939 (home-page "https://pypi.org/project/decorator/")
5940 (synopsis "Python module to simplify usage of decorators")
5941 (description
5942 "The aim of the decorator module is to simplify the usage of decorators
5943 for the average programmer, and to popularize decorators usage giving examples
5944 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
5945 etc. The core of this module is a decorator factory.")
5946 (license license:expat)))
5947
5948 (define-public python2-decorator
5949 (package-with-python2 python-decorator))
5950
5951 (define-public python-drmaa
5952 (package
5953 (name "python-drmaa")
5954 (version "0.7.7")
5955 (source
5956 (origin
5957 (method url-fetch)
5958 (uri (pypi-uri "drmaa" version))
5959 (sha256
5960 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
5961 (build-system python-build-system)
5962 ;; The test suite requires libdrmaa which is provided by the cluster
5963 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
5964 ;; should be set to the path of the libdrmaa library.
5965 (arguments '(#:tests? #f))
5966 (native-inputs
5967 `(("python-nose" ,python-nose)))
5968 (home-page "https://pypi.org/project/drmaa/")
5969 (synopsis "Python bindings for the DRMAA library")
5970 (description
5971 "A Python package for Distributed Resource Management (DRM) job
5972 submission and control. This package is an implementation of the DRMAA 1.0
5973 Python language binding specification.")
5974 (license license:bsd-3)))
5975
5976 (define-public python2-drmaa
5977 (package-with-python2 python-drmaa))
5978
5979 (define-public python-grako
5980 (package
5981 (name "python-grako")
5982 (version "3.99.9")
5983 (source
5984 (origin
5985 (method url-fetch)
5986 (uri
5987 (pypi-uri "grako" version ".zip"))
5988 (sha256
5989 (base32
5990 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
5991 (build-system python-build-system)
5992 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
5993 (native-inputs
5994 `(("unzip" ,unzip)
5995 ("python-pytest" ,python-pytest)
5996 ("python-pytest-runner" ,python-pytest-runner)))
5997 (home-page "https://bitbucket.org/neogeny/grako")
5998 (synopsis "EBNF parser generator")
5999 (description
6000 "Grako takes a grammar in a variation of EBNF as input, and outputs a
6001 memoizing PEG/Packrat parser in Python.")
6002 (license license:bsd-3)))
6003
6004 (define-public python2-grako
6005 (package-with-python2 python-grako))
6006
6007 (define-public python-gridmap
6008 (package
6009 (name "python-gridmap")
6010 (version "0.14.0")
6011 (source
6012 (origin
6013 (method git-fetch)
6014 (uri (git-reference
6015 (url "https://github.com/pygridtools/gridmap")
6016 (commit (string-append "v" version))))
6017 (file-name (git-file-name name version))
6018 (sha256
6019 (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
6020 (build-system python-build-system)
6021 (arguments
6022 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
6023 (propagated-inputs
6024 `(("python-psutil" ,python-psutil)
6025 ("python-drmaa" ,python-drmaa)
6026 ("python-pyzmq" ,python-pyzmq)))
6027 (home-page "https://github.com/pygridtools/gridmap")
6028 (synopsis "Create jobs on a cluster directly from Python")
6029 (description
6030 "Gridmap is a Python package to allow you to easily create jobs on the
6031 cluster directly from Python. You can directly map Python functions onto the
6032 cluster without needing to write any wrapper code yourself.")
6033 (license license:gpl3+)))
6034
6035 (define-public python2-gridmap
6036 (package-with-python2 python-gridmap))
6037
6038 (define-public python-honcho
6039 (package
6040 (name "python-honcho")
6041 (version "1.0.1")
6042 (source
6043 (origin
6044 (method git-fetch)
6045 (uri (git-reference
6046 (url "https://github.com/nickstenning/honcho")
6047 (commit (string-append "v" version))))
6048 (file-name (git-file-name name version))
6049 (sha256
6050 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
6051 (build-system python-build-system)
6052 (native-inputs
6053 `(("python-pytest" ,python-pytest)
6054 ("python-mock" ,python-mock)
6055 ("python-tox" ,python-tox)
6056 ("which" ,which))) ;for tests
6057 (propagated-inputs
6058 `(("python-jinja2" ,python-jinja2)))
6059 (arguments
6060 `(#:phases
6061 (modify-phases %standard-phases
6062 (delete 'check)
6063 (add-after 'install 'check
6064 (lambda* (#:key outputs inputs #:allow-other-keys)
6065 ;; fix honcho path in testsuite
6066 (substitute* "tests/conftest.py"
6067 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
6068 "/bin/honcho" "'")))
6069 ;; It's easier to run tests after install.
6070 ;; Make installed package available for running the tests
6071 (add-installed-pythonpath inputs outputs)
6072 (invoke "py.test" "-v"))))))
6073 (home-page "https://github.com/nickstenning/honcho")
6074 (synopsis "Manage Procfile-based applications")
6075 (description
6076 "A Procfile is a file which describes how to run an application
6077 consisting of several processes. honcho starts all listed processes.
6078 The output of all running processes is collected by honcho and
6079 displayed.")
6080 (license license:expat)))
6081
6082 (define-public python2-honcho
6083 (package-with-python2 python-honcho))
6084
6085 (define-public python-pexpect
6086 (package
6087 (name "python-pexpect")
6088 (version "4.8.0")
6089 (source
6090 (origin
6091 (method url-fetch)
6092 (uri (pypi-uri "pexpect" version))
6093 (sha256
6094 (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
6095 (build-system python-build-system)
6096 (arguments
6097 `(#:phases
6098 (modify-phases %standard-phases
6099 (add-before 'check 'prepare-tests
6100 (lambda _
6101 (substitute* (find-files "tests")
6102 (("/bin/ls") (which "ls"))
6103 (("/bin/echo") (which "echo"))
6104 (("/bin/which") (which "which"))
6105 ;; Many tests try to use the /bin directory which
6106 ;; is not present in the build environment.
6107 ;; Use one that's non-empty and unlikely to change.
6108 (("/bin'") "/dev'")
6109 ;; Disable failing test. See upstream bug report
6110 ;; https://github.com/pexpect/pexpect/issues/568
6111 (("def test_bash") "def _test_bash"))
6112 ;; XXX: Socket connection test gets "Connection reset by peer".
6113 ;; Why does it not work? Delete for now.
6114 (delete-file "tests/test_socket.py")
6115 #t))
6116 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
6117 (native-inputs
6118 `(("python-nose" ,python-nose)
6119 ("python-pytest" ,python-pytest)
6120 ("man-db" ,man-db)
6121 ("which" ,which)
6122 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
6123 (propagated-inputs
6124 `(("python-ptyprocess" ,python-ptyprocess)))
6125 (home-page "http://pexpect.readthedocs.org/")
6126 (synopsis "Controlling interactive console applications")
6127 (description
6128 "Pexpect is a pure Python module for spawning child applications;
6129 controlling them; and responding to expected patterns in their output.
6130 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
6131 child application and control it as if a human were typing commands.")
6132 (license license:isc)))
6133
6134 (define-public python2-pexpect
6135 (package-with-python2 python-pexpect))
6136
6137 (define-public python-setuptools-scm
6138 (package
6139 (name "python-setuptools-scm")
6140 (version "3.4.3")
6141 (source (origin
6142 (method url-fetch)
6143 (uri (pypi-uri "setuptools_scm" version))
6144 (sha256
6145 (base32
6146 "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16"))))
6147 (build-system python-build-system)
6148 (home-page "https://github.com/pypa/setuptools_scm/")
6149 (synopsis "Manage Python package versions in SCM metadata")
6150 (description
6151 "Setuptools_scm handles managing your Python package versions in
6152 @dfn{software configuration management} (SCM) metadata instead of declaring
6153 them as the version argument or in a SCM managed file.")
6154 (license license:expat)))
6155
6156 (define-public python2-setuptools-scm
6157 (package-with-python2 python-setuptools-scm))
6158
6159 (define-public python-sexpdata
6160 (package
6161 (name "python-sexpdata")
6162 (version "0.0.3")
6163 (source
6164 (origin
6165 (method url-fetch)
6166 (uri (pypi-uri "sexpdata" version))
6167 (sha256
6168 (base32
6169 "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
6170 (build-system python-build-system)
6171 (home-page "https://github.com/jd-boyd/sexpdata")
6172 (synopsis "S-expression parser for Python")
6173 (description
6174 "Sexpdata is an S-expression parser/serializer. It has load and dump
6175 functions like pickle, json or PyYAML module.")
6176 (license license:bsd-3)))
6177
6178 (define-public python-pathlib2
6179 (package
6180 (name "python-pathlib2")
6181 (version "2.3.3")
6182 (source
6183 (origin
6184 (method url-fetch)
6185 (uri (pypi-uri "pathlib2" version))
6186 (sha256
6187 (base32
6188 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
6189 (build-system python-build-system)
6190 (propagated-inputs
6191 `(("python-scandir" ,python-scandir)
6192 ("python-six" ,python-six)))
6193 (home-page "https://pypi.org/project/pathlib2/")
6194 (synopsis "Object-oriented file system paths")
6195 (description "The goal of pathlib2 is to provide a backport of the
6196 standard @code{pathlib} module which tracks the standard library module, so
6197 all the newest features of the standard @code{pathlib} can be used also on
6198 older Python versions.")
6199 (license license:expat)))
6200
6201 (define-public python-importlib-resources
6202 (package
6203 (name "python-importlib-resources")
6204 (version "3.0.0")
6205 (source
6206 (origin
6207 (method url-fetch)
6208 (uri (pypi-uri "importlib_resources" version))
6209 (sha256
6210 (base32
6211 "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
6212 (build-system python-build-system)
6213 (native-inputs
6214 `(("python-setuptools-scm" ,python-setuptools-scm)
6215 ("python-toml" ,python-toml)))
6216 (home-page "http://importlib-resources.readthedocs.io/")
6217 (synopsis "Read resources from Python packages")
6218 (description
6219 "@code{importlib_resources} is a backport of Python 3's standard library
6220 @code{importlib.resources} module for Python 2.7, and Python 3.")
6221 (properties `((python2-variant . ,(delay python2-importlib-resources))))
6222 (license license:asl2.0)))
6223
6224 (define-public python2-importlib-resources
6225 (package
6226 (name "python2-importlib-resources")
6227 (version "1.0.2")
6228 (source (origin
6229 (method url-fetch)
6230 (uri (pypi-uri "importlib_resources" version))
6231 (sha256
6232 (base32
6233 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
6234 (build-system python-build-system)
6235 (arguments
6236 `(#:python ,python-2
6237 #:phases (modify-phases %standard-phases
6238 ;; The build system tests for python-wheel, but it is
6239 ;; not required for Guix nor the test suite. Just drop
6240 ;; it to make bootstrapping pytest easier.
6241 (add-after 'unpack 'drop-wheel-dependency
6242 (lambda _
6243 (substitute* "setup.cfg"
6244 (("^[[:blank:]]+wheel")
6245 ""))
6246 #t)))))
6247 (propagated-inputs
6248 `(("python-pathlib2" ,python2-pathlib2)
6249 ("python-typing" ,python2-typing)))
6250 (home-page "https://gitlab.com/python-devs/importlib_resources")
6251 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
6252 (description
6253 "This package provides an implementation of @code{importlib.resources}
6254 for older versions of Python.")
6255 (license license:asl2.0)))
6256
6257 ;; For importlib-metadata-bootstrap below.
6258 (define-public python2-importlib-resources-bootstrap
6259 (hidden-package
6260 (package/inherit
6261 python2-importlib-resources
6262 (name "python2-importlib-resources-bootstrap")
6263 (propagated-inputs
6264 `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
6265 ("python-typing" ,python2-typing))))))
6266
6267 (define-public python-importlib-metadata
6268 (package
6269 (name "python-importlib-metadata")
6270 (version "1.5.0")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "importlib_metadata" version))
6275 (sha256
6276 (base32
6277 "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
6278 (build-system python-build-system)
6279 (propagated-inputs
6280 `(("python-zipp" ,python-zipp)))
6281 (native-inputs
6282 `(("python-setuptools-scm" ,python-setuptools-scm)
6283 ("python-pyfakefs" ,python-pyfakefs)
6284 ("python-packaging" ,python-packaging)))
6285 (home-page "https://importlib-metadata.readthedocs.io/")
6286 (synopsis "Read metadata from Python packages")
6287 (description
6288 "@code{importlib_metadata} is a library which provides an API for
6289 accessing an installed Python package's metadata, such as its entry points or
6290 its top-level name. This functionality intends to replace most uses of
6291 @code{pkg_resources} entry point API and metadata API. Along with
6292 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
6293 need to use the older and less efficient @code{pkg_resources} package.")
6294 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
6295 (license license:asl2.0)))
6296
6297 (define-public python2-importlib-metadata
6298 (let ((base (package-with-python2 (strip-python2-variant
6299 python-importlib-metadata))))
6300 (package/inherit
6301 base
6302 (name "python2-importlib-metadata")
6303 (native-inputs
6304 `(("python-setuptools-scm" ,python2-setuptools-scm)
6305 ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
6306 ("python-packaging" ,python2-packaging-bootstrap)))
6307 (propagated-inputs
6308 `(("python-configparser" ,python2-configparser)
6309 ("python-contextlib2" ,python2-contextlib2)
6310 ("python-importlib-resources" ,python2-importlib-resources)
6311 ("python-pathlib2" ,python2-pathlib2)
6312 ,@(package-propagated-inputs base))))))
6313
6314 ;; This package is used by python2-pytest, and thus must not depend on it.
6315 (define-public python2-importlib-metadata-bootstrap
6316 (hidden-package
6317 (package/inherit
6318 python2-importlib-metadata
6319 (name "python2-importlib-metadata-bootstrap")
6320 (arguments
6321 `(#:tests? #f
6322 ,@(package-arguments python2-importlib-metadata)))
6323 (propagated-inputs
6324 `(("python-zipp" ,python2-zipp-bootstrap)
6325 ("python-pathlib2" ,python2-pathlib2-bootstrap)
6326 ("python-configparser" ,python2-configparser)
6327 ("python-contextlib2" ,python2-contextlib2-bootstrap)
6328 ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
6329
6330 (define-public python-importmagic
6331 (package
6332 (name "python-importmagic")
6333 (version "0.1.7")
6334 (source
6335 (origin
6336 (method url-fetch)
6337 (uri (pypi-uri "importmagic" version))
6338 (sha256
6339 (base32
6340 "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
6341 (build-system python-build-system)
6342 (home-page "https://github.com/alecthomas/importmagic")
6343 (synopsis "Library for adding, removing and managing Python imports")
6344 (description
6345 "Importmagic is a Python library for automatically managing imports by
6346 finding unresolved symbols in Python code and their corresponding imports.")
6347 (license license:bsd-3)))
6348
6349 (define-public python-jaraco-packaging
6350 (package
6351 (name "python-jaraco-packaging")
6352 (version "6.1")
6353 (source
6354 (origin
6355 (method url-fetch)
6356 (uri (pypi-uri "jaraco.packaging" version))
6357 (sha256
6358 (base32
6359 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
6360 (build-system python-build-system)
6361 (propagated-inputs
6362 `(("python-pytest" ,python-pytest)
6363 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
6364 ("python-pytest-flake8" ,python-pytest-flake8)
6365 ("python-rst.linker" ,python-rst.linker)
6366 ("python-setuptools" ,python-setuptools)
6367 ("python-setuptools-scm" ,python-setuptools-scm)
6368 ("python-six" ,python-six)
6369 ("python-sphinx" ,python-sphinx)))
6370 (home-page "https://github.com/jaraco/jaraco.packaging")
6371 (synopsis "Tools to supplement packaging Python releases")
6372 (description
6373 "This package provides various tools to supplement packaging Python
6374 releases.")
6375 (license license:expat)))
6376
6377 (define-public python-pathpy
6378 (package
6379 (name "python-pathpy")
6380 (version "11.5.1")
6381 (source
6382 (origin
6383 (method url-fetch)
6384 (uri (pypi-uri "path.py" version))
6385 (sha256
6386 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
6387 (outputs '("out" "doc"))
6388 (build-system python-build-system)
6389 (propagated-inputs
6390 `(("python-appdirs" ,python-appdirs)
6391 ("python-importlib-metadata" ,python-importlib-metadata)))
6392 (native-inputs
6393 `(("python-setuptools-scm" ,python-setuptools-scm)
6394 ("python-sphinx" ,python-sphinx)
6395 ("python-rst.linker" ,python-rst.linker)
6396 ("python-pytest" ,python-pytest)
6397 ("python-pytest-runner" ,python-pytest-runner)
6398 ("python-jaraco-packaging" ,python-jaraco-packaging)))
6399 (arguments
6400 `(#:phases
6401 (modify-phases %standard-phases
6402 (add-after 'build 'build-doc
6403 (lambda _
6404 (setenv "LANG" "en_US.UTF-8")
6405 (invoke "python" "setup.py" "build_sphinx")))
6406 (add-after 'install 'install-doc
6407 (lambda* (#:key outputs #:allow-other-keys)
6408 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
6409 (doc (string-append data "/doc/" ,name "-" ,version))
6410 (html (string-append doc "/html")))
6411 (mkdir-p html)
6412 (for-each (lambda (file)
6413 (copy-file file (string-append doc "/" file)))
6414 '("README.rst" "CHANGES.rst"))
6415 (copy-recursively "build/sphinx/html" html)
6416 #t)))
6417 (replace 'check
6418 (lambda _
6419 ;; The import time test aborts if an import takes longer than
6420 ;; 100ms. It may very well take a little longer than that.
6421 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
6422 (home-page "https://github.com/jaraco/path.py")
6423 (synopsis "Python module wrapper for built-in os.path")
6424 (description
6425 "@code{path.py} implements path objects as first-class entities, allowing
6426 common operations on files to be invoked on those path objects directly.")
6427 (license license:expat)))
6428
6429 (define-public python2-pathpy
6430 (package-with-python2 python-pathpy))
6431
6432 (define-public python-simplegeneric
6433 (package
6434 (name "python-simplegeneric")
6435 (version "0.8.1")
6436 (source
6437 (origin
6438 (method url-fetch)
6439 (uri (pypi-uri "simplegeneric" version ".zip"))
6440 (sha256
6441 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
6442 (build-system python-build-system)
6443 (native-inputs
6444 `(("unzip" ,unzip)))
6445 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
6446 (synopsis "Python module for simple generic functions")
6447 (description
6448 "The simplegeneric module lets you define simple single-dispatch generic
6449 functions, akin to Python’s built-in generic functions like @code{len()},
6450 @code{iter()} and so on. However, instead of using specially-named methods,
6451 these generic functions use simple lookup tables, akin to those used by
6452 e.g. @code{pickle.dump()} and other generic functions found in the Python
6453 standard library.")
6454 (license license:zpl2.1)))
6455
6456 (define-public python2-simplegeneric
6457 (package-with-python2 python-simplegeneric))
6458
6459 (define-public python-ipython-genutils
6460 ;; TODO: This package is retired, check if can be removed, see description.
6461 (package
6462 (name "python-ipython-genutils")
6463 (version "0.1.0")
6464 (source
6465 (origin
6466 (method url-fetch)
6467 (uri (pypi-uri "ipython_genutils" version))
6468 (sha256
6469 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
6470 (build-system python-build-system)
6471 (arguments `(#:tests? #f)) ; no tests
6472 (home-page "https://ipython.org")
6473 (synopsis "Vestigial utilities from IPython")
6474 (description
6475 "This package provides retired utilities from IPython. No packages
6476 outside IPython/Jupyter should depend on it.
6477
6478 This package shouldn't exist. It contains some common utilities shared by
6479 Jupyter and IPython projects during The Big Split. As soon as possible, those
6480 packages will remove their dependency on this, and this package will go
6481 away.")
6482 (license license:bsd-3)))
6483
6484 (define-public python2-ipython-genutils
6485 (package-with-python2 python-ipython-genutils))
6486
6487 (define-public python-ipyparallel
6488 (package
6489 (name "python-ipyparallel")
6490 (version "6.2.4")
6491 (source
6492 (origin
6493 (method url-fetch)
6494 (uri (pypi-uri "ipyparallel" version))
6495 (sha256
6496 (base32
6497 "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
6498 (build-system python-build-system)
6499 (arguments
6500 `(#:tests? #f ; RuntimeError: IO Loop failed to start
6501 #:phases
6502 (modify-phases %standard-phases
6503 (add-before 'check 'prepare-for-tests
6504 (lambda _
6505 (setenv "HOME" (getcwd))
6506 #t)))))
6507 (propagated-inputs
6508 `(("python-dateutil" ,python-dateutil)
6509 ("python-decorator" ,python-decorator)
6510 ("python-ipykernel" ,python-ipykernel)
6511 ("python-ipython" ,python-ipython)
6512 ("python-ipython-genutils" ,python-ipython-genutils)
6513 ("python-jupyter-client" ,python-jupyter-client)
6514 ("python-pyzmq" ,python-pyzmq)
6515 ("python-tornado" ,python-tornado)
6516 ("python-traitlets" ,python-traitlets)))
6517 (native-inputs
6518 `(("python-ipython" ,python-ipython)
6519 ("python-mock" ,python-mock)
6520 ("python-nose" ,python-nose)
6521 ("python-pytest" ,python-pytest)
6522 ("python-pytest-cov" ,python-pytest-cov)
6523 ("python-testpath" ,python-testpath)))
6524 (home-page "https://ipython.org/")
6525 (synopsis "Interactive Parallel Computing with IPython")
6526 (description
6527 "@code{ipyparallel} is a Python package and collection of CLI scripts for
6528 controlling clusters for Jupyter. @code{ipyparallel} contains the following
6529 CLI scripts:
6530 @enumerate
6531 @item ipcluster - start/stop a cluster
6532 @item ipcontroller - start a scheduler
6533 @item ipengine - start an engine
6534 @end enumerate")
6535 (license license:bsd-3)))
6536
6537 (define-public python2-ipyparallel
6538 (let ((ipyparallel (package-with-python2 python-ipyparallel)))
6539 (package
6540 (inherit ipyparallel)
6541 (propagated-inputs
6542 `(("python2-futures" ,python2-futures)
6543 ,@(package-propagated-inputs ipyparallel))))))
6544
6545 (define-public python-ipython-cluster-helper
6546 (package
6547 (name "python-ipython-cluster-helper")
6548 (version "0.6.4")
6549 (source
6550 (origin
6551 (method url-fetch)
6552 (uri (pypi-uri "ipython-cluster-helper" version))
6553 (sha256
6554 (base32
6555 "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
6556 (modules '((guix build utils)))
6557 (snippet
6558 '(begin (substitute* "requirements.txt"
6559 (("ipython.*") "ipython\n"))
6560 #t))))
6561 (build-system python-build-system)
6562 (arguments
6563 `(#:tests? #f ; Test suite can't find IPython.
6564 #:phases
6565 (modify-phases %standard-phases
6566 (replace 'check
6567 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6568 (if tests?
6569 (begin
6570 (setenv "HOME" (getcwd))
6571 (add-installed-pythonpath inputs outputs)
6572 (invoke "python" "example/example.py" "--local"))
6573 #t))))))
6574 (propagated-inputs
6575 `(("python-ipyparallel" ,python-ipyparallel)
6576 ("python-ipython" ,python-ipython)
6577 ("python-netifaces" ,python-netifaces)
6578 ("python-pyzmq" ,python-pyzmq)
6579 ("python-setuptools" ,python-setuptools)
6580 ("python-six" ,python-six)))
6581 (home-page "https://github.com/roryk/ipython-cluster-helper")
6582 (synopsis
6583 "Simplify IPython cluster start up and use for multiple schedulers")
6584 (description
6585 "@code{ipython-cluster-helper} creates a throwaway parallel IPython
6586 profile, launches a cluster and returns a view. On program exit it shuts the
6587 cluster down and deletes the throwaway profile.")
6588 (license license:expat)))
6589
6590 (define-public python2-ipython-cluster-helper
6591 (package-with-python2 python-ipython-cluster-helper))
6592
6593 (define-public python-traitlets
6594 (package
6595 (name "python-traitlets")
6596 (version "4.3.3")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "traitlets" version))
6601 (sha256
6602 (base32
6603 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
6604 (build-system python-build-system)
6605 (arguments
6606 `(#:phases
6607 (modify-phases %standard-phases
6608 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
6609 (propagated-inputs
6610 `(("python-ipython-genutils" ,python-ipython-genutils)
6611 ("python-decorator" ,python-decorator)))
6612 (native-inputs
6613 `(("python-pytest" ,python-pytest)))
6614 (properties `((python2-variant . ,(delay python2-traitlets))))
6615 (home-page "https://ipython.org")
6616 (synopsis "Configuration system for Python applications")
6617 (description
6618 "Traitlets is a framework that lets Python classes have attributes with
6619 type checking, dynamically calculated default values, and ‘on change’
6620 callbacks. The package also includes a mechanism to use traitlets for
6621 configuration, loading values from files or from command line arguments. This
6622 is a distinct layer on top of traitlets, so you can use traitlets in your code
6623 without using the configuration machinery.")
6624 (license license:bsd-3)))
6625
6626 (define-public python2-traitlets
6627 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
6628 (package
6629 (inherit traitlets)
6630 (propagated-inputs
6631 `(("python2-enum34" ,python2-enum34)
6632 ,@(package-propagated-inputs traitlets))))))
6633
6634 (define-public python-jupyter-core
6635 (package
6636 (name "python-jupyter-core")
6637 (version "4.4.0")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (string-append (pypi-uri "jupyter_core" version)))
6642 (sha256
6643 (base32
6644 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
6645 (build-system python-build-system)
6646 ;; FIXME: not sure how to run the tests
6647 (arguments `(#:tests? #f))
6648 (propagated-inputs
6649 `(("python-traitlets" ,python-traitlets)))
6650 (home-page "http://jupyter.org/")
6651 (synopsis "Jupyter base package")
6652 (description
6653 "Jupyter core is the base package on which Jupyter projects rely.")
6654 (license license:bsd-3)))
6655
6656 (define-public python2-jupyter-core
6657 (package-with-python2 python-jupyter-core))
6658
6659 (define-public python-jupyter-client
6660 (package
6661 (name "python-jupyter-client")
6662 (version "5.2.4")
6663 (source
6664 (origin
6665 (method url-fetch)
6666 (uri (pypi-uri "jupyter_client" version))
6667 (sha256
6668 (base32
6669 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
6670 (build-system python-build-system)
6671 ;; Tests fail because of missing native python kernel which I assume is
6672 ;; provided by the ipython package, which we cannot use because it would
6673 ;; cause a dependency cycle.
6674 (arguments
6675 `(#:tests? #f
6676
6677 #:phases (modify-phases %standard-phases
6678 (add-after 'unpack 'set-tool-file-names
6679 (lambda* (#:key inputs #:allow-other-keys)
6680 (let ((iproute (assoc-ref inputs "iproute")))
6681 (substitute* "jupyter_client/localinterfaces.py"
6682 (("'ip'")
6683 (string-append "'" iproute "/sbin/ip'")))
6684 #t))))))
6685 (inputs
6686 `(("iproute" ,iproute)))
6687 (propagated-inputs
6688 `(("python-pyzmq" ,python-pyzmq)
6689 ("python-traitlets" ,python-traitlets)
6690 ("python-jupyter-core" ,python-jupyter-core)))
6691 (home-page "http://jupyter.org/")
6692 (synopsis "Jupyter protocol implementation and client libraries")
6693 (description
6694 "The @code{jupyter_client} package contains the reference implementation
6695 of the Jupyter protocol. It also provides client and kernel management APIs
6696 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
6697 installing @code{kernelspec}s for use with Jupyter frontends.")
6698 (license license:bsd-3)))
6699
6700 (define-public python2-jupyter-client
6701 (package-with-python2 python-jupyter-client))
6702
6703 (define-public python-ipykernel
6704 (package
6705 (name "python-ipykernel")
6706 (version "5.1.3")
6707 (source
6708 (origin
6709 (method url-fetch)
6710 (uri (pypi-uri "ipykernel" version))
6711 (sha256
6712 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
6713 (build-system python-build-system)
6714 (arguments
6715 `(#:phases
6716 (modify-phases %standard-phases
6717 (replace 'check
6718 (lambda _
6719 (setenv "HOME" "/tmp")
6720 (invoke "pytest" "-v")
6721 #t))
6722 (add-after 'install 'set-python-file-name
6723 (lambda* (#:key outputs #:allow-other-keys)
6724 ;; Record the absolute file name of the 'python' executable in
6725 ;; 'kernel.json'.
6726 (let ((out (assoc-ref outputs "out")))
6727 (substitute* (string-append out "/share/jupyter"
6728 "/kernels/python3/kernel.json")
6729 (("\"python\"")
6730 (string-append "\"" (which "python") "\"")))
6731 #t))))))
6732 (propagated-inputs
6733 `(("python-ipython" ,python-ipython)
6734 ;; imported at runtime during connect
6735 ("python-jupyter-client" ,python-jupyter-client)))
6736 (native-inputs
6737 `(("python-flaky" ,python-flaky)
6738 ("python-nose" ,python-nose)
6739 ("python-pytest" ,python-pytest)))
6740 (home-page "https://ipython.org")
6741 (synopsis "IPython Kernel for Jupyter")
6742 (description
6743 "This package provides the IPython kernel for Jupyter.")
6744 (properties `((python2-variant . ,(delay python2-ipykernel))))
6745 (license license:bsd-3)))
6746
6747 ;; Version 5.x and above no longer support Python 2.
6748 (define-public python2-ipykernel
6749 (package
6750 (name "python2-ipykernel")
6751 (version "4.10.1")
6752 (source
6753 (origin
6754 (method url-fetch)
6755 (uri (pypi-uri "ipykernel" version))
6756 (sha256
6757 (base32 "1yzmdiy1djsszqp54jzd8ym8h4hpl67zjq83j2kxbkp0rwmlpdzf"))))
6758 (build-system python-build-system)
6759 (arguments
6760 `(#:python ,python-2))
6761 (propagated-inputs
6762 `(("python2-ipython" ,python2-ipython)
6763 ;; imported at runtime during connect
6764 ("python2-jupyter-client" ,python2-jupyter-client)
6765 ("python2-tornado" ,python2-tornado)
6766 ("python2-traitlets" ,python2-traitlets)))
6767 (native-inputs
6768 `(("python2-mock" ,python2-mock)
6769 ("python2-nose" ,python2-nose)
6770 ("python2-pytest" ,python2-pytest)
6771 ("python2-pytest-cov" ,python2-pytest-cov)))
6772 (home-page "https://ipython.org")
6773 (synopsis "IPython Kernel for Jupyter")
6774 (description
6775 "This package provides the IPython kernel for Jupyter.")
6776 (license license:bsd-3)))
6777
6778 (define-public python-pari-jupyter
6779 (package
6780 (name "python-pari-jupyter")
6781 (version "1.3.2")
6782 (source
6783 (origin
6784 (method url-fetch)
6785 (uri (pypi-uri "pari_jupyter" version))
6786 (sha256
6787 (base32
6788 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
6789 (build-system python-build-system)
6790 (propagated-inputs
6791 `(("python-ipykernel" ,python-ipykernel)))
6792 (inputs
6793 `(("pari-gp" ,pari-gp)
6794 ("readline" ,readline)))
6795 (arguments
6796 `(#:tests? #f)) ; no test suite
6797 (home-page
6798 "https://github.com/jdemeyer/pari_jupyter")
6799 (synopsis "A Jupyter kernel for PARI/GP")
6800 (description "The package provides a PARI/GP kernel for Jupyter.")
6801 (license license:gpl3+)))
6802
6803 (define-public python-backcall
6804 (package
6805 (name "python-backcall")
6806 (version "0.1.0")
6807 (source
6808 (origin
6809 (method url-fetch)
6810 (uri (pypi-uri "backcall" version))
6811 (sha256
6812 (base32
6813 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
6814 (build-system python-build-system)
6815 (home-page "https://github.com/takluyver/backcall/")
6816 (synopsis "Specifications for callback functions passed in to an API")
6817 (description
6818 "If your code lets other people supply callback functions, it's important
6819 to specify the function signature you expect, and check that functions support
6820 that. Adding extra parameters later would break other peoples code unless
6821 you're careful. The @code{backcall} package provides a way of specifying the
6822 callback signature using a prototype function.")
6823 (license license:bsd-3)))
6824
6825 (define-public python-ipython
6826 (package
6827 (name "python-ipython")
6828 (version "7.9.0")
6829 (source
6830 (origin
6831 (method url-fetch)
6832 (uri (pypi-uri "ipython" version ".tar.gz"))
6833 (sha256
6834 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
6835 (build-system python-build-system)
6836 (propagated-inputs
6837 `(("python-backcall" ,python-backcall)
6838 ("python-pyzmq" ,python-pyzmq)
6839 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
6840 ("python-terminado" ,python-terminado)
6841 ("python-matplotlib" ,python-matplotlib)
6842 ("python-numpy" ,python-numpy)
6843 ("python-numpydoc" ,python-numpydoc)
6844 ("python-jedi" ,python-jedi)
6845 ("python-jinja2" ,python-jinja2)
6846 ("python-mistune" ,python-mistune)
6847 ("python-pexpect" ,python-pexpect)
6848 ("python-pickleshare" ,python-pickleshare)
6849 ("python-simplegeneric" ,python-simplegeneric)
6850 ("python-jsonschema" ,python-jsonschema)
6851 ("python-traitlets" ,python-traitlets)
6852 ("python-nbformat" ,python-nbformat)
6853 ("python-pygments" ,python-pygments)))
6854 (inputs
6855 `(("readline" ,readline)
6856 ("which" ,which)))
6857 (native-inputs
6858 `(("graphviz" ,graphviz)
6859 ("pkg-config" ,pkg-config)
6860 ("python-requests" ,python-requests) ;; for tests
6861 ("python-testpath" ,python-testpath)
6862 ("python-nose" ,python-nose)))
6863 (arguments
6864 `(#:phases
6865 (modify-phases %standard-phases
6866 (add-after 'unpack 'make-docs-reproducible
6867 (lambda _
6868 (substitute* "IPython/sphinxext/ipython_directive.py"
6869 ((".*import datetime") "")
6870 ((".*datetime.datetime.now\\(\\)") "")
6871 (("%timeit") "# %timeit"))
6872 #t))
6873 ;; Tests can only be run after the library has been installed and not
6874 ;; within the source directory.
6875 (delete 'check)
6876 (add-after 'install 'check
6877 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
6878 (if tests?
6879 (begin
6880 ;; Make installed package available for running the tests
6881 (add-installed-pythonpath inputs outputs)
6882 (setenv "HOME" "/tmp/") ;; required by a test
6883 ;; We only test the core because one of the other tests
6884 ;; tries to import ipykernel.
6885 (invoke "python" "IPython/testing/iptest.py"
6886 "-v" "IPython/core/tests"))
6887 #t)))
6888 (add-before 'check 'fix-tests
6889 (lambda* (#:key inputs #:allow-other-keys)
6890 (substitute* "./IPython/utils/_process_posix.py"
6891 (("/usr/bin/env', 'which") (which "which")))
6892 (substitute* "./IPython/core/tests/test_inputtransformer.py"
6893 (("#!/usr/bin/env python")
6894 (string-append "#!" (which "python"))))
6895 ;; This test introduces a circular dependency on ipykernel
6896 ;; (which depends on ipython).
6897 (delete-file "IPython/core/tests/test_display.py")
6898 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
6899 (delete-file "IPython/core/tests/test_interactiveshell.py")
6900 #t)))))
6901 (home-page "https://ipython.org")
6902 (synopsis "IPython is a tool for interactive computing in Python")
6903 (description
6904 "IPython provides a rich architecture for interactive computing with:
6905 Powerful interactive shells, a browser-based notebook, support for interactive
6906 data visualization, embeddable interpreters and tools for parallel
6907 computing.")
6908 (properties `((python2-variant . ,(delay python2-ipython))))
6909 (license license:bsd-3)))
6910
6911 ;; This is the latest release of the LTS version of ipython with support for
6912 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
6913 ;; dropped support for Python 2.7.
6914 (define-public python2-ipython
6915 (package
6916 (name "python2-ipython")
6917 (version "5.8.0")
6918 (source
6919 (origin
6920 (method url-fetch)
6921 (uri (pypi-uri "ipython" version ".tar.gz"))
6922 (sha256
6923 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
6924 (build-system python-build-system)
6925 (propagated-inputs
6926 `(("python2-backports-shutil-get-terminal-size"
6927 ,python2-backports-shutil-get-terminal-size)
6928 ("python2-pathlib2" ,python2-pathlib2)
6929 ("python2-pyzmq" ,python2-pyzmq)
6930 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
6931 ("python2-terminado" ,python2-terminado)
6932 ("python2-matplotlib" ,python2-matplotlib)
6933 ("python2-numpy" ,python2-numpy)
6934 ("python2-numpydoc" ,python2-numpydoc)
6935 ("python2-jinja2" ,python2-jinja2)
6936 ("python2-mistune" ,python2-mistune)
6937 ("python2-pexpect" ,python2-pexpect)
6938 ("python2-pickleshare" ,python2-pickleshare)
6939 ("python2-simplegeneric" ,python2-simplegeneric)
6940 ("python2-jsonschema" ,python2-jsonschema)
6941 ("python2-traitlets" ,python2-traitlets)
6942 ("python2-nbformat" ,python2-nbformat)
6943 ("python2-pygments" ,python2-pygments)))
6944 (inputs
6945 `(("readline" ,readline)
6946 ("which" ,which)))
6947 (native-inputs
6948 `(("graphviz" ,graphviz)
6949 ("pkg-config" ,pkg-config)
6950 ("python2-requests" ,python2-requests) ;; for tests
6951 ("python2-testpath" ,python2-testpath)
6952 ("python2-mock" ,python2-mock)
6953 ("python2-nose" ,python2-nose)))
6954 (arguments
6955 `(#:python ,python-2
6956 #:phases
6957 (modify-phases %standard-phases
6958 (add-before 'check 'delete-broken-tests
6959 (lambda* (#:key inputs #:allow-other-keys)
6960 ;; These tests throw errors for unknown reasons.
6961 (delete-file "IPython/core/tests/test_displayhook.py")
6962 (delete-file "IPython/core/tests/test_magic_terminal.py")
6963 (delete-file "IPython/core/tests/test_profile.py")
6964 #t)))))
6965 (home-page "https://ipython.org")
6966 (synopsis "IPython is a tool for interactive computing in Python")
6967 (description
6968 "IPython provides a rich architecture for interactive computing with:
6969 Powerful interactive shells, a browser-based notebook, support for interactive
6970 data visualization, embeddable interpreters and tools for parallel
6971 computing.")
6972 (license license:bsd-3)))
6973
6974 (define-public python-ipython-documentation
6975 (package
6976 (inherit python-ipython)
6977 (name "python-ipython-documentation")
6978 (version (package-version python-ipython))
6979 (arguments
6980 `(#:phases
6981 (modify-phases %standard-phases
6982 (delete 'build)
6983 (delete 'check)
6984 (replace 'install
6985 (lambda* (#:key outputs #:allow-other-keys)
6986 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
6987 (doc (string-append data "/doc/" ,name "-" ,version))
6988 (html (string-append doc "/html"))
6989 (man1 (string-append data "/man/man1"))
6990 (info (string-append data "/info"))
6991 (examples (string-append doc "/examples"))
6992 (python-arg (string-append "PYTHON=" (which "python"))))
6993 (setenv "LANG" "en_US.utf8")
6994 (with-directory-excursion "docs"
6995 ;; FIXME: pdf fails to build
6996 ;;(system* "make" "pdf" "PAPER=a4")
6997 (system* "make" python-arg "html")
6998 ;; FIXME: the generated texi file contains ^@^@, which trips
6999 ;; up the parser.
7000 ;; (system* "make" python-arg "info")
7001 )
7002 (copy-recursively "docs/man" man1)
7003 (copy-recursively "examples" examples)
7004 (copy-recursively "docs/build/html" html)
7005 ;; (copy-file "docs/build/latex/ipython.pdf"
7006 ;; (string-append doc "/ipython.pdf"))
7007 (mkdir-p info)
7008 ;; (copy-file "docs/build/texinfo/ipython.info"
7009 ;; (string-append info "/ipython.info"))
7010 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
7011 #t)))))
7012 (inputs
7013 `(("python-ipython" ,python-ipython)
7014 ("python-ipykernel" ,python-ipykernel)))
7015 (native-inputs
7016 `(("python-sphinx" ,python-sphinx)
7017 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
7018 ;; FIXME: It's possible that a smaller union would work just as well.
7019 ("texlive" ,(texlive-union (list texlive-amsfonts
7020 texlive-fonts-ec
7021 texlive-generic-ifxetex
7022 texlive-generic-pdftex
7023 texlive-latex-capt-of
7024 texlive-latex-cmap
7025 texlive-latex-environ
7026 texlive-latex-eqparbox
7027 texlive-latex-etoolbox
7028 texlive-latex-expdlist
7029 texlive-latex-fancyhdr
7030 texlive-latex-fancyvrb
7031 texlive-latex-fncychap
7032 texlive-latex-float
7033 texlive-latex-framed
7034 texlive-latex-geometry
7035 texlive-latex-graphics
7036 texlive-latex-hyperref
7037 texlive-latex-mdwtools
7038 texlive-latex-multirow
7039 texlive-latex-needspace
7040 texlive-latex-oberdiek
7041 texlive-latex-parskip
7042 texlive-latex-preview
7043 texlive-latex-tabulary
7044 texlive-latex-threeparttable
7045 texlive-latex-titlesec
7046 texlive-latex-trimspaces
7047 texlive-latex-ucs
7048 texlive-latex-upquote
7049 texlive-latex-url
7050 texlive-latex-varwidth
7051 texlive-latex-wrapfig)))
7052 ("texinfo" ,texinfo)))))
7053
7054 (define-public python-urwid
7055 (package
7056 (name "python-urwid")
7057 (version "2.1.0")
7058 (source
7059 (origin
7060 (method url-fetch)
7061 (uri (pypi-uri "urwid" version))
7062 (sha256
7063 (base32
7064 "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
7065 (build-system python-build-system)
7066 (home-page "http://urwid.org")
7067 (synopsis "Console user interface library for Python")
7068 (description
7069 "Urwid is a curses-based UI/widget library for Python. It includes many
7070 features useful for text console applications.")
7071 (license license:lgpl2.1+)))
7072
7073 (define-public python2-urwid
7074 (package-with-python2 python-urwid))
7075
7076 (define-public python-urwidtrees
7077 (package
7078 (name "python-urwidtrees")
7079 (version "1.0.2")
7080 (source
7081 (origin
7082 (method git-fetch)
7083 ;; package author intends on distributing via github rather than pypi:
7084 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
7085 (uri (git-reference
7086 (url "https://github.com/pazz/urwidtrees")
7087 (commit version)))
7088 (file-name (git-file-name name version))
7089 (sha256
7090 (base32
7091 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
7092 (build-system python-build-system)
7093 (arguments
7094 '(#:use-setuptools? #f
7095 #:tests? #f)) ; no tests
7096 (propagated-inputs `(("python-urwid" ,python-urwid)))
7097 (home-page "https://github.com/pazz/urwidtrees")
7098 (synopsis "Tree widgets for urwid")
7099 (description "Urwidtrees is a Widget Container API for the @code{urwid}
7100 toolkit. Use it to build trees of widgets.")
7101 (license license:gpl3+)))
7102
7103 (define-public python2-urwidtrees
7104 (package-with-python2 python-urwidtrees))
7105
7106 (define-public python-ua-parser
7107 (package
7108 (name "python-ua-parser")
7109 (version "0.8.0")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "ua-parser" version))
7114 (sha256
7115 (base32
7116 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
7117 (build-system python-build-system)
7118 (arguments
7119 `(#:tests? #f)) ;no test suite in release
7120 (native-inputs
7121 `(("python-pyyaml" ,python-pyyaml)))
7122 (home-page "https://github.com/ua-parser/uap-python")
7123 (synopsis "User agent parser")
7124 (description
7125 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
7126 (license license:asl2.0)))
7127
7128 (define-public python2-ua-parser
7129 (package-with-python2 python-ua-parser))
7130
7131 (define-public python-user-agents
7132 (package
7133 (name "python-user-agents")
7134 (version "1.1.0")
7135 (source
7136 (origin
7137 (method url-fetch)
7138 (uri (pypi-uri "user-agents" version))
7139 (sha256
7140 (base32
7141 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
7142 (build-system python-build-system)
7143 (arguments
7144 `(#:tests? #f)) ;missing devices.json test file in release
7145 (propagated-inputs
7146 `(("python-ua-parser" ,python-ua-parser)))
7147 (home-page "https://github.com/selwin/python-user-agents")
7148 (synopsis "User Agent strings parsing library")
7149 (description
7150 "A library to identify devices (phones, tablets) and their capabilities by
7151 parsing (browser/HTTP) user agent strings.")
7152 (license license:expat)))
7153
7154 (define-public python2-user-agents
7155 (package-with-python2 python-user-agents))
7156
7157 (define-public python-dbus
7158 (package
7159 (name "python-dbus")
7160 (version "1.2.16")
7161 (source
7162 (origin
7163 (method url-fetch)
7164 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
7165 "dbus-python-" version ".tar.gz"))
7166 (sha256
7167 (base32 "196m5rk3qzw5nkmgzjl7wmq0v7vpwfhh8bz2sapdi5f9hqfqy8qi"))))
7168 (build-system gnu-build-system)
7169 (native-inputs
7170 `(("pkg-config" ,pkg-config)))
7171 (inputs
7172 `(("python" ,python-wrapper)
7173 ("dbus-glib" ,dbus-glib)))
7174 (synopsis "Python bindings for D-bus")
7175 (description "python-dbus provides bindings for libdbus, the reference
7176 implementation of D-Bus.")
7177 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
7178 (license license:expat)))
7179
7180 (define-public python2-dbus
7181 (package (inherit python-dbus)
7182 (name "python2-dbus")
7183 (inputs `(("python" ,python-2)
7184 ,@(alist-delete "python"
7185 (package-inputs python-dbus)
7186 equal?)))))
7187
7188 (define-public python-notify2
7189 (package
7190 (name "python-notify2")
7191 (version "0.3.1")
7192 (source
7193 (origin
7194 (method url-fetch)
7195 (uri (pypi-uri "notify2" version))
7196 (sha256
7197 (base32
7198 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
7199 (build-system python-build-system)
7200 (arguments `(#:tests? #f)) ; tests depend on system state
7201 (native-inputs
7202 `(("python-dbus" ,python-dbus)))
7203 (home-page "https://bitbucket.org/takluyver/pynotify2")
7204 (synopsis "Python interface to D-Bus notifications")
7205 (description
7206 "Pynotify2 provides a Python interface for sending D-Bus notifications.
7207 It is a reimplementation of pynotify in pure Python, and an alternative to
7208 the GObject Introspection bindings to libnotify for non-GTK applications.")
7209 (license (list license:bsd-2
7210 license:lgpl2.1+))))
7211
7212 (define-public python2-notify2
7213 (package-with-python2 python-notify2))
7214
7215 ;; beautifulsoup4 has a totally different namespace than 3.x,
7216 ;; and pypi seems to put it under its own name, so I guess we should too
7217 (define-public python-beautifulsoup4
7218 (package
7219 (name "python-beautifulsoup4")
7220 (version "4.9.1")
7221 (source
7222 (origin
7223 (method url-fetch)
7224 (uri (pypi-uri "beautifulsoup4" version))
7225 (sha256
7226 (base32
7227 "1mvzlw3pzbhsvl3z8784s5h7iiflm2hggiy1fxyrrxwnbc8lvk3k"))))
7228 (build-system python-build-system)
7229 (arguments
7230 `(#:phases
7231 (modify-phases %standard-phases
7232 ;; The Python 2 source is the definitive source of beautifulsoup4. We
7233 ;; must use this conversion script when building with Python 3. The
7234 ;; conversion script also runs the tests.
7235 ;; For more information, see the file 'convert-py3k' in the source
7236 ;; distribution.
7237 (replace 'check
7238 (lambda _ (invoke "./convert-py3k"))))))
7239 (propagated-inputs
7240 `(("python-soupsieve" ,python-soupsieve)))
7241 (home-page
7242 "https://www.crummy.com/software/BeautifulSoup/bs4/")
7243 (synopsis
7244 "Python screen-scraping library")
7245 (description
7246 "Beautiful Soup is a Python library designed for rapidly setting up
7247 screen-scraping projects. It offers Pythonic idioms for navigating,
7248 searching, and modifying a parse tree, providing a toolkit for
7249 dissecting a document and extracting what you need. It automatically
7250 converts incoming documents to Unicode and outgoing documents to UTF-8.")
7251 (license license:expat)
7252 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
7253
7254 (define-public python2-beautifulsoup4
7255 (package
7256 (inherit (package-with-python2
7257 (strip-python2-variant python-beautifulsoup4)))
7258 (arguments `(#:python ,python-2))))
7259
7260 (define-public python-soupsieve
7261 (package
7262 (name "python-soupsieve")
7263 (version "2.0.1")
7264 (source
7265 (origin
7266 (method url-fetch)
7267 (uri (pypi-uri "soupsieve" version))
7268 (sha256
7269 (base32
7270 "0ch2rhvsbwfpvzm4kzy81rclbzr533yv83hzg1gx55byfa0w37d5"))))
7271 (build-system python-build-system)
7272 (arguments `(#:tests? #f))
7273 ;;XXX: 2 tests fail currently despite claming they were to be
7274 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
7275 ;;don't want to create a circular dependency.
7276 (home-page "https://github.com/facelessuser/soupsieve")
7277 (synopsis "CSS selector library")
7278 (description
7279 "Soup Sieve is a CSS selector library designed to be used with Beautiful
7280 Soup 4. It aims to provide selecting, matching, and filtering using modern
7281 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
7282 specifications up through the latest CSS level 4 drafts and beyond (though
7283 some are not yet implemented).")
7284 (properties `((python2-variant . ,(delay python2-soupsieve))))
7285 (license license:expat)))
7286
7287 ;; This is the last version that supports python-2
7288 (define-public python2-soupsieve
7289 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
7290 (package
7291 (inherit base)
7292 (version "1.9.6")
7293 (source
7294 (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "soupsieve" version))
7297 (sha256
7298 (base32
7299 "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
7300 (propagated-inputs
7301 `(("python2-backports-functools-lru-cache"
7302 ,python2-backports-functools-lru-cache)
7303 ,@(package-propagated-inputs base))))))
7304
7305 (define-public python-netifaces
7306 (package
7307 (name "python-netifaces")
7308 (version "0.10.9")
7309 (source
7310 (origin
7311 (method url-fetch)
7312 (uri (pypi-uri "netifaces" version))
7313 (sha256
7314 (base32
7315 "1wxby874kcr3pp4ygzk5aiarbzhg1yi093d56s1qg4k2s7yrzvid"))))
7316 (build-system python-build-system)
7317 (home-page "https://github.com/al45tair/netifaces")
7318 (synopsis
7319 "Python module for portable network interface information")
7320 (description
7321 "Netifaces is a Python module providing information on network
7322 interfaces in an easy and portable manner.")
7323 (license license:expat)))
7324
7325 (define-public python2-netifaces
7326 (package-with-python2 python-netifaces))
7327
7328 (define-public python-networkx
7329 (package
7330 (name "python-networkx")
7331 (version "2.4")
7332 (source
7333 (origin
7334 (method url-fetch)
7335 (uri (pypi-uri "networkx" version))
7336 (sha256
7337 (base32 "0r2wr7aqay9fwjrgk35fkjzk8lvvb4i4df7ndaqzkr4ndw5zzx7q"))))
7338 (build-system python-build-system)
7339 (arguments
7340 '(#:phases (modify-phases %standard-phases
7341 (replace 'check
7342 (lambda* (#:key tests? #:allow-other-keys)
7343 (if tests?
7344 (invoke "pytest" "-vv" "--pyargs" "networkx")
7345 (format #t "test suite not run~%"))
7346 #t)))))
7347 ;; python-decorator is needed at runtime.
7348 (propagated-inputs
7349 `(("python-decorator" ,python-decorator)))
7350 (native-inputs
7351 `(("python-pytest" ,python-pytest)))
7352 (home-page "https://networkx.github.io/")
7353 (synopsis "Python module for creating and manipulating graphs and networks")
7354 (description
7355 "NetworkX is a Python package for the creation, manipulation, and study
7356 of the structure, dynamics, and functions of complex networks.")
7357 (properties `((python2-variant . ,(delay python2-networkx))))
7358 (license license:bsd-3)))
7359
7360 ;; NetworkX 2.2 is the last version with support for Python 2.
7361 (define-public python2-networkx
7362 (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
7363 (package
7364 (inherit base)
7365 (version "2.2")
7366 (source (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "networkx" version ".zip"))
7369 (sha256
7370 (base32
7371 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
7372 (arguments
7373 `(#:python ,python-2))
7374 (native-inputs
7375 `(("python-nose" ,python2-nose)
7376 ("unzip" ,unzip))))))
7377
7378 (define-public python-datrie
7379 (package
7380 (name "python-datrie")
7381 (version "0.8.2")
7382 (source
7383 (origin
7384 (method url-fetch)
7385 (uri (pypi-uri "datrie" version))
7386 (sha256
7387 (base32
7388 "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
7389 (build-system python-build-system)
7390 (native-inputs
7391 `(("python-cython" ,python-cython)
7392 ("python-hypothesis" ,python-hypothesis)
7393 ("python-pytest" ,python-pytest)
7394 ("python-pytest-runner" ,python-pytest-runner)))
7395 (home-page "https://github.com/kmike/datrie")
7396 (synopsis "Fast, efficiently stored trie for Python")
7397 (description
7398 "This package provides a fast, efficiently stored trie implementation for
7399 Python.")
7400 (license license:lgpl2.1+)))
7401
7402 (define-public snakemake
7403 (package
7404 (name "snakemake")
7405 (version "5.7.1")
7406 (source
7407 (origin
7408 (method url-fetch)
7409 (uri (pypi-uri "snakemake" version))
7410 (sha256
7411 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
7412 (build-system python-build-system)
7413 (arguments
7414 ;; TODO: Package missing test dependencies.
7415 '(#:tests? #f
7416 #:phases
7417 (modify-phases %standard-phases
7418 ;; For cluster execution Snakemake will call Python. Since there is
7419 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
7420 ;; this by calling the snakemake wrapper instead.
7421 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
7422 (lambda* (#:key outputs #:allow-other-keys)
7423 (substitute* "snakemake/executors.py"
7424 (("\\{sys.executable\\} -m snakemake")
7425 (string-append (assoc-ref outputs "out")
7426 "/bin/snakemake")))
7427 #t)))))
7428 (propagated-inputs
7429 `(("python-appdirs" ,python-appdirs)
7430 ("python-configargparse" ,python-configargparse)
7431 ("python-datrie" ,python-datrie)
7432 ("python-docutils" ,python-docutils)
7433 ("python-gitpython" ,python-gitpython)
7434 ("python-jinja2" ,python-jinja2)
7435 ("python-jsonschema" ,python-jsonschema)
7436 ("python-networkx" ,python-networkx)
7437 ("python-psutil" ,python-psutil)
7438 ("python-pyyaml" ,python-pyyaml)
7439 ("python-ratelimiter" ,python-ratelimiter)
7440 ("python-requests" ,python-requests)
7441 ("python-wrapt" ,python-wrapt)))
7442 (home-page "https://snakemake.readthedocs.io")
7443 (synopsis "Python-based execution environment for make-like workflows")
7444 (description
7445 "Snakemake aims to reduce the complexity of creating workflows by
7446 providing a clean and modern domain specific specification language (DSL) in
7447 Python style, together with a fast and comfortable execution environment.")
7448 (license license:expat)))
7449
7450 (define-public python-pyqrcode
7451 (package
7452 (name "python-pyqrcode")
7453 (version "1.2.1")
7454 (source
7455 (origin
7456 (method url-fetch)
7457 (uri (pypi-uri "PyQRCode" version))
7458 (sha256
7459 (base32
7460 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
7461 (build-system python-build-system)
7462 (home-page
7463 "https://github.com/mnooner256/pyqrcode")
7464 (synopsis "QR code generator")
7465 (description
7466 "Pyqrcode is a QR code generator written purely in Python with
7467 SVG, EPS, PNG and terminal output.")
7468 (license license:bsd-3)))
7469
7470 (define-public python-seaborn
7471 (package
7472 (name "python-seaborn")
7473 (version "0.10.0")
7474 (source
7475 (origin
7476 (method url-fetch)
7477 (uri (pypi-uri "seaborn" version))
7478 (sha256
7479 (base32 "1ffbms4kllihfycf6j57dziq4imgdjw03sqgifh5wzcd2d743zjr"))))
7480 (build-system python-build-system)
7481 (arguments
7482 `(#:phases
7483 (modify-phases %standard-phases
7484 (add-before 'check 'start-xserver
7485 (lambda* (#:key inputs #:allow-other-keys)
7486 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7487 ;; There must be a running X server and make check doesn't
7488 ;; start one. Therefore we must do it.
7489 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7490 (setenv "DISPLAY" ":1")
7491 #t)))
7492 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
7493 (propagated-inputs
7494 `(("python-pandas" ,python-pandas)
7495 ("python-matplotlib" ,python-matplotlib)
7496 ("python-numpy" ,python-numpy)
7497 ("python-scipy" ,python-scipy)))
7498 (native-inputs
7499 `(("python-pytest" ,python-pytest)
7500 ("xorg-server" ,xorg-server-for-tests)))
7501 (home-page "https://seaborn.pydata.org/")
7502 (synopsis "Statistical data visualization")
7503 (description
7504 "Seaborn is a library for making attractive and informative statistical
7505 graphics in Python. It is built on top of matplotlib and tightly integrated
7506 with the PyData stack, including support for numpy and pandas data structures
7507 and statistical routines from scipy and statsmodels.")
7508 (properties `((python2-variant . ,(delay python2-seaborn))))
7509 (license license:bsd-3)))
7510
7511 ;; 0.9.1 is the last release with support for Python 2.
7512 (define-public python2-seaborn
7513 (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
7514 (package
7515 (inherit base)
7516 (version "0.9.1")
7517 (source (origin
7518 (method url-fetch)
7519 (uri (pypi-uri "seaborn" version))
7520 (sha256
7521 (base32
7522 "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
7523
7524 (define-public python-mpmath
7525 (package
7526 (name "python-mpmath")
7527 (version "0.19")
7528 (source (origin
7529 (method url-fetch)
7530 (uri (string-append "http://mpmath.org/files/mpmath-"
7531 version ".tar.gz"))
7532 (sha256
7533 (base32
7534 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
7535 (build-system python-build-system)
7536 (arguments
7537 '(#:phases
7538 (modify-phases %standard-phases
7539 (replace 'check
7540 (lambda _
7541 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
7542 (home-page "http://mpmath.org")
7543 (synopsis "Arbitrary-precision floating-point arithmetic in python")
7544 (description
7545 "@code{mpmath} can be used as an arbitrary-precision substitute for
7546 Python's float/complex types and math/cmath modules, but also does much
7547 more advanced mathematics.")
7548 (license license:bsd-3)))
7549
7550 (define-public python2-mpmath
7551 (package-with-python2 python-mpmath))
7552
7553 (define-public python-bigfloat
7554 (package
7555 (name "python-bigfloat")
7556 (version "0.3.0")
7557 (source
7558 (origin
7559 (method url-fetch)
7560 (uri (pypi-uri "bigfloat" version))
7561 (sha256
7562 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
7563 (build-system python-build-system)
7564 (inputs
7565 `(("mpfr" ,mpfr)))
7566 (home-page "https://github.com/mdickinson/bigfloat")
7567 (synopsis "Arbitrary precision floating-point arithmetic for Python")
7568 (description
7569 "This package provides a Python interface to the MPFR library for
7570 multiprecision arithmetic.")
7571 (license license:lgpl3+)))
7572
7573 (define-public python2-bigfloat
7574 (package-with-python2 python-bigfloat))
7575
7576 (define-public python-sympy
7577 (package
7578 (name "python-sympy")
7579 (version "1.1.1")
7580 (source
7581 (origin
7582 (method url-fetch)
7583 (uri (string-append
7584 "https://github.com/sympy/sympy/releases/download/sympy-"
7585 version "/sympy-" version ".tar.gz"))
7586 (sha256
7587 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
7588 (build-system python-build-system)
7589 (arguments
7590 `(#:phases
7591 (modify-phases %standard-phases
7592 ;; Run the core tests after installation. By default it would run
7593 ;; *all* tests, which take a very long time to complete and are known
7594 ;; to be flaky.
7595 (delete 'check)
7596 (add-after 'install 'check
7597 (lambda* (#:key outputs #:allow-other-keys)
7598 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
7599 #t)))))
7600 (propagated-inputs
7601 `(("python-mpmath" ,python-mpmath)))
7602 (home-page "https://www.sympy.org/")
7603 (synopsis "Python library for symbolic mathematics")
7604 (description
7605 "SymPy is a Python library for symbolic mathematics. It aims to become a
7606 full-featured computer algebra system (CAS) while keeping the code as simple
7607 as possible in order to be comprehensible and easily extensible.")
7608 (license license:bsd-3)))
7609
7610 (define-public python2-sympy
7611 (package
7612 (inherit (package-with-python2 python-sympy))
7613 (arguments
7614 `(#:phases
7615 (modify-phases %standard-phases
7616 ;; Run the core tests after installation. By default it would run
7617 ;; *all* tests, which take a very long time to complete and are known
7618 ;; to be flaky.
7619 (delete 'check)
7620 (add-after 'install 'check
7621 (lambda* (#:key outputs #:allow-other-keys)
7622 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
7623 #t)))))))
7624
7625 (define-public python-q
7626 (package
7627 (name "python-q")
7628 (version "2.6")
7629 (source
7630 (origin
7631 (method url-fetch)
7632 (uri (pypi-uri "q" version))
7633 (sha256
7634 (base32
7635 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
7636 (build-system python-build-system)
7637 (home-page "https://github.com/zestyping/q")
7638 (synopsis "Quick-and-dirty debugging output for tired programmers")
7639 (description
7640 "q is a Python module for \"print\" style of debugging Python code. It
7641 provides convenient short API for print out of values, tracebacks, and
7642 falling into the Python interpreter.")
7643 (license license:asl2.0)))
7644
7645 (define-public python2-q
7646 (package-with-python2 python-q))
7647
7648 (define-public python-xlib
7649 (package
7650 (name "python-xlib")
7651 (version "0.27")
7652 (source
7653 (origin
7654 (method git-fetch)
7655 (uri (git-reference
7656 (url "https://github.com/python-xlib/python-xlib")
7657 (commit version)))
7658 (file-name (git-file-name name version))
7659 (sha256
7660 (base32 "09kimic8rhprx3q8nzalc4aggg42ahqm4v5qcj8dm68yvxfdk986"))))
7661 (build-system python-build-system)
7662 (arguments
7663 `(#:phases
7664 (modify-phases %standard-phases
7665 (add-before 'check 'start-xserver
7666 (lambda* (#:key inputs #:allow-other-keys)
7667 (let ((xorg-server (assoc-ref inputs "xorg-server")))
7668 ;; There must be a running X server and make check doesn't
7669 ;; start one. Therefore we must do it.
7670 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
7671 (setenv "DISPLAY" ":1")
7672 #t))))))
7673 (native-inputs
7674 `(("python-mock" ,python-mock)
7675 ("python-setuptools-scm" ,python-setuptools-scm)
7676 ("python-six" ,python-six)
7677 ("xorg-server" ,xorg-server)))
7678 (home-page "https://github.com/python-xlib/python-xlib")
7679 (synopsis "Python X11 client library")
7680 (description
7681 "The Python X Library is intended to be a fully functional
7682 X client library for Python programs. It is useful to implement
7683 low-level X clients. It is written entirely in Python.")
7684 (license license:gpl2+)))
7685
7686 (define-public python2-xlib
7687 (package-with-python2 python-xlib))
7688
7689 (define-public python-singledispatch
7690 (package
7691 (name "python-singledispatch")
7692 (version "3.4.0.3")
7693 (source
7694 (origin
7695 (method url-fetch)
7696 (uri (pypi-uri "singledispatch" version))
7697 (sha256
7698 (base32
7699 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
7700 (build-system python-build-system)
7701 (native-inputs
7702 `(("python-six" ,python-six))) ; required for conversion, not at run-time
7703 (home-page
7704 "https://docs.python.org/3/library/functools.html#functools.singledispatch")
7705 (synopsis "Backport of singledispatch feature from Python 3.4")
7706 (description
7707 "This library brings functools.singledispatch from Python 3.4 to Python
7708 2.6-3.3.")
7709 (license license:expat)))
7710
7711 (define-public python2-singledispatch
7712 (package-with-python2 python-singledispatch))
7713
7714 ;; the python- version can be removed with python-3.5
7715 (define-public python-backports-abc
7716 (package
7717 (name "python-backports-abc")
7718 (version "0.5")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "backports_abc" version))
7723 (sha256
7724 (base32
7725 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
7726 (build-system python-build-system)
7727 (home-page "https://github.com/cython/backports_abc")
7728 (synopsis "Backport of additions to the 'collections.abc' module")
7729 (description
7730 "Python-backports-abc provides a backport of additions to the
7731 @code{collections.abc} module in Python-3.5.")
7732 (license license:psfl)))
7733
7734 (define-public python2-backports-abc
7735 (package-with-python2 python-backports-abc))
7736
7737 (define-public python-backports-csv
7738 (package
7739 (name "python-backports-csv")
7740 (version "1.0.7")
7741 (source
7742 (origin
7743 (method url-fetch)
7744 (uri (pypi-uri "backports.csv" version))
7745 (sha256
7746 (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
7747 (build-system python-build-system)
7748 (home-page "https://github.com/ryanhiebert/backports.csv")
7749 (synopsis "Backport of Python 3's csv module for Python 2")
7750 (description
7751 "Provides a backport of Python 3's @code{csv} module for parsing
7752 comma separated values. The API of the @code{csv} module in Python 2
7753 is drastically different from the @code{csv} module in Python 3.
7754 This is due, for the most part, to the difference between str in
7755 Python 2 and Python 3.")
7756 (license license:psfl)))
7757
7758 (define-public python2-backports-csv
7759 (package-with-python2 python-backports-csv))
7760
7761 (define-public python2-backports-shutil-get-terminal-size
7762 (package
7763 (name "python2-backports-shutil-get-terminal-size")
7764 (version "1.0.0")
7765 (source
7766 (origin
7767 (method url-fetch)
7768 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
7769 (sha256
7770 (base32
7771 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
7772 (build-system python-build-system)
7773 (arguments
7774 `(#:python ,python-2
7775 #:phases
7776 (modify-phases %standard-phases
7777 (replace 'check
7778 (lambda _
7779 (setenv "PYTHONPATH" (string-append "./build/lib:"
7780 (getenv "PYTHONPATH")))
7781 (invoke "py.test" "-v"))))))
7782 (native-inputs
7783 `(("python2-pytest" ,python2-pytest)))
7784 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
7785 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
7786 (description
7787 "This package provides a backport of the @code{get_terminal_size
7788 function} from Python 3.3's @code{shutil}.
7789 Unlike the original version it is written in pure Python rather than C,
7790 so it might be a tiny bit slower.")
7791 (license license:expat)))
7792
7793 (define-public python-waf
7794 (package
7795 (name "python-waf")
7796 (version "2.0.19")
7797 (source (origin
7798 (method url-fetch)
7799 (uri (string-append "https://waf.io/"
7800 "waf-" version ".tar.bz2"))
7801 (sha256
7802 (base32
7803 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
7804 (build-system python-build-system)
7805 (arguments
7806 '(#:phases
7807 (modify-phases %standard-phases
7808 (replace 'build
7809 (lambda _
7810 ;; XXX: Find a way to add all extra tools.
7811 (let ((tools '("gccdeps"
7812 "clang_compilation_database")))
7813 (invoke "python" "waf-light" "configure" "build"
7814 (string-append "--tools="
7815 (string-join tools ","))))))
7816 (replace 'check
7817 (lambda _
7818 (invoke "python" "waf" "--version")))
7819 (replace 'install
7820 (lambda* (#:key outputs #:allow-other-keys)
7821 (let ((out (assoc-ref outputs "out")))
7822 (install-file "waf" (string-append out "/bin")))
7823 #t))
7824 ;; waf breaks when it is wrapped.
7825 (delete 'wrap))))
7826 (home-page "https://waf.io/")
7827 (synopsis "Python-based build system")
7828 (description
7829 "Waf is a Python-based framework for configuring, compiling and installing
7830 applications.")
7831 (license license:bsd-3)))
7832
7833 (define-public python2-waf
7834 (package-with-python2 python-waf))
7835
7836 (define-public python-pyzmq
7837 (package
7838 (name "python-pyzmq")
7839 (version "17.1.2")
7840 (source
7841 (origin
7842 (method url-fetch)
7843 (uri (pypi-uri "pyzmq" version))
7844 (sha256
7845 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
7846 (build-system python-build-system)
7847 (arguments
7848 `(#:configure-flags
7849 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
7850 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
7851 ;; --inplace' for 'python setup.py test' to work.
7852 #:tests? #f))
7853 (inputs
7854 `(("zeromq" ,zeromq)))
7855 (native-inputs
7856 `(("pkg-config" ,pkg-config)
7857 ("python-nose" ,python-nose)))
7858 (home-page "https://github.com/zeromq/pyzmq")
7859 (synopsis "Python bindings for 0MQ")
7860 (description
7861 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
7862 (license license:bsd-4)))
7863
7864 (define-public python2-pyzmq
7865 (package-with-python2 python-pyzmq))
7866
7867 (define-public python-pep8
7868 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
7869 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
7870 ;; some dependents' test suites, and nothing more.
7871 (package
7872 (name "python-pep8")
7873 (version "1.7.0")
7874 (source
7875 (origin
7876 (method url-fetch)
7877 (uri (pypi-uri "pep8" version))
7878 (sha256
7879 (base32
7880 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
7881 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
7882 (build-system python-build-system)
7883 (home-page "https://pep8.readthedocs.org/")
7884 (synopsis "Python style guide checker")
7885 (description
7886 "This tools checks Python code against some of the style conventions in
7887 PEP 8.")
7888 (license license:expat)))
7889
7890 (define-public python2-pep8
7891 (package-with-python2 python-pep8))
7892
7893 (define-public python-pep517
7894 (package
7895 (name "python-pep517")
7896 (version "0.8.2")
7897 (source
7898 (origin
7899 (method url-fetch)
7900 (uri (pypi-uri "pep517" version))
7901 (sha256
7902 (base32
7903 "17m2bcabx3sr5wjalgzppfx5xahqrwm12zq58h68mm482b7rjqcf"))))
7904 (build-system python-build-system)
7905 (arguments
7906 '(#:phases
7907 (modify-phases %standard-phases
7908 (replace 'check
7909 (lambda* (#:key tests? #:allow-other-keys)
7910 (delete-file "pytest.ini")
7911 ;; This test tries to connect to the internet
7912 (delete-file "tests/test_meta.py")
7913 (if tests?
7914 (invoke "pytest")
7915 #t))))))
7916 (native-inputs
7917 `(("python-mock" ,python-mock)
7918 ("python-pytest" ,python-pytest)
7919 ("python-testpath" ,python-testpath)))
7920 (propagated-inputs
7921 `(("python-toml" ,python-toml)
7922 ("python-wheel" ,python-wheel)))
7923 (home-page "https://github.com/pypa/pep517")
7924 (synopsis "Wrappers to build Python packages using PEP 517 hooks")
7925 (description
7926 "Wrappers to build Python packages using PEP 517 hooks.")
7927 (properties `((python2-variant . ,(delay python2-pep517))))
7928 (license license:expat)))
7929
7930 ;; Skip the tests so we don't create a cyclical dependency with pytest.
7931 (define-public python2-pep517
7932 (let ((base (package-with-python2
7933 (strip-python2-variant python-pep517))))
7934 (package
7935 (inherit base)
7936 (name "python2-pep517")
7937 (arguments
7938 `(#:tests? #f
7939 ,@(package-arguments base)))
7940 (native-inputs `()))))
7941
7942 (define-public python-pyflakes
7943 (package
7944 (name "python-pyflakes")
7945 (version "2.2.0")
7946 (source
7947 (origin
7948 (method url-fetch)
7949 (uri (pypi-uri "pyflakes" version))
7950 (sha256
7951 (base32
7952 "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))))
7953 (build-system python-build-system)
7954 (home-page
7955 "https://github.com/pyflakes/pyflakes")
7956 (synopsis "Passive checker of Python programs")
7957 (description
7958 "Pyflakes statically checks Python source code for common errors.")
7959 (license license:expat)))
7960
7961 (define-public python2-pyflakes
7962 (package-with-python2 python-pyflakes))
7963
7964 ;; Flake8 2.6 requires an older version of pyflakes.
7965 ;; This should be removed ASAP.
7966 (define-public python-pyflakes-1.2
7967 (package (inherit python-pyflakes)
7968 (version "1.2.3")
7969 (source
7970 (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "pyflakes" version))
7973 (sha256
7974 (base32
7975 "17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
7976 (arguments
7977 '(#:phases
7978 (modify-phases %standard-phases
7979 ;; This one test fails.
7980 (replace 'check
7981 (lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
7982 (native-inputs
7983 `(("python-pytest" ,python-pytest)))))
7984
7985 (define-public python-mccabe
7986 (package
7987 (name "python-mccabe")
7988 (version "0.6.1")
7989 (source
7990 (origin
7991 (method url-fetch)
7992 (uri (pypi-uri "mccabe" version))
7993 (sha256
7994 (base32
7995 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
7996 (build-system python-build-system)
7997 (native-inputs
7998 `(("python-pytest" ,python-pytest-bootstrap)
7999 ("python-pytest-runner" ,python-pytest-runner)))
8000 (home-page "https://github.com/flintwork/mccabe")
8001 (synopsis "McCabe checker, plugin for flake8")
8002 (description
8003 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
8004 complexity of Python source code.")
8005 (license license:expat)))
8006
8007 (define-public python2-mccabe
8008 (package-with-python2 python-mccabe))
8009
8010 (define-public python-mccabe-0.2.1
8011 (package (inherit python-mccabe)
8012 (version "0.2.1")
8013 (source
8014 (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "mccabe" version))
8017 (sha256
8018 (base32
8019 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
8020
8021 (define-public python2-mccabe-0.2.1
8022 (package-with-python2 python-mccabe-0.2.1))
8023
8024 ;; Flake8 2.4.1 requires an older version of pep8.
8025 ;; This should be removed ASAP.
8026 (define-public python-pep8-1.5.7
8027 (package (inherit python-pep8)
8028 (version "1.5.7")
8029 (source
8030 (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "pep8" version))
8033 (sha256
8034 (base32
8035 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
8036 (arguments
8037 ;; XXX Tests not compatible with Python 3.5.
8038 '(#:tests? #f))))
8039
8040 (define-public python2-pep8-1.5.7
8041 (package-with-python2 python-pep8-1.5.7))
8042
8043 (define-public python-flake8
8044 (package
8045 (name "python-flake8")
8046 (version "3.8.3")
8047 (source (origin
8048 (method url-fetch)
8049 (uri (pypi-uri "flake8" version))
8050 (sha256
8051 (base32
8052 "02527892hh0qjivxaiphzalj7q32qkna1cqaikjs7c03mk5ryjzh"))))
8053 (build-system python-build-system)
8054 (arguments
8055 `(#:phases
8056 (modify-phases %standard-phases
8057 (delete 'check)
8058 (add-after 'install 'check
8059 (lambda* (#:key inputs outputs #:allow-other-keys)
8060 (add-installed-pythonpath inputs outputs)
8061 (invoke "pytest" "-v")
8062 #t)))))
8063 (propagated-inputs
8064 `(("python-pycodestyle" ,python-pycodestyle)
8065 ("python-entrypoints" ,python-entrypoints)
8066 ("python-pyflakes" ,python-pyflakes)
8067 ("python-mccabe" ,python-mccabe)))
8068 (native-inputs
8069 `(("python-mock" ,python-mock)
8070 ("python-pytest" ,python-pytest-bootstrap)))
8071 (home-page "https://gitlab.com/pycqa/flake8")
8072 (synopsis
8073 "The modular source code checker: pep8, pyflakes and co")
8074 (description
8075 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
8076 (properties `((python2-variant . ,(delay python2-flake8))))
8077 (license license:expat)))
8078
8079 (define-public python2-flake8
8080 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
8081 (package (inherit base)
8082 (propagated-inputs
8083 `(("python2-configparser" ,python2-configparser)
8084 ("python2-enum34" ,python2-enum34)
8085 ("python2-functools32" ,python2-functools32)
8086 ("python2-typing" ,python2-typing)
8087 ,@(package-propagated-inputs base))))))
8088
8089 ;; python-hacking requires flake8 <2.7.0.
8090 (define-public python-flake8-2.6
8091 (package
8092 (inherit python-flake8)
8093 (version "2.6.2")
8094 (source (origin
8095 (method url-fetch)
8096 (uri (pypi-uri "flake8" version))
8097 (sha256
8098 (base32
8099 "0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
8100 (arguments
8101 `(#:phases
8102 (modify-phases %standard-phases
8103 (add-after 'unpack 'use-later-pycodestyles
8104 (lambda __
8105 (substitute* '("flake8.egg-info/requires.txt"
8106 "setup.py")
8107 (("pycodestyle >= 2.0, < 2.1")
8108 "pycodestyle >= 2.0"))
8109 #t))
8110 (delete 'check)
8111 (add-after 'install 'check
8112 (lambda* (#:key inputs outputs #:allow-other-keys)
8113 (add-installed-pythonpath inputs outputs)
8114 (invoke "pytest" "-v")
8115 #t)))))
8116 (propagated-inputs
8117 `(("python-pep8" ,python-pep8)
8118 ("python-pycodestyle" ,python-pycodestyle)
8119 ("python-entrypoints" ,python-entrypoints)
8120 ("python-pyflakes" ,python-pyflakes-1.2)
8121 ("python-mccabe" ,python-mccabe)))))
8122
8123 (define-public python-flake8-bugbear
8124 (package
8125 (name "python-flake8-bugbear")
8126 (version "20.1.4")
8127 (source
8128 (origin
8129 (method url-fetch)
8130 (uri (pypi-uri "flake8-bugbear" version))
8131 (sha256
8132 (base32
8133 "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
8134 (build-system python-build-system)
8135 (arguments
8136 '(#:phases
8137 (modify-phases %standard-phases
8138 (add-before 'check 'disable-test
8139 (lambda _
8140 ;; This test fails on slow computers.
8141 (substitute* "tests/test_bugbear.py"
8142 (("def test_does_not_crash_on_any_valid_code")
8143 "def _test_does_not_crash_on_any_valid_code")))))))
8144 (native-inputs
8145 `(("python-hypothesis" ,python-hypothesis)
8146 ("python-hypothesmith" ,python-hypothesmith)))
8147 (propagated-inputs
8148 `(("python-attrs" ,python-attrs)
8149 ("python-flake8" ,python-flake8)))
8150 (home-page "https://github.com/PyCQA/flake8-bugbear")
8151 (synopsis
8152 "Flake8 plugin for finding likely bugs and design problems in your program")
8153 (description
8154 "This package contains a plugin for Flake8 finding likely bugs and
8155 design problems in your program. It contains warnings that don't belong
8156 in pyflakes and pycodestyle.")
8157 (license license:expat)))
8158
8159 (define-public python-flake8-polyfill
8160 (package
8161 (name "python-flake8-polyfill")
8162 (version "1.0.2")
8163 (source
8164 (origin
8165 (method url-fetch)
8166 (uri (pypi-uri "flake8-polyfill" version))
8167 (sha256
8168 (base32
8169 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
8170 (build-system python-build-system)
8171 (arguments
8172 '(#:phases
8173 (modify-phases %standard-phases
8174 (replace 'check
8175 (lambda _
8176 ;; Be compatible with Pytest 4:
8177 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
8178 (substitute* "setup.cfg"
8179 (("\\[pytest\\]")
8180 "[tool:pytest]"))
8181
8182 (setenv "PYTHONPATH"
8183 (string-append (getcwd) "/build/lib:"
8184 (getenv "PYTHONPATH")))
8185 (invoke "py.test" "-v"))))))
8186 (native-inputs
8187 `(("python-flake8" ,python-flake8)
8188 ("python-mock" ,python-mock)
8189 ("python-pep8" ,python-pep8)
8190 ("python-pycodestyle" ,python-pycodestyle)
8191 ("python-pytest" ,python-pytest)))
8192 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
8193 (synopsis "Polyfill package for Flake8 plugins")
8194 (description
8195 "This package that provides some compatibility helpers for Flake8
8196 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
8197 (license license:expat)))
8198
8199 (define-public python2-flake8-polyfill
8200 (package-with-python2 python-flake8-polyfill))
8201
8202 (define-public python-flake8-pyi
8203 (package
8204 (name "python-flake8-pyi")
8205 (version "20.5.0")
8206 (source
8207 (origin
8208 (method url-fetch)
8209 (uri (pypi-uri "flake8-pyi" version))
8210 (sha256
8211 (base32
8212 "1zpq4s9kp8w95pccmhhyyx1ff2zhnidcf1zb3xs46lzcx9plvnzk"))))
8213 (build-system python-build-system)
8214 (propagated-inputs
8215 `(("python-attrs" ,python-attrs)
8216 ("python-flake8" ,python-flake8)
8217 ("python-pyflakes" ,python-pyflakes)))
8218 (home-page "https://github.com/ambv/flake8-pyi")
8219 (synopsis
8220 "Flake8 plugin that provides specializations for type hinting stub files")
8221 (description
8222 "This package contains a plugin that provides specializations for
8223 type hinting stub files, especially interesting for linting typeshed. It
8224 adds the @file{.pyi} extension to the default value of the @code{--filename}
8225 command-line argument to Flake8. This means stubs are linted by default with
8226 this plugin enabled, without needing to explicitly list every file. It
8227 modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
8228 expressions after the entire file has been read. This enables support for
8229 first-class forward references that stub files use.")
8230 (license license:expat)))
8231
8232 (define-public python-flake8-pie
8233 (package
8234 (name "python-flake8-pie")
8235 (version "0.5.0")
8236 (source
8237 (origin
8238 (method url-fetch)
8239 (uri (pypi-uri "flake8-pie" version))
8240 (sha256
8241 (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
8242 (build-system python-build-system)
8243 (home-page "https://github.com/sbdchd/flake8-pie")
8244 (synopsis "Flake8 extension that implements lints")
8245 (description
8246 "This package provides a flake8 extension that implements miscellaneous
8247 lints.")
8248 (license license:bsd-2)))
8249
8250 (define-public python-autoflake
8251 (package
8252 (name "python-autoflake")
8253 (version "1.3.1")
8254 (source
8255 (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "autoflake" version))
8258 (sha256
8259 (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
8260 (build-system python-build-system)
8261 (propagated-inputs
8262 `(("python-pyflakes" ,python-pyflakes)))
8263 (home-page "https://github.com/myint/autoflake")
8264 (synopsis "Removes unused imports and unused variables")
8265 (description
8266 "@code{autoflake} removes unused imports and unused variables from Python
8267 code as reported by @code{pyflakes}.
8268
8269 By default, it only removes unused imports for modules that are part of the
8270 standard library. Removal of unused variables is also disabled by default.
8271 It also removes useless @code{pass} statements.")
8272 (license license:expat)))
8273
8274 (define-public python-mistune
8275 (package
8276 (name "python-mistune")
8277 (version "0.8.4")
8278 (source
8279 (origin
8280 (method url-fetch)
8281 (uri (pypi-uri "mistune" version))
8282 (sha256
8283 (base32
8284 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
8285 (build-system python-build-system)
8286 (native-inputs
8287 `(("python-nose" ,python-nose)
8288 ("python-cython" ,python-cython)))
8289 (home-page "https://github.com/lepture/mistune")
8290 (synopsis "Markdown parser in pure Python")
8291 (description "This package provides a fast markdown parser in pure
8292 Python.")
8293 (license license:bsd-3)))
8294
8295 (define-public python2-mistune
8296 (package-with-python2 python-mistune))
8297
8298 (define-public python-markdown
8299 (package
8300 (name "python-markdown")
8301 (version "3.2.1")
8302 (source
8303 (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "Markdown" version))
8306 (sha256
8307 (base32
8308 "00k91gwhxnm8jdnm2v5xjz9irj6dbi7afywz2hpakqdbxs1ydzlh"))))
8309 (build-system python-build-system)
8310 (native-inputs
8311 `(("python-nose" ,python-nose)
8312 ("python-pyyaml" ,python-pyyaml)))
8313 (home-page "https://python-markdown.github.io/")
8314 (synopsis "Python implementation of Markdown")
8315 (description
8316 "This package provides a Python implementation of John Gruber's
8317 Markdown. The library features international input, various Markdown
8318 extensions, and several HTML output formats. A command line wrapper
8319 markdown_py is also provided to convert Markdown files to HTML.")
8320 (properties `((python2-variant . ,(delay python2-markdown))))
8321 (license license:bsd-3)))
8322
8323 ;; Markdown 3.2 dropped support for Python 2.
8324 (define-public python2-markdown
8325 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
8326 (package/inherit
8327 base
8328 (version "3.1.1")
8329 (source (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "Markdown" version))
8332 (sha256
8333 (base32
8334 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
8335
8336 (define-public python-ptyprocess
8337 (package
8338 (name "python-ptyprocess")
8339 (version "0.5.2")
8340 (source
8341 (origin
8342 (method url-fetch)
8343 (uri (pypi-uri "ptyprocess" version))
8344 (sha256
8345 (base32
8346 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
8347 (build-system python-build-system)
8348 (native-inputs
8349 `(("python-nose" ,python-nose)))
8350 (arguments
8351 `(#:phases
8352 (modify-phases %standard-phases
8353 (replace 'check
8354 (lambda _ (invoke "nosetests"))))))
8355 (home-page "https://github.com/pexpect/ptyprocess")
8356 (synopsis "Run a subprocess in a pseudo terminal")
8357 (description
8358 "This package provides a Python library used to launch a subprocess in a
8359 pseudo terminal (pty), and interact with both the process and its pty.")
8360 (license license:isc)))
8361
8362 (define-public python2-ptyprocess
8363 (package-with-python2 python-ptyprocess))
8364
8365 (define-public python-cram
8366 (package
8367 (name "python-cram")
8368 (version "0.7")
8369 (home-page "https://bitheap.org/cram/")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (list (string-append home-page "cram-"
8373 version ".tar.gz")
8374 (pypi-uri "cram" version)))
8375 (sha256
8376 (base32
8377 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
8378 (arguments
8379 '(#:phases
8380 (modify-phases %standard-phases
8381 (add-after 'unpack 'patch-source
8382 (lambda _
8383 (substitute* (find-files "cram" ".*\\.py$")
8384 ;; Replace default shell path.
8385 (("/bin/sh") (which "sh")))
8386 (substitute* (find-files "tests" ".*\\.t$")
8387 (("md5") "md5sum")
8388 (("/bin/bash") (which "bash"))
8389 (("/bin/sh") (which "sh")))
8390 (substitute* "cram/_test.py"
8391 ;; This hack works around a bug triggered by substituting
8392 ;; the /bin/sh paths. "tests/usage.t" compares the output of
8393 ;; "cram -h", which breaks the output at 80 characters. This
8394 ;; causes the line showing the default shell to break into two
8395 ;; lines, but the test expects a single line...
8396 (("env\\['COLUMNS'\\] = '80'")
8397 "env['COLUMNS'] = '160'"))
8398
8399 (substitute* "Makefile"
8400 ;; Recent versions of python-coverage have caused the test
8401 ;; coverage to decrease (as of version 0.7). Allow that.
8402 (("--fail-under=100")
8403 "--fail-under=90"))
8404
8405 #t))
8406 (replace 'check
8407 ;; The test phase uses the built library and executable.
8408 (lambda* (#:key inputs outputs #:allow-other-keys)
8409 (add-installed-pythonpath inputs outputs)
8410 (setenv "PATH" (string-append (getenv "PATH") ":"
8411 (assoc-ref outputs "out") "/bin"))
8412 (invoke "make" "test"))))))
8413 (build-system python-build-system)
8414 (native-inputs
8415 `(("python-coverage" ,python-coverage)
8416 ("which" ,which)))
8417 (synopsis "Simple testing framework for command line applications")
8418 (description
8419 "Cram is a functional testing framework for command line applications.
8420 Cram tests look like snippets of interactive shell sessions. Cram runs each
8421 command and compares the command output in the test with the command’s actual
8422 output.")
8423 (license license:gpl2+)))
8424
8425 (define-public python2-cram
8426 (package-with-python2 python-cram))
8427
8428 (define-public python-crashtest
8429 (package
8430 (name "python-crashtest")
8431 (version "0.3.1")
8432 (source
8433 (origin
8434 (method url-fetch)
8435 (uri (pypi-uri "crashtest" version))
8436 (sha256
8437 (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
8438 (build-system python-build-system)
8439 (home-page "https://github.com/sdispater/crashtest")
8440 (synopsis "Manage Python errors with ease")
8441 (description
8442 "Python library that makes exceptions handling and inspection easier.")
8443 (license license:expat)))
8444
8445 (define-public python-straight-plugin
8446 (package
8447 (name "python-straight-plugin")
8448 (version "1.4.1")
8449 (source
8450 (origin
8451 (method url-fetch)
8452 (uri (pypi-uri "straight.plugin" version))
8453 (sha256
8454 (base32
8455 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
8456 (build-system python-build-system)
8457 (home-page "https://github.com/ironfroggy/straight.plugin")
8458 (synopsis "Simple namespaced plugin facility")
8459 (description "Straight Plugin provides a type of plugin you can create from
8460 almost any existing Python modules, and an easy way for outside developers to
8461 add functionality and customization to your projects with their own plugins.")
8462 (license license:expat)))
8463
8464 (define-public python2-straight-plugin
8465 (package-with-python2 python-straight-plugin))
8466
8467 (define-public python-fonttools
8468 (package
8469 (name "python-fonttools")
8470 (version "4.6.0")
8471 (source (origin
8472 (method url-fetch)
8473 (uri (pypi-uri "fonttools" version ".zip"))
8474 (sha256
8475 (base32
8476 "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq"))))
8477 (build-system python-build-system)
8478 (native-inputs
8479 `(("unzip" ,unzip)
8480 ("python-pytest" ,python-pytest)
8481 ("python-pytest-runner" ,python-pytest-runner)))
8482 (home-page "https://github.com/fonttools/fonttools")
8483 (synopsis "Tools to manipulate font files")
8484 (description
8485 "FontTools/TTX is a library to manipulate font files from Python. It
8486 supports reading and writing of TrueType/OpenType fonts, reading and writing
8487 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
8488 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
8489 from an XML-based format.")
8490 (license license:expat)))
8491
8492 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
8493 (define-public python2-fonttools
8494 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
8495 (package/inherit
8496 base
8497 (version "3.44.0")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (pypi-uri "fonttools" version ".zip"))
8501 (sha256
8502 (base32
8503 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
8504
8505 (define-public python-ly
8506 (package
8507 (name "python-ly")
8508 (version "0.9.5")
8509 (source
8510 (origin
8511 (method url-fetch)
8512 (uri (pypi-uri name version))
8513 (sha256
8514 (base32
8515 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
8516 (build-system python-build-system)
8517 (arguments
8518 ;; FIXME: Some tests need network access.
8519 '(#:tests? #f))
8520 (synopsis "Tool and library for manipulating LilyPond files")
8521 (description "This package provides a Python library to parse, manipulate
8522 or create documents in LilyPond format. A command line program ly is also
8523 provided that can be used to do various manipulations with LilyPond files.")
8524 (home-page "https://pypi.org/project/python-ly/")
8525 (license license:gpl2+)))
8526
8527 (define-public python-appdirs
8528 (package
8529 (name "python-appdirs")
8530 (version "1.4.3")
8531 (source
8532 (origin
8533 (method url-fetch)
8534 (uri (pypi-uri "appdirs" version))
8535 (sha256
8536 (base32
8537 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
8538 (build-system python-build-system)
8539 (home-page "https://github.com/ActiveState/appdirs")
8540 (synopsis
8541 "Determine platform-specific dirs, e.g. a \"user data dir\"")
8542 (description
8543 "This module provides a portable way of finding out where user data
8544 should be stored on various operating systems.")
8545 (license license:expat)))
8546
8547 (define-public python2-appdirs
8548 (package-with-python2 python-appdirs))
8549
8550 (define-public python-llfuse
8551 (package
8552 (name "python-llfuse")
8553 (version "1.3.6")
8554 (source (origin
8555 (method url-fetch)
8556 (uri (pypi-uri "llfuse" version ".tar.bz2"))
8557 (sha256
8558 (base32
8559 "1j9fzxpgmb4rxxyl9jcf84zvznhgi3hnh4hg5vb0qaslxkvng8ii"))))
8560 (build-system python-build-system)
8561 (inputs
8562 `(("fuse" ,fuse)
8563 ("attr" ,attr)))
8564 (native-inputs
8565 `(("pkg-config" ,pkg-config)))
8566 (synopsis "Python bindings for FUSE")
8567 (description
8568 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
8569 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
8570 (license license:lgpl2.0+)
8571 (properties `((python2-variant . ,(delay python2-llfuse))))))
8572
8573 (define-public python2-llfuse
8574 (package (inherit (package-with-python2
8575 (strip-python2-variant python-llfuse)))
8576 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
8577
8578 ;; For attic-0.16
8579 (define-public python-llfuse-0.41
8580 (package (inherit python-llfuse)
8581 (version "0.41.1")
8582 (source (origin
8583 (method url-fetch)
8584 (uri (string-append
8585 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
8586 "llfuse-" version ".tar.bz2"))
8587 (sha256
8588 (base32
8589 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
8590 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
8591 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
8592 (license (list license:expat license:lgpl2.0+))))
8593
8594 (define-public python-msgpack
8595 (package
8596 (name "python-msgpack")
8597 (version "1.0.0")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (pypi-uri "msgpack" version))
8601 (sha256
8602 (base32
8603 "1h5mxh84rcw04dvxy1qbfn2hisavfqgilh9k09rgyjhd936dad4m"))))
8604 (build-system python-build-system)
8605 (arguments
8606 `(#:modules ((guix build utils)
8607 (guix build python-build-system)
8608 (ice-9 ftw)
8609 (srfi srfi-1)
8610 (srfi srfi-26))
8611 #:phases
8612 (modify-phases %standard-phases
8613 (replace 'check
8614 (lambda _
8615 (let ((cwd (getcwd)))
8616 (setenv "PYTHONPATH"
8617 (string-append cwd "/build/"
8618 (find (cut string-prefix? "lib" <>)
8619 (scandir (string-append cwd "/build")))
8620 ":"
8621 (getenv "PYTHONPATH")))
8622 (invoke "pytest" "-v" "test")))))))
8623 (native-inputs
8624 `(("python-pytest" ,python-pytest)))
8625 (synopsis "MessagePack (de)serializer")
8626 (description "MessagePack is a fast, compact binary serialization format,
8627 suitable for similar data to JSON. This package provides CPython bindings for
8628 reading and writing MessagePack data.")
8629 (home-page "https://pypi.org/project/msgpack/")
8630 (license license:asl2.0)))
8631
8632 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
8633 ;; release 0.5. Some packages like borg still call it by the old name for now.
8634 ;; <https://bugs.gnu.org/30662>
8635 (define-public python-msgpack-transitional
8636 (package
8637 (inherit python-msgpack)
8638 (name "python-msgpack-transitional")
8639 (version "0.5.6")
8640 (source (origin
8641 (method url-fetch)
8642 (uri (pypi-uri "msgpack" version))
8643 (sha256
8644 (base32
8645 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
8646 (arguments
8647 (substitute-keyword-arguments (package-arguments python-msgpack)
8648 ((#:phases phases)
8649 `(modify-phases ,phases
8650 (add-after 'unpack 'configure-transitional
8651 (lambda _
8652 ;; Keep using the old name.
8653 (substitute* "setup.py"
8654 (("TRANSITIONAL = False")
8655 "TRANSITIONAL = 1"))
8656 #t))))))))
8657
8658 (define-public python2-msgpack
8659 (package-with-python2 python-msgpack))
8660
8661 (define-public python-netaddr
8662 (package
8663 (name "python-netaddr")
8664 (version "0.7.19")
8665 (source
8666 (origin
8667 (method url-fetch)
8668 (uri (pypi-uri "netaddr" version))
8669 (sha256
8670 (base32
8671 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
8672 (build-system python-build-system)
8673 (arguments `(#:tests? #f)) ;; No tests.
8674 (home-page "https://github.com/drkjam/netaddr/")
8675 (synopsis "Pythonic manipulation of network addresses")
8676 (description
8677 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
8678 and MAC network addresses.")
8679 (license license:bsd-3)))
8680
8681 (define-public python2-netaddr
8682 (package-with-python2 python-netaddr))
8683
8684 (define-public python2-pyroute2
8685 (package
8686 (name "python2-pyroute2")
8687 (version "0.5.6")
8688 (source
8689 (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "pyroute2" version))
8692 (sha256
8693 (base32
8694 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
8695 (build-system python-build-system)
8696 (arguments
8697 `(#:python ,python-2)) ;Python 3.x is not supported
8698 (home-page "https://github.com/svinota/pyroute2")
8699 (synopsis "Python netlink library")
8700 (description
8701 "Pyroute2 is a pure Python netlink library with minimal dependencies.
8702 Supported netlink families and protocols include:
8703 @itemize
8704 @item rtnl, network settings - addresses, routes, traffic controls
8705 @item nfnetlink - netfilter API: ipset, nftables, ...
8706 @item ipq - simplest userspace packet filtering, iptables QUEUE target
8707 @item devlink - manage and monitor devlink-enabled hardware
8708 @item generic - generic netlink families
8709 @itemize
8710 @item nl80211 - wireless functions API (basic support)
8711 @item taskstats - extended process statistics
8712 @item acpi_events - ACPI events monitoring
8713 @item thermal_events - thermal events monitoring
8714 @item VFS_DQUOT - disk quota events monitoring
8715 @end itemize
8716 @end itemize")
8717 (license license:gpl2+)))
8718
8719 (define-public python-wrapt
8720 (package
8721 (name "python-wrapt")
8722 (version "1.11.2")
8723 (source
8724 (origin
8725 (method url-fetch)
8726 (uri (pypi-uri "wrapt" version))
8727 (sha256
8728 (base32
8729 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
8730 (build-system python-build-system)
8731 (arguments
8732 ;; Tests are not included in the tarball, they are only available in the
8733 ;; git repository.
8734 `(#:tests? #f))
8735 (home-page "https://github.com/GrahamDumpleton/wrapt")
8736 (synopsis "Module for decorators, wrappers and monkey patching")
8737 (description
8738 "The aim of the wrapt module is to provide a transparent object proxy for
8739 Python, which can be used as the basis for the construction of function
8740 wrappers and decorator functions.")
8741 (license license:bsd-2)))
8742
8743 (define-public python2-wrapt
8744 (package-with-python2 python-wrapt))
8745
8746 (define-public python-xlrd
8747 (package
8748 (name "python-xlrd")
8749 (version "1.2.0")
8750 (source (origin
8751 (method url-fetch)
8752 (uri (pypi-uri "xlrd" version))
8753 (sha256
8754 (base32
8755 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
8756 (build-system python-build-system)
8757 (arguments
8758 `(#:phases
8759 (modify-phases %standard-phases
8760 ;; Some tests depend on writing a temporary file to the user's home
8761 ;; directory.
8762 (add-after 'unpack 'fix-tests
8763 (lambda _
8764 (delete-file "tests/test_open_workbook.py")
8765 #t)))))
8766 (home-page "http://www.python-excel.org/")
8767 (synopsis "Library for extracting data from Excel files")
8768 (description "This package provides a library to extract data from
8769 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
8770 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
8771 Unicode-aware. It is not intended as an end-user tool.")
8772 (license license:bsd-3)))
8773
8774 (define-public python2-xlrd
8775 (package-with-python2 python-xlrd))
8776
8777 (define-public python-immutables
8778 (package
8779 (name "python-immutables")
8780 (version "0.14")
8781 (source
8782 (origin
8783 (method url-fetch)
8784 (uri (pypi-uri "immutables" version))
8785 (sha256
8786 (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
8787 (build-system python-build-system)
8788 (home-page "https://github.com/MagicStack/immutables")
8789 (synopsis "High-performance immutable mapping type for Python")
8790 (description
8791 "An immutable mapping type for Python. The underlying datastructure is a
8792 Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
8793 functional languages.")
8794 (license license:asl2.0)))
8795
8796 (define-public python-prettytable
8797 (package
8798 (name "python-prettytable")
8799 (version "0.7.2")
8800 (source
8801 (origin
8802 (method url-fetch)
8803 (uri (pypi-uri "prettytable" version ".tar.bz2"))
8804 (sha256
8805 (base32
8806 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
8807 (build-system python-build-system)
8808 (home-page "https://code.google.com/archive/p/prettytable/")
8809 (synopsis "Display tabular data in an ASCII table format")
8810 (description
8811 "A library designed to represent tabular data in visually appealing ASCII
8812 tables. PrettyTable allows for selection of which columns are to be printed,
8813 independent alignment of columns (left or right justified or centred) and
8814 printing of sub-tables by specifying a row range.")
8815 (license license:bsd-3)))
8816
8817 (define-public python2-prettytable
8818 (package-with-python2 python-prettytable))
8819
8820 (define-public python-curio
8821 (package
8822 (name "python-curio")
8823 (version "1.2")
8824 (source
8825 (origin
8826 (method url-fetch)
8827 (uri (pypi-uri "curio" version))
8828 (sha256
8829 (base32 "16wkww6kh511b9bzsfhpvrv0766cc6ssgbzz4lgpjnrzzgx21wwh"))))
8830 (build-system python-build-system)
8831 (arguments
8832 `(#:phases
8833 (modify-phases %standard-phases
8834 (replace 'check
8835 (lambda* (#:key inputs outputs #:allow-other-keys)
8836 (add-installed-pythonpath inputs outputs)
8837 (invoke "pytest" "-vv" "-k"
8838 ;; Tries to open an outgoing connection.
8839 "not test_ssl_outgoing"))))))
8840 (native-inputs
8841 `(("python-pytest" ,python-pytest)))
8842 (home-page "https://github.com/dabeaz/curio")
8843 (synopsis "Coroutine-based library for concurrent Python")
8844 (description
8845 "Curio is a coroutine-based library for concurrent Python systems
8846 programming. It provides standard programming abstractions such as as
8847 tasks, sockets, files, locks, and queues.")
8848 (license license:bsd-3)))
8849
8850 (define-public python-tables
8851 (package
8852 (name "python-tables")
8853 (version "3.6.1")
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "tables" version))
8858 (sha256
8859 (base32
8860 "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
8861 (modules '((guix build utils)))
8862 (snippet
8863 '(begin
8864 ;; Remove pre-compiled .pyc files from source.
8865 (for-each delete-file-recursively
8866 (find-files "." "__pycache__" #:directories? #t))
8867 (for-each delete-file (find-files "." "\\.pyc$"))
8868 #t))))
8869 (build-system python-build-system)
8870 (arguments
8871 `(;; FIXME: python-build-system does not pass configure-flags to "build"
8872 ;; or "check", so we must override the build and check phases.
8873 #:phases
8874 (modify-phases %standard-phases
8875 (add-after 'unpack 'use-gcc
8876 (lambda _
8877 (substitute* "setup.py"
8878 (("^( +)compiler = new_compiler\\(\\)" line indent)
8879 (string-append line
8880 "\n"
8881 indent
8882 "compiler.set_executables(compiler='gcc',"
8883 "compiler_so='gcc',"
8884 "linker_exe='gcc',"
8885 "linker_so='gcc -shared')")))
8886 #t))
8887 (add-after 'unpack 'disable-tuning
8888 (lambda _
8889 (substitute* "setup.py"
8890 (("cpu_flags = .*")
8891 "cpu_flags = ['sse2']\n"))
8892 #t))
8893 (replace 'build
8894 (lambda* (#:key inputs #:allow-other-keys)
8895 (invoke "python" "setup.py" "build"
8896 (string-append "--hdf5="
8897 (assoc-ref inputs "hdf5")))))
8898 (replace 'check
8899 (lambda* (#:key inputs #:allow-other-keys)
8900 (invoke "python" "setup.py" "check"
8901 (string-append "--hdf5="
8902 (assoc-ref inputs "hdf5"))))))))
8903 (propagated-inputs
8904 `(("python-numexpr" ,python-numexpr)
8905 ("python-numpy" ,python-numpy)))
8906 (native-inputs
8907 `(("python-cython" ,python-cython)
8908 ("pkg-config" ,pkg-config)))
8909 (inputs
8910 `(("hdf5" ,hdf5-1.10)
8911 ("bzip2" ,bzip2)
8912 ("zlib" ,zlib)))
8913 (home-page "https://www.pytables.org/")
8914 (synopsis "Hierarchical datasets for Python")
8915 (description "PyTables is a package for managing hierarchical datasets and
8916 designed to efficiently cope with extremely large amounts of data.")
8917 (license license:bsd-3)))
8918
8919 (define-public python2-tables
8920 (package-with-python2 python-tables))
8921
8922 (define-public python-sniffio
8923 (package
8924 (name "python-sniffio")
8925 (version "1.1.0")
8926 (source
8927 (origin
8928 (method url-fetch)
8929 (uri (pypi-uri "sniffio" version))
8930 (sha256
8931 (base32 "08bsp2pp2dxzn9yzcafwzw8jlm0jf50as0ix8vfhxzk91w810f4f"))))
8932 (build-system python-build-system)
8933 (arguments
8934 `(#:phases
8935 (modify-phases %standard-phases
8936 (replace 'check
8937 (lambda _
8938 (invoke "pytest" "-vv"))))))
8939 (native-inputs
8940 `(("python-curio" ,python-curio)
8941 ("python-pytest" ,python-pytest)
8942 ("python-pytest-cov" ,python-pytest-cov)))
8943 (home-page "https://github.com/python-trio/sniffio")
8944 (synopsis "Detect which async library a program is running under")
8945 (description "This package detects which async library a program is
8946 running under. It supports multiple async I/O packages, like Trio, and
8947 asyncio.")
8948 ;; Either license applies.
8949 (license (list license:expat license:asl2.0))))
8950
8951 (define-public python-pytest-black
8952 (package
8953 (name "python-pytest-black")
8954 (version "0.3.8")
8955 (source
8956 (origin
8957 (method url-fetch)
8958 (uri (pypi-uri "pytest-black" version))
8959 (sha256
8960 (base32
8961 "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
8962 (build-system python-build-system)
8963 (propagated-inputs
8964 `(("python-pytest" ,python-pytest)
8965 ("python-black" ,python-black)
8966 ("python-toml" ,python-toml)))
8967 (native-inputs
8968 `(("python-setuptools-scm" ,python-setuptools-scm)))
8969 (home-page "https://github.com/shopkeep/pytest-black")
8970 (synopsis "Pytest plugin to enable format checking with black")
8971 (description
8972 "This package provides a pytest plugin to enable format checking with the
8973 Python code formatter \"black\".")
8974 (license license:expat)))
8975
8976 (define-public python-get-version
8977 (package
8978 (name "python-get-version")
8979 (version "2.1")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (pypi-uri "get_version" version))
8984 (sha256
8985 (base32
8986 "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
8987 (build-system python-build-system)
8988 (propagated-inputs
8989 `(("python-pygments" ,python-pygments)
8990 ("python-pytest" ,python-pytest)
8991 ("python-pytest-black" ,python-pytest-black)
8992 ("python-pytest-cov" ,python-pytest-cov)
8993 ("python-setuptools" ,python-setuptools)
8994 ("python-testpath" ,python-testpath)))
8995 (home-page "https://github.com/flying-sheep/get_version")
8996 (synopsis "Version helper in the spirit of versioneer")
8997 (description
8998 "This package provides a version helper that lets you automatically use
8999 the latest @code{vX.X.X} Git tag as the version in your Python package. It
9000 also supports getting the version from Python source distributions or, once
9001 your package is installed, via @code{pkg_resources} (part of
9002 @code{setuptools}).")
9003 (license license:gpl3+)))
9004
9005 (define-public python-legacy-api-wrap
9006 (package
9007 (name "python-legacy-api-wrap")
9008 (version "1.2")
9009 (source
9010 (origin
9011 (method url-fetch)
9012 (uri (pypi-uri "legacy-api-wrap" version))
9013 (sha256
9014 (base32
9015 "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
9016 (build-system python-build-system)
9017 (propagated-inputs
9018 `(("python-get-version" ,python-get-version)
9019 ("python-pytest" ,python-pytest)
9020 ("python-pytest-black" ,python-pytest-black)
9021 ("python-pytest-cov" ,python-pytest-cov)
9022 ("python-setuptools" ,python-setuptools)))
9023 (home-page "https://github.com/flying-sheep/legacy-api-wrap")
9024 (synopsis "Legacy API wrapper")
9025 (description "This module defines a decorator to wrap legacy APIs. The
9026 primary use case is APIs defined before keyword-only parameters existed.")
9027 (license license:gpl3+)))
9028
9029 (define-public python-pyasn1
9030 (package
9031 (name "python-pyasn1")
9032 (version "0.4.8")
9033 (source
9034 (origin
9035 (method url-fetch)
9036 (uri (pypi-uri "pyasn1" version))
9037 (sha256
9038 (base32
9039 "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
9040 (build-system python-build-system)
9041 (home-page "http://pyasn1.sourceforge.net/")
9042 (synopsis "ASN.1 types and codecs")
9043 (description
9044 "This is an implementation of ASN.1 types and codecs in Python. It is
9045 suitable for a wide range of protocols based on the ASN.1 specification.")
9046 (license license:bsd-2)))
9047
9048 (define-public python2-pyasn1
9049 (package-with-python2 python-pyasn1))
9050
9051 (define-public python-pyasn1-modules
9052 (package
9053 (name "python-pyasn1-modules")
9054 (version "0.2.2")
9055 (source
9056 (origin
9057 (method url-fetch)
9058 (uri (pypi-uri "pyasn1-modules" version))
9059 (sha256
9060 (base32
9061 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
9062 (build-system python-build-system)
9063 (propagated-inputs
9064 `(("python-pyasn1" ,python-pyasn1)))
9065 (home-page "https://sourceforge.net/projects/pyasn1/")
9066 (synopsis "ASN.1 codec implementations")
9067 (description
9068 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
9069 implementations of ASN.1-based codecs and protocols.")
9070 (license license:bsd-3)))
9071
9072 (define-public python2-pyasn1-modules
9073 (package-with-python2 python-pyasn1-modules))
9074
9075 (define-public python-ipaddress
9076 (package
9077 (name "python-ipaddress")
9078 (version "1.0.22")
9079 (source (origin
9080 (method url-fetch)
9081 (uri (pypi-uri "ipaddress" version))
9082 (sha256
9083 (base32
9084 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
9085 (build-system python-build-system)
9086 (home-page "https://github.com/phihag/ipaddress")
9087 (synopsis "IP address manipulation library")
9088 (description
9089 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
9090 in Python. This library is used to create, poke at, and manipulate IPv4 and
9091 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
9092 module to older versions of Python.")
9093 (license license:psfl)))
9094
9095 (define-public python2-ipaddress
9096 (package-with-python2 python-ipaddress))
9097
9098 (define-public python2-ipaddr
9099 (package
9100 (name "python2-ipaddr")
9101 (version "2.1.11")
9102 (source
9103 (origin
9104 (method url-fetch)
9105 (uri (pypi-uri "ipaddr" version))
9106 (sha256
9107 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
9108 (build-system python-build-system)
9109 (arguments
9110 `(#:python ,python-2 ;version 2 only
9111 #:phases
9112 (modify-phases %standard-phases
9113 (replace 'check
9114 (lambda _ (invoke "python" "ipaddr_test.py"))))))
9115 (home-page "https://github.com/google/ipaddr-py")
9116 (synopsis "IP address manipulation library")
9117 (description
9118 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
9119 IPv6 addresses and networks.
9120
9121 For new implementations you may prefer to use the standard module
9122 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
9123 versions of Python.")
9124 (license license:asl2.0)))
9125
9126 (define-public python-idna
9127 (package
9128 (name "python-idna")
9129 (version "2.9")
9130 (source
9131 (origin
9132 (method url-fetch)
9133 (uri (pypi-uri "idna" version))
9134 (sha256
9135 (base32
9136 "1jxp2pdi8y4asi7ka1zhx3yx09kv8kzj533f0ds7viz49b0x323m"))))
9137 (build-system python-build-system)
9138 (home-page "https://github.com/kjd/idna")
9139 (synopsis "Internationalized domain names in applications")
9140 (description
9141 "This is a library to support the Internationalised Domain Names in
9142 Applications (IDNA) protocol as specified in RFC 5891. This version of the
9143 protocol is often referred to as “IDNA2008” and can produce different results
9144 from the earlier standard from 2003. The library is also intended to act as a
9145 suitable drop-in replacement for the “encodings.idna” module that comes with
9146 the Python standard library but currently only supports the older 2003
9147 specification.")
9148 (license license:bsd-4)))
9149
9150 (define-public python-idna-2.7
9151 (package (inherit python-idna)
9152 (version "2.7")
9153 (source (origin
9154 (method url-fetch)
9155 (uri (pypi-uri "idna" version))
9156 (sha256
9157 (base32
9158 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
9159
9160
9161 (define-public python2-idna
9162 (package-with-python2 python-idna))
9163
9164 (define-public python-libsass
9165 (package
9166 (name "python-libsass")
9167 (version "0.20.0")
9168 (source
9169 (origin
9170 ;; PyPI tarball is missing some test files.
9171 (method git-fetch)
9172 (uri (git-reference
9173 (url "https://github.com/sass/libsass-python")
9174 (commit version)))
9175 (file-name (git-file-name name version))
9176 (sha256
9177 (base32 "0h9rj4k9izkfdvli8ip72bbvh6a7bvrv5pxz6zay2bq235gpfgfc"))))
9178 (build-system python-build-system)
9179 (arguments
9180 `(#:phases
9181 (modify-phases %standard-phases
9182 ;; Use Guix package of libsass instead of compiling from a checkout.
9183 (add-before 'build 'set-libsass
9184 (lambda _
9185 (setenv "SYSTEM_SASS" (assoc-ref %build-inputs "libsass"))
9186 #t))
9187 (replace 'check
9188 (lambda* (#:key inputs outputs #:allow-other-keys)
9189 (add-installed-pythonpath inputs outputs)
9190 (invoke "pytest" "sasstests.py" "-k"
9191 ;; See https://github.com/sass/libsass/issues/3092.
9192 ;; This test may work in a future release of libsass.
9193 "not test_stack_trace_formatting"))))))
9194 (native-inputs
9195 `(("python-pytest" ,python-pytest)
9196 ("python-werkzeug" ,python-werkzeug)))
9197 (inputs
9198 `(("libsass" ,libsass)))
9199 (propagated-inputs
9200 `(("python-six" ,python-six)))
9201 (home-page "https://sass.github.io/libsass-python/")
9202 (synopsis "Straightforward binding of libsass for Python")
9203 (description
9204 "This package provides a simple Python extension module @code{sass} which
9205 is binding LibSass.")
9206 (license license:expat)))
9207
9208 (define-public python-idna-ssl
9209 (package
9210 (name "python-idna-ssl")
9211 (version "1.0.1")
9212 (source
9213 (origin
9214 (method url-fetch)
9215 (uri (pypi-uri "idna-ssl" version))
9216 (sha256
9217 (base32
9218 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
9219 (build-system python-build-system)
9220 (arguments
9221 `(#:tests? #f)) ;circular dependency with python-aiohttp
9222 (home-page "https://github.com/aio-libs/idna-ssl")
9223 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
9224 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
9225 domains support.")
9226 (license license:expat)))
9227
9228 (define-public python-pretend
9229 (package
9230 (name "python-pretend")
9231 (version "1.0.9")
9232 (source
9233 (origin
9234 (method url-fetch)
9235 (uri (pypi-uri "pretend" version))
9236 (sha256
9237 (base32
9238 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
9239 (build-system python-build-system)
9240 (home-page "https://github.com/alex/pretend")
9241 (synopsis "Library for stubbing in Python")
9242 (description
9243 "Pretend is a library to make stubbing with Python easier. Stubbing is a
9244 technique for writing tests. You may hear the term mixed up with mocks,
9245 fakes, or doubles. Basically, a stub is an object that returns pre-canned
9246 responses, rather than doing any computation.")
9247 (license license:bsd-3)))
9248
9249 (define-public python2-pretend
9250 (package-with-python2 python-pretend))
9251
9252 (define-public python-pip
9253 (package
9254 (name "python-pip")
9255 (version "20.0.2")
9256 (source
9257 (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "pip" version))
9260 (sha256
9261 (base32
9262 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
9263 (build-system python-build-system)
9264 (arguments
9265 '(#:tests? #f)) ; there are no tests in the pypi archive.
9266 (home-page "https://pip.pypa.io/")
9267 (synopsis "Package manager for Python software")
9268 (description
9269 "Pip is a package manager for Python software, that finds packages on the
9270 Python Package Index (PyPI).")
9271 (license license:expat)))
9272
9273 (define-public python2-pip
9274 (package-with-python2 python-pip))
9275
9276 (define-public python-tlsh
9277 (package
9278 (name "python-tlsh")
9279 (version "3.4.5")
9280 (home-page "https://github.com/trendmicro/tlsh")
9281 (source
9282 (origin
9283 (method git-fetch)
9284 (uri (git-reference
9285 (url "https://github.com/trendmicro/tlsh")
9286 (commit (string-append "v" version))))
9287 (file-name (git-file-name name version))
9288 (sha256
9289 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
9290 (build-system cmake-build-system)
9291 (arguments
9292 '(#:out-of-source? #f
9293 #:phases (modify-phases %standard-phases
9294 (replace
9295 'install
9296 (lambda* (#:key outputs #:allow-other-keys)
9297 ;; Build and install the Python bindings. The underlying
9298 ;; C++ library is apparently not meant to be installed.
9299 (let ((out (assoc-ref outputs "out")))
9300 (with-directory-excursion "py_ext"
9301 (and (system* "python" "setup.py" "build")
9302 (system* "python" "setup.py" "install"
9303 (string-append "--prefix=" out))))))))))
9304 (inputs `(("python" ,python-wrapper))) ;for the bindings
9305 (synopsis "Fuzzy matching library for Python")
9306 (description
9307 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
9308 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
9309 value which can be used for similarity comparisons. Similar objects have
9310 similar hash values, which allows for the detection of similar objects by
9311 comparing their hash values. The byte stream should have a sufficient amount
9312 of complexity; for example, a byte stream of identical bytes will not generate
9313 a hash value.")
9314 (license license:asl2.0)))
9315
9316 (define-public python2-tlsh
9317 (package
9318 (inherit python-tlsh)
9319 (name "python2-tlsh")
9320 (inputs `(("python" ,python-2)))))
9321
9322 (define-public python-termcolor
9323 (package
9324 (name "python-termcolor")
9325 (version "1.1.0")
9326 (source
9327 (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "termcolor" version))
9330 (sha256
9331 (base32
9332 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
9333 (build-system python-build-system)
9334 (arguments
9335 ;; There are no tests.
9336 `(#:tests? #f))
9337 (home-page "https://pypi.org/project/termcolor/")
9338 (synopsis "ANSII Color formatting for terminal output")
9339 (description
9340 "This package provides ANSII Color formatting for output in terminals.")
9341 (license license:expat)))
9342
9343 (define-public python2-termcolor
9344 (package-with-python2 python-termcolor))
9345
9346 (define-public python-terminaltables
9347 (package
9348 (name "python-terminaltables")
9349 (version "3.1.0")
9350 (source
9351 (origin
9352 (method url-fetch)
9353 (uri (pypi-uri "terminaltables" version))
9354 (sha256
9355 (base32
9356 "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
9357 (build-system python-build-system)
9358 (home-page "https://github.com/Robpol86/terminaltables")
9359 (synopsis
9360 "Generate simple tables in terminals from a nested list of strings")
9361 (description
9362 "This package makes it easy to draw tables in terminal/console
9363 applications from a list of lists of strings. It supports multi-line rows.")
9364 (license license:expat)))
9365
9366 (define-public python-libarchive-c
9367 (package
9368 (name "python-libarchive-c")
9369 (version "2.9")
9370 (source (origin
9371 (method url-fetch)
9372 (uri (pypi-uri "libarchive-c" version))
9373 (sha256
9374 (base32
9375 "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
9376 (build-system python-build-system)
9377 (arguments
9378 '(#:phases (modify-phases %standard-phases
9379 (add-before
9380 'build 'reference-libarchive
9381 (lambda* (#:key inputs #:allow-other-keys)
9382 ;; Retain the absolute file name of libarchive.so.
9383 (let ((libarchive (assoc-ref inputs "libarchive")))
9384 (substitute* "libarchive/ffi.py"
9385 (("find_library\\('archive'\\)")
9386 (string-append "'" libarchive
9387 "/lib/libarchive.so'"))))))
9388 (replace 'check
9389 (lambda _ (invoke "pytest" "-vv"))))))
9390 (native-inputs
9391 `(("python-mock" ,python-mock)
9392 ("python-pytest" ,python-pytest)))
9393 (inputs
9394 `(("libarchive" ,libarchive)))
9395 (home-page "https://github.com/Changaco/python-libarchive-c")
9396 (synopsis "Python interface to libarchive")
9397 (description
9398 "This package provides Python bindings to libarchive, a C library to
9399 access possibly compressed archives in many different formats. It uses
9400 Python's @code{ctypes} foreign function interface (FFI).")
9401 (license license:lgpl2.0+)))
9402
9403 (define-public python2-libarchive-c
9404 (package-with-python2 python-libarchive-c))
9405
9406 (define-public python-file
9407 (package
9408 (inherit file)
9409 (name "python-file")
9410 (build-system python-build-system)
9411 (arguments
9412 '(#:tests? #f ;no tests
9413 #:configure-flags '("--single-version-externally-managed" "--root=/")
9414 #:phases (modify-phases %standard-phases
9415 (add-before 'build 'change-directory
9416 (lambda _
9417 (chdir "python")
9418 #t))
9419 (add-before 'build 'set-library-file-name
9420 (lambda* (#:key inputs #:allow-other-keys)
9421 (let ((file (assoc-ref inputs "file")))
9422 (substitute* "magic.py"
9423 (("find_library\\('magic'\\)")
9424 (string-append "'" file "/lib/libmagic.so'")))
9425 #t))))))
9426 (inputs `(("file" ,file)))
9427 (native-inputs (if (%current-target-system)
9428 `(("self" ,this-package))
9429 '()))
9430 (synopsis "Python bindings to the libmagic file type guesser")
9431 (description "This package provides Python bindings to the libmagic file
9432 type guesser.
9433
9434 Note that this module and the @code{python-magic} module both provide a
9435 @file{magic.py} file; these two modules, which are different and were
9436 developed separately, both serve the same purpose: provide Python bindings for
9437 libmagic.")))
9438
9439 (define-public python2-file
9440 (package-with-python2 python-file))
9441
9442 (define-public python-debian
9443 (package
9444 (name "python-debian")
9445 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
9446 (version "0.1.36")
9447 (source
9448 (origin
9449 ;; Use git-fetch, as pypi doesn't include test suite.
9450 (method git-fetch)
9451 (uri (git-reference
9452 (url home-page)
9453 (commit version)))
9454 (file-name (git-file-name name version))
9455 (sha256
9456 (base32
9457 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
9458 (build-system python-build-system)
9459 (arguments
9460 `(#:phases (modify-phases %standard-phases
9461 (add-after 'unpack 'remove-debian-specific-tests
9462 ;; python-apt, apt and dpkg are not yet available in guix,
9463 ;; and these tests heavily depend on them.
9464 (lambda _
9465 (delete-file "lib/debian/tests/test_deb822.py")
9466 (delete-file "lib/debian/tests/test_debfile.py")
9467 #t)))))
9468 (propagated-inputs
9469 `(("python-six" ,python-six)
9470 ("python-chardet" ,python-chardet)))
9471 (synopsis "Debian package related modules")
9472 (description
9473 ;; XXX: Use @enumerate instead of @itemize to work around
9474 ;; <http://bugs.gnu.org/21772>.
9475 "This package provides Python modules that abstract many formats of
9476 Debian-related files, such as:
9477
9478 @enumerate
9479 @item Debtags information;
9480 @item @file{debian/changelog} files;
9481 @item packages files, pdiffs;
9482 @item control files of single or multiple RFC822-style paragraphs---e.g.
9483 @file{debian/control}, @file{.changes}, @file{.dsc};
9484 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
9485 contained files and meta-information.
9486 @end enumerate\n")
9487
9488 ;; Modules are either GPLv2+ or GPLv3+.
9489 (license license:gpl3+)))
9490
9491 (define-public python-nbformat
9492 (package
9493 (name "python-nbformat")
9494 (version "4.4.0")
9495 (source
9496 (origin
9497 (method url-fetch)
9498 (uri (pypi-uri "nbformat" version))
9499 (sha256
9500 (base32
9501 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
9502 (build-system python-build-system)
9503 (arguments `(#:tests? #f)) ; no test target
9504 (propagated-inputs
9505 `(("python-ipython-genutils" ,python-ipython-genutils)
9506 ("python-jsonschema" ,python-jsonschema)
9507 ("python-jupyter-core" ,python-jupyter-core)
9508 ("python-traitlets" ,python-traitlets)))
9509 (home-page "http://jupyter.org")
9510 (synopsis "Jupyter Notebook format")
9511 (description "This package provides the reference implementation of the
9512 Jupyter Notebook format and Python APIs for working with notebooks.")
9513 (license license:bsd-3)))
9514
9515 (define-public python2-nbformat
9516 (package-with-python2 python-nbformat))
9517
9518 (define-public python-bleach
9519 (package
9520 (name "python-bleach")
9521 (version "3.1.5")
9522 (source
9523 (origin
9524 (method url-fetch)
9525 (uri (pypi-uri "bleach" version))
9526 (sha256
9527 (base32 "0jqa8f1ni10cyf4h7sjpf8mbqlcbkyvmsnli77qrxdcxvc7m4k1w"))))
9528 (build-system python-build-system)
9529 (propagated-inputs
9530 `(("python-webencodings" ,python-webencodings)
9531 ("python-six" ,python-six)))
9532 (native-inputs
9533 `(("python-datrie" ,python-datrie)
9534 ("python-genshi" ,python-genshi)
9535 ("python-lxml" ,python-lxml)
9536 ("python-pytest" ,python-pytest)))
9537 (home-page "https://github.com/mozilla/bleach")
9538 (synopsis "Whitelist-based HTML-sanitizing tool")
9539 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
9540 (license license:asl2.0)))
9541
9542 (define-public python2-bleach
9543 (package-with-python2 python-bleach))
9544
9545 (define-public python-entrypoints
9546 (package
9547 (name "python-entrypoints")
9548 (version "0.3")
9549 (source
9550 (origin
9551 (method url-fetch)
9552 (uri (pypi-uri "entrypoints" version))
9553 (sha256
9554 (base32
9555 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
9556 (build-system python-build-system)
9557 ;; The package does not come with a setup.py file, so we have to generate
9558 ;; one ourselves.
9559 (arguments
9560 `(#:tests? #f
9561 #:phases
9562 (modify-phases %standard-phases
9563 (add-after 'unpack 'create-setup.py
9564 (lambda _
9565 (call-with-output-file "setup.py"
9566 (lambda (port)
9567 (format port "\
9568 from setuptools import setup
9569 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
9570 " ,version))))))))
9571 (home-page "https://github.com/takluyver/entrypoints")
9572 (synopsis "Discover and load entry points from installed Python packages")
9573 (description "Entry points are a way for Python packages to advertise
9574 objects with some common interface. The most common examples are
9575 @code{console_scripts} entry points, which define shell commands by
9576 identifying a Python function to run. The @code{entrypoints} module contains
9577 functions to find and load entry points.")
9578 (license license:expat)))
9579
9580 (define-public python2-entrypoints
9581 (package-with-python2 python-entrypoints))
9582
9583 (define-public python-epc
9584 (package
9585 (name "python-epc")
9586 (version "0.0.5")
9587 (source
9588 (origin
9589 (method url-fetch)
9590 (uri (pypi-uri "epc" version))
9591 (sha256
9592 (base32
9593 "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
9594 (build-system python-build-system)
9595 (propagated-inputs
9596 `(("python-sexpdata" ,python-sexpdata)))
9597 (native-inputs
9598 `(("python-nose" ,python-nose)))
9599 (home-page "https://github.com/tkf/python-epc")
9600 (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
9601 (description
9602 "Python-EPC can call elisp functions from Python and Python functions
9603 from elisp.")
9604 (license license:gpl3)))
9605
9606 (define-public python-forex-python
9607 (package
9608 (name "python-forex-python")
9609 (version "1.5")
9610 (source
9611 (origin
9612 (method url-fetch)
9613 (uri (pypi-uri "forex-python" version))
9614 (sha256
9615 (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
9616 (build-system python-build-system)
9617 (arguments
9618 ;; Tests are not included in the PyPI tarball. Also, the tests in the
9619 ;; repository require online data.
9620 `(#:tests? #f))
9621 (propagated-inputs
9622 `(("python-requests" ,python-requests)
9623 ("python-simplejson" ,python-simplejson)))
9624 (home-page "https://github.com/MicroPyramid/forex-python")
9625 (synopsis "Foreign exchange rates and currency conversion")
9626 (description
9627 "@code{python-forex-python} can be used to manipulate foreign
9628 exchange rates and to operate currency conversions.
9629
9630 Features:
9631 @itemize
9632 @item List all currency rates.
9633 @item BitCoin price for all currencies.
9634 @item Converting amount to BitCoins.
9635 @item Get historical rates for any day since 1999.
9636 @item Conversion rate for one currency(ex; USD to INR).
9637 @item Convert amount from one currency to other.('USD 10$' to INR).
9638 @item Currency symbols.
9639 @item Currency names.
9640 @end itemize")
9641 (license license:expat)))
9642
9643 (define-public python-simpleeval
9644 (package
9645 (name "python-simpleeval")
9646 (version "0.9.10")
9647 (source
9648 (origin
9649 (method url-fetch)
9650 (uri (pypi-uri "simpleeval" version))
9651 (sha256
9652 (base32 "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
9653 (build-system python-build-system)
9654 (home-page "https://github.com/danthedeckie/simpleeval")
9655 (synopsis "Simple, safe single expression evaluator library")
9656 (description
9657 "This package provides a quick single file library for easily adding
9658 evaluatable expressions into python projects. Say you want to allow a user
9659 to set an alarm volume, which could depend on the time of day, alarm level,
9660 how many previous alarms had gone off, and if there is music playing at the
9661 time.")
9662 (license license:expat)))
9663
9664 (define-public python-nbconvert
9665 (package
9666 (name "python-nbconvert")
9667 (version "5.0.0b1")
9668 (source
9669 (origin
9670 (method url-fetch)
9671 (uri (pypi-uri "nbconvert" version))
9672 (sha256
9673 (base32
9674 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
9675 (build-system python-build-system)
9676 (arguments
9677 `(;; The "bdist_egg" target is disabled by default, causing the installation
9678 ;; to fail.
9679 #:configure-flags (list "bdist_egg")
9680 ;; FIXME: 5 failures, 40 errors.
9681 #:tests? #f))
9682 ;; #:phases
9683 ;; (modify-phases %standard-phases
9684 ;; (replace 'check
9685 ;; (lambda _
9686 ;; (zero? (system* "py.test" "-v")))))
9687 (native-inputs
9688 `(("python-pytest" ,python-pytest)))
9689 (propagated-inputs
9690 `(("python-bleach" ,python-bleach)
9691 ("python-entrypoints" ,python-entrypoints)
9692 ("python-jinja2" ,python-jinja2)
9693 ("python-jupyter-core" ,python-jupyter-core)
9694 ("python-mistune" ,python-mistune)
9695 ("python-nbformat" ,python-nbformat)
9696 ("python-pygments" ,python-pygments)
9697 ("python-traitlets" ,python-traitlets)))
9698 (home-page "http://jupyter.org")
9699 (synopsis "Converting Jupyter Notebooks")
9700 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
9701 notebooks to various other formats via Jinja templates. It allows you to
9702 convert an @code{.ipynb} notebook file into various static formats including:
9703
9704 @enumerate
9705 @item HTML
9706 @item LaTeX
9707 @item PDF
9708 @item Reveal JS
9709 @item Markdown (md)
9710 @item ReStructured Text (rst)
9711 @item executable script
9712 @end enumerate\n")
9713 (license license:bsd-3)))
9714
9715 (define-public python2-nbconvert
9716 (package-with-python2 python-nbconvert))
9717
9718 (define-public python-notebook
9719 (package
9720 (name "python-notebook")
9721 (version "5.7.4")
9722 (source (origin
9723 (method url-fetch)
9724 (uri (pypi-uri "notebook" version))
9725 (sha256
9726 (base32
9727 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
9728 (build-system python-build-system)
9729 (arguments
9730 `(#:phases
9731 (modify-phases %standard-phases
9732 (replace 'check
9733 (lambda _
9734 ;; These tests require a browser
9735 (delete-file-recursively "notebook/tests/selenium")
9736 ;; Some tests need HOME
9737 (setenv "HOME" "/tmp")
9738 ;; This file contains "warningfilters", which are not supported
9739 ;; by this version of nose.
9740 (delete-file "setup.cfg")
9741 (with-directory-excursion "/tmp"
9742 (invoke "nosetests" "-v"))
9743 #t)))))
9744 (propagated-inputs
9745 `(("python-jupyter-core" ,python-jupyter-core)
9746 ("python-nbformat" ,python-nbformat)
9747 ("python-nbconvert" ,python-nbconvert)
9748 ("python-prometheus-client" ,python-prometheus-client)
9749 ("python-send2trash" ,python-send2trash)
9750 ("python-terminado" ,python-terminado)))
9751 (native-inputs
9752 `(("python-nose" ,python-nose)
9753 ("python-sphinx" ,python-sphinx)
9754 ("python-requests" ,python-requests)))
9755 (home-page "http://jupyter.org/")
9756 (synopsis "Web-based notebook environment for interactive computing")
9757 (description
9758 "The Jupyter HTML notebook is a web-based notebook environment for
9759 interactive computing.")
9760 (properties `((python2-variant . ,(delay python2-notebook))))
9761 (license license:bsd-3)))
9762
9763 (define-public python2-notebook
9764 (let ((base (package-with-python2
9765 (strip-python2-variant python-notebook))))
9766 (package (inherit base)
9767 (native-inputs
9768 `(("python2-mock" ,python2-mock)
9769 ,@(package-native-inputs base)))
9770 (arguments
9771 (substitute-keyword-arguments (package-arguments base)
9772 ((#:phases phases)
9773 `(modify-phases ,phases
9774 (add-before 'check 'disable-test-case
9775 ;; The test requires network access to localhost. Curiously it
9776 ;; fails with Python 2 only. Simply make the test-case return
9777 ;; immediately.
9778 (lambda _
9779 (substitute*
9780 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
9781 (("formats = self.nbconvert_api") "return #")))))))))))
9782
9783 (define-public python-widgetsnbextension
9784 (package
9785 (name "python-widgetsnbextension")
9786 (version "3.5.1")
9787 (source
9788 (origin
9789 (method url-fetch)
9790 (uri (pypi-uri "widgetsnbextension" version))
9791 (sha256
9792 (base32
9793 "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
9794 (build-system python-build-system)
9795 (propagated-inputs
9796 `(("python-ipykernel" ,python-ipykernel)
9797 ("python-notebook" ,python-notebook)))
9798 (native-inputs
9799 `(("python-certifi" ,python-certifi)
9800 ("python-nose" ,python-nose)))
9801 (home-page "https://ipython.org")
9802 (synopsis "IPython HTML widgets for Jupyter")
9803 (description "This package provides interactive HTML widgets for Jupyter
9804 notebooks.")
9805 (license license:bsd-3)))
9806
9807 (define-public python2-widgetsnbextension
9808 (package-with-python2 python-widgetsnbextension))
9809
9810 (define-public python-ipywidgets
9811 (package
9812 (name "python-ipywidgets")
9813 (version "7.5.1")
9814 (source
9815 (origin
9816 (method url-fetch)
9817 (uri (pypi-uri "ipywidgets" version))
9818 (sha256
9819 (base32
9820 "15sww2mvnkqlvx55gwa82v05062a8j1xpncnqna4k9sl53hgcig9"))))
9821 (build-system python-build-system)
9822 (propagated-inputs
9823 `(("python-ipython" ,python-ipython)
9824 ("python-traitlets" ,python-traitlets)
9825 ("python-widgetsnbextension" ,python-widgetsnbextension)))
9826 (native-inputs
9827 `(("python-nose" ,python-nose)
9828 ("python-pytest" ,python-pytest)))
9829 (home-page "https://ipython.org")
9830 (synopsis "IPython HTML widgets for Jupyter")
9831 (description "Ipywidgets are interactive HTML widgets for Jupyter
9832 notebooks and the IPython kernel. Notebooks come alive when interactive
9833 widgets are used. Users gain control of their data and can visualize changes
9834 in the data.")
9835 (license license:bsd-3)))
9836
9837 (define-public python2-ipywidgets
9838 (package-with-python2 python-ipywidgets))
9839
9840 (define-public python-jupyter-console
9841 (package
9842 (name "python-jupyter-console")
9843 (version "6.1.0")
9844 (source
9845 (origin
9846 (method url-fetch)
9847 (uri (pypi-uri "jupyter_console" version))
9848 (sha256
9849 (base32
9850 "06s3kr5vx0l1y1b7fxb04dmrppscl7q69sl9yyfr0d057d1ssvkg"))))
9851 (build-system python-build-system)
9852 (propagated-inputs
9853 `(("python-ipykernel" ,python-ipykernel)
9854 ("python-jupyter-client" ,python-jupyter-client)
9855 ("python-prompt-toolkit" ,python-prompt-toolkit-2)
9856 ("python-pygments" ,python-pygments)))
9857 (native-inputs
9858 `(("python-nose" ,python-nose)))
9859 (home-page "https://jupyter.org")
9860 (synopsis "Jupyter terminal console")
9861 (description "This package provides a terminal-based console frontend for
9862 Jupyter kernels. It also allows for console-based interaction with non-Python
9863 Jupyter kernels such as IJulia and IRKernel.")
9864 (properties `((python2-variant . ,(delay python2-jupyter-console))))
9865 (license license:bsd-3)))
9866
9867 (define-public python2-jupyter-console
9868 (package
9869 (name "python2-jupyter-console")
9870 (version "5.2.0")
9871 (source
9872 (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "jupyter_console" version))
9875 (sha256
9876 (base32
9877 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
9878 (build-system python-build-system)
9879 (arguments
9880 `(#:python ,python-2
9881 #:tests? #f)) ; Tests only run in a TTY.
9882 (propagated-inputs
9883 `(("python2-ipykernel" ,python2-ipykernel)
9884 ("python2-jupyter-client" ,python2-jupyter-client)
9885 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
9886 ("python2-pygments" ,python2-pygments)))
9887 (native-inputs
9888 `(("python2-nose" ,python2-nose)))
9889 (home-page "https://jupyter.org")
9890 (synopsis "Jupyter terminal console")
9891 (description "This package provides a terminal-based console frontend for
9892 Jupyter kernels. It also allows for console-based interaction with non-Python
9893 Jupyter kernels such as IJulia and IRKernel.")
9894 (license license:bsd-3)))
9895
9896 ;; The python-ipython and python-jupyter-console require each other. To get
9897 ;; the functionality in both packages working, strip down the
9898 ;; python-jupyter-console package when using it as an input to python-ipython.
9899 (define python-jupyter-console-minimal
9900 (package
9901 (inherit python-jupyter-console)
9902 (name "python-jupyter-console-minimal")
9903 (arguments
9904 (substitute-keyword-arguments
9905 (package-arguments python-jupyter-console)
9906 ((#:phases phases)
9907 `(modify-phases ,phases
9908 (add-after 'install 'delete-bin
9909 (lambda* (#:key outputs #:allow-other-keys)
9910 ;; Delete the bin files, to avoid conflicts in profiles
9911 ;; where python-ipython and python-jupyter-console are
9912 ;; both present.
9913 (delete-file-recursively
9914 (string-append
9915 (assoc-ref outputs "out") "/bin"))))))))
9916 ;; Remove the python-ipython propagated input, to avoid the cycle
9917 (propagated-inputs
9918 (alist-delete
9919 "python-ipython"
9920 (package-propagated-inputs python-jupyter-console)))))
9921
9922 (define-public python-qtconsole
9923 (package
9924 (name "python-qtconsole")
9925 (version "4.4.3")
9926 (source
9927 (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "qtconsole" version))
9930 (sha256
9931 (base32
9932 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
9933 (build-system python-build-system)
9934 (arguments
9935 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
9936 ;; but we only have the LTS version 5.x. This means that there might be
9937 ;; runtime errors, but since this is a dependency of the Jupyter package,
9938 ;; and Jupyter can be used without the qtconsole we can overlook this for
9939 ;; now.
9940 `(#:tests? #f
9941 #:phases
9942 (modify-phases %standard-phases
9943 (add-before 'check 'pre-check
9944 (lambda _
9945 (setenv "QT_QPA_PLATFORM" "offscreen")
9946 #t)))))
9947 (propagated-inputs
9948 `(("python-ipykernel" ,python-ipykernel)
9949 ("python-ipython" ,python-ipython)))
9950 (native-inputs
9951 `(("python-pytest" ,python-pytest)))
9952 (home-page "http://jupyter.org")
9953 (synopsis "Jupyter Qt console")
9954 (description "This package provides a Qt-based console for Jupyter with
9955 support for rich media output.")
9956 (license license:bsd-3)))
9957
9958 (define-public python-jsbeautifier
9959 (package
9960 (name "python-jsbeautifier")
9961 (version "1.10.2")
9962 (home-page "https://github.com/beautify-web/js-beautify")
9963 (source (origin
9964 (method git-fetch)
9965 (uri (git-reference
9966 (url home-page)
9967 (commit (string-append "v" version))))
9968 (file-name (git-file-name name version))
9969 (sha256
9970 (base32
9971 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
9972 (build-system python-build-system)
9973 (arguments
9974 `(#:phases (modify-phases %standard-phases
9975 (add-after 'unpack 'chdir
9976 (lambda _
9977 ;; The upstream Git repository contains all the code,
9978 ;; but this package only builds the python code.
9979 (chdir "python")
9980 #t))
9981 (add-after 'unpack 'patch-python-six-requirements
9982 (lambda _
9983 (substitute* "python/setup.py"
9984 (("six>=1.12.0")
9985 "six>=1.11.0"))
9986 #t)))))
9987 (propagated-inputs
9988 `(("python-editorconfig" ,python-editorconfig)
9989 ("python-six" ,python-six)))
9990 (native-inputs
9991 `(("python-pytest" ,python-pytest)))
9992 (synopsis "JavaScript unobfuscator and beautifier")
9993 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
9994 popular online obfuscators.")
9995 (license license:expat)))
9996
9997 (define-public jupyter
9998 (package
9999 (name "jupyter")
10000 (version "1.0.0")
10001 (source
10002 (origin
10003 (method url-fetch)
10004 (uri (pypi-uri "jupyter" version))
10005 (sha256
10006 (base32
10007 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
10008 (build-system python-build-system)
10009 (arguments '(#:tests? #f)) ; there are none.
10010 (propagated-inputs
10011 `(("python-ipykernel" ,python-ipykernel)
10012 ("python-ipywidgets" ,python-ipywidgets)
10013 ("python-jupyter-console" ,python-jupyter-console)
10014 ("python-nbconvert" ,python-nbconvert)
10015 ("python-notebook" ,python-notebook)
10016 ("python-qtconsole" ,python-qtconsole)))
10017 (native-search-paths
10018 (list (search-path-specification
10019 (variable "JUPYTER_PATH")
10020 (files '("share/jupyter")))))
10021 (home-page "https://jupyter.org")
10022 (synopsis "Web application for interactive documents")
10023 (description
10024 "The Jupyter Notebook is a web application that allows you to create and
10025 share documents that contain live code, equations, visualizations and
10026 explanatory text. Uses include: data cleaning and transformation, numerical
10027 simulation, statistical modeling, machine learning and much more.")
10028 (license license:bsd-3)))
10029
10030 (define-public python-chardet
10031 (package
10032 (name "python-chardet")
10033 (version "3.0.4")
10034 (source
10035 (origin
10036 (method url-fetch)
10037 (uri (pypi-uri "chardet" version))
10038 (sha256
10039 (base32
10040 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
10041 (native-inputs
10042 `(("python-hypothesis" ,python-hypothesis)
10043 ("python-pytest" ,python-pytest)
10044 ("python-pytest-runner" ,python-pytest-runner)))
10045 (build-system python-build-system)
10046 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
10047 (arguments `(#:tests? #f))
10048 (home-page "https://github.com/chardet/chardet")
10049 (synopsis "Universal encoding detector for Python 2 and 3")
10050 (description
10051 "This package provides @code{chardet}, a Python module that can
10052 automatically detect a wide range of file encodings.")
10053 (license license:lgpl2.1+)))
10054
10055 (define-public python2-chardet
10056 (package-with-python2 python-chardet))
10057
10058 (define-public python-docopt
10059 (package
10060 (name "python-docopt")
10061 (version "0.6.2")
10062 (source
10063 (origin
10064 (method git-fetch)
10065 ;; The release on PyPI does not include tests.
10066 (uri (git-reference
10067 (url "https://github.com/docopt/docopt")
10068 (commit version)))
10069 (file-name (git-file-name name version))
10070 (sha256
10071 (base32
10072 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
10073 (build-system python-build-system)
10074 (native-inputs
10075 `(("python-pytest" ,python-pytest)))
10076 (arguments
10077 `(#:phases
10078 (modify-phases %standard-phases
10079 (replace 'check
10080 (lambda _ (invoke "py.test"))))))
10081 (home-page "http://docopt.org")
10082 (synopsis "Command-line interface description language for Python")
10083 (description "This library allows the user to define a command-line
10084 interface from a program's help message rather than specifying it
10085 programmatically with command-line parsers like @code{getopt} and
10086 @code{argparse}.")
10087 (license license:expat)))
10088
10089 (define-public python2-docopt
10090 (package-with-python2 python-docopt))
10091
10092 (define-public python-pythondialog
10093 (package
10094 (name "python-pythondialog")
10095 (version "3.4.0")
10096 (source
10097 (origin
10098 (method url-fetch)
10099 (uri (pypi-uri "pythondialog" version))
10100 (sha256
10101 (base32
10102 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
10103 (build-system python-build-system)
10104 (arguments
10105 `(#:phases
10106 (modify-phases %standard-phases
10107 (add-after 'unpack 'patch-path
10108 (lambda* (#:key inputs #:allow-other-keys)
10109 (let* ((dialog (assoc-ref inputs "dialog")))
10110 ;; Since this library really wants to grovel the search path, we
10111 ;; must hardcode dialog's store path into it.
10112 (substitute* "dialog.py"
10113 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
10114 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
10115 #t))))
10116 #:tests? #f)) ; no test suite
10117 (propagated-inputs
10118 `(("dialog" ,dialog)))
10119 (home-page "http://pythondialog.sourceforge.net/")
10120 (synopsis "Python interface to the UNIX dialog utility")
10121 (description "A Python wrapper for the dialog utility. Its purpose is to
10122 provide an easy to use, pythonic and comprehensive Python interface to dialog.
10123 This allows one to make simple text-mode user interfaces on Unix-like systems")
10124 (license license:lgpl2.1)
10125 (properties `((python2-variant . ,(delay python2-pythondialog))))))
10126
10127 (define-public python2-pythondialog
10128 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
10129 (package
10130 (inherit base)
10131 (version (package-version python-pythondialog))
10132 (source (origin
10133 (method url-fetch)
10134 (uri (pypi-uri "python2-pythondialog" version))
10135 (sha256
10136 (base32
10137 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
10138
10139 (define-public python-configobj
10140 (package
10141 (name "python-configobj")
10142 (version "5.0.6")
10143 (source (origin
10144 (method url-fetch)
10145 (uri (pypi-uri "configobj" version))
10146 (sha256
10147 (base32
10148 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
10149 ;; Patch setup.py so it looks for python-setuptools, which is
10150 ;; required to parse the keyword 'install_requires' in setup.py.
10151 (patches (search-patches "python-configobj-setuptools.patch"))))
10152 (build-system python-build-system)
10153 (propagated-inputs
10154 `(("python-six" ,python-six)))
10155 (synopsis "Config file reading, writing and validation")
10156 (description "ConfigObj is a simple but powerful config file reader and
10157 writer: an ini file round tripper. Its main feature is that it is very easy to
10158 use, with a straightforward programmer’s interface and a simple syntax for
10159 config files.")
10160 (home-page "https://github.com/DiffSK/configobj")
10161 (license license:bsd-3)))
10162
10163 (define-public python2-configobj
10164 (package-with-python2 python-configobj))
10165
10166 (define-public python-configargparse
10167 (package
10168 (name "python-configargparse")
10169 (version "0.14.0")
10170 (source (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "ConfigArgParse" version))
10173 (sha256
10174 (base32
10175 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
10176 (build-system python-build-system)
10177 (native-inputs
10178 `(("python-pyyaml" ,python-pyyaml)))
10179 (arguments
10180 `(#:phases
10181 (modify-phases %standard-phases
10182 (replace 'check
10183 (lambda _
10184 ;; Bypass setuptools-shim because one test relies on "setup.py"
10185 ;; being the first argument passed to the python call.
10186 ;;
10187 ;; NOTE: Many tests do not run because they rely on Python's
10188 ;; built-in test.test_argparse, but we remove the unit tests from
10189 ;; our Python installation.
10190 (invoke "python" "setup.py" "test"))))))
10191 (synopsis "Replacement for argparse")
10192 (description "A drop-in replacement for argparse that allows options to also
10193 be set via config files and/or environment variables.")
10194 (home-page "https://github.com/bw2/ConfigArgParse")
10195 (license license:expat)))
10196
10197 (define-public python2-configargparse
10198 (package-with-python2 python-configargparse))
10199
10200 (define-public python-argparse-manpage
10201 (package
10202 (name "python-argparse-manpage")
10203 (version "1.1")
10204 (source
10205 (origin
10206 (method url-fetch)
10207 (uri (pypi-uri "argparse-manpage" version))
10208 (sha256
10209 (base32
10210 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
10211 (build-system python-build-system)
10212 (home-page "https://github.com/praiskup/argparse-manpage")
10213 (synopsis "Build manual page from Python's ArgumentParser object")
10214 (description
10215 "This package provides tools to build manual pages from Python's
10216 @code{ArgumentParser} object.")
10217 (license license:asl2.0)))
10218
10219 (define-public python-contextlib2
10220 (package
10221 (name "python-contextlib2")
10222 (version "0.6.0.post1")
10223 (source
10224 (origin
10225 (method url-fetch)
10226 (uri (pypi-uri "contextlib2" version))
10227 (sha256
10228 (base32
10229 "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
10230 (build-system python-build-system)
10231 (home-page "https://contextlib2.readthedocs.org/")
10232 (synopsis "Tools for decorators and context managers")
10233 (description "This module is primarily a backport of the Python
10234 3.2 contextlib to earlier Python versions. Like contextlib, it
10235 provides utilities for common tasks involving decorators and context
10236 managers. It also contains additional features that are not part of
10237 the standard library.")
10238 (properties `((python2-variant . ,(delay python2-contextlib2))))
10239 (license license:psfl)))
10240
10241 (define-public python2-contextlib2
10242 (let ((base (package-with-python2
10243 (strip-python2-variant python-contextlib2))))
10244 (package
10245 (inherit base)
10246 (arguments
10247 (substitute-keyword-arguments (package-arguments base)
10248 ((#:phases phases)
10249 `(modify-phases ,phases
10250 (replace 'check
10251 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
10252 (native-inputs
10253 `(("python2-unittest2" ,python2-unittest2))))))
10254
10255 ;; This package is used by python2-pytest via python2-importlib-metadata,
10256 ;; and thus can not depend on python-unittest2 (which depends on pytest).
10257 (define-public python2-contextlib2-bootstrap
10258 (hidden-package
10259 (package/inherit
10260 python2-contextlib2
10261 (name "python2-contextlib2-bootstrap")
10262 (arguments
10263 `(#:tests? #f
10264 ,@(package-arguments python2-contextlib2)))
10265 (native-inputs '()))))
10266
10267 (define-public python-texttable
10268 (package
10269 (name "python-texttable")
10270 (version "1.6.2")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (pypi-uri "texttable" version))
10275 (sha256
10276 (base32
10277 "1x5l77akfc20x52jma9573qp8l8r07q103pm4l0pbizvh4vp1wzg"))))
10278 (build-system python-build-system)
10279 (arguments
10280 `(#:phases
10281 (modify-phases %standard-phases
10282 (replace 'check
10283 (lambda _ (invoke "pytest" "tests.py"))))))
10284 (native-inputs
10285 `(("python-pytest" ,python-pytest)))
10286 (home-page "https://github.com/foutaise/texttable/")
10287 (synopsis "Python module for creating simple ASCII tables")
10288 (description "Texttable is a Python module for creating simple ASCII
10289 tables.")
10290 (license license:expat)))
10291
10292 (define-public python2-texttable
10293 (package-with-python2 python-texttable))
10294
10295 (define-public python-atomicwrites
10296 (package
10297 (name "python-atomicwrites")
10298 (version "1.3.0")
10299 (source (origin
10300 (method url-fetch)
10301 (uri (pypi-uri "atomicwrites" version))
10302 (sha256
10303 (base32
10304 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
10305 (build-system python-build-system)
10306 (synopsis "Atomic file writes in Python")
10307 (description "Library for atomic file writes using platform dependent tools
10308 for atomic file system operations.")
10309 (home-page "https://github.com/untitaker/python-atomicwrites")
10310 (license license:expat)))
10311
10312 (define-public python2-atomicwrites
10313 (package-with-python2 python-atomicwrites))
10314
10315 (define-public python-click-threading
10316 (package
10317 (name "python-click-threading")
10318 (version "0.4.4")
10319 (source (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "click-threading" version))
10322 (sha256
10323 (base32
10324 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
10325 (build-system python-build-system)
10326 (propagated-inputs
10327 `(("python-click" ,python-click)))
10328 (synopsis "Utilities for multithreading in Click")
10329 (description "This package provides utilities for multithreading in Click
10330 applications.")
10331 (home-page "https://github.com/click-contrib/click-threading")
10332 (license license:expat)))
10333
10334 (define-public python-click-log
10335 (package
10336 (name "python-click-log")
10337 (version "0.3.2")
10338 (source (origin
10339 (method url-fetch)
10340 (uri (pypi-uri "click-log" version))
10341 (sha256
10342 (base32
10343 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
10344 (build-system python-build-system)
10345 (propagated-inputs
10346 `(("python-click" ,python-click)))
10347 (synopsis "Logging for click applications")
10348 (description "This package provides a Python library for logging Click
10349 applications.")
10350 (home-page "https://github.com/click-contrib/click-log")
10351 (license license:expat)))
10352
10353 (define-public python-apipkg
10354 (package
10355 (name "python-apipkg")
10356 (version "1.5")
10357 (source (origin
10358 (method url-fetch)
10359 (uri (pypi-uri "apipkg" version))
10360 (sha256
10361 (base32
10362 "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
10363 (build-system python-build-system)
10364 (native-inputs
10365 `(("python-pytest" ,python-pytest)
10366 ("python-setuptools-scm" ,python-setuptools-scm)))
10367 (synopsis "Namespace control and lazy-import mechanism")
10368 (description "With apipkg you can control the exported namespace of a Python
10369 package and greatly reduce the number of imports for your users. It is a small
10370 pure Python module that works on virtually all Python versions.")
10371 (home-page "https://github.com/pytest-dev/apipkg")
10372 (license license:expat)))
10373
10374 (define-public python-execnet
10375 (package
10376 (name "python-execnet")
10377 (version "1.4.1")
10378 (source (origin
10379 (method url-fetch)
10380 (uri (pypi-uri "execnet" version))
10381 (sha256
10382 (base32
10383 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
10384 (build-system python-build-system)
10385 (arguments
10386 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
10387 ;; The two test failures are caused by the lack of an `ssh` executable.
10388 ;; The test suite can be run with pytest after the 'install' phase.
10389 #:tests? #f))
10390 (native-inputs
10391 `(("python-pytest" ,python-pytest)
10392 ("python-setuptools-scm" ,python-setuptools-scm)))
10393 (propagated-inputs
10394 `(("python-apipkg" ,python-apipkg)))
10395 (synopsis "Rapid multi-Python deployment")
10396 (description "Execnet provides a share-nothing model with
10397 channel-send/receive communication for distributing execution across many
10398 Python interpreters across version, platform and network barriers. It has a
10399 minimal and fast API targeting the following uses:
10400 @enumerate
10401 @item distribute tasks to (many) local or remote CPUs
10402 @item write and deploy hybrid multi-process applications
10403 @item write scripts to administer multiple environments
10404 @end enumerate")
10405 (home-page "https://codespeak.net/execnet/")
10406 (license license:expat)))
10407
10408 (define-public python2-execnet
10409 (package-with-python2 python-execnet))
10410
10411 (define-public python-icalendar
10412 (package
10413 (name "python-icalendar")
10414 (version "4.0.5")
10415 (source (origin
10416 (method url-fetch)
10417 (uri (pypi-uri "icalendar" version))
10418 (sha256
10419 (base32
10420 "14ynjj65kfmlcvpb7k097w789wvxncd3cr3xz5m1jz9yl9v6vv5q"))))
10421 (build-system python-build-system)
10422 (propagated-inputs
10423 `(("python-dateutil" ,python-dateutil)
10424 ("python-pytz" ,python-pytz)))
10425 (synopsis "Python library for parsing iCalendar files")
10426 (description "The icalendar package is a parser/generator of iCalendar
10427 files for use with Python.")
10428 (home-page "https://github.com/collective/icalendar")
10429 (license license:bsd-2)))
10430
10431 (define-public python-args
10432 (package
10433 (name "python-args")
10434 (version "0.1.0")
10435 (source (origin
10436 (method url-fetch)
10437 (uri (pypi-uri "args" version))
10438 (sha256
10439 (base32
10440 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
10441 (build-system python-build-system)
10442 (home-page "https://github.com/kennethreitz/args")
10443 (synopsis "Command-line argument parser")
10444 (description
10445 "This library provides a Python module to parse command-line arguments.")
10446 (license license:bsd-3)))
10447
10448 (define-public python2-args
10449 (package-with-python2 python-args))
10450
10451 (define-public python-clint
10452 (package
10453 (name "python-clint")
10454 (version "0.5.1")
10455 (source (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "clint" version))
10458 (sha256
10459 (base32
10460 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
10461 (build-system python-build-system)
10462 (arguments
10463 '(#:phases
10464 (modify-phases %standard-phases
10465 (replace 'check
10466 (lambda _ (invoke "py.test" "-v"))))))
10467 (native-inputs
10468 `(("python-pytest" ,python-pytest)))
10469 (propagated-inputs
10470 `(("python-args" ,python-args)))
10471 (home-page "https://github.com/kennethreitz/clint")
10472 (synopsis "Command-line interface tools")
10473 (description
10474 "Clint is a Python module filled with a set of tools for developing
10475 command-line applications, including tools for colored and indented
10476 output, progress bar display, and pipes.")
10477 (license license:isc)))
10478
10479 (define-public python2-clint
10480 (package-with-python2 python-clint))
10481
10482 (define-public python-rply
10483 (package
10484 (name "python-rply")
10485 (version "0.7.5")
10486 (source (origin
10487 (method url-fetch)
10488 (uri (pypi-uri "rply" version))
10489 (sha256
10490 (base32
10491 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
10492 (build-system python-build-system)
10493 (propagated-inputs
10494 `(("python-appdirs" ,python-appdirs)))
10495 (home-page "https://github.com/alex/rply")
10496 (synopsis "Parser generator for Python")
10497 (description
10498 "This package provides a pure Python based parser generator, that also
10499 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
10500 with a new public API, and RPython support.")
10501 (license license:bsd-3)))
10502
10503 (define-public python2-rply
10504 (package-with-python2 python-rply))
10505
10506 (define-public python-hy
10507 (package
10508 (name "python-hy")
10509 (version "0.18.0")
10510 (source (origin
10511 (method url-fetch)
10512 (uri (pypi-uri "hy" version))
10513 (sha256
10514 (base32
10515 "04dfwm336gw61fmgwikvh0cnxk682p19b4w555wl5d7mlym4rwj2"))))
10516 (build-system python-build-system)
10517 (arguments
10518 '(#:phases
10519 (modify-phases %standard-phases
10520 (add-before 'install 'set-HOME
10521 (lambda _
10522 (setenv "HOME" "/tmp") #t))
10523 (replace 'check
10524 (lambda _
10525 ;; Tests require write access to HOME.
10526 (setenv "HOME" "/tmp")
10527 (invoke "nosetests"))))))
10528 (native-inputs
10529 `(("python-coverage" ,python-coverage)
10530 ("python-nose" ,python-nose)))
10531 (propagated-inputs
10532 `(("python-astor" ,python-astor)
10533 ("python-colorama" ,python-colorama)
10534 ("python-rply" ,python-rply)
10535 ("python-funcparserlib"
10536 ,python-funcparserlib)))
10537 (home-page "http://hylang.org/")
10538 (synopsis "Lisp frontend to Python")
10539 (description
10540 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
10541 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
10542 Python at your fingertips, in Lisp form.")
10543 (license license:expat)))
10544
10545 (define-public python2-functools32
10546 (package
10547 (name "python2-functools32")
10548 (version "3.2.3-2")
10549 (source
10550 (origin
10551 (method url-fetch)
10552 (uri (pypi-uri "functools32" version))
10553 (sha256
10554 (base32
10555 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
10556 (build-system python-build-system)
10557 (arguments
10558 `(#:python ,python-2
10559 #:tests? #f)) ; no test target
10560 (home-page "https://github.com/MiCHiLU/python-functools32")
10561 (synopsis
10562 "Backport of the functools module from Python 3.2.3")
10563 (description
10564 "This package is a backport of the @code{functools} module from Python
10565 3.2.3 for use with older versions of Python and PyPy.")
10566 (license license:expat)))
10567
10568 (define-public python2-subprocess32
10569 (package
10570 (name "python2-subprocess32")
10571 (version "3.2.7")
10572 (source (origin
10573 (method url-fetch)
10574 (uri (pypi-uri "subprocess32" version))
10575 (sha256
10576 (base32
10577 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
10578 (patches
10579 (search-patches "python2-subprocess32-disable-input-test.patch"))))
10580 (build-system python-build-system)
10581 (arguments
10582 `(#:python ,python-2
10583 ;; The test suite fails with Python > 2.7.13:
10584 ;; import test.support
10585 ;; ImportError: No module named support
10586 #:tests? #f
10587 #:phases
10588 (modify-phases %standard-phases
10589 (add-after 'unpack 'patch-/bin/sh
10590 (lambda _
10591 (substitute* '("subprocess32.py"
10592 "test_subprocess32.py")
10593 (("/bin/sh") (which "sh")))
10594 #t)))))
10595 (home-page "https://github.com/google/python-subprocess32")
10596 (synopsis "Backport of the subprocess module from Python 3.2")
10597 (description
10598 "This is a backport of the @code{subprocess} standard library module
10599 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
10600 new features. On POSIX systems it is guaranteed to be reliable when used
10601 in threaded applications. It includes timeout support from Python 3.3 but
10602 otherwise matches 3.2’s API.")
10603 (license license:psfl)))
10604
10605 (define-public python2-futures
10606 (package
10607 (name "python2-futures")
10608 (version "3.2.0")
10609 (source
10610 (origin
10611 (method url-fetch)
10612 (uri (pypi-uri "futures" version))
10613 (sha256
10614 (base32
10615 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
10616 (build-system python-build-system)
10617 (arguments
10618 `(#:python ,python-2
10619 #:phases
10620 (modify-phases %standard-phases
10621 (replace 'check
10622 (lambda _
10623 (invoke "python" "test_futures.py")
10624 #t)))))
10625 (home-page "https://github.com/agronholm/pythonfutures")
10626 (synopsis
10627 "Backport of the concurrent.futures package from Python 3.2")
10628 (description
10629 "The concurrent.futures module provides a high-level interface for
10630 asynchronously executing callables. This package backports the
10631 concurrent.futures package from Python 3.2")
10632 (license license:bsd-3)))
10633
10634 (define-public python-promise
10635 (package
10636 (name "python-promise")
10637 (version "0.4.2")
10638 (source
10639 (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "promise" version))
10642 (sha256
10643 (base32
10644 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
10645 (build-system python-build-system)
10646 ;; Tests wants python-futures, which is a python2 only program, and
10647 ;; can't be found by python-promise at test time.
10648 (arguments `(#:tests? #f))
10649 (home-page "https://github.com/syrusakbary/promise")
10650 (synopsis "Promises/A+ implementation for Python")
10651 (description
10652 "Promises/A+ implementation for Python")
10653 (properties `((python2-variant . ,(delay python2-promise))))
10654 (license license:expat)))
10655
10656 (define-public python2-promise
10657 (let ((promise (package-with-python2
10658 (strip-python2-variant python-promise))))
10659 (package (inherit promise)
10660 (arguments (substitute-keyword-arguments (package-arguments promise)
10661 ((#:tests? _) #t)))
10662 (native-inputs
10663 `(("python2-futures" ,python2-futures)
10664 ("python2-pytest" ,python2-pytest)
10665 ,@(package-native-inputs promise))))))
10666
10667 (define-public python-progressbar2
10668 (package
10669 (name "python-progressbar2")
10670 (version "3.51.3")
10671 (source
10672 (origin
10673 (method url-fetch)
10674 (uri (pypi-uri "progressbar2" version))
10675 (sha256
10676 (base32
10677 "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
10678 (build-system python-build-system)
10679 (propagated-inputs
10680 `(("python-six" ,python-six)
10681 ("python-utils" ,python-utils)))
10682 (native-inputs
10683 `(("python-flake8" ,python-flake8)
10684 ("python-freezegun" ,python-freezegun)
10685 ("python-pycodestyle" ,python-pycodestyle)
10686 ("python-pytest" ,python-pytest)
10687 ("python-pytest-cache" ,python-pytest-cache)
10688 ("python-pytest-cov" ,python-pytest-cov)
10689 ("python-pytest-flakes" ,python-pytest-flakes)
10690 ("python-pytest-pep8" ,python-pytest-pep8)
10691 ("python-sphinx" ,python-sphinx)))
10692 (home-page "https://github.com/WoLpH/python-progressbar")
10693 (synopsis "Text progress bar library for Python")
10694 (description
10695 "This package provides a Python progressbar library to provide
10696 visual (yet text based) progress to long running operations.")
10697 (license license:bsd-3)))
10698
10699 (define-public python-progressbar33
10700 (package
10701 (name "python-progressbar33")
10702 (version "2.4")
10703 (source
10704 (origin
10705 (method url-fetch)
10706 (uri (pypi-uri "progressbar33" version))
10707 (sha256
10708 (base32
10709 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
10710 (build-system python-build-system)
10711 (home-page "https://github.com/germangh/python-progressbar")
10712 (synopsis "Text progress bar library for Python")
10713 (description
10714 "This package provides a text progress bar library for Python. This
10715 version only differs from the original @code{progressbar} package in that it
10716 uses relative package imports instead of absolute imports, which is necessary
10717 for the module to work under Python 3.3.")
10718 ;; Either or both of these licenses may be selected.
10719 (license (list license:lgpl2.1+ license:bsd-3))))
10720
10721 (define-public python-colorama
10722 (package
10723 (name "python-colorama")
10724 (version "0.4.3")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "colorama" version))
10729 (sha256
10730 (base32
10731 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))
10732 (build-system python-build-system)
10733 (synopsis "Colored terminal text rendering for Python")
10734 (description "Colorama is a Python library for rendering colored terminal
10735 text.")
10736 (home-page "https://pypi.org/project/colorama/")
10737 (license license:bsd-3)))
10738
10739 (define-public python2-colorama
10740 (package-with-python2 python-colorama))
10741
10742 (define-public python-rsa
10743 (package
10744 (name "python-rsa")
10745 (version "3.4.2")
10746 (source
10747 (origin
10748 (method url-fetch)
10749 (uri (pypi-uri "rsa" version))
10750 (sha256
10751 (base32
10752 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
10753 (build-system python-build-system)
10754 (propagated-inputs
10755 `(("python-pyasn1" ,python-pyasn1)))
10756 (synopsis "Pure-Python RSA implementation")
10757 (description "Python-RSA is a pure-Python RSA implementation. It supports
10758 encryption and decryption, signing and verifying signatures, and key
10759 generation according to PKCS#1 version 1.5. It can be used as a Python
10760 library as well as on the command line.")
10761 (home-page "https://stuvel.eu/rsa")
10762 (license license:asl2.0)))
10763
10764 (define-public python2-rsa
10765 (package-with-python2 python-rsa))
10766
10767 (define-public python-pluggy
10768 (package
10769 (name "python-pluggy")
10770 (version "0.13.1")
10771 (source
10772 (origin
10773 (method url-fetch)
10774 (uri (pypi-uri "pluggy" version))
10775 (sha256
10776 (base32
10777 "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
10778 (build-system python-build-system)
10779 (native-inputs
10780 `(("python-setuptools-scm" ,python-setuptools-scm)))
10781 (synopsis "Plugin and hook calling mechanism for Python")
10782 (description "Pluggy is an extraction of the plugin manager as used by
10783 Pytest but stripped of Pytest specific details.")
10784 (home-page "https://pypi.org/project/pluggy/")
10785 (properties `((python2-variant . ,(delay python2-pluggy))))
10786 (license license:expat)))
10787
10788 (define-public python2-pluggy
10789 (let ((base (package-with-python2 (strip-python2-variant
10790 python-pluggy))))
10791 (package/inherit
10792 base
10793 (propagated-inputs
10794 `(("python-importlib-metadata" ,python2-importlib-metadata))))))
10795
10796 ;; This package requires python2-importlib-metadata, but that package
10797 ;; ends up needing python2-pluggy via python2-pytest, so we need this
10798 ;; variant to solve the circular dependency.
10799 (define-public python2-pluggy-bootstrap
10800 (hidden-package
10801 (package/inherit
10802 python2-pluggy
10803 (name "python2-pluggy-bootstrap")
10804 (arguments
10805 `(#:tests? #f
10806 ,@(package-arguments python2-pluggy)))
10807 (propagated-inputs
10808 `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
10809
10810 (define-public python-tox
10811 (package
10812 (name "python-tox")
10813 (version "2.8.1")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "tox" version))
10818 (sha256
10819 (base32
10820 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
10821 (build-system python-build-system)
10822 (arguments
10823 ;; FIXME: Tests require pytest-timeout, which itself requires
10824 ;; pytest>=2.8.0 for installation.
10825 '(#:tests? #f))
10826 (propagated-inputs
10827 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
10828 ("python-py" ,python-py)
10829 ("python-virtualenv" ,python-virtualenv)))
10830 (native-inputs
10831 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
10832 ("python-pytest" ,python-pytest) ; >= 2.3.5
10833 ("python-setuptools-scm" ,python-setuptools-scm)))
10834 (home-page "https://tox.readthedocs.io")
10835 (synopsis "Virtualenv-based automation of test activities")
10836 (description "Tox is a generic virtualenv management and test command line
10837 tool. It can be used to check that a package installs correctly with
10838 different Python versions and interpreters, or run tests in each type of
10839 supported environment, or act as a frontend to continuous integration
10840 servers.")
10841 (license license:expat)))
10842
10843 (define-public python2-tox
10844 (package-with-python2 python-tox))
10845
10846 (define-public python-jmespath
10847 (package
10848 (name "python-jmespath")
10849 (version "0.9.4")
10850 (source
10851 (origin
10852 (method url-fetch)
10853 (uri (pypi-uri "jmespath" version))
10854 (sha256
10855 (base32
10856 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
10857 (build-system python-build-system)
10858 (native-inputs
10859 `(("python-nose" ,python-nose)))
10860 (synopsis "JSON Matching Expressions")
10861 (description "JMESPath (pronounced “james path”) is a Python library that
10862 allows one to declaratively specify how to extract elements from a JSON
10863 document.")
10864 (home-page "https://github.com/jmespath/jmespath.py")
10865 (license license:expat)))
10866
10867 (define-public python2-jmespath
10868 (package-with-python2 python-jmespath))
10869
10870 (define-public python-symengine
10871 (package
10872 (name "python-symengine")
10873 (version "0.6.1")
10874 (source
10875 (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "symengine" version))
10878 (sha256
10879 (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
10880 (build-system python-build-system)
10881 (native-inputs
10882 `(("cmake" ,cmake)
10883 ("python-cython" ,python-cython)))
10884 (inputs
10885 `(("symengine" ,symengine)))
10886 (home-page "https://github.com/symengine/symengine.py")
10887 (synopsis "Python library providing wrappers to SymEngine")
10888 (description
10889 "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
10890 manipulation library.")
10891 (license license:expat)))
10892
10893 (define-public python-botocore
10894 (package
10895 (name "python-botocore")
10896 (version "1.15.26")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 (uri (pypi-uri "botocore" version))
10901 (sha256
10902 (base32
10903 "1a87pbwkk5vlwz92hy1wizfnpiwn11bhaicr6bmji1i5ybwdhnr8"))))
10904 (build-system python-build-system)
10905 (arguments
10906 ;; FIXME: Many tests are failing.
10907 '(#:tests? #f))
10908 (propagated-inputs
10909 `(("python-dateutil" ,python-dateutil)
10910 ("python-docutils" ,python-docutils)
10911 ("python-jmespath" ,python-jmespath)))
10912 (native-inputs
10913 `(("python-mock" ,python-mock)
10914 ("python-nose" ,python-nose)
10915 ("behave" ,behave)
10916 ("python-tox" ,python-tox)
10917 ("python-urllib3" ,python-urllib3)
10918 ("python-wheel" ,python-wheel)))
10919 (home-page "https://github.com/boto/botocore")
10920 (synopsis "Low-level interface to AWS")
10921 (description "Botocore is a Python library that provides a low-level
10922 interface to the Amazon Web Services (AWS) API.")
10923 (license license:asl2.0)))
10924
10925 (define-public python2-botocore
10926 (package-with-python2 python-botocore))
10927
10928 (define-public python-pyfiglet
10929 (package
10930 (name "python-pyfiglet")
10931 (version "0.8.post1")
10932 (source
10933 (origin
10934 (method url-fetch)
10935 (uri (pypi-uri "pyfiglet" version))
10936 (sha256
10937 (base32
10938 "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
10939 (build-system python-build-system)
10940 (home-page "https://github.com/pwaller/pyfiglet")
10941 (synopsis "Draw ASCII art big letters in Python")
10942 (description "This module lets you draw large letter from ordinary characters
10943 in pure Python.")
10944 (license license:expat)))
10945
10946 (define-public python-xdo
10947 (package
10948 (name "python-xdo")
10949 (version "0.3")
10950 (source (origin
10951 (method url-fetch)
10952 (uri (string-append
10953 "http://http.debian.net/debian/pool/main/p/python-xdo/"
10954 "python-xdo_" version ".orig.tar.gz"))
10955 (sha256
10956 (base32
10957 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
10958 (build-system python-build-system)
10959 (arguments
10960 '(#:phases
10961 (modify-phases %standard-phases
10962 (add-before 'install 'patch-libxdo-path
10963 ;; Hardcode the path of dynamically loaded libxdo library.
10964 (lambda* (#:key inputs #:allow-other-keys)
10965 (let ((libxdo (string-append
10966 (assoc-ref inputs "xdotool")
10967 "/lib/libxdo.so")))
10968 (substitute* "xdo/_xdo.py"
10969 (("find_library\\(\"xdo\"\\)")
10970 (simple-format #f "\"~a\"" libxdo)))
10971 #t))))
10972 #:tests? #f)) ; no tests provided
10973 (propagated-inputs
10974 `(("python-six" ,python-six)))
10975 (inputs
10976 `(("xdotool" ,xdotool)
10977 ("libX11" ,libx11)))
10978 (home-page "https://tracker.debian.org/pkg/python-xdo")
10979 (synopsis "Python library for simulating X11 keyboard/mouse input")
10980 (description "Provides bindings to libxdo for manipulating X11 via simulated
10981 input. (Note that this is mostly a legacy library; you may wish to look at
10982 python-xdo for newer bindings.)")
10983 (license license:bsd-3)))
10984
10985 (define-public python2-xdo
10986 (package-with-python2 python-xdo))
10987
10988 (define-public python-mako
10989 (package
10990 (name "python-mako")
10991 (version "1.1.2")
10992 (source
10993 (origin
10994 (method url-fetch)
10995 (uri (pypi-uri "Mako" version))
10996 (sha256
10997 (base32
10998 "17bd6r9ynp4hyfckkia0bb8gpd98f42jfl5rmzdpbld59bbcaf9i"))))
10999 (build-system python-build-system)
11000 (arguments
11001 `(#:phases (modify-phases %standard-phases
11002 (replace 'check
11003 (lambda* (#:key tests? #:allow-other-keys)
11004 (if tests?
11005 (invoke "nosetests" "-v")
11006 (format #t "test suite not run~%"))
11007 #t)))))
11008 (propagated-inputs
11009 `(("python-markupsafe" ,python-markupsafe)))
11010 (native-inputs
11011 `(("python-mock" ,python-mock)
11012 ("python-nose" ,python-nose)))
11013 (home-page "https://www.makotemplates.org/")
11014 (synopsis "Templating language for Python")
11015 (description "Mako is a templating language for Python that compiles
11016 templates into Python modules.")
11017 (license license:expat)))
11018
11019 (define-public python2-mako
11020 (package-with-python2 python-mako))
11021
11022 (define-public python-waitress
11023 (package
11024 (name "python-waitress")
11025 (version "1.1.0")
11026 (source
11027 (origin
11028 (method url-fetch)
11029 (uri (pypi-uri "waitress" version))
11030 (patches (search-patches "python-waitress-fix-tests.patch"))
11031 (sha256
11032 (base32
11033 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
11034 (build-system python-build-system)
11035 (home-page "https://github.com/Pylons/waitress")
11036 (synopsis "Waitress WSGI server")
11037 (description "Waitress is meant to be a production-quality pure-Python WSGI
11038 server with very acceptable performance.")
11039 (license license:zpl2.1)))
11040
11041 (define-public python2-waitress
11042 (package-with-python2 python-waitress))
11043
11044 (define-public python-whichcraft
11045 (package
11046 (name "python-whichcraft")
11047 (version "0.6.1")
11048 (source
11049 (origin
11050 (method url-fetch)
11051 (uri (pypi-uri "whichcraft" version))
11052 (sha256
11053 (base32
11054 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
11055 (build-system python-build-system)
11056 (native-inputs
11057 `(("python-pytest" ,python-pytest)))
11058 (home-page "https://github.com/pydanny/whichcraft")
11059 (synopsis "Cross-platform cross-python shutil.which functionality")
11060 (description
11061 "This package provides a shim of the shutil.which function that's
11062 designed to work across multiple versions of Python.")
11063 (license license:bsd-3)))
11064
11065 (define-public python-cookiecutter
11066 (package
11067 (name "python-cookiecutter")
11068 (version "1.7.2")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (pypi-uri "cookiecutter" version))
11073 (sha256
11074 (base32
11075 "1b2xa5dypk1vf8aq599fd8zw4y0pwvq3hgl7ia8aiv8gg3ab5dpg"))))
11076 (build-system python-build-system)
11077 (native-inputs
11078 `(("python-freezegun" ,python-freezegun)
11079 ("python-pytest" ,python-pytest)
11080 ("python-pytest-catchlog" ,python-pytest-catchlog)
11081 ("python-pytest-cov" ,python-pytest-cov)
11082 ("python-pytest-mock" ,python-pytest-mock)))
11083 (propagated-inputs
11084 `(("python-binaryornot" ,python-binaryornot)
11085 ("python-click" ,python-click)
11086 ("python-future" ,python-future)
11087 ("python-jinja2" ,python-jinja2)
11088 ("python-jinja2-time" ,python-jinja2-time)
11089 ("python-poyo" ,python-poyo)
11090 ("python-requests" ,python-requests)
11091 ("python-slugify" ,python-slugify)
11092 ("python-text-unidecode" ,python-text-unidecode)
11093 ("python-whichcraft" ,python-whichcraft)))
11094 (home-page "https://github.com/cookiecutter/cookiecutter")
11095 (synopsis
11096 "Command-line utility that creates projects from project templates")
11097 (description
11098 "This package provides a command-line utility that creates projects from
11099 project templates, e.g. creating a Python package project from a Python package
11100 project template.")
11101 (license license:bsd-3)))
11102
11103 (define-public python-pyquery
11104 (package
11105 (name "python-pyquery")
11106 (version "1.2.17")
11107 (source
11108 (origin
11109 (method url-fetch)
11110 (uri (pypi-uri "pyquery" version))
11111 (sha256
11112 (base32
11113 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
11114 (build-system python-build-system)
11115 (native-inputs
11116 `(("python-webob" ,python-webob)
11117 ("python-webtest" ,python-webtest)))
11118 (propagated-inputs
11119 `(("python-lxml" ,python-lxml)
11120 ("python-cssselect" ,python-cssselect)))
11121 (home-page "https://github.com/gawel/pyquery")
11122 (synopsis "Make jQuery-like queries on xml documents")
11123 (description "pyquery allows you to make jQuery queries on xml documents.
11124 The API is as much as possible the similar to jQuery. pyquery uses lxml for
11125 fast xml and html manipulation.")
11126 (license license:bsd-3)))
11127
11128 (define-public python-anyjson
11129 (package
11130 (name "python-anyjson")
11131 (version "0.3.3")
11132 (source
11133 (origin
11134 (method url-fetch)
11135 (uri (pypi-uri "anyjson" version))
11136 (sha256
11137 (base32
11138 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
11139 (build-system python-build-system)
11140 (arguments
11141 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
11142 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
11143 ;; whatever) so this transformation needs to be done before the tests
11144 ;; can be run. Maybe we could add a build step to transform beforehand
11145 ;; but it could be annoying/difficult.
11146 ;; We can enable tests for the Python 2 version, though, and do below.
11147 #:tests? #f))
11148 (home-page "https://bitbucket.org/runeh/anyjson/")
11149 (synopsis
11150 "Wraps best available JSON implementation in a common interface")
11151 (description
11152 "Anyjson loads whichever is the fastest JSON module installed
11153 and provides a uniform API regardless of which JSON implementation is used.")
11154 (license license:bsd-3)
11155 (properties `((python2-variant . ,(delay python2-anyjson))))))
11156
11157 (define-public python2-anyjson
11158 (let ((anyjson (package-with-python2
11159 (strip-python2-variant python-anyjson))))
11160 (package
11161 (inherit anyjson)
11162 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
11163 #:tests? #t
11164 ,@(package-arguments anyjson)))
11165 (native-inputs `(("python2-nose" ,python2-nose))))))
11166
11167 (define-public python-amqp
11168 (package
11169 (name "python-amqp")
11170 (version "2.3.2")
11171 (source
11172 (origin
11173 (method url-fetch)
11174 (uri (pypi-uri "amqp" version))
11175 (sha256
11176 (base32
11177 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
11178 (build-system python-build-system)
11179 (native-inputs
11180 `(("python-case" ,python-case)
11181 ("python-pytest-sugar" ,python-pytest-sugar)
11182 ("python-mock" ,python-mock)))
11183 (propagated-inputs
11184 `(("python-vine" ,python-vine)))
11185 (home-page "https://github.com/celery/py-amqp")
11186 (synopsis
11187 "Low-level AMQP client for Python (fork of amqplib)")
11188 (description
11189 "This is a fork of amqplib which was originally written by Barry Pederson.
11190 It is maintained by the Celery project, and used by kombu as a pure python
11191 alternative when librabbitmq is not available.")
11192 (license license:lgpl2.1+)
11193 (properties `((python2-variant . ,(delay python2-amqp))))))
11194
11195 (define-public python2-amqp
11196 (let ((amqp (package-with-python2
11197 (strip-python2-variant python-amqp))))
11198 (package
11199 (inherit amqp)
11200 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
11201 ;; unmaintained. Weirdly, does not do this on the python 3
11202 ;; version?
11203 #:tests? #f
11204 ,@(package-arguments amqp))))))
11205
11206 (define-public python-txamqp
11207 (package
11208 (name "python-txamqp")
11209 (version "0.8.2")
11210 (source
11211 (origin
11212 (method url-fetch)
11213 (uri (pypi-uri "txAMQP" version))
11214 (sha256
11215 (base32
11216 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
11217 (build-system python-build-system)
11218 (propagated-inputs
11219 `(("python-six" ,python-six)
11220 ("python-twisted" ,python-twisted)))
11221 (home-page "https://github.com/txamqp/txamqp")
11222 (synopsis "Communicate with AMQP peers and brokers using Twisted")
11223 (description
11224 "This package provides a Python library for communicating with AMQP peers
11225 and brokers using the asynchronous networking framework Twisted. It contains
11226 all the necessary code to connect, send and receive messages to/from an
11227 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
11228 also includes support for using Thrift RPC over AMQP in Twisted
11229 applications.")
11230 (license license:asl2.0)))
11231
11232 (define-public python2-txamqp
11233 (package-with-python2 python-txamqp))
11234
11235 (define-public python-kombu
11236 (package
11237 (name "python-kombu")
11238 (version "4.2.2")
11239 (source
11240 (origin
11241 (method url-fetch)
11242 (uri (pypi-uri "kombu" version))
11243 (sha256
11244 (base32
11245 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
11246 (build-system python-build-system)
11247 (native-inputs
11248 `(("python-mock" ,python-mock)
11249 ("python-case" ,python-case)
11250 ("python-pyro4" ,python-pyro4)
11251 ("python-pytest-sugar" ,python-pytest-sugar)
11252 ("python-pytz" ,python-pytz)))
11253 (propagated-inputs
11254 `(("python-anyjson" ,python-anyjson)
11255 ("python-amqp" ,python-amqp)
11256 ("python-redis" ,python-redis)))
11257 (home-page "https://kombu.readthedocs.io")
11258 (synopsis "Message passing library for Python")
11259 (description "The aim of Kombu is to make messaging in Python as easy as
11260 possible by providing an idiomatic high-level interface for the AMQ protocol,
11261 and also provide proven and tested solutions to common messaging problems.
11262 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
11263 message orientation, queuing, routing, reliability and security, for which the
11264 RabbitMQ messaging server is the most popular implementation.")
11265 (license license:bsd-3)
11266 (properties `((python2-variant . ,(delay python2-kombu))))))
11267
11268 (define-public python2-kombu
11269 (let ((kombu (package-with-python2
11270 (strip-python2-variant python-kombu))))
11271 (package
11272 (inherit kombu)
11273 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
11274 ;; It works fine on the python3 variant.
11275 #:tests? #f
11276 ,@(package-arguments kombu)))
11277 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11278 ,@(package-native-inputs kombu))))))
11279
11280 (define-public python-billiard
11281 (package
11282 (name "python-billiard")
11283 (version "3.5.0.5")
11284 (source
11285 (origin
11286 (method url-fetch)
11287 (uri (pypi-uri "billiard" version))
11288 (sha256
11289 (base32
11290 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
11291 (build-system python-build-system)
11292 (native-inputs
11293 `(("python-case" ,python-case)
11294 ("python-pytest" ,python-pytest)))
11295 (home-page "https://github.com/celery/billiard")
11296 (synopsis
11297 "Python multiprocessing fork with improvements and bugfixes")
11298 (description
11299 "Billiard is a fork of the Python 2.7 multiprocessing package. The
11300 multiprocessing package itself is a renamed and updated version of R Oudkerk's
11301 pyprocessing package. This standalone variant is intended to be compatible with
11302 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
11303 (license license:bsd-3)
11304 (properties `((python2-variant . ,(delay python2-billiard))))))
11305
11306 (define-public python2-billiard
11307 (let ((billiard (package-with-python2
11308 (strip-python2-variant python-billiard))))
11309 (package
11310 (inherit billiard)
11311 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11312 ("python2-mock" ,python2-mock)
11313 ,@(package-native-inputs billiard))))))
11314
11315 (define-public python-celery
11316 (package
11317 (name "python-celery")
11318 (version "4.2.1")
11319 (source
11320 (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "celery" version))
11323 (sha256
11324 (base32
11325 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
11326 (build-system python-build-system)
11327 (arguments
11328 '(;; TODO The tests fail with Python 3.7
11329 ;; https://github.com/celery/celery/issues/4849
11330 #:tests? #f
11331 #:phases
11332 (modify-phases %standard-phases
11333 (add-after 'unpack 'patch-requirements
11334 (lambda _
11335 (substitute* "requirements/test.txt"
11336 (("pytest>=3\\.0,<3\\.3")
11337 "pytest>=3.0"))
11338 #t)))))
11339 (native-inputs
11340 `(("python-case" ,python-case)
11341 ("python-pytest" ,python-pytest)))
11342 (propagated-inputs
11343 `(("python-pytz" ,python-pytz)
11344 ("python-billiard" ,python-billiard)
11345 ("python-kombu" ,python-kombu)))
11346 (home-page "https://celeryproject.org")
11347 (synopsis "Distributed Task Queue")
11348 (description "Celery is an asynchronous task queue/job queue based on
11349 distributed message passing. It is focused on real-time operation, but
11350 supports scheduling as well. The execution units, called tasks, are executed
11351 concurrently on a single or more worker servers using multiprocessing,
11352 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
11353 synchronously (wait until ready).")
11354 (license license:bsd-3)
11355 (properties `((python2-variant . ,(delay python2-celery))))))
11356
11357 (define-public python2-celery
11358 (let ((celery (package-with-python2
11359 (strip-python2-variant python-celery))))
11360 (package
11361 (inherit celery)
11362 (native-inputs `(("python2-unittest2" ,python2-unittest2)
11363 ("python2-mock" ,python2-mock)
11364 ,@(package-native-inputs celery))))))
11365
11366 (define-public python-translitcodec
11367 (package
11368 (name "python-translitcodec")
11369 (version "0.4.0")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "translitcodec" version))
11374 (sha256
11375 (base32
11376 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:tests? #f)) ; no tests provided
11380 (home-page
11381 "https://github.com/claudep/translitcodec")
11382 (synopsis
11383 "Unicode to 8-bit charset transliteration codec")
11384 (description
11385 "This package contains codecs for transliterating ISO 10646 texts into
11386 best-effort representations using smaller coded character sets (ASCII,
11387 ISO 8859, etc.).")
11388 (license license:expat)))
11389
11390 (define-public python2-translitcodec
11391 (package-with-python2 python-translitcodec))
11392
11393 (define-public python-editor
11394 (package
11395 (name "python-editor")
11396 (version "1.0.4")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "python-editor" version))
11401 (sha256
11402 (base32
11403 "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
11404 (build-system python-build-system)
11405 (arguments
11406 '(#:tests? #f)) ;XXX: needs a TTY and an editor
11407 (home-page "https://github.com/fmoo/python-editor")
11408 (synopsis "Programmatically open an editor, capture the result")
11409 (description
11410 "python-editor is a library that provides the editor module for
11411 programmatically interfacing with your system's $EDITOR.")
11412 (license license:asl2.0)))
11413
11414 (define-public python2-editor
11415 (package-with-python2 python-editor))
11416
11417 (define-public python-vobject
11418 (package
11419 (name "python-vobject")
11420 (version "0.9.6.1")
11421 (source (origin
11422 (method url-fetch)
11423 (uri (pypi-uri "vobject" version))
11424 (sha256
11425 (base32
11426 "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
11427 (build-system python-build-system)
11428 (arguments
11429 '(;; The test suite relies on some non-portable Windows interfaces.
11430 #:tests? #f))
11431 (propagated-inputs
11432 `(("python-dateutil" ,python-dateutil)
11433 ("python-pyicu" ,python-pyicu)))
11434 (synopsis "Parse and generate vCard and vCalendar files")
11435 (description "Vobject is intended to be a full featured Python package for
11436 parsing and generating vCard and vCalendar files. Currently, iCalendar files
11437 are supported and well tested. vCard 3.0 files are supported, and all data
11438 should be imported, but only a few components are understood in a sophisticated
11439 way.")
11440 (home-page "https://eventable.github.io/vobject/")
11441 (license license:asl2.0)))
11442
11443 (define-public python2-vobject
11444 (package-with-python2 python-vobject))
11445
11446 (define-public python-munkres
11447 (package
11448 (name "python-munkres")
11449 (version "1.0.8")
11450 (source (origin
11451 (method url-fetch)
11452 (uri (pypi-uri "munkres" version))
11453 (sha256
11454 (base32
11455 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
11456 (build-system python-build-system)
11457 (arguments
11458 '(#:tests? #f)) ; no test suite
11459 (home-page "https://software.clapper.org/munkres/")
11460 (synopsis "Implementation of the Munkres algorithm")
11461 (description "The Munkres module provides an implementation of the Munkres
11462 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
11463 useful for solving the Assignment Problem.")
11464 (license license:bsd-3)))
11465
11466 (define-public python2-munkres
11467 (package-with-python2 python-munkres))
11468
11469 (define-public python-whoosh
11470 (package
11471 (name "python-whoosh")
11472 (version "2.7.4")
11473 (source
11474 (origin
11475 (method url-fetch)
11476 (uri (pypi-uri "Whoosh" version))
11477 (sha256
11478 (base32
11479 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
11480 (build-system python-build-system)
11481 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
11482 (native-inputs
11483 `(("python-pytest" ,python-pytest)))
11484 (home-page "https://bitbucket.org/mchaput/whoosh")
11485 (synopsis "Full text indexing, search, and spell checking library")
11486 (description
11487 "Whoosh is a fast, pure-Python full text indexing, search, and spell
11488 checking library.")
11489 (license license:bsd-2)))
11490
11491 (define-public python2-whoosh
11492 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
11493 (package (inherit whoosh)
11494 (propagated-inputs
11495 `(("python2-backport-ssl-match-hostname"
11496 ,python2-backport-ssl-match-hostname)
11497 ,@(package-propagated-inputs whoosh))))))
11498
11499 (define-public python-pathlib
11500 (package
11501 (name "python-pathlib")
11502 (version "1.0.1")
11503 (source (origin
11504 (method url-fetch)
11505 (uri (pypi-uri "pathlib" version))
11506 (sha256
11507 (base32
11508 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
11509 (build-system python-build-system)
11510 ;; The tests depend on the internal "test" module, which does not provide
11511 ;; a stable interface.
11512 (arguments `(#:tests? #f))
11513 (home-page "https://pathlib.readthedocs.org/")
11514 (synopsis "Object-oriented file system paths")
11515 (description "Pathlib offers a set of classes to handle file system paths.
11516 It offers the following advantages over using string objects:
11517
11518 @enumerate
11519 @item No more cumbersome use of os and os.path functions. Everything can
11520 be done easily through operators, attribute accesses, and method calls.
11521 @item Embodies the semantics of different path types. For example,
11522 comparing Windows paths ignores casing.
11523 @item Well-defined semantics, eliminating any inconsistencies or
11524 ambiguities (forward vs. backward slashes, etc.).
11525 @end enumerate
11526
11527 Note: In Python 3.4, pathlib is now part of the standard library. For other
11528 Python versions please consider python-pathlib2 instead, which tracks the
11529 standard library module. This module (python-pathlib) isn't maintained
11530 anymore.")
11531 (license license:expat)))
11532
11533 (define-public python2-pathlib
11534 (package-with-python2 python-pathlib))
11535
11536 (define-public python2-pathlib2
11537 (package
11538 (name "python2-pathlib2")
11539 (version "2.3.5")
11540 (source (origin
11541 (method url-fetch)
11542 (uri (pypi-uri "pathlib2" version))
11543 (sha256
11544 (base32
11545 "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
11546 (build-system python-build-system)
11547 ;; We only need the the Python 2 variant, since for Python 3 our minimum
11548 ;; version is 3.4 which already includes this package as part of the
11549 ;; standard library.
11550 (arguments
11551 `(#:python ,python-2))
11552 (propagated-inputs
11553 `(("python2-scandir" ,python2-scandir)
11554 ("python2-six" ,python2-six)))
11555 (home-page "https://pypi.org/project/pathlib2/")
11556 (synopsis "Object-oriented file system paths - backport of standard
11557 pathlib module")
11558 (description "The goal of pathlib2 is to provide a backport of standard
11559 pathlib module which tracks the standard library module, so all the newest
11560 features of the standard pathlib can be used also on older Python versions.
11561
11562 Pathlib offers a set of classes to handle file system paths. It offers the
11563 following advantages over using string objects:
11564
11565 @enumerate
11566 @item No more cumbersome use of os and os.path functions. Everything can
11567 be done easily through operators, attribute accesses, and method calls.
11568 @item Embodies the semantics of different path types. For example,
11569 comparing Windows paths ignores casing.
11570 @item Well-defined semantics, eliminating any inconsistencies or
11571 ambiguities (forward vs. backward slashes, etc.).
11572 @end enumerate")
11573 (license license:expat)))
11574
11575 (define-public python2-pathlib2-bootstrap
11576 (hidden-package
11577 (package
11578 (inherit python2-pathlib2)
11579 (name "python2-pathlib2-bootstrap")
11580 (propagated-inputs
11581 `(("python2-scandir" ,python2-scandir)
11582 ("python2-six" ,python2-six-bootstrap))))))
11583
11584 (define-public python-jellyfish
11585 (package
11586 (name "python-jellyfish")
11587 (version "0.5.6")
11588 (source (origin
11589 (method url-fetch)
11590 (uri (pypi-uri "jellyfish" version))
11591 (sha256
11592 (base32
11593 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
11594 (build-system python-build-system)
11595 (native-inputs
11596 `(("python-pytest" ,python-pytest)))
11597 (home-page "https://github.com/jamesturk/jellyfish")
11598 (synopsis "Approximate and phonetic matching of strings")
11599 (description "Jellyfish uses a variety of string comparison and phonetic
11600 encoding algorithms to do fuzzy string matching.")
11601 (license license:bsd-2)
11602 (properties `((python2-variant . ,(delay python2-jellyfish))))))
11603
11604 (define-public python2-jellyfish
11605 (let ((jellyfish (package-with-python2
11606 (strip-python2-variant python-jellyfish))))
11607 (package (inherit jellyfish)
11608 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
11609 ,@(package-native-inputs jellyfish))))))
11610
11611 (define-public python2-unicodecsv
11612 (package
11613 (name "python2-unicodecsv")
11614 (version "0.14.1")
11615 (source (origin
11616 (method git-fetch)
11617 ;; The test suite is not included in the PyPi release.
11618 ;; https://github.com/jdunck/python-unicodecsv/issues/19
11619 (uri (git-reference
11620 (url "https://github.com/jdunck/python-unicodecsv")
11621 (commit version)))
11622 (file-name (git-file-name name version))
11623 (sha256
11624 (base32
11625 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
11626 (build-system python-build-system)
11627 (arguments
11628 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
11629 #:python ,python-2))
11630 (native-inputs
11631 `(("python2-unittest2" ,python2-unittest2)))
11632 (home-page "https://github.com/jdunck/python-unicodecsv")
11633 (synopsis "Unicode CSV module for Python 2")
11634 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
11635 module, adding support for Unicode strings.")
11636 (license license:bsd-2)))
11637
11638 (define-public python-rarfile
11639 (package
11640 (name "python-rarfile")
11641 (version "2.8")
11642 (source (origin
11643 (method url-fetch)
11644 (uri (pypi-uri "rarfile" version))
11645 (sha256
11646 (base32
11647 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
11648 (build-system python-build-system)
11649 (arguments
11650 '(#:phases
11651 (modify-phases %standard-phases
11652 (replace 'check
11653 ;; Many tests fail, but the installation proceeds.
11654 (lambda _ (invoke "make" "-C" "test" "test"))))))
11655 (native-inputs
11656 `(("which" ,which))) ; required for tests
11657 (propagated-inputs
11658 `(("libarchive" ,libarchive)))
11659 (home-page "https://github.com/markokr/rarfile")
11660 (synopsis "RAR archive reader for Python")
11661 (description "This is Python module for RAR archive reading. The interface
11662 is made as zipfile like as possible.")
11663 (license license:isc)))
11664
11665 (define-public python2-rarfile
11666 (package-with-python2 python-rarfile))
11667
11668 (define-public python-magic
11669 (package
11670 (name "python-magic")
11671 (version "0.4.15")
11672 (source
11673 (origin
11674 (method url-fetch)
11675 (uri (pypi-uri "python-magic" version))
11676 (sha256
11677 (base32
11678 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
11679 (file-name (string-append name "-" version "-checkout"))))
11680 (build-system python-build-system)
11681 (arguments
11682 ;; The tests are unreliable, so don't run them. The tests fail
11683 ;; under Python3 because they were written for Python2 and
11684 ;; contain import statements that do not work in Python3. One of
11685 ;; the tests fails under Python2 because its assertions are
11686 ;; overly stringent; it relies on comparing output strings which
11687 ;; are brittle and can change depending on the version of
11688 ;; libmagic being used and the system on which the test is
11689 ;; running. In my case, under GuixSD 0.10.0, only one test
11690 ;; failed, and it seems to have failed only because the version
11691 ;; of libmagic that is packaged in Guix outputs a slightly
11692 ;; different (but not wrong) string than the one that the test
11693 ;; expected.
11694 '(#:tests? #f
11695 #:phases (modify-phases %standard-phases
11696 ;; Replace a specific method call with a hard-coded
11697 ;; path to the necessary libmagic.so file in the
11698 ;; store. If we don't do this, then the method call
11699 ;; will fail to find the libmagic.so file, which in
11700 ;; turn will cause any application using
11701 ;; python-magic to fail.
11702 (add-before 'build 'hard-code-path-to-libmagic
11703 (lambda* (#:key inputs #:allow-other-keys)
11704 (let ((file (assoc-ref inputs "file")))
11705 (substitute* "magic.py"
11706 (("ctypes.util.find_library\\('magic'\\)")
11707 (string-append "'" file "/lib/libmagic.so'")))
11708 #t)))
11709 (add-before 'install 'disable-egg-compression
11710 (lambda _
11711 (let ((port (open-file "setup.cfg" "a")))
11712 (display "\n[easy_install]\nzip_ok = 0\n"
11713 port)
11714 (close-port port)
11715 #t))))))
11716 (inputs
11717 ;; python-magic needs to be able to find libmagic.so.
11718 `(("file" ,file)))
11719 (home-page
11720 "https://github.com/ahupp/python-magic")
11721 (synopsis
11722 "File type identification using libmagic")
11723 (description
11724 "This module uses ctypes to access the libmagic file type
11725 identification library. It makes use of the local magic database and
11726 supports both textual and MIME-type output. Note that this module and
11727 the python-file module both provide a \"magic.py\" file; these two
11728 modules, which are different and were developed separately, both serve
11729 the same purpose: to provide Python bindings for libmagic.")
11730 (license license:expat)))
11731
11732 (define-public python2-magic
11733 (package-with-python2 python-magic))
11734
11735 (define-public python2-s3cmd
11736 (package
11737 (name "python2-s3cmd")
11738 (version "1.6.1")
11739 (source
11740 (origin
11741 (method url-fetch)
11742 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
11743 "s3cmd-" version ".tar.gz"))
11744 (sha256
11745 (base32
11746 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
11747 (build-system python-build-system)
11748 (arguments
11749 ;; s3cmd is written for python2 only and contains no tests.
11750 `(#:python ,python-2
11751 #:tests? #f))
11752 (propagated-inputs
11753 `(("python2-dateutil" ,python2-dateutil)
11754 ;; The python-file package also provides a magic.py module.
11755 ;; This is an unfortunate state of affairs; however, s3cmd
11756 ;; fails to install if it cannot find specifically the
11757 ;; python-magic package. Thus we include it, instead of using
11758 ;; python-file. Ironically, s3cmd sometimes works better
11759 ;; without libmagic bindings at all:
11760 ;; https://github.com/s3tools/s3cmd/issues/198
11761 ("python2-magic" ,python2-magic)))
11762 (home-page "https://s3tools.org/s3cmd")
11763 (synopsis "Command line tool for S3-compatible storage services")
11764 (description
11765 "S3cmd is a command line tool for uploading, retrieving and managing data
11766 in storage services that are compatible with the Amazon Simple Storage
11767 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
11768 GnuPG encryption, and more. It also supports management of Amazon's
11769 CloudFront content delivery network.")
11770 (license license:gpl2+)))
11771
11772 (define-public python-pkgconfig
11773 (package
11774 (name "python-pkgconfig")
11775 (version "1.3.1")
11776 (source
11777 (origin
11778 (method url-fetch)
11779 (uri (pypi-uri "pkgconfig" version))
11780 (sha256
11781 (base32
11782 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
11783 (build-system python-build-system)
11784 (native-inputs
11785 `(("python-nose" ,python-nose)))
11786 (inputs
11787 `(("pkg-config" ,pkg-config)))
11788 (arguments
11789 `(#:phases
11790 (modify-phases %standard-phases
11791 (add-before 'build 'patch
11792 ;; Hard-code the path to pkg-config.
11793 (lambda _
11794 (substitute* "pkgconfig/pkgconfig.py"
11795 (("cmd = 'pkg-config")
11796 (string-append "cmd = '" (which "pkg-config"))))
11797 #t))
11798 (replace 'check
11799 (lambda _
11800 (invoke "nosetests" "test.py"))))))
11801 (home-page "https://github.com/matze/pkgconfig")
11802 (synopsis "Python interface for pkg-config")
11803 (description "This module provides a Python interface to pkg-config. It
11804 can be used to find all pkg-config packages, check if a package exists,
11805 check if a package meets certain version requirements, query CFLAGS and
11806 LDFLAGS and parse the output to build extensions with setup.py.")
11807 (license license:expat)))
11808
11809 (define-public python2-pkgconfig
11810 (package-with-python2 python-pkgconfig))
11811
11812 (define-public python-bz2file
11813 (package
11814 (name "python-bz2file")
11815 (version "0.98")
11816 (source
11817 (origin
11818 (method url-fetch)
11819 (uri (pypi-uri "bz2file" version))
11820 (sha256
11821 (base32
11822 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
11823 (build-system python-build-system)
11824 (arguments
11825 `(#:tests? #f)) ; Tests use deprecated python modules.
11826 (home-page "https://github.com/nvawda/bz2file")
11827 (synopsis "Read and write bzip2-compressed files")
11828 (description
11829 "Bz2file is a Python library for reading and writing bzip2-compressed
11830 files. It contains a drop-in replacement for the I/O interface in the
11831 standard library's @code{bz2} module, including features from the latest
11832 development version of CPython that are not available in older releases.")
11833 (license license:asl2.0)))
11834
11835 (define-public python2-bz2file
11836 (package-with-python2 python-bz2file))
11837
11838 (define-public python-future
11839 (package
11840 (name "python-future")
11841 (version "0.17.1")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 (uri (pypi-uri "future" version))
11846 (sha256
11847 (base32
11848 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
11849 (build-system python-build-system)
11850 ;; Many tests connect to the network or are otherwise flawed.
11851 ;; https://github.com/PythonCharmers/python-future/issues/210
11852 (arguments
11853 `(#:tests? #f))
11854 (home-page "https://python-future.org")
11855 (synopsis "Single-source support for Python 3 and 2")
11856 (description
11857 "@code{python-future} is the missing compatibility layer between Python 2 and
11858 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
11859 to support both Python 2 and Python 3 with minimal overhead.")
11860 (license license:expat)))
11861
11862 (define-public python2-future
11863 (package-with-python2 python-future))
11864
11865 (define-public python-cysignals
11866 (package
11867 (name "python-cysignals")
11868 (version "1.9.0")
11869 (source
11870 (origin
11871 (method url-fetch)
11872 (uri (pypi-uri "cysignals" version))
11873 (sha256
11874 (base32
11875 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
11876 (build-system python-build-system)
11877 (native-inputs
11878 `(("python-cython" ,python-cython)
11879 ("python-sphinx" ,python-sphinx)))
11880 (inputs
11881 `(("pari-gp" ,pari-gp)))
11882 (arguments
11883 `(#:modules ((guix build python-build-system)
11884 ((guix build gnu-build-system) #:prefix gnu:)
11885 (guix build utils))
11886 ;; FIXME: Tests are executed after installation and currently fail
11887 ;; when not installing into standard locations; the author is working
11888 ;; on a fix.
11889 #:tests? #f
11890 #:phases
11891 (modify-phases %standard-phases
11892 (add-before
11893 'build 'configure
11894 (assoc-ref gnu:%standard-phases 'configure)))))
11895 (home-page
11896 "https://github.com/sagemath/cysignals")
11897 (synopsis
11898 "Handling of interrupts and signals for Cython")
11899 (description
11900 "The cysignals package provides mechanisms to handle interrupts (and
11901 other signals and errors) in Cython code, using two related approaches,
11902 for mixed Cython/Python code or external C libraries and pure Cython code,
11903 respectively.")
11904 (license license:lgpl3+)))
11905
11906 (define-public python2-cysignals
11907 (package-with-python2 python-cysignals))
11908
11909 (define-public python2-shedskin
11910 (package
11911 (name "python2-shedskin")
11912 (version "0.9.4")
11913 (source
11914 (origin
11915 (method url-fetch)
11916 (uri (string-append "https://github.com/shedskin/shedskin/"
11917 "releases/download/v" version
11918 "/shedskin-" version ".tgz"))
11919 (sha256
11920 (base32
11921 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
11922 (build-system python-build-system)
11923 (arguments
11924 `(#:python ,python-2
11925 #:phases (modify-phases %standard-phases
11926 (add-after 'unpack 'fix-resulting-include-libs
11927 (lambda* (#:key inputs #:allow-other-keys)
11928 (let ((libgc (assoc-ref inputs "libgc"))
11929 (pcre (assoc-ref inputs "pcre")))
11930 (substitute* "shedskin/makefile.py"
11931 (("variable == 'CCFLAGS':[ ]*")
11932 (string-append "variable == 'CCFLAGS':\n"
11933 " line += ' -I " pcre "/include"
11934 " -I " libgc "/include'"))
11935 (("variable == 'LFLAGS':[ ]*")
11936 (string-append "variable == 'LFLAGS':\n"
11937 " line += ' -L" pcre "/lib"
11938 " -L " libgc "/lib'")))
11939 #t))))))
11940 (inputs `(("pcre" ,pcre)
11941 ("libgc" ,libgc)))
11942 (home-page "https://shedskin.github.io/")
11943 (synopsis "Experimental Python-2 to C++ Compiler")
11944 (description (string-append "This is an experimental compiler for a subset of
11945 Python. It generates C++ code and a Makefile."))
11946 (license (list license:gpl3 license:bsd-3 license:expat))))
11947
11948 (define-public python2-rope
11949 (package
11950 (name "python2-rope")
11951 (version "0.11.0")
11952 (source
11953 (origin
11954 (method url-fetch)
11955 (uri (pypi-uri "rope" version))
11956 (sha256
11957 (base32
11958 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
11959 (arguments
11960 ;; Rope has only partial python3 support, see `python-rope'
11961 `(#:python ,python-2))
11962 (build-system python-build-system)
11963 (native-inputs
11964 `(("python2-unittest2" ,python2-unittest2)))
11965 (home-page "https://github.com/python-rope/rope")
11966 (synopsis "Refactoring library for Python")
11967 (description "Rope is a refactoring library for Python. It facilitates
11968 the renaming, moving and extracting of attributes, functions, modules, fields
11969 and parameters in Python 2 source code. These refactorings can also be applied
11970 to occurrences in strings and comments.")
11971 (license license:gpl2)))
11972
11973 (define-public python-rope
11974 (package
11975 (inherit python2-rope)
11976 (name "python-rope")
11977 (arguments `(#:python ,python-wrapper
11978 ;; XXX: Only partial python3 support, results in some failing
11979 ;; tests: <https://github.com/python-rope/rope/issues/247>.
11980 #:tests? #f))
11981 (properties `((python2-variant . ,(delay python2-rope))))))
11982
11983 (define-public python-py3status
11984 (package
11985 (name "python-py3status")
11986 (version "3.21")
11987 (source
11988 (origin
11989 (method url-fetch)
11990 (uri (pypi-uri "py3status" version))
11991 (sha256
11992 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
11993 (build-system python-build-system)
11994 (inputs
11995 `(("file" ,file)))
11996 (arguments
11997 '(#:phases
11998 (modify-phases %standard-phases
11999 ;; 'file' is used for detection of configuration file encoding
12000 ;; let's make link the dependency to particular input
12001 (add-before 'build 'patch-file-path
12002 (lambda* (#:key inputs #:allow-other-keys)
12003 (let ((file-path (assoc-ref inputs "file")))
12004 (substitute* "py3status/parse_config.py"
12005 (("\\[\"file\", \"-b\"")
12006 (string-append "['" file-path "/bin/file', '-b'")))
12007 #t))))
12008 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
12009 (home-page "https://github.com/ultrabug/py3status")
12010 (synopsis "Extensible i3status wrapper written in Python")
12011 (description "py3status is an i3status wrapper which extends i3status
12012 functionality in a modular way, allowing you to extend your panel with your
12013 own code, responding to click events and updating clock every second.")
12014 (license license:bsd-3)))
12015
12016 (define-public python2-selectors2
12017 (package
12018 (name "python2-selectors2")
12019 (version "2.0.1")
12020 (source (origin
12021 (method url-fetch)
12022 (uri (pypi-uri "selectors2" version))
12023 (sha256
12024 (base32
12025 "110qr00b9axz1f1jm12b495jkvrz80smknxvssqlhwk0dx67rdw1"))))
12026 (build-system python-build-system)
12027 (arguments
12028 `(#:python ,python-2))
12029 (native-inputs
12030 `(("python2-mock" ,python2-mock)
12031 ("python2-psutil" ,python2-psutil)))
12032 (home-page "https://www.github.com/SethMichaelLarson/selectors2")
12033 (synopsis "Backport of the selectors module from Python 3.5+")
12034 (description
12035 "This package provides a drop-in replacement for the @code{selectors}
12036 module in Python 3.5 and later.")
12037 (license license:expat)))
12038
12039 (define-public python-tblib
12040 (package
12041 (name "python-tblib")
12042 (version "1.6.0")
12043 (source (origin
12044 (method url-fetch)
12045 (uri (pypi-uri "tblib" version))
12046 (sha256
12047 (base32
12048 "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
12049 (build-system python-build-system)
12050 (arguments
12051 `(#:phases
12052 (modify-phases %standard-phases
12053 (replace 'check
12054 (lambda _
12055 ;; Upstream runs tests after installation and the package itself
12056 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
12057 ;; found.
12058 (setenv "PYTHONPATH"
12059 (string-append (getcwd) "/build/lib:"
12060 (getenv "PYTHONPATH")))
12061 (invoke "py.test" "-vv" "tests" "README.rst"))))))
12062 (native-inputs
12063 `(("python-pytest" ,python-pytest)
12064 ("python-six" ,python-six)))
12065 (home-page "https://github.com/ionelmc/python-tblib")
12066 (synopsis "Traceback serialization library")
12067 (description
12068 "Traceback serialization allows you to:
12069
12070 @enumerate
12071 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
12072 different processes. This allows better error handling when running code over
12073 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
12074
12075 @item Parse traceback strings and raise with the parsed tracebacks.
12076 @end enumerate\n")
12077 (license license:bsd-3)))
12078
12079 (define-public python2-tblib
12080 (package-with-python2 python-tblib))
12081
12082 (define-public python-greenlet
12083 (package
12084 (name "python-greenlet")
12085 (version "0.4.16")
12086 (source (origin
12087 (method url-fetch)
12088 (uri (pypi-uri "greenlet" version))
12089 (sha256
12090 (base32
12091 "0v2571d0av1hz3yx63gvmnrinyn57nnvibg4zkl9frv74b3yl1kf"))))
12092 (build-system python-build-system)
12093 (home-page "https://greenlet.readthedocs.io/")
12094 (synopsis "Lightweight in-process concurrent programming")
12095 (description
12096 "Greenlet package is a spin-off of Stackless, a version of CPython
12097 that supports micro-threads called \"tasklets\". Tasklets run
12098 pseudo-concurrently (typically in a single or a few OS-level threads) and
12099 are synchronized with data exchanges on \"channels\".")
12100 (license (list license:psfl license:expat))))
12101
12102 (define-public python2-greenlet
12103 (package-with-python2 python-greenlet))
12104
12105 (define-public python-objgraph
12106 (package
12107 (name "python-objgraph")
12108 (version "3.4.1")
12109 (source
12110 (origin
12111 (method url-fetch)
12112 (uri (pypi-uri "objgraph" version))
12113 (sha256
12114 (base32
12115 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
12116 (build-system python-build-system)
12117 (propagated-inputs
12118 `(("python-graphviz" ,python-graphviz)))
12119 (native-inputs
12120 `(("python-mock" ,python-mock)
12121 ("graphviz" ,graphviz)))
12122 (home-page "https://mg.pov.lt/objgraph/")
12123 (synopsis "Draw Python object reference graphs with graphviz")
12124 (description
12125 "This package provides tools to draw Python object reference graphs with
12126 graphviz.")
12127 (license license:expat)))
12128
12129 (define-public python2-objgraph
12130 (package-with-python2 python-objgraph))
12131
12132 (define-public python-gevent
12133 (package
12134 (name "python-gevent")
12135 (version "20.6.2")
12136 (source (origin
12137 (method url-fetch)
12138 (uri (pypi-uri "gevent" version))
12139 (sha256
12140 (base32
12141 "1ldmppgghfphdaazjw6wq2i17xcmsjb2jsizfa4cjlg812zjlg52"))
12142 (modules '((guix build utils)))
12143 (snippet
12144 '(begin
12145 ;; unbunding libev and c-ares
12146 (delete-file-recursively "deps")
12147 #t))))
12148 (build-system python-build-system)
12149 (arguments
12150 `(#:modules ((ice-9 ftw)
12151 (ice-9 match)
12152 (srfi srfi-26)
12153 (guix build utils)
12154 (guix build python-build-system))
12155 #:phases (modify-phases %standard-phases
12156 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
12157 (lambda _
12158 (substitute* "src/gevent/subprocess.py"
12159 (("/bin/sh") (which "sh")))
12160 (for-each (lambda (file)
12161 (substitute* file
12162 (("/bin/sh") (which "sh"))
12163 (("/bin/true") (which "true"))))
12164 (find-files "src/greentest" "\\.py$"))
12165 #t))
12166 (add-before 'build 'do-not-use-bundled-sources
12167 (lambda _
12168 (setenv "GEVENTSETUP_EMBED" "0")
12169
12170 ;; Prevent building bundled libev.
12171 (substitute* "setup.py"
12172 (("run_make=_BUILDING")
12173 "run_make=False"))
12174 #t))
12175 (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
12176 (lambda* (#:key inputs #:allow-other-keys)
12177 (let ((greenlet (string-append
12178 (assoc-ref inputs "python-greenlet")
12179 "/include")))
12180 (match (scandir greenlet
12181 (lambda (item)
12182 (string-prefix? "python" item)))
12183 ((python)
12184 (setenv "C_INCLUDE_PATH"
12185 (string-append greenlet "/" python ":"
12186 (or (getenv "C_INCLUDE_PATH")
12187 ""))))))
12188 #t))
12189 (add-before 'check 'pretend-to-be-CI
12190 (lambda _
12191 ;; A few tests are skipped due to network constraints or
12192 ;; get longer timeouts when running in a CI environment.
12193 ;; Piggy-back on that, as we need the same adjustments.
12194 (setenv "TRAVIS" "1")
12195 (setenv "APPVEYOR" "1")
12196 #t))
12197 (add-before 'check 'adjust-tests
12198 (lambda _
12199 (let ((disabled-tests
12200 '(;; These tests rely on networking which is not
12201 ;; available in the build container.
12202 "test_urllib2net.py"
12203 "test__server.py"
12204 "test__server_pywsgi.py"
12205 "test_socket.py"
12206 "test__socket.py"
12207 "test__socket_ssl.py"
12208 "test__socket_dns.py"
12209 "test__socket_dns6.py"
12210 "test___example_servers.py"
12211 "test__getaddrinfo_import.py"
12212 "test__examples.py"
12213 "test_httplib.py"
12214 "test_https.py"
12215 "test_urllib2_localnet.py"
12216 "test_ssl.py"
12217 "test__ssl.py"
12218 ;; XXX: These tests borrow functionality from the
12219 ;; Python builtin 'test' module, but it is not
12220 ;; installed with the Guix Python distribution.
12221 "test_smtpd.py"
12222 "test_wsgiref.py"
12223 "test_urllib2.py"
12224 "test_thread.py"
12225 "test_threading.py"
12226 "test__threading_2.py"
12227 ;; These tests rely on KeyboardInterrupts which do not
12228 ;; work inside the build container for some reason
12229 ;; (lack of controlling terminal?).
12230 "test_subprocess.py"
12231 "test__issues461_471.py"
12232 ;; TODO: Patch out the tests that use getprotobyname, etc
12233 ;; instead of disabling all the tests from these files.
12234 "test__resolver_dnspython.py"
12235 "test__doctests.py"
12236 "test__all__.py"
12237 "test___config.py"
12238 "test__execmodules.py")))
12239 (call-with-output-file "skipped_tests.txt"
12240 (lambda (port)
12241 (format port "~a~%"
12242 (string-join disabled-tests "\n"))))
12243 #t)))
12244 (replace 'check
12245 (lambda _
12246 ;; Make sure the build directory is on PYTHONPATH.
12247 (setenv "PYTHONPATH"
12248 (string-append
12249 (getenv "PYTHONPATH") ":"
12250 (getcwd) "/build/"
12251 (car (scandir "build" (cut string-prefix? "lib." <>)))))
12252
12253 ;; Use the build daemons configured number of workers.
12254 (setenv "NWORKERS" (number->string (parallel-job-count)))
12255
12256 (invoke "python" "-m" "gevent.tests" "--config"
12257 "known_failures.py" "--ignore" "skipped_tests.txt"))))))
12258 (propagated-inputs
12259 `(("python-greenlet" ,python-greenlet)
12260 ("python-objgraph" ,python-objgraph)
12261 ("python-zope.event" ,python-zope-event)
12262 ("python-zope.interface" ,python-zope-interface)))
12263 (native-inputs
12264 `(("python-six" ,python-six)
12265
12266 ;; For tests.
12267 ("python-dnspython" ,python-dnspython)
12268 ("python-psutil" ,python-psutil)))
12269 (inputs
12270 `(("c-ares" ,c-ares)
12271 ("libev" ,libev)))
12272 (home-page "http://www.gevent.org/")
12273 (synopsis "Coroutine-based network library")
12274 (description
12275 "gevent is a coroutine-based Python networking library that uses greenlet
12276 to provide a high-level synchronous API on top of the libev event loop.")
12277 (license license:expat)
12278 (properties `((python2-variant . ,(delay python2-gevent))))))
12279
12280 (define-public python2-gevent
12281 (let ((base (package-with-python2
12282 (strip-python2-variant python-gevent))))
12283 (package
12284 (inherit base)
12285 (native-inputs `(,@(package-native-inputs base)
12286 ("python-mock" ,python2-mock)
12287 ("python2-selectors2" ,python2-selectors2))))))
12288
12289 (define-public python-fastimport
12290 (package
12291 (name "python-fastimport")
12292 (version "0.9.8")
12293 (source
12294 (origin
12295 (method url-fetch)
12296 (uri (pypi-uri "fastimport" version))
12297 (sha256
12298 (base32 "1fb3b7y3sw55f6wykxx478ybkirz0l52lgdqmbhmc0h0jzmyiwmj"))))
12299 (build-system python-build-system)
12300 (home-page "https://github.com/jelmer/python-fastimport")
12301 (synopsis "VCS fastimport parser and generator in Python")
12302 (description "This package provides a parser for and generator of the Git
12303 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
12304 format.")
12305 (license license:gpl2+)))
12306
12307 (define-public python2-fastimport
12308 (package-with-python2 python-fastimport))
12309
12310 (define-public python-twisted
12311 (package
12312 (name "python-twisted")
12313 (version "19.7.0")
12314 (source (origin
12315 (method url-fetch)
12316 (uri (pypi-uri "Twisted" version ".tar.bz2"))
12317 (sha256
12318 (base32
12319 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
12320 (build-system python-build-system)
12321 (arguments
12322 '(#:tests? #f)) ; FIXME: some tests fail
12323 (propagated-inputs
12324 `(("python-zope-interface" ,python-zope-interface)
12325 ("python-pyhamcrest" ,python-pyhamcrest)
12326 ("python-incremental" ,python-incremental)
12327 ("python-hyperlink" ,python-hyperlink)
12328 ("python-constantly" ,python-constantly)
12329 ("python-automat" ,python-automat)))
12330 (home-page "https://twistedmatrix.com/")
12331 (synopsis "Asynchronous networking framework written in Python")
12332 (description
12333 "Twisted is an extensible framework for Python programming, with special
12334 focus on event-based network programming and multiprotocol integration.")
12335 (license license:expat)))
12336
12337 (define-public python2-twisted
12338 (package-with-python2 python-twisted))
12339
12340 (define-public python-pika
12341 (package
12342 (name "python-pika")
12343 (version "0.12.0")
12344 (source
12345 (origin
12346 (method url-fetch)
12347 (uri (pypi-uri "pika" version))
12348 (sha256
12349 (base32
12350 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
12351 (build-system python-build-system)
12352 (native-inputs
12353 `(("python-pyev" ,python-pyev)
12354 ("python-tornado" ,python-tornado)
12355 ("python-twisted" ,python-twisted)))
12356 (home-page "https://pika.readthedocs.org")
12357 (synopsis "Pure Python AMQP Client Library")
12358 (description
12359 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
12360 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
12361 network support library.")
12362 (license license:bsd-3)))
12363
12364 (define-public python2-pika
12365 (package-with-python2 python-pika))
12366
12367 (define-public python-ply
12368 (package
12369 (name "python-ply")
12370 (version "3.11")
12371 (source
12372 (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "ply" version))
12375 (sha256
12376 (base32
12377 "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
12378 (build-system python-build-system)
12379 (home-page "http://www.dabeaz.com/ply/")
12380 (synopsis "Python Lex & Yacc")
12381 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
12382 It uses LR parsing and does extensive error checking.")
12383 (license license:bsd-3)))
12384
12385 (define-public python-tabulate
12386 (package
12387 (name "python-tabulate")
12388 (version "0.8.7")
12389 (source (origin
12390 (method url-fetch)
12391 (uri (pypi-uri "tabulate" version))
12392 (sha256
12393 (base32
12394 "01shi7bmj09f0bcm5s0c9skys063lzp76p0n4a2xmg041ni269yv"))))
12395 (build-system python-build-system)
12396 (arguments
12397 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
12398 ;; and the latest release is not tagged in the upstream repository.
12399 '(#:tests? #f))
12400 (home-page "https://bitbucket.org/astanin/python-tabulate")
12401 (synopsis "Pretty-print tabular data")
12402 (description
12403 "Tabulate is a library and command-line utility to pretty-print tabular
12404 data in Python.")
12405 (license license:expat)))
12406
12407 (define-public python2-tabulate
12408 (package-with-python2 python-tabulate))
12409
12410 (define-public python-kazoo
12411 (package
12412 (name "python-kazoo")
12413 (version "2.4.0")
12414 (source
12415 (origin
12416 (method url-fetch)
12417 (uri (pypi-uri "kazoo" version))
12418 (sha256
12419 (base32
12420 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
12421 (build-system python-build-system)
12422 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
12423 (propagated-inputs
12424 `(("python-six" ,python-six)))
12425 (home-page "https://kazoo.readthedocs.org")
12426 (synopsis "High-level Zookeeper client library")
12427 (description
12428 "Kazoo is a Python client library for the Apache Zookeeper distributed
12429 application service. It is designed to be easy to use and to avoid common
12430 programming errors.")
12431 (license license:asl2.0)))
12432
12433 (define-public python2-kazoo
12434 (package-with-python2 python-kazoo))
12435
12436 (define-public python-pykafka
12437 (package
12438 (name "python-pykafka")
12439 (version "2.4.0")
12440 (source (origin
12441 (method url-fetch)
12442 (uri (pypi-uri "pykafka" version))
12443 (sha256
12444 (base32
12445 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
12446 (build-system python-build-system)
12447 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
12448 (propagated-inputs
12449 `(("python-gevent" ,python-gevent)
12450 ("python-kazoo" ,python-kazoo)
12451 ("python-tabulate" ,python-tabulate)))
12452 (inputs
12453 `(("librdkafka" ,librdkafka)))
12454 (home-page "https://pykafka.readthedocs.io/")
12455 (synopsis "Apache Kafka client for Python")
12456 (description
12457 "PyKafka is a client for the Apache Kafka distributed messaging system.
12458 It includes Python implementations of Kafka producers and consumers, which
12459 are optionally backed by a C extension built on librdkafka.")
12460 (license license:asl2.0)))
12461
12462 (define-public python2-pykafka
12463 (package-with-python2 python-pykafka))
12464
12465 (define-public python-wcwidth
12466 (package
12467 (name "python-wcwidth")
12468 (version "0.1.8")
12469 (source (origin
12470 (method url-fetch)
12471 (uri (pypi-uri "wcwidth" version))
12472 (sha256
12473 (base32
12474 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
12475 (build-system python-build-system)
12476 (home-page "https://github.com/jquast/wcwidth")
12477 (synopsis "Measure number of terminal column cells of wide-character codes")
12478 (description "Wcwidth measures the number of terminal column cells of
12479 wide-character codes. It is useful for those implementing a terminal emulator,
12480 or programs that carefully produce output to be interpreted by one. It is a
12481 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
12482 specified in POSIX.1-2001 and POSIX.1-2008.")
12483 (license license:expat)))
12484
12485 (define-public python2-wcwidth
12486 (package-with-python2 python-wcwidth))
12487
12488 (define-public python2-jsonrpclib
12489 (package
12490 (name "python2-jsonrpclib")
12491 (version "0.1.7")
12492 (source (origin
12493 (method url-fetch)
12494 (uri (pypi-uri "jsonrpclib" version))
12495 (sha256
12496 (base32
12497 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
12498 (build-system python-build-system)
12499 (arguments
12500 `(#:tests? #f
12501 #:python ,python-2))
12502 (home-page "https://github.com/joshmarshall/jsonrpclib/")
12503 (synopsis "Implementation of JSON-RPC specification for Python")
12504 (description
12505 "This library is an implementation of the JSON-RPC specification.
12506 It supports both the original 1.0 specification, as well as the
12507 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
12508 etc.")
12509 (license license:asl2.0)))
12510
12511 (define-public python-chai
12512 (package
12513 (name "python-chai")
12514 (version "1.1.2")
12515 (source (origin
12516 (method url-fetch)
12517 (uri (pypi-uri "chai" version))
12518 (sha256
12519 (base32
12520 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
12521 (build-system python-build-system)
12522 (home-page "https://github.com/agoragames/chai")
12523 (synopsis "Mocking framework for Python")
12524 (description
12525 "Chai provides an api for mocking, stubbing and spying your python
12526 objects, patterned after the Mocha library for Ruby.")
12527 (license license:bsd-3)))
12528
12529 (define-public python2-chai
12530 (package-with-python2 python-chai))
12531
12532 (define-public python-inflection
12533 (package
12534 (name "python-inflection")
12535 (version "0.3.1")
12536 (source
12537 (origin (method url-fetch)
12538 (uri (pypi-uri "inflection" version))
12539 (sha256
12540 (base32
12541 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
12542 (build-system python-build-system)
12543 (native-inputs
12544 `(("python-pytest" ,python-pytest)))
12545 (home-page "https://github.com/jpvanhal/inflection")
12546 (synopsis "Python string transformation library")
12547 (description
12548 "Inflection is a string transformation library. It singularizes
12549 and pluralizes English words, and transforms strings from CamelCase to
12550 underscored string.")
12551 (license license:expat)))
12552
12553 (define-public python2-inflection
12554 (package-with-python2 python-inflection))
12555
12556 (define-public python-pylev
12557 (package
12558 (name "python-pylev")
12559 (version "1.3.0")
12560 (source (origin
12561 (method url-fetch)
12562 (uri (pypi-uri "pylev" version))
12563 (sha256
12564 (base32
12565 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
12566 (build-system python-build-system)
12567 (home-page "https://github.com/toastdriven/pylev")
12568 (synopsis "Levenshtein distance implementation in Python")
12569 (description "Pure Python Levenshtein implementation, based off the
12570 Wikipedia code samples at
12571 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
12572 (license license:bsd-3)))
12573
12574 (define-public python2-pylev
12575 (package-with-python2 python-pylev))
12576
12577 (define-public python-cleo
12578 (package
12579 (name "python-cleo")
12580 (version "0.8.1")
12581 (source (origin
12582 (method url-fetch)
12583 (uri (pypi-uri "cleo" version))
12584 (sha256
12585 (base32
12586 "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
12587 (build-system python-build-system)
12588 (native-inputs
12589 `( ;; For testing
12590 ("python-mock" ,python-mock)
12591 ("python-pytest-mock" ,python-pytest-mock)
12592 ("python-pytest" ,python-pytest)))
12593 (propagated-inputs
12594 `(("python-backpack" ,python-backpack)
12595 ("python-clikit" ,python-clikit)
12596 ("python-pastel" ,python-pastel)
12597 ("python-pylev" ,python-pylev)))
12598 (home-page "https://github.com/sdispater/cleo")
12599 (synopsis "Command-line arguments library for Python")
12600 (description
12601 "Cleo allows you to create command-line commands with signature in
12602 docstring and colored output.")
12603 (license license:expat)))
12604
12605 (define-public python2-cleo
12606 (package-with-python2 python-cleo))
12607
12608 (define-public python-tomlkit
12609 (package
12610 (name "python-tomlkit")
12611 (version "0.6.0")
12612 (source
12613 (origin
12614 (method url-fetch)
12615 (uri (pypi-uri "tomlkit" version))
12616 (sha256
12617 (base32 "16jf0060csn8p500jnxa7m5h1sl3pzispvd11961dzrhh287dybl"))))
12618 (build-system python-build-system)
12619 (native-inputs
12620 `(("python-pytest" ,python-pytest)))
12621 (home-page "https://github.com/sdispater/tomlkit")
12622 (synopsis "Style-preserving TOML library")
12623 (description
12624 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
12625 preserves all comments, indentations, whitespace and internal element ordering,
12626 and makes them accessible and editable via an intuitive API. It can also
12627 create new TOML documents from scratch using the provided helpers. Part of the
12628 implementation has been adapted, improved, and fixed from Molten.")
12629 (license license:expat)))
12630
12631 (define-public python-shellingham
12632 (package
12633 (name "python-shellingham")
12634 (version "1.3.2")
12635 (source
12636 (origin
12637 (method url-fetch)
12638 (uri (pypi-uri "shellingham" version))
12639 (sha256
12640 (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
12641 (build-system python-build-system)
12642 (arguments
12643 `(#:phases
12644 (modify-phases %standard-phases
12645 (add-after 'unpack 'restore-setup.py
12646 ;; setup.py will return in the next release.
12647 ;; <https://github.com/sarugaku/shellingham/issues/33>
12648 (lambda _
12649 (with-output-to-file "setup.py"
12650 (lambda _
12651 (display "from setuptools import setup\nsetup()\n")))
12652 #t)))))
12653 (home-page "https://github.com/sarugaku/shellingham")
12654 (synopsis "Tool to detect surrounding shell")
12655 (description
12656 "Shellingham detects what shell the current Python executable is
12657 running in.")
12658 (license license:isc)))
12659
12660 (define-public python-memcached
12661 (package
12662 (name "python-memcached")
12663 (version "1.59")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 (uri (pypi-uri "python-memcached" version))
12668 (sha256
12669 (base32
12670 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
12671 (patches (search-patches "python-memcached-syntax-warnings.patch"))))
12672 (build-system python-build-system)
12673 (propagated-inputs `(("python-six" ,python-six)))
12674 (home-page
12675 "https://github.com/linsomniac/python-memcached")
12676 (synopsis "Pure python memcached client")
12677 (description
12678 "This software is a pure Python interface to the memcached memory cache
12679 daemon. It is the client side software which allows storing values in one or
12680 more, possibly remote, memcached servers.")
12681 (license license:psfl)))
12682
12683 (define-public python-clikit
12684 (package
12685 (name "python-clikit")
12686 (version "0.6.2")
12687 (source
12688 (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "clikit" version))
12691 (sha256
12692 (base32
12693 "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
12694 (build-system python-build-system)
12695 (arguments '(#:tests? #f)) ; no test in the PyPI tarball
12696 (propagated-inputs
12697 `(("python-crashtest" ,python-crashtest)
12698 ("python-pastel" ,python-pastel)
12699 ("python-pylev" ,python-pylev)))
12700 (home-page "https://github.com/sdispater/clikit")
12701 (synopsis "Group of utilities to build command line interfaces")
12702 (description
12703 "CliKit is a group of utilities to build testable command line
12704 interfaces.")
12705 (properties `((python2-variant . ,(delay python2-clikit))))
12706 (license license:expat)))
12707
12708 (define-public python2-clikit
12709 (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
12710 (package/inherit
12711 base
12712 (propagated-inputs
12713 `(("python-enum34" ,python2-enum34)
12714 ("python-typing" ,python2-typing)
12715 ,@(package-propagated-inputs base))))))
12716
12717 (define-public python-msgpack-python
12718 (package
12719 (name "python-msgpack-python")
12720 (version "0.5.6")
12721 (source
12722 (origin
12723 (method url-fetch)
12724 (uri (pypi-uri "msgpack-python" version))
12725 (sha256
12726 (base32
12727 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
12728 (build-system python-build-system)
12729 (home-page "http://msgpack.org/")
12730 (synopsis "Package to deserialize messages in MessagePack binary format")
12731 (description
12732 "MessagePack is an efficient binary serialization format. It lets you
12733 exchange data among multiple languages like JSON. But it's faster and
12734 smaller. Small integers are encoded into a single byte, and typical short
12735 strings require only one extra byte in addition to the strings themselves.")
12736 (license license:asl2.0)))
12737
12738 (define-public python-cachy
12739 (package
12740 (name "python-cachy")
12741 (version "0.3.0")
12742 (source
12743 (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "cachy" version))
12746 (sha256
12747 (base32
12748 "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
12749 (build-system python-build-system)
12750 (arguments
12751 '(#:phases
12752 (modify-phases %standard-phases
12753 (replace 'check
12754 (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
12755 "pytest"))))))
12756 (native-inputs
12757 `(("memcached" ,memcached)
12758 ("python-fakeredis" ,python-fakeredis)
12759 ("python-flexmock" ,python-flexmock)
12760 ("python-pifpaf" ,python-pifpaf)
12761 ("python-pytest" ,python-pytest)))
12762 (propagated-inputs
12763 `(("python-memcached" ,python-memcached)
12764 ("python-msgpack-python" ,python-msgpack-python)
12765 ("python-redis" ,python-redis)))
12766 (home-page "https://github.com/sdispater/cachy")
12767 (synopsis "Simple yet effective caching library")
12768 (description
12769 "Cachy provides a simple yet effective caching library. A simple but
12770 powerful API: thread-safety; decorator syntax; support for memcached, redis,
12771 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
12772 (license license:expat)))
12773
12774 (define-public poetry
12775 (package
12776 (name "poetry")
12777 (version "1.0.10")
12778 ;; Poetry can only be built from source with Poetry.
12779 (source
12780 (origin
12781 (method url-fetch)
12782 (uri (pypi-uri "poetry" version))
12783 (sha256
12784 (base32
12785 "1wm66xlsls4f0q4skmq96yb7aahjsqwgwvbrw4iax6rd4xfqj6sb"))))
12786 (build-system python-build-system)
12787 (arguments
12788 `(#:tests? #f ;; Pypi does not have tests.
12789 #:phases
12790 (modify-phases %standard-phases
12791 (add-before 'build 'patch-setup-py
12792 (lambda _
12793 (substitute* "setup.py"
12794 ;; poetry won't update version as 21.0.0 relies on python > 3.6
12795 (("keyring>=20.0.1,<21.0.0") "keyring>=21.0.0,<22.0.0")
12796 (("pyrsistent>=0.14.2,<0.15.0") "pyrsistent>=0.14.2,<0.17.0")
12797 ;; Reported upstream:
12798 ;; <https://github.com/python-poetry/poetry/issues/2752>.
12799 (("tomlkit>=0.5.11,<0.6.0") "tomlkit>=0.5.11,<0.7.0")
12800 (("cleo>=0.7.6,<0.8.0") "cleo>=0.7.6,<0.9.0")
12801 (("clikit>=0.4.2,<0.5.0") "clikit>=0.4.2,<0.7.0"))
12802 #t)))))
12803 (propagated-inputs
12804 `(("python-cachecontrol" ,python-cachecontrol)
12805 ("python-cachy" ,python-cachy)
12806 ("python-cleo" ,python-cleo)
12807 ("python-clikit" ,python-clikit)
12808 ("python-html5lib" ,python-html5lib)
12809 ("python-jsonschema" ,python-jsonschema)
12810 ("python-keyring" ,python-keyring)
12811 ("python-msgpack-transitional" ,python-msgpack-transitional)
12812 ("python-pexpect" ,python-pexpect)
12813 ("python-pkginfo" ,python-pkginfo)
12814 ("python-pyparsing" ,python-pyparsing)
12815 ("python-pyrsistent" ,python-pyrsistent)
12816 ("python-requests" ,python-requests)
12817 ("python-requests-toolbelt" ,python-requests-toolbelt)
12818 ("python-shellingham" ,python-shellingham)
12819 ("python-tomlkit" ,python-tomlkit)
12820 ("python-virtualenv" ,python-virtualenv)))
12821 (home-page "https://python-poetry.org")
12822 (synopsis "Python dependency management and packaging made easy")
12823 (description "Poetry is a tool for dependency management and packaging
12824 in Python. It allows you to declare the libraries your project depends on and
12825 it will manage (install/update) them for you.")
12826 (license license:expat)))
12827
12828 (define-public python-lark-parser
12829 (package
12830 (name "python-lark-parser")
12831 (version "0.9.0")
12832 (source (origin
12833 (method url-fetch)
12834 (uri (pypi-uri "lark-parser" version))
12835 (sha256
12836 (base32
12837 "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
12838 (build-system python-build-system)
12839 (home-page "https://github.com/lark-parser/lark")
12840 (synopsis "Multi-language parser for Python")
12841 (description
12842 "Lark is a parser built with a focus on ergonomics, performance and
12843 resilience. Lark can parse all context-free languages. That means it is
12844 capable of parsing almost any programming language out there, and to
12845 some degree most natural languages too.")
12846 (license license:expat)))
12847
12848 (define-public python-libcst
12849 (package
12850 (name "python-libcst")
12851 (version "0.3.8")
12852 (source (origin
12853 (method url-fetch)
12854 (uri (pypi-uri "libcst" version))
12855 (sha256
12856 (base32
12857 "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
12858 (build-system python-build-system)
12859 (arguments
12860 `(#:phases
12861 (modify-phases %standard-phases
12862 (add-after 'unpack 'remove-failing-tests
12863 (lambda _
12864 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
12865 (delete-file "libcst/tests/test_fuzz.py")
12866 ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
12867 (delete-file "libcst/tests/test_pyre_integration.py")
12868 (delete-file "libcst/codemod/tests/test_codemod_cli.py")
12869 (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
12870 (delete-file "libcst/metadata/tests/test_type_inference_provider.py")
12871 #t))
12872 (add-before 'check 'generate-test-data
12873 (lambda _
12874 (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
12875 (invoke "python" "-m" "libcst.codegen.generate" "visitors")
12876 (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
12877 (replace 'check
12878 (lambda _
12879 (invoke "python" "-m" "unittest")
12880 #t)))))
12881 (native-inputs
12882 `(("python-black" ,python-black)
12883 ("python-isort" ,python-isort)))
12884 (propagated-inputs
12885 `(("python-typing-extensions" ,python-typing-extensions)
12886 ("python-typing-inspect" ,python-typing-inspect)
12887 ("python-pyyaml" ,python-pyyaml)))
12888 (home-page "https://github.com/Instagram/LibCST")
12889 (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
12890 (description
12891 "LibCST parses Python source code as a CST tree that keeps all
12892 formatting details (comments, whitespaces, parentheses, etc). It's useful
12893 for building automated refactoring (codemod) applications and linters.
12894 LibCST creates a compromise between an Abstract Syntax Tree (AST) and
12895 a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
12896 naming node types and fields, LibCST creates a lossless CST that looks and
12897 feels like an AST.")
12898 (license (list license:expat
12899 ;; Some files unde libcst/_parser/ are under Python Software
12900 ;; Foundation license (see LICENSE file for details)
12901 license:psfl
12902 ;; libcst/_add_slots.py
12903 license:asl2.0))))
12904
12905 (define-public python-typing-inspect
12906 (package
12907 (name "python-typing-inspect")
12908 (version "0.6.0")
12909 (source (origin
12910 (method url-fetch)
12911 (uri (pypi-uri "typing_inspect" version))
12912 (sha256
12913 (base32
12914 "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))))
12915 (build-system python-build-system)
12916 (propagated-inputs
12917 `(("python-mypy-extensions" ,python-mypy-extensions)
12918 ("python-typing-extensions" ,python-typing-extensions)))
12919 (home-page "https://github.com/ilevkivskyi/typing_inspect")
12920 (synopsis "API for inspection of types in the Python @code{typing} module")
12921 (description
12922 "The @code{typing_inspect} module defines experimental API for runtime
12923 inspection of types defined in the Python standard typing module.")
12924 (license license:expat)))
12925
12926 (define-public python-lazy-object-proxy
12927 (package
12928 (name "python-lazy-object-proxy")
12929 (version "1.5.1")
12930 (source (origin
12931 (method url-fetch)
12932 (uri (pypi-uri "lazy-object-proxy" version))
12933 (sha256
12934 (base32
12935 "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
12936 (native-inputs
12937 `(("python-setuptools-scm" ,python-setuptools-scm)))
12938 (build-system python-build-system)
12939 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
12940 (synopsis "Lazy object proxy for python")
12941 (description
12942 "Lazy object proxy is an object that wraps a callable but defers the call
12943 until the object is actually required, and caches the result of said call.")
12944 (license license:bsd-2)))
12945
12946 (define-public python2-lazy-object-proxy
12947 (package-with-python2 python-lazy-object-proxy))
12948
12949 (define-public python-dnspython
12950 (package
12951 (name "python-dnspython")
12952 (version "1.16.0")
12953 (source (origin
12954 (method url-fetch)
12955 (uri (string-append "http://www.dnspython.org/kits/"
12956 version "/dnspython-" version ".tar.gz"))
12957 (sha256
12958 (base32
12959 "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
12960 (build-system python-build-system)
12961 (arguments '(#:tests? #f)) ; XXX: requires internet access
12962 (home-page "http://www.dnspython.org")
12963 (synopsis "DNS toolkit for Python")
12964 (description
12965 "dnspython is a DNS toolkit for Python. It supports almost all record
12966 types. It can be used for queries, zone transfers, and dynamic updates.
12967 It supports TSIG authenticated messages and EDNS0.")
12968 (license license:expat)))
12969
12970 (define-public python2-dnspython
12971 (package-with-python2 python-dnspython))
12972
12973 (define-public python-py3dns
12974 (package
12975 (name "python-py3dns")
12976 (version "3.2.1")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "py3dns" version))
12981 (sha256
12982 (base32
12983 "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
12984 (build-system python-build-system)
12985 ;; This package wants to read /etc/resolv.conf. We can't patch it without
12986 ;; removing functionality so we copy from Nix and "just don't build it".
12987 (arguments
12988 `(#:phases
12989 (modify-phases %standard-phases
12990 (add-after 'unpack 'patch-source
12991 (lambda _
12992 (substitute* "setup.py"
12993 (("import DNS") "")
12994 (("DNS.__version__") (string-append "\"" ,version "\"")))
12995 #t)))
12996 #:tests? #f)) ; Also skip the tests.
12997 (home-page "https://launchpad.net/py3dns")
12998 (synopsis "Python 3 DNS library")
12999 (description "This Python 3 module provides a DNS API for looking up DNS
13000 entries from within Python 3 modules and applications. This module is a
13001 simple, lightweight implementation.")
13002 (license license:psfl)))
13003
13004 (define-public python-email-validator
13005 (package
13006 (name "python-email-validator")
13007 (version "1.0.2")
13008 (source
13009 (origin (method url-fetch)
13010 (uri (pypi-uri "email_validator" version))
13011 (sha256
13012 (base32
13013 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
13014 (build-system python-build-system)
13015 (arguments
13016 '(#:phases
13017 (modify-phases %standard-phases
13018 (add-before 'build 'use-dnspython
13019 (lambda _
13020 (substitute* "setup.py"
13021 (("dnspython3") "dnspython"))
13022 #t)))))
13023 (propagated-inputs
13024 `(("python-dnspython" ,python-dnspython)
13025 ("python-idna" ,python-idna)))
13026 (home-page "https://github.com/JoshData/python-email-validator")
13027 (synopsis "Email address validation library for Python")
13028 (description
13029 "This library validates email address syntax and deliverability.")
13030 (license license:cc0)))
13031
13032 (define-public python2-email-validator
13033 (package-with-python2 python-email-validator))
13034
13035 (define-public python-ukpostcodeparser
13036 (package
13037 (name "python-ukpostcodeparser")
13038 (version "1.0.3")
13039 (source (origin
13040 (method url-fetch)
13041 (uri (pypi-uri "UkPostcodeParser" version))
13042 (sha256
13043 (base32
13044 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
13045 (build-system python-build-system)
13046 (home-page "https://github.com/hamstah/ukpostcodeparser")
13047 (synopsis "UK Postcode parser for Python")
13048 (description
13049 "This library provides the @code{parse_uk_postcode} function for
13050 parsing UK postcodes.")
13051 (license license:expat)))
13052
13053 (define-public python2-ukpostcodeparser
13054 (package-with-python2 python-ukpostcodeparser))
13055
13056 (define-public python-faker
13057 (package
13058 (name "python-faker")
13059 (version "4.0.2")
13060 (source (origin
13061 (method url-fetch)
13062 (uri (pypi-uri "Faker" version))
13063 (sha256
13064 (base32
13065 "13qq485ydxmdnqn3xbfv1xfyqbf9qfnfw33v1vw5l6jyy9p8cgrd"))))
13066 (build-system python-build-system)
13067 (arguments
13068 '(#:phases
13069 (modify-phases %standard-phases
13070 (replace 'check
13071 (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
13072 (native-inputs
13073 `(;; For testing
13074 ("python-freezegun" ,python-freezegun)
13075 ("python-pytest" ,python-pytest)
13076 ("python-random2" ,python-random2)
13077 ("python-ukpostcodeparser" ,python-ukpostcodeparser)
13078 ("python-validators" ,python-validators)))
13079 (propagated-inputs
13080 `(("python-dateutil" ,python-dateutil)
13081 ("python-text-unidecode" ,python-text-unidecode)))
13082 (home-page "https://github.com/joke2k/faker")
13083 (synopsis "Python package that generates fake data")
13084 (description
13085 "Faker is a Python package that generates fake data such as names,
13086 addresses, and phone numbers.")
13087 (license license:expat)
13088 (properties `((python2-variant . ,(delay python2-faker))))))
13089
13090 ;; Faker 4.0 dropped Python 2 support, so we stick with this older version here.
13091 (define-public python2-faker
13092 (let ((base (package-with-python2 (strip-python2-variant
13093 python-faker))))
13094 (package
13095 (inherit base)
13096 (version "3.0.1")
13097 (source (origin
13098 (method url-fetch)
13099 (uri (pypi-uri "Faker" version))
13100 (sha256
13101 (base32
13102 "11cr0qvspkdh6198rqy56qildk7bnp6llj8kyy1dan5sp5n4dxy7"))))
13103 (native-inputs
13104 `(("python-mock" ,python2-mock)
13105 ,@(package-native-inputs base)))
13106 (propagated-inputs
13107 `(("python2-ipaddress" ,python2-ipaddress)
13108 ("python2-six" ,python2-six)
13109 ,@(package-propagated-inputs base))))))
13110
13111 (define-public python-pyaml
13112 (package
13113 (name "python-pyaml")
13114 (version "18.11.0")
13115 (source (origin
13116 (method url-fetch)
13117 (uri (pypi-uri "pyaml" version))
13118 (sha256
13119 (base32
13120 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
13121 (build-system python-build-system)
13122 (native-inputs
13123 `(("python-unidecode" ,python-unidecode)))
13124 (propagated-inputs
13125 `(("python-pyyaml" ,python-pyyaml)))
13126 (home-page "https://github.com/mk-fg/pretty-yaml")
13127 (synopsis "YAML pretty-print library for Python")
13128 (description
13129 "pyaml is a PyYAML based python module to produce pretty and readable
13130 YAML-serialized data.")
13131 (license license:wtfpl2)))
13132
13133 (define-public python2-pyaml
13134 (package-with-python2 python-pyaml))
13135
13136 (define-public python-backpack
13137 (package
13138 (name "python-backpack")
13139 (version "0.1")
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "backpack" version))
13144 (sha256
13145 (base32
13146 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
13147 (build-system python-build-system)
13148 (native-inputs
13149 `(("python-pytest" ,python-pytest)
13150 ("python-nose" ,python-nose)))
13151 (propagated-inputs
13152 `(("python-simplejson" ,python-simplejson)))
13153 (home-page "https://github.com/sdispater/backpack")
13154 (synopsis "Utilities for working with Python collections")
13155 (description "Backpack provides some useful utilities for working with
13156 collections of data.")
13157 (license license:expat)))
13158
13159 (define-public python2-backpack
13160 (package-with-python2 python-backpack))
13161
13162 (define-public python-prompt-toolkit
13163 (package
13164 (name "python-prompt-toolkit")
13165 (version "3.0.7")
13166 (source
13167 (origin
13168 (method url-fetch)
13169 (uri (pypi-uri "prompt_toolkit" version))
13170 (sha256
13171 (base32 "12a4pyrpnm3vcrvx7lb4cglp220lbvi336mhn2k2nzcgy82lcbw2"))))
13172 (build-system python-build-system)
13173 (arguments
13174 `(#:phases
13175 (modify-phases %standard-phases
13176 (delete 'check)
13177 (add-after 'install 'post-install-check
13178 (lambda* (#:key inputs outputs #:allow-other-keys)
13179 ;; HOME is needed for the test
13180 ;; "test_pathcompleter_can_expanduser".
13181 (setenv "HOME" "/tmp")
13182 (add-installed-pythonpath inputs outputs)
13183 (invoke "py.test"))))))
13184 (propagated-inputs
13185 `(("python-wcwidth" ,python-wcwidth)))
13186 (native-inputs
13187 `(("python-pytest" ,python-pytest)))
13188 (home-page
13189 "https://github.com/prompt-toolkit/python-prompt-toolkit")
13190 (synopsis "Library for building command line interfaces in Python")
13191 (description
13192 "Prompt-Toolkit is a library for building interactive command line
13193 interfaces in Python. It's like GNU Readline but it also features syntax
13194 highlighting while typing, out-of-the-box multi-line input editing, advanced
13195 code completion, incremental search, support for Chinese double-width
13196 characters, mouse support, and auto suggestions.")
13197 (license license:bsd-3)
13198 (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
13199
13200 (define-public python-prompt-toolkit-2
13201 (package (inherit python-prompt-toolkit)
13202 (name "python-prompt-toolkit")
13203 (version "2.0.7")
13204 (source
13205 (origin
13206 (method url-fetch)
13207 (uri (pypi-uri "prompt_toolkit" version))
13208 (sha256
13209 (base32
13210 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
13211 (propagated-inputs
13212 `(("python-wcwidth" ,python-wcwidth)
13213 ("python-six" ,python-six)
13214 ("python-pygments" ,python-pygments)))
13215 (properties '())))
13216
13217 (define-public python2-prompt-toolkit
13218 (package-with-python2 python-prompt-toolkit-2))
13219
13220 (define-public python-prompt-toolkit-1
13221 (package (inherit python-prompt-toolkit-2)
13222 (version "1.0.15")
13223 (source
13224 (origin
13225 (method url-fetch)
13226 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
13227 (sha256
13228 (base32
13229 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
13230
13231 (define-public python2-prompt-toolkit-1
13232 (package-with-python2 python-prompt-toolkit-1))
13233
13234 (define-public python-jedi
13235 (package
13236 (name "python-jedi")
13237 (version "0.17.2")
13238 (source
13239 (origin
13240 (method url-fetch)
13241 (uri (pypi-uri "jedi" version))
13242 (sha256
13243 (base32 "080xyf97ifabdz7jp8clg00b8zv5g33fva1fb2xf80q6fndpvvc6"))))
13244 (build-system python-build-system)
13245 (arguments
13246 `(#:phases
13247 (modify-phases %standard-phases
13248 (replace 'check
13249 (lambda _
13250 (setenv "HOME" "/tmp")
13251 (invoke "python" "-m" "pytest" "-vv"))))))
13252 (native-inputs
13253 `(("python-pytest" ,python-pytest)
13254 ("python-docopt" ,python-docopt)))
13255 (propagated-inputs
13256 `(("python-parso" ,python-parso)))
13257 (home-page "https://github.com/davidhalter/jedi")
13258 (synopsis "Autocompletion and static analysis library for Python")
13259 (description
13260 "Jedi is a static analysis tool for Python that can be used in Integrated
13261 Development Environments (@dfn{IDE}s) and text editors. It understands Python
13262 on a deeper level than many other static analysis frameworks for Python.
13263
13264 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
13265 well.")
13266 (license license:expat)))
13267
13268 (define-public python2-jedi
13269 (package-with-python2 python-jedi))
13270
13271 (define-public ptpython
13272 (package
13273 (name "ptpython")
13274 (version "3.0.5")
13275 (source (origin
13276 (method url-fetch)
13277 (uri (pypi-uri "ptpython" version))
13278 (sha256
13279 (base32
13280 "0c2ry5gwi2v99slna62j8r2bwq0hpzmvgdryqg9m6x57vbjfg52h"))))
13281 (build-system python-build-system)
13282 (arguments
13283 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
13284 (propagated-inputs
13285 `(("python-appdirs" ,python-appdirs)
13286 ("python-jedi" ,python-jedi)
13287 ("python-prompt-toolkit" ,python-prompt-toolkit)
13288 ("python-pygments" ,python-pygments)))
13289 (home-page "https://github.com/jonathanslenders/ptpython")
13290 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
13291 (description
13292 "ptpython is a Python read-eval-print loop with IDE-like features.
13293 It supports syntax highlighting, multiline editing, autocompletion, mouse,
13294 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
13295 etc.")
13296 (license license:bsd-3)
13297 (properties `((python2-variant . ,(delay ptpython-2))))))
13298
13299 (define-public ptpython-2
13300 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
13301 (package
13302 (inherit base)
13303 (name "ptpython2"))))
13304
13305 (define-public python-stem
13306 (package
13307 (name "python-stem")
13308 (version "1.8.0")
13309 (source
13310 (origin
13311 (method url-fetch)
13312 (uri (pypi-uri "stem" version))
13313 (sha256
13314 (base32
13315 "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
13316 (build-system python-build-system)
13317 (arguments
13318 `(#:phases
13319 (modify-phases %standard-phases
13320 (replace 'check
13321 (lambda _
13322 (invoke "./run_tests.py" "--unit")
13323 #t)))))
13324 (native-inputs
13325 `(("python-mock" ,python-mock)
13326 ("python-pycodestyle" ,python-pycodestyle)
13327 ("python-pyflakes" ,python-pyflakes)))
13328 (home-page "https://stem.torproject.org/")
13329 (synopsis
13330 "Python controller library that allows applications to interact with Tor")
13331 (description
13332 "Stem is a Python controller library for Tor. With it you can use Tor's
13333 control protocol to script against the Tor process and read descriptor data
13334 relays publish about themselves.")
13335 (license license:lgpl3)))
13336
13337 (define-public python2-stem
13338 (package-with-python2 python-stem))
13339
13340 (define-public python-pyserial
13341 (package
13342 (name "python-pyserial")
13343 (version "3.4")
13344 (source
13345 (origin
13346 (method url-fetch)
13347 (uri (pypi-uri "pyserial" version))
13348 (sha256
13349 (base32
13350 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
13351 (build-system python-build-system)
13352 (arguments
13353 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
13354 ;; #:phases
13355 ;; (modify-phases %standard-phases
13356 ;; (replace 'check
13357 ;; (lambda _
13358 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
13359 (home-page
13360 "https://github.com/pyserial/pyserial")
13361 (synopsis "Python Serial Port Bindings")
13362 (description "@code{pyserial} provide serial port bindings for Python. It
13363 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
13364 and/or Xon/Xoff. The port is accessed in RAW mode.")
13365 (license license:bsd-3)))
13366
13367 (define-public python2-pyserial
13368 (package-with-python2 python-pyserial))
13369
13370 (define-public python-kivy
13371 (package
13372 (name "python-kivy")
13373 (version "1.10.1")
13374 (source
13375 (origin
13376 (method url-fetch)
13377 (uri (pypi-uri "Kivy" version))
13378 (file-name (string-append name "-" version ".tar.gz"))
13379 (sha256
13380 (base32
13381 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
13382 (build-system python-build-system)
13383 (arguments
13384 `(#:tests? #f ; Tests require many optional packages
13385 #:phases
13386 (modify-phases %standard-phases
13387 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
13388 (lambda* (#:key inputs #:allow-other-keys)
13389 (setenv "KIVY_SDL2_PATH"
13390 (string-append (assoc-ref inputs "sdl-union")
13391 "/include/SDL2"))
13392 #t)))))
13393 (native-inputs
13394 `(("pkg-config" ,pkg-config)
13395 ("python-cython" ,python-cython)))
13396 (inputs
13397 `(("gstreamer" ,gstreamer)
13398 ("mesa" ,mesa)
13399 ("sdl-union"
13400 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
13401 (home-page "https://kivy.org")
13402 (synopsis
13403 "Multitouch application framework")
13404 (description
13405 "A software library for rapid development of
13406 hardware-accelerated multitouch applications.")
13407 (license license:expat)))
13408
13409 (define-public python2-kivy
13410 (package-with-python2 python-kivy))
13411
13412 (define-public python-binaryornot
13413 (package
13414 (name "python-binaryornot")
13415 (version "0.4.4")
13416 (source (origin
13417 (method url-fetch)
13418 (uri (pypi-uri "binaryornot" version))
13419 (sha256
13420 (base32
13421 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
13422 (build-system python-build-system)
13423 (arguments
13424 `(#:phases
13425 (modify-phases %standard-phases
13426 (add-after 'unpack 'patch-tests
13427 (lambda _
13428 ;; TypeError: binary() got an unexpected keyword argument
13429 ;; 'average_size'.
13430 (substitute* "tests/test_check.py"
13431 (("average_size=512") ""))
13432 #t)))))
13433 (propagated-inputs
13434 `(("python-chardet" ,python-chardet)
13435 ("python-hypothesis" ,python-hypothesis)))
13436 (home-page "https://github.com/audreyr/binaryornot")
13437 (synopsis "Package to check if a file is binary or text")
13438 (description "Ultra-lightweight pure Python package to check if a file is
13439 binary or text.")
13440 (license license:bsd-3)
13441 (properties `((python2-variant . ,(delay python2-binaryornot))))))
13442
13443 (define-public python2-binaryornot
13444 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
13445 (package (inherit base)
13446 (propagated-inputs
13447 `(("python2-enum34" ,python2-enum34)
13448 ,@(package-propagated-inputs base))))))
13449
13450 (define-public python-binwalk
13451 (package
13452 (name "python-binwalk")
13453 (version "2.2.0")
13454 (source
13455 (origin
13456 (method git-fetch)
13457 (uri (git-reference
13458 (url "https://github.com/ReFirmLabs/binwalk")
13459 (commit (string-append "v" version))))
13460 (file-name (git-file-name name version))
13461 (sha256
13462 (base32
13463 "1bxgj569fzwv6jhcbl864nmlsi9x1k1r20aywjxc8b9b1zgqrlvc"))))
13464 (build-system python-build-system)
13465 (arguments
13466 `(#:phases
13467 (modify-phases %standard-phases
13468 (add-before 'check 'set-pythonpath
13469 (lambda _
13470 (setenv "PYTHONPATH"
13471 (string-append
13472 (getcwd) "/src/"
13473 ":" (getenv "PYTHONPATH")))
13474 (setenv "HOME" "")
13475 #t)))))
13476 (native-inputs
13477 `(("python-coverage" ,python-coverage)
13478 ("python-nose" ,python-nose)))
13479 (home-page "https://github.com/ReFirmLabs/binwalk")
13480 (synopsis "Firmware analysis tool")
13481 (description "Binwalk is a tool for analyzing, reverse engineering, and
13482 extracting firmware images")
13483 (license license:expat)))
13484
13485 (define-public python-nltk
13486 (package
13487 (name "python-nltk")
13488 (version "3.2.1")
13489 (source (origin
13490 (method url-fetch)
13491 (uri (pypi-uri "nltk" version))
13492 (sha256
13493 (base32
13494 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
13495 (build-system python-build-system)
13496 (arguments
13497 '(;; The tests require some extra resources to be downloaded.
13498 ;; TODO Try packaging these resources.
13499 #:tests? #f))
13500 (home-page "http://nltk.org/")
13501 (synopsis "Natural Language Toolkit")
13502 (description "It provides interfaces to over 50 corpora and lexical
13503 resources such as WordNet, along with a suite of text processing libraries
13504 for classification, tokenization, stemming, tagging, parsing, and semantic
13505 reasoning, wrappers for natural language processing libraries.")
13506 (license license:asl2.0)))
13507
13508 (define-public python2-nltk
13509 (package-with-python2 python-nltk))
13510
13511 (define-public python-pymongo
13512 (package
13513 (name "python-pymongo")
13514 (version "3.7.2")
13515 (source (origin
13516 (method url-fetch)
13517 (uri (pypi-uri "pymongo" version))
13518 (sha256
13519 (base32
13520 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
13521 (build-system python-build-system)
13522 (propagated-inputs
13523 `(("python-certifi" ,python-certifi)))
13524 (home-page "https://github.com/mongodb/mongo-python-driver")
13525 (synopsis "Python driver for MongoDB")
13526 (description "Python driver for MongoDB.")
13527 (license license:asl2.0)))
13528
13529 (define-public python2-pymongo
13530 (package-with-python2 python-pymongo))
13531
13532 (define-public python-consul
13533 (package
13534 (name "python-consul")
13535 (version "0.6.1")
13536 (source
13537 (origin
13538 (method url-fetch)
13539 (uri (pypi-uri "python-consul" version))
13540 (sha256
13541 (base32
13542 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
13543 (build-system python-build-system)
13544 (arguments
13545 '(#:tests? #f)) ; The tests are not distributed
13546 (propagated-inputs
13547 `(("python-requests" ,python-requests)
13548 ("python-six" ,python-six)))
13549 (home-page "https://github.com/cablehead/python-consul")
13550 (synopsis "Python client for Consul")
13551 (description
13552 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
13553 discovery, monitoring and configuration.")
13554 (license license:expat)))
13555
13556 (define-public python2-consul
13557 (package-with-python2 python-consul))
13558
13559 (define-public python-schematics
13560 (package
13561 (name "python-schematics")
13562 (version "1.1.1")
13563 (source
13564 (origin
13565 (method git-fetch)
13566 (uri (git-reference
13567 (url "https://github.com/schematics/schematics")
13568 (commit (string-append "v" version))))
13569 (file-name (git-file-name name version))
13570 (sha256
13571 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
13572 (build-system python-build-system)
13573 (propagated-inputs
13574 `(("python-six" ,python-six)))
13575 (arguments
13576 ;; The tests require a bunch of not very nice packages with fixed
13577 ;; version requirements (e.g. python-coveralls).
13578 `(#:tests? #f))
13579 (home-page "https://github.com/schematics/schematics")
13580 (synopsis "Python Data Structures for Humans")
13581 (description "Python Data Structures for Humans.")
13582 (license license:bsd-3)))
13583
13584 (define-public python2-schematics
13585 (package-with-python2 python-schematics))
13586
13587 (define-public python-odfpy
13588 (package
13589 (name "python-odfpy")
13590 (version "1.4.1")
13591 (source (origin
13592 (method url-fetch)
13593 (uri (pypi-uri "odfpy" version))
13594 (sha256
13595 (base32
13596 "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
13597 (arguments
13598 `(#:phases
13599 (modify-phases %standard-phases
13600 (replace 'check
13601 (lambda _
13602 (setenv "PYTHONPATH" (string-append "./build/lib:"
13603 (getenv "PYTHONPATH")))
13604 (invoke "pytest" "-vv"))))))
13605 (build-system python-build-system)
13606 (native-inputs
13607 `(("python-pytest" ,python-pytest)))
13608 (propagated-inputs
13609 `(("python-defusedxml" ,python-defusedxml)))
13610 (home-page "https://github.com/eea/odfpy")
13611 (synopsis "Python API and tools to manipulate OpenDocument files")
13612 (description "Collection of libraries and utility programs written in
13613 Python to manipulate OpenDocument 1.2 files.")
13614 (license
13615 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
13616 ;; number of files with other licenses.
13617 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
13618
13619 (define-public python2-odfpy
13620 (package-with-python2 python-odfpy))
13621
13622 (define-public python-natsort
13623 (package
13624 (name "python-natsort")
13625 (version "7.0.1")
13626 (source (origin
13627 (method url-fetch)
13628 (uri (pypi-uri "natsort" version))
13629 (sha256
13630 (base32
13631 "1ksqfai72dbcfbwx43pxl658j59mx2rvqypjy1fk0ax2qd6lccx6"))))
13632 (build-system python-build-system)
13633 (arguments
13634 `(#:modules ((guix build utils)
13635 (guix build python-build-system)
13636 (srfi srfi-1)
13637 (srfi srfi-26)
13638 (ice-9 ftw))
13639 #:phases
13640 (modify-phases %standard-phases
13641 (add-before 'check 'set-cachedir
13642 ;; Tests require write access to $HOME by default
13643 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
13644 (replace 'check
13645 (lambda _
13646 (let ((cwd (getcwd)))
13647 (setenv "PYTHONPATH"
13648 (string-append
13649 cwd "/build/"
13650 (find (cut string-prefix? "lib" <>)
13651 (scandir (string-append cwd "/build")))
13652 ":"
13653 (getenv "PYTHONPATH")))
13654 (invoke "pytest" "-v")))))))
13655 (native-inputs
13656 `(("python-hypothesis" ,python-hypothesis)
13657 ("python-pytest-cov" ,python-pytest-cov)
13658 ("python-pytest-mock" ,python-pytest-mock)
13659 ("python-pytest" ,python-pytest)))
13660 (propagated-inputs ; TODO: Add python-fastnumbers.
13661 `(("python-pyicu" ,python-pyicu)))
13662 (home-page "https://github.com/SethMMorton/natsort")
13663 (synopsis "Natural sorting for python and shell")
13664 (description
13665 "Natsort lets you apply natural sorting on lists instead of
13666 lexicographical. If you use the built-in @code{sorted} method in python
13667 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
13668 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
13669 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
13670 identifies numbers and sorts them separately from strings. It can also sort
13671 version numbers, real numbers, mixed types and more, and comes with a shell
13672 command @command{natsort} that exposes this functionality in the command line.")
13673 (license license:expat)
13674 (properties `((python2-variant . ,(delay python2-natsort))))))
13675
13676 ;; Natsort 6.x are the last versions with support for Python 2.
13677 (define-public python2-natsort
13678 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
13679 (package (inherit base)
13680 (version "6.2.1")
13681 (source (origin
13682 (method url-fetch)
13683 (uri (pypi-uri "natsort" version))
13684 (sha256
13685 (base32
13686 "1mc9hbh6fv76xyz13frm7dgi05cf74f9j5wvcyjiy5234gylz565"))))
13687 (native-inputs
13688 `(("python2-pathlib" ,python2-pathlib)
13689 ,@(package-native-inputs base))))))
13690
13691 (define-public glances
13692 (package
13693 (name "glances")
13694 (version "3.1.4")
13695 (source
13696 (origin
13697 (method url-fetch)
13698 (uri (pypi-uri "Glances" version))
13699 (sha256
13700 (base32 "0dc47gbvp9a3wxppdqihxpglxxaxbj3hcvzgcxxq8zcsciah3plq"))
13701 (modules '((guix build utils)))
13702 (snippet
13703 '(begin
13704 ;; Glances phones PyPI for weekly update checks by default.
13705 ;; Disable these. The user can re-enable them if desired.
13706 (substitute* "glances/outdated.py"
13707 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
13708 (string-append indentation
13709 "self.args.disable_check_update = True\n"
13710 line)))
13711 #t))))
13712 (build-system python-build-system)
13713 (propagated-inputs
13714 `(("python-future" ,python-future)
13715 ("python-psutil" ,python-psutil)))
13716 (home-page "https://github.com/nicolargo/glances")
13717 (synopsis "Cross-platform curses-based monitoring tool")
13718 (description
13719 "Glances is a curses-based monitoring tool for a wide variety of platforms.
13720 Glances uses the PsUtil library to get information from your system. It
13721 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
13722 (license license:lgpl3+)))
13723
13724 (define-public python-glances
13725 (deprecated-package "python-glances" glances))
13726
13727 (define-public python-graphql-core
13728 (package
13729 (name "python-graphql-core")
13730 (version "0.5.3")
13731 (source
13732 (origin
13733 (method url-fetch)
13734 (uri (pypi-uri "graphql-core" version))
13735 (sha256
13736 (base32
13737 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
13738 (build-system python-build-system)
13739 (arguments
13740 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
13741 #:phases
13742 (modify-phases %standard-phases
13743 (add-after 'unpack 'patch-hardcoded-version
13744 (lambda _ (substitute*
13745 "setup.py"
13746 (("'gevent==1.1rc1'") "'gevent'"))
13747 #t)))))
13748 (native-inputs
13749 `(("python-gevent" ,python-gevent)
13750 ("python-mock" ,python-mock)
13751 ("python-pytest-mock" ,python-pytest-mock)))
13752 (propagated-inputs
13753 `(("python-promise" ,python-promise)
13754 ("python-six" ,python-six)))
13755 (home-page "https://github.com/graphql-python/graphql-core")
13756 (synopsis "GraphQL implementation for Python")
13757 (description
13758 "GraphQL implementation for Python. GraphQL is a data query language and
13759 runtime designed and used to request and deliver data to mobile and web apps.
13760 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
13761 to Python.")
13762 (license license:expat)))
13763
13764 (define-public python2-graphql-core
13765 (package-with-python2 python-graphql-core))
13766
13767 (define-public python-graphql-relay
13768 (package
13769 (name "python-graphql-relay")
13770 (version "0.4.5")
13771 (source
13772 (origin
13773 (method url-fetch)
13774 (uri (pypi-uri "graphql-relay" version))
13775 (sha256
13776 (base32
13777 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
13778 (build-system python-build-system)
13779 (arguments
13780 '(#:tests? #f)) ; The tests are not distributed
13781 (propagated-inputs
13782 `(("python-graphql-core" ,python-graphql-core)
13783 ("python-promise" ,python-promise)
13784 ("python-six" ,python-six)))
13785 (home-page "https://github.com/graphql-python/graphql-relay-py")
13786 (synopsis "Relay implementation for Python")
13787 (description
13788 "This is a library to allow the easy creation of Relay-compliant servers
13789 using the GraphQL Python reference implementation of a GraphQL server. It
13790 should be noted that the code is a exact port of the original
13791 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
13792 from Facebook.")
13793 (license license:expat)))
13794
13795 (define-public python2-graphql-relay
13796 (package-with-python2 python-graphql-relay))
13797
13798 (define-public python-graphene
13799 (package
13800 (name "python-graphene")
13801 (version "0.10.2")
13802 (source
13803 (origin
13804 (method url-fetch)
13805 (uri (pypi-uri "graphene" version))
13806 (sha256
13807 (base32
13808 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
13809 (build-system python-build-system)
13810 (propagated-inputs
13811 `(("python-graphql-core" ,python-graphql-core)
13812 ("python-graphql-relay" ,python-graphql-relay)
13813 ("python-iso8601" ,python-iso8601)
13814 ("python-promise" ,python-promise)
13815 ("python-six" ,python-six)))
13816 (arguments
13817 `(#:tests? #f)) ; no tests/ in the PyPI tarball
13818 (home-page "https://graphene-python.org/")
13819 (synopsis "GraphQL Framework for Python")
13820 (description
13821 "Graphene is a Python library for building GraphQL schemas/types.
13822 A GraphQL schema describes your data model, and provides a GraphQL server
13823 with an associated set of resolve methods that know how to fetch data.")
13824 (properties `((python2-variant . ,(delay python2-graphene))))
13825 (license license:expat)))
13826
13827 (define-public python2-graphene
13828 (let ((base (package-with-python2
13829 (strip-python2-variant python-graphene))))
13830 (package (inherit base)
13831 (native-inputs
13832 `(("python2-sqlalchemy" ,python2-sqlalchemy)
13833 ,@(package-native-inputs base))))))
13834
13835 (define-public python-nautilus
13836 (package
13837 (name "python-nautilus")
13838 (version "0.4.9")
13839 (source
13840 (origin
13841 (method url-fetch)
13842 (uri (pypi-uri "nautilus" version))
13843 (sha256
13844 (base32
13845 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
13846 (build-system python-build-system)
13847 (arguments `(#:tests? #f)) ; fails to import test modules
13848 (propagated-inputs
13849 `(("python-bcrypt" ,python-bcrypt)
13850 ("python-click" ,python-click)
13851 ("python-consul" ,python-consul)
13852 ("python-graphene" ,python-graphene)
13853 ("python-jinja2" ,python-jinja2)
13854 ("python-peewee" ,python-peewee)
13855 ("python-pika" ,python-pika)
13856 ("python-tornado" ,python-tornado)
13857 ("python-wtforms" ,python-wtforms)))
13858 (native-inputs
13859 `(("python-nose2" ,python-nose2)))
13860 (home-page "https://github.com/AlecAivazis/nautilus")
13861 (synopsis "Library for creating microservice applications")
13862 (description
13863 "Nautilus is a framework for flux based microservices that looks to
13864 provide extendible implementations of common aspects of a cloud so that you can
13865 focus on building massively scalable web applications.")
13866 (license license:expat)))
13867
13868 (define-public python-random2
13869 (package
13870 (name "python-random2")
13871 (version "1.0.1")
13872 (source (origin
13873 (method url-fetch)
13874 (uri (pypi-uri "random2" version ".zip"))
13875 (sha256
13876 (base32
13877 "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))))
13878 (build-system python-build-system)
13879 (native-inputs `(("unzip" ,unzip)))
13880 (home-page "http://pypi.python.org/pypi/random2")
13881 (synopsis "Python 3 version of the Python 2 @code{random} module")
13882 (description
13883 "This package provides a Python 3 ported version of Python 2.7’s
13884 @code{random} module. It has also been back-ported to work in Python 2.6.
13885
13886 In Python 3, the implementation of @code{randrange()} was changed, so that
13887 even with the same seed you get different sequences in Python 2 and 3.
13888
13889 This package closes that gap, allowing stable random number generation
13890 between the different Python versions.")
13891 (license license:psfl)))
13892
13893 (define-public python2-random2
13894 (package-with-python2 python-random2))
13895
13896 (define-public python-snowballstemmer
13897 (package
13898 (name "python-snowballstemmer")
13899 (version "2.0.0")
13900 (source (origin
13901 (method url-fetch)
13902 (uri (pypi-uri "snowballstemmer" version))
13903 (sha256
13904 (base32
13905 "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
13906 (build-system python-build-system)
13907 (arguments
13908 `(;; No tests exist
13909 #:tests? #f))
13910 (home-page "https://github.com/shibukawa/snowball_py")
13911 (synopsis "Snowball stemming library collection for Python")
13912 (description "This package provides 16 word stemmer algorithms generated
13913 from Snowball algorithms. It includes the 15 original ones plus the Poerter
13914 English stemmer.")
13915 (license license:bsd-3)))
13916
13917 (define-public python2-snowballstemmer
13918 (package-with-python2 python-snowballstemmer))
13919
13920 (define-public python-setproctitle
13921 (package
13922 (name "python-setproctitle")
13923 (version "1.1.10")
13924 (source
13925 (origin
13926 (method url-fetch)
13927 (uri (pypi-uri "setproctitle" version))
13928 (sha256
13929 (base32
13930 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
13931 (build-system python-build-system)
13932 (arguments
13933 '(#:phases
13934 (modify-phases %standard-phases
13935 (add-before 'check 'patch-Makefile
13936 ;; Stricly this is only required for the python2 variant.
13937 ;; But adding a phase in an inherited package seems to be
13938 ;; cumbersum. So we patch even for python3.
13939 (lambda _
13940 (let ((nose (assoc-ref %build-inputs "python2-nose")))
13941 (when nose
13942 (substitute* "Makefile"
13943 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
13944 (string-append nose "/bin/nosetests "))))
13945 #t)))
13946 (replace 'check
13947 (lambda _
13948 (setenv "PYTHON" (or (which "python3") (which "python")))
13949 (setenv "PYCONFIG" (if (which "python3-config")
13950 "python3-config --embed"
13951 "python-config"))
13952 (setenv "CC" "gcc")
13953 ;; No need to extend PYTHONPATH to find the built package, since
13954 ;; the Makefile will build anyway
13955 (invoke "make" "check"))))))
13956 (native-inputs
13957 `(("procps" ,procps))) ; required for tests
13958 (home-page "https://github.com/dvarrazzo/py-setproctitle")
13959 (synopsis
13960 "Setproctitle implementation for Python to customize the process title")
13961 (description "The library allows a process to change its title (as displayed
13962 by system tools such as ps and top).
13963
13964 Changing the title is mostly useful in multi-process systems, for
13965 example when a master process is forked: changing the children's title
13966 allows identifying the task each process is busy with. The technique
13967 is used by PostgreSQL and the OpenSSH Server for example.")
13968 (license license:bsd-3)
13969 (properties `((python2-variant . ,(delay python2-setproctitle))))))
13970
13971 (define-public python2-setproctitle
13972 (let ((base (package-with-python2
13973 (strip-python2-variant python-setproctitle))))
13974 (package
13975 (inherit base)
13976 (native-inputs `(("python2-nose" ,python2-nose)
13977 ,@(package-native-inputs base))))))
13978
13979 (define-public python-validictory
13980 (package
13981 (name "python-validictory")
13982 (version "1.0.1")
13983 (source
13984 (origin
13985 (method url-fetch)
13986 (uri (pypi-uri "validictory" version))
13987 (sha256
13988 (base32
13989 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
13990 (build-system python-build-system)
13991 (arguments
13992 '(#:phases
13993 (modify-phases %standard-phases
13994 (add-after 'unpack 'bootstrap
13995 ;; Move the tests out of the package directory to avoid
13996 ;; packaging them.
13997 (lambda* _
13998 (rename-file "validictory/tests" "tests")
13999 (delete-file "tests/__init__.py")))
14000 (replace 'check
14001 (lambda _
14002 ;; Extend PYTHONPATH so the built package will be found.
14003 (setenv "PYTHONPATH"
14004 (string-append (getcwd) "/build/lib:"
14005 (getenv "PYTHONPATH")))
14006 (invoke "py.test" "-vv" ))))))
14007 (native-inputs
14008 `(("python-pytest" ,python-pytest)))
14009 (home-page
14010 "https://github.com/jamesturk/validictory")
14011 (synopsis "General purpose Python data validator")
14012 (description "It allows validation of arbitrary Python data structures.
14013
14014 The schema format is based on the JSON Schema
14015 proposal (http://json-schema.org), so combined with json the library is also
14016 useful as a validator for JSON data.")
14017 (license license:expat)))
14018
14019 (define-public python2-validictory
14020 (package-with-python2 python-validictory))
14021
14022 (define-public python-pyelftools
14023 (package
14024 (name "python-pyelftools")
14025 (version "0.25")
14026 (source
14027 (origin
14028 (method url-fetch)
14029 (uri (pypi-uri "pyelftools" version))
14030 (sha256
14031 (base32
14032 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
14033 (build-system python-build-system)
14034 (arguments
14035 `(#:phases
14036 (modify-phases %standard-phases
14037 (add-before 'check 'set-pythonpath
14038 (lambda _
14039 (setenv "PYTHONPATH"
14040 (string-append
14041 (getcwd) "/test/"
14042 ":" (getenv "PYTHONPATH")))
14043 #t)))))
14044 (home-page
14045 "https://github.com/eliben/pyelftools")
14046 (synopsis
14047 "Analyze binary and library file information")
14048 (description "This Python library provides interfaces for parsing and
14049 analyzing two binary and library file formats; the Executable and Linking
14050 Format (ELF), and debugging information in the Debugging With Attributed
14051 Record Format (DWARF).")
14052 (license license:public-domain)))
14053
14054 (define-public python-pyev
14055 (package
14056 (name "python-pyev")
14057 (version "0.9.0")
14058 (source
14059 (origin
14060 (method url-fetch)
14061 (uri (pypi-uri "pyev" version))
14062 (sha256
14063 (base32
14064 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
14065 (build-system python-build-system)
14066 (arguments
14067 `(#:tests? #f ; no test suite
14068 #:phases
14069 (modify-phases %standard-phases
14070 (add-after 'unpack 'patch
14071 (lambda* (#:key inputs #:allow-other-keys)
14072 (let ((libev (string-append (assoc-ref inputs "libev")
14073 "/lib/libev.so.4")))
14074 (substitute* "setup.py"
14075 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
14076 (string-append "libev_dll_name = \"" libev "\"")))))))))
14077 (inputs
14078 `(("libev" ,libev)))
14079 (home-page "http://pythonhosted.org/pyev/")
14080 (synopsis "Python libev interface")
14081 (description "Pyev provides a Python interface to libev.")
14082 (license license:gpl3)))
14083
14084 (define-public python2-pyev
14085 (package-with-python2 python-pyev))
14086
14087 (define-public python-imagesize
14088 (package
14089 (name "python-imagesize")
14090 (version "1.2.0")
14091 (source
14092 (origin
14093 (method url-fetch)
14094 (uri (pypi-uri "imagesize" version))
14095 (sha256
14096 (base32
14097 "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
14098 (build-system python-build-system)
14099 (home-page "https://github.com/shibukawa/imagesize_py")
14100 (synopsis "Gets image size of files in various formats in Python")
14101 (description
14102 "This package allows determination of image size from
14103 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
14104 (license license:expat)))
14105
14106 (define-public python2-imagesize
14107 (package-with-python2 python-imagesize))
14108
14109 (define-public python-termstyle
14110 (package
14111 (name "python-termstyle")
14112 (version "0.1.11")
14113 (source
14114 (origin
14115 (method url-fetch)
14116 (uri (pypi-uri "termstyle" version))
14117 (sha256
14118 (base32
14119 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
14120 (build-system python-build-system)
14121 (arguments
14122 '(#:phases
14123 (modify-phases %standard-phases
14124 (replace 'check
14125 (lambda _
14126 (invoke "python" "test3.py"))))))
14127 (home-page "https://github.com/gfxmonk/termstyle")
14128 (synopsis "Console text coloring for Python")
14129 (description "This package provides console text coloring for Python.")
14130 (license license:bsd-3)))
14131
14132 (define-public python-argcomplete
14133 (package
14134 (name "python-argcomplete")
14135 (version "1.11.1")
14136 (source
14137 (origin
14138 (method url-fetch)
14139 (uri (pypi-uri "argcomplete" version))
14140 (sha256
14141 (base32
14142 "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
14143 (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
14144 (build-system python-build-system)
14145 (native-inputs
14146 `(("python-coverage" ,python-coverage)
14147 ("python-flake8" ,python-flake8)
14148 ("python-pexpect" ,python-pexpect)
14149 ("python-wheel" ,python-wheel)
14150 ("tcsh" ,tcsh)
14151 ("fish" ,fish)
14152 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
14153 (home-page "https://github.com/kislyuk/argcomplete")
14154 (synopsis "Shell tab completion for Python argparse")
14155 (description "argcomplete provides extensible command line tab completion
14156 of arguments and options for Python scripts using @code{argparse}. It's
14157 particularly useful for programs with many options or sub-parsers that can
14158 dynamically suggest completions; for example, when browsing resources over the
14159 network.")
14160 (license license:asl2.0)))
14161
14162 (define-public python2-argcomplete
14163 (package-with-python2 python-argcomplete))
14164
14165 (define-public python-csscompressor
14166 (package
14167 (name "python-csscompressor")
14168 (version "0.9.5")
14169 (source
14170 (origin
14171 (method url-fetch)
14172 (uri (pypi-uri "csscompressor" version))
14173 (sha256
14174 (base32
14175 "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
14176 (build-system python-build-system)
14177 (arguments
14178 '(#:phases
14179 (modify-phases %standard-phases
14180 (replace 'check
14181 (lambda _
14182 (invoke "py.test"))))))
14183 (native-inputs
14184 `(("python-pytest" ,python-pytest)))
14185 (home-page "https://github.com/sprymix/csscompressor")
14186 (synopsis "Python port of YUI CSS Compressor")
14187 (description
14188 "This package provides a python port of YUI CSS Compressor.")
14189 (license license:bsd-3)))
14190
14191 (define-public python-rcssmin
14192 (package
14193 (name "python-rcssmin")
14194 (version "1.0.6")
14195 (source
14196 (origin
14197 (method url-fetch)
14198 (uri (pypi-uri "rcssmin" version))
14199 (sha256
14200 (base32
14201 "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
14202 (build-system python-build-system)
14203 (arguments
14204 '(#:phases
14205 (modify-phases %standard-phases
14206 (replace 'check
14207 (lambda _
14208 (invoke "python" "run_tests.py" "tests"))))))
14209 (home-page "http://opensource.perlig.de/rcssmin/")
14210 (synopsis "CSS Minifier")
14211 (description "The minifier is based on the semantics of the YUI compressor,
14212 which itself is based on the rule list by Isaac Schlueter.")
14213 (license license:asl2.0)))
14214
14215 (define-public python-rjsmin
14216 (package
14217 (name "python-rjsmin")
14218 (version "1.1.0")
14219 (source
14220 (origin
14221 (method url-fetch)
14222 (uri (pypi-uri "rjsmin" version))
14223 (sha256
14224 (base32
14225 "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
14226 (modules '((guix build utils)))
14227 (snippet
14228 '(begin
14229 (for-each delete-file (find-files "bench" "\\.js$"))
14230 #t))))
14231 (build-system python-build-system)
14232 (arguments
14233 '(#:tests? #f ; Not all test files included.
14234 #:phases
14235 (modify-phases %standard-phases
14236 (replace 'check
14237 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
14238 (add-installed-pythonpath inputs outputs)
14239 (if tests?
14240 (invoke "py.test" "-vv" "tests")
14241 #t))))))
14242 (native-inputs
14243 `(("python-pytest" ,python-pytest)))
14244 (home-page "http://opensource.perlig.de/rjsmin/")
14245 (synopsis "Javascript Minifier")
14246 (description "@code{rJSmin} is a javascript minifier written in Python. The
14247 minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
14248 is a re-implementation aiming for speed, so it can be used at runtime (rather
14249 than during a preprocessing step).")
14250 (license license:asl2.0)))
14251
14252 (define-public python-xopen
14253 (package
14254 (name "python-xopen")
14255 (version "0.5.0")
14256 (source
14257 (origin
14258 (method url-fetch)
14259 (uri (pypi-uri "xopen" version))
14260 (sha256
14261 (base32
14262 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
14263 (build-system python-build-system)
14264 (propagated-inputs
14265 `(("python-setuptools-scm" ,python-setuptools-scm)))
14266 (home-page "https://github.com/marcelm/xopen/")
14267 (synopsis "Open compressed files transparently")
14268 (description "This module provides an @code{xopen} function that works like
14269 Python's built-in @code{open} function, but can also deal with compressed files.
14270 Supported compression formats are gzip, bzip2 and, xz, and are automatically
14271 recognized by their file extensions. The focus is on being as efficient as
14272 possible on all supported Python versions.")
14273 (license license:expat)))
14274
14275 (define-public python2-xopen
14276 (let ((base (package-with-python2
14277 (strip-python2-variant python-xopen))))
14278 (package
14279 (inherit base)
14280 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
14281 ,@(package-propagated-inputs base))))))
14282
14283 (define-public python-cheetah
14284 (package
14285 (name "python-cheetah")
14286 (version "3.2.4")
14287 (source
14288 (origin
14289 (method url-fetch)
14290 (uri (pypi-uri "Cheetah3" version))
14291 (sha256
14292 (base32
14293 "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
14294 (build-system python-build-system)
14295 (arguments
14296 `(#:modules ((guix build utils)
14297 (guix build python-build-system)
14298 (ice-9 ftw)
14299 (srfi srfi-1)
14300 (srfi srfi-26))
14301 #:phases (modify-phases %standard-phases
14302 (add-after 'unpack 'use-absolute-python
14303 (lambda _
14304 (substitute* "Cheetah/CheetahWrapper.py"
14305 (("#!/usr/bin/env python")
14306 (string-append "#!" (which "python"))))
14307 #t))
14308 (add-after 'unpack 'fix-tests
14309 (lambda _
14310 (substitute* "Cheetah/Tests/ImportHooks.py"
14311 (("os.path.dirname\\(__file__\\)")
14312 (string-append "'" (getcwd) "/Cheetah/Tests'")))
14313 #t))
14314 (replace 'check
14315 (lambda _
14316 (let ((cwd (getcwd)))
14317 (setenv "PYTHONPATH"
14318 (string-append
14319 cwd "/build/"
14320 (find (cut string-prefix? "lib" <>)
14321 (scandir (string-append cwd "/build")))
14322 ":" (getenv "PYTHONPATH")))
14323 (setenv "PATH"
14324 (string-append (getenv "PATH")
14325 ":" cwd "/bin"))
14326 (setenv "TMPDIR" "/tmp")
14327
14328 (substitute* "Cheetah/Tests/Test.py"
14329 (("unittest.TextTestRunner\\(\\)")
14330 "unittest.TextTestRunner(verbosity=2)"))
14331
14332 (invoke "python" "Cheetah/Tests/Test.py")))))))
14333 (propagated-inputs
14334 `(("python-markdown" ,python-markdown))) ;optional
14335 (home-page "https://cheetahtemplate.org/")
14336 (synopsis "Template engine")
14337 (description "Cheetah is a text-based template engine and Python code
14338 generator.
14339
14340 Cheetah can be used as a standalone templating utility or referenced as
14341 a library from other Python applications. It has many potential uses,
14342 but web developers looking for a viable alternative to ASP, JSP, PHP and
14343 PSP are expected to be its principle user group.
14344
14345 Features:
14346 @enumerate
14347 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
14348 text-based format.
14349 @item Cleanly separates content, graphic design, and program code.
14350 @item Blends the power and flexibility of Python with a simple template language
14351 that non-programmers can understand.
14352 @item Gives template writers full access to any Python data structure, module,
14353 function, object, or method in their templates.
14354 @item Makes code reuse easy by providing an object-orientated interface to
14355 templates that is accessible from Python code or other Cheetah templates.
14356 One template can subclass another and selectively reimplement sections of it.
14357 @item Provides a simple, yet powerful, caching mechanism that can dramatically
14358 improve the performance of a dynamic website.
14359 @item Compiles templates into optimized, yet readable, Python code.
14360 @end enumerate")
14361 (license (license:x11-style "file://LICENSE"))))
14362
14363 (define-public python2-cheetah
14364 (package-with-python2 python-cheetah))
14365
14366 (define-public python-dulwich
14367 (package
14368 (name "python-dulwich")
14369 (version "0.19.16")
14370 (source
14371 (origin
14372 (method url-fetch)
14373 (uri (list (string-append "https://www.dulwich.io/releases/"
14374 "dulwich-" version ".tar.gz")
14375 (pypi-uri "dulwich" version)))
14376 (sha256
14377 (base32
14378 "0l589jl0lxx59yq0p6vmgw0q0hmfh48iqwyy0x6g1dmz93262igp"))))
14379 (build-system python-build-system)
14380 (arguments
14381 `(#:phases
14382 (modify-phases %standard-phases
14383 (add-before 'check 'fix-tests
14384 (lambda* (#:key inputs #:allow-other-keys)
14385 ;; The tests use Popen with a custom environment which doesn't
14386 ;; include PATH.
14387 (substitute* "dulwich/tests/compat/utils.py"
14388 (("'git'") (string-append "'"
14389 (which "git")
14390 "'")))
14391 (substitute* '("dulwich/tests/test_repository.py"
14392 "dulwich/tests/test_hooks.py")
14393 (("#!/bin/sh") (string-append "#!" (which "sh"))))
14394 (setenv "TEST_RUNNER" "unittest")
14395 (setenv "PYTHONHASHSEED" "random")
14396 #t)))))
14397 (propagated-inputs
14398 `(("python-fastimport" ,python-fastimport)
14399 ("python-urllib3" ,python-urllib3)))
14400 (native-inputs
14401 `(("python-mock" ,python-mock)
14402 ("python-geventhttpclient" ,python-geventhttpclient)
14403 ("git" ,git)))
14404 (home-page "https://www.dulwich.io/")
14405 (synopsis "Git implementation in Python")
14406 (description "Dulwich is an implementation of the Git file formats and
14407 protocols written in pure Python.")
14408 ;; Can be used with either license.
14409 (license (list license:asl2.0 license:gpl2+))))
14410
14411 (define-public python2-dulwich
14412 (package-with-python2 python-dulwich))
14413
14414 (define-public python-pbkdf2
14415 (package
14416 (name "python-pbkdf2")
14417 (version "1.3")
14418 (source
14419 (origin
14420 (method url-fetch)
14421 (uri (pypi-uri "pbkdf2" version))
14422 (sha256
14423 (base32
14424 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
14425 (build-system python-build-system)
14426 (arguments
14427 '(#:phases
14428 (modify-phases %standard-phases
14429 (replace 'check
14430 (lambda _
14431 (setenv "PYTHONPATH"
14432 (string-append (getcwd) "/build/lib:"
14433 (getenv "PYTHONPATH")))
14434 (invoke "python" "test/test_pbkdf2.py"))))))
14435 (propagated-inputs
14436 `(("python-pycrypto" ,python-pycrypto))) ; optional
14437 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
14438 (synopsis "Password-based key derivation")
14439 (description "This module implements the password-based key derivation
14440 function, PBKDF2, specified in RSA PKCS#5 v2.0.
14441
14442 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
14443 is part of the RSA Public Key Cryptography Standards series. The provided
14444 implementation takes a password or a passphrase and a salt value (and
14445 optionally a iteration count, a digest module, and a MAC module) and provides
14446 a file-like object from which an arbitrarily-sized key can be read.")
14447 (license license:expat)))
14448
14449 (define-public python2-pbkdf2
14450 (package-with-python2 python-pbkdf2))
14451
14452 (define-public python-qrcode
14453 (package
14454 (name "python-qrcode")
14455 (version "6.1")
14456 (source
14457 (origin
14458 (method url-fetch)
14459 (uri (pypi-uri "qrcode" version))
14460 (sha256
14461 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
14462 (build-system python-build-system)
14463 (arguments
14464 ;; FIXME: Tests require packaging 'pymaging'.
14465 '(#:tests? #f))
14466 (propagated-inputs
14467 `(("python-lxml" ,python-lxml) ; for SVG output
14468 ("python-pillow" ,python-pillow) ; for PNG output
14469 ("python-six" ,python-six)))
14470 (home-page "https://github.com/lincolnloop/python-qrcode")
14471 (synopsis "QR Code image generator")
14472 (description "This package provides a pure Python QR Code generator
14473 module. It uses the Python Imaging Library (PIL) to allow for the generation
14474 of QR Codes.
14475
14476 In addition this package provides a command line tool to generate QR codes and
14477 either write these QR codes to a file or do the output as ascii art at the
14478 console.")
14479 (license license:bsd-3)))
14480
14481 (define-public python2-qrcode
14482 (package-with-python2 python-qrcode))
14483
14484 (define-public python-rst2ansi
14485 (package
14486 (name "python-rst2ansi")
14487 (version "0.1.5")
14488 (source
14489 (origin
14490 (method url-fetch)
14491 (uri (pypi-uri "rst2ansi" version))
14492 (sha256
14493 (base32
14494 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
14495 (build-system python-build-system)
14496 (propagated-inputs
14497 `(("python-docutils" ,python-docutils)))
14498 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
14499 (synopsis "Convert RST to ANSI-decorated console output")
14500 (description
14501 "Python module dedicated to rendering RST (reStructuredText) documents
14502 to ansi-escaped strings suitable for display in a terminal.")
14503 (license license:expat)))
14504
14505 (define-public python-ansi2html
14506 (package
14507 (name "python-ansi2html")
14508 (version "1.2.0")
14509 (source
14510 (origin
14511 (method url-fetch)
14512 (uri (pypi-uri "ansi2html" version))
14513 (sha256
14514 (base32
14515 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
14516 (build-system python-build-system)
14517 (native-inputs
14518 `(("python-mock" ,python-mock)
14519 ("python-nose" ,python-nose)))
14520 (propagated-inputs
14521 `(("python-six" ,python-six)))
14522 (home-page "https://github.com/ralphbean/ansi2html")
14523 (synopsis "Convert ANSI-decorated console output to HTML")
14524 (description
14525 "@command{ansi2html} is a Python library and command line utility for
14526 converting text with ANSI color codes to HTML or LaTeX.")
14527 (license license:gpl3+)))
14528
14529 (define-public python2-ansi2html
14530 (package-with-python2 python-ansi2html))
14531
14532 (define-public python-ddt
14533 (package
14534 (name "python-ddt")
14535 (version "1.1.3")
14536 (source
14537 (origin
14538 (method url-fetch)
14539 (uri (pypi-uri "ddt" version))
14540 (sha256
14541 (base32
14542 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
14543 (build-system python-build-system)
14544 (native-inputs
14545 `(("python-mock" ,python-mock)
14546 ("python-nose" ,python-nose)))
14547 (propagated-inputs
14548 `(("python-six" ,python-six)
14549 ("python-pyyaml" ,python-pyyaml)))
14550 (home-page "https://github.com/txels/ddt")
14551 (synopsis "Data-Driven Tests")
14552 (description
14553 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
14554 running it with different test data, and make it appear as multiple test
14555 cases.")
14556 (license license:expat)))
14557
14558 (define-public python2-ddt
14559 (package-with-python2 python-ddt))
14560
14561 (define-public python-pycountry
14562 (package
14563 (name "python-pycountry")
14564 (version "18.5.26")
14565 (source
14566 (origin
14567 (method url-fetch)
14568 (uri (pypi-uri "pycountry" version))
14569 (sha256
14570 (base32
14571 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
14572 (build-system python-build-system)
14573 (home-page "https://bitbucket.org/flyingcircus/pycountry")
14574 (synopsis "ISO databases for languages, countries, currencies, etc.")
14575 (description
14576 "@code{pycountry} provides the ISO databases for the standards:
14577 @enumerate
14578 @item 639-3 (Languages)
14579 @item 3166 (Countries)
14580 @item 3166-3 (Deleted Countries)
14581 @item 3166-2 (Subdivisions of countries)
14582 @item 4217 (Currencies)
14583 @item 15924 (Scripts)
14584 @end enumerate
14585 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
14586 through a Python API.")
14587 (license license:lgpl2.1+)))
14588
14589 (define-public python2-pycountry
14590 (package-with-python2 python-pycountry))
14591
14592 (define-public python-pycosat
14593 (package
14594 (name "python-pycosat")
14595 (version "0.6.3")
14596 (source
14597 (origin
14598 (method url-fetch)
14599 (uri (pypi-uri "pycosat" version ".zip"))
14600 (sha256
14601 (base32
14602 "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
14603 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
14604 (build-system python-build-system)
14605 (native-inputs
14606 `(("unzip" ,unzip)))
14607 (home-page "https://github.com/ContinuumIO/pycosat")
14608 (synopsis "Bindings to picosat (a SAT solver)")
14609 (description
14610 "This package provides efficient Python bindings to @code{picosat} on
14611 the C level. When importing pycosat, the @code{picosat} solver becomes part
14612 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
14613 Problem} (SAT) solver.")
14614 (license license:expat)))
14615
14616 (define-public python2-pycosat
14617 (package-with-python2 python-pycosat))
14618
14619 (define-public python2-ruamel.ordereddict
14620 (package
14621 (name "python2-ruamel.ordereddict")
14622 (version "0.4.9")
14623 (source
14624 (origin
14625 (method url-fetch)
14626 (uri (pypi-uri "ruamel.ordereddict" version))
14627 (sha256
14628 (base32
14629 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
14630 (build-system python-build-system)
14631 (arguments
14632 `(#:python ,python-2
14633 #:phases
14634 (modify-phases %standard-phases
14635 (delete 'check)
14636 (add-after 'install 'check
14637 (lambda* (#:key inputs outputs #:allow-other-keys)
14638 (add-installed-pythonpath inputs outputs)
14639 (invoke "python" "test/testordereddict.py"))))))
14640 (home-page "https://bitbucket.org/ruamel/ordereddict")
14641 (synopsis "Version of dict that keeps keys in insertion order")
14642 (description
14643 "This is an implementation of an ordered dictionary with @dfn{Key
14644 Insertion Order} (KIO: updates of values do not affect the position of the
14645 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
14646 removed and put at the back). The standard library module @code{OrderedDict},
14647 implemented later, implements a subset of @code{ordereddict} functionality.
14648 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
14649 Order} (KSO, no sorting function can be specified, but a transform can be
14650 specified to apply on the key before comparison (e.g. @code{string.lower})).")
14651 (license license:expat)))
14652
14653 (define-public python-pypeg2
14654 (package
14655 (name "python-pypeg2")
14656 (version "2.15.2")
14657 (source
14658 (origin
14659 (method url-fetch)
14660 (uri (pypi-uri "pyPEG2" version))
14661 (sha256
14662 (base32
14663 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
14664 (build-system python-build-system)
14665 (propagated-inputs `(("python-lxml" ,python-lxml)))
14666 (arguments
14667 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
14668 '(#:tests? #f))
14669 (home-page "https://fdik.org/pyPEG/")
14670 (synopsis "Parsering Expression Grammars in Python")
14671 (description "PyPEG is an intrinsic parser interpreter framework for
14672 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
14673 parse many formal languages.")
14674 (license license:gpl2)))
14675
14676 (define-public python-incremental
14677 (package
14678 (name "python-incremental")
14679 (version "17.5.0")
14680 (source
14681 (origin
14682 (method url-fetch)
14683 (uri (pypi-uri "incremental" version))
14684 (sha256
14685 (base32
14686 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
14687 (build-system python-build-system)
14688 (home-page "https://github.com/hawkowl/incremental")
14689 (synopsis "Library for versioning Python projects")
14690 (description "Incremental is a small library that versions your Python
14691 projects.")
14692 (license license:expat)))
14693
14694 (define-public python2-incremental
14695 (package-with-python2 python-incremental))
14696
14697 (define-public python-invoke
14698 (package
14699 (name "python-invoke")
14700 (home-page "https://www.pyinvoke.org/")
14701 (version "1.3.0")
14702 (source (origin
14703 (method url-fetch)
14704 (uri (pypi-uri "invoke" version))
14705 (sha256
14706 (base32
14707 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
14708 (build-system python-build-system)
14709 (arguments
14710 ;; XXX: Requires many dependencies that are not yet in Guix.
14711 `(#:tests? #f))
14712 (synopsis "Pythonic task execution")
14713 (description
14714 "Invoke is a Python task execution tool and library, drawing inspiration
14715 from various sources to arrive at a powerful and clean feature set. It is
14716 evolved from the Fabric project, but focuses on local and abstract concerns
14717 instead of servers and network commands.")
14718 (license license:bsd-3)))
14719
14720 (define-public python2-invoke
14721 (package-with-python2 python-invoke))
14722
14723 (define-public python-automat
14724 (package
14725 (name "python-automat")
14726 (version "20.2.0")
14727 (source (origin
14728 (method url-fetch)
14729 (uri (pypi-uri "Automat" version))
14730 (sha256
14731 (base32
14732 "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
14733 (build-system python-build-system)
14734 ;; We disable the tests because they require python-twisted, while
14735 ;; python-twisted depends on python-automat. Twisted is optional, but the
14736 ;; tests fail if it is not available. Also see
14737 ;; <https://github.com/glyph/automat/issues/71>.
14738 (arguments '(#:tests? #f))
14739 (native-inputs
14740 `(("python-m2r" ,python-m2r)
14741 ("python-setuptools-scm" ,python-setuptools-scm)
14742 ("python-graphviz" ,python-graphviz)))
14743 (propagated-inputs
14744 `(("python-six" ,python-six)
14745 ("python-attrs" ,python-attrs)))
14746 (home-page "https://github.com/glyph/Automat")
14747 (synopsis "Self-service finite-state machines")
14748 (description "Automat is a library for concise, idiomatic Python
14749 expression of finite-state automata (particularly deterministic finite-state
14750 transducers).")
14751 (license license:expat)))
14752
14753 (define-public python2-automat
14754 (package-with-python2 python-automat))
14755
14756 (define-public python-m2r
14757 (package
14758 (name "python-m2r")
14759 (version "0.2.1")
14760 (source (origin
14761 (method url-fetch)
14762 (uri (pypi-uri "m2r" version))
14763 (sha256
14764 (base32
14765 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
14766 (build-system python-build-system)
14767 (propagated-inputs
14768 `(("python-docutils" ,python-docutils)
14769 ("python-mistune" ,python-mistune)))
14770 (native-inputs
14771 `(("python-pygments" ,python-pygments)
14772 ("python-mock" ,python-mock)))
14773 (home-page "https://github.com/miyakogi/m2r")
14774 (synopsis "Markdown to reStructuredText converter")
14775 (description "M2R converts a markdown file including reST markups to valid
14776 reST format.")
14777 (license license:expat)))
14778
14779 (define-public python2-m2r
14780 (package-with-python2 python-m2r))
14781
14782 (define-public python-constantly
14783 (package
14784 (name "python-constantly")
14785 (version "15.1.0")
14786 (source (origin
14787 (method url-fetch)
14788 (uri (pypi-uri "constantly" version))
14789 (sha256
14790 (base32
14791 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
14792 (build-system python-build-system)
14793 (home-page "https://github.com/twisted/constantly")
14794 (synopsis "Symbolic constants in Python")
14795 (description "Constantly is a Python library that provides symbolic
14796 constant support. It includes collections and constants with text, numeric,
14797 and bit flag values.")
14798 (license license:expat)))
14799
14800 (define-public python2-constantly
14801 (package-with-python2 python-constantly))
14802
14803 (define-public python-attrs
14804 (package
14805 (name "python-attrs")
14806 (version "19.3.0")
14807 (source (origin
14808 (method url-fetch)
14809 (uri (pypi-uri "attrs" version))
14810 (sha256
14811 (base32
14812 "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp"))))
14813 (build-system python-build-system)
14814 (arguments
14815 `(#:modules ((guix build utils)
14816 (guix build python-build-system)
14817 (ice-9 ftw)
14818 (srfi srfi-1)
14819 (srfi srfi-26))
14820 #:phases (modify-phases %standard-phases
14821 (replace 'check
14822 (lambda _
14823 (let ((cwd (getcwd)))
14824 (setenv "PYTHONPATH"
14825 (string-append
14826 cwd "/build/"
14827 (find (cut string-prefix? "lib" <>)
14828 (scandir (string-append cwd "/build")))
14829 ":"
14830 (getenv "PYTHONPATH")))
14831 (invoke "python" "-m" "pytest")))))))
14832 (native-inputs
14833 `(("python-coverage" ,python-coverage)
14834 ("python-hypothesis" ,python-hypothesis)
14835 ("python-pympler" ,python-pympler)
14836 ("python-pytest" ,python-pytest)
14837 ("python-six" ,python-six)
14838 ("python-sphinx" ,python-sphinx)
14839 ("python-zope-interface" ,python-zope-interface)))
14840 (home-page "https://github.com/python-attrs/attrs/")
14841 (synopsis "Attributes without boilerplate")
14842 (description "@code{attrs} is a Python package with class decorators that
14843 ease the chores of implementing the most common attribute-related object
14844 protocols.")
14845 (license license:expat)))
14846
14847 (define-public python2-attrs
14848 (package-with-python2 python-attrs))
14849
14850 (define-public python-attrs-bootstrap
14851 (package
14852 (inherit python-attrs)
14853 (name "python-attrs-bootstrap")
14854 (native-inputs `())
14855 (arguments `(#:tests? #f))))
14856
14857 (define-public python2-attrs-bootstrap
14858 (package-with-python2 python-attrs-bootstrap))
14859
14860 (define-public python2-cliapp
14861 (package
14862 (name "python2-cliapp")
14863 (version "1.20180812.1")
14864 (source
14865 (origin
14866 (method url-fetch)
14867 (uri (string-append
14868 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
14869 version ".tar.gz"))
14870 (sha256
14871 (base32
14872 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
14873 (build-system python-build-system)
14874 (arguments
14875 `(#:python ,python-2
14876 #:phases
14877 (modify-phases %standard-phases
14878 ;; check phase needs to be run before the build phase. If not,
14879 ;; coverage-test-runner looks for tests for the built source files,
14880 ;; and fails.
14881 (delete 'check)
14882 (add-before 'build 'check
14883 (lambda _
14884 ;; Disable python3 tests
14885 (substitute* "check"
14886 (("python3") "# python3"))
14887 (invoke "./check"))))))
14888 (native-inputs
14889 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14890 ("python2-pep8" ,python2-pep8)))
14891 (propagated-inputs
14892 `(("python2-pyaml" ,python2-pyaml)))
14893 (home-page "https://liw.fi/cliapp/")
14894 (synopsis "Python framework for command line programs")
14895 (description "@code{python2-cliapp} is a python framework for
14896 command line programs. It contains the typical stuff such programs
14897 need to do, such as parsing the command line for options, and
14898 iterating over input files.")
14899 (license license:gpl2+)))
14900
14901 (define-public python2-ttystatus
14902 (package
14903 (name "python2-ttystatus")
14904 (version "0.38")
14905 (source
14906 (origin
14907 (method git-fetch)
14908 (uri (git-reference
14909 (url "http://git.liw.fi/ttystatus")
14910 ;; There are no tags after ttystatus-0.36.
14911 (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
14912 (sha256
14913 (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
14914 (file-name (git-file-name name version))))
14915 (build-system python-build-system)
14916 (native-inputs
14917 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
14918 ("python2-pep8" ,python2-pep8)))
14919 (arguments
14920 `(#:python ,python-2
14921 #:phases
14922 (modify-phases %standard-phases
14923 ;; check phase needs to be run before the build phase. If not,
14924 ;; coverage-test-runner looks for tests for the built source files,
14925 ;; and fails.
14926 (delete 'check)
14927 (add-before 'build 'check
14928 (lambda _ (invoke "make" "check"))))))
14929 (home-page "https://liw.fi/ttystatus/")
14930 (synopsis "Python library for showing progress reporting and
14931 status updates on terminals")
14932 (description "@code{python2-ttystatus} is a python library for
14933 showing progress reporting and status updates on terminals, for
14934 command line programs. Output is automatically adapted to the width
14935 of the terminal: truncated if it does not fit, and resized if the
14936 terminal size changes.")
14937 (license license:gpl3+)))
14938
14939 (define-public python2-tracing
14940 (package
14941 (name "python2-tracing")
14942 (version "0.10")
14943 (source
14944 (origin
14945 (method url-fetch)
14946 (uri (string-append
14947 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
14948 version ".tar.gz"))
14949 (sha256
14950 (base32
14951 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
14952 (build-system python-build-system)
14953 (arguments
14954 `(#:python ,python-2))
14955 (home-page "https://liw.fi/tracing/")
14956 (synopsis "Python debug logging helper")
14957 (description "@code{python2-tracing} is a python library for
14958 logging debug messages. It provides a way to turn debugging messages
14959 on and off, based on the filename they occur in. It is much faster
14960 than using @code{logging.Filter} to accomplish the same thing, which
14961 matters when code is run in production mode. The actual logging still
14962 happens using the @code{logging} library.")
14963 (license license:gpl3+)))
14964
14965 (define-public python2-larch
14966 (package
14967 (name "python2-larch")
14968 (version "1.20151025")
14969 (source
14970 (origin
14971 (method url-fetch)
14972 (uri (string-append
14973 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
14974 version ".tar.gz"))
14975 (patches (search-patches
14976 "python2-larch-coverage-4.0a6-compatibility.patch"))
14977 (sha256
14978 (base32
14979 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
14980 (build-system python-build-system)
14981 (arguments
14982 `(#:python ,python-2
14983 #:phases
14984 (modify-phases %standard-phases
14985 ;; check phase needs to be run before the build phase. If not,
14986 ;; coverage-test-runner looks for tests for the built source files,
14987 ;; and fails.
14988 (delete 'check)
14989 (add-before 'build 'check
14990 (lambda _ (invoke "make" "check"))))))
14991 (native-inputs
14992 `(("cmdtest" ,cmdtest)
14993 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
14994 (propagated-inputs
14995 `(("python2-tracing" ,python2-tracing)))
14996 (home-page "https://liw.fi/larch/")
14997 (synopsis "Python copy-on-write B-tree library")
14998 (description "@code{python2-larch} is an implementation of
14999 particular kind of B-tree, based on research by Ohad Rodeh. See
15000 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
15001 on the data structure.
15002
15003 The distinctive feature of this B-tree is that a node is never
15004 (conceptually) modified. Instead, all updates are done by
15005 copy-on-write. This makes it easy to clone a tree, and modify only the
15006 clone, while other processes access the original tree.")
15007 (license license:gpl3+)))
15008
15009 (define-public python-astroid
15010 (package
15011 (name "python-astroid")
15012 (version "2.4.2")
15013 (source
15014 (origin
15015 (method url-fetch)
15016 (uri (pypi-uri "astroid" version))
15017 (sha256
15018 (base32 "00xp5gqxidxvgg1bwd91myqzdf2fpb9cjwbdl3p7gwqvlk17hh1g"))
15019 (modules '((guix build utils)))
15020 (snippet
15021 '(begin
15022 ;; Check to see if the version pinning has been removed.
15023 (substitute* "astroid/__pkginfo__.py"
15024 (("==1\\.4\\.\\*") ">=1.4.0"))
15025 #t))))
15026 (build-system python-build-system)
15027 (propagated-inputs
15028 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
15029 ("python-six" ,python-six)
15030 ("python-wrapt" ,python-wrapt)))
15031 (native-inputs
15032 `(("python-dateutil" ,python-dateutil)
15033 ("python-pytest" ,python-pytest)
15034 ("python-pytest-runner" ,python-pytest-runner)))
15035 (home-page "https://github.com/PyCQA/astroid")
15036 (synopsis "Common base representation of python source code for pylint and
15037 other projects")
15038 (description "@code{python-astroid} provides a common base representation
15039 of python source code for projects such as pychecker, pyreverse, pylint, etc.
15040
15041 It provides a compatible representation which comes from the _ast module. It
15042 rebuilds the tree generated by the builtin _ast module by recursively walking
15043 down the AST and building an extended ast. The new node classes have
15044 additional methods and attributes for different usages. They include some
15045 support for static inference and local name scopes. Furthermore, astroid
15046 builds partial trees by inspecting living objects.")
15047 (license license:lgpl2.1+)
15048 (properties `((python2-variant . ,(delay python2-astroid))))))
15049
15050 (define-public python2-astroid
15051 (let ((base (package-with-python2
15052 (strip-python2-variant python-astroid))))
15053 (package (inherit base)
15054 ;; Version 2.x removes python2 support.
15055 (version "1.6.5")
15056 (source
15057 (origin
15058 (method url-fetch)
15059 (uri (pypi-uri "astroid" version))
15060 (sha256
15061 (base32
15062 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
15063 (arguments
15064 (substitute-keyword-arguments (package-arguments base)
15065 ((#:phases phases)
15066 `(modify-phases ,phases
15067 (add-after 'unpack 'remove-spurious-test
15068 (lambda _
15069 ;; https://github.com/PyCQA/astroid/issues/276
15070 (delete-file "astroid/tests/unittest_brain.py")
15071 #t))
15072 (replace 'check
15073 (lambda _
15074 (invoke"python" "-m" "unittest" "discover"
15075 "-p" "unittest*.py")))))))
15076 (native-inputs `())
15077 (propagated-inputs
15078 `(("python2-backports-functools-lru-cache"
15079 ,python2-backports-functools-lru-cache)
15080 ("python2-enum34" ,python2-enum34)
15081 ("python2-singledispatch" ,python2-singledispatch)
15082 ,@(alist-delete "python-typed-ast"
15083 (package-propagated-inputs base)))))))
15084
15085 (define-public python-isbnlib
15086 (package
15087 (name "python-isbnlib")
15088 (version "3.10.3")
15089 (source
15090 (origin
15091 (method url-fetch)
15092 (uri (pypi-uri "isbnlib" version))
15093 (sha256
15094 (base32
15095 "07qhykv0x60d5rsx5pj6s4q15ri4znczscll3xmpf6gyclac1592"))))
15096 (build-system python-build-system)
15097 (arguments '(#:tests? #f)) ; No test
15098 (home-page "https://github.com/xlcnd/isbnlib")
15099 (synopsis "Python library to work with ISBN strings")
15100 (description "@code{python-isbnlib} is a (pure) python library that provides
15101 several useful methods and functions to validate, clean, transform, hyphenate and
15102 get metadata for ISBN strings. Its origin was as the core of isbntools. This short
15103 version, is suitable to be include as a dependency in other projects.")
15104 (license license:lgpl3+)))
15105
15106 (define-public python-isort
15107 (package
15108 (name "python-isort")
15109 (version "4.3.4")
15110 (source
15111 (origin
15112 (method git-fetch)
15113 (uri (git-reference
15114 ;; Tests pass only from the Github sources
15115 (url "https://github.com/timothycrosley/isort")
15116 (commit version)))
15117 (file-name (git-file-name name version))
15118 (sha256
15119 (base32
15120 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
15121 (build-system python-build-system)
15122 (native-inputs
15123 `(("python-mock" ,python-mock)
15124 ("python-pytest" ,python-pytest)))
15125 (home-page "https://github.com/timothycrosley/isort")
15126 (synopsis "Python utility/library to sort python imports")
15127 (description "@code{python-isort} is a python utility/library to sort
15128 imports alphabetically, and automatically separated into sections. It
15129 provides a command line utility, a python library and plugins for various
15130 editors.")
15131 (license license:expat)
15132 (properties `((python2-variant . ,(delay python2-isort))))))
15133
15134 (define-public python2-isort
15135 (let ((base (package-with-python2
15136 (strip-python2-variant python-isort))))
15137 (package (inherit base)
15138 (native-inputs
15139 `(("python2-futures" ,python2-futures)
15140 ,@(package-native-inputs base))))))
15141
15142 (define-public python2-backports-functools-lru-cache
15143 (package
15144 (name "python2-backports-functools-lru-cache")
15145 (version "1.6.1")
15146 (source
15147 (origin
15148 (method url-fetch)
15149 ;; only the pypi tarballs contain the necessary metadata
15150 (uri (pypi-uri "backports.functools_lru_cache" version))
15151 (sha256
15152 (base32
15153 "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
15154 (build-system python-build-system)
15155 (native-inputs
15156 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
15157 (arguments
15158 `(#:python ,python-2))
15159 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
15160 (synopsis "Backport of functools.lru_cache from Python 3.3")
15161 (description "@code{python2-backports-functools-lru-cache} is a backport
15162 of @code{functools.lru_cache} from python 3.3.")
15163 (license license:expat)))
15164
15165 (define-public python-configparser
15166 (package
15167 (name "python-configparser")
15168 (version "4.0.2")
15169 (source
15170 (origin
15171 (method url-fetch)
15172 (uri (pypi-uri "configparser" version))
15173 (sha256
15174 (base32
15175 "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
15176 (native-inputs
15177 `(("python-setuptools_scm" ,python-setuptools-scm)))
15178 (build-system python-build-system)
15179 (home-page "https://github.com/jaraco/configparser/")
15180 (synopsis "Backport of configparser from python 3.5")
15181 (description "@code{python-configparser} is a backport of
15182 @code{configparser} from Python 3.5 so that it can be used directly
15183 in other versions.")
15184 (license license:expat)))
15185
15186 (define-public python2-configparser
15187 (package-with-python2 python-configparser))
15188
15189 (define-public python-mamba
15190 (package
15191 (name "python-mamba")
15192 (version "0.11.1")
15193 (source (origin
15194 (method url-fetch)
15195 (uri (pypi-uri "mamba" version))
15196 (sha256
15197 (base32
15198 "1jxy3bva94ac02a0wjsms79rp5104zmalxh8rhqqg6mw95cp6xpr"))))
15199 (build-system python-build-system)
15200 (arguments `(#:tests? #f)) ; No test
15201 (propagated-inputs
15202 `(("python-clint" ,python-clint)
15203 ("python-coverage" ,python-coverage)))
15204 (home-page "https://nestorsalceda.com/mamba/")
15205 (synopsis "Test runner for Python")
15206 (description
15207 "Mamba is a Behaviour-Driven Development tool for Python developers.
15208 Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
15209 (license license:expat)))
15210
15211 (define-public python-mando
15212 (package
15213 (name "python-mando")
15214 (version "0.6.4")
15215 (source (origin
15216 (method url-fetch)
15217 (uri (pypi-uri "mando" version))
15218 (sha256
15219 (base32
15220 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
15221 (build-system python-build-system)
15222 (propagated-inputs
15223 `(("python-rst2ansi" ,python-rst2ansi)
15224 ("python-six" ,python-six)))
15225 (native-inputs
15226 `(("python-pytest" ,python-pytest)))
15227 (home-page "https://mando.readthedocs.org/")
15228 (synopsis
15229 "Wrapper around argparse, allowing creation of complete CLI applications")
15230 (description
15231 "This package is a wrapper around argparse, allowing you to write complete CLI
15232 applications in seconds while maintaining all the flexibility.")
15233 (license license:expat)))
15234
15235 (define-public python2-mando
15236 (package-with-python2 python-mando))
15237
15238 (define-public python2-argparse
15239 (package
15240 (name "python2-argparse")
15241 (version "1.4.0")
15242 (source
15243 (origin
15244 (method url-fetch)
15245 (uri (pypi-uri "argparse" version))
15246 (sha256
15247 (base32
15248 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
15249 (build-system python-build-system)
15250 (arguments
15251 `(#:python ,python-2))
15252 (home-page "https://github.com/ThomasWaldmann/argparse/")
15253 (synopsis "Python command-line parsing library")
15254 (description
15255 "This package is mostly for people who want to have @code{argparse} on
15256 older Pythons because it was not part of the standard library back then.")
15257 (license license:psfl)))
15258
15259 (define-public python-fudge
15260 (package
15261 (name "python-fudge")
15262 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
15263 ;; package, which is currently the only use of this package.
15264 (version "0.9.6")
15265 (source
15266 (origin
15267 (method url-fetch)
15268 (uri (pypi-uri "fudge" version))
15269 (sha256
15270 (base32
15271 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
15272 (build-system python-build-system)
15273 (arguments
15274 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
15275 (home-page "https://github.com/fudge-py/fudge")
15276 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
15277 (description
15278 "Fudge is a Python module for using fake objects (mocks and stubs) to
15279 test real ones.
15280
15281 In readable Python code, you declare the methods available on your fake object
15282 and how they should be called. Then you inject that into your application and
15283 start testing. This declarative approach means you don’t have to record and
15284 playback actions and you don’t have to inspect your fakes after running code.
15285 If the fake object was used incorrectly then you’ll see an informative
15286 exception message with a traceback that points to the culprit.")
15287 (license license:expat)))
15288
15289 (define-public python2-fudge
15290 (package-with-python2 python-fudge))
15291
15292 (define-public python-mwclient
15293 (package
15294 (name "python-mwclient")
15295 (version "0.10.1")
15296 (source
15297 (origin
15298 (method git-fetch)
15299 ;; The PyPI version wouldn't contain tests.
15300 (uri (git-reference
15301 (url "https://github.com/mwclient/mwclient")
15302 (commit (string-append "v" version))))
15303 (file-name (git-file-name name version))
15304 (sha256
15305 (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
15306 (build-system python-build-system)
15307 (propagated-inputs
15308 `(("python-requests-oauthlib" ,python-requests-oauthlib)
15309 ("python-six" ,python-six)))
15310 (native-inputs
15311 `(("python-mock" ,python-mock)
15312 ("python-pytest" ,python-pytest)
15313 ("python-pytest-cov" ,python-pytest-cov)
15314 ("python-pytest-runner" ,python-pytest-runner)
15315 ("python-responses" ,python-responses)))
15316 (home-page "https://github.com/btongminh/mwclient")
15317 (synopsis "MediaWiki API client")
15318 (description "This package provides a MediaWiki API client.")
15319 (license license:expat)))
15320
15321 (define-public python2-mwclient
15322 (package-with-python2 python-mwclient))
15323
15324 (define-public python-utils
15325 (package
15326 (name "python-utils")
15327 (version "2.4.0")
15328 (source (origin
15329 (method url-fetch)
15330 (uri (pypi-uri "python-utils" version))
15331 (sha256
15332 (base32
15333 "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
15334 (build-system python-build-system)
15335 (arguments
15336 `(#:phases
15337 (modify-phases %standard-phases
15338 (replace 'check
15339 (lambda* (#:key inputs outputs #:allow-other-keys)
15340 (add-installed-pythonpath inputs outputs)
15341 (delete-file "pytest.ini")
15342 (invoke "pytest" "-vv"))))))
15343 (native-inputs
15344 `(("pytest-runner" ,python-pytest-runner)
15345 ("pytest" ,python-pytest)
15346 ("six" ,python-six)))
15347 (home-page "https://github.com/WoLpH/python-utils")
15348 (synopsis "Convenient utilities not included with the standard Python install")
15349 (description
15350 "Python Utils is a collection of small Python functions and classes which
15351 make common patterns shorter and easier.")
15352 (license license:bsd-2)))
15353
15354 (define-public python2-utils
15355 (package-with-python2 python-utils))
15356
15357 (define-public python-diff-match-patch
15358 (package
15359 (name "python-diff-match-patch")
15360 (version "20121119")
15361 (source
15362 (origin
15363 (method url-fetch)
15364 (uri (pypi-uri "diff-match-patch" version))
15365 (sha256
15366 (base32
15367 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
15368 (build-system python-build-system)
15369 (home-page "https://code.google.com/p/google-diff-match-patch")
15370 (synopsis "Synchronize plain text")
15371 (description "Diff Match and Patch libraries offer robust algorithms to
15372 perform the operations required for synchronizing plain text.")
15373 (license license:asl2.0)))
15374
15375 (define-public python2-diff-match-patch
15376 (package-with-python2 python-diff-match-patch))
15377
15378 (define-public python-dirsync
15379 (package
15380 (name "python-dirsync")
15381 (version "2.2.3")
15382 (source
15383 (origin
15384 (method url-fetch)
15385 (uri (pypi-uri "dirsync" version))
15386 (sha256
15387 (base32
15388 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
15389 (build-system python-build-system)
15390 (propagated-inputs
15391 `(("six" ,python-six)))
15392 (home-page "https://bitbucket.org/tkhyn/dirsync")
15393 (synopsis "Advanced directory tree synchronisation tool")
15394 (description "Advanced directory tree synchronisation tool.")
15395 (license license:expat)))
15396
15397 (define-public python2-dirsync
15398 (package-with-python2 python-dirsync))
15399
15400 (define-public python-levenshtein
15401 (package
15402 (name "python-levenshtein")
15403 (version "0.12.0")
15404 (source
15405 (origin
15406 (method url-fetch)
15407 (uri (pypi-uri "python-Levenshtein" version))
15408 (sha256
15409 (base32
15410 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
15411 (build-system python-build-system)
15412 (home-page "https://github.com/ztane/python-Levenshtein")
15413 (synopsis "Fast computation of Levenshtein distance and string similarity")
15414 (description
15415 "The Levenshtein Python C extension module contains functions for fast computation of
15416 @enumerate
15417 @item Levenshtein (edit) distance, and edit operations
15418 @item string similarity
15419 @item approximate median strings, and generally string averaging
15420 @item string sequence and set similarity
15421 @end enumerate
15422 It supports both normal and Unicode strings.")
15423 (license license:gpl2+)))
15424
15425 (define-public python2-levenshtein
15426 (package-with-python2 python-levenshtein))
15427
15428 (define-public python-scandir
15429 (package
15430 (name "python-scandir")
15431 (version "1.10.0")
15432 (source
15433 (origin
15434 (method url-fetch)
15435 (uri (pypi-uri "scandir" version))
15436 (sha256
15437 (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
15438 (build-system python-build-system)
15439 (arguments
15440 `(#:phases (modify-phases %standard-phases
15441 (replace 'check
15442 (lambda _
15443 (invoke "python" "test/run_tests.py"))))))
15444 (home-page "https://github.com/benhoyt/scandir")
15445 (synopsis "Directory iteration function")
15446 (description
15447 "Directory iteration function like os.listdir(), except that instead of
15448 returning a list of bare filenames, it yields DirEntry objects that include
15449 file type and stat information along with the name. Using scandir() increases
15450 the speed of os.walk() by 2-20 times (depending on the platform and file
15451 system) by avoiding unnecessary calls to os.stat() in most cases.
15452
15453 This package is part of the Python standard library since version 3.5.")
15454 (license license:bsd-3)))
15455
15456 (define-public python2-scandir
15457 (package-with-python2 python-scandir))
15458
15459 (define-public python2-stemming
15460 (package
15461 (name "python2-stemming")
15462 (version "1.0.1")
15463 (source
15464 (origin
15465 (method url-fetch)
15466 (uri (pypi-uri "stemming" version))
15467 (sha256
15468 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
15469 (build-system python-build-system)
15470 (arguments
15471 `(#:python ,python-2))
15472 (home-page "https://bitbucket.org/mchaput/stemming/overview")
15473 (synopsis "Python implementations of various stemming algorithms")
15474 (description
15475 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
15476 stemming algorithms for English. These implementations are straightforward and
15477 efficient, unlike some Python versions of the same algorithms available on the
15478 Web. This package is an extraction of the stemming code included in the Whoosh
15479 search engine.")
15480 (license license:public-domain)))
15481
15482 (define-public python-factory-boy
15483 (package
15484 (name "python-factory-boy")
15485 (version "2.8.1")
15486 (source
15487 (origin
15488 (method url-fetch)
15489 (uri (pypi-uri "factory_boy" version))
15490 (sha256
15491 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
15492 (build-system python-build-system)
15493 (arguments
15494 ;; Tests are not included in the tarball.
15495 `(#:tests? #f))
15496 (propagated-inputs
15497 `(("faker" ,python-faker)))
15498 (home-page "https://github.com/benhoyt/scandir")
15499 (synopsis "Versatile test fixtures replacement")
15500 (description
15501 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
15502
15503 As a fixtures replacement tool, it aims to replace static, hard to maintain
15504 fixtures with easy-to-use factories for complex object.
15505
15506 Instead of building an exhaustive test setup with every possible combination
15507 of corner cases, factory_boy allows you to use objects customized for the
15508 current test, while only declaring the test-specific fields")
15509 (license license:expat)))
15510
15511 (define-public python2-factory-boy
15512 (package-with-python2 python-factory-boy))
15513
15514 (define-public python-translate-toolkit
15515 (package
15516 (name "python-translate-toolkit")
15517 (version "2.1.0")
15518 (source
15519 (origin
15520 (method url-fetch)
15521 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
15522 (sha256
15523 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
15524 (build-system python-build-system)
15525 (native-inputs
15526 `(("python-pytest" ,python-pytest)
15527 ("python-sphinx" ,python-sphinx)))
15528 (propagated-inputs
15529 `(("python-babel" ,python-babel)
15530 ("python-beautifulsoup4" ,python-beautifulsoup4)
15531 ("python-chardet" ,python-chardet)
15532 ("python-diff-match-patch" ,python-diff-match-patch)
15533 ("python-levenshtein" ,python-levenshtein)
15534 ("python-lxml" ,python-lxml)
15535 ("python-six" ,python-six)
15536 ("python-vobject" ,python-vobject)
15537 ("python-pyyaml" ,python-pyyaml)))
15538 (arguments
15539 ;; TODO: tests are not run, because they end with
15540 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
15541 ;; 'parse_funcs'
15542 ;; during test setup.
15543 `(#:tests? #f))
15544 (home-page "https://toolkit.translatehouse.org")
15545 (synopsis "Tools and API for translation and localization engineering")
15546 (description
15547 "Tools and API for translation and localization engineering. It contains
15548 several utilities, as well as an API for building localization tools.")
15549 (license license:gpl2+)))
15550
15551 (define-public python2-translate-toolkit
15552 (package-with-python2 python-translate-toolkit))
15553
15554 (define-public python-packaging
15555 (package
15556 (name "python-packaging")
15557 (version "20.0")
15558 (source
15559 (origin
15560 (method url-fetch)
15561 (uri (pypi-uri "packaging" version))
15562 ;; XXX: The URL in the patch file is wrong, it should be
15563 ;; <https://github.com/pypa/packaging/pull/256>.
15564 (patches (search-patches "python-packaging-test-arch.patch"))
15565 (sha256
15566 (base32
15567 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
15568 (build-system python-build-system)
15569 (arguments
15570 `(#:phases (modify-phases %standard-phases
15571 (replace 'check
15572 (lambda* (#:key tests? #:allow-other-keys)
15573 (if tests?
15574 (invoke "py.test" "-vv")
15575 (format #t "test suite not run~%"))
15576 #t)))))
15577 (native-inputs
15578 `(("python-pretend" ,python-pretend)
15579 ("python-pytest" ,python-pytest)))
15580 (propagated-inputs
15581 `(("python-pyparsing" ,python-pyparsing)
15582 ("python-six" ,python-six)))
15583 (home-page "https://github.com/pypa/packaging")
15584 (synopsis "Core utilities for Python packages")
15585 (description "Packaging is a Python module for dealing with Python packages.
15586 It offers an interface for working with package versions, names, and dependency
15587 information.")
15588 ;; From 'LICENSE': This software is made available under the terms of
15589 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
15590 ;; Contributions to this software is made under the terms of *both* these
15591 ;; licenses.
15592 (license (list license:asl2.0 license:bsd-2))))
15593
15594 (define-public python2-packaging
15595 (package-with-python2 python-packaging))
15596
15597 ;; Variants with minimal dependencies, for bootstrapping Pytest.
15598 (define-public python-packaging-bootstrap
15599 (hidden-package
15600 (package/inherit
15601 python-packaging
15602 (name "python-packaging-bootstrap")
15603 (native-inputs '())
15604 (propagated-inputs
15605 `(("python-pyparsing" ,python-pyparsing)))
15606 (arguments '(#:tests? #f)))))
15607
15608 (define-public python2-packaging-bootstrap
15609 (hidden-package
15610 (package/inherit
15611 python2-packaging
15612 (name "python2-packaging-bootstrap")
15613 (native-inputs '())
15614 (propagated-inputs
15615 `(("python-pyparsing" ,python2-pyparsing)))
15616 (arguments
15617 `(#:tests? #f
15618 ,@(package-arguments python2-packaging))))))
15619
15620 (define-public python-relatorio
15621 (package
15622 (name "python-relatorio")
15623 (version "0.8.0")
15624 (source
15625 (origin
15626 (method url-fetch)
15627 (uri (pypi-uri "relatorio" version))
15628 (sha256
15629 (base32
15630 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
15631 (build-system python-build-system)
15632 (propagated-inputs
15633 `(("python-lxml" ,python-lxml)
15634 ("python-genshi" ,python-genshi)))
15635 (native-inputs
15636 `(("python-magic" ,python-magic)))
15637 (home-page "https://relatorio.tryton.org/")
15638 (synopsis "Templating library able to output ODT and PDF files")
15639 (description "Relatorio is a templating library which provides a way to
15640 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
15641 for more filetypes can be easily added by creating plugins for them.")
15642 (license license:gpl3+)))
15643
15644 (define-public python2-relatorio
15645 (package-with-python2 python-relatorio))
15646
15647 (define-public python-radon
15648 (package
15649 (name "python-radon")
15650 (version "4.1.0")
15651 (source
15652 (origin
15653 (method url-fetch)
15654 (uri (pypi-uri "radon" version))
15655 (sha256
15656 (base32
15657 "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
15658 (build-system python-build-system)
15659 (arguments
15660 `(#:phases (modify-phases %standard-phases
15661 (replace 'check
15662 (lambda _
15663 (invoke "python" "radon/tests/run.py"))))))
15664 (propagated-inputs
15665 `(("python-colorama" ,python-colorama)
15666 ("python-flake8-polyfill" ,python-flake8-polyfill)
15667 ("python-mando" ,python-mando)))
15668 (native-inputs
15669 `(("python-pytest" ,python-pytest)
15670 ("python-pytest-mock" ,python-pytest-mock)))
15671 (home-page "https://radon.readthedocs.org/")
15672 (synopsis "Code Metrics in Python")
15673 (description "Radon is a Python tool which computes various code metrics.
15674 Supported metrics are:
15675 @itemize @bullet
15676 @item raw metrics: SLOC, comment lines, blank lines, &c.
15677 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
15678 @item Halstead metrics (all of them)
15679 @item the Maintainability Index (a Visual Studio metric)
15680 @end itemize")
15681 (properties `((python2-variant . ,(delay python2-radon))))
15682 (license license:expat)))
15683
15684 (define-public python2-radon
15685 (let ((base (package-with-python2 (strip-python2-variant python-radon))))
15686 (package
15687 (inherit base)
15688 (propagated-inputs
15689 `(("python-configparser" ,python2-configparser)
15690 ("python-future" ,python2-future)
15691 ,@(package-propagated-inputs base))))))
15692
15693 (define-public python-sure
15694 (package
15695 (name "python-sure")
15696 (version "1.4.11")
15697 (source
15698 (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "sure" version))
15701 (sha256
15702 (base32
15703 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
15704 (build-system python-build-system)
15705 (propagated-inputs
15706 `(("python-mock" ,python-mock)
15707 ("python-six" ,python-six)))
15708 (native-inputs
15709 `(("python-nose" ,python-nose)))
15710 (home-page "https://github.com/gabrielfalcao/sure")
15711 (synopsis "Automated testing library in python for python")
15712 (description
15713 "Sure is a python library that leverages a DSL for writing assertions.
15714 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
15715 (license license:gpl3+)))
15716
15717 (define-public python2-sure
15718 (package-with-python2 python-sure))
15719
15720 (define-public python2-couleur
15721 ;; This package does not seem to support python3 at all, hence,
15722 ;; only the python2 variant definition is provided.
15723 (package
15724 (name "python2-couleur")
15725 (version "0.6.2")
15726 (source
15727 (origin
15728 (method url-fetch)
15729 (uri (pypi-uri "couleur" version))
15730 (sha256
15731 (base32
15732 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
15733 (build-system python-build-system)
15734 (arguments
15735 `(#:python ,python-2))
15736 (home-page "https://github.com/gabrielfalcao/couleur")
15737 (synopsis
15738 "ANSI terminal tool for python, colored shell and other handy fancy features")
15739 (description
15740 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
15741 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
15742 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
15743 ;; https://github.com/gabrielfalcao/couleur/issues/11
15744 (license license:lgpl3+)))
15745
15746 (define-public python-misaka
15747 (package
15748 (name "python-misaka")
15749 (version "2.1.1")
15750 (source
15751 (origin
15752 (method url-fetch)
15753 (uri (pypi-uri "misaka" version))
15754 (sha256
15755 (base32
15756 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
15757 (build-system python-build-system)
15758 (arguments
15759 `(;; Line 37 of setup.py calls self.run_command('develop')
15760 ;; in the 'check' phase. This command seems to be trying
15761 ;; to write to
15762 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
15763 ;; for which it does not have the permission to write.
15764 #:tests? #f))
15765 (propagated-inputs
15766 `(("python-cffi" ,python-cffi)))
15767 (home-page "https://github.com/FSX/misaka")
15768 (synopsis "Python binding for Hoedown")
15769 (description
15770 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
15771 library written in C. It features a fast HTML renderer and functionality to make custom
15772 renderers (e.g. man pages or LaTeX).")
15773 (license license:expat)))
15774
15775 (define-public python2-misaka
15776 (package-with-python2 python-misaka))
15777
15778 (define-public python2-steadymark
15779 ;; This is forced into being a python2 only variant
15780 ;; due to its dependence on couleur that has no support
15781 ;; for python3
15782 (package
15783 (name "python2-steadymark")
15784 (version "0.7.3")
15785 (source
15786 (origin
15787 (method url-fetch)
15788 (uri (pypi-uri "steadymark" version))
15789 (sha256
15790 (base32
15791 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
15792 (build-system python-build-system)
15793 (native-inputs
15794 `(("python-couleur" ,python2-couleur)
15795 ("python-sure" ,python2-sure)
15796 ("python-misaka" ,python2-misaka)))
15797 (arguments
15798 `(#:python ,python-2
15799 #:phases
15800 (modify-phases %standard-phases
15801 (add-before 'build 'patch-setup-py
15802 (lambda _
15803 ;; Update requirements from dependency==version
15804 ;; to dependency>=version
15805 (substitute* "setup.py"
15806 (("==") ">="))
15807 #t)))))
15808 (home-page "https://github.com/gabrielfalcao/steadymark")
15809 (synopsis "Markdown-based test runner for python")
15810 (description
15811 "@code{Steadymark} allows documentation to be written in github-flavoured
15812 markdown. The documentation may contain snippets of code surrounded by python
15813 code blocks and @code{Steadymark} will find these snippets and run them, making
15814 sure that there are no old malfunctional examples in the documentation examples.")
15815 (license license:expat)))
15816
15817 (define-public python-jsonpointer
15818 (package
15819 (name "python-jsonpointer")
15820 (version "1.10")
15821 (source
15822 (origin
15823 (method url-fetch)
15824 (uri (pypi-uri "jsonpointer" version))
15825 (sha256
15826 (base32
15827 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
15828 (build-system python-build-system)
15829 (home-page "https://github.com/stefankoegl/python-json-pointer")
15830 (synopsis "Identify specific nodes in a JSON document")
15831 (description "@code{jsonpointer} allows you to access specific nodes
15832 by path in a JSON document (see RFC 6901).")
15833 (license license:bsd-3)))
15834
15835 (define-public python2-jsonpointer
15836 (package-with-python2 python-jsonpointer))
15837
15838 (define-public python-jsonpatch
15839 (package
15840 (name "python-jsonpatch")
15841 (version "1.16")
15842 (source
15843 (origin
15844 (method git-fetch)
15845 ;; pypi version lacks tests.js
15846 (uri (git-reference
15847 (url "https://github.com/stefankoegl/python-json-patch")
15848 (commit (string-append "v" version))))
15849 (file-name (git-file-name name version))
15850 (sha256
15851 (base32
15852 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
15853 (build-system python-build-system)
15854 (native-inputs
15855 `(("python-jsonpointer" ,python-jsonpointer)))
15856 (home-page "https://github.com/stefankoegl/python-json-patch")
15857 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
15858 (description "@code{jsonpatch} is a library and program that allows
15859 applying JSON Patches according to RFC 6902.")
15860 (license license:bsd-3)))
15861
15862 (define-public python2-jsonpatch
15863 (package-with-python2 python-jsonpatch))
15864
15865 (define-public python-jsonpatch-0.4
15866 (package (inherit python-jsonpatch)
15867 (name "python-jsonpatch")
15868 (version "0.4")
15869 (source
15870 (origin
15871 (method git-fetch)
15872 (uri (git-reference
15873 (url "https://github.com/stefankoegl/python-json-patch")
15874 (commit (string-append "v" version))))
15875 (file-name (git-file-name name version))
15876 (sha256
15877 (base32
15878 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
15879
15880 (define-public python2-jsonpatch-0.4
15881 (package-with-python2 python-jsonpatch-0.4))
15882
15883 (define-public python-rfc3986
15884 (package
15885 (name "python-rfc3986")
15886 (version "1.4.0")
15887 (source (origin
15888 (method url-fetch)
15889 (uri (pypi-uri "rfc3986" version))
15890 (sha256
15891 (base32
15892 "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
15893 (build-system python-build-system)
15894 (arguments
15895 `(#:modules ((guix build utils)
15896 (guix build python-build-system)
15897 (ice-9 ftw)
15898 (srfi srfi-1)
15899 (srfi srfi-26))
15900 #:phases
15901 (modify-phases %standard-phases
15902 (replace 'check
15903 (lambda _
15904 (let ((cwd (getcwd)))
15905 (setenv "PYTHONPATH"
15906 (string-append cwd "/build/"
15907 (find (cut string-prefix? "lib" <>)
15908 (scandir (string-append cwd "/build")))
15909 ":"
15910 (getenv "PYTHONPATH")))
15911 (invoke "pytest" "-v")))))))
15912 (native-inputs
15913 `(("python-pytest" ,python-pytest)))
15914 (home-page "https://rfc3986.readthedocs.io/")
15915 (synopsis "Parse and validate URI references")
15916 (description
15917 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
15918 validation and authority parsing. This module also supports RFC@tie{}6874
15919 which adds support for zone identifiers to IPv6 addresses.")
15920 (license license:asl2.0)))
15921
15922 (define-public python2-rfc3986
15923 (package-with-python2 python-rfc3986))
15924
15925 (define-public python-rfc3987
15926 (package
15927 (name "python-rfc3987")
15928 (version "1.3.7")
15929 (source
15930 (origin
15931 (method url-fetch)
15932 (uri (pypi-uri "rfc3987" version))
15933 (sha256
15934 (base32
15935 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
15936 (build-system python-build-system)
15937 (home-page "https://pypi.org/project/rfc3987/")
15938 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
15939 (description "@code{rfc3987} provides routines for parsing and
15940 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
15941 (license license:gpl3+)))
15942
15943 (define-public python2-rfc3987
15944 (package-with-python2 python-rfc3987))
15945
15946 (define-public python-validators
15947 (package
15948 (name "python-validators")
15949 (version "0.14.2")
15950 (source (origin
15951 (method url-fetch)
15952 (uri (pypi-uri "validators" version))
15953 (sha256
15954 (base32
15955 "024m15j33szd0v8k5l4ccish6n0b4knq81gmb4fq25ynwyyyd4mi"))))
15956 (build-system python-build-system)
15957 (arguments
15958 '(#:phases (modify-phases %standard-phases
15959 (replace 'check
15960 (lambda _
15961 (invoke "pytest" "-vv"))))))
15962 (propagated-inputs
15963 `(("python-decorator" ,python-decorator)
15964 ("python-six" ,python-six)))
15965 (native-inputs
15966 `(("python-flake8" ,python-flake8)
15967 ("python-isort" ,python-isort)
15968 ("python-pytest" ,python-pytest)))
15969 (home-page "https://github.com/kvesteri/validators")
15970 (synopsis "Data validation library")
15971 (description
15972 "This package contains validators for different things such as email
15973 addresses, IP addresses, URLs, hashes and more. It has been designed to
15974 be easy to use and not require defining a schema or form just to validate
15975 some input.")
15976 (license license:expat)))
15977
15978 (define-public python2-validators
15979 (package-with-python2 python-validators))
15980
15981 (define-public python-validate-email
15982 (package
15983 (name "python-validate-email")
15984 (version "1.3")
15985 (source
15986 (origin
15987 (method url-fetch)
15988 (uri (pypi-uri "validate_email" version))
15989 (sha256
15990 (base32
15991 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
15992 (build-system python-build-system)
15993 (home-page "https://github.com/syrusakbary/validate_email")
15994 (synopsis "Verifies if an email address is valid and really exists")
15995 (description "@code{validate_email} can be used to verify if an email
15996 address is valid and really exists.")
15997 (license license:lgpl3+)))
15998
15999 (define-public python2-validate-email
16000 (package-with-python2 python-validate-email))
16001
16002 (define-public python-flex
16003 (package
16004 (name "python-flex")
16005 (version "6.10.0")
16006 (source
16007 (origin
16008 (method url-fetch)
16009 (uri (pypi-uri "flex" version))
16010 (sha256
16011 (base32
16012 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
16013 (build-system python-build-system)
16014 (propagated-inputs
16015 `(("python-click" ,python-click)
16016 ("python-iso8601" ,python-iso8601)
16017 ("python-jsonpointer" ,python-jsonpointer)
16018 ("python-pyyaml" ,python-pyyaml)
16019 ("python-requests" ,python-requests)
16020 ("python-rfc3987" ,python-rfc3987)
16021 ("python-six" ,python-six)
16022 ("python-validate-email" ,python-validate-email)))
16023 (home-page "https://github.com/pipermerriam/flex")
16024 (synopsis "Validates Swagger schemata")
16025 (description "@code{flex} can be used to validate Swagger schemata.")
16026 (license license:bsd-3)))
16027
16028 (define-public python2-flex
16029 (package-with-python2 python-flex))
16030
16031 (define-public python-marshmallow
16032 (package
16033 (name "python-marshmallow")
16034 (version "3.0.0b14")
16035 (source
16036 (origin
16037 (method url-fetch)
16038 (uri (pypi-uri "marshmallow" version))
16039 (sha256
16040 (base32
16041 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
16042 (build-system python-build-system)
16043 (propagated-inputs
16044 `(("python-dateutil" ,python-dateutil)
16045 ("python-simplejson" ,python-simplejson)))
16046 (native-inputs
16047 `(("python-pytest" ,python-pytest)
16048 ("python-pytz" ,python-pytz)))
16049 (home-page "https://github.com/marshmallow-code/marshmallow")
16050 (synopsis "Convert complex datatypes to and from native
16051 Python datatypes.")
16052 (description "@code{marshmallow} provides a library for converting
16053 complex datatypes to and from native Python datatypes.")
16054 (license license:expat)))
16055
16056 (define-public python2-marshmallow
16057 (package-with-python2 python-marshmallow))
16058
16059 (define-public python-apispec
16060 (package
16061 (name "python-apispec")
16062 (version "0.25.3")
16063 (source
16064 (origin
16065 (method url-fetch)
16066 (uri (pypi-uri "apispec" version))
16067 (sha256
16068 (base32
16069 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
16070 (build-system python-build-system)
16071 (propagated-inputs
16072 `(("python-pyyaml" ,python-pyyaml)))
16073 (native-inputs
16074 `(("python-pytest" ,python-pytest)
16075 ("python-flask" ,python-flask)
16076 ("python-marshmallow" ,python-marshmallow)
16077 ("python-tornado" ,python-tornado)
16078 ("python-bottle" ,python-bottle)
16079 ("python-mock" ,python-mock)))
16080 (home-page "https://github.com/marshmallow-code/apispec")
16081 (synopsis "Swagger 2.0 API specification generator")
16082 (description "@code{python-apispec} is a pluggable API specification
16083 generator. Currently supports the OpenAPI specification (f.k.a.
16084 Swagger 2.0).")
16085 (license license:expat)))
16086
16087 (define-public python2-apispec
16088 (package-with-python2 python-apispec))
16089
16090 (define-public python-flasgger
16091 (package
16092 (name "python-flasgger")
16093 (version "0.6.3")
16094 (source
16095 (origin
16096 (method git-fetch)
16097 (uri (git-reference
16098 (url "https://github.com/rochacbruno/flasgger")
16099 (commit version)))
16100 (file-name (git-file-name name version))
16101 (sha256
16102 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
16103 (build-system python-build-system)
16104 (arguments
16105 `(#:phases
16106 (modify-phases %standard-phases
16107 (replace 'check
16108 (lambda* (#:key inputs outputs #:allow-other-keys)
16109 (substitute* "Makefile"
16110 (("flake8 flasgger --ignore=F403")
16111 "flake8 flasgger --ignore=E731,F403"))
16112 (setenv "PYTHONPATH" (string-append (getcwd)
16113 ":"
16114 (getenv "PYTHONPATH")))
16115 (invoke "py.test"))))))
16116 (propagated-inputs
16117 `(("python-flask" ,python-flask)
16118 ("python-pyyaml" ,python-pyyaml)
16119 ("python-jsonschema" ,python-jsonschema)
16120 ("python-mistune" ,python-mistune)
16121 ("python-six" ,python-six)))
16122 (native-inputs
16123 `(("python-decorator" ,python-decorator)
16124 ("python-flake8" ,python-flake8)
16125 ("python-flask-restful" ,python-flask-restful)
16126 ("python-flex" ,python-flex)
16127 ("python-pytest" ,python-pytest)
16128 ("python-pytest-cov" ,python-pytest-cov)
16129 ("python-marshmallow" ,python-marshmallow)
16130 ("python-apispec" ,python-apispec)))
16131 (home-page "https://github.com/rochacbruno/flasgger/")
16132 (synopsis "Extract Swagger specs from your Flask project")
16133 (description "@code{python-flasgger} allows extracting Swagger specs
16134 from your Flask project. It is a fork of Flask-Swagger.")
16135 (license license:expat)))
16136
16137 (define-public python2-flasgger
16138 (package-with-python2 python-flasgger))
16139
16140 (define-public python-swagger-spec-validator
16141 (package
16142 (name "python-swagger-spec-validator")
16143 (version "2.4.3")
16144 (source
16145 (origin
16146 (method url-fetch)
16147 (uri (pypi-uri "swagger-spec-validator" version))
16148 (sha256
16149 (base32
16150 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
16151 (build-system python-build-system)
16152 (propagated-inputs
16153 `(("python-jsonschema" ,python-jsonschema)
16154 ("python-pyyaml" ,python-pyyaml)
16155 ("python-six" ,python-six)))
16156 (home-page
16157 "https://github.com/Yelp/swagger_spec_validator")
16158 (synopsis "Validation of Swagger specifications")
16159 (description "@code{swagger_spec_validator} provides a library for
16160 validating Swagger API specifications.")
16161 (license license:asl2.0)))
16162
16163 (define-public python2-swagger-spec-validator
16164 (package-with-python2 python-swagger-spec-validator))
16165
16166 (define-public python-apache-libcloud
16167 (package
16168 (name "python-apache-libcloud")
16169 (version "3.1.0")
16170 (source
16171 (origin
16172 (method url-fetch)
16173 (uri (pypi-uri "apache-libcloud" version))
16174 (sha256
16175 (base32
16176 "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
16177 (build-system python-build-system)
16178 (arguments
16179 `(#:phases
16180 (modify-phases %standard-phases
16181 (add-after 'unpack 'patch-ssh
16182 (lambda* (#:key inputs #:allow-other-keys)
16183 (substitute* "libcloud/compute/ssh.py"
16184 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
16185 "/bin/ssh" "'")))
16186 #t))
16187 (add-after 'unpack 'patch-tests
16188 (lambda _
16189 (substitute* "libcloud/test/compute/test_ssh_client.py"
16190 (("class ShellOutSSHClientTests")
16191 "@unittest.skip(\"Guix container doesn't have ssh service\")
16192 class ShellOutSSHClientTests"))
16193 #t))
16194 (add-before 'check 'copy-secret
16195 (lambda _
16196 (copy-file "libcloud/test/secrets.py-dist"
16197 "libcloud/test/secrets.py")
16198 #t)))))
16199 (inputs
16200 `(("openssh" ,openssh)))
16201 (propagated-inputs
16202 `(("python-paramiko" ,python-paramiko)
16203 ("python-requests" ,python-requests)))
16204 (native-inputs
16205 `(("python-lockfile" ,python-lockfile)
16206 ("python-mock" ,python-mock)
16207 ("python-pytest" ,python-pytest)
16208 ("python-pytest-runner" ,python-pytest-runner)
16209 ("python-requests-mock" ,python-requests-mock)))
16210 (home-page "https://libcloud.apache.org/")
16211 (synopsis "Unified Cloud API")
16212 (description "@code{libcloud} is a Python library for interacting with
16213 many of the popular cloud service providers using a unified API.")
16214 (license license:asl2.0)))
16215
16216 (define-public python2-apache-libcloud
16217 (package-with-python2 python-apache-libcloud))
16218
16219 (define-public python-smmap
16220 (package
16221 (name "python-smmap")
16222 (version "3.0.1")
16223 (source
16224 (origin
16225 (method url-fetch)
16226 (uri (pypi-uri "smmap" version))
16227 (sha256
16228 (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
16229 (build-system python-build-system)
16230 (native-inputs
16231 `(("python-nosexcover" ,python-nosexcover)))
16232 (home-page "https://github.com/Byron/smmap")
16233 (synopsis "Python sliding window memory map manager")
16234 (description "@code{smmap} is a pure Python implementation of a sliding
16235 window memory map manager.")
16236 (license license:bsd-3)))
16237
16238 (define-public python-smmap2
16239 (deprecated-package "python-smmap2" python-smmap))
16240
16241 (define-public python2-smmap
16242 (package-with-python2 python-smmap))
16243
16244 (define-public python2-smmap2
16245 (deprecated-package "python2-smmap2" python2-smmap))
16246
16247 (define-public python-regex
16248 (package
16249 (name "python-regex")
16250 (version "2020.6.8")
16251 (source (origin
16252 (method url-fetch)
16253 (uri (pypi-uri "regex" version))
16254 (sha256
16255 (base32
16256 "1b3k0zi1pd99q5mk7ri7vcx2y1mq5inm9hk8dryqyhrpkmh4xdp9"))))
16257 (build-system python-build-system)
16258 (arguments
16259 '(#:phases
16260 (modify-phases %standard-phases
16261 (replace 'check
16262 (lambda* (#:key inputs outputs #:allow-other-keys)
16263 (add-installed-pythonpath inputs outputs)
16264 (invoke "python" "-c"
16265 "from regex.test_regex import test_main; test_main()"))))))
16266 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
16267 (synopsis "Alternative regular expression module")
16268 (description "This regular expression implementation is backwards-
16269 compatible with the standard @code{re} module, but offers additional
16270 functionality like full case-folding for case-insensitive matches in Unicode.")
16271 (license license:psfl)))
16272
16273 (define-public python2-regex
16274 (package-with-python2 python-regex))
16275
16276 (define-public python-pyopengl
16277 (package
16278 (name "python-pyopengl")
16279 (version "3.1.5")
16280 (source
16281 (origin
16282 (method url-fetch)
16283 (uri (pypi-uri "PyOpenGL" version))
16284 (sha256
16285 (base32
16286 "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
16287 (build-system python-build-system)
16288 (inputs
16289 `(("mesa" ,mesa)
16290 ("freeglut" ,freeglut)
16291 ("glu" ,glu)))
16292 (arguments
16293 `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
16294 ;attribute 'OSMesa'
16295 #:phases
16296 (modify-phases %standard-phases
16297 (add-before 'build 'fix-paths
16298 (lambda* (#:key inputs outputs #:allow-other-keys)
16299 (substitute* '("OpenGL/platform/ctypesloader.py")
16300 (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
16301 (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
16302 (("'GL'")
16303 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
16304 (("'GLU'")
16305 (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
16306 (("'glut',")
16307 (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
16308 (("'GLESv1_CM'")
16309 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
16310 (("'GLESv2'")
16311 (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
16312 ;; Not providing libgle. It seems to be very old.
16313 #t)))))
16314 (home-page "http://pyopengl.sourceforge.net")
16315 (synopsis "Standard OpenGL bindings for Python")
16316 (description
16317 "PyOpenGL is the most common cross platform Python binding to OpenGL and
16318 related APIs. The binding is created using the standard @code{ctypes}
16319 library.")
16320 (license license:bsd-3)))
16321
16322 (define-public python-pyopengl-accelerate
16323 (package
16324 (inherit python-pyopengl)
16325 (name "python-pyopengl-accelerate")
16326 (version "3.1.5")
16327 (source
16328 (origin
16329 (method url-fetch)
16330 (uri (pypi-uri "PyOpenGL-accelerate" version))
16331 (sha256
16332 (base32
16333 "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
16334 (inputs
16335 `(("mesa" ,mesa)
16336 ("python-numpy" ,python-numpy))) ; for cython module
16337 ; numpy_formathandler, thus not propagated
16338 (arguments
16339 `(#:tests? #f
16340 #:phases
16341 (modify-phases %standard-phases
16342 (delete 'fix-paths))))
16343 (synopsis "Acceleration code for PyOpenGL")
16344 (description
16345 "This is the Cython-coded accelerator module for PyOpenGL.")))
16346
16347 (define-public python-rencode
16348 (package
16349 (name "python-rencode")
16350 (version "1.0.5")
16351 (source
16352 (origin
16353 (method url-fetch)
16354 (uri (pypi-uri "rencode" version))
16355 (sha256
16356 (base32
16357 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
16358 (build-system python-build-system)
16359 (arguments
16360 `(#:phases
16361 (modify-phases %standard-phases
16362 (add-before 'check 'delete-bogus-test
16363 ;; This test requires /home/aresch/Downloads, which is not provided by
16364 ;; the build environment.
16365 (lambda _
16366 (delete-file "rencode/t.py")
16367 #t)))))
16368 (native-inputs `(("pkg-config" ,pkg-config)
16369 ("python-cython" ,python-cython)))
16370 (home-page "https://github.com/aresch/rencode")
16371 (synopsis "Serialization of heterogeneous data structures")
16372 (description
16373 "The @code{rencode} module is a data structure serialization library,
16374 similar to @code{bencode} from the BitTorrent project. For complex,
16375 heterogeneous data structures with many small elements, r-encoding stake up
16376 significantly less space than b-encodings. This version of rencode is a
16377 complete rewrite in Cython to attempt to increase the performance over the
16378 pure Python module.")
16379 (license license:bsd-3)))
16380
16381 (define-public python2-rencode
16382 (package-with-python2 python-rencode))
16383
16384 (define-public python-xenon
16385 (package
16386 (name "python-xenon")
16387 (version "0.7.0")
16388 (source
16389 (origin
16390 (method url-fetch)
16391 (uri (pypi-uri "xenon" version))
16392 (sha256
16393 (base32
16394 "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
16395 (build-system python-build-system)
16396 (native-inputs
16397 `(("python-pyyaml" ,python-pyyaml)
16398 ("python-radon" ,python-radon)
16399 ("python-requests" ,python-requests)
16400 ("python-flake8" ,python-flake8)
16401 ("python-tox" ,python-tox)))
16402 (arguments
16403 `(#:tests? #f ;test suite not shipped with the PyPI archive
16404 #:phases
16405 (modify-phases %standard-phases
16406 (add-before 'build 'patch-test-requirements
16407 (lambda _
16408 ;; Remove httpretty dependency for tests.
16409 (substitute* "setup.py"
16410 (("httpretty") ""))
16411 #t)))))
16412 (home-page "https://xenon.readthedocs.org/")
16413 (synopsis "Monitor code metrics for Python on your CI server")
16414 (description
16415 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
16416 Ideally, @code{xenon} is run every time code is committed. Through command
16417 line options, various thresholds can be set for the complexity of code. It
16418 will fail (i.e. it will exit with a non-zero exit code) when any of these
16419 requirements is not met.")
16420 (license license:expat)))
16421
16422 (define-public python2-xenon
16423 (package-with-python2 python-xenon))
16424
16425 (define-public python-pysocks
16426 (package
16427 (name "python-pysocks")
16428 (version "1.7.0")
16429 (source
16430 (origin
16431 (method url-fetch)
16432 (uri (pypi-uri "PySocks" version))
16433 (sha256
16434 (base32
16435 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
16436 (build-system python-build-system)
16437 (arguments `(#:tests? #f))
16438 (home-page "https://github.com/Anorov/PySocks")
16439 (synopsis "SOCKS client module")
16440 (description "@code{pysocks} is an updated and semi-actively maintained
16441 version of @code{SocksiPy} with bug fixes and extra features.")
16442 (license license:bsd-3)))
16443
16444 (define-public python2-pysocks
16445 (package-with-python2 python-pysocks))
16446
16447 (define-public python-pydiff
16448 (package
16449 (name "python-pydiff")
16450 (version "0.2")
16451 (source
16452 (origin
16453 (method url-fetch)
16454 (uri (pypi-uri "pydiff" version))
16455 (sha256
16456 (base32
16457 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
16458 (build-system python-build-system)
16459 (home-page "https://github.com/myint/pydiff")
16460 (synopsis "Library to diff two Python files at the bytecode level")
16461 (description
16462 "@code{pydiff} makes it easy to look for actual code changes while
16463 ignoring formatting changes.")
16464 (license license:expat)))
16465
16466 (define-public python2-pydiff
16467 (package-with-python2 python-pydiff))
16468
16469 (define-public python-tqdm
16470 (package
16471 (name "python-tqdm")
16472 (version "4.43.0")
16473 (source
16474 (origin
16475 (method url-fetch)
16476 (uri (pypi-uri "tqdm" version))
16477 (sha256
16478 (base32
16479 "093v4c2x5hpigv47zvyxl8wh10y2yd2gvz3l9vchn0zsp8hv2pzk"))))
16480 (build-system python-build-system)
16481 (arguments
16482 '(#:phases (modify-phases %standard-phases
16483 (replace 'check
16484 (lambda* (#:key inputs outputs #:allow-other-keys)
16485 (add-installed-pythonpath inputs outputs)
16486 ;; This invokation is taken from tox.ini.
16487 (invoke "nosetests" "--ignore-files=\"test_perf.py\""
16488 "-d" "-v" "tqdm/"))))))
16489 (native-inputs
16490 `(("python-nose" ,python-nose)))
16491 (home-page "https://github.com/tqdm/tqdm")
16492 (synopsis "Fast, extensible progress meter")
16493 (description
16494 "Make loops show a progress bar on the console by just wrapping any
16495 iterable with @code{|tqdm(iterable)|}. Offers many options to define
16496 design and layout.")
16497 (license (list license:mpl2.0 license:expat))))
16498
16499 (define-public python2-tqdm
16500 (package-with-python2 python-tqdm))
16501
16502 (define-public python-pkginfo
16503 (package
16504 (name "python-pkginfo")
16505 (version "1.4.2")
16506 (source
16507 (origin
16508 (method url-fetch)
16509 (uri (pypi-uri "pkginfo" version))
16510 (sha256
16511 (base32
16512 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
16513 (build-system python-build-system)
16514 (arguments
16515 ;; The tests are broken upstream.
16516 '(#:tests? #f))
16517 (home-page
16518 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
16519 (synopsis
16520 "Query metadatdata from sdists, bdists, and installed packages")
16521 (description
16522 "API to query the distutils metadata written in @file{PKG-INFO} inside a
16523 source distriubtion (an sdist) or a binary distribution (e.g., created by
16524 running bdist_egg). It can also query the EGG-INFO directory of an installed
16525 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
16526 created by running @code{python setup.py develop}).")
16527 (license license:expat)))
16528
16529 (define-public python2-pkginfo
16530 (package-with-python2 python-pkginfo))
16531
16532 (define-public python-twine
16533 (package
16534 (name "python-twine")
16535 (version "1.15.0")
16536 (source
16537 (origin
16538 (method url-fetch)
16539 (uri (pypi-uri "twine" version))
16540 (sha256
16541 (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
16542 (build-system python-build-system)
16543 (propagated-inputs
16544 `(("python-tqdm" ,python-tqdm)
16545 ("python-packaging" ,python-packaging)
16546 ("python-pkginfo" ,python-pkginfo)
16547 ("python-readme-renderer" ,python-readme-renderer)
16548 ("python-requests" ,python-requests)
16549 ("python-requests-toolbelt" ,python-requests-toolbelt)))
16550 (home-page "https://github.com/pypa/twine")
16551 (synopsis "Collection of utilities for interacting with PyPI")
16552 (description
16553 "@code{twine} currently supports registering projects and uploading
16554 distributions. It authenticates the user over HTTPS, allows them to pre-sign
16555 their files and supports any packaging format (including wheels).")
16556 (license license:asl2.0)))
16557
16558 (define-public python2-twine
16559 (package-with-python2 python-twine))
16560
16561 (define-public python-linecache2
16562 (package
16563 (name "python-linecache2")
16564 (version "1.0.0")
16565 (source
16566 (origin
16567 (method url-fetch)
16568 (uri (pypi-uri "linecache2" version))
16569 (sha256
16570 (base32
16571 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
16572 (build-system python-build-system)
16573 (arguments
16574 `(;; The tests depend on unittest2, and our version is a bit too old.
16575 #:tests? #f))
16576 (native-inputs
16577 `(("python-pbr" ,python-pbr-minimal)))
16578 (home-page
16579 "https://github.com/testing-cabal/linecache2")
16580 (synopsis "Backports of the linecache module")
16581 (description
16582 "The linecache module allows one to get any line from any file, while
16583 attempting to optimize internally, using a cache, the common case where many
16584 lines are read from a single file.")
16585 (license license:psfl)))
16586
16587 (define-public python2-linecache2
16588 (package-with-python2 python-linecache2))
16589
16590 (define-public python-traceback2
16591 (package
16592 (name "python-traceback2")
16593 (version "1.4.0")
16594 (source
16595 (origin
16596 (method url-fetch)
16597 (uri (pypi-uri "traceback2" version))
16598 (sha256
16599 (base32
16600 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
16601 (build-system python-build-system)
16602 (arguments
16603 `(;; python-traceback2 and python-unittest2 depend on one another.
16604 #:tests? #f))
16605 (native-inputs
16606 `(("python-pbr" ,python-pbr-minimal)))
16607 (propagated-inputs
16608 `(("python-linecache2" ,python-linecache2)))
16609 (home-page
16610 "https://github.com/testing-cabal/traceback2")
16611 (synopsis "Backports of the traceback module")
16612 (description
16613 "This module provides a standard interface to extract, format and print
16614 stack traces of Python programs. It exactly mimics the behavior of the Python
16615 interpreter when it prints a stack trace.")
16616 (license license:psfl)))
16617
16618 (define-public python2-traceback2
16619 (package-with-python2 python-traceback2))
16620
16621 (define-public python-ratelimiter
16622 (package
16623 (name "python-ratelimiter")
16624 (version "1.2.0")
16625 (source
16626 (origin
16627 (method url-fetch)
16628 (uri (pypi-uri "ratelimiter" version))
16629 (sha256
16630 (base32
16631 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
16632 (build-system python-build-system)
16633 (arguments
16634 '(#:tests? #f)) ; There are no tests in the pypi archive.
16635 (home-page "https://github.com/RazerM/ratelimiter")
16636 (synopsis "Simple rate limiting object")
16637 (description
16638 "The @code{ratelimiter} module ensures that an operation will not be
16639 executed more than a given number of times during a given period.")
16640 (license license:asl2.0)))
16641
16642 (define-public python2-ratelimiter
16643 (package-with-python2 python-ratelimiter))
16644
16645 (define-public python-dukpy
16646 (package
16647 (name "python-dukpy")
16648 (version "0.3")
16649 (source
16650 (origin
16651 (method git-fetch)
16652 (uri (git-reference
16653 (url "https://github.com/kovidgoyal/dukpy")
16654 (commit (string-append "v" version))))
16655 (file-name (git-file-name name version))
16656 (sha256
16657 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
16658 (build-system python-build-system)
16659 (home-page "https://github.com/kovidgoyal/dukpy")
16660 (synopsis "Run JavaScript in python")
16661 (description
16662 "dukpy is a JavaScript runtime environment for Python using the duktape
16663 embeddable JavaScript engine.")
16664 ;; Dukpy is licensed under MIT like the embedded duktape library,
16665 ;; with 'errors.c' as GPL3.
16666 (license (list license:expat license:gpl3))))
16667
16668 (define-public python2-dukpy
16669 (package-with-python2 python-dukpy))
16670
16671 (define-public python-jsonrpclib-pelix
16672 (package
16673 (name "python-jsonrpclib-pelix")
16674 (version "0.3.2")
16675 (source
16676 (origin
16677 (method url-fetch)
16678 (uri (pypi-uri "jsonrpclib-pelix" version))
16679 (sha256
16680 (base32
16681 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
16682 (build-system python-build-system)
16683 (arguments
16684 `(#:tests? #f)) ; no tests in PyPI tarball
16685 (home-page "https://github.com/tcalmant/jsonrpclib/")
16686 (synopsis "JSON-RPC 2.0 client library for Python")
16687 (description
16688 "This library implements the JSON-RPC v2.0
16689 specification (backwards-compatible) as a client library for Python. This
16690 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
16691 services.")
16692 (license license:asl2.0)))
16693
16694 (define-public python2-jsonrpclib-pelix
16695 (package-with-python2 python-jsonrpclib-pelix))
16696
16697 (define-public python-setuptools-scm-git-archive
16698 (package
16699 (name "python-setuptools-scm-git-archive")
16700 (version "1.0")
16701 (source
16702 (origin
16703 (method url-fetch)
16704 (uri (pypi-uri "setuptools_scm_git_archive" version))
16705 (sha256
16706 (base32
16707 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
16708 (build-system python-build-system)
16709 (native-inputs
16710 `(("python-pytest" ,python-pytest)))
16711 (propagated-inputs
16712 `(("python-setuptools-scm" ,python-setuptools-scm)))
16713 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
16714 (synopsis "Setuptools_scm plugin for git archives")
16715 (description
16716 "The setuptools_scm_git_archive package is a plugin to
16717 setuptools_scm, which supports obtaining versions from git archives that
16718 belong to tagged versions.")
16719 (license license:expat)))
16720
16721 (define-public python2-setuptools-scm-git-archive
16722 (package-with-python2 python-setuptools-scm-git-archive))
16723
16724 (define-public python-setuptools-git
16725 (package
16726 (name "python-setuptools-git")
16727 (version "1.2")
16728 (source
16729 (origin
16730 (method url-fetch)
16731 (uri (pypi-uri "setuptools-git" version))
16732 (sha256
16733 (base32
16734 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
16735 (build-system python-build-system)
16736 (arguments
16737 `(#:phases
16738 (modify-phases %standard-phases
16739 ;; This is needed for tests.
16740 (add-after 'unpack 'configure-git
16741 (lambda _
16742 (setenv "HOME" "/tmp")
16743 (invoke "git" "config" "--global" "user.email" "guix")
16744 (invoke "git" "config" "--global" "user.name" "guix")
16745 #t)))))
16746 (native-inputs
16747 `(("git" ,git-minimal)))
16748 (home-page "https://github.com/msabramo/setuptools-git")
16749 (synopsis "Setuptools revision control system plugin for Git")
16750 (description
16751 "This package provides a plugin for Setuptools for revision control with
16752 Git.")
16753 (license license:bsd-3)))
16754
16755 (define-public python-pyclipper
16756 (package
16757 (name "python-pyclipper")
16758 (version "1.1.0.post3")
16759 (source
16760 (origin
16761 (method url-fetch)
16762 (uri (pypi-uri "pyclipper" version ".zip"))
16763 (sha256
16764 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
16765 (modules '((guix build utils)))
16766 (snippet
16767 '(begin
16768 ;; This file is generated by Cython.
16769 (delete-file "pyclipper/pyclipper.cpp") #t))))
16770 (build-system python-build-system)
16771 (arguments
16772 `(#:phases
16773 (modify-phases %standard-phases
16774 (add-before 'build 'cythonize-sources
16775 (lambda _
16776 (with-directory-excursion "pyclipper"
16777 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
16778 (propagated-inputs
16779 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
16780 (native-inputs
16781 `(("python-cython" ,python-cython)
16782 ("python-pytest" ,python-pytest)
16783 ("python-pytest-runner" ,python-pytest-runner)
16784 ("python-unittest2" ,python-unittest2)
16785 ("unzip" ,unzip)))
16786 (home-page "https://github.com/greginvm/pyclipper")
16787 (synopsis "Wrapper for Angus Johnson's Clipper library")
16788 (description
16789 "Pyclipper is a Cython wrapper for the C++ translation of the
16790 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
16791 (license license:expat)))
16792
16793 (define-public python2-pyclipper
16794 (package-with-python2 python-pyclipper))
16795
16796 (define-public python2-booleanoperations
16797 (package
16798 (name "python2-booleanoperations")
16799 (version "0.7.1")
16800 (source
16801 (origin
16802 (method url-fetch)
16803 (uri (pypi-uri "booleanOperations" version ".zip"))
16804 (sha256
16805 (base32
16806 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
16807 (build-system python-build-system)
16808 (arguments
16809 `(#:python ,python-2))
16810 (native-inputs
16811 `(("unzip" ,unzip)
16812 ("python2-pytest" ,python2-pytest)
16813 ("python2-pytest-runner" ,python2-pytest-runner)))
16814 (propagated-inputs
16815 `(("python-fonttools" ,python2-fonttools)
16816 ("python-pyclipper" ,python2-pyclipper)
16817 ("python-ufolib" ,python2-ufolib)))
16818 (home-page "https://github.com/typemytype/booleanOperations")
16819 (synopsis "Boolean operations on paths")
16820 (description
16821 "BooleanOperations provides a Python library that enables
16822 boolean operations on paths.")
16823 (license license:expat)))
16824
16825 (define-public python-tempdir
16826 (package
16827 (name "python-tempdir")
16828 (version "0.7.1")
16829 (source
16830 (origin
16831 (method url-fetch)
16832 (uri (pypi-uri "tempdir" version))
16833 (sha256
16834 (base32
16835 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
16836 (build-system python-build-system)
16837 (home-page "https://pypi.org/project/tempdir/")
16838 (arguments
16839 ;; the package has no tests
16840 '(#:tests? #f))
16841 (synopsis "Python library for managing temporary directories")
16842 (description
16843 "This library manages temporary directories that are automatically
16844 deleted with all their contents when they are no longer needed. It is
16845 particularly convenient for use in tests.")
16846 (license license:expat)))
16847
16848 (define-public python2-tempdir
16849 (package-with-python2 python-tempdir))
16850
16851 (define-public python-activepapers
16852 (package
16853 (name "python-activepapers")
16854 (version "0.2.2")
16855 (source
16856 (origin
16857 (method url-fetch)
16858 (uri (pypi-uri "ActivePapers.Py" version))
16859 (sha256
16860 (base32
16861 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
16862 (build-system python-build-system)
16863 (arguments
16864 `(#:modules ((ice-9 ftw)
16865 (srfi srfi-1)
16866 (guix build utils)
16867 (guix build python-build-system))
16868
16869 #:phases
16870 (modify-phases %standard-phases
16871 (add-after 'unpack 'delete-python2-code
16872 (lambda _
16873 (for-each delete-file
16874 '("lib/activepapers/builtins2.py"
16875 "lib/activepapers/standardlib2.py"
16876 "lib/activepapers/utility2.py"))))
16877 (replace 'check
16878 (lambda _
16879 ;; Deactivate the test cases that download files
16880 (setenv "NO_NETWORK_ACCESS" "1")
16881 ;; For some strange reason, some tests fail if nosetests runs all
16882 ;; test modules in a single execution. They pass if each test
16883 ;; module is run individually.
16884 (for-each (lambda (filename)
16885 (invoke "nosetests"
16886 (string-append "tests/" filename)))
16887 (scandir "tests"
16888 (lambda (filename)
16889 (string-suffix? ".py" filename)))))))))
16890 (native-inputs
16891 `(("python-tempdir" ,python-tempdir)
16892 ("python-nose" ,python-nose)))
16893 (propagated-inputs
16894 `(("python-h5py" ,python-h5py)))
16895 (home-page "https://www.activepapers.org/")
16896 (synopsis "Executable papers for scientific computing")
16897 (description
16898 "ActivePapers is a tool for working with executable papers, which
16899 combine data, code, and documentation in single-file packages,
16900 suitable for publication as supplementary material or on repositories
16901 such as figshare or Zenodo.")
16902 (properties `((python2-variant . ,(delay python2-activepapers))))
16903 (license license:bsd-3)))
16904
16905 (define-public python2-activepapers
16906 (let ((base (package-with-python2
16907 (strip-python2-variant python-activepapers))))
16908 (package
16909 (inherit base)
16910 (arguments
16911 (substitute-keyword-arguments (package-arguments base)
16912 ((#:phases phases)
16913 `(modify-phases ,phases
16914 (delete 'delete-python2-code)
16915 (add-after 'unpack 'delete-python3-code
16916 (lambda _
16917 (for-each delete-file
16918 '("lib/activepapers/builtins3.py"
16919 "lib/activepapers/standardlib3.py"
16920 "lib/activepapers/utility3.py")))))))))))
16921
16922 (define-public python-semver
16923 (package
16924 (name "python-semver")
16925 (version "2.9.0")
16926 (source
16927 (origin
16928 (method url-fetch)
16929 (uri (pypi-uri "semver" version))
16930 (sha256
16931 (base32
16932 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
16933 (build-system python-build-system)
16934 (native-inputs
16935 `(("python-appdirs" ,python-appdirs)
16936 ("python-distlib" ,python-distlib)
16937 ("python-importlib-metadata" ,python-importlib-metadata)
16938 ("python-filelock" ,python-filelock)
16939 ("python-six" ,python-six)
16940 ("python-tox" ,python-tox)
16941 ("python-virtualenv" ,python-virtualenv)))
16942 (home-page "https://github.com/k-bx/python-semver")
16943 (synopsis "Python helper for Semantic Versioning")
16944 (description "This package provides a Python library for
16945 @url{Semantic Versioning, http://semver.org/}.")
16946 (license license:bsd-3)))
16947
16948 (define-public python2-semver
16949 (package-with-python2 python-semver))
16950
16951 (define-public python-pyro4
16952 (package
16953 (name "python-pyro4")
16954 (version "4.77")
16955 (source
16956 (origin
16957 (method url-fetch)
16958 (uri (pypi-uri "Pyro4" version))
16959 (sha256
16960 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
16961 (build-system python-build-system)
16962 (arguments
16963 '(#:tests? #f)) ;FIXME: Some tests require network access.
16964 (native-inputs
16965 `(("python-cloudpickle" ,python-cloudpickle)
16966 ("python-dill" ,python-dill)
16967 ("python-msgpack" ,python-msgpack)))
16968 (propagated-inputs
16969 `(("python-serpent" ,python-serpent)))
16970 (home-page "https://pyro4.readthedocs.io")
16971 (synopsis "Distributed object middleware for Python")
16972 (description
16973 "Pyro enables you to build applications in which objects can talk to each
16974 other over the network. You can just use normal Python method calls to call
16975 objects on other machines, also known as remote procedure calls (RPC).")
16976 (license license:expat)))
16977
16978 (define-public python2-pyro
16979 (package
16980 (name "python2-pyro")
16981 (version "3.16")
16982 (source
16983 (origin
16984 (method url-fetch)
16985 (uri (pypi-uri "Pyro" version))
16986 (file-name (string-append "Pyro-" version ".tar.gz"))
16987 (sha256
16988 (base32
16989 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
16990 (build-system python-build-system)
16991 (arguments
16992 ;; Pyro is not compatible with Python 3
16993 `(#:python ,python-2
16994 ;; Pyro has no test cases for automatic execution
16995 #:tests? #f))
16996 (home-page "https://pythonhosted.org/Pyro/")
16997 (synopsis "Distributed object manager for Python")
16998 (description "Pyro is a Distributed Object Technology system
16999 written in Python that is designed to be easy to use. It resembles
17000 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
17001 which is a system and language independent Distributed Object Technology
17002 and has much more to offer than Pyro or RMI. Pyro 3.x is no
17003 longer maintained. New projects should use Pyro4 instead, which
17004 is the new Pyro version that is actively developed.")
17005 (license license:expat)))
17006
17007 (define-public python2-scientific
17008 (package
17009 (name "python2-scientific")
17010 (version "2.9.4")
17011 (source
17012 (origin
17013 (method git-fetch)
17014 (uri (git-reference
17015 (url "https://github.com/khinsen/ScientificPython")
17016 (commit (string-append "rel" version))))
17017 (file-name (git-file-name name version))
17018 (sha256
17019 (base32
17020 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
17021 (build-system python-build-system)
17022 (inputs
17023 `(("netcdf" ,netcdf)))
17024 (propagated-inputs
17025 `(("python-numpy" ,python2-numpy-1.8)
17026 ("python-pyro" ,python2-pyro)))
17027 (arguments
17028 ;; ScientificPython is not compatible with Python 3
17029 `(#:python ,python-2
17030 #:tests? #f ; No test suite
17031 #:phases
17032 (modify-phases %standard-phases
17033 (replace 'build
17034 (lambda* (#:key inputs #:allow-other-keys)
17035 (invoke "python" "setup.py" "build"
17036 (string-append "--netcdf_prefix="
17037 (assoc-ref inputs "netcdf"))))))))
17038 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
17039 (synopsis "Python modules for scientific computing")
17040 (description "ScientificPython is a collection of Python modules that are
17041 useful for scientific computing. Most modules are rather general (Geometry,
17042 physical units, automatic derivatives, ...) whereas others are more
17043 domain-specific (e.g. netCDF and PDB support). The library is currently
17044 not actively maintained and works only with Python 2 and NumPy < 1.9.")
17045 (license license:cecill-c)))
17046
17047 (define-public python2-mmtk
17048 (package
17049 (name "python2-mmtk")
17050 (version "2.7.12")
17051 (source
17052 (origin
17053 (method git-fetch)
17054 (uri (git-reference
17055 (url "https://github.com/khinsen/MMTK")
17056 (commit (string-append "rel" version))))
17057 (file-name (git-file-name name version))
17058 (sha256
17059 (base32
17060 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
17061 (build-system python-build-system)
17062 (native-inputs
17063 `(("netcdf" ,netcdf)))
17064 (propagated-inputs
17065 `(("python-scientific" ,python2-scientific)
17066 ("python-tkinter" ,python-2 "tk")))
17067 (arguments
17068 `(#:python ,python-2
17069 #:tests? #f
17070 #:phases
17071 (modify-phases %standard-phases
17072 (add-before 'build 'includes-from-scientific
17073 (lambda* (#:key inputs #:allow-other-keys)
17074 (mkdir-p "Include/Scientific")
17075 (copy-recursively
17076 (string-append
17077 (assoc-ref inputs "python-scientific")
17078 "/include/python2.7/Scientific")
17079 "Include/Scientific"))))))
17080 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
17081 (synopsis "Python library for molecular simulation")
17082 (description "MMTK is a library for molecular simulations with an emphasis
17083 on biomolecules. It provides widely used methods such as Molecular Dynamics
17084 and normal mode analysis, but also basic routines for implementing new methods
17085 for simulation and analysis. The library is currently not actively maintained
17086 and works only with Python 2 and NumPy < 1.9.")
17087 (license license:cecill-c)))
17088
17089 (define-public python-phonenumbers
17090 (package
17091 (name "python-phonenumbers")
17092 (version "8.9.1")
17093 (source
17094 (origin
17095 (method url-fetch)
17096 (uri (pypi-uri "phonenumbers" version))
17097 (sha256
17098 (base32
17099 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
17100 (build-system python-build-system)
17101 (home-page
17102 "https://github.com/daviddrysdale/python-phonenumbers")
17103 (synopsis
17104 "Python library for dealing with international phone numbers")
17105 (description
17106 "This package provides a Python port of Google's libphonenumber library.")
17107 (license license:asl2.0)))
17108
17109 (define-public python2-phonenumbers
17110 (package-with-python2 python-phonenumbers))
17111
17112 (define-public python-send2trash
17113 (package
17114 (name "python-send2trash")
17115 (version "1.5.0")
17116 (source
17117 (origin (method git-fetch)
17118 ;; Source tarball on PyPI doesn't include tests.
17119 (uri (git-reference
17120 (url "https://github.com/hsoft/send2trash")
17121 (commit version)))
17122 (file-name (git-file-name name version))
17123 (sha256
17124 (base32
17125 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
17126 (build-system python-build-system)
17127 (arguments
17128 '(#:phases
17129 (modify-phases %standard-phases
17130 (add-before 'check 'pre-check
17131 (lambda _
17132 (mkdir-p "/tmp/foo")
17133 (setenv "HOME" "/tmp/foo")
17134 #t)))))
17135 (home-page "https://github.com/hsoft/send2trash")
17136 (synopsis "Send files to the user's @file{~/Trash} directory")
17137 (description "This package provides a Python library to send files to the
17138 user's @file{~/Trash} directory.")
17139 (properties `((python2-variant . ,(delay python2-send2trash))))
17140 (license license:bsd-3)))
17141
17142 (define-public python2-send2trash
17143 (package
17144 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
17145 (arguments
17146 (substitute-keyword-arguments (package-arguments python-send2trash)
17147 ((#:phases phases)
17148 `(modify-phases ,phases
17149 (add-before 'check 'setenv
17150 (lambda _
17151 (setenv "PYTHONPATH"
17152 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17153 #t))))))))
17154
17155 (define-public python-yapf
17156 (package
17157 (name "python-yapf")
17158 (version "0.29.0")
17159 (source
17160 (origin
17161 (method url-fetch)
17162 (uri (pypi-uri "yapf" version))
17163 (sha256
17164 (base32
17165 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
17166 (build-system python-build-system)
17167 (home-page "https://github.com/google/yapf")
17168 (synopsis "Formatter for Python code")
17169 (description "YAPF is a formatter for Python code. It's based off of
17170 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
17171 takes the code and reformats it to the best formatting that conforms to the
17172 style guide, even if the original code didn't violate the style guide.")
17173 (license license:asl2.0)))
17174
17175 (define-public python2-yapf
17176 (package-with-python2 python-yapf))
17177
17178 (define-public python-gyp
17179 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
17180 (revision "0"))
17181 (package
17182 (name "python-gyp")
17183 ;; Google does not release versions,
17184 ;; based on second most recent commit date.
17185 (version (git-version "0.0.0" revision commit))
17186 (source
17187 (origin
17188 ;; Google does not release tarballs,
17189 ;; git checkout is needed.
17190 (method git-fetch)
17191 (uri (git-reference
17192 (url "https://chromium.googlesource.com/external/gyp")
17193 (commit commit)))
17194 (file-name (git-file-name name version))
17195 (sha256
17196 (base32
17197 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
17198 (build-system python-build-system)
17199 (home-page "https://gyp.gsrc.io/")
17200 (synopsis "GYP is a Meta-Build system")
17201 (description
17202 "GYP builds build systems for large, cross platform applications.
17203 It can be used to generate XCode projects, Visual Studio projects, Ninja build
17204 files, and Makefiles.")
17205 (license license:bsd-3))))
17206
17207 (define-public python2-gyp
17208 (package-with-python2 python-gyp))
17209
17210 (define-public python-whatever
17211 (package
17212 (name "python-whatever")
17213 (version "0.6")
17214 (source
17215 (origin
17216 (method git-fetch)
17217 (uri (git-reference
17218 (url "https://github.com/Suor/whatever")
17219 (commit version)))
17220 (file-name (git-file-name name version))
17221 (sha256
17222 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
17223 (build-system python-build-system)
17224 (arguments
17225 `(#:phases
17226 (modify-phases %standard-phases
17227 (replace 'check
17228 (lambda _
17229 (invoke "py.test"))))))
17230 (native-inputs
17231 `(("python-pytest" ,python-pytest)))
17232 (home-page "https://github.com/Suor/whatever")
17233 (synopsis "Make anonymous functions by partial application of operators")
17234 (description "@code{whatever} provides an easy way to make anonymous
17235 functions by partial application of operators.")
17236 (license license:bsd-3)))
17237
17238 (define-public python2-whatever
17239 (package-with-python2 python-whatever))
17240
17241 (define-public python-funcy
17242 (package
17243 (name "python-funcy")
17244 (version "1.11")
17245 (source
17246 (origin
17247 (method git-fetch)
17248 (uri (git-reference
17249 (url "https://github.com/Suor/funcy")
17250 (commit version)))
17251 (sha256
17252 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
17253 (file-name (git-file-name name version))))
17254 (build-system python-build-system)
17255 (arguments
17256 `(#:phases
17257 (modify-phases %standard-phases
17258 (replace 'check
17259 (lambda _
17260 (invoke "py.test"))))))
17261 (native-inputs
17262 `(("python-pytest" ,python-pytest)
17263 ("python-whatever" ,python-whatever)))
17264 (home-page "https://github.com/Suor/funcy")
17265 (synopsis "Functional tools")
17266 (description "@code{funcy} is a library that provides functional tools.
17267 Examples are:
17268 @enumerate
17269 @item merge - Merges collections of the same type
17270 @item walk - Type-preserving map
17271 @item select - Selects a part of a collection
17272 @item take - Takes the first n items of a collection
17273 @item first - Takes the first item of a collection
17274 @item remove - Predicated-removes items of a collection
17275 @item concat - Concatenates two collections
17276 @item flatten - Flattens a collection with subcollections
17277 @item distinct - Returns only distinct items
17278 @item split - Predicated-splits a collection
17279 @item split_at - Splits a collection at a given item
17280 @item group_by - Groups items by group
17281 @item pairwise - Pairs off adjacent items
17282 @item partial - Partially-applies a function
17283 @item curry - Curries a function
17284 @item compose - Composes functions
17285 @item complement - Complements a predicate
17286 @item all_fn - \"all\" with predicate
17287 @end enumerate")
17288 (license license:bsd-3)))
17289
17290 (define-public python2-funcy
17291 (package-with-python2 python-funcy))
17292
17293 (define-public python-isoweek
17294 (package
17295 (name "python-isoweek")
17296 (version "1.3.3")
17297 (source
17298 (origin
17299 (method url-fetch)
17300 (uri (pypi-uri "isoweek" version))
17301 (sha256
17302 (base32
17303 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
17304 (build-system python-build-system)
17305 (home-page "https://github.com/gisle/isoweek")
17306 (synopsis "Objects representing a week")
17307 (description "The @code{isoweek} module provide the class Week that
17308 implements the week definition of ISO 8601. This standard also defines
17309 a notation for identifying weeks; yyyyWww (where the W is a literal).
17310 Week instances stringify to this form.")
17311 (license license:bsd-3)))
17312
17313 (define-public python2-isoweek
17314 (package-with-python2 python-isoweek))
17315
17316 (define-public python-tokenize-rt
17317 (package
17318 (name "python-tokenize-rt")
17319 (version "2.0.1")
17320 (source
17321 (origin
17322 (method url-fetch)
17323 (uri (pypi-uri "tokenize-rt" version))
17324 (sha256
17325 (base32
17326 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
17327 (build-system python-build-system)
17328 (home-page "https://github.com/asottile/tokenize-rt")
17329 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
17330 (description
17331 "This Python library is a wrapper around @code{tokenize} from the Python
17332 standard library. It provides two additional tokens @code{ESCAPED_NL} and
17333 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
17334 and @code{tokens_to_src} to roundtrip.")
17335 (license license:expat)))
17336
17337 (define-public python-future-fstrings
17338 (package
17339 (name "python-future-fstrings")
17340 (version "0.4.1")
17341 (source
17342 (origin
17343 (method url-fetch)
17344 (uri (pypi-uri "future_fstrings" version))
17345 (sha256
17346 (base32
17347 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
17348 (build-system python-build-system)
17349 (propagated-inputs
17350 `(("python-tokenize-rt" ,python-tokenize-rt)))
17351 (home-page "https://github.com/asottile/future-fstrings")
17352 (synopsis "Backport of fstrings to Python < 3.6")
17353 (description
17354 "This package provides a UTF-8 compatible encoding
17355 @code{future_fstrings}, which performs source manipulation. It decodes the
17356 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
17357 @code{f} strings.")
17358 (license license:expat)))
17359
17360 (define-public python-typed-ast
17361 (package
17362 (name "python-typed-ast")
17363 (version "1.4.0")
17364 (source
17365 (origin
17366 (method git-fetch)
17367 (uri (git-reference
17368 (url "https://github.com/python/typed_ast")
17369 (commit version)))
17370 (sha256
17371 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
17372 (file-name (git-file-name name version))))
17373 (build-system python-build-system)
17374 (arguments
17375 `(#:modules ((guix build utils)
17376 (guix build python-build-system)
17377 (ice-9 ftw)
17378 (srfi srfi-1)
17379 (srfi srfi-26))
17380 #:phases
17381 (modify-phases %standard-phases
17382 (replace 'check
17383 (lambda _
17384 (let ((cwd (getcwd)))
17385 (setenv "PYTHONPATH"
17386 (string-append cwd "/build/"
17387 (find (cut string-prefix? "lib" <>)
17388 (scandir (string-append cwd "/build")))
17389 ":"
17390 (getenv "PYTHONPATH"))))
17391 (invoke "pytest")
17392 #t)))))
17393 (native-inputs `(("python-pytest" ,python-pytest)))
17394 (home-page "https://github.com/python/typed_ast")
17395 (synopsis "Fork of Python @code{ast} modules with type comment support")
17396 (description "This package provides a parser similar to the standard
17397 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
17398 include PEP 484 type comments and are independent of the version of Python
17399 under which they are run. The @code{typed_ast} parsers produce the standard
17400 Python AST (plus type comments), and are both fast and correct, as they are
17401 based on the CPython 2.7 and 3.7 parsers.")
17402 ;; See the file "LICENSE" for the details.
17403 (license (list license:psfl
17404 license:asl2.0
17405 license:expat)))) ;ast27/Parser/spark.py
17406
17407 (define-public python-typing
17408 (package
17409 (name "python-typing")
17410 (version "3.7.4.3")
17411 (source
17412 (origin
17413 (method url-fetch)
17414 (uri (pypi-uri "typing" version))
17415 (sha256
17416 (base32 "1j8wnz8c9s049w9xbf7ssr1dmgg4rz7vdfq7m880srzxhafgp1qi"))))
17417 (build-system python-build-system)
17418 (home-page "https://docs.python.org/3/library/typing.html")
17419 (synopsis "Type hints for Python")
17420 (description "This is a backport of the standard library @code{typing}
17421 module to Python versions older than 3.5. Typing defines a standard notation
17422 for Python function and variable type annotations. The notation can be used
17423 for documenting code in a concise, standard format, and it has been designed
17424 to also be used by static and runtime type checkers, static analyzers, IDEs
17425 and other tools.")
17426 (license license:psfl)))
17427
17428 (define-public python2-typing
17429 (package-with-python2 python-typing))
17430
17431 (define-public python-typing-extensions
17432 (package
17433 (name "python-typing-extensions")
17434 (version "3.7.4.2")
17435 (source
17436 (origin
17437 (method url-fetch)
17438 (uri (pypi-uri "typing_extensions" version))
17439 (sha256
17440 (base32
17441 "1bk9b60s3rm1c8cwhv0bl3gh0x43153xxa6jpyllk9mc7jd5ivkr"))))
17442 (build-system python-build-system)
17443 (home-page
17444 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
17445 (synopsis "Experimental type hints for Python")
17446 (description
17447 "The typing_extensions module contains additional @code{typing} hints not
17448 yet present in the of the @code{typing} standard library.
17449 Included are implementations of:
17450 @enumerate
17451 @item ClassVar
17452 @item ContextManager
17453 @item Counter
17454 @item DefaultDict
17455 @item Deque
17456 @item NewType
17457 @item NoReturn
17458 @item overload
17459 @item Protocol
17460 @item runtime
17461 @item Text
17462 @item Type
17463 @item TYPE_CHECKING
17464 @item AsyncGenerator
17465 @end enumerate\n")
17466 (license license:psfl)))
17467
17468 (define-public bpython
17469 (package
17470 (name "bpython")
17471 (version "0.18")
17472 (source
17473 (origin
17474 (method url-fetch)
17475 (uri (pypi-uri "bpython" version))
17476 (sha256
17477 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
17478 (build-system python-build-system)
17479 (arguments
17480 `(#:phases
17481 (modify-phases %standard-phases
17482 (add-after 'unpack 'remove-failing-test
17483 (lambda _
17484 ;; Remove failing test. FIXME: make it pass
17485 (delete-file "bpython/test/test_args.py")
17486 #t))
17487 (add-after 'wrap 'add-aliases
17488 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
17489 (lambda* (#:key outputs #:allow-other-keys)
17490 (let ((out (assoc-ref outputs "out")))
17491 (for-each
17492 (lambda (old new)
17493 (symlink old (string-append out "/bin/" new)))
17494 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
17495 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
17496 #t)))))
17497 (propagated-inputs
17498 `(("python-pygments" ,python-pygments)
17499 ("python-requests" ,python-requests)
17500 ("python-babel" ,python-babel) ; optional, for internationalization
17501 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
17502 ("python-greenlet" ,python-greenlet)
17503 ("python-urwid" ,python-urwid) ; for bpython-urwid only
17504 ("python-six" ,python-six)))
17505 (native-inputs
17506 `(("python-sphinx" ,python-sphinx)
17507 ("python-mock" ,python-mock)))
17508 (home-page "https://bpython-interpreter.org/")
17509 (synopsis "Fancy interface to the Python interpreter")
17510 (description "Bpython is a fancy interface to the Python
17511 interpreter. bpython's main features are
17512
17513 @enumerate
17514 @item in-line syntax highlighting,
17515 @item readline-like autocomplete with suggestions displayed as you type,
17516 @item expected parameter list for any Python function,
17517 @item \"rewind\" function to pop the last line of code from memory and
17518 re-evaluate,
17519 @item send the code you've entered off to a pastebin,
17520 @item save the code you've entered to a file, and
17521 @item auto-indentation.
17522 @end enumerate")
17523 (license license:expat)))
17524
17525 (define-public bpython2
17526 (let ((base (package-with-python2
17527 (strip-python2-variant bpython))))
17528 (package (inherit base)
17529 (name "bpython2")
17530 (arguments
17531 `(#:python ,python-2
17532 #:phases
17533 (modify-phases %standard-phases
17534 (add-after 'unpack 'remove-failing-test
17535 (lambda _
17536 ;; Remove failing test. FIXME: make it pass
17537 (delete-file "bpython/test/test_args.py")
17538 ;; Disable failing test-cases (renaming inhibits they are
17539 ;; discovered)
17540 (substitute* "bpython/test/test_curtsies_repl.py"
17541 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
17542 (string-append a "xxx_off_" b))
17543 (("^(\\s*def )(test_complex\\W)" _ a b)
17544 (string-append a "xxx_off_" b)))
17545 #t))
17546 (add-before 'build 'rename-scripts
17547 ;; rename the scripts to bypthon2, bpdb2, etc.
17548 (lambda _
17549 (substitute* "setup.py"
17550 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
17551 (string-append name "2" rest "\n"))
17552 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
17553 (string-append name "2" (or sub "") rest "\n")))
17554 #t))))))))
17555
17556 (define-public python-pyinotify
17557 (package
17558 (name "python-pyinotify")
17559 (version "0.9.6")
17560 (source (origin
17561 (method url-fetch)
17562 (uri (pypi-uri "pyinotify" version))
17563 (sha256
17564 (base32
17565 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
17566 (build-system python-build-system)
17567 (arguments `(#:tests? #f)) ;no tests
17568 (home-page "https://github.com/seb-m/pyinotify")
17569 (synopsis "Python library for monitoring inotify events")
17570 (description
17571 "@code{pyinotify} provides a Python interface for monitoring
17572 file system events on Linux.")
17573 (license license:expat)))
17574
17575 (define-public python2-pyinotify
17576 (package-with-python2 python-pyinotify))
17577
17578 ;; Ada parser uses this version.
17579 (define-public python2-quex-0.67.3
17580 (package
17581 (name "python2-quex")
17582 (version "0.67.3")
17583 (source
17584 (origin
17585 (method url-fetch)
17586 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
17587 (version-major+minor version)
17588 "/quex-" version ".zip"))
17589 (sha256
17590 (base32
17591 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
17592 (build-system python-build-system)
17593 (native-inputs
17594 `(("unzip" ,unzip)))
17595 (arguments
17596 `(#:python ,python-2
17597 #:tests? #f
17598 #:phases
17599 (modify-phases %standard-phases
17600 (delete 'configure)
17601 (delete 'build)
17602 (replace 'install
17603 (lambda* (#:key outputs #:allow-other-keys)
17604 (let* ((out (assoc-ref outputs "out"))
17605 (share/quex (string-append out "/share/quex"))
17606 (bin (string-append out "/bin")))
17607 (copy-recursively "." share/quex)
17608 (mkdir-p bin)
17609 (symlink (string-append share/quex "/quex-exe.py")
17610 (string-append bin "/quex"))
17611 #t))))))
17612 (native-search-paths
17613 (list (search-path-specification
17614 (variable "QUEX_PATH")
17615 (files '("share/quex")))))
17616 (home-page "http://quex.sourceforge.net/")
17617 (synopsis "Lexical analyzer generator in Python")
17618 (description "@code{quex} is a lexical analyzer generator in Python.")
17619 (license license:lgpl2.1+))) ; Non-military
17620
17621 (define-public python2-quex
17622 (package (inherit python2-quex-0.67.3)
17623 (name "python2-quex")
17624 (version "0.68.1")
17625 (source
17626 (origin
17627 (method url-fetch)
17628 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
17629 (sha256
17630 (base32
17631 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
17632 (file-name (string-append name "-" version ".tar.gz"))))))
17633
17634 (define-public python-more-itertools
17635 (package
17636 (name "python-more-itertools")
17637 (version "8.2.0")
17638 (source
17639 (origin
17640 (method url-fetch)
17641 (uri (pypi-uri "more-itertools" version))
17642 (sha256
17643 (base32
17644 "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
17645 (build-system python-build-system)
17646 (home-page "https://github.com/erikrose/more-itertools")
17647 (synopsis "More routines for operating on iterables, beyond itertools")
17648 (description "Python's built-in @code{itertools} module implements a
17649 number of iterator building blocks inspired by constructs from APL, Haskell,
17650 and SML. @code{more-itertools} includes additional building blocks for
17651 working with iterables.")
17652 (properties `((python2-variant . ,(delay python2-more-itertools))))
17653 (license license:expat)))
17654
17655 ;; The 5.x series are the last versions supporting Python 2.7.
17656 (define-public python2-more-itertools
17657 (package
17658 (inherit python-more-itertools)
17659 (name "python2-more-itertools")
17660 (version "5.0.0")
17661 (source (origin
17662 (method url-fetch)
17663 (uri (pypi-uri "more-itertools" version))
17664 (sha256
17665 (base32
17666 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
17667 (arguments
17668 `(#:python ,python-2))
17669 (propagated-inputs
17670 `(("python2-six" ,python2-six-bootstrap)))))
17671
17672 (define-public python-latexcodec
17673 (package
17674 (name "python-latexcodec")
17675 (version "1.0.7")
17676 (source
17677 (origin
17678 (method url-fetch)
17679 (uri (pypi-uri "latexcodec" version))
17680 (sha256
17681 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
17682 (build-system python-build-system)
17683 (inputs
17684 `(("python-six" ,python-six)))
17685 (home-page "https://readthedocs.org/projects/latexcodec/")
17686 (synopsis "Work with LaTeX code in Python")
17687 (description "Lexer and codec to work with LaTeX code in Python.")
17688 (license license:expat)))
17689
17690 (define-public python-pybtex
17691 (package
17692 (name "python-pybtex")
17693 (version "0.22.2")
17694 (source
17695 (origin
17696 (method url-fetch)
17697 (uri (pypi-uri "pybtex" version))
17698 (sha256
17699 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
17700 (build-system python-build-system)
17701 (native-inputs
17702 `(("python-nose" ,python-nose)))
17703 (inputs
17704 `(("python-latexcodec" ,python-latexcodec)
17705 ("python-pyyaml" ,python-pyyaml)
17706 ("python-six" ,python-six)))
17707 (arguments
17708 `(#:test-target "nosetests"))
17709 (home-page "https://pybtex.org/")
17710 (synopsis "BibTeX-compatible bibliography processor")
17711 (description "Pybtex is a BibTeX-compatible bibliography processor written
17712 in Python. You can simply type pybtex instead of bibtex.")
17713 (license license:expat)))
17714
17715 (define-public python-onetimepass
17716 (package
17717 (name "python-onetimepass")
17718 (version "1.0.1")
17719 (source
17720 (origin
17721 (method url-fetch)
17722 (uri (pypi-uri "onetimepass" version))
17723 (sha256
17724 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
17725 (build-system python-build-system)
17726 (propagated-inputs `(("python-six" ,python-six)))
17727 (home-page "https://github.com/tadeck/onetimepass/")
17728 (synopsis "One-time password library")
17729 (description "Python one-time password library for HMAC-based (HOTP) and
17730 time-based (TOTP) passwords.")
17731 (license license:expat)))
17732
17733 (define-public python-parso
17734 (package
17735 (name "python-parso")
17736 (version "0.7.1")
17737 (source
17738 (origin
17739 (method url-fetch)
17740 (uri (pypi-uri "parso" version))
17741 (sha256
17742 (base32 "1f9fc99mjx0h2ad4mgsid728nnmw58hvnq3411g8ljlr9dr49fna"))))
17743 (native-inputs
17744 `(("python-pytest" ,python-pytest)))
17745 (build-system python-build-system)
17746 (arguments
17747 `(#:phases (modify-phases %standard-phases
17748 (replace 'check
17749 (lambda _ (invoke "pytest" "-vv"))))))
17750 (home-page "https://github.com/davidhalter/parso")
17751 (synopsis "Python Parser")
17752 (description "Parso is a Python parser that supports error recovery and
17753 round-trip parsing for different Python versions (in multiple Python versions).
17754 Parso is also able to list multiple syntax errors in your Python file.")
17755 (license license:expat)))
17756
17757 (define-public python2-parso
17758 (package-with-python2 python-parso))
17759
17760 (define-public python-async-generator
17761 (package
17762 (name "python-async-generator")
17763 (version "1.10")
17764 (source
17765 (origin
17766 (method url-fetch)
17767 (uri (pypi-uri "async_generator" version))
17768 (sha256
17769 (base32
17770 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
17771 (build-system python-build-system)
17772 (native-inputs
17773 `(("python-pytest" ,python-pytest)))
17774 (home-page "https://github.com/python-trio/async_generator")
17775 (synopsis "Async generators and context managers for Python 3.5+")
17776 (description "@code{async_generator} back-ports Python 3.6's native async
17777 generators and Python 3.7's context managers into Python 3.5.")
17778 ;; Dual licensed.
17779 (license (list license:expat license:asl2.0))))
17780
17781 (define-public python-async-timeout
17782 (package
17783 (name "python-async-timeout")
17784 (version "3.0.1")
17785 (source
17786 (origin
17787 (method url-fetch)
17788 (uri (pypi-uri "async-timeout" version))
17789 (sha256
17790 (base32
17791 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
17792 (build-system python-build-system)
17793 (home-page "https://github.com/aio-libs/async_timeout/")
17794 (synopsis "Timeout context manager for asyncio programs")
17795 (description "@code{async-timeout} provides a timeout timeout context
17796 manager compatible with @code{asyncio}.")
17797 (license license:asl2.0)))
17798
17799 (define-public python-glob2
17800 (package
17801 (name "python-glob2")
17802 (version "0.7")
17803 (source
17804 (origin
17805 (method git-fetch)
17806 (uri (git-reference
17807 (url "https://github.com/miracle2k/python-glob2")
17808 (commit (string-append "v" version))))
17809 (file-name (git-file-name name version))
17810 (sha256
17811 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
17812 (build-system python-build-system)
17813 (home-page "https://github.com/miracle2k/python-glob2/")
17814 (synopsis "Extended Version of the python buildin glob module")
17815 (description "This is an extended version of the Python
17816 @url{http://docs.python.org/library/glob.html, built-in glob module} which
17817 adds:
17818
17819 @itemize
17820 @item The ability to capture the text matched by glob patterns, and return
17821 those matches alongside the file names.
17822 @item A recursive @code{**} globbing syntax, akin for example to the
17823 @code{globstar} option of Bash.
17824 @item The ability to replace the file system functions used, in order to glob
17825 on virtual file systems.
17826 @item Compatible with Python 2 and Python 3 (tested with 3.3).
17827 @end itemize
17828
17829 Glob2 currently based on the glob code from Python 3.3.1.")
17830 (license license:bsd-2)))
17831
17832 (define-public python2-glob2
17833 (package-with-python2 python-glob2))
17834
17835 (define-public python-gipc
17836 (package
17837 (name "python-gipc")
17838 (version "0.6.0")
17839 (source
17840 (origin
17841 (method url-fetch)
17842 (uri (pypi-uri "gipc" version ".zip"))
17843 (sha256
17844 (base32
17845 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
17846 (build-system python-build-system)
17847 (native-inputs
17848 `(("unzip" ,unzip)))
17849 (propagated-inputs
17850 `(("python-gevent" ,python-gevent)))
17851 (home-page "https://gehrcke.de/gipc/")
17852 (synopsis "Child process management in the context of gevent")
17853 (description "Usage of Python's multiprocessing package in a
17854 gevent-powered application may raise problems. With @code{gipc},
17855 process-based child processes can safely be created anywhere within a
17856 gevent-powered application.")
17857 (license license:expat)))
17858
17859 (define-public python2-gipc
17860 (package-with-python2 python-gipc))
17861
17862 (define-public python-fusepy
17863 (package
17864 (name "python-fusepy")
17865 (version "2.0.4")
17866 (source
17867 (origin
17868 (method url-fetch)
17869 (uri (pypi-uri "fusepy" version))
17870 (sha256
17871 (base32
17872 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
17873 (build-system python-build-system)
17874 (arguments
17875 `(#:phases
17876 (modify-phases %standard-phases
17877 (add-before 'build 'set-library-file-name
17878 (lambda* (#:key inputs #:allow-other-keys)
17879 (let ((fuse (assoc-ref inputs "fuse")))
17880 (substitute* "fuse.py"
17881 (("find_library\\('fuse'\\)")
17882 (string-append "'" fuse "/lib/libfuse.so'")))
17883 #t))))))
17884 (propagated-inputs
17885 `(("fuse" ,fuse)))
17886 (home-page "https://github.com/fusepy/fusepy")
17887 (synopsis "Simple ctypes bindings for FUSE")
17888 (description "Python module that provides a simple interface to FUSE and
17889 MacFUSE. The binding is created using the standard @code{ctypes} library.")
17890 (license license:isc)))
17891
17892 (define-public python2-fusepy
17893 (package-with-python2 python-fusepy))
17894
17895 (define-public python-fusepyng
17896 (package
17897 (name "python-fusepyng")
17898 (version "1.0.7")
17899 (source
17900 (origin
17901 (method url-fetch)
17902 (uri (pypi-uri "fusepyng" version))
17903 (sha256
17904 (base32
17905 "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
17906 (build-system python-build-system)
17907 (arguments
17908 '(#:phases
17909 (modify-phases %standard-phases
17910 (add-after 'unpack 'set-libfuse-path
17911 (lambda* (#:key inputs #:allow-other-keys)
17912 (let ((fuse (assoc-ref inputs "fuse")))
17913 (substitute* "fusepyng.py"
17914 (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
17915 (string-append "\"" fuse "/lib/libfuse.so\""))))
17916 #t)))))
17917 (inputs
17918 `(("fuse" ,fuse)))
17919 (propagated-inputs
17920 `(("python-paramiko" ,python-paramiko)))
17921 (home-page "https://github.com/rianhunter/fusepyng")
17922 (synopsis "Simple ctypes bindings for FUSE")
17923 (description "@code{fusepyng} is a Python module that provides a simple
17924 interface to FUSE on various operating systems. It's just one file and is
17925 implemented using @code{ctypes}.")
17926 (license license:isc)))
17927
17928 (define-public python2-gdrivefs
17929 (package
17930 (name "python2-gdrivefs")
17931 (version "0.14.9")
17932 (source
17933 (origin
17934 (method url-fetch)
17935 (uri (pypi-uri "gdrivefs" version))
17936 (sha256
17937 (base32
17938 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
17939 (build-system python-build-system)
17940 (arguments
17941 `(#:python ,python-2
17942 #:phases
17943 (modify-phases %standard-phases
17944 (add-before 'build 'patch-setup-py
17945 (lambda _
17946 ;; Update requirements from dependency==version
17947 ;; to dependency>=version
17948 (substitute* "gdrivefs/resources/requirements.txt"
17949 (("==") ">="))
17950 #t)))))
17951 (native-inputs
17952 `(("python2-gipc" ,python2-gipc)
17953 ("python2-gevent" ,python2-gevent)
17954 ("python2-greenlet" ,python2-greenlet)
17955 ("python2-httplib2" ,python2-httplib2)
17956 ("python2-uritemplate" ,python2-uritemplate)
17957 ("python2-oauth2client" ,python2-oauth2client)
17958 ("python2-six" ,python2-six)))
17959 (propagated-inputs
17960 `(("python2-dateutil" ,python2-dateutil)
17961 ("python2-fusepy" ,python2-fusepy)
17962 ("python2-google-api-client" ,python2-google-api-client)))
17963 (home-page "https://github.com/dsoprea/GDriveFS")
17964 (synopsis "Mount Google Drive as a local file system")
17965 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
17966 under Python 2.7.")
17967 (license license:gpl2)))
17968
17969 (define-public python-userspacefs
17970 (package
17971 (name "python-userspacefs")
17972 (version "1.0.13")
17973 (source
17974 (origin
17975 (method url-fetch)
17976 (uri (pypi-uri "userspacefs" version))
17977 (sha256
17978 (base32
17979 "0kyz52jyxw3m7hqvn5g6z0sx9cq6k0nq1wj44lvdrghdljjgyk2z"))))
17980 (build-system python-build-system)
17981 (propagated-inputs
17982 `(("python-fusepyng" ,python-fusepyng)))
17983 (home-page "https://github.com/rianhunter/userspacefs")
17984 (synopsis "User-space file systems for Python")
17985 (description
17986 "@code{userspacefs} is a library that allows you to easily write
17987 user-space file systems in Python.")
17988 (license license:gpl3+)))
17989
17990 (define-public pybind11
17991 (package
17992 (name "pybind11")
17993 (version "2.4.3")
17994 (source (origin
17995 (method git-fetch)
17996 (uri (git-reference
17997 (url "https://github.com/pybind/pybind11")
17998 (commit (string-append "v" version))))
17999 (sha256
18000 (base32
18001 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
18002 (file-name (git-file-name name version))))
18003 (build-system cmake-build-system)
18004 (native-inputs
18005 `(("python" ,python-wrapper)
18006
18007 ;; The following dependencies are used for tests.
18008 ("python-pytest" ,python-pytest)
18009 ("catch" ,catch-framework2-1)
18010 ("eigen" ,eigen)))
18011 (arguments
18012 `(#:configure-flags
18013 (list (string-append "-DCATCH_INCLUDE_DIR="
18014 (assoc-ref %build-inputs "catch")
18015 "/include/catch"))
18016
18017 #:phases (modify-phases %standard-phases
18018 (add-after 'install 'install-python
18019 (lambda* (#:key outputs #:allow-other-keys)
18020 (let ((out (assoc-ref outputs "out")))
18021 (with-directory-excursion "../source"
18022 (setenv "PYBIND11_USE_CMAKE" "yes")
18023 (invoke "python" "setup.py" "install"
18024 "--single-version-externally-managed"
18025 "--root=/"
18026 (string-append "--prefix=" out)))))))
18027
18028 #:test-target "check"))
18029 (home-page "https://github.com/pybind/pybind11/")
18030 (synopsis "Seamless operability between C++11 and Python")
18031 (description
18032 "@code{pybind11} is a lightweight header-only library that exposes C++
18033 types in Python and vice versa, mainly to create Python bindings of existing
18034 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
18035 library: to minimize boilerplate code in traditional extension modules by
18036 inferring type information using compile-time introspection.")
18037 (license license:bsd-3)))
18038
18039 (define-public python-fasteners
18040 (package
18041 (name "python-fasteners")
18042 (version "0.15")
18043 (source
18044 (origin
18045 (method url-fetch)
18046 (uri (pypi-uri "fasteners" version))
18047 (sha256
18048 (base32
18049 "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
18050 (build-system python-build-system)
18051 (propagated-inputs
18052 `(("python-monotonic" ,python-monotonic)
18053 ("python-six" ,python-six)))
18054 (native-inputs
18055 `(("python-testtools" ,python-testtools)))
18056 (home-page "https://github.com/harlowja/fasteners")
18057 (synopsis "Python package that provides useful locks")
18058 (description
18059 "This package provides a Python program that provides following locks:
18060
18061 @itemize
18062 @item Locking decorator
18063 @item Reader-writer locks
18064 @item Inter-process locks
18065 @item Generic helpers
18066 @end itemize\n")
18067 (properties `((python2-variant . ,(delay python2-fasteners))))
18068 (license license:asl2.0)))
18069
18070 (define-public python2-fasteners
18071 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
18072 (package
18073 (inherit base)
18074 (propagated-inputs
18075 `(("python2-futures" ,python2-futures)
18076 ,@(package-propagated-inputs base))))))
18077
18078 (define-public python-requests-file
18079 (package
18080 (name "python-requests-file")
18081 (version "1.4.3")
18082 (source
18083 (origin
18084 (method url-fetch)
18085 (uri (pypi-uri "requests-file" version))
18086 (sha256
18087 (base32
18088 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
18089 (build-system python-build-system)
18090 (propagated-inputs
18091 `(("python-requests" ,python-requests)
18092 ("python-six" ,python-six)))
18093 (home-page
18094 "https://github.com/dashea/requests-file")
18095 (synopsis "File transport adapter for Requests")
18096 (description
18097 "Requests-File is a transport adapter for use with the Requests Python
18098 library to allow local file system access via @code{file://} URLs.")
18099 (license license:asl2.0)))
18100
18101 (define-public python2-requests-file
18102 (package-with-python2 python-requests-file))
18103
18104 (define-public python-identify
18105 (package
18106 (name "python-identify")
18107 (version "1.4.25")
18108 (source
18109 (origin
18110 ;; There are no tests in the PyPI tarball.
18111 (method git-fetch)
18112 (uri (git-reference
18113 (url "https://github.com/chriskuehl/identify")
18114 (commit (string-append "v" version))))
18115 (file-name (git-file-name name version))
18116 (sha256
18117 (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
18118 (build-system python-build-system)
18119 (arguments
18120 `(#:phases
18121 (modify-phases %standard-phases
18122 (replace 'check
18123 (lambda _
18124 (invoke "pytest" "-vv"))))))
18125 (native-inputs
18126 `(("python-coverage" ,python-coverage)
18127 ("python-pytest" ,python-pytest)))
18128 (propagated-inputs
18129 `(("python-editdistance" ,python-editdistance)))
18130 (home-page "https://github.com/chriskuehl/identify")
18131 (synopsis "File identification library for Python")
18132 (description
18133 "@code{identify} is a file identification library for Python. Given
18134 a file (or some information about a file), return a set of standardized tags
18135 identifying what the file is.")
18136 (license license:expat)))
18137
18138 (define-public python-tldextract
18139 (package
18140 (name "python-tldextract")
18141 (version "2.2.0")
18142 (source
18143 (origin
18144 (method url-fetch)
18145 (uri (pypi-uri "tldextract" version))
18146 (sha256
18147 (base32
18148 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
18149 (build-system python-build-system)
18150 (native-inputs
18151 `(("python-pytest" ,python-pytest)
18152 ("python-responses" ,python-responses)))
18153 (propagated-inputs
18154 `(("python-idna" ,python-idna)
18155 ("python-requests" ,python-requests)
18156 ("python-requests-file" ,python-requests-file)))
18157 (home-page
18158 "https://github.com/john-kurkowski/tldextract")
18159 (synopsis
18160 "Separate the TLD from the registered domain and subdomains of a URL")
18161 (description
18162 "TLDExtract accurately separates the TLD from the registered domain and
18163 subdomains of a URL, using the Public Suffix List. By default, this includes
18164 the public ICANN TLDs and their exceptions. It can optionally support the
18165 Public Suffix List's private domains as well.")
18166 (license license:bsd-3)))
18167
18168 (define-public python2-tldextract
18169 (package-with-python2 python-tldextract))
18170
18171 (define-public python-nodeenv
18172 (package
18173 (name "python-nodeenv")
18174 (version "1.4.0")
18175 (source
18176 (origin
18177 ;; There's no tarball in PyPI.
18178 (method git-fetch)
18179 (uri (git-reference
18180 (url "https://github.com/ekalinin/nodeenv")
18181 (commit version)))
18182 (file-name (git-file-name name version))
18183 (sha256
18184 (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
18185 (build-system python-build-system)
18186 (arguments
18187 `(#:phases
18188 (modify-phases %standard-phases
18189 (replace 'check
18190 (lambda _
18191 ;; This test fails. It tries to open a network socket.
18192 (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
18193 (native-inputs
18194 `(("python-coverage" ,python-coverage)
18195 ("python-mock" ,python-mock)
18196 ("python-pytest" ,python-pytest)))
18197 (home-page "https://ekalinin.github.io/nodeenv/")
18198 (synopsis "Create isolated node.js environments")
18199 (description
18200 "Nodeenv (node.js virtual environment) is a tool to create isolated
18201 node.js environments. It creates an environment that has its own installation
18202 directories, that doesn't share libraries with other node.js virtual
18203 environments.")
18204 (license license:bsd-3)))
18205
18206 (define-public python-pynamecheap
18207 (package
18208 (name "python-pynamecheap")
18209 (version "0.0.3")
18210 (source
18211 (origin
18212 (method url-fetch)
18213 (uri (pypi-uri "PyNamecheap" version))
18214 (sha256
18215 (base32
18216 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
18217 (build-system python-build-system)
18218 (propagated-inputs
18219 `(("python-requests" ,python-requests)))
18220 (home-page
18221 "https://github.com/Bemmu/PyNamecheap")
18222 (synopsis
18223 "Namecheap API client in Python")
18224 (description
18225 "PyNamecheap is a Namecheap API client in Python.")
18226 (license license:expat)))
18227
18228 (define-public python2-pynamecheap
18229 (package-with-python2 python-pynamecheap))
18230
18231 (define-public python-dns-lexicon
18232 (package
18233 (name "python-dns-lexicon")
18234 (version "2.4.0")
18235 (source
18236 (origin
18237 (method url-fetch)
18238 (uri (pypi-uri "dns-lexicon" version))
18239 (sha256
18240 (base32
18241 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
18242 (build-system python-build-system)
18243 (arguments
18244 `(#:tests? #f)) ;requires internet access
18245 (propagated-inputs
18246 `(("python-future" ,python-future)
18247 ("python-pynamecheap" ,python-pynamecheap)
18248 ("python-requests" ,python-requests)
18249 ("python-tldextract" ,python-tldextract)
18250 ("python-urllib3" ,python-urllib3)))
18251 (home-page "https://github.com/AnalogJ/lexicon")
18252 (synopsis
18253 "Manipulate DNS records on various DNS providers")
18254 (description
18255 "Lexicon provides a way to manipulate DNS records on multiple DNS
18256 providers in a standardized way. It has a CLI but it can also be used as a
18257 Python library. It was designed to be used in automation, specifically with
18258 Let's Encrypt.")
18259 (license license:expat)))
18260
18261 (define-public python2-dns-lexicon
18262 (package-with-python2 python-dns-lexicon))
18263
18264 (define-public python-cfgv
18265 (package
18266 (name "python-cfgv")
18267 (version "3.1.0")
18268 (source
18269 (origin
18270 ;; There are no tests in the PyPI tarball.
18271 (method git-fetch)
18272 (uri (git-reference
18273 (url "https://github.com/asottile/cfgv")
18274 (commit (string-append "v" version))))
18275 (file-name (git-file-name name version))
18276 (sha256
18277 (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
18278 (build-system python-build-system)
18279 (arguments
18280 `(#:phases
18281 (modify-phases %standard-phases
18282 (replace 'check
18283 (lambda _
18284 (invoke "pytest" "-vv"))))))
18285 (native-inputs
18286 `(("python-covdefaults" ,python-covdefaults)
18287 ("python-coverage" ,python-coverage)
18288 ("python-pytest" ,python-pytest)))
18289 (home-page "https://github.com/asottile/cfgv")
18290 (synopsis "Configuration validation library")
18291 (description
18292 "This library helps to validate configuration files and produce human
18293 readable error messages.")
18294 (license license:expat)))
18295
18296 (define-public python-commandlines
18297 (package
18298 (name "python-commandlines")
18299 (version "0.4.1")
18300 (source
18301 (origin
18302 (method url-fetch)
18303 (uri (pypi-uri "commandlines" version))
18304 (sha256
18305 (base32
18306 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
18307 (build-system python-build-system)
18308 (home-page "https://github.com/chrissimpkins/commandlines")
18309 (synopsis "Command line argument to object parsing library")
18310 (description
18311 "@code{Commandlines} is a Python library for command line application
18312 development that supports command line argument parsing, command string
18313 validation testing and application logic.")
18314 (license license:expat)))
18315
18316 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
18317 ;; python-numba. They have a very unflexible relationship.
18318 (define-public python-numba
18319 (package
18320 (name "python-numba")
18321 (version "0.46.0")
18322 (source
18323 (origin
18324 (method url-fetch)
18325 (uri (pypi-uri "numba" version))
18326 (sha256
18327 (base32
18328 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
18329 (build-system python-build-system)
18330 (arguments
18331 `(#:modules ((guix build utils)
18332 (guix build python-build-system)
18333 (ice-9 ftw)
18334 (srfi srfi-1)
18335 (srfi srfi-26))
18336 #:phases
18337 (modify-phases %standard-phases
18338 (add-after 'unpack 'disable-proprietary-features
18339 (lambda _
18340 (setenv "NUMBA_DISABLE_HSA" "1")
18341 (setenv "NUMBA_DISABLE_CUDA" "1")
18342 #t))
18343 (add-after 'unpack 'remove-failing-tests
18344 (lambda _
18345 ;; FIXME: These tests fail for unknown reasons:
18346 ;; test_non_writable_pycache, test_non_creatable_pycache, and
18347 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
18348 (substitute* "numba/tests/test_dispatcher.py"
18349 (("def test(_non_writable_pycache)" _ m)
18350 (string-append "def guix_skip" m))
18351 (("def test(_non_creatable_pycache)" _ m)
18352 (string-append "def guix_skip" m))
18353 (("def test(_frozen)" _ m)
18354 (string-append "def guix_skip" m)))
18355
18356 ;; These tests fail because we don't run the tests from the build
18357 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
18358 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
18359 (substitute* "numba/tests/test_pycc.py"
18360 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
18361 (string-append "def guix_skip" m)))
18362
18363 ;; These tests fail because our version of Python does not have
18364 ;; a recognizable front-end for the Numba distribution to use
18365 ;; to check against.
18366 (substitute* "numba/tests/test_entrypoints.py"
18367 (("def test(_init_entrypoint)" _ m)
18368 (string-append "def guix_skip" m)))
18369 (substitute* "numba/tests/test_jitclasses.py"
18370 (("def test(_jitclass_longlabel_not_truncated)" _ m)
18371 (string-append "def guix_skip" m)))
18372 #t))
18373 (replace 'check
18374 (lambda _
18375 (let ((cwd (getcwd)))
18376 (setenv "PYTHONPATH"
18377 (string-append cwd "/build/"
18378 (find (cut string-prefix? "lib" <>)
18379 (scandir (string-append cwd "/build")))
18380 ":"
18381 (getenv "PYTHONPATH")))
18382 ;; Something is wrong with the PYTHONPATH when running the
18383 ;; tests from the build directory, as it complains about not being
18384 ;; able to import certain modules.
18385 (with-directory-excursion "/tmp"
18386 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
18387 #t)))))
18388 (propagated-inputs
18389 `(("python-llvmlite" ,python-llvmlite)
18390 ("python-numpy" ,python-numpy)
18391 ("python-singledispatch" ,python-singledispatch)))
18392 ;; Needed for tests.
18393 (inputs
18394 `(("python-jinja2" ,python-jinja2)
18395 ("python-pygments" ,python-pygments)))
18396 (home-page "https://numba.pydata.org")
18397 (synopsis "Compile Python code using LLVM")
18398 (description "Numba gives you the power to speed up your applications with
18399 high performance functions written directly in Python. With a few
18400 annotations, array-oriented and math-heavy Python code can be just-in-time
18401 compiled to native machine instructions, similar in performance to C, C++ and
18402 Fortran, without having to switch languages or Python interpreters.
18403
18404 Numba works by generating optimized machine code using the LLVM compiler
18405 infrastructure at import time, runtime, or statically (using the included pycc
18406 tool).")
18407 (license license:bsd-3)))
18408
18409 (define-public python-numcodecs
18410 (package
18411 (name "python-numcodecs")
18412 (version "0.6.4")
18413 (source
18414 (origin
18415 (method url-fetch)
18416 (uri (pypi-uri "numcodecs" version))
18417 (sha256
18418 (base32
18419 "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))))
18420 (build-system python-build-system)
18421 (propagated-inputs
18422 `(("python-numpy" ,python-numpy)
18423 ("python-msgpack" ,python-msgpack)))
18424 (native-inputs
18425 `(("python-pytest" ,python-pytest)
18426 ("python-setuptools-scm" ,python-setuptools-scm)))
18427 (home-page "https://github.com/zarr-developers/numcodecs")
18428 (synopsis "Buffer compression and transformation codecs")
18429 (description
18430 "This Python package provides buffer compression and transformation
18431 codecs for use in data storage and communication applications.")
18432 (license license:expat)))
18433
18434 (define-public python-asciitree
18435 (package
18436 (name "python-asciitree")
18437 (version "0.3.3")
18438 (source
18439 (origin
18440 (method url-fetch)
18441 (uri (pypi-uri "asciitree" version))
18442 (sha256
18443 (base32
18444 "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
18445 (build-system python-build-system)
18446 (home-page "https://github.com/mbr/asciitree")
18447 (synopsis "Draws ASCII trees")
18448 (description "This package draws tree structures using characters.")
18449 (license license:expat)))
18450
18451 (define-public python-zarr
18452 (package
18453 (name "python-zarr")
18454 (version "2.4.0")
18455 (source
18456 (origin
18457 (method url-fetch)
18458 (uri (pypi-uri "zarr" version))
18459 (sha256
18460 (base32
18461 "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
18462 (build-system python-build-system)
18463 (arguments
18464 `(#:phases
18465 (modify-phases %standard-phases
18466 (add-after 'unpack 'disable-service-tests
18467 (lambda _
18468 (setenv "ZARR_TEST_ABS" "0")
18469 (setenv "ZARR_TEST_MONGO" "0")
18470 (setenv "ZARR_TEST_REDIS" "0")
18471 #t))
18472 (replace 'check
18473 (lambda _
18474 (invoke "pytest" "-vv" "-k" "not lmdb")
18475 #t)))))
18476 (propagated-inputs
18477 `(("python-asciitree" ,python-asciitree)
18478 ("python-fasteners" ,python-fasteners)
18479 ("python-numcodecs" ,python-numcodecs)
18480 ("python-numpy" ,python-numpy)))
18481 (native-inputs
18482 `(("python-pytest" ,python-pytest)
18483 ("python-setuptools-scm" ,python-setuptools-scm)))
18484 (home-page "https://github.com/zarr-developers/zarr-python")
18485 (synopsis "Chunked, compressed, N-dimensional arrays for Python")
18486 (description
18487 "This package provides an implementation of chunked, compressed,
18488 N-dimensional arrays for Python.")
18489 (license license:expat)))
18490
18491 (define-public python-anndata
18492 (package
18493 (name "python-anndata")
18494 (version "0.7.1")
18495 (source
18496 (origin
18497 (method url-fetch)
18498 (uri (pypi-uri "anndata" version))
18499 (sha256
18500 (base32
18501 "0rnfbpr55j1a1bi2kd4mz444741hrn74kz90h5rnjr59jmpfnh09"))))
18502 (build-system python-build-system)
18503 (arguments
18504 `(#:phases
18505 (modify-phases %standard-phases
18506 (add-after 'unpack 'delete-inconvenient-tests
18507 (lambda _
18508 ;; This test depends on python-scikit-learn.
18509 (delete-file "anndata/tests/test_inplace_subset.py")
18510 #t))
18511 (delete 'check)
18512 (add-after 'install 'check
18513 (lambda* (#:key inputs outputs #:allow-other-keys)
18514 (add-installed-pythonpath inputs outputs)
18515 (invoke "pytest" "-vv"))))))
18516 (propagated-inputs
18517 `(("python-h5py" ,python-h5py)
18518 ("python-importlib-metadata" ,python-importlib-metadata)
18519 ("python-natsort" ,python-natsort)
18520 ("python-numcodecs" ,python-numcodecs)
18521 ("python-packaging" ,python-packaging)
18522 ("python-pandas" ,python-pandas)
18523 ("python-scipy" ,python-scipy)
18524 ("python-zarr" ,python-zarr)))
18525 (native-inputs
18526 `(("python-joblib" ,python-joblib)
18527 ("python-pytest" ,python-pytest)
18528 ("python-setuptools-scm" ,python-setuptools-scm)))
18529 (home-page "https://github.com/theislab/anndata")
18530 (synopsis "Annotated data for data analysis pipelines")
18531 (description "Anndata is a package for simple (functional) high-level APIs
18532 for data analysis pipelines. In this context, it provides an efficient,
18533 scalable way of keeping track of data together with learned annotations and
18534 reduces the code overhead typically encountered when using a mostly
18535 object-oriented library such as @code{scikit-learn}.")
18536 (license license:bsd-3)))
18537
18538 (define-public python-dill
18539 (package
18540 (name "python-dill")
18541 (version "0.3.1.1")
18542 (source
18543 (origin
18544 (method url-fetch)
18545 (uri (pypi-uri "dill" version))
18546 (sha256
18547 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
18548 (build-system python-build-system)
18549 (arguments
18550 `(#:phases
18551 (modify-phases %standard-phases
18552 (replace 'check
18553 (lambda _
18554 (with-directory-excursion "/tmp"
18555 (invoke "nosetests" "-v"))
18556 #t)))))
18557 (native-inputs
18558 `(("python-nose" ,python-nose)))
18559 (home-page "https://pypi.org/project/dill/")
18560 (synopsis "Serialize all of Python")
18561 (description "Dill extends Python's @code{pickle} module for serializing
18562 and de-serializing Python objects to the majority of the built-in Python
18563 types. Dill provides the user the same interface as the @code{pickle} module,
18564 and also includes some additional features. In addition to pickling Python
18565 objects, @code{dill} provides the ability to save the state of an interpreter
18566 session in a single command. Hence, it would be feasible to save a
18567 interpreter session, close the interpreter, ship the pickled file to another
18568 computer, open a new interpreter, unpickle the session and thus continue from
18569 the saved state of the original interpreter session.")
18570 (license license:bsd-3)))
18571
18572 (define-public python-multiprocess
18573 (package
18574 (name "python-multiprocess")
18575 (version "0.70.9")
18576 (source
18577 (origin
18578 (method url-fetch)
18579 (uri (pypi-uri "multiprocess" version))
18580 (sha256
18581 (base32
18582 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
18583 (build-system python-build-system)
18584 (arguments
18585 `(#:phases
18586 (modify-phases %standard-phases
18587 (add-after 'unpack 'disable-broken-tests
18588 (lambda _
18589 ;; This test is broken as there is no keyboard interrupt.
18590 (substitute* "py3.7/multiprocess/tests/__init__.py"
18591 (("^(.*)def test_wait_result"
18592 line indent)
18593 (string-append indent
18594 "@unittest.skip(\"Disabled by Guix\")\n"
18595 line)))
18596 #t))
18597 ;; Tests must be run after installation.
18598 (delete 'check)
18599 (add-after 'install 'check
18600 (lambda* (#:key inputs outputs #:allow-other-keys)
18601 (add-installed-pythonpath inputs outputs)
18602 (invoke "python" "-m" "multiprocess.tests")
18603 #t)))))
18604 (propagated-inputs
18605 `(("python-dill" ,python-dill)))
18606 (home-page "https://pypi.org/project/multiprocess/")
18607 (synopsis "Multiprocessing and multithreading in Python")
18608 (description
18609 "This package is a fork of the multiprocessing Python package, a package
18610 which supports the spawning of processes using the API of the standard
18611 library's @code{threading} module.")
18612 (license license:bsd-3)))
18613
18614 (define-public python-toolz
18615 (package
18616 (name "python-toolz")
18617 (version "0.9.0")
18618 (source
18619 (origin
18620 (method url-fetch)
18621 (uri (pypi-uri "toolz" version))
18622 (sha256
18623 (base32
18624 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
18625 (build-system python-build-system)
18626 ;; FIXME: tests cannot be computed: "Can't perform this operation for
18627 ;; unregistered loader type"
18628 (arguments '(#:tests? #f))
18629 (home-page "https://github.com/pytoolz/toolz/")
18630 (synopsis "List processing tools and functional utilities")
18631 (description
18632 "This package provides a set of utility functions for iterators,
18633 functions, and dictionaries.")
18634 (license license:bsd-3)))
18635
18636 (define-public python2-toolz
18637 (package-with-python2 python-toolz))
18638
18639 (define-public python-cytoolz
18640 (package
18641 (name "python-cytoolz")
18642 (version "0.9.0.1")
18643 (source
18644 (origin
18645 (method url-fetch)
18646 (uri (pypi-uri "cytoolz" version))
18647 (sha256
18648 (base32
18649 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
18650 (build-system python-build-system)
18651 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
18652 ;; 'exceptions'"
18653 (arguments '(#:tests? #f))
18654 (propagated-inputs
18655 `(("python-toolz" ,python-toolz)))
18656 (native-inputs
18657 `(("python-cython" ,python-cython)))
18658 (home-page "https://github.com/pytoolz/cytoolz")
18659 (synopsis "High performance functional utilities")
18660 (description
18661 "The cytoolz package implements the same API as provided by toolz. The
18662 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
18663 that is accessible to other projects developed in Cython.")
18664 (license license:bsd-3)))
18665
18666 (define-public python-sortedcontainers
18667 (package
18668 (name "python-sortedcontainers")
18669 (version "2.1.0")
18670 (source
18671 (origin
18672 (method url-fetch)
18673 (uri (pypi-uri "sortedcontainers" version))
18674 (sha256
18675 (base32
18676 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
18677 (build-system python-build-system)
18678 (arguments
18679 ;; FIXME: Tests require many extra dependencies, and would introduce
18680 ;; a circular dependency on hypothesis, which uses this package.
18681 '(#:tests? #f))
18682 (propagated-inputs
18683 `(("python-appdirs" ,python-appdirs)
18684 ("python-distlib" ,python-distlib)
18685 ("python-filelock" ,python-filelock)
18686 ("python-six" ,python-six-bootstrap)))
18687 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
18688 (synopsis "Sorted List, Sorted Dict, Sorted Set")
18689 (description
18690 "This package provides a sorted collections library, written in
18691 pure-Python.")
18692 (license license:asl2.0)))
18693
18694 (define-public python2-sortedcontainers
18695 (package-with-python2 python-sortedcontainers))
18696
18697 (define-public python-cloudpickle
18698 (package
18699 (name "python-cloudpickle")
18700 (version "1.3.0")
18701 (source
18702 (origin
18703 (method url-fetch)
18704 (uri (pypi-uri "cloudpickle" version))
18705 (sha256
18706 (base32
18707 "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
18708 (build-system python-build-system)
18709 (arguments
18710 '(#:phases (modify-phases %standard-phases
18711 (add-before 'check 'do-not-override-PYTHONPATH
18712 (lambda _
18713 ;; Append to PYTHONPATH instead of overriding it so
18714 ;; that dependencies from Guix can be found.
18715 (substitute* "tests/testutils.py"
18716 (("env\\['PYTHONPATH'\\] = pythonpath")
18717 "env['PYTHONPATH'] += os.pathsep + pythonpath"))
18718 #t))
18719 (replace 'check
18720 (lambda* (#:key tests? #:allow-other-keys)
18721 (if tests?
18722 (invoke "pytest" "-s" "-vv")
18723 (format #t "test suite not run~%"))
18724 #t)))))
18725 (native-inputs
18726 `(;; For tests.
18727 ("python-psutil" ,python-psutil)
18728 ("python-pytest" ,python-pytest)
18729 ("python-tornado" ,python-tornado)))
18730 (home-page "https://github.com/cloudpipe/cloudpickle")
18731 (synopsis "Extended pickling support for Python objects")
18732 (description
18733 "Cloudpickle makes it possible to serialize Python constructs not
18734 supported by the default pickle module from the Python standard library. It
18735 is especially useful for cluster computing where Python expressions are
18736 shipped over the network to execute on remote hosts, possibly close to the
18737 data.")
18738 (properties `((python2-variant . ,(delay python2-cloudpickle))))
18739 (license license:bsd-3)))
18740
18741 (define-public python2-cloudpickle
18742 (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
18743 (package
18744 (inherit base)
18745 (native-inputs
18746 `(("python-mock" ,python2-mock)
18747 ,@(package-native-inputs base)))
18748 (propagated-inputs
18749 `(("python-futures" ,python2-futures)
18750 ,@(package-propagated-inputs base))))))
18751
18752 (define-public python-locket
18753 (package
18754 (name "python-locket")
18755 (version "0.2.0")
18756 (source
18757 (origin
18758 (method url-fetch)
18759 (uri (pypi-uri "locket" version))
18760 (sha256
18761 (base32
18762 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
18763 (build-system python-build-system)
18764 (home-page "https://github.com/mwilliamson/locket.py")
18765 (synopsis "File-based locks for Python")
18766 (description
18767 "Locket implements a lock that can be used by multiple processes provided
18768 they use the same path.")
18769 (license license:bsd-2)))
18770
18771 (define-public python2-locket
18772 (package-with-python2 python-locket))
18773
18774 (define-public python-blosc
18775 (package
18776 (name "python-blosc")
18777 (version "1.5.1")
18778 (source
18779 (origin
18780 (method url-fetch)
18781 (uri (pypi-uri "blosc" version))
18782 (sha256
18783 (base32
18784 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
18785 (build-system python-build-system)
18786 ;; FIXME: all tests pass, but then this error is printed:
18787 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
18788 (arguments '(#:tests? #f))
18789 (propagated-inputs
18790 `(("python-numpy" ,python-numpy)))
18791 (home-page "https://github.com/blosc/python-blosc")
18792 (synopsis "Python wrapper for the Blosc data compressor library")
18793 (description "Blosc is a high performance compressor optimized for binary
18794 data. It has been designed to transmit data to the processor cache faster
18795 than the traditional, non-compressed, direct memory fetch approach via a
18796 @code{memcpy()} system call.
18797
18798 Blosc works well for compressing numerical arrays that contains data with
18799 relatively low entropy, like sparse data, time series, grids with
18800 regular-spaced values, etc.
18801
18802 This Python package wraps the Blosc library.")
18803 (license license:bsd-3)))
18804
18805 (define-public python2-blosc
18806 (package-with-python2 python-blosc))
18807
18808 (define-public python-partd
18809 (package
18810 (name "python-partd")
18811 (version "0.3.9")
18812 (source
18813 (origin
18814 (method url-fetch)
18815 (uri (pypi-uri "partd" version))
18816 (sha256
18817 (base32
18818 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
18819 (build-system python-build-system)
18820 (propagated-inputs
18821 `(("python-blosc" ,python-blosc)
18822 ("python-locket" ,python-locket)
18823 ("python-numpy" ,python-numpy)
18824 ("python-pandas" ,python-pandas)
18825 ("python-pyzmq" ,python-pyzmq)
18826 ("python-toolz" ,python-toolz)))
18827 (home-page "https://github.com/dask/partd/")
18828 (synopsis "Appendable key-value storage")
18829 (description "Partd stores key-value pairs. Values are raw bytes. We
18830 append on old values. Partd excels at shuffling operations.")
18831 (license license:bsd-3)))
18832
18833 (define-public python2-partd
18834 (package-with-python2 python-partd))
18835
18836 (define-public python-fsspec
18837 (package
18838 (name "python-fsspec")
18839 (version "0.6.1")
18840 (source
18841 (origin
18842 (method url-fetch)
18843 (uri (pypi-uri "fsspec" version))
18844 (sha256
18845 (base32
18846 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
18847 (build-system python-build-system)
18848 (arguments '(#:tests? #f)) ; there are none
18849 (home-page "https://github.com/intake/filesystem_spec")
18850 (synopsis "File-system specification")
18851 (description "The purpose of this package is to produce a template or
18852 specification for a file-system interface, that specific implementations
18853 should follow, so that applications making use of them can rely on a common
18854 behavior and not have to worry about the specific internal implementation
18855 decisions with any given backend.")
18856 (license license:bsd-3)))
18857
18858 (define-public python-dask
18859 (package
18860 (name "python-dask")
18861 (version "2.14.0")
18862 (source
18863 (origin
18864 (method url-fetch)
18865 (uri (pypi-uri "dask" version))
18866 (sha256
18867 (base32 "031j0j26s0675v0isyps2dphm03330n7dy8ifdy70jgvf78d119q"))))
18868 (build-system python-build-system)
18869 (arguments
18870 `(#:phases
18871 (modify-phases %standard-phases
18872 (add-after 'unpack 'disable-broken-tests
18873 (lambda _
18874 ;; This test is marked as xfail when pytest-xdist is used.
18875 (substitute* "dask/tests/test_threaded.py"
18876 (("def test_interrupt\\(\\)" m)
18877 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
18878 m)))
18879 ;; This one fails with a type error:
18880 ;; TypeError: Already tz-aware, use tz_convert to convert.
18881 (substitute* "dask/dataframe/tests/test_shuffle.py"
18882 (("def test_set_index_timestamp\\(\\)" m)
18883 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
18884 m)))
18885 #t))
18886 (replace 'check
18887 (lambda _ (invoke "pytest" "-vv"))))))
18888 (propagated-inputs
18889 `(("python-cloudpickle" ,python-cloudpickle)
18890 ("python-fsspec" ,python-fsspec)
18891 ("python-numpy" ,python-numpy)
18892 ("python-packaging" ,python-packaging)
18893 ("python-pandas" ,python-pandas)
18894 ("python-partd" ,python-partd)
18895 ("python-toolz" ,python-toolz)
18896 ("python-pyyaml" ,python-pyyaml)))
18897 (native-inputs
18898 `(("python-pytest" ,python-pytest)
18899 ("python-pytest-runner" ,python-pytest-runner)))
18900 (home-page "https://github.com/dask/dask/")
18901 (synopsis "Parallel computing with task scheduling")
18902 (description
18903 "Dask is a flexible parallel computing library for analytics. It
18904 consists of two components: dynamic task scheduling optimized for computation,
18905 and large data collections like parallel arrays, dataframes, and lists that
18906 extend common interfaces like NumPy, Pandas, or Python iterators to
18907 larger-than-memory or distributed environments. These parallel collections
18908 run on top of the dynamic task schedulers. ")
18909 (license license:bsd-3)))
18910
18911 (define-public python-ilinkedlist
18912 (package
18913 (name "python-ilinkedlist")
18914 (version "0.4.0")
18915 (source
18916 (origin
18917 (method url-fetch)
18918 (uri (pypi-uri "ilinkedlist" version))
18919 (sha256
18920 (base32
18921 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
18922 (build-system python-build-system)
18923 (native-inputs `(("python-pytest" ,python-pytest)))
18924 (inputs `(("python" ,python)))
18925 (home-page "https://github.com/luther9/ilinkedlist-py")
18926 (synopsis "Immutable linked list library")
18927 (description
18928 "This is a implementation of immutable linked lists for Python. It
18929 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
18930 Since a linked list is treated as immutable, it is hashable, and its length
18931 can be retrieved in constant time. Some of the terminology is inspired by
18932 LISP. It is possible to create an improper list by creating a @code{Pair}
18933 with a non-list @code{cdr}.")
18934 (license license:gpl3+)))
18935
18936 (define-public python-readlike
18937 (package
18938 (name "python-readlike")
18939 (version "0.1.3")
18940 (source
18941 (origin
18942 (method url-fetch)
18943 (uri (pypi-uri "readlike" version))
18944 (sha256
18945 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
18946 (build-system python-build-system)
18947 (home-page "https://github.com/jangler/readlike")
18948 (synopsis "GNU Readline-like line editing module")
18949 (description
18950 "This Python module provides line editing functions similar to the default
18951 Emacs-style ones of GNU Readline. Unlike the Python standard library's
18952 @code{readline} package, this one allows access to those capabilties in settings
18953 outside of a standard command-line interface. It is especially well-suited to
18954 interfacing with Urwid, due to a shared syntax for describing key inputs.
18955
18956 Currently, all stateless Readline commands are implemented. Yanking and history
18957 are not supported.")
18958 (license license:expat)))
18959
18960 (define-public python2-readlike
18961 (package-with-python2 python-readlike))
18962
18963 (define-public python-reparser
18964 (package
18965 (name "python-reparser")
18966 (version "1.4.3")
18967 (source
18968 (origin
18969 (method url-fetch)
18970 (uri (pypi-uri "ReParser" version))
18971 (sha256
18972 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
18973 (build-system python-build-system)
18974 (home-page "https://github.com/xmikos/reparser")
18975 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
18976 (description
18977 "This Python library provides a simple lexer/parser for inline markup based
18978 on regular expressions.")
18979 (license license:expat)))
18980
18981 (define-public python2-reparser
18982 (let ((reparser (package-with-python2
18983 (strip-python2-variant python-reparser))))
18984 (package (inherit reparser)
18985 (propagated-inputs
18986 `(("python2-enum34" ,python2-enum34)
18987 ,@(package-propagated-inputs reparser))))))
18988
18989 (define-public python-retrying
18990 (package
18991 (name "python-retrying")
18992 (version "1.3.3")
18993 (source
18994 (origin
18995 (method git-fetch)
18996 (uri (git-reference
18997 (url "https://github.com/rholder/retrying")
18998 (commit (string-append "v" version))))
18999 (file-name (git-file-name name version))
19000 (sha256
19001 (base32
19002 "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
19003 (build-system python-build-system)
19004 (propagated-inputs
19005 `(("python-six" ,python-six)))
19006 (home-page "https://github.com/rholder/retrying")
19007 (synopsis "Library for adding retry behavior")
19008 (description "Retrying is a general-purpose retrying library to simplify
19009 the task of adding retry behavior to just about anything.
19010
19011 Features:
19012
19013 @itemize
19014 @item Generic Decorator API.
19015 @item Specify stop condition (i.e. limit by number of attempts).
19016 @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
19017 @item Customize retrying on Exceptions.
19018 @item Customize retrying on expected returned result.
19019 @end itemize")
19020 (license license:asl2.0)))
19021
19022 (define-public python-precis-i18n
19023 (package
19024 (name "python-precis-i18n")
19025 (version "1.0.0")
19026 (source
19027 (origin
19028 (method url-fetch)
19029 (uri (pypi-uri "precis_i18n" version))
19030 (sha256
19031 (base32
19032 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
19033 (build-system python-build-system)
19034 (home-page "https://github.com/byllyfish/precis_i18n")
19035 (synopsis "Implementation of the PRECIS framework")
19036 (description
19037 "This module implements the PRECIS Framework as described in RFC 8264,
19038 RFC 8265 and RFC 8266.")
19039 (license license:expat)))
19040
19041 (define-public python-absl-py
19042 (package
19043 (name "python-absl-py")
19044 (version "0.6.1")
19045 (source
19046 (origin
19047 (method url-fetch)
19048 (uri (pypi-uri "absl-py" version))
19049 (sha256
19050 (base32
19051 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
19052 (build-system python-build-system)
19053 (propagated-inputs
19054 `(("python-six" ,python-six)))
19055 (home-page "https://github.com/abseil/abseil-py")
19056 (synopsis "Abseil Python common libraries")
19057 (description
19058 "This package provides the Abseil Python Common Libraries, a collection
19059 of Python libraries for building Python applications.")
19060 (license license:asl2.0)))
19061
19062 (define-public python-astor
19063 (package
19064 (name "python-astor")
19065 (version "0.7.1")
19066 (source
19067 (origin
19068 (method url-fetch)
19069 (uri (pypi-uri "astor" version))
19070 (sha256
19071 (base32
19072 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
19073 (build-system python-build-system)
19074 ;; FIXME: There are two errors and two test failures.
19075 (arguments `(#:tests? #f))
19076 (home-page "https://github.com/berkerpeksag/astor")
19077 (synopsis "Read and write Python ASTs")
19078 (description "Astor is designed to allow easy manipulation of Python
19079 source via the Abstract Syntax Tree.")
19080 (license license:bsd-3)))
19081
19082 (define-public python2-astor
19083 (package-with-python2 python-astor))
19084
19085 (define-public python-astunparse
19086 (package
19087 (name "python-astunparse")
19088 (version "1.6.2")
19089 (source
19090 (origin
19091 (method url-fetch)
19092 (uri (pypi-uri "astunparse" version))
19093 (sha256
19094 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
19095 (build-system python-build-system)
19096 (arguments '(#:tests? #f)) ; there are none
19097 (propagated-inputs
19098 `(("python-six" ,python-six)
19099 ("python-wheel" ,python-wheel)))
19100 (home-page "https://github.com/simonpercivall/astunparse")
19101 (synopsis "AST unparser for Python")
19102 (description "This package provides an AST unparser for Python. It is a
19103 factored out version of @code{unparse} found in the Python source
19104 distribution.")
19105 (license license:bsd-3)))
19106
19107 (define-public python-gast
19108 (package
19109 (name "python-gast")
19110 (version "0.3.3")
19111 (source
19112 (origin
19113 (method url-fetch)
19114 (uri (pypi-uri "gast" version))
19115 (sha256
19116 (base32 "0mrvvfzqafj1wzd0xxfmjf4vphnlxypbhpic1m283aj9i8lfz0dq"))))
19117 (build-system python-build-system)
19118 (propagated-inputs
19119 `(("python-astunparse" ,python-astunparse)))
19120 (home-page "https://pypi.org/project/gast/")
19121 (synopsis "Generic Python AST that abstracts the underlying Python version")
19122 (description
19123 "GAST provides a compatibility layer between the AST of various Python
19124 versions, as produced by @code{ast.parse} from the standard @code{ast}
19125 module.")
19126 (license license:bsd-3)))
19127
19128 (define-public python-wikidata
19129 (package
19130 (name "python-wikidata")
19131 (version "0.6.1")
19132 (source
19133 (origin
19134 (method url-fetch)
19135 (uri (pypi-uri "Wikidata" version))
19136 (sha256
19137 (base32
19138 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
19139 (build-system python-build-system)
19140 (propagated-inputs
19141 `(("python-babel" ,python-babel)))
19142 (home-page "https://github.com/dahlia/wikidata")
19143 (synopsis "Wikidata client library")
19144 (description
19145 "This package provides a Python interface to
19146 @url{https://www.wikidata.org/, Wikidata}.")
19147 (properties '((upstream-name . "Wikidata")))
19148 (license license:gpl3+)))
19149
19150 (define-public python-doctest-ignore-unicode
19151 (package
19152 (name "python-doctest-ignore-unicode")
19153 (version "0.1.2")
19154 (source
19155 (origin
19156 (method url-fetch)
19157 (uri (pypi-uri "doctest-ignore-unicode" version))
19158 (sha256
19159 (base32
19160 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
19161 (build-system python-build-system)
19162 (native-inputs
19163 `(("python-nose" ,python-nose)))
19164 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
19165 (synopsis "Ignore Unicode literal prefixes in doctests")
19166 (description
19167 "This package adds support for a flag to ignore Unicode literal prefixes
19168 in doctests.")
19169 (license license:asl2.0)))
19170
19171 (define-public python-attr
19172 (package
19173 (name "python-attr")
19174 (version "0.3.1")
19175 (source
19176 (origin
19177 (method url-fetch)
19178 (uri (pypi-uri "attr" version))
19179 (sha256
19180 (base32
19181 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
19182 (build-system python-build-system)
19183 (home-page "https://github.com/denis-ryzhkov/attr")
19184 (synopsis "Decorator for attributes of target function or class")
19185 (description "Simple decorator to set attributes of target function or
19186 class in a @acronym{DRY, Don't Repeat Yourself} way.")
19187 (license license:expat)))
19188
19189 (define-public python-construct
19190 (package
19191 (name "python-construct")
19192 (version "2.10.56")
19193 (source
19194 (origin
19195 (method url-fetch)
19196 (uri (pypi-uri "construct" version))
19197 (sha256
19198 (base32
19199 "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
19200 (build-system python-build-system)
19201 (arguments
19202 `(#:tests? #f)) ; No tests exist.
19203 (propagated-inputs
19204 `(("python-extras" ,python-extras)
19205 ("python-arrow" ,python-arrow)
19206 ("python-numpy" ,python-numpy)
19207 ("python-ruamel.yaml" ,python-ruamel.yaml)))
19208 (home-page "https://construct.readthedocs.io")
19209 (synopsis "Declarative and symmetrical parser and builder for binary data")
19210 (description
19211 "This package provides both simple, atomic constructs (such as
19212 integers of various sizes), as well as composite ones which allow you
19213 form hierarchical and sequential structures of increasing complexity.
19214 It features bit and byte granularity, easy debugging and testing, an
19215 easy-to-extend subclass system, and lots of primitive constructs to
19216 make your work easier.")
19217 (license license:expat)))
19218
19219 (define-public python-outcome
19220 (package
19221 (name "python-outcome")
19222 (version "1.0.1")
19223 (source
19224 (origin
19225 (method url-fetch)
19226 (uri (pypi-uri "outcome" version))
19227 (sha256
19228 (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
19229 (build-system python-build-system)
19230 (arguments
19231 `(#:phases
19232 (modify-phases %standard-phases
19233 (replace 'check
19234 (lambda* (#:key inputs outputs #:allow-other-keys)
19235 (add-installed-pythonpath inputs outputs)
19236 (invoke "pytest" "-vv"))))))
19237 (native-inputs
19238 `(("python-pytest" ,python-pytest)
19239 ("python-pytest-cov" ,python-pytest-cov)
19240 ("python-pytest-asyncio" ,python-pytest-asyncio)))
19241 (propagated-inputs
19242 `(("python-async-generator" ,python-async-generator)
19243 ("python-attrs" ,python-attrs)))
19244 (home-page "https://github.com/python-trio/outcome")
19245 (synopsis "Capture the outcome of Python function calls")
19246 (description
19247 "Capture the outcome of Python function calls. Extracted from the Trio
19248 project.")
19249 ;; Either license applies.
19250 (license (list license:expat license:asl2.0))))
19251
19252 (define-public python-trio
19253 (package
19254 (name "python-trio")
19255 (version "0.16.0")
19256 (source
19257 (origin
19258 (method url-fetch)
19259 (uri (pypi-uri "trio" version))
19260 (sha256
19261 (base32 "0g6gkwz6i05rm9ym4l4imxakzld7qcgxhb21kprilchcav87s1nz"))))
19262 (build-system python-build-system)
19263 (arguments
19264 `(#:phases
19265 (modify-phases %standard-phases
19266 (add-before 'check 'change-home
19267 (lambda _
19268 ;; Tests require a writable home.
19269 (setenv "HOME" "/tmp")
19270 #t))
19271 (replace 'check
19272 (lambda _
19273 (invoke "pytest" "-vv" "-k"
19274 (string-append
19275 ;; This test times out.
19276 "not test_ki_protection_works"
19277 ;; Assertion errors.
19278 " and not test_guest_mode_ki"
19279 " and not test_run_in_trio_thread_ki"
19280 ;; These try to raise KeyboardInterrupt which does not work
19281 ;; in the build environment.
19282 " and not test_ki_self"
19283 " and not test_ki_wakes_us_up"
19284 ;; Failure in name resolution.
19285 " and not test_getnameinfo"
19286 " and not test_SocketType_resolve"
19287 ;; OSError: protocol not found.
19288 " and not test_getprotobyname")))))))
19289 (native-inputs
19290 `(("python-astor" ,python-astor)
19291 ("python-ipython" ,python-ipython)
19292 ("python-jedi" ,python-jedi)
19293 ("python-pylint" ,python-pylint)
19294 ("python-pyopenssl" ,python-pyopenssl)
19295 ("python-pytest" ,python-pytest)
19296 ("python-pytest-cov" ,python-pytest-cov)
19297 ("python-trustme" ,python-trustme)))
19298 (propagated-inputs
19299 `(("python-attrs" ,python-attrs)
19300 ("python-idna" ,python-idna)
19301 ("python-outcome" ,python-outcome)
19302 ("python-sniffio" ,python-sniffio)
19303 ("python-sortedcontainers"
19304 ,python-sortedcontainers)))
19305 (home-page "https://github.com/python-trio/trio")
19306 (synopsis "Friendly Python library for async concurrency and I/O")
19307 (description
19308 "Trio strives to be a production-quality, async/await-native I/O library
19309 for Python. Like all async libraries, its main purpose is to help you write
19310 programs that do multiple things at the same time with parallelized I/O.")
19311 ;; Either license applies.
19312 (license (list license:expat license:asl2.0))))
19313
19314 (define-public python-trio-typing
19315 (package
19316 (name "python-trio-typing")
19317 (version "0.5.0")
19318 (source
19319 (origin
19320 (method url-fetch)
19321 (uri (pypi-uri "trio-typing" version))
19322 (sha256
19323 (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
19324 (build-system python-build-system)
19325 (arguments
19326 `(#:phases
19327 (modify-phases %standard-phases
19328 (replace 'check
19329 (lambda _
19330 (invoke "pytest" "-vv"))))))
19331 (native-inputs
19332 `(("python-attrs" ,python-attrs)
19333 ("python-pytest" ,python-pytest)))
19334 (propagated-inputs
19335 `(("python-mypy" ,python-mypy)
19336 ("python-mypy-extensions"
19337 ,python-mypy-extensions)
19338 ("python-trio" ,python-trio)
19339 ("python-typing-extensions"
19340 ,python-typing-extensions)))
19341 (home-page "https://github.com/python-trio/trio-typing")
19342 (synopsis "Static type checking support for Trio and related projects")
19343 (description
19344 "This package provides:
19345
19346 @itemize
19347 @item PEP 561 typing stubs packages for the Trio project packages:
19348
19349 @itemize
19350 @item trio (@code{trio-stubs})
19351 @item outcome (@code{outcome-stubs})
19352 @item async_generator (@code{async_generator-stubs})
19353 @end itemize
19354
19355 @item A package @code{trio_typing} containing types that Trio programs often
19356 want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
19357 a mypy plugin that smooths over some limitations in the basic type hints.
19358 @end itemize")
19359 ;; Either license applies.
19360 (license (list license:expat license:asl2.0))))
19361
19362 (define-public python-humanize
19363 (package
19364 (name "python-humanize")
19365 (version "0.5.1")
19366 (source
19367 (origin
19368 (method url-fetch)
19369 (uri (pypi-uri "humanize" version))
19370 (sha256
19371 (base32
19372 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
19373 (arguments
19374 '(#:tests? #f)) ; tests not in pypi archive
19375 (build-system python-build-system)
19376 (home-page "https://github.com/jmoiron/humanize")
19377 (synopsis "Print numerical information in a human-readable form")
19378 (description "This package provides a Python module that displays numbers
19379 and dates in \"human readable\" forms. For example, it would display
19380 \"12345591313\" as \"12.3 billion\".")
19381 (license license:expat)))
19382
19383 (define-public python-txaio
19384 (package
19385 (name "python-txaio")
19386 (version "18.8.1")
19387 (source
19388 (origin
19389 (method url-fetch)
19390 (uri (pypi-uri "txaio" version))
19391 (sha256
19392 (base32
19393 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
19394 (build-system python-build-system)
19395 (propagated-inputs
19396 `(("python-twisted" ,python-twisted)
19397 ("python-six" ,python-six)))
19398 (home-page "https://github.com/crossbario/txaio")
19399 (synopsis "Compatibility layer between Python asyncio and Twisted")
19400 (description "Txaio provides a compatibility layer between the Python
19401 @code{asyncio} module and @code{Twisted}.")
19402 (license license:expat)))
19403
19404 (define-public python-toolshed
19405 (package
19406 (name "python-toolshed")
19407 (version "0.4.6")
19408 (source
19409 (origin
19410 (method url-fetch)
19411 (uri (pypi-uri "toolshed" version))
19412 (sha256
19413 (base32
19414 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
19415 (build-system python-build-system)
19416 (native-inputs
19417 `(("python-nose" ,python-nose)))
19418 (home-page "https://github.com/brentp/toolshed/")
19419 (synopsis "Collection of modules and functions for working with data")
19420 (description "This is a collection of well-tested, simple modules and
19421 functions that aim to reduce boilerplate when working with data.")
19422 (license license:bsd-2)))
19423
19424 (define-public python-annoy
19425 (package
19426 (name "python-annoy")
19427 (version "1.15.1")
19428 (source
19429 (origin
19430 (method url-fetch)
19431 (uri (pypi-uri "annoy" version))
19432 (sha256
19433 (base32
19434 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
19435 (build-system python-build-system)
19436 (native-inputs
19437 `(("python-nose" ,python-nose)))
19438 (home-page "https://github.com/spotify/annoy/")
19439 (synopsis "Approximate nearest neighbors library")
19440 (description
19441 "Annoy is a C++ library with Python bindings to search for points in
19442 space that are close to a given query point. It also creates large read-only
19443 file-based data structures that are @code{mmap}ped into memory so that many
19444 processes may share the same data.")
19445 (license license:asl2.0)))
19446
19447 (define-public python-pylzma
19448 (package
19449 (name "python-pylzma")
19450 (version "0.5.0")
19451 (source
19452 (origin
19453 (method url-fetch)
19454 (uri (pypi-uri "pylzma" version))
19455 (sha256
19456 (base32
19457 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
19458 (build-system python-build-system)
19459 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
19460 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
19461 (description "This package provides Python bindings for the LZMA library
19462 by Igor Pavlov.")
19463 (license license:lgpl2.1+)))
19464
19465 (define-public python2-pylzma
19466 (package-with-python2 python-pylzma))
19467
19468 (define-public python2-zeroconf
19469 (package
19470 (name "python2-zeroconf")
19471
19472 ;; This is the last version that supports Python 2.x.
19473 (version "0.19.1")
19474 (source
19475 (origin
19476 (method url-fetch)
19477 (uri (pypi-uri "zeroconf" version))
19478 (sha256
19479 (base32
19480 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
19481 (build-system python-build-system)
19482 (arguments
19483 `(#:python ,python-2
19484 #:phases
19485 (modify-phases %standard-phases
19486 (add-after 'unpack 'patch-requires
19487 (lambda* (#:key inputs #:allow-other-keys)
19488 (substitute* "setup.py"
19489 (("enum-compat")
19490 "enum34"))
19491 #t)))))
19492 (native-inputs
19493 `(("python2-six" ,python2-six)
19494 ("python2-enum32" ,python2-enum34)
19495 ("python2-netifaces" ,python2-netifaces)
19496 ("python2-typing" ,python2-typing)))
19497 (home-page "https://github.com/jstasiak/python-zeroconf")
19498 (synopsis "Pure Python mDNS service discovery")
19499 (description
19500 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
19501 compatible).")
19502 (license license:lgpl2.1+)))
19503
19504 (define-public python-bsddb3
19505 (package
19506 (name "python-bsddb3")
19507 (version "6.2.6")
19508 (source
19509 (origin
19510 (method url-fetch)
19511 (uri (pypi-uri "bsddb3" version))
19512 (sha256
19513 (base32
19514 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
19515 (build-system python-build-system)
19516 (inputs
19517 `(("bdb" ,bdb)))
19518 (arguments
19519 '(#:phases
19520 (modify-phases %standard-phases
19521 (add-after 'unpack 'configure-locations
19522 (lambda* (#:key inputs #:allow-other-keys)
19523 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
19524 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
19525 #t))
19526 (replace 'check
19527 (lambda _
19528 (invoke "python3" "test3.py" "-v"))))))
19529 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
19530 (synopsis "Python bindings for Oracle Berkeley DB")
19531 (description
19532 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
19533 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
19534 Transaction objects, and each of these is exposed as a Python type in the
19535 bsddb3.db module. The database objects can use various access methods: btree,
19536 hash, recno, and queue. Complete support of Berkeley DB distributed
19537 transactions. Complete support for Berkeley DB Replication Manager.
19538 Complete support for Berkeley DB Base Replication. Support for RPC.")
19539 (license license:bsd-3)))
19540
19541 (define-public python-dbfread
19542 (package
19543 (name "python-dbfread")
19544 (version "2.0.7")
19545 (source (origin
19546 (method url-fetch)
19547 (uri (pypi-uri "dbfread" version))
19548 (sha256
19549 (base32
19550 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
19551 (build-system python-build-system)
19552 (native-inputs
19553 `(("python-pytest" ,python-pytest)))
19554 (home-page "https://dbfread.readthedocs.io")
19555 (synopsis "Read DBF Files with Python")
19556 (description
19557 "This library reads DBF files and returns the data as native Python data
19558 types for further processing. It is primarily intended for batch jobs and
19559 one-off scripts.")
19560 (license license:expat)))
19561
19562 (define-public python-cached-property
19563 (package
19564 (name "python-cached-property")
19565 (version "1.5.1")
19566 (source
19567 (origin
19568 (method url-fetch)
19569 (uri (pypi-uri "cached-property" version))
19570 (sha256
19571 (base32
19572 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
19573 (build-system python-build-system)
19574 (arguments
19575 `(#:phases
19576 (modify-phases %standard-phases
19577 ;; https://github.com/pydanny/cached-property/issues/131
19578 ;; recent versions of freezegun break one test
19579 (add-after 'unpack 'disable-broken-test
19580 (lambda _
19581 (substitute* "tests/test_cached_property.py"
19582 (("def test_threads_ttl_expiry\\(self\\)" m)
19583 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
19584 " " m)))
19585 #t)))))
19586 (native-inputs
19587 `(("python-freezegun" ,python-freezegun)))
19588 (home-page
19589 "https://github.com/pydanny/cached-property")
19590 (synopsis
19591 "Decorator for caching properties in classes")
19592 (description
19593 "This package provides a decorator which makes caching
19594 time-or-computationally-expensive properties quick and easy and works in Python
19595 2 or 3.")
19596 (license license:bsd-3)))
19597
19598 (define-public python-folium
19599 (package
19600 (name "python-folium")
19601 (version "0.11.0")
19602 (source
19603 (origin
19604 (method url-fetch)
19605 (uri (pypi-uri "folium" version))
19606 (sha256
19607 (base32 "19sclsq3xcjfa7bavzjpyn6rl9b15jbc76n5aag4cwhqqamqj1sl"))))
19608 (build-system python-build-system)
19609 (propagated-inputs
19610 `(("python-branca" ,python-branca)
19611 ("python-jinja2" ,python-jinja2)
19612 ("python-numpy" ,python-numpy)
19613 ("python-requests" ,python-requests)))
19614 (native-inputs
19615 `(("python-pytest" ,python-pytest)))
19616 (home-page "https://github.com/python-visualization/folium")
19617 (synopsis "Make beautiful maps with Leaflet.js & Python")
19618 (description "@code{folium} makes it easy to visualize data that’s been
19619 manipulated in Python on an interactive leaflet map. It enables both the
19620 binding of data to a map for @code{choropleth} visualizations as well as
19621 passing rich vector/raster/HTML visualizations as markers on the map.
19622
19623 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
19624 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
19625 supports Image, Video, GeoJSON and TopoJSON overlays.")
19626 (license license:expat)))
19627
19628 (define-public jube
19629 (package
19630 ;; This is a command-line tool, so no "python-" prefix.
19631 (name "jube")
19632 (version "2.2.2")
19633 (source (origin
19634 (method url-fetch)
19635 (uri (string-append
19636 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
19637 version))
19638 (sha256
19639 (base32
19640 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
19641 (file-name (string-append "jube-" version ".tar.gz"))))
19642 (build-system python-build-system)
19643 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
19644 (synopsis "Benchmarking environment")
19645 (description
19646 "JUBE helps perform and analyze benchmarks in a systematic way. For each
19647 benchmarked application, benchmark data is stored in a format that allows JUBE
19648 to deduct the desired information. This data can be parsed by automatic pre-
19649 and post-processing scripts that draw information and store it more densely
19650 for manual interpretation.")
19651 (license license:gpl3+)))
19652
19653 (define-public python-pyroutelib3
19654 (package
19655 (name "python-pyroutelib3")
19656 (version "1.3.post1")
19657 (source
19658 (origin
19659 (method url-fetch)
19660 (uri (pypi-uri "pyroutelib3" version))
19661 (sha256
19662 (base32
19663 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
19664 (build-system python-build-system)
19665 (propagated-inputs
19666 `(("python-dateutil" ,python-dateutil)))
19667 (home-page "https://github.com/MKuranowski/pyroutelib3")
19668 (synopsis "Library for simple routing on OSM data")
19669 (description "Library for simple routing on OSM data")
19670 (license license:gpl3+)))
19671
19672 (define-public python-bibtexparser
19673 (package
19674 (name "python-bibtexparser")
19675 (version "1.1.0")
19676 (source
19677 (origin
19678 (method url-fetch)
19679 (uri (pypi-uri "bibtexparser" version))
19680 (sha256
19681 (base32
19682 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
19683 (build-system python-build-system)
19684 (propagated-inputs
19685 `(("python-pyparsing" ,python-pyparsing)))
19686 (native-inputs
19687 `(("python-future" ,python-future)))
19688 (home-page "https://github.com/sciunto-org/python-bibtexparser")
19689 (synopsis "Python library to parse BibTeX files")
19690 (description "BibtexParser is a Python library to parse BibTeX files.")
19691 (license (list license:bsd-3 license:lgpl3))))
19692
19693 (define-public python-distro
19694 (package
19695 (name "python-distro")
19696 (version "1.4.0")
19697 (source
19698 (origin
19699 (method url-fetch)
19700 (uri (pypi-uri "distro" version))
19701 (sha256
19702 (base32
19703 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
19704 (build-system python-build-system)
19705 (native-inputs
19706 `(("python-pytest" ,python-pytest)))
19707 (home-page "https://github.com/nir0s/distro")
19708 (synopsis
19709 "OS platform information API")
19710 (description
19711 "@code{distro} provides information about the OS distribution it runs on,
19712 such as a reliable machine-readable ID, or version information.
19713
19714 It is the recommended replacement for Python's original
19715 `platform.linux_distribution` function (which will be removed in Python 3.8).
19716 @code{distro} also provides a command-line interface to output the platform
19717 information in various formats.")
19718 (license license:asl2.0)))
19719
19720 (define-public python-cairosvg
19721 (package
19722 (name "python-cairosvg")
19723 (version "2.4.2")
19724 (source
19725 (origin
19726 (method url-fetch)
19727 (uri (pypi-uri "CairoSVG" version))
19728 (sha256
19729 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
19730 (build-system python-build-system)
19731 (arguments
19732 `(#:phases
19733 (modify-phases %standard-phases
19734 (replace 'check
19735 (lambda _ (invoke "pytest"))))))
19736 (propagated-inputs
19737 `(("python-cairocffi" ,python-cairocffi)
19738 ("python-cssselect2" ,python-cssselect2)
19739 ("python-defusedxml" ,python-defusedxml)
19740 ("python-pillow" ,python-pillow)
19741 ("python-tinycss2" ,python-tinycss2)))
19742 (native-inputs
19743 `(("python-pytest-flake8" ,python-pytest-flake8)
19744 ("python-pytest-isort" ,python-pytest-isort)
19745 ("python-pytest-runner" ,python-pytest-runner)))
19746 (home-page "https://cairosvg.org/")
19747 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
19748 (description "CairoSVG is a SVG converter based on Cairo. It can export
19749 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
19750 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
19751 parsed, the result is drawn to a Cairo surface that can be exported to
19752 qvarious formats: PDF, PostScript, PNG and even SVG.")
19753 (license license:lgpl3+)))
19754
19755 (define-public python-pyphen
19756 (package
19757 (name "python-pyphen")
19758 (version "0.9.5")
19759 (source
19760 (origin
19761 (method url-fetch)
19762 (uri (pypi-uri "Pyphen" version))
19763 (sha256
19764 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
19765 (build-system python-build-system)
19766 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
19767 ;; embedded set provided by upstream - like Debian does.
19768 (home-page "https://github.com/Kozea/Pyphen")
19769 (synopsis "Pure Python module to hyphenate text")
19770 (description "Pyphen is a pure Python module to hyphenate text using
19771 existing Hunspell hyphenation dictionaries.")
19772 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
19773
19774 (define-public python-intelhex
19775 (package
19776 (name "python-intelhex")
19777 (version "2.2.1")
19778 (source
19779 (origin
19780 (method url-fetch)
19781 (uri (pypi-uri "intelhex" version))
19782 (sha256
19783 (base32
19784 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
19785 (build-system python-build-system)
19786 (arguments '(#:tests? #f)) ;issue with version
19787 (home-page "https://pypi.org/project/IntelHex/")
19788 (synopsis "Python library for Intel HEX files manipulations")
19789 (description "The Intel HEX file format is widely used in microprocessors
19790 and microcontrollers area (embedded systems etc.) as the de facto standard for
19791 representation of code to be programmed into microelectronic devices. This
19792 package provides an intelhex Python library to read, write, create from
19793 scratch and manipulate data from Intel HEX file format. It also includes
19794 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
19795 converters and more, those based on the library itself.")
19796 (license license:bsd-3)))
19797
19798 (define-public python-pykwalify
19799 (package
19800 (name "python-pykwalify")
19801 (version "1.7.0")
19802 (source
19803 (origin
19804 (method url-fetch)
19805 (uri (pypi-uri "pykwalify" version))
19806 (sha256
19807 (base32
19808 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
19809 (build-system python-build-system)
19810 (arguments '(#:tests? #f)) ;missing dependencies
19811 (propagated-inputs
19812 `(("python-dateutil" ,python-dateutil)
19813 ("python-docopt" ,python-docopt)
19814 ("python-pyyaml" ,python-pyyaml)))
19815 (home-page "https://github.com/grokzen/pykwalify")
19816 (synopsis
19817 "Python lib/cli for JSON/YAML schema validation")
19818 (description
19819 "This package provides a parser, schema validator, and data binding tool
19820 for YAML and JSON.")
19821 (license license:expat)))
19822
19823 (define-public python-dbusmock
19824 (package
19825 (name "python-dbusmock")
19826 (version "0.18.3")
19827 (source
19828 (origin
19829 (method url-fetch)
19830 (uri (pypi-uri "python-dbusmock" version))
19831 (sha256
19832 (base32
19833 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
19834 (build-system python-build-system)
19835 (arguments
19836 '(#:phases
19837 (modify-phases %standard-phases
19838 (add-after 'unpack 'patch-shell-path
19839 (lambda _
19840 (substitute* "tests/test_code.py"
19841 (("/bin/bash") (which "bash")))
19842 #t)))))
19843 (native-inputs
19844 `(;; For tests.
19845 ("dbus" ,dbus) ; for dbus-daemon
19846 ("python-nose" ,python-nose)
19847 ("which" ,which)))
19848 (propagated-inputs
19849 `(("python-dbus" ,python-dbus)
19850 ("python-pygobject" ,python-pygobject)))
19851 (home-page "https://github.com/martinpitt/python-dbusmock")
19852 (synopsis "Python library for mock D-Bus objects")
19853 (description "python-dbusmock allows for the easy creation of mock objects on
19854 D-Bus. This is useful for writing tests for software which talks to D-Bus
19855 services such as upower, systemd, logind, gnome-session or others, and it is
19856 hard (or impossible without root privileges) to set the state of the real
19857 services to what you expect in your tests.")
19858 (license license:lgpl3+)))
19859
19860 (define-public python-ujson
19861 (package
19862 (name "python-ujson")
19863 (version "2.0.3")
19864 (source
19865 (origin
19866 (method url-fetch)
19867 (uri (pypi-uri "ujson" version))
19868 (sha256
19869 (base32
19870 "18z9gb9ggy1r464b9q1gqs078mqgrkj6dys5a47529rqk3yfybdx"))
19871 (modules '((guix build utils)))
19872 (snippet
19873 '(begin (delete-file-recursively "deps") #t))))
19874 (build-system python-build-system)
19875 (arguments
19876 `(#:phases
19877 (modify-phases %standard-phases
19878 (add-after 'unpack 'link-to-system-double-conversion
19879 (lambda* (#:key inputs #:allow-other-keys)
19880 (let ((d-c (assoc-ref inputs "double-conversion")))
19881 (substitute* "setup.py"
19882 (("./deps/double-conversion/double-conversion\"")
19883 (string-append d-c "/include/double-conversion\""))
19884 (("-lstdc++" stdc)
19885 (string-append "-L" d-c "/lib\","
19886 " \"-ldouble-conversion\","
19887 " \"" stdc)))
19888 #t)))
19889 (replace 'check
19890 (lambda* (#:key inputs outputs #:allow-other-keys)
19891 (add-installed-pythonpath inputs outputs)
19892 (invoke "pytest"))))))
19893 (native-inputs
19894 `(("double-conversion" ,double-conversion)
19895 ("python-setuptools-scm" ,python-setuptools-scm)
19896 ("python-pytest" ,python-pytest)))
19897 (home-page "https://github.com/ultrajson/ultrajson")
19898 (synopsis "Ultra fast JSON encoder and decoder for Python")
19899 (description
19900 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
19901 bindings for Python 3.")
19902 (license license:bsd-3)))
19903
19904 (define-public python-ujson-1
19905 (package
19906 (inherit python-ujson)
19907 (version "1.35")
19908 (source
19909 (origin
19910 (method url-fetch)
19911 (uri (pypi-uri "ujson" version))
19912 (sha256
19913 (base32
19914 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
19915 (arguments
19916 '(#:phases %standard-phases))
19917 (native-inputs '())
19918 (home-page "http://www.esn.me")
19919 (description
19920 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
19921 bindings for Python 2.5+ and 3.")))
19922
19923 (define-public python2-ujson-1
19924 (package-with-python2 python-ujson-1))
19925
19926 (define-public python-iocapture
19927 ;; The latest release is more than a year older than this commit.
19928 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
19929 (revision "1"))
19930 (package
19931 (name "python-iocapture")
19932 (version "0.1.2")
19933 (source
19934 (origin
19935 (method git-fetch)
19936 (uri (git-reference
19937 (url "https://github.com/oinume/iocapture")
19938 (commit commit)))
19939 (file-name (git-file-name name version))
19940 (sha256
19941 (base32
19942 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
19943 (build-system python-build-system)
19944 (arguments
19945 `(#:phases
19946 (modify-phases %standard-phases
19947 (delete 'check)
19948 (add-after 'install 'check
19949 (lambda* (#:key inputs outputs #:allow-other-keys)
19950 (add-installed-pythonpath inputs outputs)
19951 (invoke "py.test" "-v" "tests")
19952 #t)))))
19953 (propagated-inputs
19954 `(("python-flexmock" ,python-flexmock)
19955 ("python-pytest" ,python-pytest)
19956 ("python-pytest-cov" ,python-pytest-cov)
19957 ("python-six" ,python-six)))
19958 (home-page "https://github.com/oinume/iocapture")
19959 (synopsis "Python capturing tool for stdout and stderr")
19960 (description
19961 "This package helps you to capture the standard out (stdout) and the
19962 standard error channel (stderr) in your program.")
19963 (license license:expat))))
19964
19965 (define-public python-argh
19966 ;; There are 21 commits since the latest release containing important
19967 ;; improvements.
19968 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
19969 (revision "1"))
19970 (package
19971 (name "python-argh")
19972 (version (git-version "0.26.2" revision commit))
19973 (source
19974 (origin
19975 (method git-fetch)
19976 (uri (git-reference
19977 (url "https://github.com/neithere/argh")
19978 (commit commit)))
19979 (file-name (git-file-name name version))
19980 (sha256
19981 (base32
19982 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
19983 (build-system python-build-system)
19984 (propagated-inputs
19985 `(("python-iocapture" ,python-iocapture)
19986 ("python-mock" ,python-mock)
19987 ("python-pytest" ,python-pytest)
19988 ("python-pytest-cov" ,python-pytest-cov)
19989 ("python-pytest-xdist" ,python-pytest-xdist)
19990 ("python-tox" ,python-tox)))
19991 (home-page "https://github.com/neithere/argh/")
19992 (synopsis "Argparse wrapper with natural syntax")
19993 (description
19994 "python-argh is a small library that provides several layers of
19995 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
19996 always possible to declare a command with the highest possible (and least
19997 flexible) layer and then tune the behaviour with any of the lower layers
19998 including the native API of @code{python-argparse}.")
19999 (license license:lgpl3+))))
20000
20001 (define-public python-ppft
20002 (package
20003 (name "python-ppft")
20004 (version "1.6.6.1")
20005 (source
20006 (origin
20007 (method url-fetch)
20008 (uri (pypi-uri "ppft" version))
20009 (sha256
20010 (base32
20011 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
20012 (build-system python-build-system)
20013 (arguments '(#:tests? #f)) ; there are none
20014 (propagated-inputs
20015 `(("python-six" ,python-six)))
20016 (home-page "https://pypi.org/project/ppft/")
20017 (synopsis "Fork of Parallel Python")
20018 (description
20019 "This package is a fork of Parallel Python. The Parallel Python
20020 module (@code{pp}) provides an easy and efficient way to create
20021 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
20022 computers and clusters. It features cross-platform portability and dynamic
20023 load balancing.")
20024 (license license:bsd-3)))
20025
20026 (define-public python-pox
20027 (package
20028 (name "python-pox")
20029 (version "0.2.7")
20030 (source
20031 (origin
20032 (method url-fetch)
20033 (uri (pypi-uri "pox" version))
20034 (sha256
20035 (base32
20036 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
20037 (build-system python-build-system)
20038 (arguments
20039 `(#:phases
20040 (modify-phases %standard-phases
20041 (replace 'check
20042 (lambda _
20043 (mkdir-p "/tmp/guix")
20044 (setenv "SHELL" "bash")
20045 (setenv "USERNAME" "guix")
20046 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
20047 (invoke "py.test" "-vv")
20048 #t)))))
20049 (native-inputs
20050 `(("python-pytest" ,python-pytest)
20051 ("which" ,which)))
20052 (home-page "https://pypi.org/project/pox/")
20053 (synopsis "Python utilities for filesystem exploration and automated builds")
20054 (description
20055 "Pox provides a collection of utilities for navigating and manipulating
20056 filesystems. This module is designed to facilitate some of the low level
20057 operating system interactions that are useful when exploring a filesystem on a
20058 remote host. Pox provides Python equivalents of several shell commands such
20059 as @command{which} and @command{find}. These commands allow automated
20060 discovery of what has been installed on an operating system, and where the
20061 essential tools are located.")
20062 (license license:bsd-3)))
20063
20064 (define-public python-pathos
20065 (package
20066 (name "python-pathos")
20067 (version "0.2.5")
20068 (source
20069 (origin
20070 (method url-fetch)
20071 (uri (pypi-uri "pathos" version))
20072 (sha256
20073 (base32
20074 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
20075 (build-system python-build-system)
20076 (arguments
20077 '(#:phases
20078 (modify-phases %standard-phases
20079 (replace 'check
20080 (lambda _
20081 (setenv "PYTHONPATH"
20082 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
20083 (invoke "python" "./tests/__main__.py"))))))
20084 (propagated-inputs
20085 `(("python-dill" ,python-dill)
20086 ("python-multiprocess" ,python-multiprocess)
20087 ("python-pox" ,python-pox)
20088 ("python-ppft" ,python-ppft)))
20089 (native-inputs
20090 `(("python-pytest" ,python-pytest)))
20091 (home-page "https://pypi.org/project/pathos/")
20092 (synopsis
20093 "Parallel graph management and execution in heterogeneous computing")
20094 (description
20095 "Python-pathos is a framework for heterogeneous computing. It provides a
20096 consistent high-level interface for configuring and launching parallel
20097 computations across heterogeneous resources. Python-pathos provides configurable
20098 launchers for parallel and distributed computing, where each launcher contains
20099 the syntactic logic to configure and launch jobs in an execution environment.")
20100 (license license:bsd-3)))
20101
20102 (define-public python-flit
20103 (package
20104 (name "python-flit")
20105 (version "2.1.0")
20106 (source
20107 (origin
20108 (method url-fetch)
20109 (uri (pypi-uri "flit" version))
20110 (sha256
20111 (base32
20112 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
20113 (build-system python-build-system)
20114 (arguments
20115 `(#:tests? #f)) ; XXX: Check requires network access.
20116 (home-page "https://flit.readthedocs.io/")
20117 (synopsis
20118 "Simple packaging tool for simple packages")
20119 (description
20120 "Flit is a simple way to put Python packages and modules on PyPI. Flit
20121 packages a single importable module or package at a time, using the import
20122 name as the name on PyPI. All subpackages and data files within a package
20123 are included automatically.")
20124 (license license:bsd-3)))
20125
20126 (define-public python-pathtools
20127 (package
20128 (name "python-pathtools")
20129 (version "0.1.2")
20130 (source
20131 (origin
20132 (method url-fetch)
20133 (uri (pypi-uri "pathtools" version))
20134 (sha256
20135 (base32
20136 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
20137 (build-system python-build-system)
20138 (home-page
20139 "https://github.com/gorakhargosh/pathtools")
20140 (synopsis "Path utilities for Python")
20141 (description "Pattern matching and various utilities for file systems
20142 paths.")
20143 (license license:expat)))
20144
20145 (define-public python-fastentrypoints
20146 (package
20147 (name "python-fastentrypoints")
20148 (version "0.12")
20149 (source
20150 (origin
20151 (method url-fetch)
20152 (uri (pypi-uri "fastentrypoints" version))
20153 (sha256
20154 (base32
20155 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
20156 (build-system python-build-system)
20157 (home-page
20158 "https://github.com/ninjaaron/fast-entry_points")
20159 (synopsis
20160 "Makes entry_points specified in setup.py load more quickly")
20161 (description
20162 "Using entry_points in your setup.py makes scripts that start really
20163 slowly because it imports pkg_resources. This package allows such setup
20164 scripts to load entry points more quickly.")
20165 (license license:bsd-3)))
20166
20167 (define-public python-funcparserlib
20168 (package
20169 (name "python-funcparserlib")
20170 (version "0.3.6")
20171 (source
20172 (origin
20173 (method url-fetch)
20174 (uri (pypi-uri "funcparserlib" version))
20175 (sha256
20176 (base32
20177 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
20178 (native-inputs
20179 `(("python-tox" ,python-tox)))
20180 (arguments
20181 `(#:phases
20182 (modify-phases %standard-phases
20183 (replace 'check
20184 (lambda _
20185 (invoke "tox"))))))
20186 (build-system python-build-system)
20187 (home-page
20188 "https://github.com/vlasovskikh/funcparserlib")
20189 (synopsis
20190 "Recursive descent parsing library based on functional combinators")
20191 (description
20192 "This package is a recursive descent parsing library for Python based on
20193 functional combinators. Parser combinators are just higher-order functions
20194 that take parsers as their arguments and return them as result values.")
20195 (license license:expat)))
20196
20197 (define-public python-speg
20198 (package
20199 (name "python-speg")
20200 (version "0.3")
20201 (source
20202 (origin
20203 (method url-fetch)
20204 (uri (pypi-uri "speg" version ".zip"))
20205 (sha256
20206 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
20207 (arguments
20208 `(#:tests? #f)) ;FIXME: tests fail, not sure why
20209 (native-inputs
20210 `(("unzip" ,unzip)))
20211 (build-system python-build-system)
20212 (home-page "https://github.com/avakar/speg")
20213 (synopsis "PEG-based parser interpreter with memoization")
20214 (description "This package is a PEG-based parser and interpreter with
20215 memoization.")
20216 (license license:expat)))
20217
20218 (define-public python-cson
20219 (package
20220 (name "python-cson")
20221 (version "0.8")
20222 (source
20223 (origin
20224 (method url-fetch)
20225 (uri (pypi-uri "cson" version))
20226 (sha256
20227 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
20228 (build-system python-build-system)
20229 (propagated-inputs
20230 `(("python-speg" ,python-speg)))
20231 (home-page "https://github.com/avakar/pycson")
20232 (synopsis "Parser for Coffeescript Object Notation (CSON)")
20233 (description "This package is a parser for Coffeescript Object
20234 Notation (CSON).")
20235 (license license:expat)))
20236
20237 (define-public python-asynctest
20238 (package
20239 (name "python-asynctest")
20240 (version "0.13.0")
20241 (source
20242 (origin
20243 (method url-fetch)
20244 (uri (pypi-uri "asynctest" version))
20245 (sha256
20246 (base32
20247 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
20248 (build-system python-build-system)
20249 (arguments
20250 '(#:phases
20251 (modify-phases %standard-phases
20252 (replace 'check
20253 (lambda _
20254 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
20255 (add-after 'unpack 'disable-tests
20256 (lambda* _
20257 (substitute* "test/test_selector.py"
20258 ;; XXX: This test fails for unknown reason inside the build
20259 ;; environment.
20260 (("def test_events_watched_outside_test_are_ignored")
20261 "@unittest.skip('disabled by guix')
20262 def test_events_watched_outside_test_are_ignored")))))))
20263 (home-page "https://github.com/Martiusweb/asynctest")
20264 (synopsis "Extension of unittest for testing asyncio libraries")
20265 (description
20266 "The package asynctest is built on top of the standard unittest module
20267 and cuts down boilerplate code when testing libraries for asyncio.")
20268 (license license:asl2.0)))
20269
20270 (define-public python-aionotify
20271 (package
20272 (name "python-aionotify")
20273 (version "0.2.0")
20274 (source
20275 (origin
20276 ;; Source tarball on PyPi lacks tests
20277 (method git-fetch)
20278 (uri (git-reference
20279 (url "https://github.com/rbarrois/aionotify")
20280 (commit (string-append "v" version))))
20281 (file-name (git-file-name name version))
20282 (sha256
20283 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
20284 (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
20285 (build-system python-build-system)
20286 (home-page "https://github.com/rbarrois/aionotify")
20287 (synopsis "Asyncio-powered inotify library")
20288 (description
20289 "@code{aionotify} is a simple, asyncio-based inotify library.")
20290 (license license:bsd-3)))
20291
20292 (define-public python-forbiddenfruit
20293 (package
20294 (name "python-forbiddenfruit")
20295 (version "0.1.3")
20296 (source
20297 (origin
20298 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
20299 (method git-fetch)
20300 (uri (git-reference
20301 (url "https://github.com/clarete/forbiddenfruit")
20302 (commit version)))
20303 (file-name (git-file-name name version))
20304 (sha256
20305 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
20306 (build-system python-build-system)
20307 (arguments
20308 '(#:phases
20309 (modify-phases %standard-phases
20310 (replace 'check
20311 (lambda _
20312 (invoke "make" "SKIP_DEPS=1"))))))
20313 (native-inputs
20314 `(("python-nose" ,python-nose)
20315 ("python-coverage" ,python-coverage)))
20316 (home-page "https://github.com/clarete/forbiddenfruit")
20317 (synopsis "Patch python built-in objects")
20318 (description "This project allows Python code to extend built-in types.")
20319 (license (list license:gpl3+ license:expat))))
20320
20321 (define-public python-shouldbe
20322 (package
20323 (name "python-shouldbe")
20324 (version "0.1.2")
20325 (source
20326 (origin
20327 (method url-fetch)
20328 (uri (pypi-uri "shouldbe" version))
20329 (sha256
20330 (base32
20331 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))
20332 (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch"))))
20333 (build-system python-build-system)
20334 (propagated-inputs
20335 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
20336 (native-inputs
20337 `(("python-nose" ,python-nose)))
20338 (home-page "https://github.com/directxman12/should_be")
20339 (synopsis "Python Assertion Helpers inspired by Shouldly")
20340 (description
20341 "Python Assertion Helpers inspired by Shouldly.")
20342 (license license:isc)))
20343
20344 (define-public python-k5test
20345 (package
20346 (name "python-k5test")
20347 (version "0.9.2")
20348 (source
20349 (origin
20350 (method url-fetch)
20351 (uri (pypi-uri "k5test" version))
20352 (sha256
20353 (base32
20354 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
20355 (build-system python-build-system)
20356 (propagated-inputs
20357 `(("python-six" ,python-six)
20358 ;; `which`, `kadmin.local` binaries called inside library
20359 ("which" ,which)
20360 ("mit-krb5" ,mit-krb5)))
20361 (native-inputs `(("mit-krb5" ,mit-krb5)))
20362 (arguments
20363 '(#:phases
20364 (modify-phases %standard-phases
20365 (add-after 'unpack 'patch-paths
20366 (lambda* _
20367 (substitute* "k5test/realm.py"
20368 (("'kadmin_local'") "'kadmin.local'")))))))
20369 (home-page "https://github.com/pythongssapi/k5test")
20370 (synopsis "Library for setting up self-contained Kerberos 5 environments")
20371 (description
20372 "@code{k5test} is a library for setting up self-contained Kerberos 5
20373 environments, and running Python unit tests inside those environments. It is
20374 based on the file of the same name found alongside the MIT Kerberos 5 unit
20375 tests.")
20376 (license license:isc)))
20377
20378 (define-public python-gssapi
20379 (package
20380 (name "python-gssapi")
20381 (version "1.6.5")
20382 (source
20383 (origin
20384 (method url-fetch)
20385 (uri (pypi-uri "gssapi" version))
20386 (sha256
20387 (base32
20388 "02i5s7998dg5kcr4m0xwamd8vjqk1816xbzldyp68l91f6bynwcr"))))
20389 (build-system python-build-system)
20390 (propagated-inputs
20391 `(("python-decorator" ,python-decorator)
20392 ("python-six" ,python-six)))
20393 (inputs
20394 `(("mit-krb5" ,mit-krb5)))
20395 ;; for tests
20396 (native-inputs
20397 `(("python-shouldbe" ,python-shouldbe)
20398 ("python-parameterized" ,python-parameterized)
20399 ("python-k5test" ,python-k5test)
20400 ("python-nose" ,python-nose)))
20401 (home-page "https://github.com/pythongssapi/python-gssapi")
20402 (synopsis "Python GSSAPI Wrapper")
20403 (description
20404 "Python-GSSAPI provides both low-level and high level wrappers around the
20405 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
20406 also be useable with other GSSAPI mechanisms.")
20407 (license license:isc)))
20408
20409 (define-public python-check-manifest
20410 (package
20411 (name "python-check-manifest")
20412 (version "0.37")
20413 (source
20414 (origin
20415 (method url-fetch)
20416 (uri (pypi-uri "check-manifest" version))
20417 (sha256
20418 (base32
20419 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
20420 (build-system python-build-system)
20421 (native-inputs
20422 `(("python-mock" ,python-mock)
20423 ("git" ,git)))
20424 (home-page "https://github.com/mgedmin/check-manifest")
20425 (synopsis "Check MANIFEST.in in a Python source package for completeness")
20426 (description "Python package can include a MANIFEST.in file to help with
20427 sending package files to the Python Package Index. This package checks that
20428 file to ensure it completely and accurately describes your project.")
20429 (license license:expat)))
20430
20431 (define-public python-android-stringslib
20432 (package
20433 (name "python-android-stringslib")
20434 (version "0.1.2")
20435 (source
20436 (origin
20437 (method git-fetch)
20438 (uri (git-reference
20439 (url "https://framagit.org/tyreunom/python-android-strings-lib")
20440 (commit (string-append "v" version))))
20441 (file-name (git-file-name name version))
20442 (sha256
20443 (base32
20444 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
20445 (build-system python-build-system)
20446 (arguments
20447 `(#:tests? #f))
20448 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
20449 (synopsis "Android strings.xml support")
20450 (description "Android Strings Lib provides support for android's strings.xml
20451 files. These files are used to translate strings in android apps.")
20452 (license license:expat)))
20453
20454 (define-public python-watchdog
20455 (package
20456 (name "python-watchdog")
20457 (version "0.9.0")
20458 (source
20459 (origin
20460 (method url-fetch)
20461 (uri (pypi-uri "watchdog" version))
20462 (sha256
20463 (base32
20464 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
20465 (build-system python-build-system)
20466 (arguments
20467 `(#:phases
20468 (modify-phases %standard-phases
20469 (add-before 'check 'remove-failing
20470 (lambda _
20471 (delete-file "tests/test_inotify_buffer.py")
20472 (delete-file "tests/test_snapshot_diff.py")
20473 #t)))))
20474 (propagated-inputs
20475 `(("python-argh" ,python-argh)
20476 ("python-pathtools" ,python-pathtools)
20477 ("python-pyyaml" ,python-pyyaml)))
20478 (native-inputs
20479 `(("python-pytest-cov" ,python-pytest-cov)
20480 ("python-pytest-timeout" ,python-pytest-timeout)))
20481 (home-page "https://github.com/gorakhargosh/watchdog")
20482 (synopsis "Filesystem events monitoring")
20483 (description "This package provides a way to monitor filesystem events
20484 such as a file modification and trigger an action. This is similar to inotify,
20485 but portable.")
20486 (license license:asl2.0)))
20487
20488 (define-public python-watchgod
20489 (package
20490 (name "python-watchgod")
20491 (version "0.6")
20492 (source
20493 (origin
20494 ;; There are no tests in the PyPI tarball.
20495 (method git-fetch)
20496 (uri (git-reference
20497 (url "https://github.com/samuelcolvin/watchgod")
20498 (commit (string-append "v" version))))
20499 (file-name (git-file-name name version))
20500 (sha256
20501 (base32 "1lqx44wkryakgpyqj3m0hsz61bqr07vc7smgzh188374hwvscp66"))))
20502 (build-system python-build-system)
20503 (arguments
20504 `(#:phases
20505 (modify-phases %standard-phases
20506 (replace 'check
20507 (lambda _
20508 (invoke "pytest" "-vv"))))))
20509 (native-inputs
20510 `(("python-coverage" ,python-coverage)
20511 ("python-docutils" ,python-docutils)
20512 ("python-flake8" ,python-flake8)
20513 ("python-isort" ,python-isort)
20514 ("python-pycodestyle" ,python-pycodestyle)
20515 ("python-pyflakes" ,python-pyflakes)
20516 ("python-pygments" ,python-pygments)
20517 ("python-pytest" ,python-pytest)
20518 ("python-pytest-cov" ,python-pytest-cov)
20519 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
20520 ("python-pytest-mock" ,python-pytest-mock)
20521 ("python-pytest-sugar" ,python-pytest-sugar)
20522 ("python-pytest-toolbox" ,python-pytest-toolbox)))
20523 (home-page "https://github.com/samuelcolvin/watchgod")
20524 (synopsis "Simple, modern file watching and code reload in Python")
20525 (description
20526 "Simple, modern file watching and code reload in Python inspired by
20527 @code{watchdog}. Among the differences are a unified approach for each
20528 operating systems and an elegant approach to concurrency using threading.")
20529 (license license:expat)))
20530
20531 (define-public python-wget
20532 (package
20533 (name "python-wget")
20534 (version "3.2")
20535 (source
20536 (origin
20537 (method url-fetch)
20538 (uri (pypi-uri "wget" version ".zip"))
20539 (sha256
20540 (base32
20541 "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
20542 (build-system python-build-system)
20543 (native-inputs `(("unzip" ,unzip)))
20544 (home-page "https://bitbucket.org/techtonik/python-wget/")
20545 (synopsis "Pure Python download utility")
20546 (description "The python-wget library provides an API to download files
20547 with features similar to the @command{wget} utility.")
20548 (license license:unlicense)))
20549
20550 (define-public offlate
20551 (package
20552 (name "offlate")
20553 (version "0.5")
20554 (source
20555 (origin
20556 (method git-fetch)
20557 (uri (git-reference
20558 (url "https://framagit.org/tyreunom/offlate")
20559 (commit version)))
20560 (file-name (git-file-name name version))
20561 (sha256
20562 (base32
20563 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
20564 (build-system python-build-system)
20565 (arguments
20566 ;; No tests
20567 `(#:tests? #f))
20568 (propagated-inputs
20569 `(("python-android-stringslib" ,python-android-stringslib)
20570 ("python-dateutil" ,python-dateutil)
20571 ("python-gitlab" ,python-gitlab)
20572 ("python-lxml" ,python-lxml)
20573 ("python-polib" ,python-polib)
20574 ("python-pyenchant" ,python-pyenchant)
20575 ("python-pygit2" ,python-pygit2)
20576 ("python-pygithub" ,python-pygithub)
20577 ("python-pyqt" ,python-pyqt)
20578 ("python-requests" ,python-requests)
20579 ("python-ruamel.yaml" ,python-ruamel.yaml)
20580 ("python-translation-finder" ,python-translation-finder)
20581 ("python-watchdog" ,python-watchdog)))
20582 (native-inputs
20583 `(("qttools" ,qttools)))
20584 (home-page "https://framagit.org/tyreunom/offlate")
20585 (synopsis "Offline translation interface for online translation tools")
20586 (description "Offlate offers a unified interface for different translation
20587 file formats, as well as many different online translation platforms. You can
20588 use it to get work from online platforms, specialized such as the Translation
20589 Project, or not such a gitlab instance when your upstream doesn't use any
20590 dedicated platform. The tool proposes a unified interface for any format and
20591 an upload option to send your work back to the platform.")
20592 (license license:gpl3+)))
20593
20594 (define-public python-titlecase
20595 (package
20596 (name "python-titlecase")
20597 (version "0.12.0")
20598 (source
20599 (origin
20600 (method url-fetch)
20601 (uri (pypi-uri "titlecase" version))
20602 (sha256
20603 (base32
20604 "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
20605 (build-system python-build-system)
20606 (native-inputs
20607 `(("python-nose" ,python-nose)))
20608 (home-page "https://github.com/ppannuto/python-titlecase")
20609 (synopsis "Capitalize strings similar to book titles")
20610 (description
20611 "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
20612 It capitalizes (predominantly English) strings in a way that is similar to
20613 book titles, using the New York Times Manual of Style to leave certain words
20614 lowercase.")
20615 (license license:expat)))
20616
20617 (define-public python-pypng
20618 (package
20619 (name "python-pypng")
20620 (version "0.0.20")
20621 (source
20622 (origin
20623 (method url-fetch)
20624 (uri (pypi-uri "pypng" version))
20625 (sha256
20626 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
20627 (build-system python-build-system)
20628 (home-page "https://github.com/drj11/pypng")
20629 (synopsis "Pure Python PNG image encoder/decoder")
20630 (description
20631 "The PyPNG module implements support for PNG images. It reads and writes
20632 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
20633 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
20634 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
20635 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
20636 A number of optional chunks can be specified (when writing) and
20637 understood (when reading): tRNS, bKGD, gAMA.
20638
20639 PyPNG is not a high level toolkit for image processing (like PIL) and does not
20640 aim at being a replacement or competitor. Its strength lies in fine-grained
20641 extensive support of PNG features. It can also read and write Netpbm PAM
20642 files, with a focus on its use as an intermediate format for implementing
20643 custom PNG processing.")
20644 (license license:expat)))
20645
20646 (define-public python-fuzzywuzzy
20647 (package
20648 (name "python-fuzzywuzzy")
20649 (version "0.18.0")
20650 (source
20651 (origin
20652 (method url-fetch)
20653 (uri (pypi-uri "fuzzywuzzy" version))
20654 (sha256
20655 (base32
20656 "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
20657 (build-system python-build-system)
20658 (native-inputs
20659 `(("python-hypothesis" ,python-hypothesis)
20660 ("python-pycodestyle" ,python-pycodestyle)
20661 ("python-pytest" ,python-pytest)))
20662 (propagated-inputs
20663 `(("python-levenshtein" ,python-levenshtein)))
20664 (home-page "https://github.com/seatgeek/fuzzywuzzy")
20665 (synopsis "Fuzzy string matching in Python")
20666 (description "Approximate string matching using
20667 @emph{Levenshtein Distance} to calculate the differences between
20668 sequences.")
20669 (license license:gpl2)))
20670
20671 (define-public python2-fuzzywuzzy
20672 (package-with-python2 python-fuzzywuzzy))
20673
20674 (define-public python-block-tracing
20675 (package
20676 (name "python-block-tracing")
20677 (version "1.0.1")
20678 (source
20679 (origin
20680 (method url-fetch)
20681 (uri (pypi-uri "block_tracing" version))
20682 (sha256
20683 (base32
20684 "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
20685 (build-system python-build-system)
20686 (arguments '(#:tests? #f)) ; no tests
20687 (home-page "https://github.com/rianhunter/block_tracing")
20688 (synopsis "Protect process memory")
20689 (description
20690 "@code{block_tracing} is a tiny Python library that can be used to
20691 prevent debuggers and other applications from inspecting the memory within
20692 your process.")
20693 (license license:expat)))
20694
20695 (define-public python-gcovr
20696 (package
20697 (name "python-gcovr")
20698 (version "4.2")
20699 (source
20700 (origin
20701 (method url-fetch)
20702 (uri (pypi-uri "gcovr" version))
20703 (sha256
20704 (base32
20705 "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
20706 (build-system python-build-system)
20707 (propagated-inputs
20708 `(("python-lxml" ,python-lxml)
20709 ("python-jinja2" ,python-jinja2)))
20710 (home-page "https://gcovr.com/")
20711 (synopsis "Utility for generating code coverage results")
20712 (description
20713 "Gcovr provides a utility for managing the use of the GNU gcov
20714 utility and generating summarized code coverage results. It is inspired
20715 by the Python coverage.py package, which provides a similar utility for
20716 Python.")
20717 (license license:bsd-3)))
20718
20719 (define-public python-owslib
20720 (package
20721 (name "python-owslib")
20722 (version "0.19.2")
20723 (source
20724 (origin
20725 (method url-fetch)
20726 (uri (pypi-uri "OWSLib" version))
20727 (sha256
20728 (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
20729 (build-system python-build-system)
20730 (arguments
20731 '(#:tests? #f)) ; TODO: package dependencies required for tests.
20732 (synopsis "Interface for Open Geospatial Consortium web service")
20733 (description
20734 "OWSLib is a Python package for client programming with Open Geospatial
20735 Consortium (OGC) web service (hence OWS) interface standards, and their related
20736 content models.")
20737 (home-page "https://geopython.github.io/OWSLib/")
20738 (license license:bsd-3)))
20739
20740 (define-public python-docusign-esign
20741 (package
20742 (name "python-docusign-esign")
20743 (version "3.1.0")
20744 (source (origin
20745 (method url-fetch)
20746 (uri (pypi-uri "docusign_esign" version))
20747 (sha256
20748 (base32
20749 "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
20750 (build-system python-build-system)
20751 ;; Testing requires undocumented setup changes, and so testing is disabled here.
20752 (arguments `(#:tests? #f))
20753 (propagated-inputs
20754 `(("python-certifi", python-certifi)
20755 ("python-six", python-six)
20756 ("python-dateutil", python-dateutil)
20757 ("python-urllib3", python-urllib3)
20758 ("python-pyjwt", python-pyjwt)
20759 ("python-cryptography", python-cryptography)
20760 ("python-nose", python-nose)))
20761 (synopsis "DocuSign Python Client")
20762 (description "The Official DocuSign Python Client Library used to interact
20763 with the eSign REST API. Send, sign, and approve documents using this client.")
20764 (home-page "https://www.docusign.com/devcenter")
20765 (license license:expat)))
20766
20767 (define-public python-xattr
20768 (package
20769 (name "python-xattr")
20770 (version "0.9.7")
20771 (source
20772 (origin
20773 (method url-fetch)
20774 (uri (pypi-uri "xattr" version))
20775 (sha256
20776 (base32
20777 "0i4xyiqbhjz2g16zbim17zjdbjkw79xsw8k59942vvq4is1cmfxh"))))
20778 (build-system python-build-system)
20779 (propagated-inputs
20780 `(("python-cffi" ,python-cffi)))
20781 (home-page "https://github.com/xattr/xattr")
20782 (synopsis
20783 "Python wrapper for extended filesystem attributes")
20784 (description "This package provides a Python wrapper for using extended
20785 filesystem attributes. Extended attributes extend the basic attributes of files
20786 and directories in the file system. They are stored as name:data pairs
20787 associated with file system objects (files, directories, symlinks, etc).")
20788 (license license:expat)))
20789
20790 (define-public python-json-logger
20791 (package
20792 (name "python-json-logger")
20793 (version "0.1.11")
20794 (source
20795 (origin
20796 (method url-fetch)
20797 (uri (pypi-uri "python-json-logger" version))
20798 (sha256
20799 (base32
20800 "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
20801 (build-system python-build-system)
20802 (home-page
20803 "https://github.com/madzak/python-json-logger")
20804 (synopsis "JSON log formatter in Python")
20805 (description "This library allows standard Python logging to output log data
20806 as JSON objects. With JSON we can make our logs more readable by machines and
20807 we can stop writing custom parsers for syslog-type records.")
20808 (license license:bsd-3)))
20809
20810 (define-public python-daiquiri
20811 (package
20812 (name "python-daiquiri")
20813 (version "2.1.1")
20814 (source
20815 (origin
20816 (method url-fetch)
20817 (uri (pypi-uri "daiquiri" version))
20818 (sha256
20819 (base32
20820 "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
20821 (build-system python-build-system)
20822 (propagated-inputs
20823 `(("python-json-logger" ,python-json-logger)))
20824 (native-inputs
20825 `(("python-mock" ,python-mock)
20826 ("python-pytest" ,python-pytest)
20827 ("python-setuptools-scm" ,python-setuptools-scm)
20828 ("python-six" ,python-six)))
20829 (home-page "https://github.com/jd/daiquiri")
20830 (synopsis
20831 "Library to configure Python logging easily")
20832 (description "The daiquiri library provides an easy way to configure
20833 logging in Python. It also provides some custom formatters and handlers.")
20834 (license license:asl2.0)))
20835
20836 (define-public python-pifpaf
20837 (package
20838 (name "python-pifpaf")
20839 (version "2.5.0")
20840 (source
20841 (origin
20842 (method url-fetch)
20843 (uri (pypi-uri "pifpaf" version))
20844 (sha256
20845 (base32
20846 "1gy9p4nqf70fh38wn4icyfm7i9wrvx22wnjpg71g89wxbz27igaa"))))
20847 (build-system python-build-system)
20848 (arguments
20849 '(#:phases
20850 (modify-phases %standard-phases
20851 (replace 'check
20852 (lambda _
20853 (invoke "python" "setup.py" "testr" "--slowest"
20854 "--testr-args=until-failure"))))))
20855 (propagated-inputs
20856 `(("python-click" ,python-click)
20857 ("python-daiquiri" ,python-daiquiri)
20858 ("python-fixtures" ,python-fixtures)
20859 ("python-jinja2" ,python-jinja2)
20860 ("python-pbr" ,python-pbr)
20861 ("python-psutil" ,python-psutil)
20862 ("python-six" ,python-six)
20863 ("python-xattr" ,python-xattr)))
20864 (native-inputs
20865 `(("python-mock" ,python-mock)
20866 ("python-os-testr" ,python-os-testr)
20867 ("python-requests" ,python-requests)
20868 ("python-testrepository" ,python-testrepository)
20869 ("python-testtools" ,python-testtools)))
20870 (home-page "https://github.com/jd/pifpaf")
20871 (synopsis "Tools and fixtures to manage daemons for testing in Python")
20872 (description "Pifpaf is a suite of fixtures and a command-line tool that
20873 starts and stops daemons for a quick throw-away usage. This is typically
20874 useful when needing these daemons to run integration testing. It originally
20875 evolved from its precursor @code{overtest}.")
20876 (license license:asl2.0)))
20877
20878 (define-public python-pytest-check-links
20879 (package
20880 (name "python-pytest-check-links")
20881 (version "0.3.0")
20882 (source
20883 (origin
20884 (method url-fetch)
20885 ;; URI uses underscores
20886 (uri (pypi-uri "pytest_check_links" version))
20887 (sha256
20888 (base32
20889 "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
20890 (build-system python-build-system)
20891 (propagated-inputs
20892 `(("python-docutils" ,python-docutils)
20893 ("python-html5lib" ,python-html5lib)
20894 ("python-nbconvert" ,python-nbconvert)
20895 ("python-nbformat" ,python-nbformat)
20896 ("python-pytest" ,python-pytest)
20897 ("python-six" ,python-six)))
20898 (native-inputs
20899 `(("python-pbr-minimal" ,python-pbr-minimal)))
20900 (home-page "https://github.com/minrk/pytest-check-links")
20901 (synopsis "Check links in files")
20902 (description "This package provides a pytest plugin that checks URLs for
20903 HTML-containing files.")
20904 (license license:bsd-3)))
20905
20906 (define-public python-json5
20907 (package
20908 (name "python-json5")
20909 (version "0.8.5")
20910 (source
20911 (origin
20912 ;; sample.json5 is missing from PyPi source tarball
20913 (method git-fetch)
20914 (uri (git-reference
20915 (url "https://github.com/dpranke/pyjson5")
20916 (commit (string-append "v" version))))
20917 (file-name (git-file-name name version))
20918 (sha256
20919 (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
20920 (build-system python-build-system)
20921 (home-page "https://github.com/dpranke/pyjson5")
20922 (synopsis
20923 "Python implementation of the JSON5 data format")
20924 (description
20925 "JSON5 extends the JSON data interchange format to make it slightly more
20926 usable as a configuration language. This Python package implements parsing and
20927 dumping of JSON5 data structures.")
20928 (license license:asl2.0)))
20929
20930 (define-public python-frozendict
20931 (package
20932 (name "python-frozendict")
20933 (version "1.2")
20934 (source
20935 (origin
20936 (method url-fetch)
20937 (uri (pypi-uri "frozendict" version))
20938 (sha256
20939 (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
20940 (build-system python-build-system)
20941 (home-page "https://github.com/slezica/python-frozendict")
20942 (synopsis "Simple immutable mapping for Python")
20943 (description
20944 "@dfn{frozendict} is an immutable wrapper around dictionaries that
20945 implements the complete mapping interface. It can be used as a drop-in
20946 replacement for dictionaries where immutability is desired.")
20947 (license license:expat)))
20948
20949 (define-public python-unpaddedbase64
20950 (package
20951 (name "python-unpaddedbase64")
20952 (version "1.1.0")
20953 (source
20954 (origin
20955 (method git-fetch)
20956 (uri (git-reference
20957 (url "https://github.com/matrix-org/python-unpaddedbase64")
20958 (commit (string-append "v" version))))
20959 (file-name (git-file-name name version))
20960 (sha256
20961 (base32
20962 "0if3fjfxga0bwdq47v77fs9hrcqpmwdxry2i2a7pdqsp95258nxd"))))
20963 (build-system python-build-system)
20964 (home-page "https://pypi.org/project/unpaddedbase64/")
20965 (synopsis "Encode and decode Base64 without “=” padding")
20966 (description
20967 "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
20968 using “=” characters. However this conveys no benefit so many protocols
20969 choose to use Base64 without the “=” padding.")
20970 (license license:asl2.0)))
20971
20972 (define-public python-py-cpuinfo
20973 (package
20974 (name "python-py-cpuinfo")
20975 (version "5.0.0")
20976 (source
20977 (origin
20978 (method url-fetch)
20979 (uri (pypi-uri "py-cpuinfo" version))
20980 (sha256
20981 (base32
20982 "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
20983 (build-system python-build-system)
20984 (home-page "https://github.com/workhorsy/py-cpuinfo")
20985 (synopsis "Get CPU info with Python")
20986 (description
20987 "This Python module returns the CPU info by using the best sources of
20988 information for your operating system.")
20989 (license license:expat)))
20990
20991 (define-public python-canonicaljson
20992 (package
20993 (name "python-canonicaljson")
20994 (version "1.1.4")
20995 (source
20996 (origin
20997 (method url-fetch)
20998 (uri (pypi-uri "canonicaljson" version))
20999 (sha256
21000 (base32 "09cpacc8yvcc74i63pdmlfaahh77dnvbyw9zf29wml2zzwqfbg25"))))
21001 (build-system python-build-system)
21002 (propagated-inputs
21003 `(("python-six" ,python-six)
21004 ("python-frozendict" ,python-frozendict)
21005 ("python-simplejson" ,python-simplejson)))
21006 (home-page "https://github.com/matrix-org/python-canonicaljson")
21007 (synopsis "Canonical JSON")
21008 (description
21009 "Deterministically encode JSON.
21010
21011 @itemize
21012 @item Encodes objects and arrays as RFC 7159 JSON.
21013 @item Sorts object keys so that you get the same result each time.
21014 @item Has no insignificant whitespace to make the output as small as possible.
21015 @item Escapes only the characters that must be escaped, U+0000 to
21016 U+0019 / U+0022 / U+0056, to keep the output as small as possible.
21017 @item Uses the shortest escape sequence for each escaped character.
21018 @item Encodes the JSON as UTF-8.
21019 @item Can encode frozendict immutable dictionaries.
21020 @end itemize")
21021 (license license:asl2.0)))
21022
21023 (define-public python-signedjson
21024 (package
21025 (name "python-signedjson")
21026 (version "1.1.1")
21027 (source
21028 (origin
21029 (method url-fetch)
21030 (uri (pypi-uri "signedjson" version))
21031 (sha256
21032 (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
21033 (build-system python-build-system)
21034 (propagated-inputs
21035 `(("python-canonicaljson" ,python-canonicaljson)
21036 ("python-importlib-metadata" ,python-importlib-metadata)
21037 ("python-pynacl" ,python-pynacl)
21038 ("python-typing-extensions" ,python-typing-extensions)
21039 ("python-unpaddedbase64" ,python-unpaddedbase64)))
21040 (native-inputs
21041 `(("python-setuptools-scm" ,python-setuptools-scm)))
21042 (home-page "https://github.com/matrix-org/python-signedjson")
21043 (synopsis "Sign JSON objects with ED25519 signatures")
21044 (description
21045 "Sign JSON objects with ED25519 signatures.
21046
21047 @itemize
21048 @item More than one entity can sign the same object.
21049 @item Each entity can sign the object with more than one key making it easier to
21050 rotate keys
21051 @item ED25519 can be replaced with a different algorithm.
21052 @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
21053 key.
21054 @end itemize")
21055 (license license:asl2.0)))
21056
21057 (define-public python-daemonize
21058 (package
21059 (name "python-daemonize")
21060 (version "2.5.0")
21061 (source
21062 (origin
21063 (method url-fetch)
21064 (uri (pypi-uri "daemonize" version))
21065 (sha256
21066 (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
21067 (build-system python-build-system)
21068 (home-page "https://github.com/thesharp/daemonize")
21069 (synopsis "Library for writing system daemons in Python")
21070 (description "Daemonize is a library for writing system daemons in Python.")
21071 (license license:expat)))
21072
21073 (define-public python-pymacaroons
21074 (package
21075 (name "python-pymacaroons")
21076 (version "0.13.0")
21077 (source
21078 (origin
21079 (method url-fetch)
21080 (uri (pypi-uri "pymacaroons" version))
21081 (sha256
21082 (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
21083 (build-system python-build-system)
21084 (propagated-inputs
21085 `(("python-six" ,python-six)
21086 ("python-pynacl" ,python-pynacl)))
21087 (home-page "https://github.com/ecordell/pymacaroons")
21088 (synopsis "Python Macaroon Library")
21089 (description
21090 "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
21091 tokens, macaroons embed caveats that define specific authorization
21092 requirements for the target service, the service that issued the root macaroon
21093 and which is capable of verifying the integrity of macaroons it receives.
21094
21095 Macaroons allow for delegation and attenuation of authorization. They are
21096 simple and fast to verify, and decouple authorization policy from the
21097 enforcement of that policy.")
21098 (license license:expat)))
21099
21100 (define-public python-ldap3
21101 (package
21102 (name "python-ldap3")
21103 (version "2.7")
21104 (home-page "https://github.com/cannatag/ldap3")
21105 (source
21106 (origin
21107 (method git-fetch)
21108 (uri (git-reference (url home-page)
21109 (commit (string-append "v" version))))
21110 (file-name (git-file-name name version))
21111 (sha256
21112 (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
21113 (build-system python-build-system)
21114 (arguments
21115 '(#:tests? #f ;TODO: Tests need a real LDAP server to run
21116 #:phases (modify-phases %standard-phases
21117 (replace 'check
21118 (lambda* (#:key tests? #:allow-other-keys)
21119 (when tests?
21120 (invoke "nosetests" "-s" "test"))
21121 #t)))))
21122 (native-inputs
21123 `(("python-nose" ,python-nose)))
21124 (propagated-inputs
21125 `(("python-gssapi" ,python-gssapi)
21126 ("python-pyasn1" ,python-pyasn1)))
21127 (synopsis "Python LDAP client")
21128 (description
21129 "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
21130 library.")
21131 (license license:lgpl3+)))
21132
21133 (define-public python-boltons
21134 (package
21135 (name "python-boltons")
21136 (version "20.0.0")
21137 (source
21138 (origin
21139 (method url-fetch)
21140 (uri (pypi-uri "boltons" version))
21141 (sha256
21142 (base32
21143 "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
21144 (build-system python-build-system)
21145 (home-page "https://github.com/mahmoud/boltons")
21146 (synopsis "Extensions to the Python standard library")
21147 (description
21148 "Boltons is a set of over 230 pure-Python utilities in the same spirit
21149 as — and yet conspicuously missing from — the standard library, including:
21150
21151 @itemize
21152 @item Atomic file saving, bolted on with fileutils
21153 @item A highly-optimized OrderedMultiDict, in dictutils
21154 @item Two types of PriorityQueue, in queueutils
21155 @item Chunked and windowed iteration, in iterutils
21156 @item Recursive data structure iteration and merging, with iterutils.remap
21157 @item Exponential backoff functionality, including jitter, through
21158 iterutils.backoff
21159 @item A full-featured TracebackInfo type, for representing stack traces, in
21160 tbutils
21161 @end itemize")
21162 (license license:bsd-3)))
21163
21164 (define-public python-eliot
21165 (package
21166 (name "python-eliot")
21167 (version "1.12.0")
21168 (source
21169 (origin
21170 (method url-fetch)
21171 (uri (pypi-uri "eliot" version))
21172 (sha256
21173 (base32 "0wabv7hk63l12881f4zw02mmj06583qsx2im0yywdjlj8f56vqdn"))))
21174 (build-system python-build-system)
21175 (arguments
21176 `(#:phases
21177 (modify-phases %standard-phases
21178 (add-after 'unpack 'remove-journald-support
21179 (lambda _
21180 (for-each delete-file
21181 '("eliot/tests/test_journald.py"
21182 "eliot/journald.py"))
21183 #t))
21184 (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
21185 ;; remove command-line tool's tests. TODO eliot-prettyprint should
21186 ;; be installed and these tests should pass.
21187 (lambda _
21188 (delete-file "eliot/tests/test_prettyprint.py")
21189 #t)))))
21190 (propagated-inputs
21191 `(("python-boltons" ,python-boltons)
21192 ("python-pyrsistent" ,python-pyrsistent)
21193 ("python-six" ,python-six)
21194 ("python-zope-interface" ,python-zope-interface)))
21195 (native-inputs
21196 `(("python-black" ,python-black)
21197 ("python-coverage" ,python-coverage)
21198 ("python-dask" ,python-dask)
21199 ("python-flake8" ,python-flake8)
21200 ("python-hypothesis" ,python-hypothesis)
21201 ("python-pytest" ,python-pytest)
21202 ("python-setuptools" ,python-setuptools)
21203 ("python-sphinx" ,python-sphinx)
21204 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21205 ("python-testtools" ,python-testtools)
21206 ("python-twine" ,python-twine)
21207 ("python-twisted" ,python-twisted)))
21208 (home-page "https://github.com/itamarst/eliot/")
21209 (synopsis "Eliot: the logging system that tells you why it happened")
21210 (description
21211 "@dfn{eliot} is a Python logging system that outputs causal chains of
21212 actions: actions can spawn other actions, and eventually they either succeed
21213 or fail. The resulting logs tell you the story of what your software did: what
21214 happened, and what caused it.")
21215 (license license:asl2.0)))
21216
21217 (define-public python-pem
21218 (package
21219 (name "python-pem")
21220 (version "20.1.0")
21221 (source
21222 (origin
21223 (method url-fetch)
21224 (uri (pypi-uri "pem" version))
21225 (sha256
21226 (base32
21227 "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
21228 (build-system python-build-system)
21229 (native-inputs
21230 `(("python-certifi" ,python-certifi)
21231 ("python-coverage" ,python-coverage)
21232 ("python-pretend" ,python-pretend)
21233 ("python-pyopenssl" ,python-pyopenssl)
21234 ("python-pytest" ,python-pytest)
21235 ("python-sphinx" ,python-sphinx)
21236 ("python-twisted" ,python-twisted)))
21237 (home-page "https://pem.readthedocs.io/")
21238 (synopsis "Easy PEM file parsing in Python")
21239 (description
21240 "This package provides a Python module for parsing and splitting PEM files.")
21241 (license license:expat)))
21242
21243 (define-public python-txsni
21244 ;; We need a few commits on top of 0.1.9 for compatibility with newer
21245 ;; Python and OpenSSL.
21246 (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
21247 (revision "0"))
21248 (package
21249 (name "python-txsni")
21250 (version (git-version "0.1.9" revision commit))
21251 (home-page "https://github.com/glyph/txsni")
21252 (source
21253 (origin
21254 (method git-fetch)
21255 (uri (git-reference (url home-page) (commit commit)))
21256 (file-name (git-file-name name version))
21257 (sha256
21258 (base32
21259 "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
21260 (build-system python-build-system)
21261 (propagated-inputs
21262 `(("python-pyopenssl" ,python-pyopenssl)
21263 ("python-service-identity" ,python-service-identity)
21264 ("python-twisted" ,python-twisted)))
21265 (synopsis "Run TLS servers with Twisted")
21266 (description
21267 "This package provides an easy-to-use SNI endpoint for use
21268 with the Twisted web framework.")
21269 (license license:expat))))
21270
21271 (define-public python-txacme
21272 (package
21273 (name "python-txacme")
21274 (version "0.9.2")
21275 (source
21276 (origin
21277 (method url-fetch)
21278 (uri (pypi-uri "txacme" version))
21279 (sha256
21280 (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
21281 (build-system python-build-system)
21282 (propagated-inputs
21283 `(("python-acme" ,python-acme)
21284 ("python-attrs" ,python-attrs)
21285 ("python-eliot" ,python-eliot)
21286 ("python-josepy" ,python-josepy)
21287 ("python-pem" ,python-pem)
21288 ("python-treq" ,python-treq)
21289 ("python-twisted" ,python-twisted)
21290 ("python-txsni" ,python-txsni)))
21291 (native-inputs
21292 `(("python-fixtures" ,python-fixtures)
21293 ("python-hypothesis" ,python-hypothesis)
21294 ("python-mock" ,python-mock)
21295 ("python-service-identity"
21296 ,python-service-identity)
21297 ("python-testrepository" ,python-testrepository)
21298 ("python-testscenarios" ,python-testscenarios)
21299 ("python-testtools" ,python-testtools)))
21300 (home-page "https://github.com/twisted/txacme")
21301 (synopsis "Twisted implexmentation of the ACME protocol")
21302 (description
21303 "ACME is Automatic Certificate Management Environment, a protocol that
21304 allows clients and certificate authorities to automate verification and
21305 certificate issuance. The ACME protocol is used by the free Let's Encrypt
21306 Certificate Authority.
21307
21308 txacme is an implementation of the protocol for Twisted, the event-driven
21309 networking engine for Python.")
21310 (license license:expat)))
21311
21312 (define-public python-pysaml2
21313 (package
21314 (name "python-pysaml2")
21315 (version "5.0.0")
21316 (source
21317 (origin
21318 (method url-fetch)
21319 (uri (pypi-uri "pysaml2" version))
21320 (sha256
21321 (base32
21322 "1h8cmxh9cvxhrdfmkh92wg6zpxmhi2fixq1cy4hxismmaar7bsny"))))
21323 (build-system python-build-system)
21324 (propagated-inputs
21325 `(("python-cryptography" ,python-cryptography)
21326 ("python-dateutil" ,python-dateutil)
21327 ("python-defusedxml" ,python-defusedxml)
21328 ("python-pyopenssl" ,python-pyopenssl)
21329 ("python-pytz" ,python-pytz)
21330 ("python-requests" ,python-requests)
21331 ("python-six" ,python-six)))
21332 (home-page "https://idpy.org")
21333 (synopsis "Python implementation of SAML Version 2 Standard")
21334 (description
21335 "PySAML2 is a pure python implementation of SAML Version 2 Standard.
21336 It contains all necessary pieces for building a SAML2 service provider or
21337 an identity provider. The distribution contains examples of both.
21338
21339 This package was originally written to work in a WSGI environment, but
21340 there are extensions that allow you to use it with other frameworks.")
21341 (license license:asl2.0)))
21342
21343 (define-public python-click-plugins
21344 (package
21345 (name "python-click-plugins")
21346 (version "1.1.1")
21347 (source
21348 (origin
21349 (method url-fetch)
21350 (uri (pypi-uri "click-plugins" version))
21351 (sha256
21352 (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
21353 (build-system python-build-system)
21354 (native-inputs
21355 `(("python-pytest" ,python-pytest)))
21356 (propagated-inputs
21357 `(("python-click" ,python-click)))
21358 (synopsis "Extension for Click to register external CLI commands")
21359 (description "This package provides n extension module for Click to
21360 register external CLI commands via setuptools entry-points.")
21361 (home-page "https://github.com/click-contrib/click-plugins")
21362 (license license:bsd-3)))
21363
21364 (define-public python-diceware
21365 (package
21366 (name "python-diceware")
21367 (version "0.9.6")
21368 (source
21369 (origin
21370 (method url-fetch)
21371 (uri (pypi-uri "diceware" version))
21372 (sha256
21373 (base32
21374 "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
21375 (build-system python-build-system)
21376 (native-inputs
21377 `(("python-coverage" ,python-coverage)
21378 ("python-pytest" ,python-pytest)
21379 ("python-pytest-runner" ,python-pytest-runner)))
21380 (home-page "https://github.com/ulif/diceware/")
21381 (synopsis "Generates memorable passphrases")
21382 (description "This package generates passphrases by concatenating words
21383 randomly picked from wordlists. It supports several sources of
21384 randomness (including real life dice) and different wordlists (including
21385 cryptographically signed ones).")
21386 (license license:gpl3+)))
21387
21388 (define-public pyzo
21389 (package
21390 (name "pyzo")
21391 (version "4.10.2")
21392 (source
21393 (origin
21394 (method url-fetch)
21395 (uri (pypi-uri "pyzo" version))
21396 (sha256
21397 (base32 "1zplxcb78qy8qibifmnsx5i9gnlfmw9n6nr4yflsabpxw57mx4m1"))))
21398 (build-system python-build-system)
21399 (arguments
21400 `(#:phases
21401 (modify-phases %standard-phases
21402 (add-before 'check 'fix-home-directory
21403 (lambda _
21404 ;; Tests fail with "Permission denied: '/homeless-shelter'".
21405 (setenv "HOME" "/tmp")
21406 #t)))
21407 ;; Tests fail with "Uncaught Python exception: invalid literal for
21408 ;; int() with base 10: 'test'".
21409 #:tests? #f))
21410 (propagated-inputs
21411 `(("python-pyqt" ,python-pyqt)))
21412 (home-page "https://pyzo.org")
21413 (synopsis
21414 "Python IDE for scientific computing")
21415 (description
21416 "Pyzo is a Python IDE focused on interactivity and introspection,
21417 which makes it very suitable for scientific computing. Its practical
21418 design is aimed at simplicity and efficiency.
21419
21420 It consists of two main components, the editor and the shell, and uses
21421 a set of pluggable tools to help the programmer in various ways. Some
21422 example tools are source structure, project manager, interactive help,
21423 workspace...")
21424 (license license:bsd-2)))
21425
21426 (define-public python-osc
21427 (package
21428 (name "python-osc")
21429 (version "1.7.4")
21430 (source
21431 (origin
21432 (method url-fetch)
21433 (uri (pypi-uri "python-osc" version))
21434 (sha256
21435 (base32
21436 "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
21437 (build-system python-build-system)
21438 (home-page "https://github.com/attwad/python-osc")
21439 (synopsis "Open Sound Control server and client implementations")
21440 (description
21441 "@code{python-osc} is a pure Python library with no external
21442 dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
21443 Open Sound Control 1.0} specification.")
21444 (license license:unlicense)))
21445
21446 (define-public python-voluptuous
21447 (package
21448 (name "python-voluptuous")
21449 (version "0.11.7")
21450 (source
21451 (origin
21452 (method url-fetch)
21453 (uri (pypi-uri "voluptuous" version))
21454 (sha256
21455 (base32
21456 "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
21457 (build-system python-build-system)
21458 (native-inputs
21459 `(("python-nose" ,python-nose)))
21460 (home-page "https://github.com/alecthomas/voluptuous")
21461 (synopsis "Python data validation library")
21462 (description
21463 "Voluptuous is a Python data validation library. It is primarily
21464 intended for validating data coming into Python as JSON, YAML, etc.")
21465 (license license:bsd-3)))
21466
21467 (define-public python-cmd2
21468 (package
21469 (name "python-cmd2")
21470 (version "1.0.2")
21471 (source
21472 (origin
21473 (method url-fetch)
21474 (uri (pypi-uri "cmd2" version))
21475 (sha256
21476 (base32
21477 "1f18plbc9yyvhn0js3d2bii9yld8zfl775gxsaw9jza5pmlg9ss2"))))
21478 (build-system python-build-system)
21479 (propagated-inputs
21480 `(("python-attrs" ,python-attrs)
21481 ("python-colorama" ,python-colorama)
21482 ("python-pyperclip" ,python-pyperclip)
21483 ("python-wcwidth" ,python-wcwidth)))
21484 (native-inputs
21485 `(("python-codecov" ,python-codecov)
21486 ("python-coverage" ,python-coverage)
21487 ("python-doc8" ,python-doc8)
21488 ("python-flake8" ,python-flake8)
21489 ("python-invoke" ,python-invoke)
21490 ("python-mock" ,python-mock)
21491 ("python-pytest" ,python-pytest)
21492 ("python-pytest-cov" ,python-pytest-cov)
21493 ("python-pytest-mock" ,python-pytest-mock)
21494 ("python-setuptools-scm" ,python-setuptools-scm)
21495 ("python-sphinx" ,python-sphinx)
21496 ("python-sphinx-autobuild" ,python-sphinx-autobuild)
21497 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
21498 ("python-tox" ,python-tox)
21499 ("python-twine" ,python-twine)
21500 ("which" ,which)))
21501 (home-page "https://github.com/python-cmd2/cmd2")
21502 (synopsis "Tool for building interactive command line applications")
21503 (description
21504 "Cmd2 is a tool for building interactive command line applications in
21505 Python. Its goal is to make it quick and easy for developers to build
21506 feature-rich and user-friendly interactive command line applications. It
21507 provides a simple API which is an extension of Python's built-in @code{cmd}
21508 module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
21509 make your life easier and eliminates much of the boilerplate code which would
21510 be necessary when using @code{cmd}.")
21511 (license license:expat)))
21512
21513 (define-public python-pytidylib
21514 (package
21515 (name "python-pytidylib")
21516 (version "0.3.2")
21517 (source (origin
21518 (method url-fetch)
21519 (uri (pypi-uri "pytidylib" version))
21520 (sha256
21521 (base32
21522 "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
21523 (build-system python-build-system)
21524 (arguments
21525 '(#:phases
21526 (modify-phases %standard-phases
21527 (add-before 'build 'qualify-libtidy
21528 (lambda* (#:key inputs #:allow-other-keys)
21529 (let ((libtidy (string-append (assoc-ref inputs "tidy")
21530 "/lib/libtidy.so")))
21531 (substitute* "tidylib/tidy.py"
21532 (("ctypes\\.util\\.find_library\\('tidy'\\)")
21533 (format #f "'~a'" libtidy)))
21534 #t))))))
21535 (inputs `(("tidy" ,tidy)))
21536 (home-page "https://github.com/countergram/pytidylib")
21537 (synopsis "Python wrapper for HTML Tidy library")
21538 (description
21539 "PyTidyLib is a Python package that wraps the HTML Tidy library. This
21540 allows you, from Python code, to “fix” invalid (X)HTML markup.")
21541 (license license:expat)))
21542
21543 (define-public python2-pytidylib
21544 (package-with-python2 python-pytidylib))
21545
21546 (define-public python-mujson
21547 (package
21548 (name "python-mujson")
21549 (version "1.4")
21550 (source
21551 (origin
21552 (method url-fetch)
21553 (uri (pypi-uri "mujson" version))
21554 (sha256
21555 (base32
21556 "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
21557 (build-system python-build-system)
21558 (home-page "https://github.com/mattgiles/mujson")
21559 (synopsis "Use the fastest JSON functions available at import time")
21560 (description "This packages selects the fastest JSON functions available
21561 at import time.")
21562 (license license:expat)))
21563
21564 (define-public python-bashlex
21565 (package
21566 (name "python-bashlex")
21567 (version "0.14")
21568 (source
21569 (origin
21570 (method url-fetch)
21571 (uri (pypi-uri "bashlex" version))
21572 (sha256
21573 (base32
21574 "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
21575 (build-system python-build-system)
21576 (arguments
21577 `(#:phases
21578 (modify-phases %standard-phases
21579 (add-before 'build 'pregenerate-yacc-tables
21580 (lambda _
21581 ;; parser.py caches tables, which attempts to write to site lib
21582 ;; see https://github.com/idank/bashlex/issues/51
21583 (invoke "python" "-c" "import bashlex"))))))
21584 (home-page
21585 "https://github.com/idank/bashlex")
21586 (synopsis "Python parser for bash")
21587 (description "@code{bashlex} is a Python port of the parser used
21588 internally by GNU bash.
21589
21590 For the most part it's transliterated from C, the major differences are:
21591
21592 @itemize
21593 @item it does not execute anything
21594 @item it is reentrant
21595 @item it generates a complete AST
21596 @end itemize
21597 ")
21598 (license license:gpl3+)))
21599
21600 (define-public python-jinxed
21601 (package
21602 (name "python-jinxed")
21603 (version "1.0.0")
21604 (source
21605 (origin
21606 (method url-fetch)
21607 (uri (pypi-uri "jinxed" version))
21608 (sha256
21609 (base32
21610 "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
21611 (build-system python-build-system)
21612 (arguments
21613 '(#:phases
21614 (modify-phases %standard-phases
21615 (add-before 'check 'set-environment-variables
21616 (lambda* (#:key inputs #:allow-other-keys)
21617 (let ((ncurses (assoc-ref inputs "ncurses")))
21618 (setenv "TERM" "LINUX")
21619 (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
21620 #t))))
21621 #:tests? #f)) ; _curses.error: setupterm: could not find terminal
21622 (native-inputs
21623 `(("ncurses" ,ncurses)))
21624 (home-page "https://github.com/Rockhopper-Technologies/jinxed")
21625 (synopsis "Jinxed Terminal Library")
21626 (description
21627 "Jinxed is an implementation of a subset of the Python curses library.")
21628 (license license:mpl2.0)))
21629
21630 (define-public python-blessed
21631 (package
21632 (name "python-blessed")
21633 (version "1.17.8")
21634 (source
21635 (origin
21636 (method url-fetch)
21637 (uri (pypi-uri "blessed" version))
21638 (sha256
21639 (base32
21640 "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
21641 (modules '((guix build utils)))
21642 (snippet
21643 '(begin
21644 ;; Don't get hung up on Windows test failures.
21645 (delete-file "blessed/win_terminal.py") #t))))
21646 (build-system python-build-system)
21647 (propagated-inputs
21648 `(("python-jinxed" ,python-jinxed)
21649 ("python-six" ,python-six)
21650 ("python-wcwidth" ,python-wcwidth)))
21651 (native-inputs
21652 `(("python-mock" ,python-mock)
21653 ("python-pytest" ,python-pytest)))
21654 (home-page "https://github.com/jquast/blessed")
21655 (synopsis "Wrapper around terminal capabilities")
21656 (description
21657 "Blessed is a thin, practical wrapper around terminal styling, screen
21658 positioning, and keyboard input.")
21659 (license license:expat)))
21660
21661 (define-public python-readme-renderer
21662 (package
21663 (name "python-readme-renderer")
21664 (version "26.0")
21665 (source
21666 (origin
21667 (method url-fetch)
21668 (uri (pypi-uri "readme_renderer" version))
21669 (sha256
21670 (base32
21671 "13fnrv7z3y0yfafzcjbl55cqxncvbxadr72ql4l29pgyvrqxpsfb"))))
21672 (build-system python-build-system)
21673 (propagated-inputs
21674 `(("python-bleach" ,python-bleach)
21675 ("python-docutils" ,python-docutils)
21676 ("python-pygments" ,python-pygments)
21677 ("python-six" ,python-six)))
21678 (native-inputs
21679 `(("python-mock" ,python-mock)
21680 ("python-pytest" ,python-pytest)))
21681 (home-page "https://github.com/pypa/readme_renderer")
21682 (synopsis "Render README files in Warehouse")
21683 (description
21684 "Readme Renderer is a library that will safely render arbitrary README
21685 files into HTML. It is designed to be used in Warehouse to render the
21686 @code{long_description} for packages. It can handle Markdown, reStructuredText,
21687 and plain text.")
21688 (license license:asl2.0)))
21689
21690 (define-public python-lazr-delegates
21691 (package
21692 (name "python-lazr-delegates")
21693 (version "2.0.4")
21694 (source
21695 (origin
21696 (method url-fetch)
21697 (uri (pypi-uri "lazr.delegates" version))
21698 (sha256
21699 (base32
21700 "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
21701 (build-system python-build-system)
21702 (arguments
21703 '(#:phases
21704 (modify-phases %standard-phases
21705 (replace 'check
21706 (lambda _
21707 (invoke "python" "setup.py" "nosetests"))))))
21708 (native-inputs
21709 `(("python-nose" ,python-nose)))
21710 (propagated-inputs
21711 `(("python-zope-interface" ,python-zope-interface)))
21712 (home-page "https://launchpad.net/lazr.delegates")
21713 (synopsis "Easily write objects that delegate behavior")
21714 (description
21715 "The @code{lazr.delegates} package makes it easy to write objects that
21716 delegate behavior to another object. The new object adds some property or
21717 behavior on to the other object, while still providing the underlying interface,
21718 and delegating behavior.")
21719 (license license:lgpl3)))
21720
21721 (define-public python-lazr-config
21722 (package
21723 (name "python-lazr-config")
21724 (version "2.2.2")
21725 (source
21726 (origin
21727 (method url-fetch)
21728 (uri (pypi-uri "lazr.config" version))
21729 (sha256
21730 (base32
21731 "11xpddgyhyj7sf27wbmrq5lnqk21wnprx3ajycgwlxjamh6sgffd"))))
21732 (build-system python-build-system)
21733 (arguments
21734 '(#:phases
21735 (modify-phases %standard-phases
21736 (replace 'check
21737 (lambda _
21738 (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
21739 (native-inputs
21740 `(("python-nose" ,python-nose)))
21741 (propagated-inputs
21742 `(("python-lazr-delegates" ,python-lazr-delegates)
21743 ("python-zope-interface" ,python-zope-interface)))
21744 (home-page "https://launchpad.net/lazr.config")
21745 (synopsis "Create configuration schemas and process and validate configurations")
21746 (description
21747 "The LAZR config system is typically used to manage process configuration.
21748 Process configuration is for saying how things change when we run systems on
21749 different machines, or under different circumstances. This system uses ini-like
21750 file format of section, keys, and values. The config file supports inheritance
21751 to minimize duplication of information across files. The format supports schema
21752 validation.")
21753 (license license:lgpl3)))
21754
21755 (define-public python-flufl-bounce
21756 (package
21757 (name "python-flufl-bounce")
21758 (version "3.0.1")
21759 (source
21760 (origin
21761 (method url-fetch)
21762 (uri (pypi-uri "flufl.bounce" version))
21763 (sha256
21764 (base32
21765 "01lg1b0jpf8605mzaz9miq3nray6s7a7gc8n4wzg5nsxl8fglcp4"))))
21766 (build-system python-build-system)
21767 (propagated-inputs
21768 `(("python-atpublic" ,python-atpublic)
21769 ("python-zope-interface" ,python-zope-interface)))
21770 (native-inputs
21771 `(("python-nose2" ,python-nose2)))
21772 (home-page "https://fluflbounce.readthedocs.io/en/latest/")
21773 (synopsis "Email bounce detectors")
21774 (description "The @code{flufl.bounce} library provides a set of heuristics
21775 and an API for detecting the original bouncing email addresses from a bounce
21776 message. Many formats found in the wild are supported, as are VERP and
21777 RFC 3464.")
21778 (license (list license:asl2.0
21779 license:lgpl3)))) ; only for setup_headers.py
21780
21781 (define-public python-flufl-i18n
21782 (package
21783 (name "python-flufl-i18n")
21784 (version "3.0")
21785 (source
21786 (origin
21787 (method url-fetch)
21788 (uri (pypi-uri "flufl.i18n" version))
21789 (sha256
21790 (base32
21791 "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
21792 (build-system python-build-system)
21793 (propagated-inputs
21794 `(("python-atpublic" ,python-atpublic)))
21795 (home-page "https://flufli18n.readthedocs.io")
21796 (synopsis "API for Python internationalization")
21797 (description
21798 "This package provides a high level, convenient API for managing
21799 internationalization translation contexts in Python application. There is a
21800 simple API for single-context applications, such as command line scripts which
21801 only need to translate into one language during the entire course of thei
21802 execution. There is a more flexible, but still convenient API for multi-context
21803 applications, such as servers, which may need to switch language contexts for
21804 different tasks.")
21805 (license license:asl2.0)))
21806
21807 (define-public python-flufl-lock
21808 (package
21809 (name "python-flufl-lock")
21810 (version "4.0")
21811 (source
21812 (origin
21813 (method url-fetch)
21814 (uri (pypi-uri "flufl.lock" version))
21815 (sha256
21816 (base32
21817 "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
21818 (build-system python-build-system)
21819 (propagated-inputs
21820 `(("python-atpublic" ,python-atpublic)
21821 ("python-psutil" ,python-psutil)))
21822 (home-page "https://flufllock.readthedocs.io")
21823 (synopsis "NFS-safe file locking with timeouts for POSIX systems")
21824 (description
21825 "The @dfn{flufl.lock} package provides NFS-safe file locking with
21826 timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
21827 @code{open} system call but uses a lockfile. Lock objects support lock-breaking
21828 and have a maximum lifetime built-in.")
21829 (license (list license:asl2.0
21830 license:lgpl3)))) ; only for setup_helpers.py
21831
21832 (define-public python-flufl-testing
21833 (package
21834 (name "python-flufl-testing")
21835 (version "0.8")
21836 (source
21837 (origin
21838 (method url-fetch)
21839 (uri (pypi-uri "flufl.testing" version))
21840 (sha256
21841 (base32
21842 "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
21843 (build-system python-build-system)
21844 (native-inputs
21845 `(("python-nose2" ,python-nose2)))
21846 (home-page "https://gitlab.com/warsaw/flufl.testing")
21847 (synopsis "Collection of test tool plugins")
21848 (description
21849 "This package contains a small collection of test tool plugins for
21850 @code{nose2} and @code{flake8}.")
21851 (license license:asl2.0)))
21852
21853 (define-public python-devtools
21854 (package
21855 (name "python-devtools")
21856 (version "0.6")
21857 (source
21858 (origin
21859 (method git-fetch)
21860 (uri (git-reference
21861 (url "https://github.com/samuelcolvin/python-devtools")
21862 (commit (string-append "v" version))))
21863 (file-name (git-file-name name version))
21864 (sha256
21865 (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
21866 (build-system python-build-system)
21867 (native-inputs
21868 `(("python-pytest" ,python-pytest)
21869 ("python-pytest-mock" ,python-pytest-mock)))
21870 (propagated-inputs
21871 `(("python-pygments" ,python-pygments)))
21872 (arguments
21873 `(#:phases (modify-phases %standard-phases
21874 (replace 'check
21875 (lambda _
21876 (invoke "pytest")
21877 #t)))))
21878 (home-page "https://github.com/samuelcolvin/python-devtools")
21879 (synopsis "Debug command and development tools")
21880 (description
21881 "This package provides a debug print command and other development tools.
21882 It adds a simple and readable way to print stuff during development.")
21883 (license license:expat)))
21884
21885 (define-public python-dateparser
21886 (package
21887 (name "python-dateparser")
21888 (version "0.7.6")
21889 (source
21890 (origin
21891 (method url-fetch)
21892 (uri (pypi-uri "dateparser" version))
21893 (sha256
21894 (base32
21895 "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
21896 (build-system python-build-system)
21897 (inputs
21898 `(("tzdata" ,tzdata)))
21899 (propagated-inputs
21900 `(("python-dateutil" ,python-dateutil)
21901 ("python-pytz" ,python-pytz)
21902 ("python-regex" ,python-regex)
21903 ("python-ruamel.yaml" ,python-ruamel.yaml)
21904 ("python-tzlocal" ,python-tzlocal)))
21905 (native-inputs
21906 `(("python-mock" ,python-mock)
21907 ("python-parameterized" ,python-parameterized)))
21908 (arguments
21909 `(;; TODO: Of 23320 tests, 6 fail and 53 error.
21910 #:tests? #f
21911 #:phases
21912 (modify-phases %standard-phases
21913 (add-before 'check 'set-check-environment
21914 (lambda* (#:key inputs #:allow-other-keys)
21915 (setenv "TZ" "UTC")
21916 (setenv "TZDIR"
21917 (string-append (assoc-ref inputs "tzdata")
21918 "/share/zoneinfo"))
21919 #t)))))
21920 (home-page "https://github.com/scrapinghub/dateparser")
21921 (synopsis
21922 "Date parsing library designed to parse dates from HTML pages")
21923 (description
21924 "@code{python-dateparser} provides modules to easily parse localized
21925 dates in almost any string formats commonly found on web pages.")
21926 (license license:bsd-3)))
21927
21928 (define-public python-dparse
21929 (package
21930 (name "python-dparse")
21931 (version "0.5.1")
21932 (source
21933 (origin
21934 (method url-fetch)
21935 (uri (pypi-uri "dparse" version))
21936 (sha256
21937 (base32
21938 "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
21939 (build-system python-build-system)
21940 (native-inputs
21941 `(("python-pytest" ,python-pytest)))
21942 (propagated-inputs
21943 `(("python-packaging" ,python-packaging)
21944 ("python-pyyaml" ,python-pyyaml)
21945 ("python-toml" ,python-toml)))
21946 (home-page "https://github.com/pyupio/dparse")
21947 (synopsis "Parser for Python dependency files")
21948 (description "This package provides a parser for Python dependency files.")
21949 (license license:expat)))
21950
21951 (define-public python-safety
21952 (package
21953 (name "python-safety")
21954 (version "1.9.0")
21955 (source
21956 (origin
21957 (method url-fetch)
21958 (uri (pypi-uri "safety" version))
21959 (sha256
21960 (base32
21961 "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
21962 (build-system python-build-system)
21963 (arguments
21964 `(#:phases
21965 (modify-phases %standard-phases
21966 (add-after 'unpack 'disable-tests
21967 (lambda _
21968 (substitute* "tests/test_safety.py"
21969 ;; requires network
21970 (("def test_check_live") "def _test_check_live"))
21971 #t)))))
21972 (propagated-inputs
21973 `(("python-click" ,python-click)
21974 ("python-dparse" ,python-dparse)
21975 ("python-packaging" ,python-packaging)
21976 ("python-requests" ,python-requests)))
21977 (home-page "https://github.com/pyupio/safety")
21978 (synopsis "Check installed dependencies for known vulnerabilities")
21979 (description "Safety checks installed dependencies for known vulnerabilities.
21980 By default it uses the open Python vulnerability database Safety DB.")
21981 (license license:expat)))